Commit f358a5cd authored by Yi Lin's avatar Yi Lin

changed nop6 to 6byte-nop instruction (instead of using 6 1byte-nop)

parent ed0be658
......@@ -1327,6 +1327,13 @@ public class GenerateAssembler {
emitTab(4);
emit("break;\n");
emitTab(3);
emit("case FORCE6NOP_opcode:\n");
emitTab(4);
emit("emitNOP(6);\n");
emitTab(4);
emit("break;\n");
Set<String> errorOpcodes = getErrorOpcodes(emittedOpcodes);
if (!errorOpcodes.isEmpty()) {
i = errorOpcodes.iterator();
......
......@@ -394,6 +394,14 @@ stm: FORCENOP
EMIT_INSTRUCTION
EMIT(P(p));
#############
#
##########
stm: FORCE6NOP
10
EMIT_INSTRUCTION
EMIT(P(p));
#####
# GUARD_MOVE
#####
......
......@@ -525,6 +525,13 @@ none
# force 6NOP
FORCE6NOP
Empty
none
# Move an integer value from one (register/constant) operand
# to a register operand. Value is unchanged.
INT_MOVE
......
......@@ -51,6 +51,7 @@ import static org.jikesrvm.compilers.opt.ir.Operators.DUMMY_DEF_opcode;
import static org.jikesrvm.compilers.opt.ir.Operators.DUMMY_USE_opcode;
import static org.jikesrvm.compilers.opt.ir.Operators.NOP;
import static org.jikesrvm.compilers.opt.ir.Operators.FORCENOP;
import static org.jikesrvm.compilers.opt.ir.Operators.FORCE6NOP;
import static org.jikesrvm.compilers.opt.ir.Operators.IA32_ADD;
import static org.jikesrvm.compilers.opt.ir.Operators.IA32_CALL;
import static org.jikesrvm.compilers.opt.ir.Operators.IA32_CMP;
......@@ -499,11 +500,14 @@ public class FinalMIRExpansion extends IRTools {
}
private static void expandNopYieldpoint(Instruction p, IR ir, int n) {
for (int i = 0; i < n; i++) {
Instruction nop = Empty.create(FORCENOP);
p.insertBefore(nop);
Instruction nop = null;
if (n == 1) {
nop = Empty.create(FORCENOP);
} else if (n == 6) {
nop = Empty.create(FORCE6NOP);
}
p.insertBefore(nop);
removeYieldpoint(p, ir);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment