1*3d8817e4Smiod /* Table of opcodes for the sparc.
2*3d8817e4Smiod    Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3*3d8817e4Smiod    2000, 2002, 2004, 2005
4*3d8817e4Smiod    Free Software Foundation, Inc.
5*3d8817e4Smiod 
6*3d8817e4Smiod    This file is part of the BFD library.
7*3d8817e4Smiod 
8*3d8817e4Smiod    BFD is free software; you can redistribute it and/or modify it under
9*3d8817e4Smiod    the terms of the GNU General Public License as published by the Free
10*3d8817e4Smiod    Software Foundation; either version 2, or (at your option) any later
11*3d8817e4Smiod    version.
12*3d8817e4Smiod 
13*3d8817e4Smiod    BFD is distributed in the hope that it will be useful, but WITHOUT ANY
14*3d8817e4Smiod    WARRANTY; without even the implied warranty of MERCHANTABILITY or
15*3d8817e4Smiod    FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16*3d8817e4Smiod    for more details.
17*3d8817e4Smiod 
18*3d8817e4Smiod    You should have received a copy of the GNU General Public License
19*3d8817e4Smiod    along with this software; see the file COPYING.  If not, write to
20*3d8817e4Smiod    the Free Software Foundation, 51 Franklin Street - Fifth Floor,
21*3d8817e4Smiod    Boston, MA 02110-1301, USA.	*/
22*3d8817e4Smiod 
23*3d8817e4Smiod /* FIXME-someday: perhaps the ,a's and such should be embedded in the
24*3d8817e4Smiod    instruction's name rather than the args.  This would make gas faster, pinsn
25*3d8817e4Smiod    slower, but would mess up some macros a bit.  xoxorich. */
26*3d8817e4Smiod 
27*3d8817e4Smiod #include <stdio.h>
28*3d8817e4Smiod #include "sysdep.h"
29*3d8817e4Smiod #include "opcode/sparc.h"
30*3d8817e4Smiod 
31*3d8817e4Smiod /* Some defines to make life easy.  */
32*3d8817e4Smiod #define MASK_V6		SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V6)
33*3d8817e4Smiod #define MASK_V7		SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V7)
34*3d8817e4Smiod #define MASK_V8		SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V8)
35*3d8817e4Smiod #define MASK_SPARCLET	SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLET)
36*3d8817e4Smiod #define MASK_SPARCLITE	SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLITE)
37*3d8817e4Smiod #define MASK_V9		SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9)
38*3d8817e4Smiod #define MASK_V9A	SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9A)
39*3d8817e4Smiod #define MASK_V9B	SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9B)
40*3d8817e4Smiod 
41*3d8817e4Smiod /* Bit masks of architectures supporting the insn.  */
42*3d8817e4Smiod 
43*3d8817e4Smiod #define v6		(MASK_V6 | MASK_V7 | MASK_V8 | MASK_SPARCLET \
44*3d8817e4Smiod 			 | MASK_SPARCLITE | MASK_V9 | MASK_V9A | MASK_V9B)
45*3d8817e4Smiod /* v6 insns not supported on the sparclet.  */
46*3d8817e4Smiod #define v6notlet	(MASK_V6 | MASK_V7 | MASK_V8 \
47*3d8817e4Smiod 			 | MASK_SPARCLITE | MASK_V9 | MASK_V9A | MASK_V9B)
48*3d8817e4Smiod #define v7		(MASK_V7 | MASK_V8 | MASK_SPARCLET \
49*3d8817e4Smiod 			 | MASK_SPARCLITE | MASK_V9 | MASK_V9A | MASK_V9B)
50*3d8817e4Smiod /* Although not all insns are implemented in hardware, sparclite is defined
51*3d8817e4Smiod    to be a superset of v8.  Unimplemented insns trap and are then theoretically
52*3d8817e4Smiod    implemented in software.
53*3d8817e4Smiod    It's not clear that the same is true for sparclet, although the docs
54*3d8817e4Smiod    suggest it is.  Rather than complicating things, the sparclet assembler
55*3d8817e4Smiod    recognizes all v8 insns.  */
56*3d8817e4Smiod #define v8		(MASK_V8 | MASK_SPARCLET | MASK_SPARCLITE \
57*3d8817e4Smiod 			 | MASK_V9 | MASK_V9A | MASK_V9B)
58*3d8817e4Smiod #define sparclet	(MASK_SPARCLET)
59*3d8817e4Smiod #define sparclite	(MASK_SPARCLITE)
60*3d8817e4Smiod #define v9		(MASK_V9 | MASK_V9A | MASK_V9B)
61*3d8817e4Smiod #define v9a		(MASK_V9A | MASK_V9B)
62*3d8817e4Smiod #define v9b		(MASK_V9B)
63*3d8817e4Smiod /* v6 insns not supported by v9.  */
64*3d8817e4Smiod #define v6notv9		(MASK_V6 | MASK_V7 | MASK_V8 \
65*3d8817e4Smiod 			 | MASK_SPARCLET | MASK_SPARCLITE)
66*3d8817e4Smiod /* v9a instructions which would appear to be aliases to v9's impdep's
67*3d8817e4Smiod    otherwise.  */
68*3d8817e4Smiod #define v9notv9a	(MASK_V9)
69*3d8817e4Smiod 
70*3d8817e4Smiod /* Table of opcode architectures.
71*3d8817e4Smiod    The order is defined in opcode/sparc.h.  */
72*3d8817e4Smiod 
73*3d8817e4Smiod const struct sparc_opcode_arch sparc_opcode_archs[] =
74*3d8817e4Smiod {
75*3d8817e4Smiod   { "v6", MASK_V6 },
76*3d8817e4Smiod   { "v7", MASK_V6 | MASK_V7 },
77*3d8817e4Smiod   { "v8", MASK_V6 | MASK_V7 | MASK_V8 },
78*3d8817e4Smiod   { "sparclet", MASK_V6 | MASK_V7 | MASK_V8 | MASK_SPARCLET },
79*3d8817e4Smiod   { "sparclite", MASK_V6 | MASK_V7 | MASK_V8 | MASK_SPARCLITE },
80*3d8817e4Smiod   /* ??? Don't some v8 priviledged insns conflict with v9?  */
81*3d8817e4Smiod   { "v9", MASK_V6 | MASK_V7 | MASK_V8 | MASK_V9 },
82*3d8817e4Smiod   /* v9 with ultrasparc additions */
83*3d8817e4Smiod   { "v9a", MASK_V6 | MASK_V7 | MASK_V8 | MASK_V9 | MASK_V9A },
84*3d8817e4Smiod   /* v9 with cheetah additions */
85*3d8817e4Smiod   { "v9b", MASK_V6 | MASK_V7 | MASK_V8 | MASK_V9 | MASK_V9A | MASK_V9B },
86*3d8817e4Smiod   { NULL, 0 }
87*3d8817e4Smiod };
88*3d8817e4Smiod 
89*3d8817e4Smiod /* Given NAME, return it's architecture entry.  */
90*3d8817e4Smiod 
91*3d8817e4Smiod enum sparc_opcode_arch_val
sparc_opcode_lookup_arch(const char * name)92*3d8817e4Smiod sparc_opcode_lookup_arch (const char *name)
93*3d8817e4Smiod {
94*3d8817e4Smiod   const struct sparc_opcode_arch *p;
95*3d8817e4Smiod 
96*3d8817e4Smiod   for (p = &sparc_opcode_archs[0]; p->name; ++p)
97*3d8817e4Smiod     if (strcmp (name, p->name) == 0)
98*3d8817e4Smiod       return (enum sparc_opcode_arch_val) (p - &sparc_opcode_archs[0]);
99*3d8817e4Smiod 
100*3d8817e4Smiod   return SPARC_OPCODE_ARCH_BAD;
101*3d8817e4Smiod }
102*3d8817e4Smiod 
103*3d8817e4Smiod /* Branch condition field.  */
104*3d8817e4Smiod #define COND(x)		(((x) & 0xf) << 25)
105*3d8817e4Smiod 
106*3d8817e4Smiod /* v9: Move (MOVcc and FMOVcc) condition field.  */
107*3d8817e4Smiod #define MCOND(x,i_or_f)	((((i_or_f) & 1) << 18) | (((x) >> 11) & (0xf << 14))) /* v9 */
108*3d8817e4Smiod 
109*3d8817e4Smiod /* v9: Move register (MOVRcc and FMOVRcc) condition field.  */
110*3d8817e4Smiod #define RCOND(x)	(((x) & 0x7) << 10)	/* v9 */
111*3d8817e4Smiod 
112*3d8817e4Smiod #define CONDA	(COND (0x8))
113*3d8817e4Smiod #define CONDCC	(COND (0xd))
114*3d8817e4Smiod #define CONDCS	(COND (0x5))
115*3d8817e4Smiod #define CONDE	(COND (0x1))
116*3d8817e4Smiod #define CONDG	(COND (0xa))
117*3d8817e4Smiod #define CONDGE	(COND (0xb))
118*3d8817e4Smiod #define CONDGU	(COND (0xc))
119*3d8817e4Smiod #define CONDL	(COND (0x3))
120*3d8817e4Smiod #define CONDLE	(COND (0x2))
121*3d8817e4Smiod #define CONDLEU	(COND (0x4))
122*3d8817e4Smiod #define CONDN	(COND (0x0))
123*3d8817e4Smiod #define CONDNE	(COND (0x9))
124*3d8817e4Smiod #define CONDNEG	(COND (0x6))
125*3d8817e4Smiod #define CONDPOS	(COND (0xe))
126*3d8817e4Smiod #define CONDVC	(COND (0xf))
127*3d8817e4Smiod #define CONDVS	(COND (0x7))
128*3d8817e4Smiod 
129*3d8817e4Smiod #define CONDNZ	CONDNE
130*3d8817e4Smiod #define CONDZ	CONDE
131*3d8817e4Smiod #define CONDGEU	CONDCC
132*3d8817e4Smiod #define CONDLU	CONDCS
133*3d8817e4Smiod 
134*3d8817e4Smiod #define FCONDA		(COND (0x8))
135*3d8817e4Smiod #define FCONDE		(COND (0x9))
136*3d8817e4Smiod #define FCONDG		(COND (0x6))
137*3d8817e4Smiod #define FCONDGE		(COND (0xb))
138*3d8817e4Smiod #define FCONDL		(COND (0x4))
139*3d8817e4Smiod #define FCONDLE		(COND (0xd))
140*3d8817e4Smiod #define FCONDLG		(COND (0x2))
141*3d8817e4Smiod #define FCONDN		(COND (0x0))
142*3d8817e4Smiod #define FCONDNE		(COND (0x1))
143*3d8817e4Smiod #define FCONDO		(COND (0xf))
144*3d8817e4Smiod #define FCONDU		(COND (0x7))
145*3d8817e4Smiod #define FCONDUE		(COND (0xa))
146*3d8817e4Smiod #define FCONDUG		(COND (0x5))
147*3d8817e4Smiod #define FCONDUGE	(COND (0xc))
148*3d8817e4Smiod #define FCONDUL		(COND (0x3))
149*3d8817e4Smiod #define FCONDULE	(COND (0xe))
150*3d8817e4Smiod 
151*3d8817e4Smiod #define FCONDNZ	FCONDNE
152*3d8817e4Smiod #define FCONDZ	FCONDE
153*3d8817e4Smiod 
154*3d8817e4Smiod #define ICC 		(0)	/* v9 */
155*3d8817e4Smiod #define XCC 		(1 << 12) /* v9 */
156*3d8817e4Smiod #define FCC(x)		(((x) & 0x3) << 11) /* v9 */
157*3d8817e4Smiod #define FBFCC(x)	(((x) & 0x3) << 20)	/* v9 */
158*3d8817e4Smiod 
159*3d8817e4Smiod /* The order of the opcodes in the table is significant:
160*3d8817e4Smiod 
161*3d8817e4Smiod 	* The assembler requires that all instances of the same mnemonic must
162*3d8817e4Smiod 	be consecutive.	If they aren't, the assembler will bomb at runtime.
163*3d8817e4Smiod 
164*3d8817e4Smiod 	* The disassembler should not care about the order of the opcodes.  */
165*3d8817e4Smiod 
166*3d8817e4Smiod /* Entries for commutative arithmetic operations.  */
167*3d8817e4Smiod /* ??? More entries can make use of this.  */
168*3d8817e4Smiod #define COMMUTEOP(opcode, op3, arch_mask) \
169*3d8817e4Smiod { opcode,	F3(2, op3, 0), F3(~2, ~op3, ~0)|ASI(~0),	"1,2,d", 0, arch_mask }, \
170*3d8817e4Smiod { opcode,	F3(2, op3, 1), F3(~2, ~op3, ~1),		"1,i,d", 0, arch_mask }, \
171*3d8817e4Smiod { opcode,	F3(2, op3, 1), F3(~2, ~op3, ~1),		"i,1,d", 0, arch_mask }
172*3d8817e4Smiod 
173*3d8817e4Smiod const struct sparc_opcode sparc_opcodes[] = {
174*3d8817e4Smiod 
175*3d8817e4Smiod { "ld",	F3(3, 0x00, 0), F3(~3, ~0x00, ~0),		"[1+2],d", 0, v6 },
176*3d8817e4Smiod { "ld",	F3(3, 0x00, 0), F3(~3, ~0x00, ~0)|RS2_G0,	"[1],d", 0, v6 }, /* ld [rs1+%g0],d */
177*3d8817e4Smiod { "ld",	F3(3, 0x00, 1), F3(~3, ~0x00, ~1),		"[1+i],d", 0, v6 },
178*3d8817e4Smiod { "ld",	F3(3, 0x00, 1), F3(~3, ~0x00, ~1),		"[i+1],d", 0, v6 },
179*3d8817e4Smiod { "ld",	F3(3, 0x00, 1), F3(~3, ~0x00, ~1)|RS1_G0,	"[i],d", 0, v6 },
180*3d8817e4Smiod { "ld",	F3(3, 0x00, 1), F3(~3, ~0x00, ~1)|SIMM13(~0),	"[1],d", 0, v6 }, /* ld [rs1+0],d */
181*3d8817e4Smiod { "ld",	F3(3, 0x20, 0), F3(~3, ~0x20, ~0),		"[1+2],g", 0, v6 },
182*3d8817e4Smiod { "ld",	F3(3, 0x20, 0), F3(~3, ~0x20, ~0)|RS2_G0,	"[1],g", 0, v6 }, /* ld [rs1+%g0],d */
183*3d8817e4Smiod { "ld",	F3(3, 0x20, 1), F3(~3, ~0x20, ~1),		"[1+i],g", 0, v6 },
184*3d8817e4Smiod { "ld",	F3(3, 0x20, 1), F3(~3, ~0x20, ~1),		"[i+1],g", 0, v6 },
185*3d8817e4Smiod { "ld",	F3(3, 0x20, 1), F3(~3, ~0x20, ~1)|RS1_G0,	"[i],g", 0, v6 },
186*3d8817e4Smiod { "ld",	F3(3, 0x20, 1), F3(~3, ~0x20, ~1)|SIMM13(~0),	"[1],g", 0, v6 }, /* ld [rs1+0],d */
187*3d8817e4Smiod 
188*3d8817e4Smiod { "ld",	F3(3, 0x21, 0), F3(~3, ~0x21, ~0)|RD(~0),	"[1+2],F", 0, v6 },
189*3d8817e4Smiod { "ld",	F3(3, 0x21, 0), F3(~3, ~0x21, ~0)|RS2_G0|RD(~0),"[1],F", 0, v6 }, /* ld [rs1+%g0],d */
190*3d8817e4Smiod { "ld",	F3(3, 0x21, 1), F3(~3, ~0x21, ~1)|RD(~0),	"[1+i],F", 0, v6 },
191*3d8817e4Smiod { "ld",	F3(3, 0x21, 1), F3(~3, ~0x21, ~1)|RD(~0),	"[i+1],F", 0, v6 },
192*3d8817e4Smiod { "ld",	F3(3, 0x21, 1), F3(~3, ~0x21, ~1)|RS1_G0|RD(~0),"[i],F", 0, v6 },
193*3d8817e4Smiod { "ld",	F3(3, 0x21, 1), F3(~3, ~0x21, ~1)|SIMM13(~0)|RD(~0),"[1],F", 0, v6 }, /* ld [rs1+0],d */
194*3d8817e4Smiod 
195*3d8817e4Smiod { "ld",	F3(3, 0x30, 0), F3(~3, ~0x30, ~0),		"[1+2],D", 0, v6notv9 },
196*3d8817e4Smiod { "ld",	F3(3, 0x30, 0), F3(~3, ~0x30, ~0)|RS2_G0,	"[1],D", 0, v6notv9 }, /* ld [rs1+%g0],d */
197*3d8817e4Smiod { "ld",	F3(3, 0x30, 1), F3(~3, ~0x30, ~1),		"[1+i],D", 0, v6notv9 },
198*3d8817e4Smiod { "ld",	F3(3, 0x30, 1), F3(~3, ~0x30, ~1),		"[i+1],D", 0, v6notv9 },
199*3d8817e4Smiod { "ld",	F3(3, 0x30, 1), F3(~3, ~0x30, ~1)|RS1_G0,	"[i],D", 0, v6notv9 },
200*3d8817e4Smiod { "ld",	F3(3, 0x30, 1), F3(~3, ~0x30, ~1)|SIMM13(~0),	"[1],D", 0, v6notv9 }, /* ld [rs1+0],d */
201*3d8817e4Smiod { "ld",	F3(3, 0x31, 0), F3(~3, ~0x31, ~0),		"[1+2],C", 0, v6notv9 },
202*3d8817e4Smiod { "ld",	F3(3, 0x31, 0), F3(~3, ~0x31, ~0)|RS2_G0,	"[1],C", 0, v6notv9 }, /* ld [rs1+%g0],d */
203*3d8817e4Smiod { "ld",	F3(3, 0x31, 1), F3(~3, ~0x31, ~1),		"[1+i],C", 0, v6notv9 },
204*3d8817e4Smiod { "ld",	F3(3, 0x31, 1), F3(~3, ~0x31, ~1),		"[i+1],C", 0, v6notv9 },
205*3d8817e4Smiod { "ld",	F3(3, 0x31, 1), F3(~3, ~0x31, ~1)|RS1_G0,	"[i],C", 0, v6notv9 },
206*3d8817e4Smiod { "ld",	F3(3, 0x31, 1), F3(~3, ~0x31, ~1)|SIMM13(~0),	"[1],C", 0, v6notv9 }, /* ld [rs1+0],d */
207*3d8817e4Smiod 
208*3d8817e4Smiod /* The v9 LDUW is the same as the old 'ld' opcode, it is not the same as the
209*3d8817e4Smiod    'ld' pseudo-op in v9.  */
210*3d8817e4Smiod { "lduw",	F3(3, 0x00, 0), F3(~3, ~0x00, ~0),		"[1+2],d", F_ALIAS, v9 },
211*3d8817e4Smiod { "lduw",	F3(3, 0x00, 0), F3(~3, ~0x00, ~0)|RS2_G0,	"[1],d", F_ALIAS, v9 }, /* ld [rs1+%g0],d */
212*3d8817e4Smiod { "lduw",	F3(3, 0x00, 1), F3(~3, ~0x00, ~1),		"[1+i],d", F_ALIAS, v9 },
213*3d8817e4Smiod { "lduw",	F3(3, 0x00, 1), F3(~3, ~0x00, ~1),		"[i+1],d", F_ALIAS, v9 },
214*3d8817e4Smiod { "lduw",	F3(3, 0x00, 1), F3(~3, ~0x00, ~1)|RS1_G0,	"[i],d", F_ALIAS, v9 },
215*3d8817e4Smiod { "lduw",	F3(3, 0x00, 1), F3(~3, ~0x00, ~1)|SIMM13(~0),	"[1],d", F_ALIAS, v9 }, /* ld [rs1+0],d */
216*3d8817e4Smiod 
217*3d8817e4Smiod { "ldd",	F3(3, 0x03, 0), F3(~3, ~0x03, ~0)|ASI(~0),	"[1+2],d", 0, v6 },
218*3d8817e4Smiod { "ldd",	F3(3, 0x03, 0), F3(~3, ~0x03, ~0)|ASI_RS2(~0),	"[1],d", 0, v6 }, /* ldd [rs1+%g0],d */
219*3d8817e4Smiod { "ldd",	F3(3, 0x03, 1), F3(~3, ~0x03, ~1),		"[1+i],d", 0, v6 },
220*3d8817e4Smiod { "ldd",	F3(3, 0x03, 1), F3(~3, ~0x03, ~1),		"[i+1],d", 0, v6 },
221*3d8817e4Smiod { "ldd",	F3(3, 0x03, 1), F3(~3, ~0x03, ~1)|RS1_G0,	"[i],d", 0, v6 },
222*3d8817e4Smiod { "ldd",	F3(3, 0x03, 1), F3(~3, ~0x03, ~1)|SIMM13(~0),	"[1],d", 0, v6 }, /* ldd [rs1+0],d */
223*3d8817e4Smiod { "ldd",	F3(3, 0x23, 0), F3(~3, ~0x23, ~0)|ASI(~0),	"[1+2],H", 0, v6 },
224*3d8817e4Smiod { "ldd",	F3(3, 0x23, 0), F3(~3, ~0x23, ~0)|ASI_RS2(~0),	"[1],H", 0, v6 }, /* ldd [rs1+%g0],d */
225*3d8817e4Smiod { "ldd",	F3(3, 0x23, 1), F3(~3, ~0x23, ~1),		"[1+i],H", 0, v6 },
226*3d8817e4Smiod { "ldd",	F3(3, 0x23, 1), F3(~3, ~0x23, ~1),		"[i+1],H", 0, v6 },
227*3d8817e4Smiod { "ldd",	F3(3, 0x23, 1), F3(~3, ~0x23, ~1)|RS1_G0,	"[i],H", 0, v6 },
228*3d8817e4Smiod { "ldd",	F3(3, 0x23, 1), F3(~3, ~0x23, ~1)|SIMM13(~0),	"[1],H", 0, v6 }, /* ldd [rs1+0],d */
229*3d8817e4Smiod 
230*3d8817e4Smiod { "ldd",	F3(3, 0x33, 0), F3(~3, ~0x33, ~0)|ASI(~0),	"[1+2],D", 0, v6notv9 },
231*3d8817e4Smiod { "ldd",	F3(3, 0x33, 0), F3(~3, ~0x33, ~0)|ASI_RS2(~0),	"[1],D", 0, v6notv9 }, /* ldd [rs1+%g0],d */
232*3d8817e4Smiod { "ldd",	F3(3, 0x33, 1), F3(~3, ~0x33, ~1),		"[1+i],D", 0, v6notv9 },
233*3d8817e4Smiod { "ldd",	F3(3, 0x33, 1), F3(~3, ~0x33, ~1),		"[i+1],D", 0, v6notv9 },
234*3d8817e4Smiod { "ldd",	F3(3, 0x33, 1), F3(~3, ~0x33, ~1)|RS1_G0,	"[i],D", 0, v6notv9 },
235*3d8817e4Smiod { "ldd",	F3(3, 0x33, 1), F3(~3, ~0x33, ~1)|SIMM13(~0),	"[1],D", 0, v6notv9 }, /* ldd [rs1+0],d */
236*3d8817e4Smiod 
237*3d8817e4Smiod { "ldq",	F3(3, 0x22, 0), F3(~3, ~0x22, ~0)|ASI(~0),	"[1+2],J", 0, v9 },
238*3d8817e4Smiod { "ldq",	F3(3, 0x22, 0), F3(~3, ~0x22, ~0)|ASI_RS2(~0),	"[1],J", 0, v9 }, /* ldd [rs1+%g0],d */
239*3d8817e4Smiod { "ldq",	F3(3, 0x22, 1), F3(~3, ~0x22, ~1),		"[1+i],J", 0, v9 },
240*3d8817e4Smiod { "ldq",	F3(3, 0x22, 1), F3(~3, ~0x22, ~1),		"[i+1],J", 0, v9 },
241*3d8817e4Smiod { "ldq",	F3(3, 0x22, 1), F3(~3, ~0x22, ~1)|RS1_G0,	"[i],J", 0, v9 },
242*3d8817e4Smiod { "ldq",	F3(3, 0x22, 1), F3(~3, ~0x22, ~1)|SIMM13(~0),	"[1],J", 0, v9 }, /* ldd [rs1+0],d */
243*3d8817e4Smiod 
244*3d8817e4Smiod { "ldsb",	F3(3, 0x09, 0), F3(~3, ~0x09, ~0)|ASI(~0),	"[1+2],d", 0, v6 },
245*3d8817e4Smiod { "ldsb",	F3(3, 0x09, 0), F3(~3, ~0x09, ~0)|ASI_RS2(~0),	"[1],d", 0, v6 }, /* ldsb [rs1+%g0],d */
246*3d8817e4Smiod { "ldsb",	F3(3, 0x09, 1), F3(~3, ~0x09, ~1),		"[1+i],d", 0, v6 },
247*3d8817e4Smiod { "ldsb",	F3(3, 0x09, 1), F3(~3, ~0x09, ~1),		"[i+1],d", 0, v6 },
248*3d8817e4Smiod { "ldsb",	F3(3, 0x09, 1), F3(~3, ~0x09, ~1)|RS1_G0,	"[i],d", 0, v6 },
249*3d8817e4Smiod { "ldsb",	F3(3, 0x09, 1), F3(~3, ~0x09, ~1)|SIMM13(~0),	"[1],d", 0, v6 }, /* ldsb [rs1+0],d */
250*3d8817e4Smiod 
251*3d8817e4Smiod { "ldsh",	F3(3, 0x0a, 0), F3(~3, ~0x0a, ~0)|ASI_RS2(~0),	"[1],d", 0, v6 }, /* ldsh [rs1+%g0],d */
252*3d8817e4Smiod { "ldsh",	F3(3, 0x0a, 0), F3(~3, ~0x0a, ~0)|ASI(~0),	"[1+2],d", 0, v6 },
253*3d8817e4Smiod { "ldsh",	F3(3, 0x0a, 1), F3(~3, ~0x0a, ~1),		"[1+i],d", 0, v6 },
254*3d8817e4Smiod { "ldsh",	F3(3, 0x0a, 1), F3(~3, ~0x0a, ~1),		"[i+1],d", 0, v6 },
255*3d8817e4Smiod { "ldsh",	F3(3, 0x0a, 1), F3(~3, ~0x0a, ~1)|RS1_G0,	"[i],d", 0, v6 },
256*3d8817e4Smiod { "ldsh",	F3(3, 0x0a, 1), F3(~3, ~0x0a, ~1)|SIMM13(~0),	"[1],d", 0, v6 }, /* ldsh [rs1+0],d */
257*3d8817e4Smiod 
258*3d8817e4Smiod { "ldstub",	F3(3, 0x0d, 0), F3(~3, ~0x0d, ~0)|ASI(~0),	"[1+2],d", 0, v6 },
259*3d8817e4Smiod { "ldstub",	F3(3, 0x0d, 0), F3(~3, ~0x0d, ~0)|ASI_RS2(~0),	"[1],d", 0, v6 }, /* ldstub [rs1+%g0],d */
260*3d8817e4Smiod { "ldstub",	F3(3, 0x0d, 1), F3(~3, ~0x0d, ~1),		"[1+i],d", 0, v6 },
261*3d8817e4Smiod { "ldstub",	F3(3, 0x0d, 1), F3(~3, ~0x0d, ~1),		"[i+1],d", 0, v6 },
262*3d8817e4Smiod { "ldstub",	F3(3, 0x0d, 1), F3(~3, ~0x0d, ~1)|RS1_G0,	"[i],d", 0, v6 },
263*3d8817e4Smiod { "ldstub",	F3(3, 0x0d, 1), F3(~3, ~0x0d, ~1)|SIMM13(~0),	"[1],d", 0, v6 }, /* ldstub [rs1+0],d */
264*3d8817e4Smiod 
265*3d8817e4Smiod { "ldsw",	F3(3, 0x08, 0), F3(~3, ~0x08, ~0)|ASI(~0),	"[1+2],d", 0, v9 },
266*3d8817e4Smiod { "ldsw",	F3(3, 0x08, 0), F3(~3, ~0x08, ~0)|ASI_RS2(~0),	"[1],d", 0, v9 }, /* ldsw [rs1+%g0],d */
267*3d8817e4Smiod { "ldsw",	F3(3, 0x08, 1), F3(~3, ~0x08, ~1),		"[1+i],d", 0, v9 },
268*3d8817e4Smiod { "ldsw",	F3(3, 0x08, 1), F3(~3, ~0x08, ~1),		"[i+1],d", 0, v9 },
269*3d8817e4Smiod { "ldsw",	F3(3, 0x08, 1), F3(~3, ~0x08, ~1)|RS1_G0,	"[i],d", 0, v9 },
270*3d8817e4Smiod { "ldsw",	F3(3, 0x08, 1), F3(~3, ~0x08, ~1)|SIMM13(~0),	"[1],d", 0, v9 }, /* ldsw [rs1+0],d */
271*3d8817e4Smiod 
272*3d8817e4Smiod { "ldub",	F3(3, 0x01, 0), F3(~3, ~0x01, ~0)|ASI(~0),	"[1+2],d", 0, v6 },
273*3d8817e4Smiod { "ldub",	F3(3, 0x01, 0), F3(~3, ~0x01, ~0)|ASI_RS2(~0),	"[1],d", 0, v6 }, /* ldub [rs1+%g0],d */
274*3d8817e4Smiod { "ldub",	F3(3, 0x01, 1), F3(~3, ~0x01, ~1),		"[1+i],d", 0, v6 },
275*3d8817e4Smiod { "ldub",	F3(3, 0x01, 1), F3(~3, ~0x01, ~1),		"[i+1],d", 0, v6 },
276*3d8817e4Smiod { "ldub",	F3(3, 0x01, 1), F3(~3, ~0x01, ~1)|RS1_G0,	"[i],d", 0, v6 },
277*3d8817e4Smiod { "ldub",	F3(3, 0x01, 1), F3(~3, ~0x01, ~1)|SIMM13(~0),	"[1],d", 0, v6 }, /* ldub [rs1+0],d */
278*3d8817e4Smiod 
279*3d8817e4Smiod { "lduh",	F3(3, 0x02, 0), F3(~3, ~0x02, ~0)|ASI(~0),	"[1+2],d", 0, v6 },
280*3d8817e4Smiod { "lduh",	F3(3, 0x02, 0), F3(~3, ~0x02, ~0)|ASI_RS2(~0),	"[1],d", 0, v6 }, /* lduh [rs1+%g0],d */
281*3d8817e4Smiod { "lduh",	F3(3, 0x02, 1), F3(~3, ~0x02, ~1),		"[1+i],d", 0, v6 },
282*3d8817e4Smiod { "lduh",	F3(3, 0x02, 1), F3(~3, ~0x02, ~1),		"[i+1],d", 0, v6 },
283*3d8817e4Smiod { "lduh",	F3(3, 0x02, 1), F3(~3, ~0x02, ~1)|RS1_G0,	"[i],d", 0, v6 },
284*3d8817e4Smiod { "lduh",	F3(3, 0x02, 1), F3(~3, ~0x02, ~1)|SIMM13(~0),	"[1],d", 0, v6 }, /* lduh [rs1+0],d */
285*3d8817e4Smiod 
286*3d8817e4Smiod { "ldx",	F3(3, 0x0b, 0), F3(~3, ~0x0b, ~0)|ASI(~0),	"[1+2],d", 0, v9 },
287*3d8817e4Smiod { "ldx",	F3(3, 0x0b, 0), F3(~3, ~0x0b, ~0)|ASI_RS2(~0),	"[1],d", 0, v9 }, /* ldx [rs1+%g0],d */
288*3d8817e4Smiod { "ldx",	F3(3, 0x0b, 1), F3(~3, ~0x0b, ~1),		"[1+i],d", 0, v9 },
289*3d8817e4Smiod { "ldx",	F3(3, 0x0b, 1), F3(~3, ~0x0b, ~1),		"[i+1],d", 0, v9 },
290*3d8817e4Smiod { "ldx",	F3(3, 0x0b, 1), F3(~3, ~0x0b, ~1)|RS1_G0,	"[i],d", 0, v9 },
291*3d8817e4Smiod { "ldx",	F3(3, 0x0b, 1), F3(~3, ~0x0b, ~1)|SIMM13(~0),	"[1],d", 0, v9 }, /* ldx [rs1+0],d */
292*3d8817e4Smiod 
293*3d8817e4Smiod { "ldx",	F3(3, 0x21, 0)|RD(1), F3(~3, ~0x21, ~0)|RD(~1),	"[1+2],F", 0, v9 },
294*3d8817e4Smiod { "ldx",	F3(3, 0x21, 0)|RD(1), F3(~3, ~0x21, ~0)|RS2_G0|RD(~1),	"[1],F", 0, v9 }, /* ld [rs1+%g0],d */
295*3d8817e4Smiod { "ldx",	F3(3, 0x21, 1)|RD(1), F3(~3, ~0x21, ~1)|RD(~1),	"[1+i],F", 0, v9 },
296*3d8817e4Smiod { "ldx",	F3(3, 0x21, 1)|RD(1), F3(~3, ~0x21, ~1)|RD(~1),	"[i+1],F", 0, v9 },
297*3d8817e4Smiod { "ldx",	F3(3, 0x21, 1)|RD(1), F3(~3, ~0x21, ~1)|RS1_G0|RD(~1),	"[i],F", 0, v9 },
298*3d8817e4Smiod { "ldx",	F3(3, 0x21, 1)|RD(1), F3(~3, ~0x21, ~1)|SIMM13(~0)|RD(~1),"[1],F", 0, v9 }, /* ld [rs1+0],d */
299*3d8817e4Smiod 
300*3d8817e4Smiod { "lda",	F3(3, 0x10, 0), F3(~3, ~0x10, ~0),		"[1+2]A,d", 0, v6 },
301*3d8817e4Smiod { "lda",	F3(3, 0x10, 0), F3(~3, ~0x10, ~0)|RS2_G0,	"[1]A,d", 0, v6 }, /* lda [rs1+%g0],d */
302*3d8817e4Smiod { "lda",	F3(3, 0x10, 1), F3(~3, ~0x10, ~1),		"[1+i]o,d", 0, v9 },
303*3d8817e4Smiod { "lda",	F3(3, 0x10, 1), F3(~3, ~0x10, ~1),		"[i+1]o,d", 0, v9 },
304*3d8817e4Smiod { "lda",	F3(3, 0x10, 1), F3(~3, ~0x10, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
305*3d8817e4Smiod { "lda",	F3(3, 0x10, 1), F3(~3, ~0x10, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* ld [rs1+0],d */
306*3d8817e4Smiod { "lda",	F3(3, 0x30, 0), F3(~3, ~0x30, ~0),		"[1+2]A,g", 0, v9 },
307*3d8817e4Smiod { "lda",	F3(3, 0x30, 0), F3(~3, ~0x30, ~0)|RS2_G0,	"[1]A,g", 0, v9 }, /* lda [rs1+%g0],d */
308*3d8817e4Smiod { "lda",	F3(3, 0x30, 1), F3(~3, ~0x30, ~1),		"[1+i]o,g", 0, v9 },
309*3d8817e4Smiod { "lda",	F3(3, 0x30, 1), F3(~3, ~0x30, ~1),		"[i+1]o,g", 0, v9 },
310*3d8817e4Smiod { "lda",	F3(3, 0x30, 1), F3(~3, ~0x30, ~1)|RS1_G0,	"[i]o,g", 0, v9 },
311*3d8817e4Smiod { "lda",	F3(3, 0x30, 1), F3(~3, ~0x30, ~1)|SIMM13(~0),	"[1]o,g", 0, v9 }, /* ld [rs1+0],d */
312*3d8817e4Smiod 
313*3d8817e4Smiod { "ldda",	F3(3, 0x13, 0), F3(~3, ~0x13, ~0),		"[1+2]A,d", 0, v6 },
314*3d8817e4Smiod { "ldda",	F3(3, 0x13, 0), F3(~3, ~0x13, ~0)|RS2_G0,	"[1]A,d", 0, v6 }, /* ldda [rs1+%g0],d */
315*3d8817e4Smiod { "ldda",	F3(3, 0x13, 1), F3(~3, ~0x13, ~1),		"[1+i]o,d", 0, v9 },
316*3d8817e4Smiod { "ldda",	F3(3, 0x13, 1), F3(~3, ~0x13, ~1),		"[i+1]o,d", 0, v9 },
317*3d8817e4Smiod { "ldda",	F3(3, 0x13, 1), F3(~3, ~0x13, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
318*3d8817e4Smiod { "ldda",	F3(3, 0x13, 1), F3(~3, ~0x13, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* ld [rs1+0],d */
319*3d8817e4Smiod 
320*3d8817e4Smiod { "ldda",	F3(3, 0x33, 0), F3(~3, ~0x33, ~0),		"[1+2]A,H", 0, v9 },
321*3d8817e4Smiod { "ldda",	F3(3, 0x33, 0), F3(~3, ~0x33, ~0)|RS2_G0,	"[1]A,H", 0, v9 }, /* ldda [rs1+%g0],d */
322*3d8817e4Smiod { "ldda",	F3(3, 0x33, 1), F3(~3, ~0x33, ~1),		"[1+i]o,H", 0, v9 },
323*3d8817e4Smiod { "ldda",	F3(3, 0x33, 1), F3(~3, ~0x33, ~1),		"[i+1]o,H", 0, v9 },
324*3d8817e4Smiod { "ldda",	F3(3, 0x33, 1), F3(~3, ~0x33, ~1)|RS1_G0,	"[i]o,H", 0, v9 },
325*3d8817e4Smiod { "ldda",	F3(3, 0x33, 1), F3(~3, ~0x33, ~1)|SIMM13(~0),	"[1]o,H", 0, v9 }, /* ld [rs1+0],d */
326*3d8817e4Smiod 
327*3d8817e4Smiod { "ldqa",	F3(3, 0x32, 0), F3(~3, ~0x32, ~0),		"[1+2]A,J", 0, v9 },
328*3d8817e4Smiod { "ldqa",	F3(3, 0x32, 0), F3(~3, ~0x32, ~0)|RS2_G0,	"[1]A,J", 0, v9 }, /* ldd [rs1+%g0],d */
329*3d8817e4Smiod { "ldqa",	F3(3, 0x32, 1), F3(~3, ~0x32, ~1),		"[1+i]o,J", 0, v9 },
330*3d8817e4Smiod { "ldqa",	F3(3, 0x32, 1), F3(~3, ~0x32, ~1),		"[i+1]o,J", 0, v9 },
331*3d8817e4Smiod { "ldqa",	F3(3, 0x32, 1), F3(~3, ~0x32, ~1)|RS1_G0,	"[i]o,J", 0, v9 },
332*3d8817e4Smiod { "ldqa",	F3(3, 0x32, 1), F3(~3, ~0x32, ~1)|SIMM13(~0),	"[1]o,J", 0, v9 }, /* ldd [rs1+0],d */
333*3d8817e4Smiod 
334*3d8817e4Smiod { "ldsba",	F3(3, 0x19, 0), F3(~3, ~0x19, ~0),		"[1+2]A,d", 0, v6 },
335*3d8817e4Smiod { "ldsba",	F3(3, 0x19, 0), F3(~3, ~0x19, ~0)|RS2_G0,	"[1]A,d", 0, v6 }, /* ldsba [rs1+%g0],d */
336*3d8817e4Smiod { "ldsba",	F3(3, 0x19, 1), F3(~3, ~0x19, ~1),		"[1+i]o,d", 0, v9 },
337*3d8817e4Smiod { "ldsba",	F3(3, 0x19, 1), F3(~3, ~0x19, ~1),		"[i+1]o,d", 0, v9 },
338*3d8817e4Smiod { "ldsba",	F3(3, 0x19, 1), F3(~3, ~0x19, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
339*3d8817e4Smiod { "ldsba",	F3(3, 0x19, 1), F3(~3, ~0x19, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* ld [rs1+0],d */
340*3d8817e4Smiod 
341*3d8817e4Smiod { "ldsha",	F3(3, 0x1a, 0), F3(~3, ~0x1a, ~0),		"[1+2]A,d", 0, v6 },
342*3d8817e4Smiod { "ldsha",	F3(3, 0x1a, 0), F3(~3, ~0x1a, ~0)|RS2_G0,	"[1]A,d", 0, v6 }, /* ldsha [rs1+%g0],d */
343*3d8817e4Smiod { "ldsha",	F3(3, 0x1a, 1), F3(~3, ~0x1a, ~1),		"[1+i]o,d", 0, v9 },
344*3d8817e4Smiod { "ldsha",	F3(3, 0x1a, 1), F3(~3, ~0x1a, ~1),		"[i+1]o,d", 0, v9 },
345*3d8817e4Smiod { "ldsha",	F3(3, 0x1a, 1), F3(~3, ~0x1a, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
346*3d8817e4Smiod { "ldsha",	F3(3, 0x1a, 1), F3(~3, ~0x1a, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* ld [rs1+0],d */
347*3d8817e4Smiod 
348*3d8817e4Smiod { "ldstuba",	F3(3, 0x1d, 0), F3(~3, ~0x1d, ~0),		"[1+2]A,d", 0, v6 },
349*3d8817e4Smiod { "ldstuba",	F3(3, 0x1d, 0), F3(~3, ~0x1d, ~0)|RS2_G0,	"[1]A,d", 0, v6 }, /* ldstuba [rs1+%g0],d */
350*3d8817e4Smiod { "ldstuba",	F3(3, 0x1d, 1), F3(~3, ~0x1d, ~1),		"[1+i]o,d", 0, v9 },
351*3d8817e4Smiod { "ldstuba",	F3(3, 0x1d, 1), F3(~3, ~0x1d, ~1),		"[i+1]o,d", 0, v9 },
352*3d8817e4Smiod { "ldstuba",	F3(3, 0x1d, 1), F3(~3, ~0x1d, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
353*3d8817e4Smiod { "ldstuba",	F3(3, 0x1d, 1), F3(~3, ~0x1d, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* ld [rs1+0],d */
354*3d8817e4Smiod 
355*3d8817e4Smiod { "ldswa",	F3(3, 0x18, 0), F3(~3, ~0x18, ~0),		"[1+2]A,d", 0, v9 },
356*3d8817e4Smiod { "ldswa",	F3(3, 0x18, 0), F3(~3, ~0x18, ~0)|RS2_G0,	"[1]A,d", 0, v9 }, /* lda [rs1+%g0],d */
357*3d8817e4Smiod { "ldswa",	F3(3, 0x18, 1), F3(~3, ~0x18, ~1),		"[1+i]o,d", 0, v9 },
358*3d8817e4Smiod { "ldswa",	F3(3, 0x18, 1), F3(~3, ~0x18, ~1),		"[i+1]o,d", 0, v9 },
359*3d8817e4Smiod { "ldswa",	F3(3, 0x18, 1), F3(~3, ~0x18, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
360*3d8817e4Smiod { "ldswa",	F3(3, 0x18, 1), F3(~3, ~0x18, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* ld [rs1+0],d */
361*3d8817e4Smiod 
362*3d8817e4Smiod { "lduba",	F3(3, 0x11, 0), F3(~3, ~0x11, ~0),		"[1+2]A,d", 0, v6 },
363*3d8817e4Smiod { "lduba",	F3(3, 0x11, 0), F3(~3, ~0x11, ~0)|RS2_G0,	"[1]A,d", 0, v6 }, /* lduba [rs1+%g0],d */
364*3d8817e4Smiod { "lduba",	F3(3, 0x11, 1), F3(~3, ~0x11, ~1),		"[1+i]o,d", 0, v9 },
365*3d8817e4Smiod { "lduba",	F3(3, 0x11, 1), F3(~3, ~0x11, ~1),		"[i+1]o,d", 0, v9 },
366*3d8817e4Smiod { "lduba",	F3(3, 0x11, 1), F3(~3, ~0x11, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
367*3d8817e4Smiod { "lduba",	F3(3, 0x11, 1), F3(~3, ~0x11, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* ld [rs1+0],d */
368*3d8817e4Smiod 
369*3d8817e4Smiod { "lduha",	F3(3, 0x12, 0), F3(~3, ~0x12, ~0),		"[1+2]A,d", 0, v6 },
370*3d8817e4Smiod { "lduha",	F3(3, 0x12, 0), F3(~3, ~0x12, ~0)|RS2_G0,	"[1]A,d", 0, v6 }, /* lduha [rs1+%g0],d */
371*3d8817e4Smiod { "lduha",	F3(3, 0x12, 1), F3(~3, ~0x12, ~1),		"[1+i]o,d", 0, v9 },
372*3d8817e4Smiod { "lduha",	F3(3, 0x12, 1), F3(~3, ~0x12, ~1),		"[i+1]o,d", 0, v9 },
373*3d8817e4Smiod { "lduha",	F3(3, 0x12, 1), F3(~3, ~0x12, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
374*3d8817e4Smiod { "lduha",	F3(3, 0x12, 1), F3(~3, ~0x12, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* ld [rs1+0],d */
375*3d8817e4Smiod 
376*3d8817e4Smiod { "lduwa",	F3(3, 0x10, 0), F3(~3, ~0x10, ~0),		"[1+2]A,d", F_ALIAS, v9 }, /* lduwa === lda */
377*3d8817e4Smiod { "lduwa",	F3(3, 0x10, 0), F3(~3, ~0x10, ~0)|RS2_G0,	"[1]A,d", F_ALIAS, v9 }, /* lda [rs1+%g0],d */
378*3d8817e4Smiod { "lduwa",	F3(3, 0x10, 1), F3(~3, ~0x10, ~1),		"[1+i]o,d", F_ALIAS, v9 },
379*3d8817e4Smiod { "lduwa",	F3(3, 0x10, 1), F3(~3, ~0x10, ~1),		"[i+1]o,d", F_ALIAS, v9 },
380*3d8817e4Smiod { "lduwa",	F3(3, 0x10, 1), F3(~3, ~0x10, ~1)|RS1_G0,	"[i]o,d", F_ALIAS, v9 },
381*3d8817e4Smiod { "lduwa",	F3(3, 0x10, 1), F3(~3, ~0x10, ~1)|SIMM13(~0),	"[1]o,d", F_ALIAS, v9 }, /* ld [rs1+0],d */
382*3d8817e4Smiod 
383*3d8817e4Smiod { "ldxa",	F3(3, 0x1b, 0), F3(~3, ~0x1b, ~0),		"[1+2]A,d", 0, v9 },
384*3d8817e4Smiod { "ldxa",	F3(3, 0x1b, 0), F3(~3, ~0x1b, ~0)|RS2_G0,	"[1]A,d", 0, v9 }, /* lda [rs1+%g0],d */
385*3d8817e4Smiod { "ldxa",	F3(3, 0x1b, 1), F3(~3, ~0x1b, ~1),		"[1+i]o,d", 0, v9 },
386*3d8817e4Smiod { "ldxa",	F3(3, 0x1b, 1), F3(~3, ~0x1b, ~1),		"[i+1]o,d", 0, v9 },
387*3d8817e4Smiod { "ldxa",	F3(3, 0x1b, 1), F3(~3, ~0x1b, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
388*3d8817e4Smiod { "ldxa",	F3(3, 0x1b, 1), F3(~3, ~0x1b, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* ld [rs1+0],d */
389*3d8817e4Smiod 
390*3d8817e4Smiod { "st",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI(~0),		"d,[1+2]", 0, v6 },
391*3d8817e4Smiod { "st",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI_RS2(~0),		"d,[1]", 0, v6 }, /* st d,[rs1+%g0] */
392*3d8817e4Smiod { "st",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),			"d,[1+i]", 0, v6 },
393*3d8817e4Smiod { "st",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),			"d,[i+1]", 0, v6 },
394*3d8817e4Smiod { "st",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RS1_G0,		"d,[i]", 0, v6 },
395*3d8817e4Smiod { "st",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|SIMM13(~0),		"d,[1]", 0, v6 }, /* st d,[rs1+0] */
396*3d8817e4Smiod { "st",	F3(3, 0x24, 0), F3(~3, ~0x24, ~0)|ASI(~0),		"g,[1+2]", 0, v6 },
397*3d8817e4Smiod { "st",	F3(3, 0x24, 0), F3(~3, ~0x24, ~0)|ASI_RS2(~0),		"g,[1]", 0, v6 }, /* st d[rs1+%g0] */
398*3d8817e4Smiod { "st",	F3(3, 0x24, 1), F3(~3, ~0x24, ~1),			"g,[1+i]", 0, v6 },
399*3d8817e4Smiod { "st",	F3(3, 0x24, 1), F3(~3, ~0x24, ~1),			"g,[i+1]", 0, v6 },
400*3d8817e4Smiod { "st",	F3(3, 0x24, 1), F3(~3, ~0x24, ~1)|RS1_G0,		"g,[i]", 0, v6 },
401*3d8817e4Smiod { "st",	F3(3, 0x24, 1), F3(~3, ~0x24, ~1)|SIMM13(~0),		"g,[1]", 0, v6 }, /* st d,[rs1+0] */
402*3d8817e4Smiod 
403*3d8817e4Smiod { "st",	F3(3, 0x34, 0), F3(~3, ~0x34, ~0)|ASI(~0),		"D,[1+2]", 0, v6notv9 },
404*3d8817e4Smiod { "st",	F3(3, 0x34, 0), F3(~3, ~0x34, ~0)|ASI_RS2(~0),		"D,[1]", 0, v6notv9 }, /* st d,[rs1+%g0] */
405*3d8817e4Smiod { "st",	F3(3, 0x34, 1), F3(~3, ~0x34, ~1),			"D,[1+i]", 0, v6notv9 },
406*3d8817e4Smiod { "st",	F3(3, 0x34, 1), F3(~3, ~0x34, ~1),			"D,[i+1]", 0, v6notv9 },
407*3d8817e4Smiod { "st",	F3(3, 0x34, 1), F3(~3, ~0x34, ~1)|RS1_G0,		"D,[i]", 0, v6notv9 },
408*3d8817e4Smiod { "st",	F3(3, 0x34, 1), F3(~3, ~0x34, ~1)|SIMM13(~0),		"D,[1]", 0, v6notv9 }, /* st d,[rs1+0] */
409*3d8817e4Smiod { "st",	F3(3, 0x35, 0), F3(~3, ~0x35, ~0)|ASI(~0),		"C,[1+2]", 0, v6notv9 },
410*3d8817e4Smiod { "st",	F3(3, 0x35, 0), F3(~3, ~0x35, ~0)|ASI_RS2(~0),		"C,[1]", 0, v6notv9 }, /* st d,[rs1+%g0] */
411*3d8817e4Smiod { "st",	F3(3, 0x35, 1), F3(~3, ~0x35, ~1),			"C,[1+i]", 0, v6notv9 },
412*3d8817e4Smiod { "st",	F3(3, 0x35, 1), F3(~3, ~0x35, ~1),			"C,[i+1]", 0, v6notv9 },
413*3d8817e4Smiod { "st",	F3(3, 0x35, 1), F3(~3, ~0x35, ~1)|RS1_G0,		"C,[i]", 0, v6notv9 },
414*3d8817e4Smiod { "st",	F3(3, 0x35, 1), F3(~3, ~0x35, ~1)|SIMM13(~0),		"C,[1]", 0, v6notv9 }, /* st d,[rs1+0] */
415*3d8817e4Smiod 
416*3d8817e4Smiod { "st",	F3(3, 0x25, 0), F3(~3, ~0x25, ~0)|RD_G0|ASI(~0),	"F,[1+2]", 0, v6 },
417*3d8817e4Smiod { "st",	F3(3, 0x25, 0), F3(~3, ~0x25, ~0)|RD_G0|ASI_RS2(~0),	"F,[1]", 0, v6 }, /* st d,[rs1+%g0] */
418*3d8817e4Smiod { "st",	F3(3, 0x25, 1), F3(~3, ~0x25, ~1)|RD_G0,		"F,[1+i]", 0, v6 },
419*3d8817e4Smiod { "st",	F3(3, 0x25, 1), F3(~3, ~0x25, ~1)|RD_G0,		"F,[i+1]", 0, v6 },
420*3d8817e4Smiod { "st",	F3(3, 0x25, 1), F3(~3, ~0x25, ~1)|RD_G0|RS1_G0,		"F,[i]", 0, v6 },
421*3d8817e4Smiod { "st",	F3(3, 0x25, 1), F3(~3, ~0x25, ~1)|RD_G0|SIMM13(~0),	"F,[1]", 0, v6 }, /* st d,[rs1+0] */
422*3d8817e4Smiod 
423*3d8817e4Smiod { "stw",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI(~0),	"d,[1+2]", F_ALIAS, v9 },
424*3d8817e4Smiod { "stw",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI_RS2(~0),	"d,[1]", F_ALIAS, v9 }, /* st d,[rs1+%g0] */
425*3d8817e4Smiod { "stw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),		"d,[1+i]", F_ALIAS, v9 },
426*3d8817e4Smiod { "stw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),		"d,[i+1]", F_ALIAS, v9 },
427*3d8817e4Smiod { "stw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RS1_G0,	"d,[i]", F_ALIAS, v9 },
428*3d8817e4Smiod { "stw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|SIMM13(~0),	"d,[1]", F_ALIAS, v9 }, /* st d,[rs1+0] */
429*3d8817e4Smiod { "stsw",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI(~0),	"d,[1+2]", F_ALIAS, v9 },
430*3d8817e4Smiod { "stsw",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI_RS2(~0),	"d,[1]", F_ALIAS, v9 }, /* st d,[rs1+%g0] */
431*3d8817e4Smiod { "stsw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),		"d,[1+i]", F_ALIAS, v9 },
432*3d8817e4Smiod { "stsw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),		"d,[i+1]", F_ALIAS, v9 },
433*3d8817e4Smiod { "stsw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RS1_G0,	"d,[i]", F_ALIAS, v9 },
434*3d8817e4Smiod { "stsw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|SIMM13(~0),	"d,[1]", F_ALIAS, v9 }, /* st d,[rs1+0] */
435*3d8817e4Smiod { "stuw",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI(~0),	"d,[1+2]", F_ALIAS, v9 },
436*3d8817e4Smiod { "stuw",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI_RS2(~0),	"d,[1]", F_ALIAS, v9 }, /* st d,[rs1+%g0] */
437*3d8817e4Smiod { "stuw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),		"d,[1+i]", F_ALIAS, v9 },
438*3d8817e4Smiod { "stuw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),		"d,[i+1]", F_ALIAS, v9 },
439*3d8817e4Smiod { "stuw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RS1_G0,	"d,[i]", F_ALIAS, v9 },
440*3d8817e4Smiod { "stuw",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|SIMM13(~0),	"d,[1]", F_ALIAS, v9 }, /* st d,[rs1+0] */
441*3d8817e4Smiod 
442*3d8817e4Smiod { "spill",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI(~0),	"d,[1+2]", F_ALIAS, v6 },
443*3d8817e4Smiod { "spill",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|ASI_RS2(~0),	"d,[1]", F_ALIAS, v6 }, /* st d,[rs1+%g0] */
444*3d8817e4Smiod { "spill",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),		"d,[1+i]", F_ALIAS, v6 },
445*3d8817e4Smiod { "spill",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1),		"d,[i+1]", F_ALIAS, v6 },
446*3d8817e4Smiod { "spill",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RS1_G0,	"d,[i]", F_ALIAS, v6 },
447*3d8817e4Smiod { "spill",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|SIMM13(~0),	"d,[1]", F_ALIAS, v6 }, /* st d,[rs1+0] */
448*3d8817e4Smiod 
449*3d8817e4Smiod { "sta",	F3(3, 0x14, 0), F3(~3, ~0x14, ~0),		"d,[1+2]A", 0, v6 },
450*3d8817e4Smiod { "sta",	F3(3, 0x14, 0), F3(~3, ~0x14, ~0)|RS2(~0),	"d,[1]A", 0, v6 }, /* sta d,[rs1+%g0] */
451*3d8817e4Smiod { "sta",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1),		"d,[1+i]o", 0, v9 },
452*3d8817e4Smiod { "sta",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1),		"d,[i+1]o", 0, v9 },
453*3d8817e4Smiod { "sta",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|RS1_G0,	"d,[i]o", 0, v9 },
454*3d8817e4Smiod { "sta",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|SIMM13(~0),	"d,[1]o", 0, v9 }, /* st d,[rs1+0] */
455*3d8817e4Smiod 
456*3d8817e4Smiod { "sta",	F3(3, 0x34, 0), F3(~3, ~0x34, ~0),		"g,[1+2]A", 0, v9 },
457*3d8817e4Smiod { "sta",	F3(3, 0x34, 0), F3(~3, ~0x34, ~0)|RS2(~0),	"g,[1]A", 0, v9 }, /* sta d,[rs1+%g0] */
458*3d8817e4Smiod { "sta",	F3(3, 0x34, 1), F3(~3, ~0x34, ~1),		"g,[1+i]o", 0, v9 },
459*3d8817e4Smiod { "sta",	F3(3, 0x34, 1), F3(~3, ~0x34, ~1),		"g,[i+1]o", 0, v9 },
460*3d8817e4Smiod { "sta",	F3(3, 0x34, 1), F3(~3, ~0x34, ~1)|RS1_G0,	"g,[i]o", 0, v9 },
461*3d8817e4Smiod { "sta",	F3(3, 0x34, 1), F3(~3, ~0x34, ~1)|SIMM13(~0),	"g,[1]o", 0, v9 }, /* st d,[rs1+0] */
462*3d8817e4Smiod 
463*3d8817e4Smiod { "stwa",	F3(3, 0x14, 0), F3(~3, ~0x14, ~0),		"d,[1+2]A", F_ALIAS, v9 },
464*3d8817e4Smiod { "stwa",	F3(3, 0x14, 0), F3(~3, ~0x14, ~0)|RS2(~0),	"d,[1]A", F_ALIAS, v9 }, /* sta d,[rs1+%g0] */
465*3d8817e4Smiod { "stwa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1),		"d,[1+i]o", F_ALIAS, v9 },
466*3d8817e4Smiod { "stwa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1),		"d,[i+1]o", F_ALIAS, v9 },
467*3d8817e4Smiod { "stwa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|RS1_G0,	"d,[i]o", F_ALIAS, v9 },
468*3d8817e4Smiod { "stwa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|SIMM13(~0),	"d,[1]o", F_ALIAS, v9 }, /* st d,[rs1+0] */
469*3d8817e4Smiod { "stswa",	F3(3, 0x14, 0), F3(~3, ~0x14, ~0),		"d,[1+2]A", F_ALIAS, v9 },
470*3d8817e4Smiod { "stswa",	F3(3, 0x14, 0), F3(~3, ~0x14, ~0)|RS2(~0),	"d,[1]A", F_ALIAS, v9 }, /* sta d,[rs1+%g0] */
471*3d8817e4Smiod { "stswa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1),		"d,[1+i]o", F_ALIAS, v9 },
472*3d8817e4Smiod { "stswa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1),		"d,[i+1]o", F_ALIAS, v9 },
473*3d8817e4Smiod { "stswa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|RS1_G0,	"d,[i]o", F_ALIAS, v9 },
474*3d8817e4Smiod { "stswa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|SIMM13(~0),	"d,[1]o", F_ALIAS, v9 }, /* st d,[rs1+0] */
475*3d8817e4Smiod { "stuwa",	F3(3, 0x14, 0), F3(~3, ~0x14, ~0),		"d,[1+2]A", F_ALIAS, v9 },
476*3d8817e4Smiod { "stuwa",	F3(3, 0x14, 0), F3(~3, ~0x14, ~0)|RS2(~0),	"d,[1]A", F_ALIAS, v9 }, /* sta d,[rs1+%g0] */
477*3d8817e4Smiod { "stuwa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1),		"d,[1+i]o", F_ALIAS, v9 },
478*3d8817e4Smiod { "stuwa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1),		"d,[i+1]o", F_ALIAS, v9 },
479*3d8817e4Smiod { "stuwa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|RS1_G0,	"d,[i]o", F_ALIAS, v9 },
480*3d8817e4Smiod { "stuwa",	F3(3, 0x14, 1), F3(~3, ~0x14, ~1)|SIMM13(~0),	"d,[1]o", F_ALIAS, v9 }, /* st d,[rs1+0] */
481*3d8817e4Smiod 
482*3d8817e4Smiod { "stb",	F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI(~0),	"d,[1+2]", 0, v6 },
483*3d8817e4Smiod { "stb",	F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI_RS2(~0),	"d,[1]", 0, v6 }, /* stb d,[rs1+%g0] */
484*3d8817e4Smiod { "stb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1),		"d,[1+i]", 0, v6 },
485*3d8817e4Smiod { "stb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1),		"d,[i+1]", 0, v6 },
486*3d8817e4Smiod { "stb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RS1_G0,	"d,[i]", 0, v6 },
487*3d8817e4Smiod { "stb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|SIMM13(~0),	"d,[1]", 0, v6 }, /* stb d,[rs1+0] */
488*3d8817e4Smiod 
489*3d8817e4Smiod { "stsb",	F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI(~0),	"d,[1+2]", F_ALIAS, v6 },
490*3d8817e4Smiod { "stsb",	F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI_RS2(~0),	"d,[1]", F_ALIAS, v6 }, /* stb d,[rs1+%g0] */
491*3d8817e4Smiod { "stsb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1),		"d,[1+i]", F_ALIAS, v6 },
492*3d8817e4Smiod { "stsb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1),		"d,[i+1]", F_ALIAS, v6 },
493*3d8817e4Smiod { "stsb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RS1_G0,	"d,[i]", F_ALIAS, v6 },
494*3d8817e4Smiod { "stsb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|SIMM13(~0),	"d,[1]", F_ALIAS, v6 }, /* stb d,[rs1+0] */
495*3d8817e4Smiod { "stub",	F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI(~0),	"d,[1+2]", F_ALIAS, v6 },
496*3d8817e4Smiod { "stub",	F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|ASI_RS2(~0),	"d,[1]", F_ALIAS, v6 }, /* stb d,[rs1+%g0] */
497*3d8817e4Smiod { "stub",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1),		"d,[1+i]", F_ALIAS, v6 },
498*3d8817e4Smiod { "stub",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1),		"d,[i+1]", F_ALIAS, v6 },
499*3d8817e4Smiod { "stub",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RS1_G0,	"d,[i]", F_ALIAS, v6 },
500*3d8817e4Smiod { "stub",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|SIMM13(~0),	"d,[1]", F_ALIAS, v6 }, /* stb d,[rs1+0] */
501*3d8817e4Smiod 
502*3d8817e4Smiod { "stba",	F3(3, 0x15, 0), F3(~3, ~0x15, ~0),		"d,[1+2]A", 0, v6 },
503*3d8817e4Smiod { "stba",	F3(3, 0x15, 0), F3(~3, ~0x15, ~0)|RS2(~0),	"d,[1]A", 0, v6 }, /* stba d,[rs1+%g0] */
504*3d8817e4Smiod { "stba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1),		"d,[1+i]o", 0, v9 },
505*3d8817e4Smiod { "stba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1),		"d,[i+1]o", 0, v9 },
506*3d8817e4Smiod { "stba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|RS1_G0,	"d,[i]o", 0, v9 },
507*3d8817e4Smiod { "stba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|SIMM13(~0),	"d,[1]o", 0, v9 }, /* stb d,[rs1+0] */
508*3d8817e4Smiod 
509*3d8817e4Smiod { "stsba",	F3(3, 0x15, 0), F3(~3, ~0x15, ~0),		"d,[1+2]A", F_ALIAS, v6 },
510*3d8817e4Smiod { "stsba",	F3(3, 0x15, 0), F3(~3, ~0x15, ~0)|RS2(~0),	"d,[1]A", F_ALIAS, v6 }, /* stba d,[rs1+%g0] */
511*3d8817e4Smiod { "stsba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1),		"d,[1+i]o", F_ALIAS, v9 },
512*3d8817e4Smiod { "stsba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1),		"d,[i+1]o", F_ALIAS, v9 },
513*3d8817e4Smiod { "stsba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|RS1_G0,	"d,[i]o", F_ALIAS, v9 },
514*3d8817e4Smiod { "stsba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|SIMM13(~0),	"d,[1]o", F_ALIAS, v9 }, /* stb d,[rs1+0] */
515*3d8817e4Smiod { "stuba",	F3(3, 0x15, 0), F3(~3, ~0x15, ~0),		"d,[1+2]A", F_ALIAS, v6 },
516*3d8817e4Smiod { "stuba",	F3(3, 0x15, 0), F3(~3, ~0x15, ~0)|RS2(~0),	"d,[1]A", F_ALIAS, v6 }, /* stba d,[rs1+%g0] */
517*3d8817e4Smiod { "stuba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1),		"d,[1+i]o", F_ALIAS, v9 },
518*3d8817e4Smiod { "stuba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1),		"d,[i+1]o", F_ALIAS, v9 },
519*3d8817e4Smiod { "stuba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|RS1_G0,	"d,[i]o", F_ALIAS, v9 },
520*3d8817e4Smiod { "stuba",	F3(3, 0x15, 1), F3(~3, ~0x15, ~1)|SIMM13(~0),	"d,[1]o", F_ALIAS, v9 }, /* stb d,[rs1+0] */
521*3d8817e4Smiod 
522*3d8817e4Smiod { "std",	F3(3, 0x07, 0), F3(~3, ~0x07, ~0)|ASI(~0),	"d,[1+2]", 0, v6 },
523*3d8817e4Smiod { "std",	F3(3, 0x07, 0), F3(~3, ~0x07, ~0)|ASI_RS2(~0),	"d,[1]", 0, v6 }, /* std d,[rs1+%g0] */
524*3d8817e4Smiod { "std",	F3(3, 0x07, 1), F3(~3, ~0x07, ~1),		"d,[1+i]", 0, v6 },
525*3d8817e4Smiod { "std",	F3(3, 0x07, 1), F3(~3, ~0x07, ~1),		"d,[i+1]", 0, v6 },
526*3d8817e4Smiod { "std",	F3(3, 0x07, 1), F3(~3, ~0x07, ~1)|RS1_G0,	"d,[i]", 0, v6 },
527*3d8817e4Smiod { "std",	F3(3, 0x07, 1), F3(~3, ~0x07, ~1)|SIMM13(~0),	"d,[1]", 0, v6 }, /* std d,[rs1+0] */
528*3d8817e4Smiod 
529*3d8817e4Smiod { "std",	F3(3, 0x26, 0), F3(~3, ~0x26, ~0)|ASI(~0),	"q,[1+2]", 0, v6notv9 },
530*3d8817e4Smiod { "std",	F3(3, 0x26, 0), F3(~3, ~0x26, ~0)|ASI_RS2(~0),	"q,[1]", 0, v6notv9 }, /* std d,[rs1+%g0] */
531*3d8817e4Smiod { "std",	F3(3, 0x26, 1), F3(~3, ~0x26, ~1),		"q,[1+i]", 0, v6notv9 },
532*3d8817e4Smiod { "std",	F3(3, 0x26, 1), F3(~3, ~0x26, ~1),		"q,[i+1]", 0, v6notv9 },
533*3d8817e4Smiod { "std",	F3(3, 0x26, 1), F3(~3, ~0x26, ~1)|RS1_G0,	"q,[i]", 0, v6notv9 },
534*3d8817e4Smiod { "std",	F3(3, 0x26, 1), F3(~3, ~0x26, ~1)|SIMM13(~0),	"q,[1]", 0, v6notv9 }, /* std d,[rs1+0] */
535*3d8817e4Smiod { "std",	F3(3, 0x27, 0), F3(~3, ~0x27, ~0)|ASI(~0),	"H,[1+2]", 0, v6 },
536*3d8817e4Smiod { "std",	F3(3, 0x27, 0), F3(~3, ~0x27, ~0)|ASI_RS2(~0),	"H,[1]", 0, v6 }, /* std d,[rs1+%g0] */
537*3d8817e4Smiod { "std",	F3(3, 0x27, 1), F3(~3, ~0x27, ~1),		"H,[1+i]", 0, v6 },
538*3d8817e4Smiod { "std",	F3(3, 0x27, 1), F3(~3, ~0x27, ~1),		"H,[i+1]", 0, v6 },
539*3d8817e4Smiod { "std",	F3(3, 0x27, 1), F3(~3, ~0x27, ~1)|RS1_G0,	"H,[i]", 0, v6 },
540*3d8817e4Smiod { "std",	F3(3, 0x27, 1), F3(~3, ~0x27, ~1)|SIMM13(~0),	"H,[1]", 0, v6 }, /* std d,[rs1+0] */
541*3d8817e4Smiod 
542*3d8817e4Smiod { "std",	F3(3, 0x36, 0), F3(~3, ~0x36, ~0)|ASI(~0),	"Q,[1+2]", 0, v6notv9 },
543*3d8817e4Smiod { "std",	F3(3, 0x36, 0), F3(~3, ~0x36, ~0)|ASI_RS2(~0),	"Q,[1]", 0, v6notv9 }, /* std d,[rs1+%g0] */
544*3d8817e4Smiod { "std",	F3(3, 0x36, 1), F3(~3, ~0x36, ~1),		"Q,[1+i]", 0, v6notv9 },
545*3d8817e4Smiod { "std",	F3(3, 0x36, 1), F3(~3, ~0x36, ~1),		"Q,[i+1]", 0, v6notv9 },
546*3d8817e4Smiod { "std",	F3(3, 0x36, 1), F3(~3, ~0x36, ~1)|RS1_G0,	"Q,[i]", 0, v6notv9 },
547*3d8817e4Smiod { "std",	F3(3, 0x36, 1), F3(~3, ~0x36, ~1)|SIMM13(~0),	"Q,[1]", 0, v6notv9 }, /* std d,[rs1+0] */
548*3d8817e4Smiod { "std",	F3(3, 0x37, 0), F3(~3, ~0x37, ~0)|ASI(~0),	"D,[1+2]", 0, v6notv9 },
549*3d8817e4Smiod { "std",	F3(3, 0x37, 0), F3(~3, ~0x37, ~0)|ASI_RS2(~0),	"D,[1]", 0, v6notv9 }, /* std d,[rs1+%g0] */
550*3d8817e4Smiod { "std",	F3(3, 0x37, 1), F3(~3, ~0x37, ~1),		"D,[1+i]", 0, v6notv9 },
551*3d8817e4Smiod { "std",	F3(3, 0x37, 1), F3(~3, ~0x37, ~1),		"D,[i+1]", 0, v6notv9 },
552*3d8817e4Smiod { "std",	F3(3, 0x37, 1), F3(~3, ~0x37, ~1)|RS1_G0,	"D,[i]", 0, v6notv9 },
553*3d8817e4Smiod { "std",	F3(3, 0x37, 1), F3(~3, ~0x37, ~1)|SIMM13(~0),	"D,[1]", 0, v6notv9 }, /* std d,[rs1+0] */
554*3d8817e4Smiod 
555*3d8817e4Smiod { "spilld",	F3(3, 0x07, 0), F3(~3, ~0x07, ~0)|ASI(~0),	"d,[1+2]", F_ALIAS, v6 },
556*3d8817e4Smiod { "spilld",	F3(3, 0x07, 0), F3(~3, ~0x07, ~0)|ASI_RS2(~0),	"d,[1]", F_ALIAS, v6 }, /* std d,[rs1+%g0] */
557*3d8817e4Smiod { "spilld",	F3(3, 0x07, 1), F3(~3, ~0x07, ~1),		"d,[1+i]", F_ALIAS, v6 },
558*3d8817e4Smiod { "spilld",	F3(3, 0x07, 1), F3(~3, ~0x07, ~1),		"d,[i+1]", F_ALIAS, v6 },
559*3d8817e4Smiod { "spilld",	F3(3, 0x07, 1), F3(~3, ~0x07, ~1)|RS1_G0,	"d,[i]", F_ALIAS, v6 },
560*3d8817e4Smiod { "spilld",	F3(3, 0x07, 1), F3(~3, ~0x07, ~1)|SIMM13(~0),	"d,[1]", F_ALIAS, v6 }, /* std d,[rs1+0] */
561*3d8817e4Smiod 
562*3d8817e4Smiod { "stda",	F3(3, 0x17, 0), F3(~3, ~0x17, ~0),		"d,[1+2]A", 0, v6 },
563*3d8817e4Smiod { "stda",	F3(3, 0x17, 0), F3(~3, ~0x17, ~0)|RS2(~0),	"d,[1]A", 0, v6 }, /* stda d,[rs1+%g0] */
564*3d8817e4Smiod { "stda",	F3(3, 0x17, 1), F3(~3, ~0x17, ~1),		"d,[1+i]o", 0, v9 },
565*3d8817e4Smiod { "stda",	F3(3, 0x17, 1), F3(~3, ~0x17, ~1),		"d,[i+1]o", 0, v9 },
566*3d8817e4Smiod { "stda",	F3(3, 0x17, 1), F3(~3, ~0x17, ~1)|RS1_G0,	"d,[i]o", 0, v9 },
567*3d8817e4Smiod { "stda",	F3(3, 0x17, 1), F3(~3, ~0x17, ~1)|SIMM13(~0),	"d,[1]o", 0, v9 }, /* std d,[rs1+0] */
568*3d8817e4Smiod { "stda",	F3(3, 0x37, 0), F3(~3, ~0x37, ~0),		"H,[1+2]A", 0, v9 },
569*3d8817e4Smiod { "stda",	F3(3, 0x37, 0), F3(~3, ~0x37, ~0)|RS2(~0),	"H,[1]A", 0, v9 }, /* stda d,[rs1+%g0] */
570*3d8817e4Smiod { "stda",	F3(3, 0x37, 1), F3(~3, ~0x37, ~1),		"H,[1+i]o", 0, v9 },
571*3d8817e4Smiod { "stda",	F3(3, 0x37, 1), F3(~3, ~0x37, ~1),		"H,[i+1]o", 0, v9 },
572*3d8817e4Smiod { "stda",	F3(3, 0x37, 1), F3(~3, ~0x37, ~1)|RS1_G0,	"H,[i]o", 0, v9 },
573*3d8817e4Smiod { "stda",	F3(3, 0x37, 1), F3(~3, ~0x37, ~1)|SIMM13(~0),	"H,[1]o", 0, v9 }, /* std d,[rs1+0] */
574*3d8817e4Smiod 
575*3d8817e4Smiod { "sth",	F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI(~0),	"d,[1+2]", 0, v6 },
576*3d8817e4Smiod { "sth",	F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI_RS2(~0),	"d,[1]", 0, v6 }, /* sth d,[rs1+%g0] */
577*3d8817e4Smiod { "sth",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1),		"d,[1+i]", 0, v6 },
578*3d8817e4Smiod { "sth",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1),		"d,[i+1]", 0, v6 },
579*3d8817e4Smiod { "sth",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RS1_G0,	"d,[i]", 0, v6 },
580*3d8817e4Smiod { "sth",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|SIMM13(~0),	"d,[1]", 0, v6 }, /* sth d,[rs1+0] */
581*3d8817e4Smiod 
582*3d8817e4Smiod { "stsh",	F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI(~0),	"d,[1+2]", F_ALIAS, v6 },
583*3d8817e4Smiod { "stsh",	F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI_RS2(~0),	"d,[1]", F_ALIAS, v6 }, /* sth d,[rs1+%g0] */
584*3d8817e4Smiod { "stsh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1),		"d,[1+i]", F_ALIAS, v6 },
585*3d8817e4Smiod { "stsh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1),		"d,[i+1]", F_ALIAS, v6 },
586*3d8817e4Smiod { "stsh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RS1_G0,	"d,[i]", F_ALIAS, v6 },
587*3d8817e4Smiod { "stsh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|SIMM13(~0),	"d,[1]", F_ALIAS, v6 }, /* sth d,[rs1+0] */
588*3d8817e4Smiod { "stuh",	F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI(~0),	"d,[1+2]", F_ALIAS, v6 },
589*3d8817e4Smiod { "stuh",	F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|ASI_RS2(~0),	"d,[1]", F_ALIAS, v6 }, /* sth d,[rs1+%g0] */
590*3d8817e4Smiod { "stuh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1),		"d,[1+i]", F_ALIAS, v6 },
591*3d8817e4Smiod { "stuh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1),		"d,[i+1]", F_ALIAS, v6 },
592*3d8817e4Smiod { "stuh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RS1_G0,	"d,[i]", F_ALIAS, v6 },
593*3d8817e4Smiod { "stuh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|SIMM13(~0),	"d,[1]", F_ALIAS, v6 }, /* sth d,[rs1+0] */
594*3d8817e4Smiod 
595*3d8817e4Smiod { "stha",	F3(3, 0x16, 0), F3(~3, ~0x16, ~0),		"d,[1+2]A", 0, v6 },
596*3d8817e4Smiod { "stha",	F3(3, 0x16, 0), F3(~3, ~0x16, ~0)|RS2(~0),	"d,[1]A", 0, v6 }, /* stha ,[rs1+%g0] */
597*3d8817e4Smiod { "stha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1),		"d,[1+i]o", 0, v9 },
598*3d8817e4Smiod { "stha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1),		"d,[i+1]o", 0, v9 },
599*3d8817e4Smiod { "stha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|RS1_G0,	"d,[i]o", 0, v9 },
600*3d8817e4Smiod { "stha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|SIMM13(~0),	"d,[1]o", 0, v9 }, /* sth d,[rs1+0] */
601*3d8817e4Smiod 
602*3d8817e4Smiod { "stsha",	F3(3, 0x16, 0), F3(~3, ~0x16, ~0),		"d,[1+2]A", F_ALIAS, v6 },
603*3d8817e4Smiod { "stsha",	F3(3, 0x16, 0), F3(~3, ~0x16, ~0)|RS2(~0),	"d,[1]A", F_ALIAS, v6 }, /* stha ,[rs1+%g0] */
604*3d8817e4Smiod { "stsha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1),		"d,[1+i]o", F_ALIAS, v9 },
605*3d8817e4Smiod { "stsha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1),		"d,[i+1]o", F_ALIAS, v9 },
606*3d8817e4Smiod { "stsha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|RS1_G0,	"d,[i]o", F_ALIAS, v9 },
607*3d8817e4Smiod { "stsha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|SIMM13(~0),	"d,[1]o", F_ALIAS, v9 }, /* sth d,[rs1+0] */
608*3d8817e4Smiod { "stuha",	F3(3, 0x16, 0), F3(~3, ~0x16, ~0),		"d,[1+2]A", F_ALIAS, v6 },
609*3d8817e4Smiod { "stuha",	F3(3, 0x16, 0), F3(~3, ~0x16, ~0)|RS2(~0),	"d,[1]A", F_ALIAS, v6 }, /* stha ,[rs1+%g0] */
610*3d8817e4Smiod { "stuha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1),		"d,[1+i]o", F_ALIAS, v9 },
611*3d8817e4Smiod { "stuha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1),		"d,[i+1]o", F_ALIAS, v9 },
612*3d8817e4Smiod { "stuha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|RS1_G0,	"d,[i]o", F_ALIAS, v9 },
613*3d8817e4Smiod { "stuha",	F3(3, 0x16, 1), F3(~3, ~0x16, ~1)|SIMM13(~0),	"d,[1]o", F_ALIAS, v9 }, /* sth d,[rs1+0] */
614*3d8817e4Smiod 
615*3d8817e4Smiod { "stx",	F3(3, 0x0e, 0), F3(~3, ~0x0e, ~0)|ASI(~0),	"d,[1+2]", 0, v9 },
616*3d8817e4Smiod { "stx",	F3(3, 0x0e, 0), F3(~3, ~0x0e, ~0)|ASI_RS2(~0),	"d,[1]", 0, v9 }, /* stx d,[rs1+%g0] */
617*3d8817e4Smiod { "stx",	F3(3, 0x0e, 1), F3(~3, ~0x0e, ~1),		"d,[1+i]", 0, v9 },
618*3d8817e4Smiod { "stx",	F3(3, 0x0e, 1), F3(~3, ~0x0e, ~1),		"d,[i+1]", 0, v9 },
619*3d8817e4Smiod { "stx",	F3(3, 0x0e, 1), F3(~3, ~0x0e, ~1)|RS1_G0,	"d,[i]", 0, v9 },
620*3d8817e4Smiod { "stx",	F3(3, 0x0e, 1), F3(~3, ~0x0e, ~1)|SIMM13(~0),	"d,[1]", 0, v9 }, /* stx d,[rs1+0] */
621*3d8817e4Smiod 
622*3d8817e4Smiod { "stx",	F3(3, 0x25, 0)|RD(1), F3(~3, ~0x25, ~0)|ASI(~0)|RD(~1),	"F,[1+2]", 0, v9 },
623*3d8817e4Smiod { "stx",	F3(3, 0x25, 0)|RD(1), F3(~3, ~0x25, ~0)|ASI_RS2(~0)|RD(~1),"F,[1]", 0, v9 }, /* stx d,[rs1+%g0] */
624*3d8817e4Smiod { "stx",	F3(3, 0x25, 1)|RD(1), F3(~3, ~0x25, ~1)|RD(~1),		"F,[1+i]", 0, v9 },
625*3d8817e4Smiod { "stx",	F3(3, 0x25, 1)|RD(1), F3(~3, ~0x25, ~1)|RD(~1),		"F,[i+1]", 0, v9 },
626*3d8817e4Smiod { "stx",	F3(3, 0x25, 1)|RD(1), F3(~3, ~0x25, ~1)|RS1_G0|RD(~1),	"F,[i]", 0, v9 },
627*3d8817e4Smiod { "stx",	F3(3, 0x25, 1)|RD(1), F3(~3, ~0x25, ~1)|SIMM13(~0)|RD(~1),"F,[1]", 0, v9 }, /* stx d,[rs1+0] */
628*3d8817e4Smiod 
629*3d8817e4Smiod { "stxa",	F3(3, 0x1e, 0), F3(~3, ~0x1e, ~0),		"d,[1+2]A", 0, v9 },
630*3d8817e4Smiod { "stxa",	F3(3, 0x1e, 0), F3(~3, ~0x1e, ~0)|RS2(~0),	"d,[1]A", 0, v9 }, /* stxa d,[rs1+%g0] */
631*3d8817e4Smiod { "stxa",	F3(3, 0x1e, 1), F3(~3, ~0x1e, ~1),		"d,[1+i]o", 0, v9 },
632*3d8817e4Smiod { "stxa",	F3(3, 0x1e, 1), F3(~3, ~0x1e, ~1),		"d,[i+1]o", 0, v9 },
633*3d8817e4Smiod { "stxa",	F3(3, 0x1e, 1), F3(~3, ~0x1e, ~1)|RS1_G0,	"d,[i]o", 0, v9 },
634*3d8817e4Smiod { "stxa",	F3(3, 0x1e, 1), F3(~3, ~0x1e, ~1)|SIMM13(~0),	"d,[1]o", 0, v9 }, /* stx d,[rs1+0] */
635*3d8817e4Smiod 
636*3d8817e4Smiod { "stq",	F3(3, 0x26, 0), F3(~3, ~0x26, ~0)|ASI(~0),	"J,[1+2]", 0, v9 },
637*3d8817e4Smiod { "stq",	F3(3, 0x26, 0), F3(~3, ~0x26, ~0)|ASI_RS2(~0),	"J,[1]", 0, v9 }, /* stq [rs1+%g0] */
638*3d8817e4Smiod { "stq",	F3(3, 0x26, 1), F3(~3, ~0x26, ~1),		"J,[1+i]", 0, v9 },
639*3d8817e4Smiod { "stq",	F3(3, 0x26, 1), F3(~3, ~0x26, ~1),		"J,[i+1]", 0, v9 },
640*3d8817e4Smiod { "stq",	F3(3, 0x26, 1), F3(~3, ~0x26, ~1)|RS1_G0,	"J,[i]", 0, v9 },
641*3d8817e4Smiod { "stq",	F3(3, 0x26, 1), F3(~3, ~0x26, ~1)|SIMM13(~0),	"J,[1]", 0, v9 }, /* stq [rs1+0] */
642*3d8817e4Smiod 
643*3d8817e4Smiod { "stqa",	F3(3, 0x36, 0), F3(~3, ~0x36, ~0)|ASI(~0),	"J,[1+2]A", 0, v9 },
644*3d8817e4Smiod { "stqa",	F3(3, 0x36, 0), F3(~3, ~0x36, ~0)|ASI_RS2(~0),	"J,[1]A", 0, v9 }, /* stqa [rs1+%g0] */
645*3d8817e4Smiod { "stqa",	F3(3, 0x36, 1), F3(~3, ~0x36, ~1),		"J,[1+i]o", 0, v9 },
646*3d8817e4Smiod { "stqa",	F3(3, 0x36, 1), F3(~3, ~0x36, ~1),		"J,[i+1]o", 0, v9 },
647*3d8817e4Smiod { "stqa",	F3(3, 0x36, 1), F3(~3, ~0x36, ~1)|RS1_G0,	"J,[i]o", 0, v9 },
648*3d8817e4Smiod { "stqa",	F3(3, 0x36, 1), F3(~3, ~0x36, ~1)|SIMM13(~0),	"J,[1]o", 0, v9 }, /* stqa [rs1+0] */
649*3d8817e4Smiod 
650*3d8817e4Smiod { "swap",	F3(3, 0x0f, 0), F3(~3, ~0x0f, ~0)|ASI(~0),	"[1+2],d", 0, v7 },
651*3d8817e4Smiod { "swap",	F3(3, 0x0f, 0), F3(~3, ~0x0f, ~0)|ASI_RS2(~0),	"[1],d", 0, v7 }, /* swap [rs1+%g0],d */
652*3d8817e4Smiod { "swap",	F3(3, 0x0f, 1), F3(~3, ~0x0f, ~1),		"[1+i],d", 0, v7 },
653*3d8817e4Smiod { "swap",	F3(3, 0x0f, 1), F3(~3, ~0x0f, ~1),		"[i+1],d", 0, v7 },
654*3d8817e4Smiod { "swap",	F3(3, 0x0f, 1), F3(~3, ~0x0f, ~1)|RS1_G0,	"[i],d", 0, v7 },
655*3d8817e4Smiod { "swap",	F3(3, 0x0f, 1), F3(~3, ~0x0f, ~1)|SIMM13(~0),	"[1],d", 0, v7 }, /* swap [rs1+0],d */
656*3d8817e4Smiod 
657*3d8817e4Smiod { "swapa",	F3(3, 0x1f, 0), F3(~3, ~0x1f, ~0),		"[1+2]A,d", 0, v7 },
658*3d8817e4Smiod { "swapa",	F3(3, 0x1f, 0), F3(~3, ~0x1f, ~0)|RS2(~0),	"[1]A,d", 0, v7 }, /* swapa [rs1+%g0],d */
659*3d8817e4Smiod { "swapa",	F3(3, 0x1f, 1), F3(~3, ~0x1f, ~1),		"[1+i]o,d", 0, v9 },
660*3d8817e4Smiod { "swapa",	F3(3, 0x1f, 1), F3(~3, ~0x1f, ~1),		"[i+1]o,d", 0, v9 },
661*3d8817e4Smiod { "swapa",	F3(3, 0x1f, 1), F3(~3, ~0x1f, ~1)|RS1_G0,	"[i]o,d", 0, v9 },
662*3d8817e4Smiod { "swapa",	F3(3, 0x1f, 1), F3(~3, ~0x1f, ~1)|SIMM13(~0),	"[1]o,d", 0, v9 }, /* swap [rs1+0],d */
663*3d8817e4Smiod 
664*3d8817e4Smiod { "restore",	F3(2, 0x3d, 0), F3(~2, ~0x3d, ~0)|ASI(~0),			"1,2,d", 0, v6 },
665*3d8817e4Smiod { "restore",	F3(2, 0x3d, 0), F3(~2, ~0x3d, ~0)|RD_G0|RS1_G0|ASI_RS2(~0),	"", 0, v6 }, /* restore %g0,%g0,%g0 */
666*3d8817e4Smiod { "restore",	F3(2, 0x3d, 1), F3(~2, ~0x3d, ~1),				"1,i,d", 0, v6 },
667*3d8817e4Smiod { "restore",	F3(2, 0x3d, 1), F3(~2, ~0x3d, ~1)|RD_G0|RS1_G0|SIMM13(~0),	"", 0, v6 }, /* restore %g0,0,%g0 */
668*3d8817e4Smiod 
669*3d8817e4Smiod { "rett",	F3(2, 0x39, 0), F3(~2, ~0x39, ~0)|RD_G0|ASI(~0),	"1+2", F_UNBR|F_DELAYED, v6 }, /* rett rs1+rs2 */
670*3d8817e4Smiod { "rett",	F3(2, 0x39, 0), F3(~2, ~0x39, ~0)|RD_G0|ASI_RS2(~0),	"1", F_UNBR|F_DELAYED, v6 },	/* rett rs1,%g0 */
671*3d8817e4Smiod { "rett",	F3(2, 0x39, 1), F3(~2, ~0x39, ~1)|RD_G0,		"1+i", F_UNBR|F_DELAYED, v6 }, /* rett rs1+X */
672*3d8817e4Smiod { "rett",	F3(2, 0x39, 1), F3(~2, ~0x39, ~1)|RD_G0,		"i+1", F_UNBR|F_DELAYED, v6 }, /* rett X+rs1 */
673*3d8817e4Smiod { "rett",	F3(2, 0x39, 1), F3(~2, ~0x39, ~1)|RD_G0|RS1_G0,		"i", F_UNBR|F_DELAYED, v6 }, /* rett X+rs1 */
674*3d8817e4Smiod { "rett",	F3(2, 0x39, 1), F3(~2, ~0x39, ~1)|RD_G0|RS1_G0,		"i", F_UNBR|F_DELAYED, v6 },	/* rett X */
675*3d8817e4Smiod { "rett",	F3(2, 0x39, 1), F3(~2, ~0x39, ~1)|RD_G0|SIMM13(~0),	"1", F_UNBR|F_DELAYED, v6 },	/* rett rs1+0 */
676*3d8817e4Smiod 
677*3d8817e4Smiod { "save",	F3(2, 0x3c, 0), F3(~2, ~0x3c, ~0)|ASI(~0),	"1,2,d", 0, v6 },
678*3d8817e4Smiod { "save",	F3(2, 0x3c, 1), F3(~2, ~0x3c, ~1),		"1,i,d", 0, v6 },
679*3d8817e4Smiod { "save",	0x81e00000,	~0x81e00000,			"", F_ALIAS, v6 },
680*3d8817e4Smiod 
681*3d8817e4Smiod { "ret",  F3(2, 0x38, 1)|RS1(0x1f)|SIMM13(8), F3(~2, ~0x38, ~1)|SIMM13(~8),	       "", F_UNBR|F_DELAYED, v6 }, /* jmpl %i7+8,%g0 */
682*3d8817e4Smiod { "retl", F3(2, 0x38, 1)|RS1(0x0f)|SIMM13(8), F3(~2, ~0x38, ~1)|RS1(~0x0f)|SIMM13(~8), "", F_UNBR|F_DELAYED, v6 }, /* jmpl %o7+8,%g0 */
683*3d8817e4Smiod 
684*3d8817e4Smiod { "jmpl",	F3(2, 0x38, 0), F3(~2, ~0x38, ~0)|ASI(~0),	"1+2,d", F_JSR|F_DELAYED, v6 },
685*3d8817e4Smiod { "jmpl",	F3(2, 0x38, 0), F3(~2, ~0x38, ~0)|ASI_RS2(~0),	"1,d", F_JSR|F_DELAYED, v6 }, /* jmpl rs1+%g0,d */
686*3d8817e4Smiod { "jmpl",	F3(2, 0x38, 1), F3(~2, ~0x38, ~1)|SIMM13(~0),	"1,d", F_JSR|F_DELAYED, v6 }, /* jmpl rs1+0,d */
687*3d8817e4Smiod { "jmpl",	F3(2, 0x38, 1), F3(~2, ~0x38, ~1)|RS1_G0,	"i,d", F_JSR|F_DELAYED, v6 }, /* jmpl %g0+i,d */
688*3d8817e4Smiod { "jmpl",	F3(2, 0x38, 1), F3(~2, ~0x38, ~1),		"1+i,d", F_JSR|F_DELAYED, v6 },
689*3d8817e4Smiod { "jmpl",	F3(2, 0x38, 1), F3(~2, ~0x38, ~1),		"i+1,d", F_JSR|F_DELAYED, v6 },
690*3d8817e4Smiod 
691*3d8817e4Smiod { "done",	F3(2, 0x3e, 0)|RD(0), F3(~2, ~0x3e, ~0)|RD(~0)|RS1_G0|SIMM13(~0),	"", 0, v9 },
692*3d8817e4Smiod { "retry",	F3(2, 0x3e, 0)|RD(1), F3(~2, ~0x3e, ~0)|RD(~1)|RS1_G0|SIMM13(~0),	"", 0, v9 },
693*3d8817e4Smiod { "saved",	F3(2, 0x31, 0)|RD(0), F3(~2, ~0x31, ~0)|RD(~0)|RS1_G0|SIMM13(~0),	"", 0, v9 },
694*3d8817e4Smiod { "restored",	F3(2, 0x31, 0)|RD(1), F3(~2, ~0x31, ~0)|RD(~1)|RS1_G0|SIMM13(~0),	"", 0, v9 },
695*3d8817e4Smiod { "allclean",	F3(2, 0x31, 0)|RD(2), F3(~2, ~0x31, ~0)|RD(~2)|RS1_G0|SIMM13(~0),	"", 0, v9 },
696*3d8817e4Smiod { "otherw",	F3(2, 0x31, 0)|RD(3), F3(~2, ~0x31, ~0)|RD(~3)|RS1_G0|SIMM13(~0),	"", 0, v9 },
697*3d8817e4Smiod { "normalw",	F3(2, 0x31, 0)|RD(4), F3(~2, ~0x31, ~0)|RD(~4)|RS1_G0|SIMM13(~0),	"", 0, v9 },
698*3d8817e4Smiod { "invalw",	F3(2, 0x31, 0)|RD(5), F3(~2, ~0x31, ~0)|RD(~5)|RS1_G0|SIMM13(~0),	"", 0, v9 },
699*3d8817e4Smiod { "sir",	F3(2, 0x30, 1)|RD(0xf), F3(~2, ~0x30, ~1)|RD(~0xf)|RS1_G0,		"i", 0, v9 },
700*3d8817e4Smiod 
701*3d8817e4Smiod { "flush",	F3(2, 0x3b, 0), F3(~2, ~0x3b, ~0)|ASI(~0),	"1+2", 0, v8 },
702*3d8817e4Smiod { "flush",	F3(2, 0x3b, 0), F3(~2, ~0x3b, ~0)|ASI_RS2(~0),	"1", 0, v8 }, /* flush rs1+%g0 */
703*3d8817e4Smiod { "flush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1)|SIMM13(~0),	"1", 0, v8 }, /* flush rs1+0 */
704*3d8817e4Smiod { "flush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1)|RS1_G0,	"i", 0, v8 }, /* flush %g0+i */
705*3d8817e4Smiod { "flush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1),		"1+i", 0, v8 },
706*3d8817e4Smiod { "flush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1),		"i+1", 0, v8 },
707*3d8817e4Smiod 
708*3d8817e4Smiod /* IFLUSH was renamed to FLUSH in v8.  */
709*3d8817e4Smiod { "iflush",	F3(2, 0x3b, 0), F3(~2, ~0x3b, ~0)|ASI(~0),	"1+2", F_ALIAS, v6 },
710*3d8817e4Smiod { "iflush",	F3(2, 0x3b, 0), F3(~2, ~0x3b, ~0)|ASI_RS2(~0),	"1", F_ALIAS, v6 }, /* flush rs1+%g0 */
711*3d8817e4Smiod { "iflush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1)|SIMM13(~0),	"1", F_ALIAS, v6 }, /* flush rs1+0 */
712*3d8817e4Smiod { "iflush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1)|RS1_G0,	"i", F_ALIAS, v6 },
713*3d8817e4Smiod { "iflush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1),		"1+i", F_ALIAS, v6 },
714*3d8817e4Smiod { "iflush",	F3(2, 0x3b, 1), F3(~2, ~0x3b, ~1),		"i+1", F_ALIAS, v6 },
715*3d8817e4Smiod 
716*3d8817e4Smiod { "return",	F3(2, 0x39, 0), F3(~2, ~0x39, ~0)|ASI(~0),	"1+2", 0, v9 },
717*3d8817e4Smiod { "return",	F3(2, 0x39, 0), F3(~2, ~0x39, ~0)|ASI_RS2(~0),	"1", 0, v9 }, /* return rs1+%g0 */
718*3d8817e4Smiod { "return",	F3(2, 0x39, 1), F3(~2, ~0x39, ~1)|SIMM13(~0),	"1", 0, v9 }, /* return rs1+0 */
719*3d8817e4Smiod { "return",	F3(2, 0x39, 1), F3(~2, ~0x39, ~1)|RS1_G0,	"i", 0, v9 }, /* return %g0+i */
720*3d8817e4Smiod { "return",	F3(2, 0x39, 1), F3(~2, ~0x39, ~1),		"1+i", 0, v9 },
721*3d8817e4Smiod { "return",	F3(2, 0x39, 1), F3(~2, ~0x39, ~1),		"i+1", 0, v9 },
722*3d8817e4Smiod 
723*3d8817e4Smiod { "flushw",	F3(2, 0x2b, 0), F3(~2, ~0x2b, ~0)|RD_G0|RS1_G0|ASI_RS2(~0),	"", 0, v9 },
724*3d8817e4Smiod 
725*3d8817e4Smiod { "membar",	F3(2, 0x28, 1)|RS1(0xf), F3(~2, ~0x28, ~1)|RD_G0|RS1(~0xf)|SIMM13(~127), "K", 0, v9 },
726*3d8817e4Smiod { "stbar",	F3(2, 0x28, 0)|RS1(0xf), F3(~2, ~0x28, ~0)|RD_G0|RS1(~0xf)|SIMM13(~0), "", 0, v8 },
727*3d8817e4Smiod 
728*3d8817e4Smiod { "prefetch",	F3(3, 0x2d, 0), F3(~3, ~0x2d, ~0),		"[1+2],*", 0, v9 },
729*3d8817e4Smiod { "prefetch",	F3(3, 0x2d, 0), F3(~3, ~0x2d, ~0)|RS2_G0,	"[1],*", 0, v9 }, /* prefetch [rs1+%g0],prefetch_fcn */
730*3d8817e4Smiod { "prefetch",	F3(3, 0x2d, 1), F3(~3, ~0x2d, ~1),		"[1+i],*", 0, v9 },
731*3d8817e4Smiod { "prefetch",	F3(3, 0x2d, 1), F3(~3, ~0x2d, ~1),		"[i+1],*", 0, v9 },
732*3d8817e4Smiod { "prefetch",	F3(3, 0x2d, 1), F3(~3, ~0x2d, ~1)|RS1_G0,	"[i],*", 0, v9 },
733*3d8817e4Smiod { "prefetch",	F3(3, 0x2d, 1), F3(~3, ~0x2d, ~1)|SIMM13(~0),	"[1],*", 0, v9 }, /* prefetch [rs1+0],prefetch_fcn */
734*3d8817e4Smiod { "prefetcha",	F3(3, 0x3d, 0), F3(~3, ~0x3d, ~0),		"[1+2]A,*", 0, v9 },
735*3d8817e4Smiod { "prefetcha",	F3(3, 0x3d, 0), F3(~3, ~0x3d, ~0)|RS2_G0,	"[1]A,*", 0, v9 }, /* prefetcha [rs1+%g0],prefetch_fcn */
736*3d8817e4Smiod { "prefetcha",	F3(3, 0x3d, 1), F3(~3, ~0x3d, ~1),		"[1+i]o,*", 0, v9 },
737*3d8817e4Smiod { "prefetcha",	F3(3, 0x3d, 1), F3(~3, ~0x3d, ~1),		"[i+1]o,*", 0, v9 },
738*3d8817e4Smiod { "prefetcha",	F3(3, 0x3d, 1), F3(~3, ~0x3d, ~1)|RS1_G0,	"[i]o,*", 0, v9 },
739*3d8817e4Smiod { "prefetcha",	F3(3, 0x3d, 1), F3(~3, ~0x3d, ~1)|SIMM13(~0),	"[1]o,*", 0, v9 }, /* prefetcha [rs1+0],d */
740*3d8817e4Smiod 
741*3d8817e4Smiod { "sll",	F3(2, 0x25, 0), F3(~2, ~0x25, ~0)|(1<<12)|(0x7f<<5),	"1,2,d", 0, v6 },
742*3d8817e4Smiod { "sll",	F3(2, 0x25, 1), F3(~2, ~0x25, ~1)|(1<<12)|(0x7f<<5),	"1,X,d", 0, v6 },
743*3d8817e4Smiod { "sra",	F3(2, 0x27, 0), F3(~2, ~0x27, ~0)|(1<<12)|(0x7f<<5),	"1,2,d", 0, v6 },
744*3d8817e4Smiod { "sra",	F3(2, 0x27, 1), F3(~2, ~0x27, ~1)|(1<<12)|(0x7f<<5),	"1,X,d", 0, v6 },
745*3d8817e4Smiod { "srl",	F3(2, 0x26, 0), F3(~2, ~0x26, ~0)|(1<<12)|(0x7f<<5),	"1,2,d", 0, v6 },
746*3d8817e4Smiod { "srl",	F3(2, 0x26, 1), F3(~2, ~0x26, ~1)|(1<<12)|(0x7f<<5),	"1,X,d", 0, v6 },
747*3d8817e4Smiod 
748*3d8817e4Smiod { "sllx",	F3(2, 0x25, 0)|(1<<12), F3(~2, ~0x25, ~0)|(0x7f<<5),	"1,2,d", 0, v9 },
749*3d8817e4Smiod { "sllx",	F3(2, 0x25, 1)|(1<<12), F3(~2, ~0x25, ~1)|(0x3f<<6),	"1,Y,d", 0, v9 },
750*3d8817e4Smiod { "srax",	F3(2, 0x27, 0)|(1<<12), F3(~2, ~0x27, ~0)|(0x7f<<5),	"1,2,d", 0, v9 },
751*3d8817e4Smiod { "srax",	F3(2, 0x27, 1)|(1<<12), F3(~2, ~0x27, ~1)|(0x3f<<6),	"1,Y,d", 0, v9 },
752*3d8817e4Smiod { "srlx",	F3(2, 0x26, 0)|(1<<12), F3(~2, ~0x26, ~0)|(0x7f<<5),	"1,2,d", 0, v9 },
753*3d8817e4Smiod { "srlx",	F3(2, 0x26, 1)|(1<<12), F3(~2, ~0x26, ~1)|(0x3f<<6),	"1,Y,d", 0, v9 },
754*3d8817e4Smiod 
755*3d8817e4Smiod { "mulscc",	F3(2, 0x24, 0), F3(~2, ~0x24, ~0)|ASI(~0),	"1,2,d", 0, v6 },
756*3d8817e4Smiod { "mulscc",	F3(2, 0x24, 1), F3(~2, ~0x24, ~1),		"1,i,d", 0, v6 },
757*3d8817e4Smiod 
758*3d8817e4Smiod { "divscc",	F3(2, 0x1d, 0), F3(~2, ~0x1d, ~0)|ASI(~0),	"1,2,d", 0, sparclite },
759*3d8817e4Smiod { "divscc",	F3(2, 0x1d, 1), F3(~2, ~0x1d, ~1),		"1,i,d", 0, sparclite },
760*3d8817e4Smiod 
761*3d8817e4Smiod { "scan",	F3(2, 0x2c, 0), F3(~2, ~0x2c, ~0)|ASI(~0),	"1,2,d", 0, sparclet|sparclite },
762*3d8817e4Smiod { "scan",	F3(2, 0x2c, 1), F3(~2, ~0x2c, ~1),		"1,i,d", 0, sparclet|sparclite },
763*3d8817e4Smiod 
764*3d8817e4Smiod { "popc",	F3(2, 0x2e, 0), F3(~2, ~0x2e, ~0)|RS1_G0|ASI(~0),"2,d", 0, v9 },
765*3d8817e4Smiod { "popc",	F3(2, 0x2e, 1), F3(~2, ~0x2e, ~1)|RS1_G0,	"i,d", 0, v9 },
766*3d8817e4Smiod 
767*3d8817e4Smiod { "clr",	F3(2, 0x02, 0), F3(~2, ~0x02, ~0)|RD_G0|RS1_G0|ASI_RS2(~0),	"d", F_ALIAS, v6 }, /* or %g0,%g0,d */
768*3d8817e4Smiod { "clr",	F3(2, 0x02, 1), F3(~2, ~0x02, ~1)|RS1_G0|SIMM13(~0),		"d", F_ALIAS, v6 }, /* or %g0,0,d	*/
769*3d8817e4Smiod { "clr",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|RD_G0|ASI(~0),		"[1+2]", F_ALIAS, v6 },
770*3d8817e4Smiod { "clr",	F3(3, 0x04, 0), F3(~3, ~0x04, ~0)|RD_G0|ASI_RS2(~0),		"[1]", F_ALIAS, v6 }, /* st %g0,[rs1+%g0] */
771*3d8817e4Smiod { "clr",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RD_G0,			"[1+i]", F_ALIAS, v6 },
772*3d8817e4Smiod { "clr",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RD_G0,			"[i+1]", F_ALIAS, v6 },
773*3d8817e4Smiod { "clr",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RD_G0|RS1_G0,			"[i]", F_ALIAS, v6 },
774*3d8817e4Smiod { "clr",	F3(3, 0x04, 1), F3(~3, ~0x04, ~1)|RD_G0|SIMM13(~0),		"[1]", F_ALIAS, v6 }, /* st %g0,[rs1+0] */
775*3d8817e4Smiod 
776*3d8817e4Smiod { "clrb",	F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|RD_G0|ASI(~0),	"[1+2]", F_ALIAS, v6 },
777*3d8817e4Smiod { "clrb",	F3(3, 0x05, 0), F3(~3, ~0x05, ~0)|RD_G0|ASI_RS2(~0),	"[1]", F_ALIAS, v6 }, /* stb %g0,[rs1+%g0] */
778*3d8817e4Smiod { "clrb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RD_G0,		"[1+i]", F_ALIAS, v6 },
779*3d8817e4Smiod { "clrb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RD_G0,		"[i+1]", F_ALIAS, v6 },
780*3d8817e4Smiod { "clrb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RD_G0|RS1_G0,		"[i]", F_ALIAS, v6 },
781*3d8817e4Smiod { "clrb",	F3(3, 0x05, 1), F3(~3, ~0x05, ~1)|RD_G0|SIMM13(~0),	"[1]", F_ALIAS, v6 }, /* stb %g0,[rs1+0] */
782*3d8817e4Smiod 
783*3d8817e4Smiod { "clrh",	F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|RD_G0|ASI(~0),	"[1+2]", F_ALIAS, v6 },
784*3d8817e4Smiod { "clrh",	F3(3, 0x06, 0), F3(~3, ~0x06, ~0)|RD_G0|ASI_RS2(~0),	"[1]", F_ALIAS, v6 }, /* sth %g0,[rs1+%g0] */
785*3d8817e4Smiod { "clrh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RD_G0,		"[1+i]", F_ALIAS, v6 },
786*3d8817e4Smiod { "clrh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RD_G0,		"[i+1]", F_ALIAS, v6 },
787*3d8817e4Smiod { "clrh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RD_G0|RS1_G0,		"[i]", F_ALIAS, v6 },
788*3d8817e4Smiod { "clrh",	F3(3, 0x06, 1), F3(~3, ~0x06, ~1)|RD_G0|SIMM13(~0),	"[1]", F_ALIAS, v6 }, /* sth %g0,[rs1+0] */
789*3d8817e4Smiod 
790*3d8817e4Smiod { "clrx",	F3(3, 0x0e, 0), F3(~3, ~0x0e, ~0)|RD_G0|ASI(~0),	"[1+2]", F_ALIAS, v9 },
791*3d8817e4Smiod { "clrx",	F3(3, 0x0e, 0), F3(~3, ~0x0e, ~0)|RD_G0|ASI_RS2(~0),	"[1]", F_ALIAS, v9 }, /* stx %g0,[rs1+%g0] */
792*3d8817e4Smiod { "clrx",	F3(3, 0x0e, 1), F3(~3, ~0x0e, ~1)|RD_G0,		"[1+i]", F_ALIAS, v9 },
793*3d8817e4Smiod { "clrx",	F3(3, 0x0e, 1), F3(~3, ~0x0e, ~1)|RD_G0,		"[i+1]", F_ALIAS, v9 },
794*3d8817e4Smiod { "clrx",	F3(3, 0x0e, 1), F3(~3, ~0x0e, ~1)|RD_G0|RS1_G0,		"[i]", F_ALIAS, v9 },
795*3d8817e4Smiod { "clrx",	F3(3, 0x0e, 1), F3(~3, ~0x0e, ~1)|RD_G0|SIMM13(~0),	"[1]", F_ALIAS, v9 }, /* stx %g0,[rs1+0] */
796*3d8817e4Smiod 
797*3d8817e4Smiod { "orcc",	F3(2, 0x12, 0), F3(~2, ~0x12, ~0)|ASI(~0),	"1,2,d", 0, v6 },
798*3d8817e4Smiod { "orcc",	F3(2, 0x12, 1), F3(~2, ~0x12, ~1),		"1,i,d", 0, v6 },
799*3d8817e4Smiod { "orcc",	F3(2, 0x12, 1), F3(~2, ~0x12, ~1),		"i,1,d", 0, v6 },
800*3d8817e4Smiod 
801*3d8817e4Smiod /* This is not a commutative instruction.  */
802*3d8817e4Smiod { "orncc",	F3(2, 0x16, 0), F3(~2, ~0x16, ~0)|ASI(~0),	"1,2,d", 0, v6 },
803*3d8817e4Smiod { "orncc",	F3(2, 0x16, 1), F3(~2, ~0x16, ~1),		"1,i,d", 0, v6 },
804*3d8817e4Smiod 
805*3d8817e4Smiod /* This is not a commutative instruction.  */
806*3d8817e4Smiod { "orn",	F3(2, 0x06, 0), F3(~2, ~0x06, ~0)|ASI(~0),	"1,2,d", 0, v6 },
807*3d8817e4Smiod { "orn",	F3(2, 0x06, 1), F3(~2, ~0x06, ~1),		"1,i,d", 0, v6 },
808*3d8817e4Smiod 
809*3d8817e4Smiod { "tst",	F3(2, 0x12, 0), F3(~2, ~0x12, ~0)|RD_G0|ASI_RS2(~0),	"1", 0, v6 }, /* orcc rs1, %g0, %g0 */
810*3d8817e4Smiod { "tst",	F3(2, 0x12, 0), F3(~2, ~0x12, ~0)|RD_G0|RS1_G0|ASI(~0),	"2", 0, v6 }, /* orcc %g0, rs2, %g0 */
811*3d8817e4Smiod { "tst",	F3(2, 0x12, 1), F3(~2, ~0x12, ~1)|RD_G0|SIMM13(~0),	"1", 0, v6 }, /* orcc rs1, 0, %g0 */
812*3d8817e4Smiod 
813*3d8817e4Smiod { "wr",	F3(2, 0x30, 0),		F3(~2, ~0x30, ~0)|ASI(~0),		"1,2,m", 0, v8 }, /* wr r,r,%asrX */
814*3d8817e4Smiod { "wr",	F3(2, 0x30, 1),		F3(~2, ~0x30, ~1),			"1,i,m", 0, v8 }, /* wr r,i,%asrX */
815*3d8817e4Smiod { "wr",	F3(2, 0x30, 0),		F3(~2, ~0x30, ~0)|ASI_RS2(~0),		"1,m", F_ALIAS, v8 }, /* wr rs1,%g0,%asrX */
816*3d8817e4Smiod { "wr",	F3(2, 0x30, 0),		F3(~2, ~0x30, ~0)|RD_G0|ASI(~0),	"1,2,y", 0, v6 }, /* wr r,r,%y */
817*3d8817e4Smiod { "wr",	F3(2, 0x30, 1),		F3(~2, ~0x30, ~1)|RD_G0,		"1,i,y", 0, v6 }, /* wr r,i,%y */
818*3d8817e4Smiod { "wr",	F3(2, 0x30, 0),		F3(~2, ~0x30, ~0)|RD_G0|ASI_RS2(~0),	"1,y", F_ALIAS, v6 }, /* wr rs1,%g0,%y */
819*3d8817e4Smiod { "wr",	F3(2, 0x31, 0),		F3(~2, ~0x31, ~0)|RD_G0|ASI(~0),	"1,2,p", 0, v6notv9 }, /* wr r,r,%psr */
820*3d8817e4Smiod { "wr",	F3(2, 0x31, 1),		F3(~2, ~0x31, ~1)|RD_G0,		"1,i,p", 0, v6notv9 }, /* wr r,i,%psr */
821*3d8817e4Smiod { "wr",	F3(2, 0x31, 0),		F3(~2, ~0x31, ~0)|RD_G0|ASI_RS2(~0),	"1,p", F_ALIAS, v6notv9 }, /* wr rs1,%g0,%psr */
822*3d8817e4Smiod { "wr",	F3(2, 0x32, 0),		F3(~2, ~0x32, ~0)|RD_G0|ASI(~0),	"1,2,w", 0, v6notv9 }, /* wr r,r,%wim */
823*3d8817e4Smiod { "wr",	F3(2, 0x32, 1),		F3(~2, ~0x32, ~1)|RD_G0,		"1,i,w", 0, v6notv9 }, /* wr r,i,%wim */
824*3d8817e4Smiod { "wr",	F3(2, 0x32, 0),		F3(~2, ~0x32, ~0)|RD_G0|ASI_RS2(~0),	"1,w", F_ALIAS, v6notv9 }, /* wr rs1,%g0,%wim */
825*3d8817e4Smiod { "wr",	F3(2, 0x33, 0),		F3(~2, ~0x33, ~0)|RD_G0|ASI(~0),	"1,2,t", 0, v6notv9 }, /* wr r,r,%tbr */
826*3d8817e4Smiod { "wr",	F3(2, 0x33, 1),		F3(~2, ~0x33, ~1)|RD_G0,		"1,i,t", 0, v6notv9 }, /* wr r,i,%tbr */
827*3d8817e4Smiod { "wr",	F3(2, 0x33, 0),		F3(~2, ~0x33, ~0)|RD_G0|ASI_RS2(~0),	"1,t", F_ALIAS, v6notv9 }, /* wr rs1,%g0,%tbr */
828*3d8817e4Smiod 
829*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(2),	F3(~2, ~0x30, ~0)|RD(~2)|ASI(~0),	"1,2,E", 0, v9 }, /* wr r,r,%ccr */
830*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(2),	F3(~2, ~0x30, ~1)|RD(~2),		"1,i,E", 0, v9 }, /* wr r,i,%ccr */
831*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(3),	F3(~2, ~0x30, ~0)|RD(~3)|ASI(~0),	"1,2,o", 0, v9 }, /* wr r,r,%asi */
832*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(3),	F3(~2, ~0x30, ~1)|RD(~3),		"1,i,o", 0, v9 }, /* wr r,i,%asi */
833*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(6),	F3(~2, ~0x30, ~0)|RD(~6)|ASI(~0),	"1,2,s", 0, v9 }, /* wr r,r,%fprs */
834*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(6),	F3(~2, ~0x30, ~1)|RD(~6),		"1,i,s", 0, v9 }, /* wr r,i,%fprs */
835*3d8817e4Smiod 
836*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(16),	F3(~2, ~0x30, ~0)|RD(~16)|ASI(~0),	"1,2,_", 0, v9a }, /* wr r,r,%pcr */
837*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(16),	F3(~2, ~0x30, ~1)|RD(~16),		"1,i,_", 0, v9a }, /* wr r,i,%pcr */
838*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(17),	F3(~2, ~0x30, ~0)|RD(~17)|ASI(~0),	"1,2,_", 0, v9a }, /* wr r,r,%pic */
839*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(17),	F3(~2, ~0x30, ~1)|RD(~17),		"1,i,_", 0, v9a }, /* wr r,i,%pic */
840*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(18),	F3(~2, ~0x30, ~0)|RD(~18)|ASI(~0),	"1,2,_", 0, v9a }, /* wr r,r,%dcr */
841*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(18),	F3(~2, ~0x30, ~1)|RD(~18),		"1,i,_", 0, v9a }, /* wr r,i,%dcr */
842*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(19),	F3(~2, ~0x30, ~0)|RD(~19)|ASI(~0),	"1,2,_", 0, v9a }, /* wr r,r,%gsr */
843*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(19),	F3(~2, ~0x30, ~1)|RD(~19),		"1,i,_", 0, v9a }, /* wr r,i,%gsr */
844*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(20),	F3(~2, ~0x30, ~0)|RD(~20)|ASI(~0),	"1,2,_", 0, v9a }, /* wr r,r,%set_softint */
845*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(20),	F3(~2, ~0x30, ~1)|RD(~20),		"1,i,_", 0, v9a }, /* wr r,i,%set_softint */
846*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(21),	F3(~2, ~0x30, ~0)|RD(~21)|ASI(~0),	"1,2,_", 0, v9a }, /* wr r,r,%clear_softint */
847*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(21),	F3(~2, ~0x30, ~1)|RD(~21),		"1,i,_", 0, v9a }, /* wr r,i,%clear_softint */
848*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(22),	F3(~2, ~0x30, ~0)|RD(~22)|ASI(~0),	"1,2,_", 0, v9a }, /* wr r,r,%softint */
849*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(22),	F3(~2, ~0x30, ~1)|RD(~22),		"1,i,_", 0, v9a }, /* wr r,i,%softint */
850*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(23),	F3(~2, ~0x30, ~0)|RD(~23)|ASI(~0),	"1,2,_", 0, v9a }, /* wr r,r,%tick_cmpr */
851*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(23),	F3(~2, ~0x30, ~1)|RD(~23),		"1,i,_", 0, v9a }, /* wr r,i,%tick_cmpr */
852*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(24),	F3(~2, ~0x30, ~0)|RD(~24)|ASI(~0),	"1,2,_", 0, v9b }, /* wr r,r,%sys_tick */
853*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(24),	F3(~2, ~0x30, ~1)|RD(~24),		"1,i,_", 0, v9b }, /* wr r,i,%sys_tick */
854*3d8817e4Smiod { "wr", F3(2, 0x30, 0)|RD(25),	F3(~2, ~0x30, ~0)|RD(~25)|ASI(~0),	"1,2,_", 0, v9b }, /* wr r,r,%sys_tick_cmpr */
855*3d8817e4Smiod { "wr", F3(2, 0x30, 1)|RD(25),	F3(~2, ~0x30, ~1)|RD(~25),		"1,i,_", 0, v9b }, /* wr r,i,%sys_tick_cmpr */
856*3d8817e4Smiod 
857*3d8817e4Smiod { "rd",	F3(2, 0x28, 0),			F3(~2, ~0x28, ~0)|SIMM13(~0),		"M,d", 0, v8 }, /* rd %asrX,r */
858*3d8817e4Smiod { "rd",	F3(2, 0x28, 0),			F3(~2, ~0x28, ~0)|RS1_G0|SIMM13(~0),	"y,d", 0, v6 }, /* rd %y,r */
859*3d8817e4Smiod { "rd",	F3(2, 0x29, 0),			F3(~2, ~0x29, ~0)|RS1_G0|SIMM13(~0),	"p,d", 0, v6notv9 }, /* rd %psr,r */
860*3d8817e4Smiod { "rd",	F3(2, 0x2a, 0),			F3(~2, ~0x2a, ~0)|RS1_G0|SIMM13(~0),	"w,d", 0, v6notv9 }, /* rd %wim,r */
861*3d8817e4Smiod { "rd",	F3(2, 0x2b, 0),			F3(~2, ~0x2b, ~0)|RS1_G0|SIMM13(~0),	"t,d", 0, v6notv9 }, /* rd %tbr,r */
862*3d8817e4Smiod 
863*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(2),		F3(~2, ~0x28, ~0)|RS1(~2)|SIMM13(~0),	"E,d", 0, v9 }, /* rd %ccr,r */
864*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(3),		F3(~2, ~0x28, ~0)|RS1(~3)|SIMM13(~0),	"o,d", 0, v9 }, /* rd %asi,r */
865*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(4),		F3(~2, ~0x28, ~0)|RS1(~4)|SIMM13(~0),	"W,d", 0, v9 }, /* rd %tick,r */
866*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(5),		F3(~2, ~0x28, ~0)|RS1(~5)|SIMM13(~0),	"P,d", 0, v9 }, /* rd %pc,r */
867*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(6),		F3(~2, ~0x28, ~0)|RS1(~6)|SIMM13(~0),	"s,d", 0, v9 }, /* rd %fprs,r */
868*3d8817e4Smiod 
869*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(16),		F3(~2, ~0x28, ~0)|RS1(~16)|SIMM13(~0),	"/,d", 0, v9a }, /* rd %pcr,r */
870*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(17),		F3(~2, ~0x28, ~0)|RS1(~17)|SIMM13(~0),	"/,d", 0, v9a }, /* rd %pic,r */
871*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(18),		F3(~2, ~0x28, ~0)|RS1(~18)|SIMM13(~0),	"/,d", 0, v9a }, /* rd %dcr,r */
872*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(19),		F3(~2, ~0x28, ~0)|RS1(~19)|SIMM13(~0),	"/,d", 0, v9a }, /* rd %gsr,r */
873*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(22),		F3(~2, ~0x28, ~0)|RS1(~22)|SIMM13(~0),	"/,d", 0, v9a }, /* rd %softint,r */
874*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(23),		F3(~2, ~0x28, ~0)|RS1(~23)|SIMM13(~0),	"/,d", 0, v9a }, /* rd %tick_cmpr,r */
875*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(24),		F3(~2, ~0x28, ~0)|RS1(~24)|SIMM13(~0),	"/,d", 0, v9b }, /* rd %sys_tick,r */
876*3d8817e4Smiod { "rd",	F3(2, 0x28, 0)|RS1(25),		F3(~2, ~0x28, ~0)|RS1(~25)|SIMM13(~0),	"/,d", 0, v9b }, /* rd %sys_tick_cmpr,r */
877*3d8817e4Smiod 
878*3d8817e4Smiod { "rdpr",	F3(2, 0x2a, 0),		F3(~2, ~0x2a, ~0)|SIMM13(~0),	"?,d", 0, v9 },   /* rdpr %priv,r */
879*3d8817e4Smiod { "wrpr",	F3(2, 0x32, 0),		F3(~2, ~0x32, ~0),		"1,2,!", 0, v9 }, /* wrpr r1,r2,%priv */
880*3d8817e4Smiod { "wrpr",	F3(2, 0x32, 0),		F3(~2, ~0x32, ~0)|SIMM13(~0),	"1,!", 0, v9 },   /* wrpr r1,%priv */
881*3d8817e4Smiod { "wrpr",	F3(2, 0x32, 1),		F3(~2, ~0x32, ~1),		"1,i,!", 0, v9 }, /* wrpr r1,i,%priv */
882*3d8817e4Smiod { "wrpr",	F3(2, 0x32, 1),		F3(~2, ~0x32, ~1),		"i,1,!", F_ALIAS, v9 }, /* wrpr i,r1,%priv */
883*3d8817e4Smiod { "wrpr",	F3(2, 0x32, 1),		F3(~2, ~0x32, ~1)|RS1(~0),	"i,!", 0, v9 },   /* wrpr i,%priv */
884*3d8817e4Smiod 
885*3d8817e4Smiod { "rdhpr",	F3(2, 0x29, 0),		F3(~2, ~0x29, ~0)|SIMM13(~0),	"$,d", 0, v9 },   /* rdhpr %hpriv,r */
886*3d8817e4Smiod { "wrhpr",	F3(2, 0x33, 0),		F3(~2, ~0x33, ~0),		"1,2,%", 0, v9 }, /* wrhpr r1,r2,%hpriv */
887*3d8817e4Smiod { "wrhpr",	F3(2, 0x33, 0),		F3(~2, ~0x33, ~0)|SIMM13(~0),	"1,%", 0, v9 },   /* wrhpr r1,%hpriv */
888*3d8817e4Smiod { "wrhpr",	F3(2, 0x33, 1),		F3(~2, ~0x33, ~1),		"1,i,%", 0, v9 }, /* wrhpr r1,i,%hpriv */
889*3d8817e4Smiod { "wrhpr",	F3(2, 0x33, 1),		F3(~2, ~0x33, ~1),		"i,1,%", F_ALIAS, v9 }, /* wrhpr i,r1,%hpriv */
890*3d8817e4Smiod { "wrhpr",	F3(2, 0x33, 1),		F3(~2, ~0x33, ~1)|RS1(~0),	"i,%", 0, v9 },   /* wrhpr i,%hpriv */
891*3d8817e4Smiod 
892*3d8817e4Smiod /* ??? This group seems wrong.  A three operand move?  */
893*3d8817e4Smiod { "mov",	F3(2, 0x30, 0), F3(~2, ~0x30, ~0)|ASI(~0),		"1,2,m", F_ALIAS, v8 }, /* wr r,r,%asrX */
894*3d8817e4Smiod { "mov",	F3(2, 0x30, 1), F3(~2, ~0x30, ~1),			"1,i,m", F_ALIAS, v8 }, /* wr r,i,%asrX */
895*3d8817e4Smiod { "mov",	F3(2, 0x30, 0), F3(~2, ~0x30, ~0)|RD_G0|ASI(~0),	"1,2,y", F_ALIAS, v6 }, /* wr r,r,%y */
896*3d8817e4Smiod { "mov",	F3(2, 0x30, 1), F3(~2, ~0x30, ~1)|RD_G0,		"1,i,y", F_ALIAS, v6 }, /* wr r,i,%y */
897*3d8817e4Smiod { "mov",	F3(2, 0x31, 0), F3(~2, ~0x31, ~0)|RD_G0|ASI(~0),	"1,2,p", F_ALIAS, v6notv9 }, /* wr r,r,%psr */
898*3d8817e4Smiod { "mov",	F3(2, 0x31, 1), F3(~2, ~0x31, ~1)|RD_G0,		"1,i,p", F_ALIAS, v6notv9 }, /* wr r,i,%psr */
899*3d8817e4Smiod { "mov",	F3(2, 0x32, 0), F3(~2, ~0x32, ~0)|RD_G0|ASI(~0),	"1,2,w", F_ALIAS, v6notv9 }, /* wr r,r,%wim */
900*3d8817e4Smiod { "mov",	F3(2, 0x32, 1), F3(~2, ~0x32, ~1)|RD_G0,		"1,i,w", F_ALIAS, v6notv9 }, /* wr r,i,%wim */
901*3d8817e4Smiod { "mov",	F3(2, 0x33, 0), F3(~2, ~0x33, ~0)|RD_G0|ASI(~0),	"1,2,t", F_ALIAS, v6notv9 }, /* wr r,r,%tbr */
902*3d8817e4Smiod { "mov",	F3(2, 0x33, 1), F3(~2, ~0x33, ~1)|RD_G0,		"1,i,t", F_ALIAS, v6notv9 }, /* wr r,i,%tbr */
903*3d8817e4Smiod 
904*3d8817e4Smiod { "mov",	F3(2, 0x28, 0), F3(~2, ~0x28, ~0)|SIMM13(~0),		"M,d", F_ALIAS, v8 }, /* rd %asr1,r */
905*3d8817e4Smiod { "mov",	F3(2, 0x28, 0), F3(~2, ~0x28, ~0)|RS1_G0|SIMM13(~0),	"y,d", F_ALIAS, v6 }, /* rd %y,r */
906*3d8817e4Smiod { "mov",	F3(2, 0x29, 0), F3(~2, ~0x29, ~0)|RS1_G0|SIMM13(~0),	"p,d", F_ALIAS, v6notv9 }, /* rd %psr,r */
907*3d8817e4Smiod { "mov",	F3(2, 0x2a, 0), F3(~2, ~0x2a, ~0)|RS1_G0|SIMM13(~0),	"w,d", F_ALIAS, v6notv9 }, /* rd %wim,r */
908*3d8817e4Smiod { "mov",	F3(2, 0x2b, 0), F3(~2, ~0x2b, ~0)|RS1_G0|SIMM13(~0),	"t,d", F_ALIAS, v6notv9 }, /* rd %tbr,r */
909*3d8817e4Smiod 
910*3d8817e4Smiod { "mov",	F3(2, 0x30, 0), F3(~2, ~0x30, ~0)|ASI_RS2(~0),		"1,m", F_ALIAS, v8 }, /* wr rs1,%g0,%asrX */
911*3d8817e4Smiod { "mov",	F3(2, 0x30, 1), F3(~2, ~0x30, ~1),			"i,m", F_ALIAS, v8 }, /* wr %g0,i,%asrX */
912*3d8817e4Smiod { "mov",	F3(2, 0x30, 1), F3(~2, ~0x30, ~1)|SIMM13(~0),		"1,m", F_ALIAS, v8 }, /* wr rs1,0,%asrX */
913*3d8817e4Smiod { "mov",	F3(2, 0x30, 0), F3(~2, ~0x30, ~0)|RD_G0|ASI_RS2(~0),	"1,y", F_ALIAS, v6 }, /* wr rs1,%g0,%y */
914*3d8817e4Smiod { "mov",	F3(2, 0x30, 1), F3(~2, ~0x30, ~1)|RD_G0,		"i,y", F_ALIAS, v6 }, /* wr %g0,i,%y */
915*3d8817e4Smiod { "mov",	F3(2, 0x30, 1), F3(~2, ~0x30, ~1)|RD_G0|SIMM13(~0),	"1,y", F_ALIAS, v6 }, /* wr rs1,0,%y */
916*3d8817e4Smiod { "mov",	F3(2, 0x31, 0), F3(~2, ~0x31, ~0)|RD_G0|ASI_RS2(~0),	"1,p", F_ALIAS, v6notv9 }, /* wr rs1,%g0,%psr */
917*3d8817e4Smiod { "mov",	F3(2, 0x31, 1), F3(~2, ~0x31, ~1)|RD_G0,		"i,p", F_ALIAS, v6notv9 }, /* wr %g0,i,%psr */
918*3d8817e4Smiod { "mov",	F3(2, 0x31, 1), F3(~2, ~0x31, ~1)|RD_G0|SIMM13(~0),	"1,p", F_ALIAS, v6notv9 }, /* wr rs1,0,%psr */
919*3d8817e4Smiod { "mov",	F3(2, 0x32, 0), F3(~2, ~0x32, ~0)|RD_G0|ASI_RS2(~0),	"1,w", F_ALIAS, v6notv9 }, /* wr rs1,%g0,%wim */
920*3d8817e4Smiod { "mov",	F3(2, 0x32, 1), F3(~2, ~0x32, ~1)|RD_G0,		"i,w", F_ALIAS, v6notv9 }, /* wr %g0,i,%wim */
921*3d8817e4Smiod { "mov",	F3(2, 0x32, 1), F3(~2, ~0x32, ~1)|RD_G0|SIMM13(~0),	"1,w", F_ALIAS, v6notv9 }, /* wr rs1,0,%wim */
922*3d8817e4Smiod { "mov",	F3(2, 0x33, 0), F3(~2, ~0x33, ~0)|RD_G0|ASI_RS2(~0),	"1,t", F_ALIAS, v6notv9 }, /* wr rs1,%g0,%tbr */
923*3d8817e4Smiod { "mov",	F3(2, 0x33, 1), F3(~2, ~0x33, ~1)|RD_G0,		"i,t", F_ALIAS, v6notv9 }, /* wr %g0,i,%tbr */
924*3d8817e4Smiod { "mov",	F3(2, 0x33, 1), F3(~2, ~0x33, ~1)|RD_G0|SIMM13(~0),	"1,t", F_ALIAS, v6notv9 }, /* wr rs1,0,%tbr */
925*3d8817e4Smiod 
926*3d8817e4Smiod { "mov",	F3(2, 0x02, 0), F3(~2, ~0x02, ~0)|RS1_G0|ASI(~0),	"2,d", 0, v6 }, /* or %g0,rs2,d */
927*3d8817e4Smiod { "mov",	F3(2, 0x02, 1), F3(~2, ~0x02, ~1)|RS1_G0,		"i,d", 0, v6 }, /* or %g0,i,d	*/
928*3d8817e4Smiod { "mov",        F3(2, 0x02, 0), F3(~2, ~0x02, ~0)|ASI_RS2(~0),		"1,d", 0, v6 }, /* or rs1,%g0,d   */
929*3d8817e4Smiod { "mov",        F3(2, 0x02, 1), F3(~2, ~0x02, ~1)|SIMM13(~0),		"1,d", 0, v6 }, /* or rs1,0,d */
930*3d8817e4Smiod 
931*3d8817e4Smiod { "or",	F3(2, 0x02, 0), F3(~2, ~0x02, ~0)|ASI(~0),	"1,2,d", 0, v6 },
932*3d8817e4Smiod { "or",	F3(2, 0x02, 1), F3(~2, ~0x02, ~1),		"1,i,d", 0, v6 },
933*3d8817e4Smiod { "or",	F3(2, 0x02, 1), F3(~2, ~0x02, ~1),		"i,1,d", 0, v6 },
934*3d8817e4Smiod 
935*3d8817e4Smiod { "bset",	F3(2, 0x02, 0), F3(~2, ~0x02, ~0)|ASI(~0),	"2,r", F_ALIAS, v6 },	/* or rd,rs2,rd */
936*3d8817e4Smiod { "bset",	F3(2, 0x02, 1), F3(~2, ~0x02, ~1),		"i,r", F_ALIAS, v6 },	/* or rd,i,rd */
937*3d8817e4Smiod 
938*3d8817e4Smiod /* This is not a commutative instruction.  */
939*3d8817e4Smiod { "andn",	F3(2, 0x05, 0), F3(~2, ~0x05, ~0)|ASI(~0),	"1,2,d", 0, v6 },
940*3d8817e4Smiod { "andn",	F3(2, 0x05, 1), F3(~2, ~0x05, ~1),		"1,i,d", 0, v6 },
941*3d8817e4Smiod 
942*3d8817e4Smiod /* This is not a commutative instruction.  */
943*3d8817e4Smiod { "andncc",	F3(2, 0x15, 0), F3(~2, ~0x15, ~0)|ASI(~0),	"1,2,d", 0, v6 },
944*3d8817e4Smiod { "andncc",	F3(2, 0x15, 1), F3(~2, ~0x15, ~1),		"1,i,d", 0, v6 },
945*3d8817e4Smiod 
946*3d8817e4Smiod { "bclr",	F3(2, 0x05, 0), F3(~2, ~0x05, ~0)|ASI(~0),	"2,r", F_ALIAS, v6 },	/* andn rd,rs2,rd */
947*3d8817e4Smiod { "bclr",	F3(2, 0x05, 1), F3(~2, ~0x05, ~1),		"i,r", F_ALIAS, v6 },	/* andn rd,i,rd */
948*3d8817e4Smiod 
949*3d8817e4Smiod { "cmp",	F3(2, 0x14, 0), F3(~2, ~0x14, ~0)|RD_G0|ASI(~0),	"1,2", 0, v6 },	/* subcc rs1,rs2,%g0 */
950*3d8817e4Smiod { "cmp",	F3(2, 0x14, 1), F3(~2, ~0x14, ~1)|RD_G0,		"1,i", 0, v6 },	/* subcc rs1,i,%g0 */
951*3d8817e4Smiod 
952*3d8817e4Smiod { "sub",	F3(2, 0x04, 0), F3(~2, ~0x04, ~0)|ASI(~0),	"1,2,d", 0, v6 },
953*3d8817e4Smiod { "sub",	F3(2, 0x04, 1), F3(~2, ~0x04, ~1),		"1,i,d", 0, v6 },
954*3d8817e4Smiod 
955*3d8817e4Smiod { "subcc",	F3(2, 0x14, 0), F3(~2, ~0x14, ~0)|ASI(~0),	"1,2,d", 0, v6 },
956*3d8817e4Smiod { "subcc",	F3(2, 0x14, 1), F3(~2, ~0x14, ~1),		"1,i,d", 0, v6 },
957*3d8817e4Smiod 
958*3d8817e4Smiod { "subx",	F3(2, 0x0c, 0), F3(~2, ~0x0c, ~0)|ASI(~0),	"1,2,d", 0, v6notv9 },
959*3d8817e4Smiod { "subx",	F3(2, 0x0c, 1), F3(~2, ~0x0c, ~1),		"1,i,d", 0, v6notv9 },
960*3d8817e4Smiod { "subc",	F3(2, 0x0c, 0), F3(~2, ~0x0c, ~0)|ASI(~0),	"1,2,d", 0, v9 },
961*3d8817e4Smiod { "subc",	F3(2, 0x0c, 1), F3(~2, ~0x0c, ~1),		"1,i,d", 0, v9 },
962*3d8817e4Smiod 
963*3d8817e4Smiod { "subxcc",	F3(2, 0x1c, 0), F3(~2, ~0x1c, ~0)|ASI(~0),	"1,2,d", 0, v6notv9 },
964*3d8817e4Smiod { "subxcc",	F3(2, 0x1c, 1), F3(~2, ~0x1c, ~1),		"1,i,d", 0, v6notv9 },
965*3d8817e4Smiod { "subccc",	F3(2, 0x1c, 0), F3(~2, ~0x1c, ~0)|ASI(~0),	"1,2,d", 0, v9 },
966*3d8817e4Smiod { "subccc",	F3(2, 0x1c, 1), F3(~2, ~0x1c, ~1),		"1,i,d", 0, v9 },
967*3d8817e4Smiod 
968*3d8817e4Smiod { "and",	F3(2, 0x01, 0), F3(~2, ~0x01, ~0)|ASI(~0),	"1,2,d", 0, v6 },
969*3d8817e4Smiod { "and",	F3(2, 0x01, 1), F3(~2, ~0x01, ~1),		"1,i,d", 0, v6 },
970*3d8817e4Smiod { "and",	F3(2, 0x01, 1), F3(~2, ~0x01, ~1),		"i,1,d", 0, v6 },
971*3d8817e4Smiod 
972*3d8817e4Smiod { "andcc",	F3(2, 0x11, 0), F3(~2, ~0x11, ~0)|ASI(~0),	"1,2,d", 0, v6 },
973*3d8817e4Smiod { "andcc",	F3(2, 0x11, 1), F3(~2, ~0x11, ~1),		"1,i,d", 0, v6 },
974*3d8817e4Smiod { "andcc",	F3(2, 0x11, 1), F3(~2, ~0x11, ~1),		"i,1,d", 0, v6 },
975*3d8817e4Smiod 
976*3d8817e4Smiod { "dec",	F3(2, 0x04, 1)|SIMM13(0x1), F3(~2, ~0x04, ~1)|SIMM13(~0x0001), "r", F_ALIAS, v6 },	/* sub rd,1,rd */
977*3d8817e4Smiod { "dec",	F3(2, 0x04, 1),		    F3(~2, ~0x04, ~1),		       "i,r", F_ALIAS, v8 },	/* sub rd,imm,rd */
978*3d8817e4Smiod { "deccc",	F3(2, 0x14, 1)|SIMM13(0x1), F3(~2, ~0x14, ~1)|SIMM13(~0x0001), "r", F_ALIAS, v6 },	/* subcc rd,1,rd */
979*3d8817e4Smiod { "deccc",	F3(2, 0x14, 1),		    F3(~2, ~0x14, ~1),		       "i,r", F_ALIAS, v8 },	/* subcc rd,imm,rd */
980*3d8817e4Smiod { "inc",	F3(2, 0x00, 1)|SIMM13(0x1), F3(~2, ~0x00, ~1)|SIMM13(~0x0001), "r", F_ALIAS, v6 },	/* add rd,1,rd */
981*3d8817e4Smiod { "inc",	F3(2, 0x00, 1),		    F3(~2, ~0x00, ~1),		       "i,r", F_ALIAS, v8 },	/* add rd,imm,rd */
982*3d8817e4Smiod { "inccc",	F3(2, 0x10, 1)|SIMM13(0x1), F3(~2, ~0x10, ~1)|SIMM13(~0x0001), "r", F_ALIAS, v6 },	/* addcc rd,1,rd */
983*3d8817e4Smiod { "inccc",	F3(2, 0x10, 1),		    F3(~2, ~0x10, ~1),		       "i,r", F_ALIAS, v8 },	/* addcc rd,imm,rd */
984*3d8817e4Smiod 
985*3d8817e4Smiod { "btst",	F3(2, 0x11, 0), F3(~2, ~0x11, ~0)|RD_G0|ASI(~0), "1,2", F_ALIAS, v6 },	/* andcc rs1,rs2,%g0 */
986*3d8817e4Smiod { "btst",	F3(2, 0x11, 1), F3(~2, ~0x11, ~1)|RD_G0, "i,1", F_ALIAS, v6 },	/* andcc rs1,i,%g0 */
987*3d8817e4Smiod 
988*3d8817e4Smiod { "neg",	F3(2, 0x04, 0), F3(~2, ~0x04, ~0)|RS1_G0|ASI(~0), "2,d", F_ALIAS, v6 }, /* sub %g0,rs2,rd */
989*3d8817e4Smiod { "neg",	F3(2, 0x04, 0), F3(~2, ~0x04, ~0)|RS1_G0|ASI(~0), "O", F_ALIAS, v6 }, /* sub %g0,rd,rd */
990*3d8817e4Smiod 
991*3d8817e4Smiod { "add",	F3(2, 0x00, 0), F3(~2, ~0x00, ~0)|ASI(~0),	"1,2,d", 0, v6 },
992*3d8817e4Smiod { "add",	F3(2, 0x00, 1), F3(~2, ~0x00, ~1),		"1,i,d", 0, v6 },
993*3d8817e4Smiod { "add",	F3(2, 0x00, 1), F3(~2, ~0x00, ~1),		"i,1,d", 0, v6 },
994*3d8817e4Smiod { "addcc",	F3(2, 0x10, 0), F3(~2, ~0x10, ~0)|ASI(~0),	"1,2,d", 0, v6 },
995*3d8817e4Smiod { "addcc",	F3(2, 0x10, 1), F3(~2, ~0x10, ~1),		"1,i,d", 0, v6 },
996*3d8817e4Smiod { "addcc",	F3(2, 0x10, 1), F3(~2, ~0x10, ~1),		"i,1,d", 0, v6 },
997*3d8817e4Smiod 
998*3d8817e4Smiod { "addx",	F3(2, 0x08, 0), F3(~2, ~0x08, ~0)|ASI(~0),	"1,2,d", 0, v6notv9 },
999*3d8817e4Smiod { "addx",	F3(2, 0x08, 1), F3(~2, ~0x08, ~1),		"1,i,d", 0, v6notv9 },
1000*3d8817e4Smiod { "addx",	F3(2, 0x08, 1), F3(~2, ~0x08, ~1),		"i,1,d", 0, v6notv9 },
1001*3d8817e4Smiod { "addc",	F3(2, 0x08, 0), F3(~2, ~0x08, ~0)|ASI(~0),	"1,2,d", 0, v9 },
1002*3d8817e4Smiod { "addc",	F3(2, 0x08, 1), F3(~2, ~0x08, ~1),		"1,i,d", 0, v9 },
1003*3d8817e4Smiod { "addc",	F3(2, 0x08, 1), F3(~2, ~0x08, ~1),		"i,1,d", 0, v9 },
1004*3d8817e4Smiod 
1005*3d8817e4Smiod { "addxcc",	F3(2, 0x18, 0), F3(~2, ~0x18, ~0)|ASI(~0),	"1,2,d", 0, v6notv9 },
1006*3d8817e4Smiod { "addxcc",	F3(2, 0x18, 1), F3(~2, ~0x18, ~1),		"1,i,d", 0, v6notv9 },
1007*3d8817e4Smiod { "addxcc",	F3(2, 0x18, 1), F3(~2, ~0x18, ~1),		"i,1,d", 0, v6notv9 },
1008*3d8817e4Smiod { "addccc",	F3(2, 0x18, 0), F3(~2, ~0x18, ~0)|ASI(~0),	"1,2,d", 0, v9 },
1009*3d8817e4Smiod { "addccc",	F3(2, 0x18, 1), F3(~2, ~0x18, ~1),		"1,i,d", 0, v9 },
1010*3d8817e4Smiod { "addccc",	F3(2, 0x18, 1), F3(~2, ~0x18, ~1),		"i,1,d", 0, v9 },
1011*3d8817e4Smiod 
1012*3d8817e4Smiod { "smul",	F3(2, 0x0b, 0), F3(~2, ~0x0b, ~0)|ASI(~0),	"1,2,d", 0, v8 },
1013*3d8817e4Smiod { "smul",	F3(2, 0x0b, 1), F3(~2, ~0x0b, ~1),		"1,i,d", 0, v8 },
1014*3d8817e4Smiod { "smul",	F3(2, 0x0b, 1), F3(~2, ~0x0b, ~1),		"i,1,d", 0, v8 },
1015*3d8817e4Smiod { "smulcc",	F3(2, 0x1b, 0), F3(~2, ~0x1b, ~0)|ASI(~0),	"1,2,d", 0, v8 },
1016*3d8817e4Smiod { "smulcc",	F3(2, 0x1b, 1), F3(~2, ~0x1b, ~1),		"1,i,d", 0, v8 },
1017*3d8817e4Smiod { "smulcc",	F3(2, 0x1b, 1), F3(~2, ~0x1b, ~1),		"i,1,d", 0, v8 },
1018*3d8817e4Smiod { "umul",	F3(2, 0x0a, 0), F3(~2, ~0x0a, ~0)|ASI(~0),	"1,2,d", 0, v8 },
1019*3d8817e4Smiod { "umul",	F3(2, 0x0a, 1), F3(~2, ~0x0a, ~1),		"1,i,d", 0, v8 },
1020*3d8817e4Smiod { "umul",	F3(2, 0x0a, 1), F3(~2, ~0x0a, ~1),		"i,1,d", 0, v8 },
1021*3d8817e4Smiod { "umulcc",	F3(2, 0x1a, 0), F3(~2, ~0x1a, ~0)|ASI(~0),	"1,2,d", 0, v8 },
1022*3d8817e4Smiod { "umulcc",	F3(2, 0x1a, 1), F3(~2, ~0x1a, ~1),		"1,i,d", 0, v8 },
1023*3d8817e4Smiod { "umulcc",	F3(2, 0x1a, 1), F3(~2, ~0x1a, ~1),		"i,1,d", 0, v8 },
1024*3d8817e4Smiod { "sdiv",	F3(2, 0x0f, 0), F3(~2, ~0x0f, ~0)|ASI(~0),	"1,2,d", 0, v8 },
1025*3d8817e4Smiod { "sdiv",	F3(2, 0x0f, 1), F3(~2, ~0x0f, ~1),		"1,i,d", 0, v8 },
1026*3d8817e4Smiod { "sdiv",	F3(2, 0x0f, 1), F3(~2, ~0x0f, ~1),		"i,1,d", 0, v8 },
1027*3d8817e4Smiod { "sdivcc",	F3(2, 0x1f, 0), F3(~2, ~0x1f, ~0)|ASI(~0),	"1,2,d", 0, v8 },
1028*3d8817e4Smiod { "sdivcc",	F3(2, 0x1f, 1), F3(~2, ~0x1f, ~1),		"1,i,d", 0, v8 },
1029*3d8817e4Smiod { "sdivcc",	F3(2, 0x1f, 1), F3(~2, ~0x1f, ~1),		"i,1,d", 0, v8 },
1030*3d8817e4Smiod { "udiv",	F3(2, 0x0e, 0), F3(~2, ~0x0e, ~0)|ASI(~0),	"1,2,d", 0, v8 },
1031*3d8817e4Smiod { "udiv",	F3(2, 0x0e, 1), F3(~2, ~0x0e, ~1),		"1,i,d", 0, v8 },
1032*3d8817e4Smiod { "udiv",	F3(2, 0x0e, 1), F3(~2, ~0x0e, ~1),		"i,1,d", 0, v8 },
1033*3d8817e4Smiod { "udivcc",	F3(2, 0x1e, 0), F3(~2, ~0x1e, ~0)|ASI(~0),	"1,2,d", 0, v8 },
1034*3d8817e4Smiod { "udivcc",	F3(2, 0x1e, 1), F3(~2, ~0x1e, ~1),		"1,i,d", 0, v8 },
1035*3d8817e4Smiod { "udivcc",	F3(2, 0x1e, 1), F3(~2, ~0x1e, ~1),		"i,1,d", 0, v8 },
1036*3d8817e4Smiod 
1037*3d8817e4Smiod { "mulx",	F3(2, 0x09, 0), F3(~2, ~0x09, ~0)|ASI(~0),	"1,2,d", 0, v9 },
1038*3d8817e4Smiod { "mulx",	F3(2, 0x09, 1), F3(~2, ~0x09, ~1),		"1,i,d", 0, v9 },
1039*3d8817e4Smiod { "sdivx",	F3(2, 0x2d, 0), F3(~2, ~0x2d, ~0)|ASI(~0),	"1,2,d", 0, v9 },
1040*3d8817e4Smiod { "sdivx",	F3(2, 0x2d, 1), F3(~2, ~0x2d, ~1),		"1,i,d", 0, v9 },
1041*3d8817e4Smiod { "udivx",	F3(2, 0x0d, 0), F3(~2, ~0x0d, ~0)|ASI(~0),	"1,2,d", 0, v9 },
1042*3d8817e4Smiod { "udivx",	F3(2, 0x0d, 1), F3(~2, ~0x0d, ~1),		"1,i,d", 0, v9 },
1043*3d8817e4Smiod 
1044*3d8817e4Smiod { "call",	F1(0x1), F1(~0x1), "L", F_JSR|F_DELAYED, v6 },
1045*3d8817e4Smiod { "call",	F1(0x1), F1(~0x1), "L,#", F_JSR|F_DELAYED, v6 },
1046*3d8817e4Smiod 
1047*3d8817e4Smiod { "call",	F3(2, 0x38, 0)|RD(0xf), F3(~2, ~0x38, ~0)|RD(~0xf)|ASI(~0),	"1+2", F_JSR|F_DELAYED, v6 }, /* jmpl rs1+rs2,%o7 */
1048*3d8817e4Smiod { "call",	F3(2, 0x38, 0)|RD(0xf), F3(~2, ~0x38, ~0)|RD(~0xf)|ASI(~0),	"1+2,#", F_JSR|F_DELAYED, v6 },
1049*3d8817e4Smiod { "call",	F3(2, 0x38, 0)|RD(0xf), F3(~2, ~0x38, ~0)|RD(~0xf)|ASI_RS2(~0),	"1", F_JSR|F_DELAYED, v6 }, /* jmpl rs1+%g0,%o7 */
1050*3d8817e4Smiod { "call",	F3(2, 0x38, 0)|RD(0xf), F3(~2, ~0x38, ~0)|RD(~0xf)|ASI_RS2(~0),	"1,#", F_JSR|F_DELAYED, v6 },
1051*3d8817e4Smiod { "call",	F3(2, 0x38, 1)|RD(0xf), F3(~2, ~0x38, ~1)|RD(~0xf),		"1+i", F_JSR|F_DELAYED, v6 }, /* jmpl rs1+i,%o7 */
1052*3d8817e4Smiod { "call",	F3(2, 0x38, 1)|RD(0xf), F3(~2, ~0x38, ~1)|RD(~0xf),		"1+i,#", F_JSR|F_DELAYED, v6 },
1053*3d8817e4Smiod { "call",	F3(2, 0x38, 1)|RD(0xf), F3(~2, ~0x38, ~1)|RD(~0xf),		"i+1", F_JSR|F_DELAYED, v6 }, /* jmpl i+rs1,%o7 */
1054*3d8817e4Smiod { "call",	F3(2, 0x38, 1)|RD(0xf), F3(~2, ~0x38, ~1)|RD(~0xf),		"i+1,#", F_JSR|F_DELAYED, v6 },
1055*3d8817e4Smiod { "call",	F3(2, 0x38, 1)|RD(0xf), F3(~2, ~0x38, ~1)|RD(~0xf)|RS1_G0,	"i", F_JSR|F_DELAYED, v6 }, /* jmpl %g0+i,%o7 */
1056*3d8817e4Smiod { "call",	F3(2, 0x38, 1)|RD(0xf), F3(~2, ~0x38, ~1)|RD(~0xf)|RS1_G0,	"i,#", F_JSR|F_DELAYED, v6 },
1057*3d8817e4Smiod { "call",	F3(2, 0x38, 1)|RD(0xf), F3(~2, ~0x38, ~1)|RD(~0xf)|SIMM13(~0),	"1", F_JSR|F_DELAYED, v6 }, /* jmpl rs1+0,%o7 */
1058*3d8817e4Smiod { "call",	F3(2, 0x38, 1)|RD(0xf), F3(~2, ~0x38, ~1)|RD(~0xf)|SIMM13(~0),	"1,#", F_JSR|F_DELAYED, v6 },
1059*3d8817e4Smiod 
1060*3d8817e4Smiod 
1061*3d8817e4Smiod /* Conditional instructions.
1062*3d8817e4Smiod 
1063*3d8817e4Smiod    Because this part of the table was such a mess earlier, I have
1064*3d8817e4Smiod    macrofied it so that all the branches and traps are generated from
1065*3d8817e4Smiod    a single-line description of each condition value.  John Gilmore. */
1066*3d8817e4Smiod 
1067*3d8817e4Smiod /* Define branches -- one annulled, one without, etc. */
1068*3d8817e4Smiod #define br(opcode, mask, lose, flags) \
1069*3d8817e4Smiod  { opcode, (mask)|ANNUL, (lose),       ",a l",   (flags), v6 }, \
1070*3d8817e4Smiod  { opcode, (mask)      , (lose)|ANNUL, "l",     (flags), v6 }
1071*3d8817e4Smiod 
1072*3d8817e4Smiod #define brx(opcode, mask, lose, flags) /* v9 */ \
1073*3d8817e4Smiod  { opcode, (mask)|(2<<20)|BPRED, ANNUL|(lose), "Z,G",      (flags), v9 }, \
1074*3d8817e4Smiod  { opcode, (mask)|(2<<20)|BPRED, ANNUL|(lose), ",T Z,G",   (flags), v9 }, \
1075*3d8817e4Smiod  { opcode, (mask)|(2<<20)|BPRED|ANNUL, (lose), ",a Z,G",   (flags), v9 }, \
1076*3d8817e4Smiod  { opcode, (mask)|(2<<20)|BPRED|ANNUL, (lose), ",a,T Z,G", (flags), v9 }, \
1077*3d8817e4Smiod  { opcode, (mask)|(2<<20), ANNUL|BPRED|(lose), ",N Z,G",   (flags), v9 }, \
1078*3d8817e4Smiod  { opcode, (mask)|(2<<20)|ANNUL, BPRED|(lose), ",a,N Z,G", (flags), v9 }, \
1079*3d8817e4Smiod  { opcode, (mask)|BPRED, ANNUL|(lose)|(2<<20), "z,G",      (flags), v9 }, \
1080*3d8817e4Smiod  { opcode, (mask)|BPRED, ANNUL|(lose)|(2<<20), ",T z,G",   (flags), v9 }, \
1081*3d8817e4Smiod  { opcode, (mask)|BPRED|ANNUL, (lose)|(2<<20), ",a z,G",   (flags), v9 }, \
1082*3d8817e4Smiod  { opcode, (mask)|BPRED|ANNUL, (lose)|(2<<20), ",a,T z,G", (flags), v9 }, \
1083*3d8817e4Smiod  { opcode, (mask), ANNUL|BPRED|(lose)|(2<<20), ",N z,G",   (flags), v9 }, \
1084*3d8817e4Smiod  { opcode, (mask)|ANNUL, BPRED|(lose)|(2<<20), ",a,N z,G", (flags), v9 }
1085*3d8817e4Smiod 
1086*3d8817e4Smiod /* Define four traps: reg+reg, reg + immediate, immediate alone, reg alone. */
1087*3d8817e4Smiod #define tr(opcode, mask, lose, flags) \
1088*3d8817e4Smiod  { opcode, (mask)|(2<<11)|IMMED, (lose)|RS1_G0,	"Z,i",   (flags), v9 }, /* %g0 + imm */ \
1089*3d8817e4Smiod  { opcode, (mask)|(2<<11)|IMMED, (lose),	"Z,1+i", (flags), v9 }, /* rs1 + imm */ \
1090*3d8817e4Smiod  { opcode, (mask)|(2<<11), IMMED|(lose),	"Z,1+2", (flags), v9 }, /* rs1 + rs2 */ \
1091*3d8817e4Smiod  { opcode, (mask)|(2<<11), IMMED|(lose)|RS2_G0,	"Z,1",   (flags), v9 }, /* rs1 + %g0 */ \
1092*3d8817e4Smiod  { opcode, (mask)|IMMED, (lose)|RS1_G0,	"z,i",   (flags)|F_ALIAS, v9 }, /* %g0 + imm */ \
1093*3d8817e4Smiod  { opcode, (mask)|IMMED, (lose),	"z,1+i", (flags)|F_ALIAS, v9 }, /* rs1 + imm */ \
1094*3d8817e4Smiod  { opcode, (mask), IMMED|(lose),	"z,1+2", (flags)|F_ALIAS, v9 }, /* rs1 + rs2 */ \
1095*3d8817e4Smiod  { opcode, (mask), IMMED|(lose)|RS2_G0,	"z,1",   (flags)|F_ALIAS, v9 }, /* rs1 + %g0 */ \
1096*3d8817e4Smiod  { opcode, (mask)|IMMED, (lose)|RS1_G0,		"i",     (flags), v6 }, /* %g0 + imm */ \
1097*3d8817e4Smiod  { opcode, (mask)|IMMED, (lose),		"1+i",   (flags), v6 }, /* rs1 + imm */ \
1098*3d8817e4Smiod  { opcode, (mask), IMMED|(lose),		"1+2",   (flags), v6 }, /* rs1 + rs2 */ \
1099*3d8817e4Smiod  { opcode, (mask), IMMED|(lose)|RS2_G0,		"1",     (flags), v6 } /* rs1 + %g0 */
1100*3d8817e4Smiod 
1101*3d8817e4Smiod /* v9: We must put `brx' before `br', to ensure that we never match something
1102*3d8817e4Smiod    v9: against an expression unless it is an expression.  Otherwise, we end
1103*3d8817e4Smiod    v9: up with undefined symbol tables entries, because they get added, but
1104*3d8817e4Smiod    v9: are not deleted if the pattern fails to match.  */
1105*3d8817e4Smiod 
1106*3d8817e4Smiod /* Define both branches and traps based on condition mask */
1107*3d8817e4Smiod #define cond(bop, top, mask, flags) \
1108*3d8817e4Smiod   brx(bop, F2(0, 1)|(mask), F2(~0, ~1)|((~mask)&COND(~0)), F_DELAYED|(flags)), /* v9 */ \
1109*3d8817e4Smiod   br(bop,  F2(0, 2)|(mask), F2(~0, ~2)|((~mask)&COND(~0)), F_DELAYED|(flags)), \
1110*3d8817e4Smiod   tr(top,  F3(2, 0x3a, 0)|(mask), F3(~2, ~0x3a, 0)|((~mask)&COND(~0)), ((flags) & ~(F_UNBR|F_CONDBR)))
1111*3d8817e4Smiod 
1112*3d8817e4Smiod /* Define all the conditions, all the branches, all the traps.  */
1113*3d8817e4Smiod 
1114*3d8817e4Smiod /* Standard branch, trap mnemonics */
1115*3d8817e4Smiod cond ("b",	"ta",   CONDA, F_UNBR),
1116*3d8817e4Smiod /* Alternative form (just for assembly, not for disassembly) */
1117*3d8817e4Smiod cond ("ba",	"t",    CONDA, F_UNBR|F_ALIAS),
1118*3d8817e4Smiod 
1119*3d8817e4Smiod cond ("bcc",	"tcc",  CONDCC, F_CONDBR),
1120*3d8817e4Smiod cond ("bcs",	"tcs",  CONDCS, F_CONDBR),
1121*3d8817e4Smiod cond ("be",	"te",   CONDE, F_CONDBR),
1122*3d8817e4Smiod cond ("beq",	"teq",  CONDE, F_CONDBR|F_ALIAS),
1123*3d8817e4Smiod cond ("bg",	"tg",   CONDG, F_CONDBR),
1124*3d8817e4Smiod cond ("bgt",	"tgt",  CONDG, F_CONDBR|F_ALIAS),
1125*3d8817e4Smiod cond ("bge",	"tge",  CONDGE, F_CONDBR),
1126*3d8817e4Smiod cond ("bgeu",	"tgeu", CONDGEU, F_CONDBR|F_ALIAS), /* for cc */
1127*3d8817e4Smiod cond ("bgu",	"tgu",  CONDGU, F_CONDBR),
1128*3d8817e4Smiod cond ("bl",	"tl",   CONDL, F_CONDBR),
1129*3d8817e4Smiod cond ("blt",	"tlt",  CONDL, F_CONDBR|F_ALIAS),
1130*3d8817e4Smiod cond ("ble",	"tle",  CONDLE, F_CONDBR),
1131*3d8817e4Smiod cond ("bleu",	"tleu", CONDLEU, F_CONDBR),
1132*3d8817e4Smiod cond ("blu",	"tlu",  CONDLU, F_CONDBR|F_ALIAS), /* for cs */
1133*3d8817e4Smiod cond ("bn",	"tn",   CONDN, F_CONDBR),
1134*3d8817e4Smiod cond ("bne",	"tne",  CONDNE, F_CONDBR),
1135*3d8817e4Smiod cond ("bneg",	"tneg", CONDNEG, F_CONDBR),
1136*3d8817e4Smiod cond ("bnz",	"tnz",  CONDNZ, F_CONDBR|F_ALIAS), /* for ne */
1137*3d8817e4Smiod cond ("bpos",	"tpos", CONDPOS, F_CONDBR),
1138*3d8817e4Smiod cond ("bvc",	"tvc",  CONDVC, F_CONDBR),
1139*3d8817e4Smiod cond ("bvs",	"tvs",  CONDVS, F_CONDBR),
1140*3d8817e4Smiod cond ("bz",	"tz",   CONDZ, F_CONDBR|F_ALIAS), /* for e */
1141*3d8817e4Smiod 
1142*3d8817e4Smiod #undef cond
1143*3d8817e4Smiod #undef br
1144*3d8817e4Smiod #undef brr /* v9 */
1145*3d8817e4Smiod #undef tr
1146*3d8817e4Smiod 
1147*3d8817e4Smiod #define brr(opcode, mask, lose, flags) /* v9 */ \
1148*3d8817e4Smiod  { opcode, (mask)|BPRED, ANNUL|(lose), "1,k",      F_DELAYED|(flags), v9 }, \
1149*3d8817e4Smiod  { opcode, (mask)|BPRED, ANNUL|(lose), ",T 1,k",   F_DELAYED|(flags), v9 }, \
1150*3d8817e4Smiod  { opcode, (mask)|BPRED|ANNUL, (lose), ",a 1,k",   F_DELAYED|(flags), v9 }, \
1151*3d8817e4Smiod  { opcode, (mask)|BPRED|ANNUL, (lose), ",a,T 1,k", F_DELAYED|(flags), v9 }, \
1152*3d8817e4Smiod  { opcode, (mask), ANNUL|BPRED|(lose), ",N 1,k",   F_DELAYED|(flags), v9 }, \
1153*3d8817e4Smiod  { opcode, (mask)|ANNUL, BPRED|(lose), ",a,N 1,k", F_DELAYED|(flags), v9 }
1154*3d8817e4Smiod 
1155*3d8817e4Smiod #define condr(bop, mask, flags) /* v9 */ \
1156*3d8817e4Smiod   brr(bop, F2(0, 3)|COND(mask), F2(~0, ~3)|COND(~(mask)), (flags)) /* v9 */
1157*3d8817e4Smiod 
1158*3d8817e4Smiod /* v9 */ condr("brnz", 0x5, F_CONDBR),
1159*3d8817e4Smiod /* v9 */ condr("brz", 0x1, F_CONDBR),
1160*3d8817e4Smiod /* v9 */ condr("brgez", 0x7, F_CONDBR),
1161*3d8817e4Smiod /* v9 */ condr("brlz", 0x3, F_CONDBR),
1162*3d8817e4Smiod /* v9 */ condr("brlez", 0x2, F_CONDBR),
1163*3d8817e4Smiod /* v9 */ condr("brgz", 0x6, F_CONDBR),
1164*3d8817e4Smiod 
1165*3d8817e4Smiod #undef condr /* v9 */
1166*3d8817e4Smiod #undef brr /* v9 */
1167*3d8817e4Smiod 
1168*3d8817e4Smiod #define movr(opcode, mask, flags) /* v9 */ \
1169*3d8817e4Smiod  { opcode, F3(2, 0x2f, 0)|RCOND(mask), F3(~2, ~0x2f, ~0)|RCOND(~(mask)), "1,2,d", (flags), v9 }, \
1170*3d8817e4Smiod  { opcode, F3(2, 0x2f, 1)|RCOND(mask), F3(~2, ~0x2f, ~1)|RCOND(~(mask)), "1,j,d", (flags), v9 }
1171*3d8817e4Smiod 
1172*3d8817e4Smiod #define fmrrs(opcode, mask, lose, flags) /* v9 */ \
1173*3d8817e4Smiod  { opcode, (mask), (lose), "1,f,g", (flags) | F_FLOAT, v9 }
1174*3d8817e4Smiod #define fmrrd(opcode, mask, lose, flags) /* v9 */ \
1175*3d8817e4Smiod  { opcode, (mask), (lose), "1,B,H", (flags) | F_FLOAT, v9 }
1176*3d8817e4Smiod #define fmrrq(opcode, mask, lose, flags) /* v9 */ \
1177*3d8817e4Smiod  { opcode, (mask), (lose), "1,R,J", (flags) | F_FLOAT, v9 }
1178*3d8817e4Smiod 
1179*3d8817e4Smiod #define fmovrs(mop, mask, flags) /* v9 */ \
1180*3d8817e4Smiod   fmrrs(mop, F3(2, 0x35, 0)|OPF_LOW5(5)|RCOND(mask), F3(~2, ~0x35, 0)|OPF_LOW5(~5)|RCOND(~(mask)), (flags)) /* v9 */
1181*3d8817e4Smiod #define fmovrd(mop, mask, flags) /* v9 */ \
1182*3d8817e4Smiod   fmrrd(mop, F3(2, 0x35, 0)|OPF_LOW5(6)|RCOND(mask), F3(~2, ~0x35, 0)|OPF_LOW5(~6)|RCOND(~(mask)), (flags)) /* v9 */
1183*3d8817e4Smiod #define fmovrq(mop, mask, flags) /* v9 */ \
1184*3d8817e4Smiod   fmrrq(mop, F3(2, 0x35, 0)|OPF_LOW5(7)|RCOND(mask), F3(~2, ~0x35, 0)|OPF_LOW5(~7)|RCOND(~(mask)), (flags)) /* v9 */
1185*3d8817e4Smiod 
1186*3d8817e4Smiod /* v9 */ movr("movrne", 0x5, 0),
1187*3d8817e4Smiod /* v9 */ movr("movre", 0x1, 0),
1188*3d8817e4Smiod /* v9 */ movr("movrgez", 0x7, 0),
1189*3d8817e4Smiod /* v9 */ movr("movrlz", 0x3, 0),
1190*3d8817e4Smiod /* v9 */ movr("movrlez", 0x2, 0),
1191*3d8817e4Smiod /* v9 */ movr("movrgz", 0x6, 0),
1192*3d8817e4Smiod /* v9 */ movr("movrnz", 0x5, F_ALIAS),
1193*3d8817e4Smiod /* v9 */ movr("movrz", 0x1, F_ALIAS),
1194*3d8817e4Smiod 
1195*3d8817e4Smiod /* v9 */ fmovrs("fmovrsne", 0x5, 0),
1196*3d8817e4Smiod /* v9 */ fmovrs("fmovrse", 0x1, 0),
1197*3d8817e4Smiod /* v9 */ fmovrs("fmovrsgez", 0x7, 0),
1198*3d8817e4Smiod /* v9 */ fmovrs("fmovrslz", 0x3, 0),
1199*3d8817e4Smiod /* v9 */ fmovrs("fmovrslez", 0x2, 0),
1200*3d8817e4Smiod /* v9 */ fmovrs("fmovrsgz", 0x6, 0),
1201*3d8817e4Smiod /* v9 */ fmovrs("fmovrsnz", 0x5, F_ALIAS),
1202*3d8817e4Smiod /* v9 */ fmovrs("fmovrsz", 0x1, F_ALIAS),
1203*3d8817e4Smiod 
1204*3d8817e4Smiod /* v9 */ fmovrd("fmovrdne", 0x5, 0),
1205*3d8817e4Smiod /* v9 */ fmovrd("fmovrde", 0x1, 0),
1206*3d8817e4Smiod /* v9 */ fmovrd("fmovrdgez", 0x7, 0),
1207*3d8817e4Smiod /* v9 */ fmovrd("fmovrdlz", 0x3, 0),
1208*3d8817e4Smiod /* v9 */ fmovrd("fmovrdlez", 0x2, 0),
1209*3d8817e4Smiod /* v9 */ fmovrd("fmovrdgz", 0x6, 0),
1210*3d8817e4Smiod /* v9 */ fmovrd("fmovrdnz", 0x5, F_ALIAS),
1211*3d8817e4Smiod /* v9 */ fmovrd("fmovrdz", 0x1, F_ALIAS),
1212*3d8817e4Smiod 
1213*3d8817e4Smiod /* v9 */ fmovrq("fmovrqne", 0x5, 0),
1214*3d8817e4Smiod /* v9 */ fmovrq("fmovrqe", 0x1, 0),
1215*3d8817e4Smiod /* v9 */ fmovrq("fmovrqgez", 0x7, 0),
1216*3d8817e4Smiod /* v9 */ fmovrq("fmovrqlz", 0x3, 0),
1217*3d8817e4Smiod /* v9 */ fmovrq("fmovrqlez", 0x2, 0),
1218*3d8817e4Smiod /* v9 */ fmovrq("fmovrqgz", 0x6, 0),
1219*3d8817e4Smiod /* v9 */ fmovrq("fmovrqnz", 0x5, F_ALIAS),
1220*3d8817e4Smiod /* v9 */ fmovrq("fmovrqz", 0x1, F_ALIAS),
1221*3d8817e4Smiod 
1222*3d8817e4Smiod #undef movr /* v9 */
1223*3d8817e4Smiod #undef fmovr /* v9 */
1224*3d8817e4Smiod #undef fmrr /* v9 */
1225*3d8817e4Smiod 
1226*3d8817e4Smiod #define movicc(opcode, cond, flags) /* v9 */ \
1227*3d8817e4Smiod   { opcode, F3(2, 0x2c, 0)|MCOND(cond,1)|ICC, F3(~2, ~0x2c, ~0)|MCOND(~cond,~1)|XCC|(1<<11), "z,2,d", flags, v9 }, \
1228*3d8817e4Smiod   { opcode, F3(2, 0x2c, 1)|MCOND(cond,1)|ICC, F3(~2, ~0x2c, ~1)|MCOND(~cond,~1)|XCC|(1<<11), "z,I,d", flags, v9 }, \
1229*3d8817e4Smiod   { opcode, F3(2, 0x2c, 0)|MCOND(cond,1)|XCC, F3(~2, ~0x2c, ~0)|MCOND(~cond,~1)|(1<<11),     "Z,2,d", flags, v9 }, \
1230*3d8817e4Smiod   { opcode, F3(2, 0x2c, 1)|MCOND(cond,1)|XCC, F3(~2, ~0x2c, ~1)|MCOND(~cond,~1)|(1<<11),     "Z,I,d", flags, v9 }
1231*3d8817e4Smiod 
1232*3d8817e4Smiod #define movfcc(opcode, fcond, flags) /* v9 */ \
1233*3d8817e4Smiod   { opcode, F3(2, 0x2c, 0)|FCC(0)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~0)|F3(~2, ~0x2c, ~0), "6,2,d", flags, v9 }, \
1234*3d8817e4Smiod   { opcode, F3(2, 0x2c, 1)|FCC(0)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~0)|F3(~2, ~0x2c, ~1), "6,I,d", flags, v9 }, \
1235*3d8817e4Smiod   { opcode, F3(2, 0x2c, 0)|FCC(1)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~1)|F3(~2, ~0x2c, ~0), "7,2,d", flags, v9 }, \
1236*3d8817e4Smiod   { opcode, F3(2, 0x2c, 1)|FCC(1)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~1)|F3(~2, ~0x2c, ~1), "7,I,d", flags, v9 }, \
1237*3d8817e4Smiod   { opcode, F3(2, 0x2c, 0)|FCC(2)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~2)|F3(~2, ~0x2c, ~0), "8,2,d", flags, v9 }, \
1238*3d8817e4Smiod   { opcode, F3(2, 0x2c, 1)|FCC(2)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~2)|F3(~2, ~0x2c, ~1), "8,I,d", flags, v9 }, \
1239*3d8817e4Smiod   { opcode, F3(2, 0x2c, 0)|FCC(3)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~3)|F3(~2, ~0x2c, ~0), "9,2,d", flags, v9 }, \
1240*3d8817e4Smiod   { opcode, F3(2, 0x2c, 1)|FCC(3)|MCOND(fcond,0), MCOND(~fcond,~0)|FCC(~3)|F3(~2, ~0x2c, ~1), "9,I,d", flags, v9 }
1241*3d8817e4Smiod 
1242*3d8817e4Smiod #define movcc(opcode, cond, fcond, flags) /* v9 */ \
1243*3d8817e4Smiod   movfcc (opcode, fcond, flags), /* v9 */ \
1244*3d8817e4Smiod   movicc (opcode, cond, flags) /* v9 */
1245*3d8817e4Smiod 
1246*3d8817e4Smiod /* v9 */ movcc  ("mova",	CONDA, FCONDA, 0),
1247*3d8817e4Smiod /* v9 */ movicc ("movcc",	CONDCC, 0),
1248*3d8817e4Smiod /* v9 */ movicc ("movgeu",	CONDGEU, F_ALIAS),
1249*3d8817e4Smiod /* v9 */ movicc ("movcs",	CONDCS, 0),
1250*3d8817e4Smiod /* v9 */ movicc ("movlu",	CONDLU, F_ALIAS),
1251*3d8817e4Smiod /* v9 */ movcc  ("move",	CONDE, FCONDE, 0),
1252*3d8817e4Smiod /* v9 */ movcc  ("movg",	CONDG, FCONDG, 0),
1253*3d8817e4Smiod /* v9 */ movcc  ("movge",	CONDGE, FCONDGE, 0),
1254*3d8817e4Smiod /* v9 */ movicc ("movgu",	CONDGU, 0),
1255*3d8817e4Smiod /* v9 */ movcc  ("movl",	CONDL, FCONDL, 0),
1256*3d8817e4Smiod /* v9 */ movcc  ("movle",	CONDLE, FCONDLE, 0),
1257*3d8817e4Smiod /* v9 */ movicc ("movleu",	CONDLEU, 0),
1258*3d8817e4Smiod /* v9 */ movfcc ("movlg",	FCONDLG, 0),
1259*3d8817e4Smiod /* v9 */ movcc  ("movn",	CONDN, FCONDN, 0),
1260*3d8817e4Smiod /* v9 */ movcc  ("movne",	CONDNE, FCONDNE, 0),
1261*3d8817e4Smiod /* v9 */ movicc ("movneg",	CONDNEG, 0),
1262*3d8817e4Smiod /* v9 */ movcc  ("movnz",	CONDNZ, FCONDNZ, F_ALIAS),
1263*3d8817e4Smiod /* v9 */ movfcc ("movo",	FCONDO, 0),
1264*3d8817e4Smiod /* v9 */ movicc ("movpos",	CONDPOS, 0),
1265*3d8817e4Smiod /* v9 */ movfcc ("movu",	FCONDU, 0),
1266*3d8817e4Smiod /* v9 */ movfcc ("movue",	FCONDUE, 0),
1267*3d8817e4Smiod /* v9 */ movfcc ("movug",	FCONDUG, 0),
1268*3d8817e4Smiod /* v9 */ movfcc ("movuge",	FCONDUGE, 0),
1269*3d8817e4Smiod /* v9 */ movfcc ("movul",	FCONDUL, 0),
1270*3d8817e4Smiod /* v9 */ movfcc ("movule",	FCONDULE, 0),
1271*3d8817e4Smiod /* v9 */ movicc ("movvc",	CONDVC, 0),
1272*3d8817e4Smiod /* v9 */ movicc ("movvs",	CONDVS, 0),
1273*3d8817e4Smiod /* v9 */ movcc  ("movz",	CONDZ, FCONDZ, F_ALIAS),
1274*3d8817e4Smiod 
1275*3d8817e4Smiod #undef movicc /* v9 */
1276*3d8817e4Smiod #undef movfcc /* v9 */
1277*3d8817e4Smiod #undef movcc /* v9 */
1278*3d8817e4Smiod 
1279*3d8817e4Smiod #define FM_SF 1		/* v9 - values for fpsize */
1280*3d8817e4Smiod #define FM_DF 2		/* v9 */
1281*3d8817e4Smiod #define FM_QF 3		/* v9 */
1282*3d8817e4Smiod 
1283*3d8817e4Smiod #define fmoviccx(opcode, fpsize, args, cond, flags) /* v9 */ \
1284*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags, v9 }, \
1285*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags, v9 }
1286*3d8817e4Smiod 
1287*3d8817e4Smiod #define fmovfccx(opcode, fpsize, args, fcond, flags) /* v9 */ \
1288*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
1289*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
1290*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
1291*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
1292*3d8817e4Smiod 
1293*3d8817e4Smiod /* FIXME: use fmovicc/fmovfcc? */ /* v9 */
1294*3d8817e4Smiod #define fmovccx(opcode, fpsize, args, cond, fcond, flags) /* v9 */ \
1295*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags | F_FLOAT, v9 }, \
1296*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
1297*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags | F_FLOAT, v9 }, \
1298*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
1299*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
1300*3d8817e4Smiod { opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
1301*3d8817e4Smiod 
1302*3d8817e4Smiod #define fmovicc(suffix, cond, flags) /* v9 */ \
1303*3d8817e4Smiod fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags),		\
1304*3d8817e4Smiod fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags),		\
1305*3d8817e4Smiod fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
1306*3d8817e4Smiod 
1307*3d8817e4Smiod #define fmovfcc(suffix, fcond, flags) /* v9 */ \
1308*3d8817e4Smiod fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags),		\
1309*3d8817e4Smiod fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags),		\
1310*3d8817e4Smiod fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
1311*3d8817e4Smiod 
1312*3d8817e4Smiod #define fmovcc(suffix, cond, fcond, flags) /* v9 */ \
1313*3d8817e4Smiod fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags),	\
1314*3d8817e4Smiod fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags),	\
1315*3d8817e4Smiod fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
1316*3d8817e4Smiod 
1317*3d8817e4Smiod /* v9 */ fmovcc  ("a", CONDA, FCONDA, 0),
1318*3d8817e4Smiod /* v9 */ fmovicc ("cc", CONDCC, 0),
1319*3d8817e4Smiod /* v9 */ fmovicc ("cs", CONDCS, 0),
1320*3d8817e4Smiod /* v9 */ fmovcc  ("e", CONDE, FCONDE, 0),
1321*3d8817e4Smiod /* v9 */ fmovcc  ("g", CONDG, FCONDG, 0),
1322*3d8817e4Smiod /* v9 */ fmovcc  ("ge", CONDGE, FCONDGE, 0),
1323*3d8817e4Smiod /* v9 */ fmovicc ("geu", CONDGEU, F_ALIAS),
1324*3d8817e4Smiod /* v9 */ fmovicc ("gu", CONDGU, 0),
1325*3d8817e4Smiod /* v9 */ fmovcc  ("l", CONDL, FCONDL, 0),
1326*3d8817e4Smiod /* v9 */ fmovcc  ("le", CONDLE, FCONDLE, 0),
1327*3d8817e4Smiod /* v9 */ fmovicc ("leu", CONDLEU, 0),
1328*3d8817e4Smiod /* v9 */ fmovfcc ("lg", FCONDLG, 0),
1329*3d8817e4Smiod /* v9 */ fmovicc ("lu", CONDLU, F_ALIAS),
1330*3d8817e4Smiod /* v9 */ fmovcc  ("n", CONDN, FCONDN, 0),
1331*3d8817e4Smiod /* v9 */ fmovcc  ("ne", CONDNE, FCONDNE, 0),
1332*3d8817e4Smiod /* v9 */ fmovicc ("neg", CONDNEG, 0),
1333*3d8817e4Smiod /* v9 */ fmovcc  ("nz", CONDNZ, FCONDNZ, F_ALIAS),
1334*3d8817e4Smiod /* v9 */ fmovfcc ("o", FCONDO, 0),
1335*3d8817e4Smiod /* v9 */ fmovicc ("pos", CONDPOS, 0),
1336*3d8817e4Smiod /* v9 */ fmovfcc ("u", FCONDU, 0),
1337*3d8817e4Smiod /* v9 */ fmovfcc ("ue", FCONDUE, 0),
1338*3d8817e4Smiod /* v9 */ fmovfcc ("ug", FCONDUG, 0),
1339*3d8817e4Smiod /* v9 */ fmovfcc ("uge", FCONDUGE, 0),
1340*3d8817e4Smiod /* v9 */ fmovfcc ("ul", FCONDUL, 0),
1341*3d8817e4Smiod /* v9 */ fmovfcc ("ule", FCONDULE, 0),
1342*3d8817e4Smiod /* v9 */ fmovicc ("vc", CONDVC, 0),
1343*3d8817e4Smiod /* v9 */ fmovicc ("vs", CONDVS, 0),
1344*3d8817e4Smiod /* v9 */ fmovcc  ("z", CONDZ, FCONDZ, F_ALIAS),
1345*3d8817e4Smiod 
1346*3d8817e4Smiod #undef fmoviccx /* v9 */
1347*3d8817e4Smiod #undef fmovfccx /* v9 */
1348*3d8817e4Smiod #undef fmovccx /* v9 */
1349*3d8817e4Smiod #undef fmovicc /* v9 */
1350*3d8817e4Smiod #undef fmovfcc /* v9 */
1351*3d8817e4Smiod #undef fmovcc /* v9 */
1352*3d8817e4Smiod #undef FM_DF /* v9 */
1353*3d8817e4Smiod #undef FM_QF /* v9 */
1354*3d8817e4Smiod #undef FM_SF /* v9 */
1355*3d8817e4Smiod 
1356*3d8817e4Smiod /* Coprocessor branches.  */
1357*3d8817e4Smiod #define CBR(opcode, mask, lose, flags, arch) \
1358*3d8817e4Smiod  { opcode, (mask), ANNUL | (lose), "l",    flags | F_DELAYED, arch }, \
1359*3d8817e4Smiod  { opcode, (mask) | ANNUL, (lose), ",a l", flags | F_DELAYED, arch }
1360*3d8817e4Smiod 
1361*3d8817e4Smiod /* Floating point branches.  */
1362*3d8817e4Smiod #define FBR(opcode, mask, lose, flags) \
1363*3d8817e4Smiod  { opcode, (mask), ANNUL | (lose), "l",    flags | F_DELAYED | F_FBR, v6 }, \
1364*3d8817e4Smiod  { opcode, (mask) | ANNUL, (lose), ",a l", flags | F_DELAYED | F_FBR, v6 }
1365*3d8817e4Smiod 
1366*3d8817e4Smiod /* V9 extended floating point branches.  */
1367*3d8817e4Smiod #define FBRX(opcode, mask, lose, flags) /* v9 */ \
1368*3d8817e4Smiod  { opcode, FBFCC(0)|(mask)|BPRED, ANNUL|FBFCC(~0)|(lose), "6,G",      flags|F_DELAYED|F_FBR, v9 }, \
1369*3d8817e4Smiod  { opcode, FBFCC(0)|(mask)|BPRED, ANNUL|FBFCC(~0)|(lose), ",T 6,G",   flags|F_DELAYED|F_FBR, v9 }, \
1370*3d8817e4Smiod  { opcode, FBFCC(0)|(mask)|BPRED|ANNUL, FBFCC(~0)|(lose), ",a 6,G",   flags|F_DELAYED|F_FBR, v9 }, \
1371*3d8817e4Smiod  { opcode, FBFCC(0)|(mask)|BPRED|ANNUL, FBFCC(~0)|(lose), ",a,T 6,G", flags|F_DELAYED|F_FBR, v9 }, \
1372*3d8817e4Smiod  { opcode, FBFCC(0)|(mask), ANNUL|BPRED|FBFCC(~0)|(lose), ",N 6,G",   flags|F_DELAYED|F_FBR, v9 }, \
1373*3d8817e4Smiod  { opcode, FBFCC(0)|(mask)|ANNUL, BPRED|FBFCC(~0)|(lose), ",a,N 6,G", flags|F_DELAYED|F_FBR, v9 }, \
1374*3d8817e4Smiod  { opcode, FBFCC(1)|(mask)|BPRED, ANNUL|FBFCC(~1)|(lose), "7,G",      flags|F_DELAYED|F_FBR, v9 }, \
1375*3d8817e4Smiod  { opcode, FBFCC(1)|(mask)|BPRED, ANNUL|FBFCC(~1)|(lose), ",T 7,G",   flags|F_DELAYED|F_FBR, v9 }, \
1376*3d8817e4Smiod  { opcode, FBFCC(1)|(mask)|BPRED|ANNUL, FBFCC(~1)|(lose), ",a 7,G",   flags|F_DELAYED|F_FBR, v9 }, \
1377*3d8817e4Smiod  { opcode, FBFCC(1)|(mask)|BPRED|ANNUL, FBFCC(~1)|(lose), ",a,T 7,G", flags|F_DELAYED|F_FBR, v9 }, \
1378*3d8817e4Smiod  { opcode, FBFCC(1)|(mask), ANNUL|BPRED|FBFCC(~1)|(lose), ",N 7,G",   flags|F_DELAYED|F_FBR, v9 }, \
1379*3d8817e4Smiod  { opcode, FBFCC(1)|(mask)|ANNUL, BPRED|FBFCC(~1)|(lose), ",a,N 7,G", flags|F_DELAYED|F_FBR, v9 }, \
1380*3d8817e4Smiod  { opcode, FBFCC(2)|(mask)|BPRED, ANNUL|FBFCC(~2)|(lose), "8,G",      flags|F_DELAYED|F_FBR, v9 }, \
1381*3d8817e4Smiod  { opcode, FBFCC(2)|(mask)|BPRED, ANNUL|FBFCC(~2)|(lose), ",T 8,G",   flags|F_DELAYED|F_FBR, v9 }, \
1382*3d8817e4Smiod  { opcode, FBFCC(2)|(mask)|BPRED|ANNUL, FBFCC(~2)|(lose), ",a 8,G",   flags|F_DELAYED|F_FBR, v9 }, \
1383*3d8817e4Smiod  { opcode, FBFCC(2)|(mask)|BPRED|ANNUL, FBFCC(~2)|(lose), ",a,T 8,G", flags|F_DELAYED|F_FBR, v9 }, \
1384*3d8817e4Smiod  { opcode, FBFCC(2)|(mask), ANNUL|BPRED|FBFCC(~2)|(lose), ",N 8,G",   flags|F_DELAYED|F_FBR, v9 }, \
1385*3d8817e4Smiod  { opcode, FBFCC(2)|(mask)|ANNUL, BPRED|FBFCC(~2)|(lose), ",a,N 8,G", flags|F_DELAYED|F_FBR, v9 }, \
1386*3d8817e4Smiod  { opcode, FBFCC(3)|(mask)|BPRED, ANNUL|FBFCC(~3)|(lose), "9,G",      flags|F_DELAYED|F_FBR, v9 }, \
1387*3d8817e4Smiod  { opcode, FBFCC(3)|(mask)|BPRED, ANNUL|FBFCC(~3)|(lose), ",T 9,G",   flags|F_DELAYED|F_FBR, v9 }, \
1388*3d8817e4Smiod  { opcode, FBFCC(3)|(mask)|BPRED|ANNUL, FBFCC(~3)|(lose), ",a 9,G",   flags|F_DELAYED|F_FBR, v9 }, \
1389*3d8817e4Smiod  { opcode, FBFCC(3)|(mask)|BPRED|ANNUL, FBFCC(~3)|(lose), ",a,T 9,G", flags|F_DELAYED|F_FBR, v9 }, \
1390*3d8817e4Smiod  { opcode, FBFCC(3)|(mask), ANNUL|BPRED|FBFCC(~3)|(lose), ",N 9,G",   flags|F_DELAYED|F_FBR, v9 }, \
1391*3d8817e4Smiod  { opcode, FBFCC(3)|(mask)|ANNUL, BPRED|FBFCC(~3)|(lose), ",a,N 9,G", flags|F_DELAYED|F_FBR, v9 }
1392*3d8817e4Smiod 
1393*3d8817e4Smiod /* v9: We must put `FBRX' before `FBR', to ensure that we never match
1394*3d8817e4Smiod    v9: something against an expression unless it is an expression.  Otherwise,
1395*3d8817e4Smiod    v9: we end up with undefined symbol tables entries, because they get added,
1396*3d8817e4Smiod    v9: but are not deleted if the pattern fails to match.  */
1397*3d8817e4Smiod 
1398*3d8817e4Smiod #define CONDFC(fop, cop, mask, flags) \
1399*3d8817e4Smiod   FBRX(fop, F2(0, 5)|COND(mask), F2(~0, ~5)|COND(~(mask)), flags), /* v9 */ \
1400*3d8817e4Smiod   FBR(fop, F2(0, 6)|COND(mask), F2(~0, ~6)|COND(~(mask)), flags), \
1401*3d8817e4Smiod   CBR(cop, F2(0, 7)|COND(mask), F2(~0, ~7)|COND(~(mask)), flags, v6notlet)
1402*3d8817e4Smiod 
1403*3d8817e4Smiod #define CONDFCL(fop, cop, mask, flags) \
1404*3d8817e4Smiod   FBRX(fop, F2(0, 5)|COND(mask), F2(~0, ~5)|COND(~(mask)), flags), /* v9 */ \
1405*3d8817e4Smiod   FBR(fop, F2(0, 6)|COND(mask), F2(~0, ~6)|COND(~(mask)), flags), \
1406*3d8817e4Smiod   CBR(cop, F2(0, 7)|COND(mask), F2(~0, ~7)|COND(~(mask)), flags, v6)
1407*3d8817e4Smiod 
1408*3d8817e4Smiod #define CONDF(fop, mask, flags) \
1409*3d8817e4Smiod   FBRX(fop, F2(0, 5)|COND(mask), F2(~0, ~5)|COND(~(mask)), flags), /* v9 */ \
1410*3d8817e4Smiod   FBR(fop, F2(0, 6)|COND(mask), F2(~0, ~6)|COND(~(mask)), flags)
1411*3d8817e4Smiod 
1412*3d8817e4Smiod CONDFC  ("fb",    "cb",    0x8, F_UNBR),
1413*3d8817e4Smiod CONDFCL ("fba",	  "cba",   0x8, F_UNBR|F_ALIAS),
1414*3d8817e4Smiod CONDFC  ("fbe",	  "cb0",   0x9, F_CONDBR),
1415*3d8817e4Smiod CONDF   ("fbz",            0x9, F_CONDBR|F_ALIAS),
1416*3d8817e4Smiod CONDFC  ("fbg",	  "cb2",   0x6, F_CONDBR),
1417*3d8817e4Smiod CONDFC  ("fbge",  "cb02",  0xb, F_CONDBR),
1418*3d8817e4Smiod CONDFC  ("fbl",	  "cb1",   0x4, F_CONDBR),
1419*3d8817e4Smiod CONDFC  ("fble",  "cb01",  0xd, F_CONDBR),
1420*3d8817e4Smiod CONDFC  ("fblg",  "cb12",  0x2, F_CONDBR),
1421*3d8817e4Smiod CONDFCL ("fbn",	  "cbn",   0x0, F_UNBR),
1422*3d8817e4Smiod CONDFC  ("fbne",  "cb123", 0x1, F_CONDBR),
1423*3d8817e4Smiod CONDF   ("fbnz",           0x1, F_CONDBR|F_ALIAS),
1424*3d8817e4Smiod CONDFC  ("fbo",	  "cb012", 0xf, F_CONDBR),
1425*3d8817e4Smiod CONDFC  ("fbu",	  "cb3",   0x7, F_CONDBR),
1426*3d8817e4Smiod CONDFC  ("fbue",  "cb03",  0xa, F_CONDBR),
1427*3d8817e4Smiod CONDFC  ("fbug",  "cb23",  0x5, F_CONDBR),
1428*3d8817e4Smiod CONDFC  ("fbuge", "cb023", 0xc, F_CONDBR),
1429*3d8817e4Smiod CONDFC  ("fbul",  "cb13",  0x3, F_CONDBR),
1430*3d8817e4Smiod CONDFC  ("fbule", "cb013", 0xe, F_CONDBR),
1431*3d8817e4Smiod 
1432*3d8817e4Smiod #undef CONDFC
1433*3d8817e4Smiod #undef CONDFCL
1434*3d8817e4Smiod #undef CONDF
1435*3d8817e4Smiod #undef CBR
1436*3d8817e4Smiod #undef FBR
1437*3d8817e4Smiod #undef FBRX	/* v9 */
1438*3d8817e4Smiod 
1439*3d8817e4Smiod { "jmp",	F3(2, 0x38, 0), F3(~2, ~0x38, ~0)|RD_G0|ASI(~0),	"1+2", F_UNBR|F_DELAYED, v6 }, /* jmpl rs1+rs2,%g0 */
1440*3d8817e4Smiod { "jmp",	F3(2, 0x38, 0), F3(~2, ~0x38, ~0)|RD_G0|ASI_RS2(~0),	"1", F_UNBR|F_DELAYED, v6 }, /* jmpl rs1+%g0,%g0 */
1441*3d8817e4Smiod { "jmp",	F3(2, 0x38, 1), F3(~2, ~0x38, ~1)|RD_G0,		"1+i", F_UNBR|F_DELAYED, v6 }, /* jmpl rs1+i,%g0 */
1442*3d8817e4Smiod { "jmp",	F3(2, 0x38, 1), F3(~2, ~0x38, ~1)|RD_G0,		"i+1", F_UNBR|F_DELAYED, v6 }, /* jmpl i+rs1,%g0 */
1443*3d8817e4Smiod { "jmp",	F3(2, 0x38, 1), F3(~2, ~0x38, ~1)|RD_G0|RS1_G0,		"i", F_UNBR|F_DELAYED, v6 }, /* jmpl %g0+i,%g0 */
1444*3d8817e4Smiod { "jmp",	F3(2, 0x38, 1), F3(~2, ~0x38, ~1)|RD_G0|SIMM13(~0),	"1", F_UNBR|F_DELAYED, v6 }, /* jmpl rs1+0,%g0 */
1445*3d8817e4Smiod 
1446*3d8817e4Smiod { "nop",	F2(0, 4), 0xfeffffff, "", 0, v6 }, /* sethi 0, %g0 */
1447*3d8817e4Smiod 
1448*3d8817e4Smiod { "set",	F2(0x0, 0x4), F2(~0x0, ~0x4), "S0,d", F_ALIAS, v6 },
1449*3d8817e4Smiod { "setuw",	F2(0x0, 0x4), F2(~0x0, ~0x4), "S0,d", F_ALIAS, v9 },
1450*3d8817e4Smiod { "setsw",	F2(0x0, 0x4), F2(~0x0, ~0x4), "S0,d", F_ALIAS, v9 },
1451*3d8817e4Smiod { "setx",	F2(0x0, 0x4), F2(~0x0, ~0x4), "S0,1,d", F_ALIAS, v9 },
1452*3d8817e4Smiod 
1453*3d8817e4Smiod { "sethi",	F2(0x0, 0x4), F2(~0x0, ~0x4), "h,d", 0, v6 },
1454*3d8817e4Smiod 
1455*3d8817e4Smiod { "taddcc",	F3(2, 0x20, 0), F3(~2, ~0x20, ~0)|ASI(~0),	"1,2,d", 0, v6 },
1456*3d8817e4Smiod { "taddcc",	F3(2, 0x20, 1), F3(~2, ~0x20, ~1),		"1,i,d", 0, v6 },
1457*3d8817e4Smiod { "taddcc",	F3(2, 0x20, 1), F3(~2, ~0x20, ~1),		"i,1,d", 0, v6 },
1458*3d8817e4Smiod { "taddcctv",	F3(2, 0x22, 0), F3(~2, ~0x22, ~0)|ASI(~0),	"1,2,d", 0, v6 },
1459*3d8817e4Smiod { "taddcctv",	F3(2, 0x22, 1), F3(~2, ~0x22, ~1),		"1,i,d", 0, v6 },
1460*3d8817e4Smiod { "taddcctv",	F3(2, 0x22, 1), F3(~2, ~0x22, ~1),		"i,1,d", 0, v6 },
1461*3d8817e4Smiod 
1462*3d8817e4Smiod { "tsubcc",	F3(2, 0x21, 0), F3(~2, ~0x21, ~0)|ASI(~0),	"1,2,d", 0, v6 },
1463*3d8817e4Smiod { "tsubcc",	F3(2, 0x21, 1), F3(~2, ~0x21, ~1),		"1,i,d", 0, v6 },
1464*3d8817e4Smiod { "tsubcctv",	F3(2, 0x23, 0), F3(~2, ~0x23, ~0)|ASI(~0),	"1,2,d", 0, v6 },
1465*3d8817e4Smiod { "tsubcctv",	F3(2, 0x23, 1), F3(~2, ~0x23, ~1),		"1,i,d", 0, v6 },
1466*3d8817e4Smiod 
1467*3d8817e4Smiod { "unimp",	F2(0x0, 0x0), 0xffc00000, "n", 0, v6notv9 },
1468*3d8817e4Smiod { "illtrap",	F2(0, 0), F2(~0, ~0)|RD_G0, "n", 0, v9 },
1469*3d8817e4Smiod 
1470*3d8817e4Smiod /* This *is* a commutative instruction.  */
1471*3d8817e4Smiod { "xnor",	F3(2, 0x07, 0), F3(~2, ~0x07, ~0)|ASI(~0),	"1,2,d", 0, v6 },
1472*3d8817e4Smiod { "xnor",	F3(2, 0x07, 1), F3(~2, ~0x07, ~1),		"1,i,d", 0, v6 },
1473*3d8817e4Smiod { "xnor",	F3(2, 0x07, 1), F3(~2, ~0x07, ~1),		"i,1,d", 0, v6 },
1474*3d8817e4Smiod /* This *is* a commutative instruction.  */
1475*3d8817e4Smiod { "xnorcc",	F3(2, 0x17, 0), F3(~2, ~0x17, ~0)|ASI(~0),	"1,2,d", 0, v6 },
1476*3d8817e4Smiod { "xnorcc",	F3(2, 0x17, 1), F3(~2, ~0x17, ~1),		"1,i,d", 0, v6 },
1477*3d8817e4Smiod { "xnorcc",	F3(2, 0x17, 1), F3(~2, ~0x17, ~1),		"i,1,d", 0, v6 },
1478*3d8817e4Smiod { "xor",	F3(2, 0x03, 0), F3(~2, ~0x03, ~0)|ASI(~0),	"1,2,d", 0, v6 },
1479*3d8817e4Smiod { "xor",	F3(2, 0x03, 1), F3(~2, ~0x03, ~1),		"1,i,d", 0, v6 },
1480*3d8817e4Smiod { "xor",	F3(2, 0x03, 1), F3(~2, ~0x03, ~1),		"i,1,d", 0, v6 },
1481*3d8817e4Smiod { "xorcc",	F3(2, 0x13, 0), F3(~2, ~0x13, ~0)|ASI(~0),	"1,2,d", 0, v6 },
1482*3d8817e4Smiod { "xorcc",	F3(2, 0x13, 1), F3(~2, ~0x13, ~1),		"1,i,d", 0, v6 },
1483*3d8817e4Smiod { "xorcc",	F3(2, 0x13, 1), F3(~2, ~0x13, ~1),		"i,1,d", 0, v6 },
1484*3d8817e4Smiod 
1485*3d8817e4Smiod { "not",	F3(2, 0x07, 0), F3(~2, ~0x07, ~0)|ASI(~0), "1,d", F_ALIAS, v6 }, /* xnor rs1,%0,rd */
1486*3d8817e4Smiod { "not",	F3(2, 0x07, 0), F3(~2, ~0x07, ~0)|ASI(~0), "r", F_ALIAS, v6 }, /* xnor rd,%0,rd */
1487*3d8817e4Smiod 
1488*3d8817e4Smiod { "btog",	F3(2, 0x03, 0), F3(~2, ~0x03, ~0)|ASI(~0),	"2,r", F_ALIAS, v6 }, /* xor rd,rs2,rd */
1489*3d8817e4Smiod { "btog",	F3(2, 0x03, 1), F3(~2, ~0x03, ~1),		"i,r", F_ALIAS, v6 }, /* xor rd,i,rd */
1490*3d8817e4Smiod 
1491*3d8817e4Smiod /* FPop1 and FPop2 are not instructions.  Don't accept them.  */
1492*3d8817e4Smiod 
1493*3d8817e4Smiod { "fdtoi",	F3F(2, 0x34, 0x0d2), F3F(~2, ~0x34, ~0x0d2)|RS1_G0, "B,g", F_FLOAT, v6 },
1494*3d8817e4Smiod { "fstoi",	F3F(2, 0x34, 0x0d1), F3F(~2, ~0x34, ~0x0d1)|RS1_G0, "f,g", F_FLOAT, v6 },
1495*3d8817e4Smiod { "fqtoi",	F3F(2, 0x34, 0x0d3), F3F(~2, ~0x34, ~0x0d3)|RS1_G0, "R,g", F_FLOAT, v8 },
1496*3d8817e4Smiod 
1497*3d8817e4Smiod { "fdtox",	F3F(2, 0x34, 0x082), F3F(~2, ~0x34, ~0x082)|RS1_G0, "B,H", F_FLOAT, v9 },
1498*3d8817e4Smiod { "fstox",	F3F(2, 0x34, 0x081), F3F(~2, ~0x34, ~0x081)|RS1_G0, "f,H", F_FLOAT, v9 },
1499*3d8817e4Smiod { "fqtox",	F3F(2, 0x34, 0x083), F3F(~2, ~0x34, ~0x083)|RS1_G0, "R,H", F_FLOAT, v9 },
1500*3d8817e4Smiod 
1501*3d8817e4Smiod { "fitod",	F3F(2, 0x34, 0x0c8), F3F(~2, ~0x34, ~0x0c8)|RS1_G0, "f,H", F_FLOAT, v6 },
1502*3d8817e4Smiod { "fitos",	F3F(2, 0x34, 0x0c4), F3F(~2, ~0x34, ~0x0c4)|RS1_G0, "f,g", F_FLOAT, v6 },
1503*3d8817e4Smiod { "fitoq",	F3F(2, 0x34, 0x0cc), F3F(~2, ~0x34, ~0x0cc)|RS1_G0, "f,J", F_FLOAT, v8 },
1504*3d8817e4Smiod 
1505*3d8817e4Smiod { "fxtod",	F3F(2, 0x34, 0x088), F3F(~2, ~0x34, ~0x088)|RS1_G0, "B,H", F_FLOAT, v9 },
1506*3d8817e4Smiod { "fxtos",	F3F(2, 0x34, 0x084), F3F(~2, ~0x34, ~0x084)|RS1_G0, "B,g", F_FLOAT, v9 },
1507*3d8817e4Smiod { "fxtoq",	F3F(2, 0x34, 0x08c), F3F(~2, ~0x34, ~0x08c)|RS1_G0, "B,J", F_FLOAT, v9 },
1508*3d8817e4Smiod 
1509*3d8817e4Smiod { "fdtoq",	F3F(2, 0x34, 0x0ce), F3F(~2, ~0x34, ~0x0ce)|RS1_G0, "B,J", F_FLOAT, v8 },
1510*3d8817e4Smiod { "fdtos",	F3F(2, 0x34, 0x0c6), F3F(~2, ~0x34, ~0x0c6)|RS1_G0, "B,g", F_FLOAT, v6 },
1511*3d8817e4Smiod { "fqtod",	F3F(2, 0x34, 0x0cb), F3F(~2, ~0x34, ~0x0cb)|RS1_G0, "R,H", F_FLOAT, v8 },
1512*3d8817e4Smiod { "fqtos",	F3F(2, 0x34, 0x0c7), F3F(~2, ~0x34, ~0x0c7)|RS1_G0, "R,g", F_FLOAT, v8 },
1513*3d8817e4Smiod { "fstod",	F3F(2, 0x34, 0x0c9), F3F(~2, ~0x34, ~0x0c9)|RS1_G0, "f,H", F_FLOAT, v6 },
1514*3d8817e4Smiod { "fstoq",	F3F(2, 0x34, 0x0cd), F3F(~2, ~0x34, ~0x0cd)|RS1_G0, "f,J", F_FLOAT, v8 },
1515*3d8817e4Smiod 
1516*3d8817e4Smiod { "fdivd",	F3F(2, 0x34, 0x04e), F3F(~2, ~0x34, ~0x04e), "v,B,H", F_FLOAT, v6 },
1517*3d8817e4Smiod { "fdivq",	F3F(2, 0x34, 0x04f), F3F(~2, ~0x34, ~0x04f), "V,R,J", F_FLOAT, v8 },
1518*3d8817e4Smiod { "fdivx",	F3F(2, 0x34, 0x04f), F3F(~2, ~0x34, ~0x04f), "V,R,J", F_FLOAT|F_ALIAS, v8 },
1519*3d8817e4Smiod { "fdivs",	F3F(2, 0x34, 0x04d), F3F(~2, ~0x34, ~0x04d), "e,f,g", F_FLOAT, v6 },
1520*3d8817e4Smiod { "fmuld",	F3F(2, 0x34, 0x04a), F3F(~2, ~0x34, ~0x04a), "v,B,H", F_FLOAT, v6 },
1521*3d8817e4Smiod { "fmulq",	F3F(2, 0x34, 0x04b), F3F(~2, ~0x34, ~0x04b), "V,R,J", F_FLOAT, v8 },
1522*3d8817e4Smiod { "fmulx",	F3F(2, 0x34, 0x04b), F3F(~2, ~0x34, ~0x04b), "V,R,J", F_FLOAT|F_ALIAS, v8 },
1523*3d8817e4Smiod { "fmuls",	F3F(2, 0x34, 0x049), F3F(~2, ~0x34, ~0x049), "e,f,g", F_FLOAT, v6 },
1524*3d8817e4Smiod 
1525*3d8817e4Smiod { "fdmulq",	F3F(2, 0x34, 0x06e), F3F(~2, ~0x34, ~0x06e), "v,B,J", F_FLOAT, v8 },
1526*3d8817e4Smiod { "fdmulx",	F3F(2, 0x34, 0x06e), F3F(~2, ~0x34, ~0x06e), "v,B,J", F_FLOAT|F_ALIAS, v8 },
1527*3d8817e4Smiod { "fsmuld",	F3F(2, 0x34, 0x069), F3F(~2, ~0x34, ~0x069), "e,f,H", F_FLOAT, v8 },
1528*3d8817e4Smiod 
1529*3d8817e4Smiod { "fsqrtd",	F3F(2, 0x34, 0x02a), F3F(~2, ~0x34, ~0x02a)|RS1_G0, "B,H", F_FLOAT, v7 },
1530*3d8817e4Smiod { "fsqrtq",	F3F(2, 0x34, 0x02b), F3F(~2, ~0x34, ~0x02b)|RS1_G0, "R,J", F_FLOAT, v8 },
1531*3d8817e4Smiod { "fsqrtx",	F3F(2, 0x34, 0x02b), F3F(~2, ~0x34, ~0x02b)|RS1_G0, "R,J", F_FLOAT|F_ALIAS, v8 },
1532*3d8817e4Smiod { "fsqrts",	F3F(2, 0x34, 0x029), F3F(~2, ~0x34, ~0x029)|RS1_G0, "f,g", F_FLOAT, v7 },
1533*3d8817e4Smiod 
1534*3d8817e4Smiod { "fabsd",	F3F(2, 0x34, 0x00a), F3F(~2, ~0x34, ~0x00a)|RS1_G0, "B,H", F_FLOAT, v9 },
1535*3d8817e4Smiod { "fabsq",	F3F(2, 0x34, 0x00b), F3F(~2, ~0x34, ~0x00b)|RS1_G0, "R,J", F_FLOAT, v9 },
1536*3d8817e4Smiod { "fabsx",	F3F(2, 0x34, 0x00b), F3F(~2, ~0x34, ~0x00b)|RS1_G0, "R,J", F_FLOAT|F_ALIAS, v9 },
1537*3d8817e4Smiod { "fabss",	F3F(2, 0x34, 0x009), F3F(~2, ~0x34, ~0x009)|RS1_G0, "f,g", F_FLOAT, v6 },
1538*3d8817e4Smiod { "fmovd",	F3F(2, 0x34, 0x002), F3F(~2, ~0x34, ~0x002)|RS1_G0, "B,H", F_FLOAT, v9 },
1539*3d8817e4Smiod { "fmovq",	F3F(2, 0x34, 0x003), F3F(~2, ~0x34, ~0x003)|RS1_G0, "R,J", F_FLOAT, v9 },
1540*3d8817e4Smiod { "fmovx",	F3F(2, 0x34, 0x003), F3F(~2, ~0x34, ~0x003)|RS1_G0, "R,J", F_FLOAT|F_ALIAS, v9 },
1541*3d8817e4Smiod { "fmovs",	F3F(2, 0x34, 0x001), F3F(~2, ~0x34, ~0x001)|RS1_G0, "f,g", F_FLOAT, v6 },
1542*3d8817e4Smiod { "fnegd",	F3F(2, 0x34, 0x006), F3F(~2, ~0x34, ~0x006)|RS1_G0, "B,H", F_FLOAT, v9 },
1543*3d8817e4Smiod { "fnegq",	F3F(2, 0x34, 0x007), F3F(~2, ~0x34, ~0x007)|RS1_G0, "R,J", F_FLOAT, v9 },
1544*3d8817e4Smiod { "fnegx",	F3F(2, 0x34, 0x007), F3F(~2, ~0x34, ~0x007)|RS1_G0, "R,J", F_FLOAT|F_ALIAS, v9 },
1545*3d8817e4Smiod { "fnegs",	F3F(2, 0x34, 0x005), F3F(~2, ~0x34, ~0x005)|RS1_G0, "f,g", F_FLOAT, v6 },
1546*3d8817e4Smiod 
1547*3d8817e4Smiod { "faddd",	F3F(2, 0x34, 0x042), F3F(~2, ~0x34, ~0x042), "v,B,H", F_FLOAT, v6 },
1548*3d8817e4Smiod { "faddq",	F3F(2, 0x34, 0x043), F3F(~2, ~0x34, ~0x043), "V,R,J", F_FLOAT, v8 },
1549*3d8817e4Smiod { "faddx",	F3F(2, 0x34, 0x043), F3F(~2, ~0x34, ~0x043), "V,R,J", F_FLOAT|F_ALIAS, v8 },
1550*3d8817e4Smiod { "fadds",	F3F(2, 0x34, 0x041), F3F(~2, ~0x34, ~0x041), "e,f,g", F_FLOAT, v6 },
1551*3d8817e4Smiod { "fsubd",	F3F(2, 0x34, 0x046), F3F(~2, ~0x34, ~0x046), "v,B,H", F_FLOAT, v6 },
1552*3d8817e4Smiod { "fsubq",	F3F(2, 0x34, 0x047), F3F(~2, ~0x34, ~0x047), "V,R,J", F_FLOAT, v8 },
1553*3d8817e4Smiod { "fsubx",	F3F(2, 0x34, 0x047), F3F(~2, ~0x34, ~0x047), "V,R,J", F_FLOAT|F_ALIAS, v8 },
1554*3d8817e4Smiod { "fsubs",	F3F(2, 0x34, 0x045), F3F(~2, ~0x34, ~0x045), "e,f,g", F_FLOAT, v6 },
1555*3d8817e4Smiod 
1556*3d8817e4Smiod #define CMPFCC(x)	(((x)&0x3)<<25)
1557*3d8817e4Smiod 
1558*3d8817e4Smiod { "fcmpd",	          F3F(2, 0x35, 0x052),            F3F(~2, ~0x35, ~0x052)|RD_G0,  "v,B",   F_FLOAT, v6 },
1559*3d8817e4Smiod { "fcmpd",	CMPFCC(0)|F3F(2, 0x35, 0x052), CMPFCC(~0)|F3F(~2, ~0x35, ~0x052),	 "6,v,B", F_FLOAT, v9 },
1560*3d8817e4Smiod { "fcmpd",	CMPFCC(1)|F3F(2, 0x35, 0x052), CMPFCC(~1)|F3F(~2, ~0x35, ~0x052),	 "7,v,B", F_FLOAT, v9 },
1561*3d8817e4Smiod { "fcmpd",	CMPFCC(2)|F3F(2, 0x35, 0x052), CMPFCC(~2)|F3F(~2, ~0x35, ~0x052),	 "8,v,B", F_FLOAT, v9 },
1562*3d8817e4Smiod { "fcmpd",	CMPFCC(3)|F3F(2, 0x35, 0x052), CMPFCC(~3)|F3F(~2, ~0x35, ~0x052),	 "9,v,B", F_FLOAT, v9 },
1563*3d8817e4Smiod { "fcmped",	          F3F(2, 0x35, 0x056),            F3F(~2, ~0x35, ~0x056)|RD_G0,  "v,B",   F_FLOAT, v6 },
1564*3d8817e4Smiod { "fcmped",	CMPFCC(0)|F3F(2, 0x35, 0x056), CMPFCC(~0)|F3F(~2, ~0x35, ~0x056),	 "6,v,B", F_FLOAT, v9 },
1565*3d8817e4Smiod { "fcmped",	CMPFCC(1)|F3F(2, 0x35, 0x056), CMPFCC(~1)|F3F(~2, ~0x35, ~0x056),	 "7,v,B", F_FLOAT, v9 },
1566*3d8817e4Smiod { "fcmped",	CMPFCC(2)|F3F(2, 0x35, 0x056), CMPFCC(~2)|F3F(~2, ~0x35, ~0x056),	 "8,v,B", F_FLOAT, v9 },
1567*3d8817e4Smiod { "fcmped",	CMPFCC(3)|F3F(2, 0x35, 0x056), CMPFCC(~3)|F3F(~2, ~0x35, ~0x056),	 "9,v,B", F_FLOAT, v9 },
1568*3d8817e4Smiod { "fcmpq",	          F3F(2, 0x35, 0x053),            F3F(~2, ~0x35, ~0x053)|RD_G0,	 "V,R", F_FLOAT, v8 },
1569*3d8817e4Smiod { "fcmpq",	CMPFCC(0)|F3F(2, 0x35, 0x053), CMPFCC(~0)|F3F(~2, ~0x35, ~0x053),	 "6,V,R", F_FLOAT, v9 },
1570*3d8817e4Smiod { "fcmpq",	CMPFCC(1)|F3F(2, 0x35, 0x053), CMPFCC(~1)|F3F(~2, ~0x35, ~0x053),	 "7,V,R", F_FLOAT, v9 },
1571*3d8817e4Smiod { "fcmpq",	CMPFCC(2)|F3F(2, 0x35, 0x053), CMPFCC(~2)|F3F(~2, ~0x35, ~0x053),	 "8,V,R", F_FLOAT, v9 },
1572*3d8817e4Smiod { "fcmpq",	CMPFCC(3)|F3F(2, 0x35, 0x053), CMPFCC(~3)|F3F(~2, ~0x35, ~0x053),	 "9,V,R", F_FLOAT, v9 },
1573*3d8817e4Smiod { "fcmpeq",	          F3F(2, 0x35, 0x057),            F3F(~2, ~0x35, ~0x057)|RD_G0,	 "V,R", F_FLOAT, v8 },
1574*3d8817e4Smiod { "fcmpeq",	CMPFCC(0)|F3F(2, 0x35, 0x057), CMPFCC(~0)|F3F(~2, ~0x35, ~0x057),	 "6,V,R", F_FLOAT, v9 },
1575*3d8817e4Smiod { "fcmpeq",	CMPFCC(1)|F3F(2, 0x35, 0x057), CMPFCC(~1)|F3F(~2, ~0x35, ~0x057),	 "7,V,R", F_FLOAT, v9 },
1576*3d8817e4Smiod { "fcmpeq",	CMPFCC(2)|F3F(2, 0x35, 0x057), CMPFCC(~2)|F3F(~2, ~0x35, ~0x057),	 "8,V,R", F_FLOAT, v9 },
1577*3d8817e4Smiod { "fcmpeq",	CMPFCC(3)|F3F(2, 0x35, 0x057), CMPFCC(~3)|F3F(~2, ~0x35, ~0x057),	 "9,V,R", F_FLOAT, v9 },
1578*3d8817e4Smiod { "fcmpx",	          F3F(2, 0x35, 0x053),            F3F(~2, ~0x35, ~0x053)|RD_G0,	 "V,R", F_FLOAT|F_ALIAS, v8 },
1579*3d8817e4Smiod { "fcmpx",	CMPFCC(0)|F3F(2, 0x35, 0x053), CMPFCC(~0)|F3F(~2, ~0x35, ~0x053),	 "6,V,R", F_FLOAT|F_ALIAS, v9 },
1580*3d8817e4Smiod { "fcmpx",	CMPFCC(1)|F3F(2, 0x35, 0x053), CMPFCC(~1)|F3F(~2, ~0x35, ~0x053),	 "7,V,R", F_FLOAT|F_ALIAS, v9 },
1581*3d8817e4Smiod { "fcmpx",	CMPFCC(2)|F3F(2, 0x35, 0x053), CMPFCC(~2)|F3F(~2, ~0x35, ~0x053),	 "8,V,R", F_FLOAT|F_ALIAS, v9 },
1582*3d8817e4Smiod { "fcmpx",	CMPFCC(3)|F3F(2, 0x35, 0x053), CMPFCC(~3)|F3F(~2, ~0x35, ~0x053),	 "9,V,R", F_FLOAT|F_ALIAS, v9 },
1583*3d8817e4Smiod { "fcmpex",	          F3F(2, 0x35, 0x057),            F3F(~2, ~0x35, ~0x057)|RD_G0,	 "V,R", F_FLOAT|F_ALIAS, v8 },
1584*3d8817e4Smiod { "fcmpex",	CMPFCC(0)|F3F(2, 0x35, 0x057), CMPFCC(~0)|F3F(~2, ~0x35, ~0x057),	 "6,V,R", F_FLOAT|F_ALIAS, v9 },
1585*3d8817e4Smiod { "fcmpex",	CMPFCC(1)|F3F(2, 0x35, 0x057), CMPFCC(~1)|F3F(~2, ~0x35, ~0x057),	 "7,V,R", F_FLOAT|F_ALIAS, v9 },
1586*3d8817e4Smiod { "fcmpex",	CMPFCC(2)|F3F(2, 0x35, 0x057), CMPFCC(~2)|F3F(~2, ~0x35, ~0x057),	 "8,V,R", F_FLOAT|F_ALIAS, v9 },
1587*3d8817e4Smiod { "fcmpex",	CMPFCC(3)|F3F(2, 0x35, 0x057), CMPFCC(~3)|F3F(~2, ~0x35, ~0x057),	 "9,V,R", F_FLOAT|F_ALIAS, v9 },
1588*3d8817e4Smiod { "fcmps",	          F3F(2, 0x35, 0x051),            F3F(~2, ~0x35, ~0x051)|RD_G0, "e,f",   F_FLOAT, v6 },
1589*3d8817e4Smiod { "fcmps",	CMPFCC(0)|F3F(2, 0x35, 0x051), CMPFCC(~0)|F3F(~2, ~0x35, ~0x051),	 "6,e,f", F_FLOAT, v9 },
1590*3d8817e4Smiod { "fcmps",	CMPFCC(1)|F3F(2, 0x35, 0x051), CMPFCC(~1)|F3F(~2, ~0x35, ~0x051),	 "7,e,f", F_FLOAT, v9 },
1591*3d8817e4Smiod { "fcmps",	CMPFCC(2)|F3F(2, 0x35, 0x051), CMPFCC(~2)|F3F(~2, ~0x35, ~0x051),	 "8,e,f", F_FLOAT, v9 },
1592*3d8817e4Smiod { "fcmps",	CMPFCC(3)|F3F(2, 0x35, 0x051), CMPFCC(~3)|F3F(~2, ~0x35, ~0x051),	 "9,e,f", F_FLOAT, v9 },
1593*3d8817e4Smiod { "fcmpes",	          F3F(2, 0x35, 0x055),            F3F(~2, ~0x35, ~0x055)|RD_G0, "e,f",   F_FLOAT, v6 },
1594*3d8817e4Smiod { "fcmpes",	CMPFCC(0)|F3F(2, 0x35, 0x055), CMPFCC(~0)|F3F(~2, ~0x35, ~0x055),	 "6,e,f", F_FLOAT, v9 },
1595*3d8817e4Smiod { "fcmpes",	CMPFCC(1)|F3F(2, 0x35, 0x055), CMPFCC(~1)|F3F(~2, ~0x35, ~0x055),	 "7,e,f", F_FLOAT, v9 },
1596*3d8817e4Smiod { "fcmpes",	CMPFCC(2)|F3F(2, 0x35, 0x055), CMPFCC(~2)|F3F(~2, ~0x35, ~0x055),	 "8,e,f", F_FLOAT, v9 },
1597*3d8817e4Smiod { "fcmpes",	CMPFCC(3)|F3F(2, 0x35, 0x055), CMPFCC(~3)|F3F(~2, ~0x35, ~0x055),	 "9,e,f", F_FLOAT, v9 },
1598*3d8817e4Smiod 
1599*3d8817e4Smiod /* These Extended FPop (FIFO) instructions are new in the Fujitsu
1600*3d8817e4Smiod    MB86934, replacing the CPop instructions from v6 and later
1601*3d8817e4Smiod    processors.  */
1602*3d8817e4Smiod 
1603*3d8817e4Smiod #define EFPOP1_2(name, op, args) { name, F3F(2, 0x36, op), F3F(~2, ~0x36, ~op)|RS1_G0, args, 0, sparclite }
1604*3d8817e4Smiod #define EFPOP1_3(name, op, args) { name, F3F(2, 0x36, op), F3F(~2, ~0x36, ~op),        args, 0, sparclite }
1605*3d8817e4Smiod #define EFPOP2_2(name, op, args) { name, F3F(2, 0x37, op), F3F(~2, ~0x37, ~op)|RD_G0,  args, 0, sparclite }
1606*3d8817e4Smiod 
1607*3d8817e4Smiod EFPOP1_2 ("efitod",	0x0c8, "f,H"),
1608*3d8817e4Smiod EFPOP1_2 ("efitos",	0x0c4, "f,g"),
1609*3d8817e4Smiod EFPOP1_2 ("efdtoi",	0x0d2, "B,g"),
1610*3d8817e4Smiod EFPOP1_2 ("efstoi",	0x0d1, "f,g"),
1611*3d8817e4Smiod EFPOP1_2 ("efstod",	0x0c9, "f,H"),
1612*3d8817e4Smiod EFPOP1_2 ("efdtos",	0x0c6, "B,g"),
1613*3d8817e4Smiod EFPOP1_2 ("efmovs",	0x001, "f,g"),
1614*3d8817e4Smiod EFPOP1_2 ("efnegs",	0x005, "f,g"),
1615*3d8817e4Smiod EFPOP1_2 ("efabss",	0x009, "f,g"),
1616*3d8817e4Smiod EFPOP1_2 ("efsqrtd",	0x02a, "B,H"),
1617*3d8817e4Smiod EFPOP1_2 ("efsqrts",	0x029, "f,g"),
1618*3d8817e4Smiod EFPOP1_3 ("efaddd",	0x042, "v,B,H"),
1619*3d8817e4Smiod EFPOP1_3 ("efadds",	0x041, "e,f,g"),
1620*3d8817e4Smiod EFPOP1_3 ("efsubd",	0x046, "v,B,H"),
1621*3d8817e4Smiod EFPOP1_3 ("efsubs",	0x045, "e,f,g"),
1622*3d8817e4Smiod EFPOP1_3 ("efdivd",	0x04e, "v,B,H"),
1623*3d8817e4Smiod EFPOP1_3 ("efdivs",	0x04d, "e,f,g"),
1624*3d8817e4Smiod EFPOP1_3 ("efmuld",	0x04a, "v,B,H"),
1625*3d8817e4Smiod EFPOP1_3 ("efmuls",	0x049, "e,f,g"),
1626*3d8817e4Smiod EFPOP1_3 ("efsmuld",	0x069, "e,f,H"),
1627*3d8817e4Smiod EFPOP2_2 ("efcmpd",	0x052, "v,B"),
1628*3d8817e4Smiod EFPOP2_2 ("efcmped",	0x056, "v,B"),
1629*3d8817e4Smiod EFPOP2_2 ("efcmps",	0x051, "e,f"),
1630*3d8817e4Smiod EFPOP2_2 ("efcmpes",	0x055, "e,f"),
1631*3d8817e4Smiod 
1632*3d8817e4Smiod #undef EFPOP1_2
1633*3d8817e4Smiod #undef EFPOP1_3
1634*3d8817e4Smiod #undef EFPOP2_2
1635*3d8817e4Smiod 
1636*3d8817e4Smiod /* These are marked F_ALIAS, so that they won't conflict with sparclite insns
1637*3d8817e4Smiod    present.  Otherwise, the F_ALIAS flag is ignored.  */
1638*3d8817e4Smiod { "cpop1",	F3(2, 0x36, 0), F3(~2, ~0x36, ~1), "[1+2],d", F_ALIAS, v6notv9 },
1639*3d8817e4Smiod { "cpop2",	F3(2, 0x37, 0), F3(~2, ~0x37, ~1), "[1+2],d", F_ALIAS, v6notv9 },
1640*3d8817e4Smiod 
1641*3d8817e4Smiod /* sparclet specific insns */
1642*3d8817e4Smiod 
1643*3d8817e4Smiod COMMUTEOP ("umac", 0x3e, sparclet),
1644*3d8817e4Smiod COMMUTEOP ("smac", 0x3f, sparclet),
1645*3d8817e4Smiod COMMUTEOP ("umacd", 0x2e, sparclet),
1646*3d8817e4Smiod COMMUTEOP ("smacd", 0x2f, sparclet),
1647*3d8817e4Smiod COMMUTEOP ("umuld", 0x09, sparclet),
1648*3d8817e4Smiod COMMUTEOP ("smuld", 0x0d, sparclet),
1649*3d8817e4Smiod 
1650*3d8817e4Smiod { "shuffle",	F3(2, 0x2d, 0), F3(~2, ~0x2d, ~0)|ASI(~0),	"1,2,d", 0, sparclet },
1651*3d8817e4Smiod { "shuffle",	F3(2, 0x2d, 1), F3(~2, ~0x2d, ~1),		"1,i,d", 0, sparclet },
1652*3d8817e4Smiod 
1653*3d8817e4Smiod /* The manual isn't completely accurate on these insns.  The `rs2' field is
1654*3d8817e4Smiod    treated as being 6 bits to account for 6 bit immediates to cpush.  It is
1655*3d8817e4Smiod    assumed that it is intended that bit 5 is 0 when rs2 contains a reg.  */
1656*3d8817e4Smiod #define BIT5 (1<<5)
1657*3d8817e4Smiod { "crdcxt",	F3(2, 0x36, 0)|SLCPOP(4), F3(~2, ~0x36, ~0)|SLCPOP(~4)|BIT5|RS2(~0),	"U,d", 0, sparclet },
1658*3d8817e4Smiod { "cwrcxt",	F3(2, 0x36, 0)|SLCPOP(3), F3(~2, ~0x36, ~0)|SLCPOP(~3)|BIT5|RS2(~0),	"1,u", 0, sparclet },
1659*3d8817e4Smiod { "cpush",	F3(2, 0x36, 0)|SLCPOP(0), F3(~2, ~0x36, ~0)|SLCPOP(~0)|BIT5|RD(~0),	"1,2", 0, sparclet },
1660*3d8817e4Smiod { "cpush",	F3(2, 0x36, 1)|SLCPOP(0), F3(~2, ~0x36, ~1)|SLCPOP(~0)|RD(~0),		"1,Y", 0, sparclet },
1661*3d8817e4Smiod { "cpusha",	F3(2, 0x36, 0)|SLCPOP(1), F3(~2, ~0x36, ~0)|SLCPOP(~1)|BIT5|RD(~0),	"1,2", 0, sparclet },
1662*3d8817e4Smiod { "cpusha",	F3(2, 0x36, 1)|SLCPOP(1), F3(~2, ~0x36, ~1)|SLCPOP(~1)|RD(~0),		"1,Y", 0, sparclet },
1663*3d8817e4Smiod { "cpull",	F3(2, 0x36, 0)|SLCPOP(2), F3(~2, ~0x36, ~0)|SLCPOP(~2)|BIT5|RS1(~0)|RS2(~0), "d", 0, sparclet },
1664*3d8817e4Smiod #undef BIT5
1665*3d8817e4Smiod 
1666*3d8817e4Smiod /* sparclet coprocessor branch insns */
1667*3d8817e4Smiod #define SLCBCC2(opcode, mask, lose) \
1668*3d8817e4Smiod  { opcode, (mask), ANNUL|(lose), "l",    F_DELAYED|F_CONDBR, sparclet }, \
1669*3d8817e4Smiod  { opcode, (mask)|ANNUL, (lose), ",a l", F_DELAYED|F_CONDBR, sparclet }
1670*3d8817e4Smiod #define SLCBCC(opcode, mask) \
1671*3d8817e4Smiod   SLCBCC2(opcode, F2(0, 7)|COND(mask), F2(~0, ~7)|COND(~(mask)))
1672*3d8817e4Smiod 
1673*3d8817e4Smiod /* cbn,cba can't be defined here because they're defined elsewhere and GAS
1674*3d8817e4Smiod    requires all mnemonics of the same name to be consecutive.  */
1675*3d8817e4Smiod /*SLCBCC("cbn", 0), - already defined */
1676*3d8817e4Smiod SLCBCC("cbe", 1),
1677*3d8817e4Smiod SLCBCC("cbf", 2),
1678*3d8817e4Smiod SLCBCC("cbef", 3),
1679*3d8817e4Smiod SLCBCC("cbr", 4),
1680*3d8817e4Smiod SLCBCC("cber", 5),
1681*3d8817e4Smiod SLCBCC("cbfr", 6),
1682*3d8817e4Smiod SLCBCC("cbefr", 7),
1683*3d8817e4Smiod /*SLCBCC("cba", 8), - already defined */
1684*3d8817e4Smiod SLCBCC("cbne", 9),
1685*3d8817e4Smiod SLCBCC("cbnf", 10),
1686*3d8817e4Smiod SLCBCC("cbnef", 11),
1687*3d8817e4Smiod SLCBCC("cbnr", 12),
1688*3d8817e4Smiod SLCBCC("cbner", 13),
1689*3d8817e4Smiod SLCBCC("cbnfr", 14),
1690*3d8817e4Smiod SLCBCC("cbnefr", 15),
1691*3d8817e4Smiod 
1692*3d8817e4Smiod #undef SLCBCC2
1693*3d8817e4Smiod #undef SLCBCC
1694*3d8817e4Smiod 
1695*3d8817e4Smiod { "casa",	F3(3, 0x3c, 0), F3(~3, ~0x3c, ~0), "[1]A,2,d", 0, v9 },
1696*3d8817e4Smiod { "casa",	F3(3, 0x3c, 1), F3(~3, ~0x3c, ~1), "[1]o,2,d", 0, v9 },
1697*3d8817e4Smiod { "casxa",	F3(3, 0x3e, 0), F3(~3, ~0x3e, ~0), "[1]A,2,d", 0, v9 },
1698*3d8817e4Smiod { "casxa",	F3(3, 0x3e, 1), F3(~3, ~0x3e, ~1), "[1]o,2,d", 0, v9 },
1699*3d8817e4Smiod 
1700*3d8817e4Smiod /* v9 synthetic insns */
1701*3d8817e4Smiod { "iprefetch",	F2(0, 1)|(2<<20)|BPRED, F2(~0, ~1)|(1<<20)|ANNUL|COND(~0), "G", 0, v9 }, /* bn,a,pt %xcc,label */
1702*3d8817e4Smiod { "signx",	F3(2, 0x27, 0), F3(~2, ~0x27, ~0)|(1<<12)|ASI(~0)|RS2_G0, "1,d", F_ALIAS, v9 }, /* sra rs1,%g0,rd */
1703*3d8817e4Smiod { "signx",	F3(2, 0x27, 0), F3(~2, ~0x27, ~0)|(1<<12)|ASI(~0)|RS2_G0, "r", F_ALIAS, v9 }, /* sra rd,%g0,rd */
1704*3d8817e4Smiod { "clruw",	F3(2, 0x26, 0), F3(~2, ~0x26, ~0)|(1<<12)|ASI(~0)|RS2_G0, "1,d", F_ALIAS, v9 }, /* srl rs1,%g0,rd */
1705*3d8817e4Smiod { "clruw",	F3(2, 0x26, 0), F3(~2, ~0x26, ~0)|(1<<12)|ASI(~0)|RS2_G0, "r", F_ALIAS, v9 }, /* srl rd,%g0,rd */
1706*3d8817e4Smiod { "cas",	F3(3, 0x3c, 0)|ASI(0x80), F3(~3, ~0x3c, ~0)|ASI(~0x80), "[1],2,d", F_ALIAS, v9 }, /* casa [rs1]ASI_P,rs2,rd */
1707*3d8817e4Smiod { "casl",	F3(3, 0x3c, 0)|ASI(0x88), F3(~3, ~0x3c, ~0)|ASI(~0x88), "[1],2,d", F_ALIAS, v9 }, /* casa [rs1]ASI_P_L,rs2,rd */
1708*3d8817e4Smiod { "casx",	F3(3, 0x3e, 0)|ASI(0x80), F3(~3, ~0x3e, ~0)|ASI(~0x80), "[1],2,d", F_ALIAS, v9 }, /* casxa [rs1]ASI_P,rs2,rd */
1709*3d8817e4Smiod { "casxl",	F3(3, 0x3e, 0)|ASI(0x88), F3(~3, ~0x3e, ~0)|ASI(~0x88), "[1],2,d", F_ALIAS, v9 }, /* casxa [rs1]ASI_P_L,rs2,rd */
1710*3d8817e4Smiod 
1711*3d8817e4Smiod /* Ultrasparc extensions */
1712*3d8817e4Smiod { "shutdown",	F3F(2, 0x36, 0x080), F3F(~2, ~0x36, ~0x080)|RD_G0|RS1_G0|RS2_G0, "", 0, v9a },
1713*3d8817e4Smiod 
1714*3d8817e4Smiod /* FIXME: Do we want to mark these as F_FLOAT, or something similar?  */
1715*3d8817e4Smiod { "fpadd16",	F3F(2, 0x36, 0x050), F3F(~2, ~0x36, ~0x050), "v,B,H", 0, v9a },
1716*3d8817e4Smiod { "fpadd16s",	F3F(2, 0x36, 0x051), F3F(~2, ~0x36, ~0x051), "e,f,g", 0, v9a },
1717*3d8817e4Smiod { "fpadd32",	F3F(2, 0x36, 0x052), F3F(~2, ~0x36, ~0x052), "v,B,H", 0, v9a },
1718*3d8817e4Smiod { "fpadd32s",	F3F(2, 0x36, 0x053), F3F(~2, ~0x36, ~0x053), "e,f,g", 0, v9a },
1719*3d8817e4Smiod { "fpsub16",	F3F(2, 0x36, 0x054), F3F(~2, ~0x36, ~0x054), "v,B,H", 0, v9a },
1720*3d8817e4Smiod { "fpsub16s",	F3F(2, 0x36, 0x055), F3F(~2, ~0x36, ~0x055), "e,f,g", 0, v9a },
1721*3d8817e4Smiod { "fpsub32",	F3F(2, 0x36, 0x056), F3F(~2, ~0x36, ~0x056), "v,B,H", 0, v9a },
1722*3d8817e4Smiod { "fpsub32s",	F3F(2, 0x36, 0x057), F3F(~2, ~0x36, ~0x057), "e,f,g", 0, v9a },
1723*3d8817e4Smiod 
1724*3d8817e4Smiod { "fpack32",	F3F(2, 0x36, 0x03a), F3F(~2, ~0x36, ~0x03a), "v,B,H", 0, v9a },
1725*3d8817e4Smiod { "fpack16",	F3F(2, 0x36, 0x03b), F3F(~2, ~0x36, ~0x03b)|RS1_G0, "B,g", 0, v9a },
1726*3d8817e4Smiod { "fpackfix",	F3F(2, 0x36, 0x03d), F3F(~2, ~0x36, ~0x03d)|RS1_G0, "B,g", 0, v9a },
1727*3d8817e4Smiod { "fexpand",	F3F(2, 0x36, 0x04d), F3F(~2, ~0x36, ~0x04d)|RS1_G0, "f,H", 0, v9a },
1728*3d8817e4Smiod { "fpmerge",	F3F(2, 0x36, 0x04b), F3F(~2, ~0x36, ~0x04b), "e,f,H", 0, v9a },
1729*3d8817e4Smiod 
1730*3d8817e4Smiod /* Note that the mixing of 32/64 bit regs is intentional.  */
1731*3d8817e4Smiod { "fmul8x16",		F3F(2, 0x36, 0x031), F3F(~2, ~0x36, ~0x031), "e,B,H", 0, v9a },
1732*3d8817e4Smiod { "fmul8x16au",		F3F(2, 0x36, 0x033), F3F(~2, ~0x36, ~0x033), "e,f,H", 0, v9a },
1733*3d8817e4Smiod { "fmul8x16al",		F3F(2, 0x36, 0x035), F3F(~2, ~0x36, ~0x035), "e,f,H", 0, v9a },
1734*3d8817e4Smiod { "fmul8sux16",		F3F(2, 0x36, 0x036), F3F(~2, ~0x36, ~0x036), "v,B,H", 0, v9a },
1735*3d8817e4Smiod { "fmul8ulx16",		F3F(2, 0x36, 0x037), F3F(~2, ~0x36, ~0x037), "v,B,H", 0, v9a },
1736*3d8817e4Smiod { "fmuld8sux16",	F3F(2, 0x36, 0x038), F3F(~2, ~0x36, ~0x038), "e,f,H", 0, v9a },
1737*3d8817e4Smiod { "fmuld8ulx16",	F3F(2, 0x36, 0x039), F3F(~2, ~0x36, ~0x039), "e,f,H", 0, v9a },
1738*3d8817e4Smiod 
1739*3d8817e4Smiod { "alignaddr",	F3F(2, 0x36, 0x018), F3F(~2, ~0x36, ~0x018), "1,2,d", 0, v9a },
1740*3d8817e4Smiod { "alignaddrl",	F3F(2, 0x36, 0x01a), F3F(~2, ~0x36, ~0x01a), "1,2,d", 0, v9a },
1741*3d8817e4Smiod { "faligndata",	F3F(2, 0x36, 0x048), F3F(~2, ~0x36, ~0x048), "v,B,H", 0, v9a },
1742*3d8817e4Smiod 
1743*3d8817e4Smiod { "fzero",	F3F(2, 0x36, 0x060), F3F(~2, ~0x36, ~0x060), "H", 0, v9a },
1744*3d8817e4Smiod { "fzeros",	F3F(2, 0x36, 0x061), F3F(~2, ~0x36, ~0x061), "g", 0, v9a },
1745*3d8817e4Smiod { "fone",	F3F(2, 0x36, 0x07e), F3F(~2, ~0x36, ~0x07e), "H", 0, v9a },
1746*3d8817e4Smiod { "fones",	F3F(2, 0x36, 0x07f), F3F(~2, ~0x36, ~0x07f), "g", 0, v9a },
1747*3d8817e4Smiod { "fsrc1",	F3F(2, 0x36, 0x074), F3F(~2, ~0x36, ~0x074), "v,H", 0, v9a },
1748*3d8817e4Smiod { "fsrc1s",	F3F(2, 0x36, 0x075), F3F(~2, ~0x36, ~0x075), "e,g", 0, v9a },
1749*3d8817e4Smiod { "fsrc2",	F3F(2, 0x36, 0x078), F3F(~2, ~0x36, ~0x078), "B,H", 0, v9a },
1750*3d8817e4Smiod { "fsrc2s",	F3F(2, 0x36, 0x079), F3F(~2, ~0x36, ~0x079), "f,g", 0, v9a },
1751*3d8817e4Smiod { "fnot1",	F3F(2, 0x36, 0x06a), F3F(~2, ~0x36, ~0x06a), "v,H", 0, v9a },
1752*3d8817e4Smiod { "fnot1s",	F3F(2, 0x36, 0x06b), F3F(~2, ~0x36, ~0x06b), "e,g", 0, v9a },
1753*3d8817e4Smiod { "fnot2",	F3F(2, 0x36, 0x066), F3F(~2, ~0x36, ~0x066), "B,H", 0, v9a },
1754*3d8817e4Smiod { "fnot2s",	F3F(2, 0x36, 0x067), F3F(~2, ~0x36, ~0x067), "f,g", 0, v9a },
1755*3d8817e4Smiod { "for",	F3F(2, 0x36, 0x07c), F3F(~2, ~0x36, ~0x07c), "v,B,H", 0, v9a },
1756*3d8817e4Smiod { "fors",	F3F(2, 0x36, 0x07d), F3F(~2, ~0x36, ~0x07d), "e,f,g", 0, v9a },
1757*3d8817e4Smiod { "fnor",	F3F(2, 0x36, 0x062), F3F(~2, ~0x36, ~0x062), "v,B,H", 0, v9a },
1758*3d8817e4Smiod { "fnors",	F3F(2, 0x36, 0x063), F3F(~2, ~0x36, ~0x063), "e,f,g", 0, v9a },
1759*3d8817e4Smiod { "fand",	F3F(2, 0x36, 0x070), F3F(~2, ~0x36, ~0x070), "v,B,H", 0, v9a },
1760*3d8817e4Smiod { "fands",	F3F(2, 0x36, 0x071), F3F(~2, ~0x36, ~0x071), "e,f,g", 0, v9a },
1761*3d8817e4Smiod { "fnand",	F3F(2, 0x36, 0x06e), F3F(~2, ~0x36, ~0x06e), "v,B,H", 0, v9a },
1762*3d8817e4Smiod { "fnands",	F3F(2, 0x36, 0x06f), F3F(~2, ~0x36, ~0x06f), "e,f,g", 0, v9a },
1763*3d8817e4Smiod { "fxor",	F3F(2, 0x36, 0x06c), F3F(~2, ~0x36, ~0x06c), "v,B,H", 0, v9a },
1764*3d8817e4Smiod { "fxors",	F3F(2, 0x36, 0x06d), F3F(~2, ~0x36, ~0x06d), "e,f,g", 0, v9a },
1765*3d8817e4Smiod { "fxnor",	F3F(2, 0x36, 0x072), F3F(~2, ~0x36, ~0x072), "v,B,H", 0, v9a },
1766*3d8817e4Smiod { "fxnors",	F3F(2, 0x36, 0x073), F3F(~2, ~0x36, ~0x073), "e,f,g", 0, v9a },
1767*3d8817e4Smiod { "fornot1",	F3F(2, 0x36, 0x07a), F3F(~2, ~0x36, ~0x07a), "v,B,H", 0, v9a },
1768*3d8817e4Smiod { "fornot1s",	F3F(2, 0x36, 0x07b), F3F(~2, ~0x36, ~0x07b), "e,f,g", 0, v9a },
1769*3d8817e4Smiod { "fornot2",	F3F(2, 0x36, 0x076), F3F(~2, ~0x36, ~0x076), "v,B,H", 0, v9a },
1770*3d8817e4Smiod { "fornot2s",	F3F(2, 0x36, 0x077), F3F(~2, ~0x36, ~0x077), "e,f,g", 0, v9a },
1771*3d8817e4Smiod { "fandnot1",	F3F(2, 0x36, 0x068), F3F(~2, ~0x36, ~0x068), "v,B,H", 0, v9a },
1772*3d8817e4Smiod { "fandnot1s",	F3F(2, 0x36, 0x069), F3F(~2, ~0x36, ~0x069), "e,f,g", 0, v9a },
1773*3d8817e4Smiod { "fandnot2",	F3F(2, 0x36, 0x064), F3F(~2, ~0x36, ~0x064), "v,B,H", 0, v9a },
1774*3d8817e4Smiod { "fandnot2s",	F3F(2, 0x36, 0x065), F3F(~2, ~0x36, ~0x065), "e,f,g", 0, v9a },
1775*3d8817e4Smiod 
1776*3d8817e4Smiod { "fcmpgt16",	F3F(2, 0x36, 0x028), F3F(~2, ~0x36, ~0x028), "v,B,d", 0, v9a },
1777*3d8817e4Smiod { "fcmpgt32",	F3F(2, 0x36, 0x02c), F3F(~2, ~0x36, ~0x02c), "v,B,d", 0, v9a },
1778*3d8817e4Smiod { "fcmple16",	F3F(2, 0x36, 0x020), F3F(~2, ~0x36, ~0x020), "v,B,d", 0, v9a },
1779*3d8817e4Smiod { "fcmple32",	F3F(2, 0x36, 0x024), F3F(~2, ~0x36, ~0x024), "v,B,d", 0, v9a },
1780*3d8817e4Smiod { "fcmpne16",	F3F(2, 0x36, 0x022), F3F(~2, ~0x36, ~0x022), "v,B,d", 0, v9a },
1781*3d8817e4Smiod { "fcmpne32",	F3F(2, 0x36, 0x026), F3F(~2, ~0x36, ~0x026), "v,B,d", 0, v9a },
1782*3d8817e4Smiod { "fcmpeq16",	F3F(2, 0x36, 0x02a), F3F(~2, ~0x36, ~0x02a), "v,B,d", 0, v9a },
1783*3d8817e4Smiod { "fcmpeq32",	F3F(2, 0x36, 0x02e), F3F(~2, ~0x36, ~0x02e), "v,B,d", 0, v9a },
1784*3d8817e4Smiod 
1785*3d8817e4Smiod { "edge8",	F3F(2, 0x36, 0x000), F3F(~2, ~0x36, ~0x000), "1,2,d", 0, v9a },
1786*3d8817e4Smiod { "edge8l",	F3F(2, 0x36, 0x002), F3F(~2, ~0x36, ~0x002), "1,2,d", 0, v9a },
1787*3d8817e4Smiod { "edge16",	F3F(2, 0x36, 0x004), F3F(~2, ~0x36, ~0x004), "1,2,d", 0, v9a },
1788*3d8817e4Smiod { "edge16l",	F3F(2, 0x36, 0x006), F3F(~2, ~0x36, ~0x006), "1,2,d", 0, v9a },
1789*3d8817e4Smiod { "edge32",	F3F(2, 0x36, 0x008), F3F(~2, ~0x36, ~0x008), "1,2,d", 0, v9a },
1790*3d8817e4Smiod { "edge32l",	F3F(2, 0x36, 0x00a), F3F(~2, ~0x36, ~0x00a), "1,2,d", 0, v9a },
1791*3d8817e4Smiod 
1792*3d8817e4Smiod { "pdist",	F3F(2, 0x36, 0x03e), F3F(~2, ~0x36, ~0x03e), "v,B,H", 0, v9a },
1793*3d8817e4Smiod 
1794*3d8817e4Smiod { "array8",	F3F(2, 0x36, 0x010), F3F(~2, ~0x36, ~0x010), "1,2,d", 0, v9a },
1795*3d8817e4Smiod { "array16",	F3F(2, 0x36, 0x012), F3F(~2, ~0x36, ~0x012), "1,2,d", 0, v9a },
1796*3d8817e4Smiod { "array32",	F3F(2, 0x36, 0x014), F3F(~2, ~0x36, ~0x014), "1,2,d", 0, v9a },
1797*3d8817e4Smiod 
1798*3d8817e4Smiod /* Cheetah instructions */
1799*3d8817e4Smiod { "edge8n",    F3F(2, 0x36, 0x001), F3F(~2, ~0x36, ~0x001), "1,2,d", 0, v9b },
1800*3d8817e4Smiod { "edge8ln",   F3F(2, 0x36, 0x003), F3F(~2, ~0x36, ~0x003), "1,2,d", 0, v9b },
1801*3d8817e4Smiod { "edge16n",   F3F(2, 0x36, 0x005), F3F(~2, ~0x36, ~0x005), "1,2,d", 0, v9b },
1802*3d8817e4Smiod { "edge16ln",  F3F(2, 0x36, 0x007), F3F(~2, ~0x36, ~0x007), "1,2,d", 0, v9b },
1803*3d8817e4Smiod { "edge32n",   F3F(2, 0x36, 0x009), F3F(~2, ~0x36, ~0x009), "1,2,d", 0, v9b },
1804*3d8817e4Smiod { "edge32ln",  F3F(2, 0x36, 0x00b), F3F(~2, ~0x36, ~0x00b), "1,2,d", 0, v9b },
1805*3d8817e4Smiod 
1806*3d8817e4Smiod { "bmask",     F3F(2, 0x36, 0x019), F3F(~2, ~0x36, ~0x019), "1,2,d", 0, v9b },
1807*3d8817e4Smiod { "bshuffle",  F3F(2, 0x36, 0x04c), F3F(~2, ~0x36, ~0x04c), "v,B,H", 0, v9b },
1808*3d8817e4Smiod 
1809*3d8817e4Smiod { "siam",      F3F(2, 0x36, 0x081), F3F(~2, ~0x36, ~0x081)|RD_G0|RS1_G0|RS2(~7), "3", 0, v9b },
1810*3d8817e4Smiod 
1811*3d8817e4Smiod /* More v9 specific insns, these need to come last so they do not clash
1812*3d8817e4Smiod    with v9a instructions such as "edge8" which looks like impdep1. */
1813*3d8817e4Smiod 
1814*3d8817e4Smiod #define IMPDEP(name, code) \
1815*3d8817e4Smiod { name,	F3(2, code, 0), F3(~2, ~code, ~0)|ASI(~0), "1,2,d", 0, v9notv9a }, \
1816*3d8817e4Smiod { name,	F3(2, code, 1), F3(~2, ~code, ~1),	   "1,i,d", 0, v9notv9a }, \
1817*3d8817e4Smiod { name, F3(2, code, 0), F3(~2, ~code, ~0),         "x,1,2,d", 0, v9notv9a }, \
1818*3d8817e4Smiod { name, F3(2, code, 0), F3(~2, ~code, ~0),         "x,e,f,g", 0, v9notv9a }
1819*3d8817e4Smiod 
1820*3d8817e4Smiod IMPDEP ("impdep1", 0x36),
1821*3d8817e4Smiod IMPDEP ("impdep2", 0x37),
1822*3d8817e4Smiod 
1823*3d8817e4Smiod #undef IMPDEP
1824*3d8817e4Smiod 
1825*3d8817e4Smiod };
1826*3d8817e4Smiod 
1827*3d8817e4Smiod const int sparc_num_opcodes = ((sizeof sparc_opcodes)/(sizeof sparc_opcodes[0]));
1828*3d8817e4Smiod 
1829*3d8817e4Smiod /* Utilities for argument parsing.  */
1830*3d8817e4Smiod 
1831*3d8817e4Smiod typedef struct
1832*3d8817e4Smiod {
1833*3d8817e4Smiod   int value;
1834*3d8817e4Smiod   const char *name;
1835*3d8817e4Smiod } arg;
1836*3d8817e4Smiod 
1837*3d8817e4Smiod /* Look up NAME in TABLE.  */
1838*3d8817e4Smiod 
1839*3d8817e4Smiod static int
lookup_name(const arg * table,const char * name)1840*3d8817e4Smiod lookup_name (const arg *table, const char *name)
1841*3d8817e4Smiod {
1842*3d8817e4Smiod   const arg *p;
1843*3d8817e4Smiod 
1844*3d8817e4Smiod   for (p = table; p->name; ++p)
1845*3d8817e4Smiod     if (strcmp (name, p->name) == 0)
1846*3d8817e4Smiod       return p->value;
1847*3d8817e4Smiod 
1848*3d8817e4Smiod   return -1;
1849*3d8817e4Smiod }
1850*3d8817e4Smiod 
1851*3d8817e4Smiod /* Look up VALUE in TABLE.  */
1852*3d8817e4Smiod 
1853*3d8817e4Smiod static const char *
lookup_value(const arg * table,int value)1854*3d8817e4Smiod lookup_value (const arg *table, int value)
1855*3d8817e4Smiod {
1856*3d8817e4Smiod   const arg *p;
1857*3d8817e4Smiod 
1858*3d8817e4Smiod   for (p = table; p->name; ++p)
1859*3d8817e4Smiod     if (value == p->value)
1860*3d8817e4Smiod       return p->name;
1861*3d8817e4Smiod 
1862*3d8817e4Smiod   return NULL;
1863*3d8817e4Smiod }
1864*3d8817e4Smiod 
1865*3d8817e4Smiod /* Handle ASI's.  */
1866*3d8817e4Smiod 
1867*3d8817e4Smiod static arg asi_table[] =
1868*3d8817e4Smiod {
1869*3d8817e4Smiod   /* These are in the v9 architecture manual.  */
1870*3d8817e4Smiod   /* The shorter versions appear first, they're here because Sun's as has them.
1871*3d8817e4Smiod      Sun's as uses #ASI_P_L instead of #ASI_PL (which appears in the
1872*3d8817e4Smiod      UltraSPARC architecture manual).  */
1873*3d8817e4Smiod   { 0x04, "#ASI_N" },
1874*3d8817e4Smiod   { 0x0c, "#ASI_N_L" },
1875*3d8817e4Smiod   { 0x10, "#ASI_AIUP" },
1876*3d8817e4Smiod   { 0x11, "#ASI_AIUS" },
1877*3d8817e4Smiod   { 0x18, "#ASI_AIUP_L" },
1878*3d8817e4Smiod   { 0x19, "#ASI_AIUS_L" },
1879*3d8817e4Smiod   { 0x80, "#ASI_P" },
1880*3d8817e4Smiod   { 0x81, "#ASI_S" },
1881*3d8817e4Smiod   { 0x82, "#ASI_PNF" },
1882*3d8817e4Smiod   { 0x83, "#ASI_SNF" },
1883*3d8817e4Smiod   { 0x88, "#ASI_P_L" },
1884*3d8817e4Smiod   { 0x89, "#ASI_S_L" },
1885*3d8817e4Smiod   { 0x8a, "#ASI_PNF_L" },
1886*3d8817e4Smiod   { 0x8b, "#ASI_SNF_L" },
1887*3d8817e4Smiod   { 0x04, "#ASI_NUCLEUS" },
1888*3d8817e4Smiod   { 0x0c, "#ASI_NUCLEUS_LITTLE" },
1889*3d8817e4Smiod   { 0x10, "#ASI_AS_IF_USER_PRIMARY" },
1890*3d8817e4Smiod   { 0x11, "#ASI_AS_IF_USER_SECONDARY" },
1891*3d8817e4Smiod   { 0x18, "#ASI_AS_IF_USER_PRIMARY_LITTLE" },
1892*3d8817e4Smiod   { 0x19, "#ASI_AS_IF_USER_SECONDARY_LITTLE" },
1893*3d8817e4Smiod   { 0x80, "#ASI_PRIMARY" },
1894*3d8817e4Smiod   { 0x81, "#ASI_SECONDARY" },
1895*3d8817e4Smiod   { 0x82, "#ASI_PRIMARY_NOFAULT" },
1896*3d8817e4Smiod   { 0x83, "#ASI_SECONDARY_NOFAULT" },
1897*3d8817e4Smiod   { 0x88, "#ASI_PRIMARY_LITTLE" },
1898*3d8817e4Smiod   { 0x89, "#ASI_SECONDARY_LITTLE" },
1899*3d8817e4Smiod   { 0x8a, "#ASI_PRIMARY_NOFAULT_LITTLE" },
1900*3d8817e4Smiod   { 0x8b, "#ASI_SECONDARY_NOFAULT_LITTLE" },
1901*3d8817e4Smiod   /* These are UltraSPARC extensions.  */
1902*3d8817e4Smiod   /* FIXME: There are dozens of them.  Not sure we want them all.
1903*3d8817e4Smiod      Most are for kernel building but some are for vis type stuff.  */
1904*3d8817e4Smiod   { 0, 0 }
1905*3d8817e4Smiod };
1906*3d8817e4Smiod 
1907*3d8817e4Smiod /* Return the value for ASI NAME, or -1 if not found.  */
1908*3d8817e4Smiod 
1909*3d8817e4Smiod int
sparc_encode_asi(const char * name)1910*3d8817e4Smiod sparc_encode_asi (const char *name)
1911*3d8817e4Smiod {
1912*3d8817e4Smiod   return lookup_name (asi_table, name);
1913*3d8817e4Smiod }
1914*3d8817e4Smiod 
1915*3d8817e4Smiod /* Return the name for ASI value VALUE or NULL if not found.  */
1916*3d8817e4Smiod 
1917*3d8817e4Smiod const char *
sparc_decode_asi(int value)1918*3d8817e4Smiod sparc_decode_asi (int value)
1919*3d8817e4Smiod {
1920*3d8817e4Smiod   return lookup_value (asi_table, value);
1921*3d8817e4Smiod }
1922*3d8817e4Smiod 
1923*3d8817e4Smiod /* Handle membar masks.  */
1924*3d8817e4Smiod 
1925*3d8817e4Smiod static arg membar_table[] =
1926*3d8817e4Smiod {
1927*3d8817e4Smiod   { 0x40, "#Sync" },
1928*3d8817e4Smiod   { 0x20, "#MemIssue" },
1929*3d8817e4Smiod   { 0x10, "#Lookaside" },
1930*3d8817e4Smiod   { 0x08, "#StoreStore" },
1931*3d8817e4Smiod   { 0x04, "#LoadStore" },
1932*3d8817e4Smiod   { 0x02, "#StoreLoad" },
1933*3d8817e4Smiod   { 0x01, "#LoadLoad" },
1934*3d8817e4Smiod   { 0, 0 }
1935*3d8817e4Smiod };
1936*3d8817e4Smiod 
1937*3d8817e4Smiod /* Return the value for membar arg NAME, or -1 if not found.  */
1938*3d8817e4Smiod 
1939*3d8817e4Smiod int
sparc_encode_membar(const char * name)1940*3d8817e4Smiod sparc_encode_membar (const char *name)
1941*3d8817e4Smiod {
1942*3d8817e4Smiod   return lookup_name (membar_table, name);
1943*3d8817e4Smiod }
1944*3d8817e4Smiod 
1945*3d8817e4Smiod /* Return the name for membar value VALUE or NULL if not found.  */
1946*3d8817e4Smiod 
1947*3d8817e4Smiod const char *
sparc_decode_membar(int value)1948*3d8817e4Smiod sparc_decode_membar (int value)
1949*3d8817e4Smiod {
1950*3d8817e4Smiod   return lookup_value (membar_table, value);
1951*3d8817e4Smiod }
1952*3d8817e4Smiod 
1953*3d8817e4Smiod /* Handle prefetch args.  */
1954*3d8817e4Smiod 
1955*3d8817e4Smiod static arg prefetch_table[] =
1956*3d8817e4Smiod {
1957*3d8817e4Smiod   { 0, "#n_reads" },
1958*3d8817e4Smiod   { 1, "#one_read" },
1959*3d8817e4Smiod   { 2, "#n_writes" },
1960*3d8817e4Smiod   { 3, "#one_write" },
1961*3d8817e4Smiod   { 4, "#page" },
1962*3d8817e4Smiod   { 16, "#invalidate" },
1963*3d8817e4Smiod   { 0, 0 }
1964*3d8817e4Smiod };
1965*3d8817e4Smiod 
1966*3d8817e4Smiod /* Return the value for prefetch arg NAME, or -1 if not found.  */
1967*3d8817e4Smiod 
1968*3d8817e4Smiod int
sparc_encode_prefetch(const char * name)1969*3d8817e4Smiod sparc_encode_prefetch (const char *name)
1970*3d8817e4Smiod {
1971*3d8817e4Smiod   return lookup_name (prefetch_table, name);
1972*3d8817e4Smiod }
1973*3d8817e4Smiod 
1974*3d8817e4Smiod /* Return the name for prefetch value VALUE or NULL if not found.  */
1975*3d8817e4Smiod 
1976*3d8817e4Smiod const char *
sparc_decode_prefetch(int value)1977*3d8817e4Smiod sparc_decode_prefetch (int value)
1978*3d8817e4Smiod {
1979*3d8817e4Smiod   return lookup_value (prefetch_table, value);
1980*3d8817e4Smiod }
1981*3d8817e4Smiod 
1982*3d8817e4Smiod /* Handle sparclet coprocessor registers.  */
1983*3d8817e4Smiod 
1984*3d8817e4Smiod static arg sparclet_cpreg_table[] =
1985*3d8817e4Smiod {
1986*3d8817e4Smiod   { 0, "%ccsr" },
1987*3d8817e4Smiod   { 1, "%ccfr" },
1988*3d8817e4Smiod   { 2, "%cccrcr" },
1989*3d8817e4Smiod   { 3, "%ccpr" },
1990*3d8817e4Smiod   { 4, "%ccsr2" },
1991*3d8817e4Smiod   { 5, "%cccrr" },
1992*3d8817e4Smiod   { 6, "%ccrstr" },
1993*3d8817e4Smiod   { 0, 0 }
1994*3d8817e4Smiod };
1995*3d8817e4Smiod 
1996*3d8817e4Smiod /* Return the value for sparclet cpreg arg NAME, or -1 if not found.  */
1997*3d8817e4Smiod 
1998*3d8817e4Smiod int
sparc_encode_sparclet_cpreg(const char * name)1999*3d8817e4Smiod sparc_encode_sparclet_cpreg (const char *name)
2000*3d8817e4Smiod {
2001*3d8817e4Smiod   return lookup_name (sparclet_cpreg_table, name);
2002*3d8817e4Smiod }
2003*3d8817e4Smiod 
2004*3d8817e4Smiod /* Return the name for sparclet cpreg value VALUE or NULL if not found.  */
2005*3d8817e4Smiod 
2006*3d8817e4Smiod const char *
sparc_decode_sparclet_cpreg(int value)2007*3d8817e4Smiod sparc_decode_sparclet_cpreg (int value)
2008*3d8817e4Smiod {
2009*3d8817e4Smiod   return lookup_value (sparclet_cpreg_table, value);
2010*3d8817e4Smiod }
2011