annotate graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCDeoptimizeOp.java @ 21720:d915361cc3a1

moved asm, bytecode and asm.test code back to com.oracle.graal name space (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Thu, 04 Jun 2015 13:35:47 +0200
parents 6df25b1418be
children d9f3acb4a9a1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
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: 15456
diff changeset
2 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
4 *
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
7 * published by the Free Software Foundation.
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
8 *
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
13 * accompanied this code).
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
14 *
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
18 *
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
21 * questions.
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
22 */
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
23 package com.oracle.graal.hotspot.sparc;
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
24
15456
bb97b75d1d65 AMD64: implemented DeoptimizationStub.deoptimizationHandler
twisti
parents: 15104
diff changeset
25 import static com.oracle.graal.hotspot.HotSpotHostBackend.*;
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
26
21720
d915361cc3a1 moved asm, bytecode and asm.test code back to com.oracle.graal name space (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21708
diff changeset
27 import com.oracle.graal.asm.sparc.*;
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
28 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: 14013
diff changeset
29 import com.oracle.graal.lir.StandardOp.BlockEndOp;
11832
97d6932a309b CodeCacheProvider.encodeDeoptActionAndReason now returns a Constant
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 10871
diff changeset
30 import com.oracle.graal.lir.asm.*;
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
31 import com.oracle.graal.lir.sparc.*;
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
32
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
33 @Opcode("DEOPT")
14013
4347ad3df3d7 make SPARC compile code again
twisti
parents: 13227
diff changeset
34 final class SPARCDeoptimizeOp extends SPARCLIRInstruction implements BlockEndOp {
19529
8fc336a04d77 Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15456
diff changeset
35 public static final LIRInstructionClass<SPARCDeoptimizeOp> TYPE = LIRInstructionClass.create(SPARCDeoptimizeOp.class);
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
36
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
37 @State private LIRFrameState info;
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
38
11832
97d6932a309b CodeCacheProvider.encodeDeoptActionAndReason now returns a Constant
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 10871
diff changeset
39 SPARCDeoptimizeOp(LIRFrameState info) {
19529
8fc336a04d77 Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 15456
diff changeset
40 super(TYPE);
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
41 this.info = info;
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
42 }
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
43
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
44 @Override
13227
1a66453f73db renamed TargetMethodAssembler to CompilationResultBuilder
Doug Simon <doug.simon@oracle.com>
parents: 12503
diff changeset
45 public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) {
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
46 // TODO the patched call address looks odd (and is invalid) compared to other runtime calls:
12503
d7f8dd4fe876 minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents: 12363
diff changeset
47 // 0xffffffff749bb5fc: call 0xffffffff415a720c ; {runtime_call}
d7f8dd4fe876 minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents: 12363
diff changeset
48 // [Exception Handler]
d7f8dd4fe876 minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents: 12363
diff changeset
49 // 0xffffffff749bb604: call 0xffffffff749bb220 ; {runtime_call}
d7f8dd4fe876 minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents: 12363
diff changeset
50 // 0xffffffff749bb608: nop
d7f8dd4fe876 minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents: 12363
diff changeset
51 // [Deopt Handler Code]
d7f8dd4fe876 minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents: 12363
diff changeset
52 // 0xffffffff749bb60c: call 0xffffffff748da540 ; {runtime_call}
d7f8dd4fe876 minor reformatting based on 'mx eclipseformat'
Doug Simon <doug.simon@oracle.com>
parents: 12363
diff changeset
53 // 0xffffffff749bb610: nop
15104
ed29f7ff71eb add DeoptimizationStub
twisti
parents: 14991
diff changeset
54 SPARCCall.directCall(crb, masm, crb.foreignCalls.lookupForeignCall(UNCOMMON_TRAP_HANDLER), null, false, info);
10871
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
55 }
c3b09d69dfde SPARC: fixes and more implementation; can now allocate objects
twisti
parents:
diff changeset
56 }