Search in sources :

Example 1 with Op3s

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);
}
Also used : Op3s(org.graalvm.compiler.asm.sparc.SPARCAssembler.Op3s) LIRKind(org.graalvm.compiler.core.common.LIRKind) SPARCKind(jdk.vm.ci.sparc.SPARCKind)

Example 2 with Op3s

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);
}
Also used : Op3s(org.graalvm.compiler.asm.sparc.SPARCAssembler.Op3s) LIRKind(org.graalvm.compiler.core.common.LIRKind) SPARCKind(jdk.vm.ci.sparc.SPARCKind)

Example 3 with Op3s

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);
}
Also used : Op3s(org.graalvm.compiler.asm.sparc.SPARCAssembler.Op3s) LIRKind(org.graalvm.compiler.core.common.LIRKind) SPARCKind(jdk.vm.ci.sparc.SPARCKind)

Aggregations

SPARCKind (jdk.vm.ci.sparc.SPARCKind)3 Op3s (org.graalvm.compiler.asm.sparc.SPARCAssembler.Op3s)3 LIRKind (org.graalvm.compiler.core.common.LIRKind)3