diff options
author | Sanjin Sijaric <ssijaric@codeaurora.org> | 2018-10-24 00:03:34 +0000 |
---|---|---|
committer | Sanjin Sijaric <ssijaric@codeaurora.org> | 2018-10-24 00:03:34 +0000 |
commit | cd416382927996eb1aa661e3f9cf9ce3c46bb71e (patch) | |
tree | 2ac23f7577667b912cc1840d7f910d4bd9070c1f /llvm/tools/llvm-readobj/ARMWinEHPrinter.h | |
parent | 4005f9a860c3d66090f5572d30cc91c6b52acea2 (diff) | |
download | bcm5719-llvm-cd416382927996eb1aa661e3f9cf9ce3c46bb71e.tar.gz bcm5719-llvm-cd416382927996eb1aa661e3f9cf9ce3c46bb71e.zip |
[ARM64][Windows] Add unwind support to llvm-readobj
This patch adds support for dumping the unwind info from ARM64 COFF object
files.
Differential Revision: https://reviews.llvm.org/D53264
llvm-svn: 345108
Diffstat (limited to 'llvm/tools/llvm-readobj/ARMWinEHPrinter.h')
-rw-r--r-- | llvm/tools/llvm-readobj/ARMWinEHPrinter.h | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/llvm/tools/llvm-readobj/ARMWinEHPrinter.h b/llvm/tools/llvm-readobj/ARMWinEHPrinter.h index 95f52170226..e271a1e6fe7 100644 --- a/llvm/tools/llvm-readobj/ARMWinEHPrinter.h +++ b/llvm/tools/llvm-readobj/ARMWinEHPrinter.h @@ -24,13 +24,16 @@ class Decoder { ScopedPrinter &SW; raw_ostream &OS; + bool isAArch64; struct RingEntry { uint8_t Mask; uint8_t Value; + uint8_t Length; bool (Decoder::*Routine)(const uint8_t *, unsigned &, unsigned, bool); }; static const RingEntry Ring[]; + static const RingEntry Ring64[]; bool opcode_0xxxxxxx(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); @@ -75,6 +78,50 @@ class Decoder { bool opcode_11111111(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, bool Prologue); + // ARM64 unwind codes start here. + bool opcode_alloc_s(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, + bool Prologue); + bool opcode_save_r19r20_x(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_fplr(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_fplr_x(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_alloc_m(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, + bool Prologue); + bool opcode_save_regp(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_regp_x(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_reg(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_reg_x(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_lrpair(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_fregp(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_fregp_x(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_freg(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_save_freg_x(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + bool opcode_alloc_l(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, + bool Prologue); + bool opcode_setfp(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, + bool Prologue); + bool opcode_addfp(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, + bool Prologue); + bool opcode_nop(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, + bool Prologue); + bool opcode_end(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, + bool Prologue); + bool opcode_end_c(const uint8_t *Opcodes, unsigned &Offset, unsigned Length, + bool Prologue); + bool opcode_save_next(const uint8_t *Opcodes, unsigned &Offset, + unsigned Length, bool Prologue); + void decodeOpcodes(ArrayRef<uint8_t> Opcodes, unsigned Offset, bool Prologue); @@ -107,7 +154,9 @@ class Decoder { const object::SectionRef Section); public: - Decoder(ScopedPrinter &SW) : SW(SW), OS(SW.getOStream()) {} + Decoder(ScopedPrinter &SW, bool isAArch64) : SW(SW), + OS(SW.getOStream()), + isAArch64(isAArch64) {} std::error_code dumpProcedureData(const object::COFFObjectFile &COFF); }; } |