Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRegisterConfig.java @ 6470:b1010f7bc0bf
expanded CallingConvention API class to also include the location of the value (if any) returned by a call
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 01 Oct 2012 21:37:20 +0200 |
parents | 258d3e0b5a65 |
children | 85c1b84f8fd9 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRegisterConfig.java Mon Oct 01 16:12:45 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRegisterConfig.java Mon Oct 01 21:37:20 2012 +0200 @@ -108,18 +108,18 @@ } @Override - public CallingConvention getCallingConvention(Type type, Kind[] parameters, TargetDescription target, boolean stackOnly) { + public CallingConvention getCallingConvention(Type type, Kind returnKind, Kind[] parameters, TargetDescription target, boolean stackOnly) { if (type == Type.NativeCall) { throw new UnsupportedOperationException(); } - return callingConvention(parameters, type, target, stackOnly); + return callingConvention(returnKind, parameters, type, target, stackOnly); } public Register[] getCallingConventionRegisters(Type type, RegisterFlag flag) { return allParameterRegisters; } - private CallingConvention callingConvention(Kind[] kinds, Type type, TargetDescription target, boolean stackOnly) { + private CallingConvention callingConvention(Kind returnKind, Kind[] kinds, Type type, TargetDescription target, boolean stackOnly) { Value[] locations = new Value[kinds.length]; int currentGeneral = 0; @@ -159,7 +159,8 @@ } } - return new CallingConvention(locations, currentStackOffset); + Value returnLocation = returnKind.isVoid() ? Value.IllegalValue : getReturnRegister(returnKind).asValue(returnKind); + return new CallingConvention(currentStackOffset, returnLocation, locations); } @Override