Mercurial > hg > graal-jvmci-8
annotate graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java @ 13227:1a66453f73db
renamed TargetMethodAssembler to CompilationResultBuilder
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 03 Dec 2013 10:51:16 +0100 |
parents | 7080a96be216 |
children | 6bab029d6e3a |
rev | line source |
---|---|
10792 | 1 /* |
2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23 package com.oracle.graal.hotspot.sparc; | |
24 | |
25 import static com.oracle.graal.nodes.java.MethodCallTargetNode.InvokeKind.*; | |
26 import static com.oracle.graal.sparc.SPARC.*; | |
27 | |
28 import com.oracle.graal.api.meta.*; | |
29 import com.oracle.graal.asm.sparc.*; | |
30 import com.oracle.graal.asm.sparc.SPARCMacroAssembler.*; | |
31 import com.oracle.graal.hotspot.*; | |
32 import com.oracle.graal.hotspot.bridge.*; | |
33 import com.oracle.graal.lir.*; | |
34 import com.oracle.graal.lir.sparc.SPARCCall.DirectCallOp; | |
35 import com.oracle.graal.lir.asm.*; | |
36 import com.oracle.graal.nodes.java.MethodCallTargetNode.InvokeKind; | |
37 | |
38 /** | |
39 * A direct call that complies with the conventions for such calls in HotSpot. In particular, for | |
40 * calls using an inline cache, a MOVE instruction is emitted just prior to the aligned direct call. | |
41 */ | |
42 @Opcode("CALL_DIRECT") | |
43 final class SPARCHotspotDirectVirtualCallOp extends DirectCallOp { | |
44 | |
45 private final InvokeKind invokeKind; | |
46 | |
47 SPARCHotspotDirectVirtualCallOp(ResolvedJavaMethod target, Value result, Value[] parameters, Value[] temps, LIRFrameState state, InvokeKind invokeKind) { | |
48 super(target, result, parameters, temps, state); | |
49 this.invokeKind = invokeKind; | |
50 assert invokeKind == InvokeKind.Interface || invokeKind == InvokeKind.Virtual; | |
51 } | |
52 | |
53 @Override | |
13227
1a66453f73db
renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
54 public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) { |
10792 | 55 // The mark for an invocation that uses an inline cache must be placed at the |
56 // instruction that loads the Klass from the inline cache. | |
13227
1a66453f73db
renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
57 crb.recordMark(invokeKind == Virtual ? Marks.MARK_INVOKEVIRTUAL : Marks.MARK_INVOKEINTERFACE); |
12431
7080a96be216
rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents:
11233
diff
changeset
|
58 new Setx(HotSpotGraalRuntime.runtime().getConfig().nonOopBits, g3, true).emit(masm); |
13227
1a66453f73db
renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
59 super.emitCode(crb, masm); |
10792 | 60 } |
61 } |