Removed subtype_overflow_length (x86_64)
authorStefan Ring <stefan@complang.tuwien.ac.at>
Wed, 17 Sep 2008 07:30:55 +0000 (09:30 +0200)
committerStefan Ring <stefan@complang.tuwien.ac.at>
Wed, 17 Sep 2008 07:30:55 +0000 (09:30 +0200)
* src/vm/jit/x86_64/codegen.c: Adapted.

--HG--
branch : subtype

src/vm/jit/x86_64/codegen.c

index bfccf1ea86830e44214b4e3f38ca5d0df2316e43..215c012a56755ecef5374a1486ea0966ffbdc0bd 100644 (file)
@@ -2585,21 +2585,21 @@ gen_method:
                                                }
 
                                                M_ILD(REG_ITMP1, REG_ITMP3, OFFSET(vftbl_t, subtype_depth));
-                                               M_ISUB_IMM(DISPLAY_SIZE, REG_ITMP1);
                                                *(cd->mcodeptr++) = 0x41;
                                                *(cd->mcodeptr++) = 0x39;
                                                *(cd->mcodeptr++) = 0x42;
-                                               *(cd->mcodeptr++) = OFFSET(vftbl_t, subtype_overflow_length);
-                                               /* cmpl ITMP1, subtype_overflow_length(ITMP2) */
-                                               emit_label_ble(cd, BRANCH_LABEL_9);  /* throw */
+                                               *(cd->mcodeptr++) = OFFSET(vftbl_t, subtype_depth);
+                                               /* cmpl ITMP1, subtype_depth(ITMP2) */
+                                               emit_label_blt(cd, BRANCH_LABEL_9);  /* throw */
 
                                                M_ALD(REG_ITMP2, REG_ITMP2, OFFSET(vftbl_t, subtype_overflow));
 
                                                *(cd->mcodeptr++) = 0x4d;
                                                *(cd->mcodeptr++) = 0x3b;
-                                               *(cd->mcodeptr++) = 0x1c;
+                                               *(cd->mcodeptr++) = 0x5c;
                                                *(cd->mcodeptr++) = 0xc2;
-                                               /* cmp (ITMP2, ITMP1, 8), ITMP3 */
+                                               *(cd->mcodeptr++) = -8*DISPLAY_SIZE;
+                                               /* cmp -8*DISPL(ITMP2, ITMP1, 8), ITMP3 */
 
                                                emit_label_beq(cd, BRANCH_LABEL_7);  /* good */
 
@@ -2792,21 +2792,21 @@ gen_method:
                                        }
 
                                        M_ILD(REG_ITMP1, REG_ITMP3, OFFSET(vftbl_t, subtype_depth));
-                                       M_ISUB_IMM(DISPLAY_SIZE, REG_ITMP1);
                                        *(cd->mcodeptr++) = 0x41;
                                        *(cd->mcodeptr++) = 0x39;
                                        *(cd->mcodeptr++) = 0x42;
-                                       *(cd->mcodeptr++) = OFFSET(vftbl_t, subtype_overflow_length);
-                                       /* cmpl ITMP1, subtype_overflow_length(ITMP2) */
-                                       emit_label_ble(cd, BRANCH_LABEL_9);  /* false */
+                                       *(cd->mcodeptr++) = OFFSET(vftbl_t, subtype_depth);
+                                       /* cmpl ITMP1, subtype_depth(ITMP2) */
+                                       emit_label_blt(cd, BRANCH_LABEL_9);  /* false */
 
                                        M_ALD(REG_ITMP2, REG_ITMP2, OFFSET(vftbl_t, subtype_overflow));
 
                                        *(cd->mcodeptr++) = 0x4d;
                                        *(cd->mcodeptr++) = 0x3b;
-                                       *(cd->mcodeptr++) = 0x1c;
+                                       *(cd->mcodeptr++) = 0x5c;
                                        *(cd->mcodeptr++) = 0xc2;
-                                       /* cmp (ITMP2, ITMP1, 8), ITMP3 */
+                                       *(cd->mcodeptr++) = -8*DISPLAY_SIZE;
+                                       /* cmp -8*DISPL(ITMP2, ITMP1, 8), ITMP3 */
 
                                        M_SETE(d);
                                        if (d == REG_ITMP2) {