1 /* |
|
2 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. |
|
8 * |
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
|
13 * accompanied this code). |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License version |
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 * |
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 * or visit www.oracle.com if you need additional information or have any |
|
21 * questions. |
|
22 * |
|
23 */ |
|
24 |
|
25 package sun.jvm.hotspot.asm.sparc; |
|
26 |
|
27 import sun.jvm.hotspot.asm.*; |
|
28 |
|
29 public interface SPARCInstructionFactory { |
|
30 public SPARCInstruction newCallInstruction(PCRelativeAddress addr); |
|
31 |
|
32 public SPARCInstruction newNoopInstruction(); |
|
33 |
|
34 public SPARCInstruction newSethiInstruction(int imm22, SPARCRegister rd); |
|
35 |
|
36 public SPARCInstruction newUnimpInstruction(int const22); |
|
37 |
|
38 public SPARCInstruction newBranchInstruction(String name, PCRelativeAddress addr, boolean isAnnuled, int conditionCode); |
|
39 |
|
40 public SPARCInstruction newSpecialLoadInstruction(String name, int specialReg, int cregNum, |
|
41 SPARCRegisterIndirectAddress addr); |
|
42 |
|
43 public SPARCInstruction newSpecialStoreInstruction(String name, int specialReg, int cregNum, |
|
44 SPARCRegisterIndirectAddress addr); |
|
45 |
|
46 public SPARCInstruction newLoadInstruction(String name, int opcode, |
|
47 SPARCRegisterIndirectAddress addr, SPARCRegister rd, |
|
48 int dataType); |
|
49 |
|
50 public SPARCInstruction newStoreInstruction(String name, int opcode, |
|
51 SPARCRegisterIndirectAddress addr, SPARCRegister rd, |
|
52 int dataType); |
|
53 |
|
54 public SPARCInstruction newStbarInstruction(); |
|
55 |
|
56 public SPARCInstruction newReadInstruction(int specialReg, int asrRegNum, SPARCRegister rd); |
|
57 |
|
58 public SPARCInstruction newWriteInstruction(int specialReg, int asrRegNum, SPARCRegister rs1, |
|
59 ImmediateOrRegister operand2); |
|
60 |
|
61 public SPARCInstruction newIllegalInstruction(int instruction); |
|
62 |
|
63 public SPARCInstruction newIndirectCallInstruction(SPARCRegisterIndirectAddress addr, |
|
64 SPARCRegister rd); |
|
65 |
|
66 public SPARCInstruction newReturnInstruction(SPARCRegisterIndirectAddress addr, |
|
67 SPARCRegister rd, boolean isLeaf); |
|
68 |
|
69 public SPARCInstruction newJmplInstruction(SPARCRegisterIndirectAddress addr, |
|
70 SPARCRegister rd); |
|
71 |
|
72 public SPARCInstruction newFP2RegisterInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd); |
|
73 |
|
74 public SPARCInstruction newFPMoveInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd); |
|
75 |
|
76 public SPARCInstruction newFPArithmeticInstruction(String name, int opf, int rtlOperation, |
|
77 SPARCFloatRegister rs1, SPARCFloatRegister rs2, |
|
78 SPARCFloatRegister rd); |
|
79 |
|
80 public SPARCInstruction newFlushInstruction(SPARCRegisterIndirectAddress addr); |
|
81 |
|
82 public SPARCInstruction newSaveInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd); |
|
83 |
|
84 public SPARCInstruction newRestoreInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd); |
|
85 |
|
86 public SPARCInstruction newTrapInstruction(String name, int conditionCode); |
|
87 |
|
88 public SPARCInstruction newRettInstruction(SPARCRegisterIndirectAddress addr); |
|
89 |
|
90 public SPARCInstruction newArithmeticInstruction(String name, int opcode, int rtlOperation, |
|
91 SPARCRegister rs1, ImmediateOrRegister operand2, |
|
92 SPARCRegister rd); |
|
93 |
|
94 public SPARCInstruction newLogicInstruction(String name, int opcode, int rtlOperation, |
|
95 SPARCRegister rs1, ImmediateOrRegister operand2, |
|
96 SPARCRegister rd); |
|
97 |
|
98 public SPARCInstruction newMoveInstruction(String name, int opcode, |
|
99 ImmediateOrRegister operand2, |
|
100 SPARCRegister rd); |
|
101 |
|
102 public SPARCInstruction newShiftInstruction(String name, int opcode, int rtlOperation, |
|
103 SPARCRegister rs1, ImmediateOrRegister operand2, |
|
104 SPARCRegister rd); |
|
105 |
|
106 public SPARCInstruction newCoprocessorInstruction(int instruction, int cpopcode, int opc, |
|
107 int rs1Num, int rs2Num, int rdNum); |
|
108 public SPARCInstruction newSwapInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd); |
|
109 public SPARCInstruction newLdstubInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd); |
|
110 } |
|