summaryrefslogtreecommitdiff
path: root/disassembler/disassembler_arm64.h
diff options
context:
space:
mode:
author Greg Cawthorne <greg.cawthorne@linaro.org> 2021-12-21 22:01:14 +0000
committer Ulya Trofimovich <skvadrik@google.com> 2022-06-09 11:18:05 +0000
commitbb3ef5afef7c24764e37891ccba741e6e3723ced (patch)
treeba0d7dcb7a8cc9c4d029be0b418a8e8f1f38eeba /disassembler/disassembler_arm64.h
parentb205efd45ea29a2f21489056fbb0f0309ba992d2 (diff)
VIXL Dissassembler Integration Upgrade May. 2022
This patch is needed as the VIXL disassembler visitor instrumentation interface has changed. VIXL now has all of its instruction specific instrumentation functions declared as private and therefore they cannot be overriden by the ART disassembler class as it was before. Now it is required by VIXL to override the main catch-all generic Visit function, which now passes with it a metadata object. This metadata is then used in the overriding function to select which instrumentation to perform based on the instruction type detected in the instruction sequence at runtime. This patch is tested against ART with the public VIXL tag 6.3.0 (https://github.com/Linaro/vixl/tree/6.3.0) having been merged into the AOSP ./external/vixl repo. Test: test-art-target Test: test-art-host Test: test-art-host-vixl Test: run-vixl-tests Test: art_disassembler_tests Change-Id: I9c2b936354763f0d116dfb7fe355841b9f833a34
Diffstat (limited to 'disassembler/disassembler_arm64.h')
-rw-r--r--disassembler/disassembler_arm64.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/disassembler/disassembler_arm64.h b/disassembler/disassembler_arm64.h
index a895dfe823..d0443d2b39 100644
--- a/disassembler/disassembler_arm64.h
+++ b/disassembler/disassembler_arm64.h
@@ -47,16 +47,20 @@ class CustomDisassembler final : public vixl::aarch64::Disassembler {
void AppendRegisterNameToOutput(const vixl::aarch64::Instruction* instr,
const vixl::aarch64::CPURegister& reg) override;
+ // Intercepts the instruction flow captured by the parent method,
+ // to specially instrument for particular instruction types.
+ void Visit(vixl::aarch64::Metadata* metadata, const vixl::aarch64::Instruction* instr) override;
+
+ private:
// Improve the disassembly of literal load instructions.
- void VisitLoadLiteral(const vixl::aarch64::Instruction* instr) override;
+ void VisitLoadLiteralInstr(const vixl::aarch64::Instruction* instr);
// Improve the disassembly of thread offset.
- void VisitLoadStoreUnsignedOffset(const vixl::aarch64::Instruction* instr) override;
+ void VisitLoadStoreUnsignedOffsetInstr(const vixl::aarch64::Instruction* instr);
// Improve the disassembly of branch to thunk jumping to pointer from thread entrypoint.
- void VisitUnconditionalBranch(const vixl::aarch64::Instruction* instr) override;
+ void VisitUnconditionalBranchInstr(const vixl::aarch64::Instruction* instr);
- private:
void AppendThreadOfsetName(const vixl::aarch64::Instruction* instr);
// Indicate if the disassembler should read data loaded from literal pools.