# HG changeset patch # User Thomas Wuerthinger # Date 1365552390 -7200 # Node ID b87f042d1f29c98e1e15124f726be3237ee604f7 # Parent 591e9ff4ca5a8d45f0e0576e0812dadf48802fb3 Set correct temp registers for runtime calls that directly call C methods. diff -r 591e9ff4ca5a -r b87f042d1f29 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Wed Apr 10 01:16:13 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Wed Apr 10 02:06:30 2013 +0200 @@ -224,11 +224,11 @@ /* arg0: index */ javaCallingConvention(Kind.Int)); addRuntimeCall(JAVA_TIME_MILLIS, config.javaTimeMillisStub, - /* temps */ null, + /* temps */ this.regConfig.getCallerSaveRegisters(), /* ret */ ret(Kind.Long)); addRuntimeCall(JAVA_TIME_NANOS, config.javaTimeNanosStub, - /* temps */ null, + /* temps */ this.regConfig.getCallerSaveRegisters(), /* ret */ ret(Kind.Long)); addRuntimeCall(ARITHMETIC_SIN, config.arithmeticSinStub, @@ -278,7 +278,7 @@ * @param ret where the call returns its result * @param args where arguments are passed to the call */ - protected void addRuntimeCall(Descriptor descriptor, long address, Register[] tempRegs, Value ret, Value... args) { + protected RuntimeCallTarget addRuntimeCall(Descriptor descriptor, long address, Register[] tempRegs, Value ret, Value... args) { Value[] temps = tempRegs == null || tempRegs.length == 0 ? Value.NONE : new Value[tempRegs.length]; for (int i = 0; i < temps.length; i++) { temps[i] = tempRegs[i].asValue(); @@ -291,6 +291,7 @@ } HotSpotRuntimeCallTarget runtimeCall = new HotSpotRuntimeCallTarget(descriptor, address, new CallingConvention(temps, 0, ret, args), graalRuntime.getCompilerToVM()); runtimeCalls.put(descriptor, runtimeCall); + return runtimeCall; } private boolean checkAssignable(Class spec, Value value) {