* src/vm/jit/alpha/arch.h (SUPPORT_LONG_DIV_POW2)
authortwisti <none@none>
Tue, 6 Jun 2006 18:05:16 +0000 (18:05 +0000)
committertwisti <none@none>
Tue, 6 Jun 2006 18:05:16 +0000 (18:05 +0000)
(SUPPORT_LONG_REM_POW2): Added, as we probably support these two
instructions while the architecture does not support long division.
* src/vm/jit/i386/arch.h: Likewise.
* src/vm/jit/mips/arch.h: Likewise.
* src/vm/jit/powerpc/arch.h: Likewise.
* src/vm/jit/x86_64/arch.h: Likewise.

* src/vm/jit/stack.c (stack_analyse): Use SUPPORT_LONG_DIV_POW2 and
SUPPORT_LONG_REM_POW2 instead of SUPPORT_LONG_DIV.

src/vm/jit/alpha/arch.h
src/vm/jit/i386/arch.h
src/vm/jit/mips/arch.h
src/vm/jit/powerpc/arch.h
src/vm/jit/stack.c
src/vm/jit/x86_64/arch.h

index 46e23090d016344279715ae25f59b56640bd1feb..3be38f515b87613afcf0ff432680dfb73f32742d 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: arch.h 4357 2006-01-22 23:33:38Z twisti $
+   $Id: arch.h 5017 2006-06-06 18:05:16Z twisti $
 
 */
 
@@ -65,6 +65,9 @@
 #define SUPPORT_LONG_MUL                 1
 #define SUPPORT_LONG_DIV                 0
 
+#define SUPPORT_LONG_DIV_POW2            1
+#define SUPPORT_LONG_REM_POW2            1
+
 #define SUPPORT_CONST_LOGICAL            1  /* AND, OR, XOR with immediates   */
 #define SUPPORT_CONST_MUL                1  /* mutiply with immediate         */
 
index 870e01e1b31a6c105556ce93556b0518d3811616..8410a497b2d24c2c4b3e125822fae6b2b3f1a786 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: arch.h 4386 2006-01-30 11:26:34Z christian $
+   $Id: arch.h 5017 2006-06-06 18:05:16Z twisti $
 
 */
 
@@ -79,6 +79,9 @@
 #define SUPPORT_LONG_MUL                 1
 #define SUPPORT_LONG_DIV                 0
 
+#define SUPPORT_LONG_DIV_POW2            1
+#define SUPPORT_LONG_REM_POW2            0
+
 #define SUPPORT_CONST_LOGICAL            1  /* AND, OR, XOR with immediates   */
 #define SUPPORT_CONST_MUL                1  /* mutiply with immediate         */
 
index 80e9a3a8f489e31cd55b6cfe850d65083dffef09..bb49f5664f579351360758905ed5d5f4dd74d5be 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: arch.h 4357 2006-01-22 23:33:38Z twisti $
+   $Id: arch.h 5017 2006-06-06 18:05:16Z twisti $
 
 */
 
@@ -70,6 +70,9 @@
 #define SUPPORT_LONG_MUL                 1
 #define SUPPORT_LONG_DIV                 1
 
+#define SUPPORT_LONG_DIV_POW2            1
+#define SUPPORT_LONG_REM_POW2            1
+
 #define SUPPORT_CONST_LOGICAL            1  /* AND, OR, XOR with immediates   */
 #define SUPPORT_CONST_MUL                1  /* mutiply with immediate         */
 
 #define SUPPORT_LONG_MUL                 0
 #define SUPPORT_LONG_DIV                 0
 
+#define SUPPORT_LONG_DIV_POW2            0
+#define SUPPORT_LONG_REM_POW2            0
+
 #define SUPPORT_CONST_LOGICAL            1  /* AND, OR, XOR with immediates   */
 #define SUPPORT_CONST_MUL                1  /* mutiply with immediate         */
 
index 38d5f04e41f0095dc81c16b50eabee980ec4a0b2..13838fc3de58915ba8151ca6bd8dfa984ed0257a 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: arch.h 4386 2006-01-30 11:26:34Z christian $
+   $Id: arch.h 5017 2006-06-06 18:05:16Z twisti $
 
 */
 
@@ -65,6 +65,9 @@
 #define SUPPORT_LONG_MUL                 0
 #define SUPPORT_LONG_DIV                 0
 
+#define SUPPORT_LONG_DIV_POW2            0
+#define SUPPORT_LONG_REM_POW2            0
+
 #define SUPPORT_CONST_LOGICAL            1  /* AND, OR, XOR with immediates   */
 #define SUPPORT_CONST_MUL                1  /* mutiply with immediate         */
 
index 5f25ccccd2e23776d4491766b87086a58ebf0d22..fd243214e439e66b7510acaaf136f7e05bc5177b 100644 (file)
@@ -30,7 +30,7 @@
             Christian Thalinger
             Christian Ullrich
 
-   $Id: stack.c 4998 2006-05-31 20:28:27Z edwin $
+   $Id: stack.c 5017 2006-06-06 18:05:16Z twisti $
 
 */
 
@@ -785,7 +785,8 @@ bool stack_analyse(jitdata *jd)
                                                                goto icmd_lconst_tail;
 # endif /* SUPPORT_LONG_SHIFT */
 #endif /* SUPPORT_LONG_MUL && SUPPORT_CONST_MUL */
-#if SUPPORT_LONG_DIV
+
+#if SUPPORT_LONG_DIV_POW2
                                                        case ICMD_LDIV:
                                                                if (iptr[0].val.l == 0x00000002)
                                                                        iptr[0].val.i = 1;
@@ -855,6 +856,9 @@ bool stack_analyse(jitdata *jd)
                                                                }
                                                                iptr[0].opc = ICMD_LDIVPOW2;
                                                                goto icmd_lconst_tail;
+#endif /* SUPPORT_LONG_DIV_POW2 */
+
+#if SUPPORT_LONG_REM_POW2
                                                        case ICMD_LREM:
                                                                if ((iptr[0].val.l == 0x00000002) ||
                                                                        (iptr[0].val.l == 0x00000004) ||
@@ -893,7 +897,8 @@ bool stack_analyse(jitdata *jd)
                                                                }
                                                                PUSHCONST(TYPE_LNG);
                                                                break;
-#endif /* SUPPORT_LONG_DIV */
+#endif /* SUPPORT_LONG_REM_POW2 */
+
 #if SUPPORT_LONG_LOGICAL && SUPPORT_CONST_LOGICAL
 
                                                        case ICMD_LAND:
index ee87b4ed21fb17ae13f882fba120ca95994494dd..c36824cb3b2d51610b48d18faacd33b81bf6561f 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: arch.h 4357 2006-01-22 23:33:38Z twisti $
+   $Id: arch.h 5017 2006-06-06 18:05:16Z twisti $
 
 */
 
@@ -67,6 +67,9 @@
 #define SUPPORT_LONG_MUL                 1
 #define SUPPORT_LONG_DIV                 1
 
+#define SUPPORT_LONG_DIV_POW2            1
+#define SUPPORT_LONG_REM_POW2            1
+
 #define SUPPORT_CONST_LOGICAL            1  /* AND, OR, XOR with immediates   */
 #define SUPPORT_CONST_MUL                1  /* mutiply with immediate         */