diff options
author | Vitaly Buka <vitalybuka@google.com> | 2016-12-27 19:40:23 +0000 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2016-12-27 19:40:23 +0000 |
commit | b24d223f432e9d785d42c70a68464b5928570373 (patch) | |
tree | 696f57c5a050dc534c67d82688f7edd18781b70e | |
parent | c0e0924a93d5f5c77e25354184c64e43ff2d397b (diff) | |
download | compiler-rt-b24d223f432e9d785d42c70a68464b5928570373.tar.gz |
[asan] Fix test broken by r290540
Reviewers: ahatanak, eugenis, myatsina
Subscribers: kubabrecka, zizhar, llvm-commits
Differential Revision: https://reviews.llvm.org/D28128
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@290621 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/asan/tests/asan_asm_test.cc | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/asan/tests/asan_asm_test.cc b/lib/asan/tests/asan_asm_test.cc index eebf3e339..2bb37946b 100644 --- a/lib/asan/tests/asan_asm_test.cc +++ b/lib/asan/tests/asan_asm_test.cc @@ -57,12 +57,13 @@ template<> Type asm_read<Type>(Type *ptr) { \ return res; \ } -#define DECLARE_ASM_REP_MOVS(Type, Movs) \ - template <> void asm_rep_movs<Type>(Type * dst, Type * src, size_t size) { \ - __asm__("rep " Movs " \n\t" \ - : \ - : "D"(dst), "S"(src), "c"(size) \ - : "memory"); \ +#define DECLARE_ASM_REP_MOVS(Type, Movs) \ + template <> \ + void asm_rep_movs<Type>(Type * dst, Type * src, size_t size) { \ + __asm__("rep " Movs " \n\t" \ + : "+D"(dst), "+S"(src), "+c"(size) \ + : \ + : "memory"); \ } DECLARE_ASM_WRITE(U8, "8", "movq", "r"); @@ -99,12 +100,13 @@ template<> Type asm_read<Type>(Type *ptr) { \ return res; \ } -#define DECLARE_ASM_REP_MOVS(Type, Movs) \ - template <> void asm_rep_movs<Type>(Type * dst, Type * src, size_t size) { \ - __asm__("rep " Movs " \n\t" \ - : \ - : "D"(dst), "S"(src), "c"(size) \ - : "memory"); \ +#define DECLARE_ASM_REP_MOVS(Type, Movs) \ + template <> \ + void asm_rep_movs<Type>(Type * dst, Type * src, size_t size) { \ + __asm__("rep " Movs " \n\t" \ + : "+D"(dst), "+S"(src), "+c"(size) \ + : \ + : "memory"); \ } } // End of anonymous namespace |