diff options
author | Charles Davis <cdavis@mines.edu> | 2011-05-19 19:35:55 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2011-05-19 19:35:55 +0000 |
commit | c3b162857a587c9877e903f038471b882b213232 (patch) | |
tree | 10073987eebdd8504721fbb230051bf2644c7720 /include/llvm/MC/MCWin64EH.h | |
parent | 097f9a94f660f99ea2aad62da301e8409af391a7 (diff) | |
download | llvm-c3b162857a587c9877e903f038471b882b213232.tar.gz llvm-c3b162857a587c9877e903f038471b882b213232.tar.bz2 llvm-c3b162857a587c9877e903f038471b882b213232.tar.xz |
Implement the Win64 EH prolog instruction methods on the base MCStreamer.
I had to change the API slightly to avoid overloading issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCWin64EH.h')
-rw-r--r-- | include/llvm/MC/MCWin64EH.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/include/llvm/MC/MCWin64EH.h b/include/llvm/MC/MCWin64EH.h index 4c6d91972e..cc3bc6e1a6 100644 --- a/include/llvm/MC/MCWin64EH.h +++ b/include/llvm/MC/MCWin64EH.h @@ -15,7 +15,6 @@ #ifndef LLVM_MC_MCWIN64EH_H #define LLVM_MC_MCWIN64EH_H -#include "llvm/CodeGen/MachineLocation.h" // FIXME #include "llvm/Support/Win64EH.h" #include <vector> @@ -29,22 +28,20 @@ namespace llvm { private: OpType Operation; unsigned Offset; - MachineLocation Destination; - MachineLocation Source; + unsigned Register; public: - MCWin64EHInstruction(OpType Op, unsigned Register) - : Operation(Op), Offset(0), Destination(0), Source(Register) { + MCWin64EHInstruction(OpType Op, unsigned Reg) + : Operation(Op), Offset(0), Register(Reg) { assert(Op == Win64EH::UOP_PushNonVol); } MCWin64EHInstruction(unsigned Size) : Operation(Size>128 ? Win64EH::UOP_AllocLarge : Win64EH::UOP_AllocSmall), Offset(Size) { } - MCWin64EHInstruction(unsigned Register, unsigned Off) - : Operation(Win64EH::UOP_SetFPReg), Offset(Off), Destination(Register) { } - MCWin64EHInstruction(OpType Op, const MachineLocation &D, - unsigned S) - : Operation(Op), Destination(D), Source(S) { - assert(Op == Win64EH::UOP_SaveNonVol || + MCWin64EHInstruction(OpType Op, unsigned Reg, + unsigned Off) + : Operation(Op), 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); @@ -56,9 +53,8 @@ namespace llvm { OpType getOperation() const { return Operation; } unsigned getOffset() const { return Offset; } unsigned getSize() const { return Offset; } + unsigned getRegister() const { return Register; } bool isPushCodeFrame() const { return Offset == 1; } - const MachineLocation &getDestination() const { return Destination; } - const MachineLocation &getSource() const { return Source; } }; struct MCWin64EHUnwindInfo { |