comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.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 9e5e83ca2259
children 8cfe3537a0d3 43a93774d24f
comparison
equal deleted inserted replaced
1438:a7a0ef3c6858 1439:d0c8d3a2a7e8
37 * 37 *
38 * @author Thomas Wuerthinger, Lukas Stadler 38 * @author Thomas Wuerthinger, Lukas Stadler
39 */ 39 */
40 public class HotSpotRuntime implements RiRuntime { 40 public class HotSpotRuntime implements RiRuntime {
41 41
42 private final HotSpotVMConfig config; 42 final HotSpotVMConfig config;
43 final HotSpotRegisterConfig regConfig;
44
43 45
44 public HotSpotRuntime(HotSpotVMConfig config) { 46 public HotSpotRuntime(HotSpotVMConfig config) {
45 this.config = config; 47 this.config = config;
48 regConfig = new HotSpotRegisterConfig(config);
46 } 49 }
47 50
48 @Override 51 @Override
49 public int codeOffset() { 52 public int codeOffset() {
50 return 0; 53 return 0;
55 return disassemble(code, new DisassemblyPrinter(false)); 58 return disassemble(code, new DisassemblyPrinter(false));
56 } 59 }
57 60
58 private String disassemble(byte[] code, DisassemblyPrinter disassemblyPrinter) { 61 private String disassemble(byte[] code, DisassemblyPrinter disassemblyPrinter) {
59 final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); 62 final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
60 final InstructionSet instructionSet = InstructionSet.AMD64; 63 final ISA instructionSet = ISA.AMD64;
61 Disassembler.disassemble(byteArrayOutputStream, code, instructionSet, WordWidth.BITS_64, 0, null, disassemblyPrinter); 64 Disassembler.disassemble(byteArrayOutputStream, code, instructionSet, WordWidth.BITS_64, 0, null, disassemblyPrinter);
62 return byteArrayOutputStream.toString(); 65 return byteArrayOutputStream.toString();
63 } 66 }
64 67
65 @Override 68 @Override
216 @Override 219 @Override
217 public boolean recordLeafMethodAssumption(RiMethod method) { 220 public boolean recordLeafMethodAssumption(RiMethod method) {
218 return false; 221 return false;
219 } 222 }
220 223
224 @Override
225 public RiRegisterConfig getRegisterConfig(RiMethod method) {
226 return regConfig;
227 }
221 } 228 }