summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorKai Nacke <kai.nacke@redstar.de>2013-07-06 17:15:36 +0000
committerKai Nacke <kai.nacke@redstar.de>2013-07-06 17:15:36 +0000
commit66bfdb8354ccb24ded9ecee0ac80aa7c103c2fa4 (patch)
tree915a56aa3d529328c7ffaffb6ea0d617e94b69a6 /llvm/lib/MC/MCStreamer.cpp
parent3d90a8f4f9867dfe28789761ef320480a4ddb300 (diff)
downloadbcm5719-llvm-66bfdb8354ccb24ded9ecee0ac80aa7c103c2fa4.tar.gz
bcm5719-llvm-66bfdb8354ccb24ded9ecee0ac80aa7c103c2fa4.zip
Fix wrong code offset for unwind code SET_FPREG.
The code offset for unwind code SET_FPREG is wrong because it is set to constant 0. The fix is to do the same as for the other unwind codes: emit a label and later the absolute difference between the label and the begin of the prologue. Also enables the failing test case MC/COFF/seh.s Reviewed by Charles Davis and Nico Rieck. llvm-svn: 185758
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 6542f42a03b..fb43a4adbda 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -470,7 +470,9 @@ void MCStreamer::EmitWin64EHSetFrame(unsigned Register, unsigned Offset) {
report_fatal_error("Frame register and offset already specified!");
if (Offset & 0x0F)
report_fatal_error("Misaligned frame pointer offset!");
- MCWin64EHInstruction Inst(Win64EH::UOP_SetFPReg, 0, Register, Offset);
+ MCSymbol *Label = getContext().CreateTempSymbol();
+ MCWin64EHInstruction Inst(Win64EH::UOP_SetFPReg, Label, Register, Offset);
+ EmitLabel(Label);
CurFrame->LastFrameInst = CurFrame->Instructions.size();
CurFrame->Instructions.push_back(Inst);
}
OpenPOWER on IntegriCloud