summaryrefslogtreecommitdiffstats
path: root/compiler/utils
diff options
context:
space:
mode:
authorAlexandre Rames <alexandre.rames@linaro.org>2015-06-19 14:47:01 +0100
committerDavid Brazdil <dbrazdil@google.com>2015-06-22 11:57:36 +0100
commiteb7b7399dbdb5e471b8ae00a567bf4f19edd3907 (patch)
treea0a488040883c14cc6cbec3186654137459d44ff /compiler/utils
parent8ec0e20347e13592539a8c0786b1db1735149800 (diff)
downloadart-eb7b7399dbdb5e471b8ae00a567bf4f19edd3907.tar.gz
art-eb7b7399dbdb5e471b8ae00a567bf4f19edd3907.tar.bz2
art-eb7b7399dbdb5e471b8ae00a567bf4f19edd3907.zip
Opt compiler: Add disassembly to the '.cfg' output.
This is automatically added to the '.cfg' output when using the usual `--dump-cfg` option. Change-Id: I864bfc3a8299c042e72e451cc7730ad8271e4deb
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/arm64/assembler_arm64.cc4
-rw-r--r--compiler/utils/arm64/assembler_arm64.h3
-rw-r--r--compiler/utils/assembler.h1
3 files changed, 7 insertions, 1 deletions
diff --git a/compiler/utils/arm64/assembler_arm64.cc b/compiler/utils/arm64/assembler_arm64.cc
index eb8de0620b..077579c882 100644
--- a/compiler/utils/arm64/assembler_arm64.cc
+++ b/compiler/utils/arm64/assembler_arm64.cc
@@ -44,6 +44,10 @@ size_t Arm64Assembler::CodeSize() const {
return vixl_masm_->BufferCapacity() - vixl_masm_->RemainingBufferSpace();
}
+const uint8_t* Arm64Assembler::CodeBufferBaseAddress() const {
+ return vixl_masm_->GetStartAddress<uint8_t*>();
+}
+
void Arm64Assembler::FinalizeInstructions(const MemoryRegion& region) {
// Copy the instructions from the buffer.
MemoryRegion from(vixl_masm_->GetStartAddress<void*>(), CodeSize());
diff --git a/compiler/utils/arm64/assembler_arm64.h b/compiler/utils/arm64/assembler_arm64.h
index b53c11bc24..db95537f93 100644
--- a/compiler/utils/arm64/assembler_arm64.h
+++ b/compiler/utils/arm64/assembler_arm64.h
@@ -77,7 +77,8 @@ class Arm64Assembler FINAL : public Assembler {
void FinalizeCode() OVERRIDE;
// Size of generated code.
- size_t CodeSize() const;
+ size_t CodeSize() const OVERRIDE;
+ const uint8_t* CodeBufferBaseAddress() const OVERRIDE;
// Copy instructions out of assembly buffer into the given region of memory.
void FinalizeInstructions(const MemoryRegion& region);
diff --git a/compiler/utils/assembler.h b/compiler/utils/assembler.h
index 0381af3956..ee2d594e6f 100644
--- a/compiler/utils/assembler.h
+++ b/compiler/utils/assembler.h
@@ -386,6 +386,7 @@ class Assembler {
// Size of generated code
virtual size_t CodeSize() const { return buffer_.Size(); }
+ virtual const uint8_t* CodeBufferBaseAddress() const { return buffer_.contents(); }
// Copy instructions out of assembly buffer into the given region of memory
virtual void FinalizeInstructions(const MemoryRegion& region) {