disabling arithmetic nodes with memory operands

Venkatachalam, Vasanth Vasanth.Venkatachalam at amd.com
Wed May 29 13:06:01 PDT 2013


Hi,

For an arithmetic test case involving doubles, Graal is generating a node for a double addition where one of the arguments is a stack slot.

Unlike x86, HSAIL doesn't support passing a stack slot or memory address as one of the arguments to an addition.
The HSAIL backend I've developed would have to load the value from the stack into a register first and do a register to register addition. Since this hasn't been implemented I get the exception below:

com.oracle.graal.graph.GraalInternalError: java.lang.ClassCastException: com.oracle.graal.api.code.StackSlot cannot be cast to com.oracle.graal.api.code.RegisterValue
       at lir instruction: xmm2|d = DADD (x: stack:240|d, ~y: stack:248|d)
       at com.oracle.graal.lir.LIR.emitOp(LIR.java:172)
       at com.oracle.graal.lir.LIR.emitBlock(LIR.java:161)
       at com.oracle.graal.lir.LIR.emitCode(LIR.java:147)
at com.oracle.graal.lir.hsail.HSAILArithmetic.emit(HSAILArithmetic.java:322)
at com.oracle.graal.lir.hsail.HSAILArithmetic$Op2Stack.emitCode(HSAILArithmetic.java:75)
       at com.oracle.graal.lir.hsail.HSAILLIRInstruction.emitCode(HSAILLIRInstruction.java:36)


Is there a switch that can be used to tell Graal not to generates nodes like the above, since we don't support them yet?

Vasanth




More information about the graal-dev mailing list