aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2011-03-05 18:44:00 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2011-03-05 18:44:00 +0000
commite516379d2a2fd1ad7583b2fa289051da517d8a42 (patch)
treebabbdde874e91417b70caa37f9cb4a89be539aa8
parentb3fcc06d2124f9d01e3b48097b44cc141309908e (diff)
ARM assembler stuff is crazy: for .setfp positive values of offset corresponds to "add" instruction, not to "sub" as in .pad case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127106 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index 135148d164..e1a2cc57ab 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -916,10 +916,11 @@ void ARMAsmPrinter::EmitUnwindingInstruction(const MachineInstr *MI) {
}
if (DstReg == FramePtr && FramePtr != ARM::SP)
- // Set-up of the frame pointer.
- OutStreamer.EmitSetFP(FramePtr, ARM::SP, Offset);
+ // Set-up of the frame pointer. Positive values correspond to "add"
+ // instruction.
+ OutStreamer.EmitSetFP(FramePtr, ARM::SP, -Offset);
else if (DstReg == ARM::SP) {
- // Change of SP by an offset. Positive values corresponds to "sub"
+ // Change of SP by an offset. Positive values correspond to "sub"
// instruction.
OutStreamer.EmitPad(Offset);
} else {