[llvm-commits] [llvm] r59274 - /llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp
Evan Cheng
evan.cheng at apple.com
Thu Nov 13 15:28:54 PST 2008
Author: evancheng
Date: Thu Nov 13 17:28:54 2008
New Revision: 59274
URL: http://llvm.org/viewvc/llvm-project?rev=59274&view=rev
Log:
Lazy compilation callback save / restore VFP registers.
Modified:
llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?rev=59274&r1=59273&r2=59274&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp Thu Nov 13 17:28:54 2008
@@ -60,6 +60,9 @@
// whole compilation callback doesn't exist as far as the caller is
// concerned, so we can't just preserve the callee saved regs.
"stmdb sp!, {r0, r1, r2, r3, lr}\n"
+#ifdef __APPLE__
+ "fstmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n"
+#endif
// The LR contains the address of the stub function on entry.
// pass it as the argument to the C part of the callback
"mov r0, lr\n"
@@ -77,8 +80,14 @@
// +--------+
// 1 | LR | Stub address (start of stub)
// 2-5 | R3..R0 | Saved registers (we need to preserve all regs)
+ // 6-20 | D0..D7 | Saved VFP registers
// +--------+
//
+#ifdef __APPLE__
+ // Restore VFP caller-saved registers.
+ "fldmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n"
+#endif
+ //
// We need to exchange the values in slots 0 and 1 so we can
// return to the address in slot 1 with the address in slot 0
// restored to the LR.
More information about the llvm-commits
mailing list