+ // Represents the following semantic:
+ // if (s->vftbl->subtype_depth < t->vftbl->subtype_depth) throw;
+ // Preconditions:
+ // REG_ITMP2==s->vftbl; REG_ITMP3==t->vftbl;
+ M_LDR_INTERN(REG_ITMP1, REG_ITMP2, OFFSET(vftbl_t, subtype_depth));
+ M_LDR_INTERN(REG_ITMP3, REG_ITMP3, OFFSET(vftbl_t, subtype_depth));
+ M_CMP(REG_ITMP1, REG_ITMP3);
+ emit_load_s1(jd, iptr, REG_ITMP1); /* reload s1, might have been destroyed */
+ emit_classcast_check(cd, iptr, BRANCH_LT, 0, s1); /* throw */
+
+ // Represents the following semantic:
+ // if (s->vftbl->subtype_overflow[t->vftbl->subtype_depth - DISPLAY_SIZE] != t->vftbl) throw;
+ // Preconditions:
+ // REG_ITMP2==s->vftbl; REG_ITMP3==t->vftbl->subtype_depth;
+ M_LDR_INTERN(REG_ITMP2, REG_ITMP2, OFFSET(vftbl_t, subtype_overflow));
+ M_ADD(REG_ITMP2, REG_ITMP2, REG_LSL(REG_ITMP3, 2)); /* REG_ITMP2 = REG_ITMP2 + 4 * REG_ITMP3 */
+ M_LDR_INTERN(REG_ITMP2, REG_ITMP2, -DISPLAY_SIZE * SIZEOF_VOID_P);
+ M_DSEG_LOAD(REG_ITMP3, disp); /* reload REG_ITMP3, was destroyed */
+ M_CMP(REG_ITMP2, REG_ITMP3);
+ emit_classcast_check(cd, iptr, BRANCH_NE, 0, s1); /* throw */
+
+ emit_label(cd, BRANCH_LABEL_6);
+ }
+ else {
+ // Represents the following semantic:
+ // if (*(s->vftbl + t->vftbl->subtype_offset) != t->vftbl) throw;
+ // Preconditions:
+ // REG_ITMP2==s->vftbl; REG_ITMP3==t->vftbl;
+ M_ALD(REG_ITMP2, REG_ITMP2, super->vftbl->subtype_offset);
+ M_CMP(REG_ITMP2, REG_ITMP3);
+ emit_classcast_check(cd, iptr, BRANCH_NE, 0, s1);
+ }