8353735: [JVMCI] Allow specifying storage kind of the callee save register
Reviewed-by: dnsimon, cslucas
This commit is contained in:
parent
c88f94c9d7
commit
74e981e855
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -94,6 +94,16 @@ public interface RegisterConfig {
|
|||||||
*/
|
*/
|
||||||
RegisterArray getCalleeSaveRegisters();
|
RegisterArray getCalleeSaveRegisters();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the storage kind for a callee-save register, which determines how the register is
|
||||||
|
* saved and restored. For example, according to the Windows x64 ABI, the upper portions of
|
||||||
|
* XMM0-XMM15 are considered destroyed, so saving the full width of these registers is not
|
||||||
|
* necessary.
|
||||||
|
*/
|
||||||
|
default PlatformKind getCalleeSaveRegisterStorageKind(Architecture arch, Register calleeSaveRegister) {
|
||||||
|
return arch.getLargestStorableKind(calleeSaveRegister.getRegisterCategory());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a map from register {@linkplain Register#number numbers} to register
|
* Gets a map from register {@linkplain Register#number numbers} to register
|
||||||
* {@linkplain RegisterAttributes attributes} for this register configuration.
|
* {@linkplain RegisterAttributes attributes} for this register configuration.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user