[PATCH] D18753: [mips][sanitizer_common] Don't use `ld` in internal_clone() on 32-bit MIPS.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 4 05:58:41 PDT 2016
dsanders added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:943-947
@@ -942,7 +942,7 @@
"move $7,%4;\n"
/* Store the fifth argument on stack
* if we are using 32-bit abi.
*/
#if SANITIZER_WORDSIZE == 32
"lw %5,16($29);\n"
#else
----------------
It's not directly related to this patch but: The comment says 'store' but the instruction is a load from the compiler-generated stack frame.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:960-971
@@ -959,4 +959,14 @@
/* Call "fn(arg)". */
+#if SANITIZER_WORDSIZE == 32
+#ifdef __BIG_ENDIAN__
+ "lw $25,4($29);\n"
+ "lw $4,12($29);\n"
+#else
+ "lw $25,0($29);\n"
+ "lw $4,8($29);\n"
+#endif
+#else
"ld $25,0($29);\n"
"ld $4,8($29);\n"
+#endif
"jal $25;\n"
----------------
It's not directly related to this patch but I also noticed that some of the load instructions are loading from the compiler-generated stack frame ($29 is $sp). This is likely to be sensitive to compiler changes and the offsets are likely to differ between ABI's.
http://reviews.llvm.org/D18753
More information about the llvm-commits
mailing list