* src/vm/jit/s390/emit.c (emit_verbosecall_enter): Fix passing of float argument...
authorpm <none@none>
Thu, 7 Jun 2007 22:02:16 +0000 (22:02 +0000)
committerpm <none@none>
Thu, 7 Jun 2007 22:02:16 +0000 (22:02 +0000)
* src/vm/builtin.c (builtin_print_argument): Fix malfunctioning conversion from s8 to float on s390.

src/vm/builtin.c
src/vm/jit/s390/emit.c

index 1876751389b086ebf52a83e077fc8ae847544b16..2f9f4984226eafe97e08be99f826242530c03ffb 100644 (file)
@@ -28,7 +28,7 @@
    calls instead of machine instructions, using the C calling
    convention.
 
-   $Id: builtin.c 8044 2007-06-07 19:24:35Z twisti $
+   $Id: builtin.c 8046 2007-06-07 22:02:16Z pm $
 
 */
 
@@ -1317,7 +1317,12 @@ static char *builtin_print_argument(char *logtext, s4 *logtextlen,
                break;
 
        case TYPE_FLT:
+#if defined(__S390__)
+               imu.l = value;
+               /* The below won't work on S390 */
+#else
                imu.i = (s4) value;
+#endif
                sprintf(logtext + strlen(logtext), "%g (0x%08x)", imu.f, imu.i);
                break;
 
index 4ea81f56c3a85e88a02b75480093563d627664fd..13e768fc0067c75d2595c1e79adeee1016ce48c2 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 7966 2007-05-25 12:41:03Z pm $
+   $Id: emit.c 8046 2007-06-07 22:02:16Z pm $
 
 */
 
@@ -505,7 +505,7 @@ void emit_verbosecall_enter(jitdata *jd)
 
                if (IS_FLT_DBL_TYPE(t)) {
                        if (fargctr < 2) { /* passed in register */
-                               N_STD(REG_FA0 + fargctr, doff, RN, REG_SP);
+                               N_STD(abi_registers_float_argument[fargctr], doff, RN, REG_SP);
                                fargctr += 1;
                        } else { /* passed on stack */
                                if (IS_2_WORD_TYPE(t)) {