comparison agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86InstructionFactoryImpl.java @ 0:a61af66fc99e jdk7-b24

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children c18cbe5936b8
comparison
equal deleted inserted replaced
-1:000000000000 0:a61af66fc99e
1 /*
2 * Copyright 2003 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 * have any questions.
22 *
23 */
24
25 package sun.jvm.hotspot.asm.x86;
26
27 import sun.jvm.hotspot.asm.*;
28
29 public class X86InstructionFactoryImpl implements X86InstructionFactory {
30
31 public X86Instruction newCallInstruction(String name, Address addr, int size, int prefixes) {
32 return new X86CallInstruction(name, addr, size, prefixes);
33 }
34
35 public X86Instruction newJmpInstruction(String name, Address addr, int size, int prefixes) {
36 return new X86JmpInstruction(name, addr, size, prefixes);
37 }
38
39 public X86Instruction newCondJmpInstruction(String name, X86PCRelativeAddress addr, int size, int prefixes) {
40 return new X86CondJmpInstruction(name, addr, size, prefixes);
41 }
42
43 public X86Instruction newMoveInstruction(String name, X86Register rd, ImmediateOrRegister oSrc, int size, int prefixes) {
44 return new X86MoveInstruction(name, rd, oSrc, size, prefixes);
45 }
46
47 public X86Instruction newMoveLoadInstruction(String name, X86Register op1, Address op2, int dataType, int size, int prefixes) {
48 return new X86MoveLoadInstruction(name, op1, op2, dataType, size, prefixes);
49 }
50
51 public X86Instruction newMoveStoreInstruction(String name, Address op1, X86Register op2, int dataType, int size, int prefixes) {
52 return new X86MoveStoreInstruction(name, op1, op2, dataType, size, prefixes);
53 }
54
55 public X86Instruction newArithmeticInstruction(String name, int rtlOperation, Operand op1, Operand op2, Operand op3, int size, int prefixes) {
56 return new X86ArithmeticInstruction(name, rtlOperation, op1, op2, op3, size, prefixes);
57 }
58
59 public X86Instruction newArithmeticInstruction(String name, int rtlOperation, Operand op1, Operand op2, int size, int prefixes) {
60 return new X86ArithmeticInstruction(name, rtlOperation, op1, op2, size, prefixes);
61 }
62
63
64 public X86Instruction newLogicInstruction(String name, int rtlOperation, Operand op1, Operand op2, int size, int prefixes) {
65 return new X86LogicInstruction(name, rtlOperation, op1, op2, size, prefixes);
66 }
67
68 public X86Instruction newBranchInstruction(String name, X86PCRelativeAddress addr, int size, int prefixes) {
69 return new X86BranchInstruction(name, addr, size, prefixes);
70 }
71
72 public X86Instruction newShiftInstruction(String name, int rtlOperation, Operand op1, ImmediateOrRegister op2, int size, int prefixes) {
73 return new X86ShiftInstruction(name, rtlOperation, op1, op2, size, prefixes);
74 }
75
76 public X86Instruction newRotateInstruction(String name, Operand op1, ImmediateOrRegister op2, int size, int prefixes) {
77 return new X86RotateInstruction(name, op1, op2, size, prefixes);
78 }
79
80 public X86Instruction newFPLoadInstruction(String name, Operand op, int size, int prefixes) {
81 return new X86FPLoadInstruction(name, op, size, prefixes);
82 }
83
84 public X86Instruction newFPStoreInstruction(String name, Operand op, int size, int prefixes) {
85 return new X86FPStoreInstruction(name, op, size, prefixes);
86 }
87
88 public X86Instruction newFPArithmeticInstruction(String name, int rtlOperation, Operand op1, Operand op2, int size, int prefixes) {
89 return new X86FPArithmeticInstruction(name, rtlOperation, op1, op2, size, prefixes);
90 }
91
92 public X86Instruction newGeneralInstruction(String name, Operand op1, Operand op2, Operand op3, int size, int prefixes) {
93 return new X86GeneralInstruction(name, op1, op2, op3, size, prefixes);
94 }
95
96 public X86Instruction newGeneralInstruction(String name, Operand op1, Operand op2, int size, int prefixes) {
97 return new X86GeneralInstruction(name, op1, op2, size, prefixes);
98 }
99
100 public X86Instruction newGeneralInstruction(String name, Operand op1, int size, int prefixes) {
101 return new X86GeneralInstruction(name, op1, size, prefixes);
102 }
103
104 public X86Instruction newIllegalInstruction() {
105 return new X86IllegalInstruction();
106 }
107
108 }