use of com.oracle.truffle.llvm.parser.model.enums.BinaryOperator in project sulong by graalvm.
the class BinaryOperationConstant method fromSymbols.
public static BinaryOperationConstant fromSymbols(SymbolTable symbols, Type type, int opcode, int lhs, int rhs) {
final boolean isFloatingPoint = Type.isFloatingpointType(type) || (type instanceof VectorType && Type.isFloatingpointType(((VectorType) type).getElementType()));
final BinaryOperator operator = BinaryOperator.decode(opcode, isFloatingPoint);
final BinaryOperationConstant constant = new BinaryOperationConstant(type, operator);
constant.lhs = symbols.getForwardReferenced(lhs, constant);
constant.rhs = symbols.getForwardReferenced(rhs, constant);
return constant;
}
use of com.oracle.truffle.llvm.parser.model.enums.BinaryOperator in project sulong by graalvm.
the class BinaryOperationInstruction method fromSymbols.
public static BinaryOperationInstruction fromSymbols(SymbolTable symbols, Type type, int opcode, int flags, int lhs, int rhs) {
final boolean isFloatingPoint = Type.isFloatingpointType(type) || (type instanceof VectorType && Type.isFloatingpointType(((VectorType) type).getElementType()));
final BinaryOperator operator = BinaryOperator.decode(opcode, isFloatingPoint);
final BinaryOperationInstruction inst = new BinaryOperationInstruction(type, operator, Flag.decode(operator, flags));
inst.lhs = symbols.getForwardReferenced(lhs, inst);
inst.rhs = symbols.getForwardReferenced(rhs, inst);
return inst;
}
Aggregations