# HG changeset patch # User Thomas Wuerthinger # Date 1289669353 -3600 # Node ID 1ffaf7819f9181601f1f0d530bea3a1c2627f097 # Parent a8f9f091c219b676911c46d10f3b7262362991f0# Parent dc114f680d9cb69c57055bd067670d9190b07bc2 Merge. diff -r a8f9f091c219 -r 1ffaf7819f91 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Sat Nov 13 18:28:48 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Sat Nov 13 18:29:13 2010 +0100 @@ -20,11 +20,8 @@ */ package com.sun.hotspot.c1x; -import static com.sun.c1x.target.amd64.AMD64.*; - import java.lang.reflect.Proxy; import java.net.*; -import java.util.*; import com.sun.c1x.*; import com.sun.c1x.target.amd64.*; @@ -136,27 +133,10 @@ private final CiCompiler compiler; private final HotSpotVMConfig config; private final HotSpotRuntime runtime; - private final RiRegisterConfig registerConfig; + private final HotSpotRegisterConfig registerConfig; private final CiTarget target; private final RiXirGenerator generator; - 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 registerOffsets = new HashMap(rsaRegs.length); - for (CiRegister reg : rsaRegs) { - registerOffsets.put(reg, offset); - offset += reg.isFpu() ? 16 : 8; - } - RSA = new CiRegisterSaveArea(offset, registerOffsets, 8, rax, r15); - } - private Compiler() { config = getVMEntries().getConfiguration(); config.check(); @@ -165,7 +145,7 @@ final int wordSize = 8; final int stackFrameAlignment = 16; registerConfig = runtime.regConfig; - target = new HotSpotTarget(new AMD64(), RSA, true, wordSize, wordSize, wordSize, stackFrameAlignment, config.vmPageSize, wordSize, wordSize, config.codeEntryAlignment, true); + target = new HotSpotTarget(new AMD64(), true, wordSize, wordSize, wordSize, stackFrameAlignment, config.vmPageSize, wordSize, wordSize, config.codeEntryAlignment, true); if (Logger.ENABLED) { generator = LoggingProxy.getProxy(RiXirGenerator.class, new HotSpotXirGenerator(config, target, registerConfig)); @@ -180,8 +160,6 @@ C1XOptions.NullCheckUniquePc = true; C1XOptions.invokeinterfaceTemplatePos = true; C1XOptions.StackShadowPages = config.stackShadowPages; - C1XOptions.NeedsDebugInformation = false; - } public CiCompiler getCompiler() { diff -r a8f9f091c219 -r 1ffaf7819f91 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java Sat Nov 13 18:28:48 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java Sat Nov 13 18:29:13 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 registerOffsets = new HashMap(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( diff -r a8f9f091c219 -r 1ffaf7819f91 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java Sat Nov 13 18:28:48 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java Sat Nov 13 18:29:13 2010 +0100 @@ -171,7 +171,7 @@ } @Override - public int sizeofBasicObjectLock() { + public int sizeOfBasicObjectLock() { // TODO shouldn't be hard coded return 2 * 8; } diff -r a8f9f091c219 -r 1ffaf7819f91 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTarget.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTarget.java Sat Nov 13 18:28:48 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTarget.java Sat Nov 13 18:29:13 2010 +0100 @@ -29,9 +29,9 @@ */ public class HotSpotTarget extends CiTarget { - public HotSpotTarget(CiArchitecture arch, CiRegisterSaveArea rsa, boolean isMP, int spillSlotSize, int wordSize, int referenceSize, int stackAlignment, int pageSize, int cacheAlignment, + public HotSpotTarget(CiArchitecture arch, boolean isMP, int spillSlotSize, int wordSize, int referenceSize, int stackAlignment, int pageSize, int cacheAlignment, int heapAlignment, int codeAlignment, boolean inlineObjects) { - super(arch, rsa, isMP, spillSlotSize, wordSize, referenceSize, stackAlignment, pageSize, cacheAlignment, heapAlignment, codeAlignment, inlineObjects); + super(arch, isMP, spillSlotSize, wordSize, referenceSize, stackAlignment, pageSize, cacheAlignment, heapAlignment, codeAlignment, inlineObjects, true); } @Override diff -r a8f9f091c219 -r 1ffaf7819f91 src/share/vm/c1x/c1x_CodeInstaller.cpp --- a/src/share/vm/c1x/c1x_CodeInstaller.cpp Sat Nov 13 18:28:48 2010 +0100 +++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp Sat Nov 13 18:29:13 2010 +0100 @@ -66,7 +66,7 @@ } if (frame_size > 0) { - assert(frame_map->length() == ((frame_size / HeapWordSize) + 7) / 8, "unexpected register_map length"); + assert(frame_map->length() == ((frame_size / HeapWordSize) + 7) / 8, "unexpected frame_map length"); for (jint i = 0; i < frame_size / HeapWordSize; i++) { unsigned char byte = ((unsigned char*) frame_map->base(T_BYTE))[i / 8]; @@ -385,8 +385,6 @@ oop global_stub = CiTargetMethod_Call::globalStubID(site); oop debug_info = CiTargetMethod_Call::debugInfo(site); - arrayOop stack_map = (arrayOop) CiTargetMethod_Call::stackMap(site); - arrayOop register_map = (arrayOop) CiTargetMethod_Call::registerMap(site); assert((runtime_call ? 1 : 0) + (hotspot_method ? 1 : 0) + (symbol ? 1 : 0) + (global_stub ? 1 : 0) == 1, "Call site needs exactly one type"); diff -r a8f9f091c219 -r 1ffaf7819f91 src/share/vm/c1x/c1x_TargetMethod.hpp --- a/src/share/vm/c1x/c1x_TargetMethod.hpp Sat Nov 13 18:28:48 2010 +0100 +++ b/src/share/vm/c1x/c1x_TargetMethod.hpp Sat Nov 13 18:29:13 2010 +0100 @@ -79,7 +79,6 @@ int_field(CiTargetMethod, frameSize) \ oop_field(CiTargetMethod, targetCode, "[B") \ int_field(CiTargetMethod, targetCodeSize) \ - int_field(CiTargetMethod, referenceRegisterCount) \ end_class \ start_class(CiTargetMethod_Site) \ int_field(CiTargetMethod_Site, pcOffset) \ @@ -90,8 +89,6 @@ oop_field(CiTargetMethod_Call, symbol, "Ljava/lang/String;") \ oop_field(CiTargetMethod_Call, globalStubID, "Ljava/lang/Object;") \ oop_field(CiTargetMethod_Call, debugInfo, "Lcom/sun/cri/ci/CiDebugInfo;") \ - oop_field(CiTargetMethod_Call, stackMap, "[B") \ - oop_field(CiTargetMethod_Call, registerMap, "[B") \ end_class \ start_class(CiTargetMethod_DataPatch) \ oop_field(CiTargetMethod_DataPatch, constant, "Lcom/sun/cri/ci/CiConstant;") \