annotate graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java @ 21620:d06ff213a181

Small fix to NestedLoopTest: Make sure the placeholder methods cannot be inlined.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 31 May 2015 23:05:25 +0200
parents 48c1ebd24120
children 6df25b1418be
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
1 /*
19529
8fc336a04d77 Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18822
diff changeset
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
4 *
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
7 * published by the Free Software Foundation.
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
8 *
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
13 * accompanied this code).
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
14 *
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
18 *
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
21 * questions.
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
22 */
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
23 package com.oracle.graal.hotspot.sparc;
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
24
21556
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21551
diff changeset
25 import com.oracle.jvmci.meta.ResolvedJavaMethod;
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21551
diff changeset
26 import com.oracle.jvmci.meta.Value;
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
27 import com.oracle.graal.asm.sparc.*;
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
28 import com.oracle.graal.lir.*;
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
29 import com.oracle.graal.lir.asm.*;
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
30 import com.oracle.graal.lir.sparc.SPARCCall.DirectCallOp;
16563
1e63cb55f61d Move InvokeKind from MethodCallTargetNode to CallTargetNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15069
diff changeset
31 import com.oracle.graal.nodes.CallTargetNode.InvokeKind;
21551
5324104ac4f3 moved com.oracle.graal.hotspot.jvmci classes to com.oracle.jvmci.hotspot module (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21526
diff changeset
32 import com.oracle.jvmci.hotspot.*;
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
33
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
34 /**
15069
d1b948f9db34 restore compiledic assert until source of failures understood
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14991
diff changeset
35 * A direct call that complies with the conventions for such calls in HotSpot. It doesn't use an
d1b948f9db34 restore compiledic assert until source of failures understood
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 14991
diff changeset
36 * inline cache so it's just a patchable call site.
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
37 */
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
38 @Opcode("CALL_DIRECT")
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
39 final class SPARCHotspotDirectStaticCallOp extends DirectCallOp {
19529
8fc336a04d77 Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18822
diff changeset
40 public static final LIRInstructionClass<SPARCHotspotDirectStaticCallOp> TYPE = LIRInstructionClass.create(SPARCHotspotDirectStaticCallOp.class);
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
41
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
42 private final InvokeKind invokeKind;
21413
15a46a918fc1 removed unnecessary HotSpotCodeCache.MarkId enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 19529
diff changeset
43 private final HotSpotVMConfig config;
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
44
21413
15a46a918fc1 removed unnecessary HotSpotCodeCache.MarkId enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 19529
diff changeset
45 SPARCHotspotDirectStaticCallOp(ResolvedJavaMethod target, Value result, Value[] parameters, Value[] temps, LIRFrameState state, InvokeKind invokeKind, HotSpotVMConfig config) {
19529
8fc336a04d77 Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18822
diff changeset
46 super(TYPE, target, result, parameters, temps, state);
18822
fad37aaed6d2 Add utilities isDirect and isIndirect to InvokeKind.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 17177
diff changeset
47 assert invokeKind.isDirect();
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
48 this.invokeKind = invokeKind;
21413
15a46a918fc1 removed unnecessary HotSpotCodeCache.MarkId enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 19529
diff changeset
49 this.config = config;
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
50 }
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
51
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
52 @Override
17177
805a26002dc7 [SPARC] Implement stuffing of delay slots in branches and calls. Optimized the cmove for integer and fp ops
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16563
diff changeset
53 public void emitCallPrefixCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) {
21413
15a46a918fc1 removed unnecessary HotSpotCodeCache.MarkId enum (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 19529
diff changeset
54 crb.recordMark(invokeKind == InvokeKind.Static ? config.MARKID_INVOKESTATIC : config.MARKID_INVOKESPECIAL);
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
55 }
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents:
diff changeset
56 }