< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java

Print this page




 176         allAllocatableAreCallerSaved = true;
 177         attributesMap = RegisterAttributes.createMap(this, target.arch.getRegisters());
 178     }
 179 
 180     @Override
 181     public Register[] getCallerSaveRegisters() {
 182         return callerSaved;
 183     }
 184 
 185     @Override
 186     public Register[] getCalleeSaveRegisters() {
 187         return null;
 188     }
 189 
 190     @Override
 191     public boolean areAllAllocatableRegistersCallerSaved() {
 192         return allAllocatableAreCallerSaved;
 193     }
 194 
 195     @Override
 196     public Register getRegisterForRole(int index) {
 197         throw new UnsupportedOperationException();
 198     }
 199 
 200     @Override
 201     public CallingConvention getCallingConvention(Type type, JavaType returnType, JavaType[] parameterTypes, ValueKindFactory<?> valueKindFactory) {
 202         HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
 203         if (type == HotSpotCallingConventionType.NativeCall) {
 204             return callingConvention(nativeGeneralParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
 205         }
 206         // On x64, parameter locations are the same whether viewed
 207         // from the caller or callee perspective
 208         return callingConvention(javaGeneralParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
 209     }
 210 
 211     @Override
 212     public Register[] getCallingConventionRegisters(Type type, JavaKind kind) {
 213         HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
 214         switch (kind) {
 215             case Boolean:
 216             case Byte:
 217             case Short:
 218             case Char:
 219             case Int:
 220             case Long:




 176         allAllocatableAreCallerSaved = true;
 177         attributesMap = RegisterAttributes.createMap(this, target.arch.getRegisters());
 178     }
 179 
 180     @Override
 181     public Register[] getCallerSaveRegisters() {
 182         return callerSaved;
 183     }
 184 
 185     @Override
 186     public Register[] getCalleeSaveRegisters() {
 187         return null;
 188     }
 189 
 190     @Override
 191     public boolean areAllAllocatableRegistersCallerSaved() {
 192         return allAllocatableAreCallerSaved;
 193     }
 194 
 195     @Override





 196     public CallingConvention getCallingConvention(Type type, JavaType returnType, JavaType[] parameterTypes, ValueKindFactory<?> valueKindFactory) {
 197         HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
 198         if (type == HotSpotCallingConventionType.NativeCall) {
 199             return callingConvention(nativeGeneralParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
 200         }
 201         // On x64, parameter locations are the same whether viewed
 202         // from the caller or callee perspective
 203         return callingConvention(javaGeneralParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
 204     }
 205 
 206     @Override
 207     public Register[] getCallingConventionRegisters(Type type, JavaKind kind) {
 208         HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
 209         switch (kind) {
 210             case Boolean:
 211             case Byte:
 212             case Short:
 213             case Char:
 214             case Int:
 215             case Long:


< prev index next >