use of org.graalvm.compiler.asm.sparc.SPARCAssembler.Opfs in project graal by oracle.
the class SPARCArithmeticLIRGenerator method emitMathAbs.
@Override
public Value emitMathAbs(Value inputValue) {
Variable result = getLIRGen().newVariable(LIRKind.combine(inputValue));
SPARCKind kind = (SPARCKind) inputValue.getPlatformKind();
Opfs opf;
switch(kind) {
case SINGLE:
opf = Opfs.Fabss;
break;
case DOUBLE:
opf = Opfs.Fabsd;
break;
default:
throw GraalError.shouldNotReachHere("Input kind: " + kind);
}
getLIRGen().append(new SPARCOPFOp(opf, g0.asValue(), getLIRGen().asAllocatable(inputValue), result));
return result;
}
use of org.graalvm.compiler.asm.sparc.SPARCAssembler.Opfs in project graal by oracle.
the class SPARCArithmeticLIRGenerator method emitMathSqrt.
@Override
public Value emitMathSqrt(Value inputValue) {
Variable result = getLIRGen().newVariable(LIRKind.combine(inputValue));
SPARCKind kind = (SPARCKind) inputValue.getPlatformKind();
Opfs opf;
switch(kind) {
case SINGLE:
opf = Opfs.Fsqrts;
break;
case DOUBLE:
opf = Opfs.Fsqrtd;
break;
default:
throw GraalError.shouldNotReachHere("Input kind: " + kind);
}
getLIRGen().append(new SPARCOPFOp(opf, g0.asValue(), getLIRGen().asAllocatable(inputValue), result));
return result;
}
use of org.graalvm.compiler.asm.sparc.SPARCAssembler.Opfs in project graal by oracle.
the class SPARCLIRGenerator method emitFloatCompare.
private void emitFloatCompare(SPARCKind cmpJavaKind, Value a, Value b, CC cc) {
Opfs floatCompareOpcode;
assert cmpJavaKind.isFloat();
switch(cmpJavaKind) {
case DOUBLE:
floatCompareOpcode = Fcmpd;
break;
case SINGLE:
floatCompareOpcode = Fcmps;
break;
default:
throw GraalError.shouldNotReachHere();
}
append(new SPARCFloatCompareOp(floatCompareOpcode, cc, load(a), load(b)));
}
Aggregations