summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2011-05-27 03:25:01 +0000
committerCharles Davis <cdavis@mines.edu>2011-05-27 03:25:01 +0000
commitc4cbf9b6aa95cf861a5a80bfccf615ff5c53e4ef (patch)
tree81bc296a672d3cdbf8e8c178bc7392bab8b6c60d /include
parentef60724ddc7726da8044d711c2a126197f4a0965 (diff)
downloadllvm-c4cbf9b6aa95cf861a5a80bfccf615ff5c53e4ef.tar.gz
llvm-c4cbf9b6aa95cf861a5a80bfccf615ff5c53e4ef.tar.bz2
llvm-c4cbf9b6aa95cf861a5a80bfccf615ff5c53e4ef.tar.xz
Start keeping track of where the various unwind instructions are in the prolog.
Use them to calculate the offset inside the prolog. Emit this value when emitting the unwind codes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCWin64EH.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/llvm/MC/MCWin64EH.h b/include/llvm/MC/MCWin64EH.h
index 39f3046546..5c0cfad7c3 100644
--- a/include/llvm/MC/MCWin64EH.h
+++ b/include/llvm/MC/MCWin64EH.h
@@ -28,30 +28,31 @@ namespace llvm {
typedef Win64EH::UnwindOpcodes OpType;
private:
OpType Operation;
+ MCSymbol *Label;
unsigned Offset;
unsigned Register;
public:
- MCWin64EHInstruction(OpType Op, unsigned Reg)
- : Operation(Op), Offset(0), Register(Reg) {
- assert(Op == Win64EH::UOP_PushNonVol);
+ MCWin64EHInstruction(OpType Op, MCSymbol *L, unsigned Reg)
+ : Operation(Op), Label(L), Offset(0), Register(Reg) {
+ assert(Op == Win64EH::UOP_PushNonVol);
}
- MCWin64EHInstruction(unsigned Size)
+ MCWin64EHInstruction(MCSymbol *L, unsigned Size)
: Operation(Size>128 ? Win64EH::UOP_AllocLarge : Win64EH::UOP_AllocSmall),
- Offset(Size) { }
- MCWin64EHInstruction(OpType Op, unsigned Reg,
- unsigned Off)
- : Operation(Op), Offset(Off), Register(Reg) {
+ Label(L), Offset(Size) { }
+ MCWin64EHInstruction(OpType Op, MCSymbol *L, unsigned Reg, unsigned Off)
+ : Operation(Op), Label(L), Offset(Off), Register(Reg) {
assert(Op == Win64EH::UOP_SetFPReg ||
Op == Win64EH::UOP_SaveNonVol ||
Op == Win64EH::UOP_SaveNonVolBig ||
Op == Win64EH::UOP_SaveXMM128 ||
Op == Win64EH::UOP_SaveXMM128Big);
}
- MCWin64EHInstruction(OpType Op, bool Code)
- : Operation(Op), Offset(Code ? 1 : 0) {
+ MCWin64EHInstruction(OpType Op, MCSymbol *L, bool Code)
+ : Operation(Op), Label(L), Offset(Code ? 1 : 0) {
assert(Op == Win64EH::UOP_PushMachFrame);
}
OpType getOperation() const { return Operation; }
+ MCSymbol *getLabel() const { return Label; }
unsigned getOffset() const { return Offset; }
unsigned getSize() const { return Offset; }
unsigned getRegister() const { return Register; }