diff options
Diffstat (limited to 'drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h')
-rw-r--r-- | drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h | 88 |
1 files changed, 87 insertions, 1 deletions
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h b/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h index e64f802bba..9df9e2ce35 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h | |||
@@ -37,13 +37,14 @@ | |||
37 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 37 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
38 | * POSSIBILITY OF SUCH DAMAGES. | 38 | * POSSIBILITY OF SUCH DAMAGES. |
39 | * | 39 | * |
40 | * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_insformat.h#11 $ | 40 | * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_insformat.h#12 $ |
41 | * | 41 | * |
42 | * $FreeBSD$ | 42 | * $FreeBSD$ |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <asm/byteorder.h> | 45 | #include <asm/byteorder.h> |
46 | 46 | ||
47 | /* 8bit ALU logic operations */ | ||
47 | struct ins_format1 { | 48 | struct ins_format1 { |
48 | #ifdef __LITTLE_ENDIAN | 49 | #ifdef __LITTLE_ENDIAN |
49 | uint32_t immediate : 8, | 50 | uint32_t immediate : 8, |
@@ -62,6 +63,7 @@ struct ins_format1 { | |||
62 | #endif | 63 | #endif |
63 | }; | 64 | }; |
64 | 65 | ||
66 | /* 8bit ALU shift/rotate operations */ | ||
65 | struct ins_format2 { | 67 | struct ins_format2 { |
66 | #ifdef __LITTLE_ENDIAN | 68 | #ifdef __LITTLE_ENDIAN |
67 | uint32_t shift_control : 8, | 69 | uint32_t shift_control : 8, |
@@ -80,6 +82,7 @@ struct ins_format2 { | |||
80 | #endif | 82 | #endif |
81 | }; | 83 | }; |
82 | 84 | ||
85 | /* 8bit branch control operations */ | ||
83 | struct ins_format3 { | 86 | struct ins_format3 { |
84 | #ifdef __LITTLE_ENDIAN | 87 | #ifdef __LITTLE_ENDIAN |
85 | uint32_t immediate : 8, | 88 | uint32_t immediate : 8, |
@@ -96,10 +99,68 @@ struct ins_format3 { | |||
96 | #endif | 99 | #endif |
97 | }; | 100 | }; |
98 | 101 | ||
102 | /* 16bit ALU logic operations */ | ||
103 | struct ins_format4 { | ||
104 | #ifdef __LITTLE_ENDIAN | ||
105 | uint32_t opcode_ext : 8, | ||
106 | source : 9, | ||
107 | destination : 9, | ||
108 | ret : 1, | ||
109 | opcode : 4, | ||
110 | parity : 1; | ||
111 | #else | ||
112 | uint32_t parity : 1, | ||
113 | opcode : 4, | ||
114 | ret : 1, | ||
115 | destination : 9, | ||
116 | source : 9, | ||
117 | opcode_ext : 8; | ||
118 | #endif | ||
119 | }; | ||
120 | |||
121 | /* 16bit branch control operations */ | ||
122 | struct ins_format5 { | ||
123 | #ifdef __LITTLE_ENDIAN | ||
124 | uint32_t opcode_ext : 8, | ||
125 | source : 9, | ||
126 | address : 10, | ||
127 | opcode : 4, | ||
128 | parity : 1; | ||
129 | #else | ||
130 | uint32_t parity : 1, | ||
131 | opcode : 4, | ||
132 | address : 10, | ||
133 | source : 9, | ||
134 | opcode_ext : 8; | ||
135 | #endif | ||
136 | }; | ||
137 | |||
138 | /* Far branch operations */ | ||
139 | struct ins_format6 { | ||
140 | #ifdef __LITTLE_ENDIAN | ||
141 | uint32_t page : 3, | ||
142 | opcode_ext : 5, | ||
143 | source : 9, | ||
144 | address : 10, | ||
145 | opcode : 4, | ||
146 | parity : 1; | ||
147 | #else | ||
148 | uint32_t parity : 1, | ||
149 | opcode : 4, | ||
150 | address : 10, | ||
151 | source : 9, | ||
152 | opcode_ext : 5, | ||
153 | page : 3; | ||
154 | #endif | ||
155 | }; | ||
156 | |||
99 | union ins_formats { | 157 | union ins_formats { |
100 | struct ins_format1 format1; | 158 | struct ins_format1 format1; |
101 | struct ins_format2 format2; | 159 | struct ins_format2 format2; |
102 | struct ins_format3 format3; | 160 | struct ins_format3 format3; |
161 | struct ins_format4 format4; | ||
162 | struct ins_format5 format5; | ||
163 | struct ins_format6 format6; | ||
103 | uint8_t bytes[4]; | 164 | uint8_t bytes[4]; |
104 | uint32_t integer; | 165 | uint32_t integer; |
105 | }; | 166 | }; |
@@ -118,6 +179,8 @@ struct instruction { | |||
118 | #define AIC_OP_ROL 0x5 | 179 | #define AIC_OP_ROL 0x5 |
119 | #define AIC_OP_BMOV 0x6 | 180 | #define AIC_OP_BMOV 0x6 |
120 | 181 | ||
182 | #define AIC_OP_MVI16 0x7 | ||
183 | |||
121 | #define AIC_OP_JMP 0x8 | 184 | #define AIC_OP_JMP 0x8 |
122 | #define AIC_OP_JC 0x9 | 185 | #define AIC_OP_JC 0x9 |
123 | #define AIC_OP_JNC 0xa | 186 | #define AIC_OP_JNC 0xa |
@@ -131,3 +194,26 @@ struct instruction { | |||
131 | #define AIC_OP_SHL 0x10 | 194 | #define AIC_OP_SHL 0x10 |
132 | #define AIC_OP_SHR 0x20 | 195 | #define AIC_OP_SHR 0x20 |
133 | #define AIC_OP_ROR 0x30 | 196 | #define AIC_OP_ROR 0x30 |
197 | |||
198 | /* 16bit Ops. Low byte main opcode. High byte extended opcode. */ | ||
199 | #define AIC_OP_OR16 0x8005 | ||
200 | #define AIC_OP_AND16 0x8105 | ||
201 | #define AIC_OP_XOR16 0x8205 | ||
202 | #define AIC_OP_ADD16 0x8305 | ||
203 | #define AIC_OP_ADC16 0x8405 | ||
204 | #define AIC_OP_JNE16 0x8805 | ||
205 | #define AIC_OP_JNZ16 0x8905 | ||
206 | #define AIC_OP_JE16 0x8C05 | ||
207 | #define AIC_OP_JZ16 0x8B05 | ||
208 | #define AIC_OP_JMP16 0x9005 | ||
209 | #define AIC_OP_JC16 0x9105 | ||
210 | #define AIC_OP_JNC16 0x9205 | ||
211 | #define AIC_OP_CALL16 0x9305 | ||
212 | #define AIC_OP_CALL16 0x9305 | ||
213 | |||
214 | /* Page extension is low three bits of second opcode byte. */ | ||
215 | #define AIC_OP_JMPF 0xA005 | ||
216 | #define AIC_OP_CALLF 0xB005 | ||
217 | #define AIC_OP_JCF 0xC005 | ||
218 | #define AIC_OP_JNCF 0xD005 | ||
219 | #define AIC_OP_CMPXCHG 0xE005 | ||