Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: courgette/disassembler_elf_32_arm.h

Issue 2462993003: [Courgette] Refactor: Add and use Instruction*Receptor classes; call ParseFile() in 2 passes. (Closed)
Patch Set: Fix comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « courgette/disassembler_elf_32.cc ('k') | courgette/disassembler_elf_32_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/disassembler_elf_32_arm.h
diff --git a/courgette/disassembler_elf_32_arm.h b/courgette/disassembler_elf_32_arm.h
index 24b8aa83c7002b642ddb543ff0cb6c81b31b1a34..eec5b38cd219ffb3933e979a6c4be5089e2531d3 100644
--- a/courgette/disassembler_elf_32_arm.h
+++ b/courgette/disassembler_elf_32_arm.h
@@ -17,6 +17,7 @@
namespace courgette {
class AssemblyProgram;
+class InstructionReceptor;
enum ARM_RVA {
ARM_OFF8,
@@ -40,8 +41,8 @@ class DisassemblerElf32ARM : public DisassemblerElf32 {
// TypedRVA interfaces.
CheckBool ComputeRelativeTarget(const uint8_t* op_pointer) override;
- CheckBool EmitInstruction(AssemblyProgram* program,
- Label* label) override;
+ CheckBool EmitInstruction(Label* label,
+ InstructionReceptor* receptor) override;
uint16_t op_size() const override;
uint16_t c_op() const { return c_op_; }
@@ -86,8 +87,8 @@ class DisassemblerElf32ARM : public DisassemblerElf32 {
CheckBool RelToRVA(Elf32_Rel rel,
RVA* result) const override WARN_UNUSED_RESULT;
CheckBool ParseRelocationSection(const Elf32_Shdr* section_header,
- AssemblyProgram* program)
- override WARN_UNUSED_RESULT;
+ InstructionReceptor* receptor) const override
+ WARN_UNUSED_RESULT;
CheckBool ParseRel32RelocsFromSection(const Elf32_Shdr* section)
override WARN_UNUSED_RESULT;
@@ -95,6 +96,7 @@ class DisassemblerElf32ARM : public DisassemblerElf32 {
std::map<RVA, int> rel32_target_rvas_;
#endif
+ private:
DISALLOW_COPY_AND_ASSIGN(DisassemblerElf32ARM);
};
« no previous file with comments | « courgette/disassembler_elf_32.cc ('k') | courgette/disassembler_elf_32_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698