[PATCH] D14614: [WinEH] Find root frame correctly in CLR funclets
Joseph Tremoulet via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 07:03:33 PST 2015
JosephTremoulet added inline comments.
================
Comment at: lib/Target/X86/X86FrameLowering.cpp:1206-1213
@@ +1205,10 @@
+ unsigned PSPSlotOffset = getPSPSlotOffsetFromSP(MF);
+ addRegOffset(
+ BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64rm)).addReg(Establisher),
+ Establisher, false, PSPSlotOffset);
+ // Save the root establisher back into the current funclet's (mostly
+ // empty) frame, in case a sub-funclet or the GC needs it.
+ addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64mr)), StackPtr,
+ false, PSPSlotOffset)
+ .addReg(Establisher);
+ }
----------------
Do I need to do anything additional here to capture appropriate dataflow constraints? The MachineInstrs this generates dump as:
```
MOV64rm %RCX, %RCX, 1, %noreg, 40, %noreg
MOV64mr %RSP, 1, %noreg, 40, %noreg, %RCX
```
and I don't know if I need to be marking rsp as a kill, doing something to get it to show up as a LHS, etc.
================
Comment at: lib/Target/X86/X86FrameLowering.cpp:1273-1275
@@ +1272,5 @@
+ unsigned PSPSlotOffset = getPSPSlotOffsetFromSP(MF);
+ addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64mr)), StackPtr, false,
+ PSPSlotOffset)
+ .addReg(StackPtr);
+ }
----------------
Similarly, this begets
```
MOV64mr %RSP, 1, %noreg, 40, %noreg, %RSP
```
and I'm wondering if the store needs to be marked volatile like C++'s UnwindHelp store is, etc.
http://reviews.llvm.org/D14614
More information about the llvm-commits
mailing list