Changed x86_64 abi back to 8 float argument registers.
authortwisti <none@none>
Mon, 13 Dec 2004 08:40:16 +0000 (08:40 +0000)
committertwisti <none@none>
Mon, 13 Dec 2004 08:40:16 +0000 (08:40 +0000)
src/vm/jit/reg.inc
src/vm/jit/x86_64/arch.h

index 70dc8052eb5d716e0f965751e9833af589bb46be..bfaa8d5e4bc0322d3eead9050c202c2fcd009c0b 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Stefan Ring
             Christian Thalinger
 
-   $Id: reg.inc 1735 2004-12-07 14:33:27Z twisti $
+   $Id: reg.inc 1753 2004-12-13 08:40:16Z twisti $
 
 */
 
@@ -278,22 +278,16 @@ static void interface_regalloc(methodinfo *m, codegendata *cd, registerdata *rd)
 
        /* allocate stack space for passing arguments to called methods */
 
-#ifndef SPECIALMEMUSE
-#if defined(__X86_64__)
-       /*
-        * XXX: we have a problem here, but allocating a little more stack space
-        *      is better than having a bug
-        */
-       /*      if (arguments_num > (intreg_argnum + fltreg_argnum)) */
-       /*              ifmemuse = arguments_num - (intreg_argnum + fltreg_argnum); */
-       if (rd->arguments_num > rd->fltreg_argnum)
-               rd->ifmemuse = rd->arguments_num - rd->fltreg_argnum;
-#else
-       if (rd->arguments_num > rd->intreg_argnum)
-               rd->ifmemuse = rd->arguments_num - rd->intreg_argnum;
-#endif
-       else
+#if !defined(SPECIALMEMUSE)
+       /* For this to work properly the integer argument register count must be  */
+       /* less or equal the float argument register count (e.g. x86_64).         */
+       /* (arch.h: INT_ARG_CNT <= FLT_ARG_CNT)                                   */
+       if (rd->arguments_num > INT_ARG_CNT) {
+               rd->ifmemuse = rd->arguments_num - INT_ARG_CNT;
+
+       } else {
                rd->ifmemuse = 0;
+       }
 #endif
 
        rd->iftmpintregcnt = rd->tmpintregcnt;
index 70b4d5b3054492b74ec068516bf3d9309608a58e..4772364619a3b35d8d39bbda9c0f32d51a9fb5c7 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: arch.h 1735 2004-12-07 14:33:27Z twisti $
+   $Id: arch.h 1753 2004-12-13 08:40:16Z twisti $
 
 */
 
 #define INT_ARG_CNT      6   /* number of int argument registers              */
 #define INT_SAV_CNT      5   /* number of int callee saved registers          */
 
-#define FLT_ARG_CNT      4   /* number of flt argument registers              */
+#define FLT_ARG_CNT      8   /* number of flt argument registers              */
 #define FLT_SAV_CNT      0   /* number of flt callee saved registers          */
 
 #define TRACE_ARGS_NUM   6