forked from OSchip/llvm-project
Revert "Patch by Ray Donnelly to print register names instead of numbers."
This reverts commit r206683. The code was confusing SEH register numbers with DWARF register numbers. The test case it was committed with was obviously incorrect. The disassembler was roundtripping '.seh_pushreg %rsi' as '.seh_pushreg %rbp', and other exciting things. Noticed by Vadim Chugunov. llvm-svn: 210574
This commit is contained in:
parent
f9763874b7
commit
b01961c2c1
|
@ -1134,17 +1134,14 @@ void MCAsmStreamer::EmitWin64EHHandlerData() {
|
|||
void MCAsmStreamer::EmitWin64EHPushReg(unsigned Register) {
|
||||
MCStreamer::EmitWin64EHPushReg(Register);
|
||||
|
||||
OS << "\t.seh_pushreg ";
|
||||
EmitRegisterName(Register);
|
||||
OS << "\t.seh_pushreg " << Register;
|
||||
EmitEOL();
|
||||
}
|
||||
|
||||
void MCAsmStreamer::EmitWin64EHSetFrame(unsigned Register, unsigned Offset) {
|
||||
MCStreamer::EmitWin64EHSetFrame(Register, Offset);
|
||||
|
||||
OS << "\t.seh_setframe ";
|
||||
EmitRegisterName(Register);
|
||||
OS << ", " << Offset;
|
||||
OS << "\t.seh_setframe " << Register << ", " << Offset;
|
||||
EmitEOL();
|
||||
}
|
||||
|
||||
|
@ -1158,18 +1155,14 @@ void MCAsmStreamer::EmitWin64EHAllocStack(unsigned Size) {
|
|||
void MCAsmStreamer::EmitWin64EHSaveReg(unsigned Register, unsigned Offset) {
|
||||
MCStreamer::EmitWin64EHSaveReg(Register, Offset);
|
||||
|
||||
OS << "\t.seh_savereg ";
|
||||
EmitRegisterName(Register);
|
||||
OS << ", " << Offset;
|
||||
OS << "\t.seh_savereg " << Register << ", " << Offset;
|
||||
EmitEOL();
|
||||
}
|
||||
|
||||
void MCAsmStreamer::EmitWin64EHSaveXMM(unsigned Register, unsigned Offset) {
|
||||
MCStreamer::EmitWin64EHSaveXMM(Register, Offset);
|
||||
|
||||
OS << "\t.seh_savexmm ";
|
||||
EmitRegisterName(Register);
|
||||
OS << ", " << Offset;
|
||||
OS << "\t.seh_savexmm " << Register << ", " << Offset;
|
||||
EmitEOL();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
# CHECK: .seh_proc func
|
||||
# CHECK: .seh_pushframe @code
|
||||
# CHECK: .seh_stackalloc 24
|
||||
# CHECK: .seh_savereg %rbp, 16
|
||||
# CHECK: .seh_savexmm %r8, 0
|
||||
# CHECK: .seh_pushreg %rbx
|
||||
# CHECK: .seh_setframe %rbx, 0
|
||||
# CHECK: .seh_savereg 6, 16
|
||||
# CHECK: .seh_savexmm 8, 0
|
||||
# CHECK: .seh_pushreg 3
|
||||
# CHECK: .seh_setframe 3, 0
|
||||
# CHECK: .seh_endprologue
|
||||
# CHECK: .seh_handler __C_specific_handler, @except
|
||||
# CHECK-NOT: .section{{.*}}.xdata
|
||||
|
|
Loading…
Reference in New Issue