Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java @ 5242:f46d82be6e19
ExceptionObjectNode is now lowered without XIR
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 13 Apr 2012 23:28:20 +0200 |
parents | f9aae727d035 |
children | 467de393651a |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java Fri Apr 13 15:31:41 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java Fri Apr 13 23:28:20 2012 +0200 @@ -40,6 +40,7 @@ import com.oracle.graal.lir.amd64.*; import com.oracle.graal.lir.asm.*; import com.oracle.graal.nodes.*; +import com.oracle.graal.nodes.java.*; import com.oracle.max.asm.*; import com.oracle.max.asm.target.amd64.*; import com.oracle.max.asm.target.amd64.AMD64Assembler.ConditionFlag; @@ -67,6 +68,17 @@ } } } + @Override + public void visitExceptionObject(ExceptionObjectNode x) { + HotSpotVMConfig config = ((HotSpotRuntime) runtime).config; + CiRegisterValue thread = r15.asValue(); + CiAddress exceptionAddress = new CiAddress(CiKind.Object, thread, config.threadExceptionOopOffset); + CiAddress pcAddress = new CiAddress(CiKind.Long, thread, config.threadExceptionPcOffset); + CiValue exception = emitLoad(exceptionAddress, false); + emitStore(exceptionAddress, CiConstant.NULL_OBJECT, false); + emitStore(pcAddress, CiConstant.LONG_0, false); + setResult(x, exception); + } }; }