[compiler-rt] r231052 - [asan] Since x32 has 32-bit pointers, it should use the same code sequence as ia32 for AddressSanitizer asm_flags test. Patch by H.J. Lu

Kostya Serebryany kcc at google.com
Mon Mar 2 18:45:21 PST 2015


Author: kcc
Date: Mon Mar  2 20:45:21 2015
New Revision: 231052

URL: http://llvm.org/viewvc/llvm-project?rev=231052&view=rev
Log:
[asan] Since x32 has 32-bit pointers, it should use the same code sequence as ia32 for AddressSanitizer asm_flags test. Patch by H.J. Lu

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=231052&r1=231051&r2=231052&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_asm_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_asm_test.cc Mon Mar  2 20:45:21 2015
@@ -232,7 +232,7 @@ TEST(AddressSanitizer, asm_flags) {
   long magic = 0x1234;
   long r = 0x0;
 
-#if defined(__x86_64__)
+#if defined(__x86_64__) && !defined(__ILP32__)
   __asm__("xorq %%rax, %%rax  \n\t"
           "movq (%[p]), %%rax \n\t"
           "sete %%al          \n\t"
@@ -248,7 +248,7 @@ TEST(AddressSanitizer, asm_flags) {
           : [r] "=r"(r)
           : [p] "r"(&magic)
           : "eax", "memory");
-#endif // defined(__x86_64__)
+#endif // defined(__x86_64__) && !defined(__ILP32__)
 
   ASSERT_EQ(0x1, r);
 }





More information about the llvm-commits mailing list