public static final class SPARCControlFlow.CompareBranchOp extends SPARCBlockEndOp implements SPARCDelayedControlTransfer
SPARCLIRInstruction.SizeEstimate
LIRInstruction.Alive, LIRInstruction.Def, LIRInstruction.OperandFlag, LIRInstruction.OperandMode, LIRInstruction.State, LIRInstruction.Temp, LIRInstruction.Use
Modifier and Type | Field and Description |
---|---|
private SPARCAssembler.ConditionFlag |
conditionFlag |
private int |
delaySlotPosition |
private boolean |
emitted |
protected LabelRef |
falseDestination |
protected Assembler.LabelHint |
falseDestinationHint |
protected Kind |
kind |
private SPARCCompare |
opcode |
static SPARCLIRInstruction.SizeEstimate |
SIZE |
(package private) static EnumSet<Kind> |
SUPPORTED_KINDS |
protected LabelRef |
trueDestination |
protected Assembler.LabelHint |
trueDestinationHint |
private double |
trueDestinationProbability |
static LIRInstructionClass<SPARCControlFlow.CompareBranchOp> |
TYPE |
protected boolean |
unorderedIsTrue |
protected Value |
x |
protected Value |
y |
delayedControlTransfer
ADDRESS_FLAGS, ALLOWED_FLAGS
DUMMY
Constructor and Description |
---|
CompareBranchOp(SPARCCompare opcode,
Value x,
Value y,
Condition condition,
LabelRef trueDestination,
LabelRef falseDestination,
Kind kind,
boolean unorderedIsTrue,
double trueDestinationProbability) |
Modifier and Type | Method and Description |
---|---|
private boolean |
canUseShortBranch(CompilationResultBuilder crb,
SPARCAssembler asm,
int position) |
private static void |
emitCBCond(SPARCMacroAssembler masm,
Value actualX,
Value actualY,
Label actualTrueTarget,
SPARCAssembler.ConditionFlag conditionFlag) |
void |
emitCode(CompilationResultBuilder crb,
SPARCMacroAssembler masm) |
void |
emitControlTransfer(CompilationResultBuilder crb,
SPARCMacroAssembler masm)
This method must be called, to generate the control transfer, but without any Nop in the
delay slot.
|
private boolean |
emitShortCompareBranch(CompilationResultBuilder crb,
SPARCMacroAssembler masm)
Tries to use the emit the compare/branch instruction.
|
private static int |
getTargetPosition(Assembler asm) |
private void |
requestHints(SPARCMacroAssembler masm) |
void |
resetState() |
void |
verify() |
addOutgoingValues, clearOutgoingValues, getOutgoingSize, getOutgoingValue, setOutgoingValues
emitCode, estimateSize, leavesRegisterWindow, setDelayedControlTransfer
destroysCallerSavedRegisters, forEachAlive, forEachAlive, forEachInput, forEachInput, forEachOutput, forEachOutput, forEachRegisterHint, forEachRegisterHint, forEachState, forEachState, forEachState, forEachState, forEachTemp, forEachTemp, getLIRInstructionClass, hasOperands, hasState, id, name, setId, toString, toStringWithIdPrefix, visitEachAlive, visitEachAlive, visitEachInput, visitEachInput, visitEachOutput, visitEachOutput, visitEachState, visitEachState, visitEachTemp, visitEachTemp
public static final LIRInstructionClass<SPARCControlFlow.CompareBranchOp> TYPE
public static final SPARCLIRInstruction.SizeEstimate SIZE
static final EnumSet<Kind> SUPPORTED_KINDS
private final SPARCCompare opcode
private SPARCAssembler.ConditionFlag conditionFlag
protected final LabelRef trueDestination
protected Assembler.LabelHint trueDestinationHint
protected final LabelRef falseDestination
protected Assembler.LabelHint falseDestinationHint
protected final boolean unorderedIsTrue
private boolean emitted
private int delaySlotPosition
private double trueDestinationProbability
public CompareBranchOp(SPARCCompare opcode, Value x, Value y, Condition condition, LabelRef trueDestination, LabelRef falseDestination, Kind kind, boolean unorderedIsTrue, double trueDestinationProbability)
public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm)
emitCode
in class SPARCLIRInstruction
private static int getTargetPosition(Assembler asm)
public void emitControlTransfer(CompilationResultBuilder crb, SPARCMacroAssembler masm)
SPARCDelayedControlTransfer
emitControlTransfer
in interface SPARCDelayedControlTransfer
private void requestHints(SPARCMacroAssembler masm)
private boolean emitShortCompareBranch(CompilationResultBuilder crb, SPARCMacroAssembler masm)
CBcond has follwing limitations
We get from outside
We do:
crb
- masm
- private static void emitCBCond(SPARCMacroAssembler masm, Value actualX, Value actualY, Label actualTrueTarget, SPARCAssembler.ConditionFlag conditionFlag)
private boolean canUseShortBranch(CompilationResultBuilder crb, SPARCAssembler asm, int position)
public void resetState()
resetState
in interface SPARCDelayedControlTransfer
public void verify()
verify
in class LIRInstruction