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