summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
authorMark Mendell <mark.p.mendell@intel.com>2014-12-01 19:06:12 -0500
committerMark Mendell <mark.p.mendell@intel.com>2014-12-04 16:31:03 -0500
commit27dee8bcd7b4a53840b60818da8d2c819ef199bd (patch)
tree0cee4ca5dd80368703ac4b5a1139867fd0bba797 /compiler/dex/quick/codegen_util.cc
parentb510c82ebaf11cf6f4f215f6237ee6a44861ef10 (diff)
downloadart-27dee8bcd7b4a53840b60818da8d2c819ef199bd.tar.gz
art-27dee8bcd7b4a53840b60818da8d2c819ef199bd.tar.bz2
art-27dee8bcd7b4a53840b60818da8d2c819ef199bd.zip
X86_64 QBE: use RIP addressing
Take advantage of RIP addressing in 64 bit mode to improve the code generation for accesses to the constant area as well as packed switches. Avoid computing the address of the start of the method, which is needed in 32 bit mode. To do this, we add a new 'pseudo-register' kRIPReg to minimize the changes needed to get the new addressing mode to be generated. Change-Id: Ia28c93f98b09939806d91ff0bd7392e58996d108 Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index 00217549b0..066041c6ad 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -538,9 +538,12 @@ void Mir2Lir::InstallSwitchTables() {
bx_offset = tab_rec->anchor->offset + 4;
break;
case kX86:
- case kX86_64:
bx_offset = 0;
break;
+ case kX86_64:
+ // RIP relative to switch table.
+ bx_offset = tab_rec->offset;
+ break;
case kArm64:
case kMips:
bx_offset = tab_rec->anchor->offset;