#include "vm/jit/i386/codegen.h"
#include "vm/jit/i386/emit.h"
-#include "mm/memory.h"
+#include "mm/memory.hpp"
#include "native/localref.hpp"
#include "native/native.hpp"
#include "vm/jit/emit-common.hpp"
#include "vm/jit/jit.hpp"
#include "vm/jit/linenumbertable.hpp"
-#include "vm/jit/parse.h"
+#include "vm/jit/parse.hpp"
#include "vm/jit/patcher-common.hpp"
#include "vm/jit/reg.h"
#include "vm/jit/replace.hpp"
M_ALD(REG_ITMP2, REG_ITMP2, OFFSET(vftbl_t, subtype_overflow));
M_CMP_MEMINDEX(REG_ITMP2, -4*DISPLAY_SIZE, REG_ITMP1, 2, REG_ITMP3);
- M_SETE(d);
- if (d == REG_ITMP2) {
- M_BSEXT(d, d);
+ if (d >= 4) {
+ M_SETE(REG_ITMP1);
+ M_BSEXT(REG_ITMP1, d);
+ }
+ else {
+ M_SETE(d);
+ if (d == REG_ITMP2) {
+ M_BSEXT(d, d);
- emit_label_br(cd, BRANCH_LABEL_7); /* jump over M_CLR */
+ emit_label_br(cd, BRANCH_LABEL_7); /* jump over M_CLR */
+ }
}
emit_label(cd, BRANCH_LABEL_9);
else {
M_CMP_MEMBASE(REG_ITMP2, super->vftbl->subtype_offset, REG_ITMP3);
- M_SETE(d);
- if (d == REG_ITMP2)
- M_BSEXT(d, d);
+ if (d >= 4) {
+ M_SETE(REG_ITMP1);
+ M_BSEXT(REG_ITMP1, d);
+ }
+ else {
+ M_SETE(d);
+ if (d == REG_ITMP2)
+ M_BSEXT(d, d);
+ }
}
if (super != NULL)