|
64 | 64 | import static jdk.vm.ci.amd64.AMD64.xmm7;
|
65 | 65 | import static jdk.vm.ci.amd64.AMD64.xmm8;
|
66 | 66 | import static jdk.vm.ci.amd64.AMD64.xmm9;
|
| 67 | +import static jdk.vm.ci.amd64.AMD64Kind.V128_QWORD; |
67 | 68 |
|
68 | 69 | import java.util.ArrayList;
|
69 | 70 | import java.util.Arrays;
|
|
87 | 88 | import jdk.graal.compiler.core.common.LIRKind;
|
88 | 89 | import jdk.vm.ci.amd64.AMD64;
|
89 | 90 | import jdk.vm.ci.amd64.AMD64Kind;
|
| 91 | +import jdk.vm.ci.code.Architecture; |
90 | 92 | import jdk.vm.ci.code.CallingConvention;
|
91 | 93 | import jdk.vm.ci.code.CallingConvention.Type;
|
92 | 94 | import jdk.vm.ci.code.Register;
|
@@ -239,6 +241,15 @@ public List<Register> getCalleeSaveRegisters() {
|
239 | 241 | return calleeSaveRegisters;
|
240 | 242 | }
|
241 | 243 |
|
| 244 | + @Override |
| 245 | + public PlatformKind getCalleeSaveRegisterStorageKind(Architecture arch, Register calleeSaveRegister) { |
| 246 | + if (Platform.includedIn(Platform.WINDOWS.class) && AMD64.XMM.equals(calleeSaveRegister.getRegisterCategory())) { |
| 247 | + VMError.guarantee(calleeSaveRegister.encoding() >= xmm6.encoding() && calleeSaveRegister.encoding() <= xmm15.encoding(), "unexpected callee saved register"); |
| 248 | + return V128_QWORD; |
| 249 | + } |
| 250 | + return SubstrateRegisterConfig.super.getCalleeSaveRegisterStorageKind(arch, calleeSaveRegister); |
| 251 | + } |
| 252 | + |
242 | 253 | @Override
|
243 | 254 | public List<Register> getCallerSaveRegisters() {
|
244 | 255 | return getAllocatableRegisters();
|
@@ -410,7 +421,7 @@ public CallingConvention getCallingConvention(Type t, JavaType returnType, JavaT
|
410 | 421 | kinds = Arrays.copyOf(kinds, kinds.length + 1);
|
411 | 422 | locations = Arrays.copyOf(locations, locations.length + 1);
|
412 | 423 | kinds[kinds.length - 1] = JavaKind.Int;
|
413 |
| - locations[locations.length - 1] = AMD64.rax.asValue(LIRKind.value(AMD64Kind.DWORD)); |
| 424 | + locations[locations.length - 1] = rax.asValue(LIRKind.value(AMD64Kind.DWORD)); |
414 | 425 | if (type.customABI()) {
|
415 | 426 | var extendsParametersAssignment = Arrays.copyOf(type.fixedParameterAssignment, type.fixedParameterAssignment.length + 1);
|
416 | 427 | extendsParametersAssignment[extendsParametersAssignment.length - 1] = AssignedLocation.forRegister(rax, JavaKind.Long);
|
|
0 commit comments