Mercurial > hg > truffle
annotate graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java @ 17250:9f001294893d
Truffle: Added test case that compiler intrinsics are not intrinsified if hidden behind a @SlowPath.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 29 Sep 2014 18:37:24 +0200 |
parents | c2437c80c253 |
children | 8fc336a04d77 |
rev | line source |
---|---|
10854
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
1 /* |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
4 * |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
8 * |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
13 * accompanied this code). |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
14 * |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
18 * |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
21 * questions. |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
22 */ |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
23 package com.oracle.graal.hotspot.sparc; |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
24 |
15456
bb97b75d1d65
AMD64: implemented DeoptimizationStub.deoptimizationHandler
twisti
parents:
15104
diff
changeset
|
25 import static com.oracle.graal.hotspot.HotSpotHostBackend.*; |
10854
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
26 |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
27 import com.oracle.graal.api.code.*; |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
28 import com.oracle.graal.asm.sparc.*; |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
29 import com.oracle.graal.lir.*; |
11832
97d6932a309b
CodeCacheProvider.encodeDeoptActionAndReason now returns a Constant
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10854
diff
changeset
|
30 import com.oracle.graal.lir.asm.*; |
10854
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
31 import com.oracle.graal.lir.sparc.*; |
17021
c2437c80c253
[SPARC] Make scratch register usage safe
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
15456
diff
changeset
|
32 import com.oracle.graal.sparc.*; |
10854
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
33 |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
34 /** |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
35 * Removes the current frame and tail calls the uncommon trap routine. |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
36 */ |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
37 @Opcode("DEOPT_CALLER") |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
38 final class SPARCHotSpotDeoptimizeCallerOp extends SPARCHotSpotEpilogueOp { |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
39 |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
40 @Override |
13227
1a66453f73db
renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents:
12503
diff
changeset
|
41 public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) { |
1a66453f73db
renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents:
12503
diff
changeset
|
42 leaveFrame(crb); |
10854
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
43 |
12503
d7f8dd4fe876
minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
44 // SPARCHotSpotBackend backend = (SPARCHotSpotBackend) |
d7f8dd4fe876
minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
45 // HotSpotGraalRuntime.runtime().getBackend(); |
d7f8dd4fe876
minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
46 // final boolean isStub = true; |
d7f8dd4fe876
minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents:
12431
diff
changeset
|
47 // HotSpotFrameContext frameContext = backend.new HotSpotFrameContext(isStub); |
13227
1a66453f73db
renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents:
12503
diff
changeset
|
48 // frameContext.enter(crb); |
17021
c2437c80c253
[SPARC] Make scratch register usage safe
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
15456
diff
changeset
|
49 |
c2437c80c253
[SPARC] Make scratch register usage safe
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
15456
diff
changeset
|
50 try (SPARCScratchRegister sc = SPARCScratchRegister.get()) { |
c2437c80c253
[SPARC] Make scratch register usage safe
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
15456
diff
changeset
|
51 Register scratch = sc.getRegister(); |
c2437c80c253
[SPARC] Make scratch register usage safe
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
15456
diff
changeset
|
52 SPARCCall.indirectJmp(crb, masm, scratch, crb.foreignCalls.lookupForeignCall(UNCOMMON_TRAP_HANDLER)); |
c2437c80c253
[SPARC] Make scratch register usage safe
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
15456
diff
changeset
|
53 } |
10854
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
54 |
13227
1a66453f73db
renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents:
12503
diff
changeset
|
55 // frameContext.leave(crb); |
10854
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
56 } |
e1fcdda22831
SPARC: can compile some stubs now but they don't work yet
twisti
parents:
diff
changeset
|
57 } |