diff options
author | 2017-03-16 15:55:49 +0000 | |
---|---|---|
committer | 2017-03-16 16:26:02 +0000 | |
commit | 2d73f3368dd3e5411d9455e3c64df62e8b9ba04c (patch) | |
tree | 45d1debacf05fd77100bfd6def7fd97c8a24b08b | |
parent | fbe1516b91f2117bb9c7282aaea5537572f62dd7 (diff) |
x86-64: Code size improvement for MethodLoadKind::kDirectAddress.
Instead of movq(), use Load64BitValue() which uses MOVL
for 32-bit unsigned values. For pointers to low 2GiB,
this saves 2 bytes, for pointers to high 2GiB (of 32-bit
range) it saves 5 bytes.
Test: testrunner.py --host
Change-Id: I437be6e7486329da53674b051f48a0afc4b3a5a5
-rw-r--r-- | compiler/optimizing/code_generator_x86_64.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc index 644fceebe4..714215b8b2 100644 --- a/compiler/optimizing/code_generator_x86_64.cc +++ b/compiler/optimizing/code_generator_x86_64.cc @@ -983,7 +983,7 @@ Location CodeGeneratorX86_64::GenerateCalleeMethodStaticOrDirectCall(HInvokeStat callee_method = invoke->GetLocations()->InAt(invoke->GetSpecialInputIndex()); break; case HInvokeStaticOrDirect::MethodLoadKind::kDirectAddress: - __ movq(temp.AsRegister<CpuRegister>(), Immediate(invoke->GetMethodAddress())); + Load64BitValue(temp.AsRegister<CpuRegister>(), invoke->GetMethodAddress()); break; case HInvokeStaticOrDirect::MethodLoadKind::kDexCachePcRelative: { __ movq(temp.AsRegister<CpuRegister>(), |