use of org.graalvm.compiler.asm.sparc.SPARCAssembler.Op3s in project graal by oracle.
the class SPARCArithmeticLIRGenerator method emitShr.
@Override
public Variable emitShr(Value a, Value b) {
SPARCKind aKind = (SPARCKind) a.getPlatformKind();
LIRKind resultKind = LIRKind.combine(a, b).changeType(aKind);
Op3s op;
switch(aKind) {
case WORD:
op = Op3s.Sra;
break;
case XWORD:
op = Op3s.Srax;
break;
default:
throw GraalError.shouldNotReachHere();
}
return emitBinary(resultKind, op, a, b);
}
use of org.graalvm.compiler.asm.sparc.SPARCAssembler.Op3s in project graal by oracle.
the class SPARCArithmeticLIRGenerator method emitShl.
@Override
public Variable emitShl(Value a, Value b) {
SPARCKind aKind = (SPARCKind) a.getPlatformKind();
LIRKind resultKind = LIRKind.combine(a, b).changeType(aKind);
Op3s op;
switch(aKind) {
case WORD:
op = Op3s.Sll;
break;
case XWORD:
op = Op3s.Sllx;
break;
default:
throw GraalError.shouldNotReachHere(String.format("Unsupported kind %s", aKind));
}
return emitBinary(resultKind, op, a, b);
}
use of org.graalvm.compiler.asm.sparc.SPARCAssembler.Op3s in project graal by oracle.
the class SPARCArithmeticLIRGenerator method emitUShr.
@Override
public Variable emitUShr(Value a, Value b) {
SPARCKind aKind = (SPARCKind) a.getPlatformKind();
LIRKind resultKind = LIRKind.combine(a, b).changeType(aKind);
Op3s op;
switch(aKind) {
case WORD:
op = Op3s.Srl;
break;
case XWORD:
op = Op3s.Srlx;
break;
default:
throw GraalError.shouldNotReachHere();
}
return emitBinary(resultKind, op, a, b);
}