Mercurial > hg > truffle
diff graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java @ 7530:5e3d1a68664e
applied mx eclipseformat to all Java files
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 23 Jan 2013 16:34:57 +0100 |
parents | ae69cd8c08a9 |
children | 0b646334c5f7 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java Wed Jan 23 16:34:38 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java Wed Jan 23 16:34:57 2013 +0100 @@ -30,82 +30,116 @@ import com.oracle.graal.nodes.java.*; public abstract class LIRGeneratorTool { + public abstract TargetDescription target(); public abstract CodeCacheProvider getRuntime(); /** - * Checks whether the supplied constant can be used without loading it into a register - * for most operations, i.e., for commonly used arithmetic, logical, and comparison operations. + * Checks whether the supplied constant can be used without loading it into a register for most + * operations, i.e., for commonly used arithmetic, logical, and comparison operations. + * * @param c The constant to check. - * @return True if the constant can be used directly, false if the constant needs to be in a register. + * @return True if the constant can be used directly, false if the constant needs to be in a + * register. */ public abstract boolean canInlineConstant(Constant c); /** - * Checks whether the supplied constant can be used without loading it into a register - * for store operations, i.e., on the right hand side of a memory access. + * Checks whether the supplied constant can be used without loading it into a register for store + * operations, i.e., on the right hand side of a memory access. + * * @param c The constant to check. - * @return True if the constant can be used directly, false if the constant needs to be in a register. + * @return True if the constant can be used directly, false if the constant needs to be in a + * register. */ public abstract boolean canStoreConstant(Constant c); public abstract RegisterAttributes attributes(Register register); public abstract Value operand(ValueNode object); + public abstract Value newVariable(Kind kind); + public abstract Value setResult(ValueNode x, Value operand); public abstract Address makeAddress(LocationNode location, ValueNode object); public abstract Value emitMove(Value input); + public abstract void emitMove(Value src, Value dst); + public abstract Value emitLoad(Value loadAddress, boolean canTrap); + public abstract void emitStore(Value storeAddress, Value input, boolean canTrap); + public abstract Value emitLea(Value address); public abstract Value emitNegate(Value input); + public abstract Value emitAdd(Value a, Value b); + public abstract Value emitSub(Value a, Value b); + public abstract Value emitMul(Value a, Value b); + public abstract Value emitDiv(Value a, Value b); + public abstract Value emitRem(Value a, Value b); + public abstract Value emitUDiv(Value a, Value b); + public abstract Value emitURem(Value a, Value b); public abstract Value emitAnd(Value a, Value b); + public abstract Value emitOr(Value a, Value b); + public abstract Value emitXor(Value a, Value b); public abstract Value emitShl(Value a, Value b); + public abstract Value emitShr(Value a, Value b); + public abstract Value emitUShr(Value a, Value b); public abstract Value emitConvert(ConvertNode.Op opcode, Value inputVal); + public abstract void emitMembar(int barriers); + public abstract void emitDeoptimizeOnOverflow(DeoptimizationAction action, DeoptimizationReason reason, Object deoptInfo); + public abstract void emitDeoptimize(DeoptimizationAction action, DeoptimizationReason reason, Object deoptInfo, long leafGraphId); + public abstract Value emitCall(RuntimeCallTarget callTarget, CallingConvention cc, boolean canTrap, Value... args); public abstract void emitIf(IfNode i); + public abstract void emitConditional(ConditionalNode i); + public abstract void emitGuardCheck(BooleanNode comp, DeoptimizationReason deoptReason, DeoptimizationAction deoptAction, boolean negated, long leafGraphId); public abstract void emitSwitch(SwitchNode i); public abstract void emitInvoke(Invoke i); + public abstract void visitRuntimeCall(RuntimeCallNode i); // Handling of block-end nodes still needs to be unified in the LIRGenerator. public abstract void visitMerge(MergeNode i); + public abstract void visitEndNode(EndNode i); + public abstract void visitLoopEnd(LoopEndNode i); public abstract void visitCompareAndSwap(CompareAndSwapNode i); // These methods define the contract a runtime specific backend must provide. public abstract void visitExceptionObject(ExceptionObjectNode i); + public abstract void visitReturn(ReturnNode i); + public abstract void visitSafepointNode(SafepointNode i); + public abstract void visitBreakpointNode(BreakpointNode i); }