Mercurial > hg > graal-compiler
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java @ 1439:d0c8d3a2a7e8
Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Added c1x4hotspotsrc/hotspot/java as indirect launcher for $JRE7/bin/java that can be referenced from Eclipse launch configuration.
Copied .checkstyle_checks.xml from C1X project to c1x4hotspotsrc/HotSpotVM so that it can be used by HotSpotVM project without hard coded path to C1X in another Eclipse workspace.
Various other changes to reflect changes in CRI and C1X.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 29 Oct 2010 18:14:17 +0200 |
parents | a7a0ef3c6858 |
children | c0e244017dad |
comparison
equal
deleted
inserted
replaced
1438:a7a0ef3c6858 | 1439:d0c8d3a2a7e8 |
---|---|
18 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open | 18 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open |
19 * Company, Ltd. | 19 * Company, Ltd. |
20 */ | 20 */ |
21 package com.sun.hotspot.c1x; | 21 package com.sun.hotspot.c1x; |
22 | 22 |
23 import static com.sun.c1x.target.amd64.AMD64.*; | |
24 | |
23 import java.lang.reflect.Proxy; | 25 import java.lang.reflect.Proxy; |
24 import java.net.*; | 26 import java.net.*; |
27 import java.util.*; | |
25 | 28 |
26 import com.sun.c1x.*; | 29 import com.sun.c1x.*; |
27 import com.sun.c1x.target.amd64.*; | 30 import com.sun.c1x.target.amd64.*; |
28 import com.sun.cri.ci.*; | 31 import com.sun.cri.ci.*; |
29 import com.sun.cri.ri.*; | 32 import com.sun.cri.ri.*; |
135 private final HotSpotRuntime runtime; | 138 private final HotSpotRuntime runtime; |
136 private final RiRegisterConfig registerConfig; | 139 private final RiRegisterConfig registerConfig; |
137 private final CiTarget target; | 140 private final CiTarget target; |
138 private final RiXirGenerator generator; | 141 private final RiXirGenerator generator; |
139 | 142 |
143 public static final CiRegisterSaveArea RSA; | |
144 static { | |
145 int offset = 0; | |
146 CiRegister[] rsaRegs = { | |
147 rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi, | |
148 r8, r9, r10, r11, r12, r13, r14, r15, | |
149 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, | |
150 xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15 | |
151 }; | |
152 Map<CiRegister, Integer> registerOffsets = new HashMap<CiRegister, Integer>(rsaRegs.length); | |
153 for (CiRegister reg : rsaRegs) { | |
154 registerOffsets.put(reg, offset); | |
155 offset += reg.isFpu() ? 16 : 8; | |
156 } | |
157 RSA = new CiRegisterSaveArea(offset, registerOffsets, 8, rax, r15); | |
158 } | |
159 | |
140 private Compiler() { | 160 private Compiler() { |
141 config = getVMEntries().getConfiguration(); | 161 config = getVMEntries().getConfiguration(); |
142 config.check(); | 162 config.check(); |
143 | 163 |
144 runtime = new HotSpotRuntime(config); | 164 runtime = new HotSpotRuntime(config); |
145 final int wordSize = 8; | 165 final int wordSize = 8; |
146 final int stackFrameAlignment = 16; | 166 final int stackFrameAlignment = 16; |
147 registerConfig = new HotSpotRegisterConfig(config); | 167 registerConfig = runtime.regConfig; |
148 target = new HotSpotTarget(new AMD64(), registerConfig, true, wordSize, wordSize, wordSize, stackFrameAlignment, config.vmPageSize, wordSize, wordSize, config.codeEntryAlignment, true); | 168 target = new HotSpotTarget(new AMD64(), RSA, true, wordSize, wordSize, wordSize, stackFrameAlignment, config.vmPageSize, wordSize, wordSize, config.codeEntryAlignment, true); |
149 | 169 |
150 if (Logger.ENABLED) { | 170 if (Logger.ENABLED) { |
151 generator = LoggingProxy.getProxy(RiXirGenerator.class, new HotSpotXirGenerator(config, target, registerConfig)); | 171 generator = LoggingProxy.getProxy(RiXirGenerator.class, new HotSpotXirGenerator(config, target, registerConfig)); |
152 } else { | 172 } else { |
153 generator = new HotSpotXirGenerator(config, target, registerConfig); | 173 generator = new HotSpotXirGenerator(config, target, registerConfig); |
154 } | 174 } |
155 compiler = new C1XCompiler(runtime, target, generator); | 175 compiler = new C1XCompiler(runtime, target, generator, registerConfig); |
156 | 176 |
157 C1XOptions.setOptimizationLevel(3); | 177 C1XOptions.setOptimizationLevel(3); |
158 C1XOptions.OptInlineExcept = false; | 178 C1XOptions.OptInlineExcept = false; |
159 C1XOptions.OptInlineSynchronized = false; | 179 C1XOptions.OptInlineSynchronized = false; |
160 C1XOptions.UseDeopt = false; | 180 C1XOptions.UseDeopt = false; |