Mercurial > hg > truffle
annotate graal/Runtime/src/com/sun/hotspot/c1x/HotSpotRuntime.java @ 2297:099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 22 Apr 2011 15:08:53 +0200 |
parents | |
children | 96ca0e1b8a1d |
rev | line source |
---|---|
2297
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2010 Sun Microsystems, Inc. All rights reserved. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * that is described in this document. In particular, and without limitation, these intellectual property |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * more additional patents or pending patent applications in the U.S. and in other countries. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * U.S. Government Rights - Commercial software. Government users are subject to the Sun |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * supplements. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * U.S. and other countries. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Company, Ltd. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 */ |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 package com.sun.hotspot.c1x; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 import java.io.*; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 import java.lang.reflect.*; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 import java.util.*; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
26 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 import com.sun.cri.ci.*; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
28 import com.sun.cri.ci.CiTargetMethod.Call; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
29 import com.sun.cri.ci.CiTargetMethod.DataPatch; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
30 import com.sun.cri.ci.CiTargetMethod.Safepoint; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
31 import com.sun.cri.ri.*; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
32 import com.sun.max.asm.dis.*; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 import com.sun.max.lang.*; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
35 /** |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 * CRI runtime implementation for the HotSpot VM. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
37 * |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 * @author Thomas Wuerthinger, Lukas Stadler |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
39 */ |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
40 public class HotSpotRuntime implements RiRuntime { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
42 final HotSpotVMConfig config; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
43 final HotSpotRegisterConfig regConfig; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
44 final HotSpotRegisterConfig globalStubRegConfig; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
45 private final Compiler compiler; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
47 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
48 public HotSpotRuntime(HotSpotVMConfig config, Compiler compiler) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
49 this.config = config; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
50 this.compiler = compiler; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 regConfig = new HotSpotRegisterConfig(config, false); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
52 globalStubRegConfig = new HotSpotRegisterConfig(config, true); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
53 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
54 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
55 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
56 public int codeOffset() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
57 return 0; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
60 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 public String disassemble(byte[] code, long address) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 return disassemble(code, new DisassemblyPrinter(false), address); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
64 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 private String disassemble(byte[] code, DisassemblyPrinter disassemblyPrinter, long address) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
67 final ISA instructionSet = ISA.AMD64; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 Disassembler.disassemble(byteArrayOutputStream, code, instructionSet, WordWidth.BITS_64, address, null, disassemblyPrinter); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 return byteArrayOutputStream.toString(); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
70 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
71 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
73 public String disassemble(final CiTargetMethod targetMethod) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
74 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
75 final DisassemblyPrinter disassemblyPrinter = new DisassemblyPrinter(false) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
76 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
77 private String toString(Call call) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
78 if (call.runtimeCall != null) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
79 return "{" + call.runtimeCall.name() + "}"; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
80 } else if (call.symbol != null) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
81 return "{" + call.symbol + "}"; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
82 } else if (call.globalStubID != null) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
83 return "{" + call.globalStubID + "}"; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
84 } else { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
85 return "{" + call.method + "}"; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
86 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
87 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
88 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
89 private String siteInfo(int pcOffset) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
90 for (Call call : targetMethod.directCalls) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
91 if (call.pcOffset == pcOffset) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
92 return toString(call); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
93 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
94 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
95 for (Call call : targetMethod.indirectCalls) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
96 if (call.pcOffset == pcOffset) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
97 return toString(call); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
98 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
99 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
100 for (Safepoint site : targetMethod.safepoints) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
101 if (site.pcOffset == pcOffset) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
102 return "{safepoint}"; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
103 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
104 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
105 for (DataPatch site : targetMethod.dataReferences) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
106 if (site.pcOffset == pcOffset) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
107 return "{" + site.constant + "}"; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
108 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
109 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
110 return null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
111 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
113 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 protected String disassembledObjectString(Disassembler disassembler, DisassembledObject disassembledObject) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
115 final String string = super.disassembledObjectString(disassembler, disassembledObject); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
116 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
117 String site = siteInfo(disassembledObject.startPosition()); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
118 if (site != null) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
119 return string + " " + site; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
120 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
121 return string; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
122 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
123 }; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
124 final byte[] code = Arrays.copyOf(targetMethod.targetCode(), targetMethod.targetCodeSize()); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
125 return disassemble(code, disassemblyPrinter, 0L); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
126 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
127 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
128 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
129 public String disassemble(RiMethod method) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
130 return "No disassembler available"; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
131 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
132 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
133 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
134 public RiConstantPool getConstantPool(RiMethod method) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
135 return ((HotSpotTypeResolved) method.holder()).constantPool(); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
136 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
137 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
138 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
139 public RiOsrFrame getOsrFrame(RiMethod method, int bci) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
140 return null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
141 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
142 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
143 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
144 public RiType getRiType(Class<?> javaClass) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
145 assert javaClass != null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
146 return compiler.getVMEntries().getType(javaClass); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
147 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
148 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
149 public Class<?> getJavaClass(CiConstant c) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
150 return null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
151 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
152 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
153 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
154 public RiType getRiType(CiKind kind) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
155 return getRiType(kind.toJavaClass()); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
156 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
157 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
158 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
159 public RiType getRiType(CiConstant constant) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
160 return compiler.getVMEntries().getRiType(constant); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
161 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
162 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
163 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
164 public boolean isExceptionType(RiType type) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
165 return type.isSubtypeOf(getRiType(Throwable.class)); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
166 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
167 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
168 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
169 public RiSnippets getSnippets() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
170 throw new UnsupportedOperationException("getSnippets"); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
171 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
172 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
173 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
174 public boolean mustInline(RiMethod method) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
175 return false; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
176 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
177 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
178 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
179 public boolean mustNotCompile(RiMethod method) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
180 return false; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
181 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
182 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
183 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
184 public boolean mustNotInline(RiMethod method) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
185 return Modifier.isNative(method.accessFlags()); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
186 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
187 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
188 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
189 public Object registerGlobalStub(CiTargetMethod targetMethod, String name) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
190 return HotSpotTargetMethod.installStub(compiler, targetMethod, name); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
191 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
192 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
193 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
194 public int sizeOfBasicObjectLock() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
195 // TODO shouldn't be hard coded |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
196 return 2 * 8; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
197 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
198 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
199 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
200 public int basicObjectLockOffsetInBytes() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
201 return 8; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
202 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
203 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
204 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
205 public RiField getRiField(Field javaField) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
206 throw new UnsupportedOperationException("getRiField"); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
207 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
208 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
209 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
210 public RiMethod getRiMethod(Method javaMethod) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
211 throw new UnsupportedOperationException("getRiMethod"); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
212 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
213 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
214 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
215 public RiMethod getRiMethod(Constructor<?> javaConstructor) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
216 throw new UnsupportedOperationException("getRiMethod"); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
217 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
218 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
219 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
220 public CiConstant invoke(RiMethod method, CiMethodInvokeArguments args) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
221 return null; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
222 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
223 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
224 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
225 public CiConstant foldWordOperation(int opcode, CiMethodInvokeArguments args) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
226 throw new UnsupportedOperationException("foldWordOperation"); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
227 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
228 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
229 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
230 public boolean compareConstantObjects(CiConstant x, CiConstant y) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
231 return compiler.getVMEntries().compareConstantObjects(x, y); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
232 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
233 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
234 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
235 public RiRegisterConfig getRegisterConfig(RiMethod method) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
236 return regConfig; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
237 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
238 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
239 /** |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
240 * HotSpots needs an area suitable for storing a program counter for temporary use during the deoptimization process. |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
241 */ |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
242 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
243 public int getCustomStackAreaSize() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
244 return 8; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
245 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
246 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
247 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
248 public boolean supportsArrayIntrinsics() { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
249 return true; |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
250 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
251 |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
252 @Override |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
253 public int getArrayLength(CiConstant array) { |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
254 return compiler.getVMEntries().getArrayLength(array); |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
255 } |
099e697d8934
Renaming c1x4hotspotsrc => graal and HotSpotVM => Runtime
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
256 } |