Fix LIR_std2f implementation on ARM. [Bug 572679] [r=vlad]
authorJacob Bramley <Jacob.Bramley@arm.com>
Fri, 18 Jun 2010 11:24:53 +0100
changeset 4888 75977e612e9d5cbc62c5cfef3a24f08f476ec932
parent 4887 fb3abbe6f010d1f2d38706955f305228a931f806
child 4889 055452aeb92ad25f14ecd32ac79000b0704d1c59
push id2592
push useredwsmith@adobe.com
push dateTue, 29 Jun 2010 15:27:33 +0000
reviewersvlad
bugs572679
Fix LIR_std2f implementation on ARM. [Bug 572679] [r=vlad]
nanojit/NativeARM.cpp
--- a/nanojit/NativeARM.cpp
+++ b/nanojit/NativeARM.cpp
@@ -1502,24 +1502,23 @@ Assembler::asm_store64(LOpcode op, LIns*
             }
             return;
 
         case LIR_std2f:
             if (_config.arm_vfp) {
                 Register rb = findRegFor(base, GpRegs);
 
                 if (value->isImmD()) {
-                    underrunProtect(LD32_size*2 + 8);
-
-                    // XXX use another reg, get rid of dependency
+                    union {
+                        float       f;
+                        uint32_t    i;
+                    } imm;
+                    imm.f = (float)(value->immD());
                     asm_str(IP, rb, dr);
-                    asm_ld_imm(IP, value->immDlo(), false);
-                    asm_str(IP, rb, dr+4);
-                    asm_ld_imm(IP, value->immDhi(), false);
-
+                    asm_ld_imm(IP, imm.i);
                     return;
                 }
 
                 Register rv = findRegFor(value, FpRegs);
 
                 NanoAssert(deprecated_isKnownReg(rb));
                 NanoAssert(deprecated_isKnownReg(rv));