Commit 222cf49b authored by Yi Lin's avatar Yi Lin

add nop4

parent f358a5cd
......@@ -35,6 +35,7 @@ public class Config {
public static final int USE_NO_YP = 20;
public static final int USE_NOP1_YP = 21;
public static final int USE_NOP4_YP = 24;
public static final int USE_NOP6_YP = 26;
public final boolean ENABLE_YP_STAT;
......@@ -61,7 +62,10 @@ public class Config {
YIELDPOINT_IMPL = USE_GLOBAL_PAGE_PROTECTION_WRITE_YP;
} else if (config.getBooleanProperty("mmtk.use_nop1_yp", false)) {
YIELDPOINT_IMPL = USE_NOP1_YP;
} else if (config.getBooleanProperty("mmtk.use_nop6_yp", false)) {
} else if (config.getBooleanProperty("mmtk.use_nop4_yp", false)) {
YIELDPOINT_IMPL = USE_NOP4_YP;
}
else if (config.getBooleanProperty("mmtk.use_nop6_yp", false)) {
YIELDPOINT_IMPL = USE_NOP6_YP;
}
......
#
# This file is part of the Jikes RVM project (http://jikesrvm.org).
#
# This file is licensed to You under the Eclipse Public License (EPL);
# You may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.opensource.org/licenses/eclipse-1.0.php
#
# See the COPYRIGHT.txt file distributed with this work for information
# regarding copyright ownership.
#
# Default MMTk properties file.
mmtk.use_nop4_yp = true
......@@ -1327,6 +1327,13 @@ public class GenerateAssembler {
emitTab(4);
emit("break;\n");
emitTab(3);
emit("case FORCE4NOP_opcode:\n");
emitTab(4);
emit("emitNOP(4);\n");
emitTab(4);
emit("break;\n");
emitTab(3);
emit("case FORCE6NOP_opcode:\n");
emitTab(4);
......
......@@ -394,6 +394,14 @@ stm: FORCENOP
EMIT_INSTRUCTION
EMIT(P(p));
#############
#
###########
stm: FORCE4NOP
10
EMIT_INSTRUCTION
EMIT(P(p));
#############
#
##########
......
......@@ -525,6 +525,13 @@ none
# force 4NOP
FORCE4NOP
Empty
none
# force 6NOP
FORCE6NOP
Empty
......
......@@ -3964,7 +3964,10 @@ public abstract class BaselineCompilerImpl extends BaselineCompiler implements B
// nop yp
else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP1_YP) {
asm.emitNOP(1);
} else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP6_YP) {
} else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP4_YP) {
asm.emitNOP(4);
}
else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP6_YP) {
asm.emitNOP(6);
}
......
......@@ -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.FORCE4NOP;
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;
......@@ -434,6 +435,8 @@ public class FinalMIRExpansion extends IRTools {
expandNopYieldpoint(p, ir, 1);
} else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP6_YP) {
expandNopYieldpoint(p, ir, 6);
} else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP4_YP) {
expandNopYieldpoint(p, ir, 4);
}
break;
......@@ -460,6 +463,8 @@ public class FinalMIRExpansion extends IRTools {
expandNopYieldpoint(p, ir, 1);
} else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP6_YP) {
expandNopYieldpoint(p, ir, 6);
} else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP4_YP) {
expandNopYieldpoint(p, ir, 4);
}
break;
......@@ -486,6 +491,8 @@ public class FinalMIRExpansion extends IRTools {
expandNopYieldpoint(p, ir, 1);
} else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP6_YP) {
expandNopYieldpoint(p, ir, 6);
} else if (org.mmtk.vm.VM.config.YIELDPOINT_IMPL == org.mmtk.vm.Config.USE_NOP4_YP) {
expandNopYieldpoint(p, ir, 4);
}
break;
......@@ -503,7 +510,10 @@ private static void expandNopYieldpoint(Instruction p, IR ir, int n) {
Instruction nop = null;
if (n == 1) {
nop = Empty.create(FORCENOP);
} else if (n == 6) {
} else if (n == 4) {
nop = Empty.create(FORCE4NOP);
}
else if (n == 6) {
nop = Empty.create(FORCE6NOP);
}
......
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