OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COURGETTE_DISASSEMBLER_ELF_32_ARM_H_ | 5 #ifndef COURGETTE_DISASSEMBLER_ELF_32_ARM_H_ |
6 #define COURGETTE_DISASSEMBLER_ELF_32_ARM_H_ | 6 #define COURGETTE_DISASSEMBLER_ELF_32_ARM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 class DisassemblerElf32ARM : public DisassemblerElf32 { | 29 class DisassemblerElf32ARM : public DisassemblerElf32 { |
30 public: | 30 public: |
31 class TypedRVAARM : public TypedRVA { | 31 class TypedRVAARM : public TypedRVA { |
32 public: | 32 public: |
33 TypedRVAARM(ARM_RVA type, RVA rva) : TypedRVA(rva), type_(type) { } | 33 TypedRVAARM(ARM_RVA type, RVA rva) : TypedRVA(rva), type_(type) { } |
34 ~TypedRVAARM() override { } | 34 ~TypedRVAARM() override { } |
35 | 35 |
36 // TypedRVA interfaces. | 36 // TypedRVA interfaces. |
37 CheckBool ComputeRelativeTarget(const uint8_t* op_pointer) override; | 37 CheckBool ComputeRelativeTarget(const uint8_t* op_pointer) override; |
38 CheckBool EmitInstruction(AssemblyProgram* program, | 38 CheckBool EmitInstruction(AssemblyProgram* program, |
39 RVA target_rva) override; | 39 Label* label) override; |
40 uint16_t op_size() const override; | 40 uint16_t op_size() const override; |
41 | 41 |
42 uint16_t c_op() const { return c_op_; } | 42 uint16_t c_op() const { return c_op_; } |
43 | 43 |
44 private: | 44 private: |
45 ARM_RVA type_; | 45 ARM_RVA type_; |
46 uint16_t c_op_; // Set by ComputeRelativeTarget(). | 46 uint16_t c_op_; // Set by ComputeRelativeTarget(). |
47 const uint8_t* arm_op_; | 47 const uint8_t* arm_op_; |
48 }; | 48 }; |
49 | 49 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 #if COURGETTE_HISTOGRAM_TARGETS | 89 #if COURGETTE_HISTOGRAM_TARGETS |
90 std::map<RVA, int> rel32_target_rvas_; | 90 std::map<RVA, int> rel32_target_rvas_; |
91 #endif | 91 #endif |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(DisassemblerElf32ARM); | 93 DISALLOW_COPY_AND_ASSIGN(DisassemblerElf32ARM); |
94 }; | 94 }; |
95 | 95 |
96 } // namespace courgette | 96 } // namespace courgette |
97 | 97 |
98 #endif // COURGETTE_DISASSEMBLER_ELF_32_ARM_H_ | 98 #endif // COURGETTE_DISASSEMBLER_ELF_32_ARM_H_ |
OLD | NEW |