diff options
| author | 2017-02-28 12:43:06 +0000 | |
|---|---|---|
| committer | 2017-02-28 12:43:07 +0000 | |
| commit | 4cc7e8f848de11089a9b99cad549c5a2b7e275a6 (patch) | |
| tree | e43cbfc76e5b9383e3d99337d05dcd531a1af802 | |
| parent | 69dcdead8a6271587e0686798a26f95e92629fc1 (diff) | |
| parent | 647169364c40e731ac41d5655c6315ec22e29970 (diff) | |
Merge "ARM: VIXL32: Use LoadLiteral for double constants."
| -rw-r--r-- | compiler/utils/arm/assembler_arm_vixl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/utils/arm/assembler_arm_vixl.h b/compiler/utils/arm/assembler_arm_vixl.h index 322f6c4d70..e81e767575 100644 --- a/compiler/utils/arm/assembler_arm_vixl.h +++ b/compiler/utils/arm/assembler_arm_vixl.h @@ -135,6 +135,16 @@ class ArmVIXLMacroAssembler FINAL : public vixl32::MacroAssembler { // jumping within 2KB range. For B(cond, label), because the supported branch range is 256 // bytes; we use the far_target hint to try to use 16-bit T1 encoding for short range jumps. void B(vixl32::Condition cond, vixl32::Label* label, bool is_far_target = true); + + // Use literal for generating double constant if it doesn't fit VMOV encoding. + void Vmov(vixl32::DRegister rd, double imm) { + if (vixl::VFP::IsImmFP64(imm)) { + MacroAssembler::Vmov(rd, imm); + } else { + MacroAssembler::Vldr(rd, imm); + } + } + using MacroAssembler::Vmov; }; class ArmVIXLAssembler FINAL : public Assembler { |