# HG changeset patch # User Doug Simon # Date 1334244424 -7200 # Node ID 15c857decc43ae0a689bad73ec2bb8ce00b5ec6b # Parent c1e5e3ab546db1bab5b1194eb66120fdc39fee65 fixed bug in call to unwindExceptionStub (exceptionOop arg was not be passed correctly) removed one use of scratch register abstraction diff -r c1e5e3ab546d -r 15c857decc43 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java Thu Apr 12 15:58:05 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java Thu Apr 12 17:27:04 2012 +0200 @@ -43,6 +43,8 @@ import com.oracle.max.asm.target.amd64.*; import com.oracle.max.asm.target.amd64.AMD64Assembler.ConditionFlag; import com.oracle.max.cri.ci.*; +import com.oracle.max.cri.ci.CiCallingConvention.Type; +import com.oracle.max.cri.ci.CiRegister.*; import com.oracle.max.cri.ri.*; import com.oracle.max.cri.xir.*; @@ -155,7 +157,6 @@ RiRegisterConfig regConfig = frameMap.registerConfig; HotSpotVMConfig config = ((HotSpotRuntime) runtime).config; Label unverifiedStub = new Label(); - CiRegister scratch = regConfig.getScratchRegister(); // Emit the prefix tasm.recordMark(MARK_OSR_ENTRY); @@ -168,8 +169,7 @@ CiRegister receiver = asRegister(cc.locations[0]); CiAddress src = new CiAddress(target.wordKind, receiver.asValue(), config.hubOffset); - asm.movq(scratch, src); - asm.cmpq(inlineCacheKlass, scratch); + asm.cmpq(inlineCacheKlass, src); asm.jcc(ConditionFlag.notEqual, unverifiedStub); } @@ -181,16 +181,15 @@ // Emit the suffix (i.e. out-of-line stubs) CiRegister thread = r15; - CiRegister exceptionOop = regConfig.getScratchRegister(); + CiRegister exceptionOop = regConfig.getCallingConventionRegisters(Type.RuntimeCall, RegisterFlag.CPU)[0]; Label unwind = new Label(); asm.bind(unwind); tasm.recordMark(MARK_UNWIND_ENTRY); CiAddress exceptionOopField = new CiAddress(CiKind.Object, thread.asValue(), config.threadExceptionOopOffset); CiAddress exceptionPcField = new CiAddress(CiKind.Object, thread.asValue(), config.threadExceptionPcOffset); asm.movq(exceptionOop, exceptionOopField); - asm.xorq(scratch, scratch); - asm.movq(exceptionOopField, scratch); - asm.movq(exceptionPcField, scratch); + asm.movslq(exceptionOopField, 0); + asm.movslq(exceptionPcField, 0); AMD64Call.directCall(tasm, asm, config.unwindExceptionStub, null); AMD64Call.shouldNotReachHere(tasm, asm);