annotate graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotReturnOp.java @ 21673:5024c80224c7

moved com.oracle.graal.[amd64|sparc] to com.oracle.jvmci.[amd64|sparc] (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Tue, 02 Jun 2015 22:11:52 +0200
parents 48c1ebd24120
children 6df25b1418be
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
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: 18529
diff changeset
2 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.hotspot.sparc;
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
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.Value;
21673
5024c80224c7 moved com.oracle.graal.[amd64|sparc] to com.oracle.jvmci.[amd64|sparc] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
26 import com.oracle.jvmci.sparc.*;
5024c80224c7 moved com.oracle.graal.[amd64|sparc] to com.oracle.jvmci.[amd64|sparc] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
27
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
28 import static com.oracle.graal.lir.LIRInstruction.OperandFlag.*;
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 import com.oracle.graal.asm.sparc.*;
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31 import com.oracle.graal.lir.*;
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
32 import com.oracle.graal.lir.asm.*;
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
33 import com.oracle.graal.lir.sparc.SPARCControlFlow.ReturnOp;
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
34 import com.oracle.jvmci.hotspot.*;
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
35
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
36 /**
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
37 * Returns from a function.
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
38 */
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
39 @Opcode("RETURN")
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
40 final class SPARCHotSpotReturnOp extends SPARCHotSpotEpilogueOp {
19529
8fc336a04d77 Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18529
diff changeset
41 public static final LIRInstructionClass<SPARCHotSpotReturnOp> TYPE = LIRInstructionClass.create(SPARCHotSpotReturnOp.class);
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
42
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
43 @Use({REG, ILLEGAL}) protected Value value;
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
44 private final boolean isStub;
18529
ab86fa952750 removed static access to HotSpotGraalRuntime from some SPARC HotSpot classes
Doug Simon <doug.simon@oracle.com>
parents: 13972
diff changeset
45 private final HotSpotVMConfig config;
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
46
18529
ab86fa952750 removed static access to HotSpotGraalRuntime from some SPARC HotSpot classes
Doug Simon <doug.simon@oracle.com>
parents: 13972
diff changeset
47 SPARCHotSpotReturnOp(Value value, boolean isStub, HotSpotVMConfig config) {
19529
8fc336a04d77 Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18529
diff changeset
48 super(TYPE);
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
49 this.value = value;
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
50 this.isStub = isStub;
18529
ab86fa952750 removed static access to HotSpotGraalRuntime from some SPARC HotSpot classes
Doug Simon <doug.simon@oracle.com>
parents: 13972
diff changeset
51 this.config = config;
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
52 }
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
53
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
54 @Override
13227
1a66453f73db renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
55 public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) {
13972
28f560605e77 safepoint poll at return can never be elided
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13234
diff changeset
56 if (!isStub) {
28f560605e77 safepoint poll at return can never be elided
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13234
diff changeset
57 // Every non-stub compile method must have a poll before the return.
11761
3b25f37d5561 fixed poll-on-return for SPARC
Doug Simon <doug.simon@oracle.com>
parents: 11760
diff changeset
58 // Using the same scratch register as LIR_Assembler::return_op
3b25f37d5561 fixed poll-on-return for SPARC
Doug Simon <doug.simon@oracle.com>
parents: 11760
diff changeset
59 // in c1_LIRAssembler_sparc.cpp
18529
ab86fa952750 removed static access to HotSpotGraalRuntime from some SPARC HotSpot classes
Doug Simon <doug.simon@oracle.com>
parents: 13972
diff changeset
60 SPARCHotSpotSafepointOp.emitCode(crb, masm, config, true, null, SPARC.l0);
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
61 }
13227
1a66453f73db renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents: 12431
diff changeset
62 ReturnOp.emitCodeHelper(crb, masm);
11760
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
63 }
ce0b00597980 made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
64 }