Search in sources :

Example 91 with Register

use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.

the class ScratchMapTest method endSymbolicIntervalForNotStartedIntervalCausesNPE.

@Test(expected = NullPointerException.class)
public void endSymbolicIntervalForNotStartedIntervalCausesNPE() {
    Register symb = createRegister(0);
    Instruction inst = createInstruction();
    scratchMap.endSymbolicInterval(symb, inst);
}
Also used : Register(org.jikesrvm.compilers.opt.ir.Register) Instruction(org.jikesrvm.compilers.opt.ir.Instruction) Test(org.junit.Test)

Example 92 with Register

use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.

the class ScratchMapTest method beginScratchIntervalCreatesANewInterval.

@Test
public void beginScratchIntervalCreatesANewInterval() {
    Register scratch = createRegister(0);
    Instruction inst = createInstruction();
    scratchMap.beginScratchInterval(scratch, inst);
    assertThat(scratchMap.isEmpty(), is(false));
}
Also used : Register(org.jikesrvm.compilers.opt.ir.Register) Instruction(org.jikesrvm.compilers.opt.ir.Instruction) Test(org.junit.Test)

Example 93 with Register

use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.

the class ScratchMapTest method endScratchIntervalForNotStartedIntervalCausesNPE.

@Test(expected = NullPointerException.class)
public void endScratchIntervalForNotStartedIntervalCausesNPE() {
    Register scratch = createRegister(0);
    Instruction inst = createInstruction();
    scratchMap.endScratchInterval(scratch, inst);
}
Also used : Register(org.jikesrvm.compilers.opt.ir.Register) Instruction(org.jikesrvm.compilers.opt.ir.Instruction) Test(org.junit.Test)

Example 94 with Register

use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.

the class ScratchMapTest method markingRegistersAsDirtyMoreThanOnceIsHarmless.

// because of TypeReference
@Category(RequiresBuiltJikesRVM.class)
@Test
public void markingRegistersAsDirtyMoreThanOnceIsHarmless() {
    Register resultReg = createRegister(0);
    RegisterOperand result = new RegisterOperand(resultReg, TypeReference.Int);
    Register op1Reg = new Register(1);
    Register op2Reg = new Register(2);
    RegisterOperand op1 = new RegisterOperand(op1Reg, TypeReference.Int);
    RegisterOperand op2 = new RegisterOperand(op2Reg, TypeReference.Int);
    Instruction add = Binary.create(INT_ADD, result, op1, op2);
    scratchMap.markDirty(add, op2Reg);
    scratchMap.markDirty(add, op2Reg);
    assertThat(scratchMap.isDirty(add, op2Reg), is(true));
}
Also used : RegisterOperand(org.jikesrvm.compilers.opt.ir.operand.RegisterOperand) Register(org.jikesrvm.compilers.opt.ir.Register) Instruction(org.jikesrvm.compilers.opt.ir.Instruction) Category(org.junit.experimental.categories.Category) Test(org.junit.Test)

Example 95 with Register

use of org.jikesrvm.compilers.opt.ir.Register in project JikesRVM by JikesRVM.

the class ScratchMapTest method beginSymbolicIntervalCreatesANewInterval.

@Test
public void beginSymbolicIntervalCreatesANewInterval() {
    Register symb = createRegister(0);
    Register scratch = createRegister(0);
    Instruction inst = createInstruction();
    scratchMap.beginSymbolicInterval(symb, scratch, inst);
    assertThat(scratchMap.isEmpty(), is(false));
}
Also used : Register(org.jikesrvm.compilers.opt.ir.Register) Instruction(org.jikesrvm.compilers.opt.ir.Instruction) Test(org.junit.Test)

Aggregations

Register (org.jikesrvm.compilers.opt.ir.Register)279 RegisterOperand (org.jikesrvm.compilers.opt.ir.operand.RegisterOperand)144 Instruction (org.jikesrvm.compilers.opt.ir.Instruction)106 Operand (org.jikesrvm.compilers.opt.ir.operand.Operand)82 Test (org.junit.Test)52 BasicBlock (org.jikesrvm.compilers.opt.ir.BasicBlock)50 BranchProfileOperand (org.jikesrvm.compilers.opt.ir.operand.BranchProfileOperand)45 IntConstantOperand (org.jikesrvm.compilers.opt.ir.operand.IntConstantOperand)43 GenericPhysicalRegisterSet (org.jikesrvm.compilers.opt.ir.GenericPhysicalRegisterSet)40 ConditionOperand (org.jikesrvm.compilers.opt.ir.operand.ConditionOperand)39 TrueGuardOperand (org.jikesrvm.compilers.opt.ir.operand.TrueGuardOperand)32 MemoryOperand (org.jikesrvm.compilers.opt.ir.operand.MemoryOperand)30 LocationOperand (org.jikesrvm.compilers.opt.ir.operand.LocationOperand)29 LongConstantOperand (org.jikesrvm.compilers.opt.ir.operand.LongConstantOperand)27 MethodOperand (org.jikesrvm.compilers.opt.ir.operand.MethodOperand)26 OsrPoint (org.jikesrvm.compilers.opt.ir.OsrPoint)25 ConstantOperand (org.jikesrvm.compilers.opt.ir.operand.ConstantOperand)24 IA32ConditionOperand (org.jikesrvm.compilers.opt.ir.operand.ia32.IA32ConditionOperand)23 BranchOperand (org.jikesrvm.compilers.opt.ir.operand.BranchOperand)22 StackLocationOperand (org.jikesrvm.compilers.opt.ir.operand.StackLocationOperand)22