annotate jvmci/jdk.internal.jvmci.sparc/src/jdk/internal/jvmci/sparc/SPARC.java @ 22569:ec96f33a101d

updated imports to be explicit and added checkstyle rule to forbid * imports
author Doug Simon <doug.simon@oracle.com>
date Wed, 16 Sep 2015 13:40:05 +0200
parents c79ee6cd7f53
children 355c41327aea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7740
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
1 /*
22533
df053711614b Remove Value.getKind().
Roland Schatz <roland.schatz@oracle.com>
parents: 22425
diff changeset
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
7740
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
4 *
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
8 *
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
13 * accompanied this code).
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
14 *
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
18 *
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
21 * questions.
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
22 */
22054
0e095e2c24e2 Rename com.oracle.jvmci to jdk.internal.jvmci
twisti
parents: 21798
diff changeset
23 package jdk.internal.jvmci.sparc;
7740
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
24
22569
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
25 import static java.nio.ByteOrder.BIG_ENDIAN;
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
26 import static jdk.internal.jvmci.code.MemoryBarriers.LOAD_LOAD;
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
27 import static jdk.internal.jvmci.code.MemoryBarriers.LOAD_STORE;
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
28 import static jdk.internal.jvmci.code.MemoryBarriers.STORE_STORE;
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
29
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
30 import java.util.Set;
7740
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
31
22569
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
32 import jdk.internal.jvmci.code.Architecture;
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
33 import jdk.internal.jvmci.code.Register;
22425
dc8493dd5a15 [SPARC] Add LOAD_LOAD memory barrier as implicit barrier
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22424
diff changeset
34 import jdk.internal.jvmci.code.Register.RegisterCategory;
22569
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
35 import jdk.internal.jvmci.code.TargetDescription;
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
36 import jdk.internal.jvmci.meta.JavaKind;
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22568
diff changeset
37 import jdk.internal.jvmci.meta.PlatformKind;
7740
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
38
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
39 /**
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
40 * Represents the SPARC architecture.
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
41 */
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
42 public class SPARC extends Architecture {
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
43
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
44 public static final RegisterCategory CPU = new RegisterCategory("CPU");
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
45
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
46 // General purpose registers
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
47 public static final Register r0 = new Register(0, 0, "g0", CPU);
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
48 public static final Register r1 = new Register(1, 1, "g1", CPU);
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
49 public static final Register r2 = new Register(2, 2, "g2", CPU);
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
50 public static final Register r3 = new Register(3, 3, "g3", CPU);
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
51 public static final Register r4 = new Register(4, 4, "g4", CPU);
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
52 public static final Register r5 = new Register(5, 5, "g5", CPU);
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
53 public static final Register r6 = new Register(6, 6, "g6", CPU);
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
54 public static final Register r7 = new Register(7, 7, "g7", CPU);
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
55
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
56 public static final Register r8 = new Register(8, 8, "o0", CPU);
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
57 public static final Register r9 = new Register(9, 9, "o1", CPU);
10854
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
58 public static final Register r10 = new Register(10, 10, "o2", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
59 public static final Register r11 = new Register(11, 11, "o3", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
60 public static final Register r12 = new Register(12, 12, "o4", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
61 public static final Register r13 = new Register(13, 13, "o5", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
62 public static final Register r14 = new Register(14, 14, "o6", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
63 public static final Register r15 = new Register(15, 15, "o7", CPU);
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
64
10854
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
65 public static final Register r16 = new Register(16, 16, "l0", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
66 public static final Register r17 = new Register(17, 17, "l1", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
67 public static final Register r18 = new Register(18, 18, "l2", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
68 public static final Register r19 = new Register(19, 19, "l3", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
69 public static final Register r20 = new Register(20, 20, "l4", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
70 public static final Register r21 = new Register(21, 21, "l5", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
71 public static final Register r22 = new Register(22, 22, "l6", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
72 public static final Register r23 = new Register(23, 23, "l7", CPU);
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
73
10854
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
74 public static final Register r24 = new Register(24, 24, "i0", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
75 public static final Register r25 = new Register(25, 25, "i1", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
76 public static final Register r26 = new Register(26, 26, "i2", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
77 public static final Register r27 = new Register(27, 27, "i3", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
78 public static final Register r28 = new Register(28, 28, "i4", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
79 public static final Register r29 = new Register(29, 29, "i5", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
80 public static final Register r30 = new Register(30, 30, "i6", CPU);
e1fcdda22831 SPARC: can compile some stubs now but they don't work yet
twisti
parents: 10686
diff changeset
81 public static final Register r31 = new Register(31, 31, "i7", CPU);
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
82
9844
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
83 public static final Register g0 = r0;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
84 public static final Register g1 = r1;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
85 public static final Register g2 = r2;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
86 public static final Register g3 = r3;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
87 public static final Register g4 = r4;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
88 public static final Register g5 = r5;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
89 public static final Register g6 = r6;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
90 public static final Register g7 = r7;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
91
10459
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
92 public static final Register o0 = r8;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
93 public static final Register o1 = r9;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
94 public static final Register o2 = r10;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
95 public static final Register o3 = r11;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
96 public static final Register o4 = r12;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
97 public static final Register o5 = r13;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
98 public static final Register o6 = r14;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
99 public static final Register o7 = r15;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
100
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
101 public static final Register l0 = r16;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
102 public static final Register l1 = r17;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
103 public static final Register l2 = r18;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
104 public static final Register l3 = r19;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
105 public static final Register l4 = r20;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
106 public static final Register l5 = r21;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
107 public static final Register l6 = r22;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
108 public static final Register l7 = r23;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
109
9844
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
110 public static final Register i0 = r24;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
111 public static final Register i1 = r25;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
112 public static final Register i2 = r26;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
113 public static final Register i3 = r27;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
114 public static final Register i4 = r28;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
115 public static final Register i5 = r29;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
116 public static final Register i6 = r30;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
117 public static final Register i7 = r31;
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
118
10898
ea308a63760b added unalignedMemoryAccess to Architecture
twisti
parents: 10854
diff changeset
119 public static final Register sp = o6;
10459
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
120 public static final Register fp = i6;
9844
2d1687e63484 SPARCMacroAssembler and synthetic instructions
Morris Meyer <morris.meyer@oracle.com>
parents: 9816
diff changeset
121
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
122 // @formatter:off
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents: 10459
diff changeset
123 public static final Register[] cpuRegisters = {
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
124 r0, r1, r2, r3, r4, r5, r6, r7,
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents: 10459
diff changeset
125 r8, r9, r10, r11, r12, r13, r14, r15,
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
126 r16, r17, r18, r19, r20, r21, r22, r23,
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
127 r24, r25, r26, r27, r28, r29, r30, r31
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
128 };
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
129 // @formatter:on
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
130
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
131 public static final RegisterCategory FPUs = new RegisterCategory("FPUs", cpuRegisters.length);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
132 public static final RegisterCategory FPUd = new RegisterCategory("FPUd", cpuRegisters.length + 32);
16093
39be5bc00046 Support XMM registers in oop maps.
Roland Schatz <roland.schatz@oracle.com>
parents: 15345
diff changeset
133
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
134 // Floating point registers
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
135 public static final Register f0 = new Register(32, 0, "f0", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
136 public static final Register f1 = new Register(33, 1, "f1", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
137 public static final Register f2 = new Register(34, 2, "f2", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
138 public static final Register f3 = new Register(35, 3, "f3", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
139 public static final Register f4 = new Register(36, 4, "f4", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
140 public static final Register f5 = new Register(37, 5, "f5", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
141 public static final Register f6 = new Register(38, 6, "f6", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
142 public static final Register f7 = new Register(39, 7, "f7", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
143
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
144 public static final Register f8 = new Register(40, 8, "f8", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
145 public static final Register f9 = new Register(41, 9, "f9", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
146 public static final Register f10 = new Register(42, 10, "f10", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
147 public static final Register f11 = new Register(43, 11, "f11", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
148 public static final Register f12 = new Register(44, 12, "f12", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
149 public static final Register f13 = new Register(45, 13, "f13", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
150 public static final Register f14 = new Register(46, 14, "f14", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
151 public static final Register f15 = new Register(47, 15, "f15", FPUs);
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
152
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
153 public static final Register f16 = new Register(48, 16, "f16", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
154 public static final Register f17 = new Register(49, 17, "f17", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
155 public static final Register f18 = new Register(50, 18, "f18", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
156 public static final Register f19 = new Register(51, 19, "f19", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
157 public static final Register f20 = new Register(52, 20, "f20", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
158 public static final Register f21 = new Register(53, 21, "f21", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
159 public static final Register f22 = new Register(54, 22, "f22", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
160 public static final Register f23 = new Register(55, 23, "f23", FPUs);
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
161
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
162 public static final Register f24 = new Register(56, 24, "f24", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
163 public static final Register f25 = new Register(57, 25, "f25", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
164 public static final Register f26 = new Register(58, 26, "f26", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
165 public static final Register f27 = new Register(59, 27, "f27", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
166 public static final Register f28 = new Register(60, 28, "f28", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
167 public static final Register f29 = new Register(61, 29, "f29", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
168 public static final Register f30 = new Register(62, 30, "f30", FPUs);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
169 public static final Register f31 = new Register(63, 31, "f31", FPUs);
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
170
22568
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
171 public static final Register d0 = new Register(32, getDoubleEncoding(0), "d0", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
172 public static final Register d2 = new Register(34, getDoubleEncoding(2), "d2", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
173 public static final Register d4 = new Register(36, getDoubleEncoding(4), "d4", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
174 public static final Register d6 = new Register(38, getDoubleEncoding(6), "d6", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
175 public static final Register d8 = new Register(40, getDoubleEncoding(8), "d8", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
176 public static final Register d10 = new Register(42, getDoubleEncoding(10), "d10", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
177 public static final Register d12 = new Register(44, getDoubleEncoding(12), "d12", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
178 public static final Register d14 = new Register(46, getDoubleEncoding(14), "d14", FPUd);
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
179
22568
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
180 public static final Register d16 = new Register(48, getDoubleEncoding(16), "d16", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
181 public static final Register d18 = new Register(50, getDoubleEncoding(18), "d18", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
182 public static final Register d20 = new Register(52, getDoubleEncoding(20), "d20", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
183 public static final Register d22 = new Register(54, getDoubleEncoding(22), "d22", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
184 public static final Register d24 = new Register(56, getDoubleEncoding(24), "d24", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
185 public static final Register d26 = new Register(58, getDoubleEncoding(26), "d26", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
186 public static final Register d28 = new Register(60, getDoubleEncoding(28), "d28", FPUd);
c79ee6cd7f53 [SPARC] Put d0..d28 into the FPUd register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22557
diff changeset
187 public static final Register d30 = new Register(62, getDoubleEncoding(28), "d28", FPUd);
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
188
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
189 public static final Register d32 = new Register(64, getDoubleEncoding(32), "d32", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
190 public static final Register d34 = new Register(65, getDoubleEncoding(34), "d34", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
191 public static final Register d36 = new Register(66, getDoubleEncoding(36), "d36", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
192 public static final Register d38 = new Register(67, getDoubleEncoding(38), "d38", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
193 public static final Register d40 = new Register(68, getDoubleEncoding(40), "d40", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
194 public static final Register d42 = new Register(69, getDoubleEncoding(42), "d42", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
195 public static final Register d44 = new Register(70, getDoubleEncoding(44), "d44", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
196 public static final Register d46 = new Register(71, getDoubleEncoding(46), "d46", FPUd);
16995
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
197
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
198 public static final Register d48 = new Register(72, getDoubleEncoding(48), "d48", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
199 public static final Register d50 = new Register(73, getDoubleEncoding(50), "d50", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
200 public static final Register d52 = new Register(74, getDoubleEncoding(52), "d52", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
201 public static final Register d54 = new Register(75, getDoubleEncoding(54), "d54", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
202 public static final Register d56 = new Register(76, getDoubleEncoding(56), "d56", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
203 public static final Register d58 = new Register(77, getDoubleEncoding(58), "d58", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
204 public static final Register d60 = new Register(78, getDoubleEncoding(60), "d60", FPUd);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
205 public static final Register d62 = new Register(79, getDoubleEncoding(62), "d62", FPUd);
16995
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
206
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
207 // @formatter:off
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
208 public static final Register[] fpuRegisters = {
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
209 f0, f1, f2, f3, f4, f5, f6, f7,
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
210 f8, f9, f10, f11, f12, f13, f14, f15,
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
211 f16, f17, f18, f19, f20, f21, f22, f23,
16995
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
212 f24, f25, f26, f27, f28, f29, f30, f31,
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
213 d32, d34, d36, d38, d40, d42, d44, d46,
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
214 d48, d50, d52, d54, d56, d58, d60, d62
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
215 };
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
216 // @formatter:on
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
217
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
218 // @formatter:off
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
219 public static final Register[] allRegisters = {
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents: 10459
diff changeset
220 // CPU
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
221 r0, r1, r2, r3, r4, r5, r6, r7,
10898
ea308a63760b added unalignedMemoryAccess to Architecture
twisti
parents: 10854
diff changeset
222 r8, r9, r10, r11, r12, r13, r14, r15,
ea308a63760b added unalignedMemoryAccess to Architecture
twisti
parents: 10854
diff changeset
223 r16, r17, r18, r19, r20, r21, r22, r23,
ea308a63760b added unalignedMemoryAccess to Architecture
twisti
parents: 10854
diff changeset
224 r24, r25, r26, r27, r28, r29, r30, r31,
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
225 // FPU
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
226 f0, f1, f2, f3, f4, f5, f6, f7,
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
227 f8, f9, f10, f11, f12, f13, f14, f15,
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
228 f16, f17, f18, f19, f20, f21, f22, f23,
16995
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
229 f24, f25, f26, f27, f28, f29, f30, f31,
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
230 d32, d34, d36, d38, d40, d42, d44, d46,
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
231 d48, d50, d52, d54, d56, d58, d60, d62
9816
4e9854086532 Initial SPARC compilation test
Morris Meyer <morris.meyer@oracle.com>
parents: 9695
diff changeset
232 };
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
233 // @formatter:on
7740
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
234
15345
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
235 /**
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
236 * Stack bias for stack and frame pointer loads.
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
237 */
109d6c7c40b5 implement SPARC uncommon trap stub
twisti
parents: 14563
diff changeset
238 public static final int STACK_BIAS = 0x7ff;
16645
8c70d65ec04a [SPARC] Fix issues when deoptimizing with floats in local scope.
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16094
diff changeset
239 /**
8c70d65ec04a [SPARC] Fix issues when deoptimizing with floats in local scope.
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16094
diff changeset
240 * In fact there are 64 single floating point registers, 32 of them could be accessed. TODO:
8c70d65ec04a [SPARC] Fix issues when deoptimizing with floats in local scope.
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16094
diff changeset
241 * Improve handling of these float registers
8c70d65ec04a [SPARC] Fix issues when deoptimizing with floats in local scope.
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16094
diff changeset
242 */
8c70d65ec04a [SPARC] Fix issues when deoptimizing with floats in local scope.
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16094
diff changeset
243 public static final int FLOAT_REGISTER_COUNT = 64;
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents: 10459
diff changeset
244
16654
8aa938ab4ac8 [SPARC] Spill slots must be 4 byte aligned
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16645
diff changeset
245 /**
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 17144
diff changeset
246 * Alignment for valid memory access.
16654
8aa938ab4ac8 [SPARC] Spill slots must be 4 byte aligned
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16645
diff changeset
247 */
8aa938ab4ac8 [SPARC] Spill slots must be 4 byte aligned
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16645
diff changeset
248 public static final int MEMORY_ACCESS_ALIGN = 4;
8aa938ab4ac8 [SPARC] Spill slots must be 4 byte aligned
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16645
diff changeset
249
22131
6b4469fe86c9 [SPARC] Use correct position in SPARCAssembler.insertNopAfterCBCond
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22054
diff changeset
250 public static final int INSTRUCTION_SIZE = 4;
6b4469fe86c9 [SPARC] Use correct position in SPARCAssembler.insertNopAfterCBCond
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22054
diff changeset
251
22144
7ae8ad713862 [SPARC] Do not preset SPARCFrameMap.initialSpillsize for register save area; set calleeSaveAreaSize correctly instead
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22131
diff changeset
252 /**
7ae8ad713862 [SPARC] Do not preset SPARCFrameMap.initialSpillsize for register save area; set calleeSaveAreaSize correctly instead
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22131
diff changeset
253 * Size to keep free for flushing the register-window to stack.
7ae8ad713862 [SPARC] Do not preset SPARCFrameMap.initialSpillsize for register save area; set calleeSaveAreaSize correctly instead
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22131
diff changeset
254 */
7ae8ad713862 [SPARC] Do not preset SPARCFrameMap.initialSpillsize for register save area; set calleeSaveAreaSize correctly instead
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22131
diff changeset
255 public static final int REGISTER_SAFE_AREA_SIZE = 128;
7ae8ad713862 [SPARC] Do not preset SPARCFrameMap.initialSpillsize for register save area; set calleeSaveAreaSize correctly instead
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22131
diff changeset
256
17082
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
257 public final Set<CPUFeature> features;
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
258
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
259 public SPARC(Set<CPUFeature> features) {
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
260 super("SPARC", JavaKind.Long, BIG_ENDIAN, false, allRegisters, LOAD_LOAD | LOAD_STORE | STORE_STORE, 1, r31.encoding + FLOAT_REGISTER_COUNT + 1, 8);
17082
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
261 this.features = features;
7740
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
262 }
9425
3ec29630cfb4 Use register categories instead of register flags.
Roland Schatz <roland.schatz@oracle.com>
parents: 7740
diff changeset
263
3ec29630cfb4 Use register categories instead of register flags.
Roland Schatz <roland.schatz@oracle.com>
parents: 7740
diff changeset
264 @Override
16094
c0b8d395368b Introduce LIRKind to accurately track oop references in backend.
Roland Schatz <roland.schatz@oracle.com>
parents: 16093
diff changeset
265 public boolean canStoreValue(RegisterCategory category, PlatformKind lirKind) {
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
266 if (!(lirKind instanceof JavaKind)) {
10459
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
267 return false;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
268 }
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
269
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
270 JavaKind kind = (JavaKind) lirKind;
18253
edb88f5425e6 switch to using use .equals() instead of == when comparing RegisterCaterory objects for equality
Doug Simon <doug.simon@oracle.com>
parents: 18163
diff changeset
271 if (category.equals(CPU)) {
10459
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
272 switch (kind) {
22557
0a7b7c7274be [SPARC] Fix problems introduced on refactoring Kind.Object and Value.getKind()
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22536
diff changeset
273 case Object:
10459
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
274 case Boolean:
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
275 case Byte:
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
276 case Char:
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
277 case Short:
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
278 case Int:
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
279 case Long:
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
280 return true;
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
281 }
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
282 } else if (category.equals(FPUs) && kind.equals(JavaKind.Float)) {
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
283 return true;
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
284 } else if (category.equals(FPUd) && kind.equals(JavaKind.Double)) {
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
285 return true;
10459
f78079947084 some basic SPARC arithmetic works
twisti
parents: 9844
diff changeset
286 }
9425
3ec29630cfb4 Use register categories instead of register flags.
Roland Schatz <roland.schatz@oracle.com>
parents: 7740
diff changeset
287 return false;
3ec29630cfb4 Use register categories instead of register flags.
Roland Schatz <roland.schatz@oracle.com>
parents: 7740
diff changeset
288 }
3ec29630cfb4 Use register categories instead of register flags.
Roland Schatz <roland.schatz@oracle.com>
parents: 7740
diff changeset
289
3ec29630cfb4 Use register categories instead of register flags.
Roland Schatz <roland.schatz@oracle.com>
parents: 7740
diff changeset
290 @Override
3ec29630cfb4 Use register categories instead of register flags.
Roland Schatz <roland.schatz@oracle.com>
parents: 7740
diff changeset
291 public PlatformKind getLargestStorableKind(RegisterCategory category) {
18253
edb88f5425e6 switch to using use .equals() instead of == when comparing RegisterCaterory objects for equality
Doug Simon <doug.simon@oracle.com>
parents: 18163
diff changeset
292 if (category.equals(CPU)) {
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
293 return JavaKind.Long;
22221
01343dd934f7 [SPARC] Provide valid Kind for SPARC.getLargestStorableKind on single precision register category
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22144
diff changeset
294 } else if (category.equals(FPUd)) {
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
295 return JavaKind.Double;
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
296 } else if (category.equals(FPUs)) {
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
297 return JavaKind.Float;
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents: 10459
diff changeset
298 } else {
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
299 return JavaKind.Illegal;
10686
73122b5edf6a SPARC: Can compile simple methods and do static calls.
twisti
parents: 10459
diff changeset
300 }
9425
3ec29630cfb4 Use register categories instead of register flags.
Roland Schatz <roland.schatz@oracle.com>
parents: 7740
diff changeset
301 }
16654
8aa938ab4ac8 [SPARC] Spill slots must be 4 byte aligned
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16645
diff changeset
302
22533
df053711614b Remove Value.getKind().
Roland Schatz <roland.schatz@oracle.com>
parents: 22425
diff changeset
303 @Override
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
304 public PlatformKind getPlatformKind(JavaKind javaKind) {
22535
ca418f35d728 Use wordKind instead of Kind.Object in backend.
Roland Schatz <roland.schatz@oracle.com>
parents: 22533
diff changeset
305 if (javaKind.isObject()) {
22536
dc1aeef79e7e Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents: 22535
diff changeset
306 return JavaKind.Long;
22535
ca418f35d728 Use wordKind instead of Kind.Object in backend.
Roland Schatz <roland.schatz@oracle.com>
parents: 22533
diff changeset
307 } else {
ca418f35d728 Use wordKind instead of Kind.Object in backend.
Roland Schatz <roland.schatz@oracle.com>
parents: 22533
diff changeset
308 return javaKind;
ca418f35d728 Use wordKind instead of Kind.Object in backend.
Roland Schatz <roland.schatz@oracle.com>
parents: 22533
diff changeset
309 }
22533
df053711614b Remove Value.getKind().
Roland Schatz <roland.schatz@oracle.com>
parents: 22425
diff changeset
310 }
df053711614b Remove Value.getKind().
Roland Schatz <roland.schatz@oracle.com>
parents: 22425
diff changeset
311
16654
8aa938ab4ac8 [SPARC] Spill slots must be 4 byte aligned
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16645
diff changeset
312 public static int spillSlotSize(TargetDescription td, PlatformKind kind) {
8aa938ab4ac8 [SPARC] Spill slots must be 4 byte aligned
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16645
diff changeset
313 return Math.max(td.getSizeInBytes(kind), MEMORY_ACCESS_ALIGN);
8aa938ab4ac8 [SPARC] Spill slots must be 4 byte aligned
Stefan Anzinger <stefan.anzinger@gmail.com>
parents: 16645
diff changeset
314 }
16995
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
315
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
316 public static int getDoubleEncoding(int reg) {
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
317 assert reg < 64 && ((reg & 1) == 0);
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
318 // ignore v8 assertion for now
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
319 return (reg & 0x1e) | ((reg & 0x20) >> 5);
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
320 }
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
321
20149
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
322 public static boolean isCPURegister(Register r) {
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
323 return r.getRegisterCategory().equals(CPU);
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
324 }
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
325
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
326 public static boolean isCPURegister(Register... regs) {
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
327 for (Register reg : regs) {
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
328 if (!isCPURegister(reg)) {
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
329 return false;
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
330 }
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
331 }
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
332 return true;
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
333 }
b1a8928fc4b9 [SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 18253
diff changeset
334
22268
b068e7d4db13 [SPARC] Assert certain scratch registers for stack banging/save instruction
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22221
diff changeset
335 public static boolean isGlobalRegister(Register r) {
b068e7d4db13 [SPARC] Assert certain scratch registers for stack banging/save instruction
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22221
diff changeset
336 return isCPURegister(r) && g0.number <= r.number && r.number <= g7.number;
b068e7d4db13 [SPARC] Assert certain scratch registers for stack banging/save instruction
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22221
diff changeset
337 }
b068e7d4db13 [SPARC] Assert certain scratch registers for stack banging/save instruction
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22221
diff changeset
338
16995
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
339 public static boolean isSingleFloatRegister(Register r) {
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
340 return r.name.startsWith("f");
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
341 }
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
342
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
343 public static boolean isDoubleFloatRegister(Register r) {
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
344 return r.name.startsWith("d");
4feac7e51f42 [SPARC] Fixing float register allocation
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16654
diff changeset
345 }
17082
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
346
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
347 public Set<CPUFeature> getFeatures() {
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
348 return features;
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
349 }
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
350
17144
44a96c7413a7 [SPARC] Gearing up with CBcond instruction
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 17082
diff changeset
351 public boolean hasFeature(CPUFeature feature) {
44a96c7413a7 [SPARC] Gearing up with CBcond instruction
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 17082
diff changeset
352 return features.contains(feature);
44a96c7413a7 [SPARC] Gearing up with CBcond instruction
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 17082
diff changeset
353 }
44a96c7413a7 [SPARC] Gearing up with CBcond instruction
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 17082
diff changeset
354
17082
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
355 public enum CPUFeature {
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
356 VIS1,
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
357 VIS2,
17144
44a96c7413a7 [SPARC] Gearing up with CBcond instruction
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 17082
diff changeset
358 VIS3,
22424
cefff7d980bc [SPARC] Add vmflags for BlockZeroing
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22268
diff changeset
359 CBCOND,
cefff7d980bc [SPARC] Add vmflags for BlockZeroing
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22268
diff changeset
360 BLOCK_ZEROING
17082
f8586d059f9d [SPARC] make compatible for CPU without VIS3 and do some cleanup
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 16995
diff changeset
361 }
7740
5f8101629080 Add projects and skeletons for SPARC port.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
362 }