[compiler-rt] r290540 - [inline-asm]No error for conflict between inputs\outputs and clobber list
Marina Yatsina via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 26 04:24:49 PST 2016
Author: myatsina
Date: Mon Dec 26 06:24:49 2016
New Revision: 290540
URL: http://llvm.org/viewvc/llvm-project?rev=290540&view=rev
Log:
[inline-asm]No error for conflict between inputs\outputs and clobber list
Updated test according to commit 290539:
According to extended asm syntax, a case where the clobber list includes a variable from the inputs or outputs should be an error - conflict.
for example:
const long double a = 0.0;
int main()
{
char b;
double t1 = a;
__asm__ ("fucompp": "=a" (b) : "u" (t1), "t" (t1) : "cc", "st", "st(1)");
return 0;
}
This should conflict with the output - t1 which is st, and st which is st aswell.
The patch fixes it.
Commit on behald of Ziv Izhar.
Differential Revision: https://reviews.llvm.org/D15075
Modified:
compiler-rt/trunk/lib/asan/tests/asan_asm_test.cc
Modified: compiler-rt/trunk/lib/asan/tests/asan_asm_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_asm_test.cc?rev=290540&r1=290539&r2=290540&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_asm_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_asm_test.cc Mon Dec 26 06:24:49 2016
@@ -62,7 +62,7 @@ template<> Type asm_read<Type>(Type *ptr
__asm__("rep " Movs " \n\t" \
: \
: "D"(dst), "S"(src), "c"(size) \
- : "rsi", "rdi", "rcx", "memory"); \
+ : "memory"); \
}
DECLARE_ASM_WRITE(U8, "8", "movq", "r");
@@ -104,7 +104,7 @@ template<> Type asm_read<Type>(Type *ptr
__asm__("rep " Movs " \n\t" \
: \
: "D"(dst), "S"(src), "c"(size) \
- : "esi", "edi", "ecx", "memory"); \
+ : "memory"); \
}
} // End of anonymous namespace
More information about the llvm-commits
mailing list