Mercurial > hg > graal-compiler
diff c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java @ 1468:e4cd5d2de7e1
Changes to sync with CRI changes.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 19 Nov 2010 00:26:51 +0100 |
parents | 43a93774d24f |
children | ef7761803480 |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java Fri Nov 19 00:26:31 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java Fri Nov 19 00:26:51 2010 +0100 @@ -67,21 +67,15 @@ private final CiRegister[] xmmParameterRegisters = {xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7}; private final CiRegister[] allParameterRegisters; - public static final CiRegisterSaveArea RSA; + public static final CiCalleeSaveArea 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); + RSA = new CiCalleeSaveArea(-1, rsaRegs, 8); } public HotSpotRegisterConfig(HotSpotVMConfig config) { @@ -100,13 +94,6 @@ return getAllocatableRegisters(); } - private final CiRegister[] none = {}; - - @Override - public CiRegister[] getCalleeSaveRegisters() { - return none; - } - @Override public CiRegister getRegister(int index) { throw new UnsupportedOperationException(); @@ -202,7 +189,7 @@ return rsp; } - public CiRegisterSaveArea getRSA() { + public CiCalleeSaveArea getCalleeSaveArea() { return RSA; } @@ -211,7 +198,7 @@ String res = String.format( "Allocatable: " + Arrays.toString(getAllocatableRegisters()) + "%n" + "CallerSave: " + Arrays.toString(getCallerSaveRegisters()) + "%n" + - "CalleeSave: " + Arrays.toString(getCalleeSaveRegisters()) + "%n" + + "CalleeSave: " + getCalleeSaveArea() + "%n" + "Scratch: " + getScratchRegister() + "%n"); return res; }