Mercurial > hg > truffle
annotate graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java @ 16849:0d987db807df
do not generate IDE configurations for distributions auto-generated for projects that define annotation processors
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sun, 17 Aug 2014 14:20:11 +0200 |
parents | e7b7a5be4d21 |
children | 805a26002dc7 |
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.sparc.SPARC.*; | |
26 | |
16638
ca87d8c825ac
[SPARC] InvokeInterface calls (vstubs) need the called interface in G5 register
Stefan Anzinger <stefan.anzinger@gmail.com>
parents:
14991
diff
changeset
|
27 import com.oracle.graal.api.code.*; |
10792 | 28 import com.oracle.graal.api.meta.*; |
29 import com.oracle.graal.asm.sparc.*; | |
16662 | 30 import com.oracle.graal.asm.sparc.SPARCMacroAssembler.*; |
10792 | 31 import com.oracle.graal.hotspot.*; |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
13227
diff
changeset
|
32 import com.oracle.graal.hotspot.meta.HotSpotCodeCacheProvider.MarkId; |
10792 | 33 import com.oracle.graal.lir.*; |
14991
64dcb92ee75a
Truffle: Change signature for Truffle calls from (PackedFrame, Arguments) to (Object[]).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
14574
diff
changeset
|
34 import com.oracle.graal.lir.asm.*; |
10792 | 35 import com.oracle.graal.lir.sparc.SPARCCall.DirectCallOp; |
16563
1e63cb55f61d
Move InvokeKind from MethodCallTargetNode to CallTargetNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
14991
diff
changeset
|
36 import com.oracle.graal.nodes.CallTargetNode.InvokeKind; |
10792 | 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. | |
16563
1e63cb55f61d
Move InvokeKind from MethodCallTargetNode to CallTargetNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
14991
diff
changeset
|
57 MarkId.recordMark(crb, invokeKind == InvokeKind.Virtual ? MarkId.INVOKEVIRTUAL : MarkId.INVOKEINTERFACE); |
16638
ca87d8c825ac
[SPARC] InvokeInterface calls (vstubs) need the called interface in G5 register
Stefan Anzinger <stefan.anzinger@gmail.com>
parents:
14991
diff
changeset
|
58 Register scratchRegister = g5; |
ca87d8c825ac
[SPARC] InvokeInterface calls (vstubs) need the called interface in G5 register
Stefan Anzinger <stefan.anzinger@gmail.com>
parents:
14991
diff
changeset
|
59 new Setx(HotSpotGraalRuntime.runtime().getConfig().nonOopBits, scratchRegister, true).emit(masm); |
13227
1a66453f73db
renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
60 super.emitCode(crb, masm); |
10792 | 61 } |
62 } |