Bug 942027 - Ionmonkey ARM: Add float32 support to callWithABIPost. r=mjrosenb
authorDouglas Crosher <dtc-moz@scieneer.com>
Fri, 06 Dec 2013 16:26:35 -0500
changeset 159292 3907208b88c59f14adc5bf9aa64137cff8c6c88f
parent 159291 479975fcd7368b78f47a2c8539a67702972af640
child 159293 fac17c3d3efd6a8f264bb6678ca2af75105afc41
push id37235
push userryanvm@gmail.com
push dateFri, 06 Dec 2013 21:26:35 +0000
treeherdermozilla-inbound@3907208b88c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjrosenb
bugs942027
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 942027 - Ionmonkey ARM: Add float32 support to callWithABIPost. r=mjrosenb
js/src/jit/arm/MacroAssembler-arm.cpp
--- a/js/src/jit/arm/MacroAssembler-arm.cpp
+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
@@ -3657,23 +3657,34 @@ MacroAssemblerARMCompat::callWithABIPre(
 }
 
 void
 MacroAssemblerARMCompat::callWithABIPost(uint32_t stackAdjust, Result result)
 {
     if (secondScratchReg_ != lr)
         ma_mov(secondScratchReg_, lr);
 
-    if (result == DOUBLE) {
-#ifdef JS_CPU_ARM_HARDFP
-        as_vmov(ReturnFloatReg, d0);
-#else
+    switch (result) {
+      case DOUBLE:
+#ifndef JS_CPU_ARM_HARDFP
         // Move double from r0/r1 to ReturnFloatReg.
         as_vxfer(r0, r1, ReturnFloatReg, CoreToFloat);
+        break;
 #endif
+      case FLOAT:
+#ifndef JS_CPU_ARM_HARDFP
+        // Move float32 from r0 to ReturnFloatReg.
+        as_vxfer(r0, InvalidReg, VFPRegister(d0).singleOverlay(), CoreToFloat);
+        break;
+#endif
+      case GENERAL:
+        break;
+
+      default:
+        MOZ_ASSUME_UNREACHABLE("unexpected callWithABI result");
     }
 
     freeStack(stackAdjust);
 
     if (dynamicAlignment_) {
         // x86 supports pop esp.  on arm, that isn't well defined, so just
         // do it manually
         as_dtr(IsLoad, 32, Offset, sp, DTRAddr(sp, DtrOffImm(0)));