diff options
author | Roland Levillain <rpl@google.com> | 2014-11-27 12:06:00 +0000 |
---|---|---|
committer | Roland Levillain <rpl@google.com> | 2014-11-27 12:06:00 +0000 |
commit | 647b9ed41cdb7cf302fd356627a3ba372419b78c (patch) | |
tree | f1ca054aa20ae4c489f208982e7a6cba5d5ee21e /compiler/utils/x86/assembler_x86.cc | |
parent | 35ecc8ca8fba713728b8fc60e9e2a275da2028aa (diff) | |
download | art-647b9ed41cdb7cf302fd356627a3ba372419b78c.tar.gz art-647b9ed41cdb7cf302fd356627a3ba372419b78c.tar.bz2 art-647b9ed41cdb7cf302fd356627a3ba372419b78c.zip |
Add support for long-to-double in the optimizing compiler.
- Add support for the long-to-double Dex instruction in the
optimizing compiler.
- Enable requests of temporary FPU (double) registers during
code generation.
- Fix art::x86::X86Assembler::LoadLongConstant and extend
it to int64_t values.
- Have art::x86_64::X86_64Assembler::cvtsi2sd work with
64-bit operands.
- Generate x86, x86-64 and ARM (but not ARM64) code for
long to double HTypeConversion nodes.
- Add related tests to test/422-type-conversion.
Change-Id: Ie73d9e5e25bd2e15f585c371e8fc2dcb83438ccd
Diffstat (limited to 'compiler/utils/x86/assembler_x86.cc')
-rw-r--r-- | compiler/utils/x86/assembler_x86.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/compiler/utils/x86/assembler_x86.cc b/compiler/utils/x86/assembler_x86.cc index a297ea3b6e..dbad3868bf 100644 --- a/compiler/utils/x86/assembler_x86.cc +++ b/compiler/utils/x86/assembler_x86.cc @@ -1318,13 +1318,19 @@ void X86Assembler::AddImmediate(Register reg, const Immediate& imm) { } +void X86Assembler::LoadLongConstant(XmmRegister dst, int64_t value) { + // TODO: Need to have a code constants table. + pushl(Immediate(High32Bits(value))); + pushl(Immediate(Low32Bits(value))); + movsd(dst, Address(ESP, 0)); + addl(ESP, Immediate(2 * sizeof(int32_t))); +} + + void X86Assembler::LoadDoubleConstant(XmmRegister dst, double value) { // TODO: Need to have a code constants table. int64_t constant = bit_cast<int64_t, double>(value); - pushl(Immediate(High32Bits(constant))); - pushl(Immediate(Low32Bits(constant))); - movsd(dst, Address(ESP, 0)); - addl(ESP, Immediate(2 * sizeof(intptr_t))); + LoadLongConstant(dst, constant); } |