Skip to content

Commit 339b72e

Browse files
committed
[JVMCI] Allow specifying storage kind of the callee save register
1 parent 3cc43b3 commit 339b72e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/code/RegisterConfig.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -94,6 +94,13 @@ default int getMaximumFrameSize() {
9494
*/
9595
RegisterArray getCalleeSaveRegisters();
9696

97+
/**
98+
* Gets the storage kind for a callee save register.
99+
*/
100+
default PlatformKind getCalleeSaveRegisterStorageKind(Architecture arch, Register calleeSaveRegister) {
101+
return arch.getLargestStorableKind(calleeSaveRegister.getRegisterCategory());
102+
}
103+
97104
/**
98105
* Gets a map from register {@linkplain Register#number numbers} to register
99106
* {@linkplain RegisterAttributes attributes} for this register configuration.

0 commit comments

Comments
 (0)