[llvm] r206683 - Patch by Ray Donnelly to print register names instead of numbers.

Reid Kleckner rnk at google.com
Tue Jun 10 13:49:10 PDT 2014


Reverted in r210574, because the test case doesn't actually make sense.
 It's disassembling '.seh_pushreg %rsi' as '.seh_pushreg %rbp'.


On Fri, Apr 18, 2014 at 10:40 PM, Yaron Keren <yaron.keren at gmail.com> wrote:

> Author: yrnkrn
> Date: Sat Apr 19 00:40:09 2014
> New Revision: 206683
>
> URL: http://llvm.org/viewvc/llvm-project?rev=206683&view=rev
> Log:
> Patch by Ray Donnelly to print register names instead of numbers.
>
> http://reviews.llvm.org/D3422
>
>
> Modified:
>     llvm/trunk/lib/MC/MCAsmStreamer.cpp
>     llvm/trunk/test/MC/AsmParser/directive_seh.s
>
> Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=206683&r1=206682&r2=206683&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
> +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Sat Apr 19 00:40:09 2014
> @@ -1257,14 +1257,17 @@ void MCAsmStreamer::EmitWin64EHHandlerDa
>  void MCAsmStreamer::EmitWin64EHPushReg(unsigned Register) {
>    MCStreamer::EmitWin64EHPushReg(Register);
>
> -  OS << "\t.seh_pushreg " << Register;
> +  OS << "\t.seh_pushreg ";
> +  EmitRegisterName(Register);
>    EmitEOL();
>  }
>
>  void MCAsmStreamer::EmitWin64EHSetFrame(unsigned Register, unsigned
> Offset) {
>    MCStreamer::EmitWin64EHSetFrame(Register, Offset);
>
> -  OS << "\t.seh_setframe " << Register << ", " << Offset;
> +  OS << "\t.seh_setframe ";
> +  EmitRegisterName(Register);
> +  OS << ", " << Offset;
>    EmitEOL();
>  }
>
> @@ -1278,14 +1281,18 @@ void MCAsmStreamer::EmitWin64EHAllocStac
>  void MCAsmStreamer::EmitWin64EHSaveReg(unsigned Register, unsigned
> Offset) {
>    MCStreamer::EmitWin64EHSaveReg(Register, Offset);
>
> -  OS << "\t.seh_savereg " << Register << ", " << Offset;
> +  OS << "\t.seh_savereg ";
> +  EmitRegisterName(Register);
> +  OS << ", " << Offset;
>    EmitEOL();
>  }
>
>  void MCAsmStreamer::EmitWin64EHSaveXMM(unsigned Register, unsigned
> Offset) {
>    MCStreamer::EmitWin64EHSaveXMM(Register, Offset);
>
> -  OS << "\t.seh_savexmm " << Register << ", " << Offset;
> +  OS << "\t.seh_savexmm ";
> +  EmitRegisterName(Register);
> +  OS << ", " << Offset;
>    EmitEOL();
>  }
>
>
> Modified: llvm/trunk/test/MC/AsmParser/directive_seh.s
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/directive_seh.s?rev=206683&r1=206682&r2=206683&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/MC/AsmParser/directive_seh.s (original)
> +++ llvm/trunk/test/MC/AsmParser/directive_seh.s Sat Apr 19 00:40:09 2014
> @@ -3,10 +3,10 @@
>  # CHECK: .seh_proc func
>  # CHECK: .seh_pushframe @code
>  # CHECK: .seh_stackalloc 24
> -# CHECK: .seh_savereg 6, 16
> -# CHECK: .seh_savexmm 8, 0
> -# CHECK: .seh_pushreg 3
> -# CHECK: .seh_setframe 3, 0
> +# CHECK: .seh_savereg %rbp, 16
> +# CHECK: .seh_savexmm %r8, 0
> +# CHECK: .seh_pushreg %rbx
> +# CHECK: .seh_setframe %rbx, 0
>  # CHECK: .seh_endprologue
>  # CHECK: .seh_handler __C_specific_handler, @except
>  # CHECK-NOT: .section{{.*}}.xdata
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140610/26bff59d/attachment.html>


More information about the llvm-commits mailing list