Load 64 bit constant into GPR by single instruction for 64bit mode
This patch load 64 bit constant into a register by a single movabsq
instruction on 64 bit bit instead of previous mov, shift, add
instruction sequences.
Change-Id: I9d013c4f6c0b5c2e43bd125f91436263c7e6028c
Signed-off-by: Yixin Shou <yixin.shou@intel.com>
diff --git a/compiler/dex/quick/x86/target_x86.cc b/compiler/dex/quick/x86/target_x86.cc
index 4169005..04a7a8e 100644
--- a/compiler/dex/quick/x86/target_x86.cc
+++ b/compiler/dex/quick/x86/target_x86.cc
@@ -330,6 +330,11 @@
case 'd':
buf += StringPrintf("%d", operand);
break;
+ case 'q': {
+ int64_t value = static_cast<int64_t>(static_cast<int64_t>(operand) << 32 |
+ static_cast<uint32_t>(lir->operands[operand_number+1]));
+ buf +=StringPrintf("%" PRId64, value);
+ }
case 'p': {
EmbeddedData *tab_rec = reinterpret_cast<EmbeddedData*>(UnwrapPointer(operand));
buf += StringPrintf("0x%08x", tab_rec->offset);