Mercurial > hg > graal-compiler
diff c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java @ 1455:43a93774d24f
Syncing changes with C1X.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 12 Nov 2010 16:11:41 +0100 |
parents | 9196a2b32950 |
children | e4cd5d2de7e1 |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java Tue Nov 09 17:40:15 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java Fri Nov 12 16:11:41 2010 +0100 @@ -67,6 +67,23 @@ private final CiRegister[] xmmParameterRegisters = {xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7}; private final CiRegister[] allParameterRegisters; + public static final CiRegisterSaveArea RSA; + static { + int offset = 0; + CiRegister[] rsaRegs = { + rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi, + r8, r9, r10, r11, r12, r13, r14, r15, + xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, + xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15 + }; + Map<CiRegister, Integer> registerOffsets = new HashMap<CiRegister, Integer>(rsaRegs.length); + for (CiRegister reg : rsaRegs) { + registerOffsets.put(reg, offset); + offset += reg.isFpu() ? 16 : 8; + } + RSA = new CiRegisterSaveArea(offset, registerOffsets, 8); + } + public HotSpotRegisterConfig(HotSpotVMConfig config) { if (config.windowsOs) { generalParameterRegisters = new CiRegister[] {rdx, r8, r9, rdi, rsi, rcx}; @@ -185,6 +202,10 @@ return rsp; } + public CiRegisterSaveArea getRSA() { + return RSA; + } + @Override public String toString() { String res = String.format(