4 * Copyright (c) 2000-2003 Marcel Moolenaar
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #include <sys/cdefs.h>
30 /* __FBSDID("$FreeBSD: src/sys/ia64/disasm/disasm_extract.c,v 1.2 2005/01/06 22:18:22 imp Exp $"); */
32 #include <sys/param.h>
33 #include <sys/systm.h>
35 #include <machine/stdarg.h>
37 #include <ia64/disasm/disasm_int.h>
38 #include <ia64/disasm/disasm.h>
40 #define FRAG(o,l) ((int)((o << 8) | (l & 0xff)))
41 #define FRAG_OFS(f) (f >> 8)
42 #define FRAG_LEN(f) (f & 0xff)
48 asm_cmpltr_add(struct asm_inst
*i
, enum asm_cmpltr_class c
,
49 enum asm_cmpltr_type t
)
52 i
->i_cmpltr
[i
->i_ncmpltrs
].c_class
= c
;
53 i
->i_cmpltr
[i
->i_ncmpltrs
].c_type
= t
;
55 KASSERT(i
->i_ncmpltrs
< 6);
59 asm_hint(struct asm_inst
*i
, enum asm_cmpltr_class c
)
62 switch (FIELD(i
->i_bits
, 28, 2)) { /* hint */
64 asm_cmpltr_add(i
, c
, ASM_CT_NONE
);
67 asm_cmpltr_add(i
, c
, ASM_CT_NT1
);
70 asm_cmpltr_add(i
, c
, ASM_CT_NT2
);
73 asm_cmpltr_add(i
, c
, ASM_CT_NTA
);
79 asm_sf(struct asm_inst
*i
)
82 switch (FIELD(i
->i_bits
, 34, 2)) {
84 asm_cmpltr_add(i
, ASM_CC_SF
, ASM_CT_S0
);
87 asm_cmpltr_add(i
, ASM_CC_SF
, ASM_CT_S1
);
90 asm_cmpltr_add(i
, ASM_CC_SF
, ASM_CT_S2
);
93 asm_cmpltr_add(i
, ASM_CC_SF
, ASM_CT_S3
);
99 asm_brhint(struct asm_inst
*i
)
101 uint64_t bits
= i
->i_bits
;
103 switch (FIELD(bits
, 33, 2)) { /* bwh */
105 asm_cmpltr_add(i
, ASM_CC_BWH
, ASM_CT_SPTK
);
108 asm_cmpltr_add(i
, ASM_CC_BWH
, ASM_CT_SPNT
);
111 asm_cmpltr_add(i
, ASM_CC_BWH
, ASM_CT_DPTK
);
114 asm_cmpltr_add(i
, ASM_CC_BWH
, ASM_CT_DPNT
);
118 if (FIELD(bits
, 12, 1)) /* ph */
119 asm_cmpltr_add(i
, ASM_CC_PH
, ASM_CT_MANY
);
121 asm_cmpltr_add(i
, ASM_CC_PH
, ASM_CT_FEW
);
123 if (FIELD(bits
, 35, 1)) /* dh */
124 asm_cmpltr_add(i
, ASM_CC_DH
, ASM_CT_CLR
);
126 asm_cmpltr_add(i
, ASM_CC_DH
, ASM_CT_NONE
);
130 asm_brphint(struct asm_inst
*i
)
132 uint64_t bits
= i
->i_bits
;
134 switch (FIELD(bits
, 3, 2)) { /* ipwh, indwh */
136 asm_cmpltr_add(i
, ASM_CC_IPWH
, ASM_CT_SPTK
);
139 asm_cmpltr_add(i
, ASM_CC_IPWH
, ASM_CT_LOOP
);
142 asm_cmpltr_add(i
, ASM_CC_IPWH
, ASM_CT_DPTK
);
145 asm_cmpltr_add(i
, ASM_CC_IPWH
, ASM_CT_EXIT
);
149 if (FIELD(bits
, 5, 1)) /* ph */
150 asm_cmpltr_add(i
, ASM_CC_PH
, ASM_CT_MANY
);
152 asm_cmpltr_add(i
, ASM_CC_PH
, ASM_CT_FEW
);
154 switch (FIELD(bits
, 0, 3)) { /* pvec */
156 asm_cmpltr_add(i
, ASM_CC_PVEC
, ASM_CT_DC_DC
);
159 asm_cmpltr_add(i
, ASM_CC_PVEC
, ASM_CT_DC_NT
);
162 asm_cmpltr_add(i
, ASM_CC_PVEC
, ASM_CT_TK_DC
);
165 asm_cmpltr_add(i
, ASM_CC_PVEC
, ASM_CT_TK_TK
);
168 asm_cmpltr_add(i
, ASM_CC_PVEC
, ASM_CT_TK_NT
);
171 asm_cmpltr_add(i
, ASM_CC_PVEC
, ASM_CT_NT_DC
);
174 asm_cmpltr_add(i
, ASM_CC_PVEC
, ASM_CT_NT_TK
);
177 asm_cmpltr_add(i
, ASM_CC_PVEC
, ASM_CT_NT_NT
);
181 if (FIELD(bits
, 35, 1)) /* ih */
182 asm_cmpltr_add(i
, ASM_CC_IH
, ASM_CT_IMP
);
184 asm_cmpltr_add(i
, ASM_CC_IH
, ASM_CT_NONE
);
187 static enum asm_oper_type
188 asm_normalize(struct asm_inst
*i
, enum asm_op op
)
190 enum asm_oper_type ot
= ASM_OPER_NONE
;
194 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_CALL
);
197 case ASM_OP_BR_CEXIT
:
198 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_CEXIT
);
201 case ASM_OP_BR_CLOOP
:
202 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_CLOOP
);
206 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_COND
);
210 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_CTOP
);
214 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_IA
);
218 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_RET
);
221 case ASM_OP_BR_WEXIT
:
222 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_WEXIT
);
226 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_WTOP
);
230 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_B
);
234 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_F
);
238 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_I
);
242 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_M
);
246 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_X
);
249 case ASM_OP_BRL_COND
:
250 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_COND
);
253 case ASM_OP_BRL_CALL
:
254 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_CALL
);
258 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_NONE
);
262 asm_cmpltr_add(i
, ASM_CC_BTYPE
, ASM_CT_RET
);
266 asm_cmpltr_add(i
, ASM_CC_BSW
, ASM_CT_0
);
270 asm_cmpltr_add(i
, ASM_CC_BSW
, ASM_CT_1
);
273 case ASM_OP_CHK_A_CLR
:
274 asm_cmpltr_add(i
, ASM_CC_CHK
, ASM_CT_A
);
275 asm_cmpltr_add(i
, ASM_CC_ACLR
, ASM_CT_CLR
);
278 case ASM_OP_CHK_A_NC
:
279 asm_cmpltr_add(i
, ASM_CC_CHK
, ASM_CT_A
);
280 asm_cmpltr_add(i
, ASM_CC_ACLR
, ASM_CT_NC
);
284 asm_cmpltr_add(i
, ASM_CC_CHK
, ASM_CT_S
);
288 asm_cmpltr_add(i
, ASM_CC_CHK
, ASM_CT_S
);
289 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_I
);
293 asm_cmpltr_add(i
, ASM_CC_CHK
, ASM_CT_S
);
294 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_M
);
298 asm_cmpltr_add(i
, ASM_CC_CLRRRB
, ASM_CT_NONE
);
301 case ASM_OP_CLRRRB_PR
:
302 asm_cmpltr_add(i
, ASM_CC_CLRRRB
, ASM_CT_PR
);
306 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
307 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_NONE
);
310 case ASM_OP_CMP_EQ_AND
:
311 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
312 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
315 case ASM_OP_CMP_EQ_OR
:
316 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
317 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
320 case ASM_OP_CMP_EQ_OR_ANDCM
:
321 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
322 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
325 case ASM_OP_CMP_EQ_UNC
:
326 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
327 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_UNC
);
330 case ASM_OP_CMP_GE_AND
:
331 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GE
);
332 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
335 case ASM_OP_CMP_GE_OR
:
336 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GE
);
337 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
340 case ASM_OP_CMP_GE_OR_ANDCM
:
341 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GE
);
342 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
345 case ASM_OP_CMP_GT_AND
:
346 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GT
);
347 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
350 case ASM_OP_CMP_GT_OR
:
351 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GT
);
352 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
355 case ASM_OP_CMP_GT_OR_ANDCM
:
356 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GT
);
357 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
360 case ASM_OP_CMP_LE_AND
:
361 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LE
);
362 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
365 case ASM_OP_CMP_LE_OR
:
366 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LE
);
367 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
370 case ASM_OP_CMP_LE_OR_ANDCM
:
371 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LE
);
372 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
376 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
377 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_NONE
);
380 case ASM_OP_CMP_LT_AND
:
381 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
382 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
385 case ASM_OP_CMP_LT_OR
:
386 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
387 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
390 case ASM_OP_CMP_LT_OR_ANDCM
:
391 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
392 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
395 case ASM_OP_CMP_LT_UNC
:
396 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
397 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_UNC
);
401 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LTU
);
402 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_NONE
);
405 case ASM_OP_CMP_LTU_UNC
:
406 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LTU
);
407 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_UNC
);
410 case ASM_OP_CMP_NE_AND
:
411 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_NE
);
412 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
415 case ASM_OP_CMP_NE_OR
:
416 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_NE
);
417 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
420 case ASM_OP_CMP_NE_OR_ANDCM
:
421 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_NE
);
422 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
426 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
427 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_NONE
);
430 case ASM_OP_CMP4_EQ_AND
:
431 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
432 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
435 case ASM_OP_CMP4_EQ_OR
:
436 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
437 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
440 case ASM_OP_CMP4_EQ_OR_ANDCM
:
441 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
442 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
445 case ASM_OP_CMP4_EQ_UNC
:
446 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_EQ
);
447 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_UNC
);
450 case ASM_OP_CMP4_GE_AND
:
451 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GE
);
452 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
455 case ASM_OP_CMP4_GE_OR
:
456 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GE
);
457 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
460 case ASM_OP_CMP4_GE_OR_ANDCM
:
461 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GE
);
462 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
465 case ASM_OP_CMP4_GT_AND
:
466 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GT
);
467 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
470 case ASM_OP_CMP4_GT_OR
:
471 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GT
);
472 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
475 case ASM_OP_CMP4_GT_OR_ANDCM
:
476 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_GT
);
477 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
480 case ASM_OP_CMP4_LE_AND
:
481 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LE
);
482 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
485 case ASM_OP_CMP4_LE_OR
:
486 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LE
);
487 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
490 case ASM_OP_CMP4_LE_OR_ANDCM
:
491 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LE
);
492 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
496 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
497 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_NONE
);
500 case ASM_OP_CMP4_LT_AND
:
501 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
502 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
505 case ASM_OP_CMP4_LT_OR
:
506 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
507 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
510 case ASM_OP_CMP4_LT_OR_ANDCM
:
511 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
512 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
515 case ASM_OP_CMP4_LT_UNC
:
516 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LT
);
517 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_UNC
);
520 case ASM_OP_CMP4_LTU
:
521 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LTU
);
522 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_NONE
);
525 case ASM_OP_CMP4_LTU_UNC
:
526 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_LTU
);
527 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_UNC
);
530 case ASM_OP_CMP4_NE_AND
:
531 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_NE
);
532 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
535 case ASM_OP_CMP4_NE_OR
:
536 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_NE
);
537 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
540 case ASM_OP_CMP4_NE_OR_ANDCM
:
541 asm_cmpltr_add(i
, ASM_CC_CREL
, ASM_CT_NE
);
542 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
545 case ASM_OP_CMP8XCHG16_ACQ
:
546 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_ACQ
);
547 op
= ASM_OP_CMP8XCHG16
;
549 case ASM_OP_CMP8XCHG16_REL
:
550 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_REL
);
551 op
= ASM_OP_CMP8XCHG16
;
553 case ASM_OP_CMPXCHG1_ACQ
:
554 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_ACQ
);
555 op
= ASM_OP_CMPXCHG1
;
557 case ASM_OP_CMPXCHG1_REL
:
558 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_REL
);
559 op
= ASM_OP_CMPXCHG1
;
561 case ASM_OP_CMPXCHG2_ACQ
:
562 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_ACQ
);
563 op
= ASM_OP_CMPXCHG2
;
565 case ASM_OP_CMPXCHG2_REL
:
566 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_REL
);
567 op
= ASM_OP_CMPXCHG2
;
569 case ASM_OP_CMPXCHG4_ACQ
:
570 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_ACQ
);
571 op
= ASM_OP_CMPXCHG4
;
573 case ASM_OP_CMPXCHG4_REL
:
574 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_REL
);
575 op
= ASM_OP_CMPXCHG4
;
577 case ASM_OP_CMPXCHG8_ACQ
:
578 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_ACQ
);
579 op
= ASM_OP_CMPXCHG8
;
581 case ASM_OP_CMPXCHG8_REL
:
582 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_REL
);
583 op
= ASM_OP_CMPXCHG8
;
586 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_L
);
590 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_R
);
594 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_L
);
598 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_R
);
602 asm_cmpltr_add(i
, ASM_CC_DEP
, ASM_CT_NONE
);
606 asm_cmpltr_add(i
, ASM_CC_DEP
, ASM_CT_Z
);
610 asm_cmpltr_add(i
, ASM_CC_FC
, ASM_CT_NONE
);
614 asm_cmpltr_add(i
, ASM_CC_FC
, ASM_CT_I
);
617 case ASM_OP_FCLASS_M
:
618 asm_cmpltr_add(i
, ASM_CC_FCREL
, ASM_CT_M
);
622 asm_cmpltr_add(i
, ASM_CC_FCVT
, ASM_CT_FX
);
623 asm_cmpltr_add(i
, ASM_CC_TRUNC
, ASM_CT_NONE
);
626 case ASM_OP_FCVT_FX_TRUNC
:
627 asm_cmpltr_add(i
, ASM_CC_FCVT
, ASM_CT_FX
);
628 asm_cmpltr_add(i
, ASM_CC_TRUNC
, ASM_CT_TRUNC
);
631 case ASM_OP_FCVT_FXU
:
632 asm_cmpltr_add(i
, ASM_CC_FCVT
, ASM_CT_FXU
);
633 asm_cmpltr_add(i
, ASM_CC_TRUNC
, ASM_CT_NONE
);
636 case ASM_OP_FCVT_FXU_TRUNC
:
637 asm_cmpltr_add(i
, ASM_CC_FCVT
, ASM_CT_FXU
);
638 asm_cmpltr_add(i
, ASM_CC_TRUNC
, ASM_CT_TRUNC
);
642 asm_cmpltr_add(i
, ASM_CC_FCVT
, ASM_CT_XF
);
643 asm_cmpltr_add(i
, ASM_CC_TRUNC
, ASM_CT_NONE
);
646 case ASM_OP_FETCHADD4_ACQ
:
647 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_ACQ
);
648 op
= ASM_OP_FETCHADD4
;
650 case ASM_OP_FETCHADD4_REL
:
651 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_REL
);
652 op
= ASM_OP_FETCHADD4
;
654 case ASM_OP_FETCHADD8_ACQ
:
655 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_ACQ
);
656 op
= ASM_OP_FETCHADD8
;
658 case ASM_OP_FETCHADD8_REL
:
659 asm_cmpltr_add(i
, ASM_CC_SEM
, ASM_CT_REL
);
660 op
= ASM_OP_FETCHADD8
;
663 asm_cmpltr_add(i
, ASM_CC_PC
, ASM_CT_NONE
);
667 asm_cmpltr_add(i
, ASM_CC_PC
, ASM_CT_D
);
671 asm_cmpltr_add(i
, ASM_CC_PC
, ASM_CT_S
);
674 case ASM_OP_FMERGE_NS
:
675 asm_cmpltr_add(i
, ASM_CC_FMERGE
, ASM_CT_NS
);
678 case ASM_OP_FMERGE_S
:
679 asm_cmpltr_add(i
, ASM_CC_FMERGE
, ASM_CT_S
);
682 case ASM_OP_FMERGE_SE
:
683 asm_cmpltr_add(i
, ASM_CC_FMERGE
, ASM_CT_SE
);
687 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_L
);
691 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_LR
);
695 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_R
);
699 asm_cmpltr_add(i
, ASM_CC_PC
, ASM_CT_NONE
);
703 asm_cmpltr_add(i
, ASM_CC_PC
, ASM_CT_D
);
707 asm_cmpltr_add(i
, ASM_CC_PC
, ASM_CT_S
);
711 asm_cmpltr_add(i
, ASM_CC_PC
, ASM_CT_NONE
);
715 asm_cmpltr_add(i
, ASM_CC_PC
, ASM_CT_D
);
719 asm_cmpltr_add(i
, ASM_CC_PC
, ASM_CT_S
);
722 case ASM_OP_FPCMP_EQ
:
723 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_EQ
);
726 case ASM_OP_FPCMP_LE
:
727 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_LE
);
730 case ASM_OP_FPCMP_LT
:
731 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_LT
);
734 case ASM_OP_FPCMP_NEQ
:
735 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_NEQ
);
738 case ASM_OP_FPCMP_NLE
:
739 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_NLE
);
742 case ASM_OP_FPCMP_NLT
:
743 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_NLT
);
746 case ASM_OP_FPCMP_ORD
:
747 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_ORD
);
750 case ASM_OP_FPCMP_UNORD
:
751 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_UNORD
);
754 case ASM_OP_FPCVT_FX
:
755 asm_cmpltr_add(i
, ASM_CC_FCVT
, ASM_CT_FX
);
756 asm_cmpltr_add(i
, ASM_CC_TRUNC
, ASM_CT_NONE
);
759 case ASM_OP_FPCVT_FX_TRUNC
:
760 asm_cmpltr_add(i
, ASM_CC_FCVT
, ASM_CT_FX
);
761 asm_cmpltr_add(i
, ASM_CC_TRUNC
, ASM_CT_TRUNC
);
764 case ASM_OP_FPCVT_FXU
:
765 asm_cmpltr_add(i
, ASM_CC_FCVT
, ASM_CT_FXU
);
766 asm_cmpltr_add(i
, ASM_CC_TRUNC
, ASM_CT_NONE
);
769 case ASM_OP_FPCVT_FXU_TRUNC
:
770 asm_cmpltr_add(i
, ASM_CC_FCVT
, ASM_CT_FXU
);
771 asm_cmpltr_add(i
, ASM_CC_TRUNC
, ASM_CT_TRUNC
);
774 case ASM_OP_FPMERGE_NS
:
775 asm_cmpltr_add(i
, ASM_CC_FMERGE
, ASM_CT_NS
);
778 case ASM_OP_FPMERGE_S
:
779 asm_cmpltr_add(i
, ASM_CC_FMERGE
, ASM_CT_S
);
782 case ASM_OP_FPMERGE_SE
:
783 asm_cmpltr_add(i
, ASM_CC_FMERGE
, ASM_CT_SE
);
787 asm_cmpltr_add(i
, ASM_CC_FSWAP
, ASM_CT_NONE
);
790 case ASM_OP_FSWAP_NL
:
791 asm_cmpltr_add(i
, ASM_CC_FSWAP
, ASM_CT_NL
);
794 case ASM_OP_FSWAP_NR
:
795 asm_cmpltr_add(i
, ASM_CC_FSWAP
, ASM_CT_NR
);
799 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_L
);
803 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_R
);
807 asm_cmpltr_add(i
, ASM_CC_GETF
, ASM_CT_D
);
810 case ASM_OP_GETF_EXP
:
811 asm_cmpltr_add(i
, ASM_CC_GETF
, ASM_CT_EXP
);
815 asm_cmpltr_add(i
, ASM_CC_GETF
, ASM_CT_S
);
818 case ASM_OP_GETF_SIG
:
819 asm_cmpltr_add(i
, ASM_CC_GETF
, ASM_CT_SIG
);
823 asm_cmpltr_add(i
, ASM_CC_INVALA
, ASM_CT_NONE
);
826 case ASM_OP_INVALA_E
:
827 asm_cmpltr_add(i
, ASM_CC_INVALA
, ASM_CT_E
);
831 asm_cmpltr_add(i
, ASM_CC_ITC
, ASM_CT_D
);
835 asm_cmpltr_add(i
, ASM_CC_ITC
, ASM_CT_I
);
839 asm_cmpltr_add(i
, ASM_CC_ITR
, ASM_CT_D
);
844 asm_cmpltr_add(i
, ASM_CC_ITR
, ASM_CT_I
);
849 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_NONE
);
853 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_A
);
857 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_ACQ
);
860 case ASM_OP_LD1_BIAS
:
861 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_BIAS
);
864 case ASM_OP_LD1_C_CLR
:
865 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_CLR
);
868 case ASM_OP_LD1_C_CLR_ACQ
:
869 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_CLR_ACQ
);
872 case ASM_OP_LD1_C_NC
:
873 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_NC
);
877 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_S
);
881 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_SA
);
885 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_NONE
);
888 case ASM_OP_LD16_ACQ
:
889 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_ACQ
);
893 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_NONE
);
897 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_A
);
901 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_ACQ
);
904 case ASM_OP_LD2_BIAS
:
905 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_BIAS
);
908 case ASM_OP_LD2_C_CLR
:
909 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_CLR
);
912 case ASM_OP_LD2_C_CLR_ACQ
:
913 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_CLR_ACQ
);
916 case ASM_OP_LD2_C_NC
:
917 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_NC
);
921 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_S
);
925 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_SA
);
929 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_NONE
);
933 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_A
);
937 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_ACQ
);
940 case ASM_OP_LD4_BIAS
:
941 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_BIAS
);
944 case ASM_OP_LD4_C_CLR
:
945 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_CLR
);
948 case ASM_OP_LD4_C_CLR_ACQ
:
949 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_CLR_ACQ
);
952 case ASM_OP_LD4_C_NC
:
953 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_NC
);
957 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_S
);
961 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_SA
);
965 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_NONE
);
969 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_A
);
973 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_ACQ
);
976 case ASM_OP_LD8_BIAS
:
977 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_BIAS
);
980 case ASM_OP_LD8_C_CLR
:
981 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_CLR
);
984 case ASM_OP_LD8_C_CLR_ACQ
:
985 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_CLR_ACQ
);
988 case ASM_OP_LD8_C_NC
:
989 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_C_NC
);
992 case ASM_OP_LD8_FILL
:
993 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_FILL
);
997 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_S
);
1001 asm_cmpltr_add(i
, ASM_CC_LDTYPE
, ASM_CT_SA
);
1004 case ASM_OP_LDF_FILL
:
1005 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_FILL
);
1009 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_NONE
);
1013 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_A
);
1016 case ASM_OP_LDF8_C_CLR
:
1017 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_CLR
);
1020 case ASM_OP_LDF8_C_NC
:
1021 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_NC
);
1025 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_S
);
1028 case ASM_OP_LDF8_SA
:
1029 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_SA
);
1033 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_NONE
);
1037 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_A
);
1040 case ASM_OP_LDFD_C_CLR
:
1041 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_CLR
);
1044 case ASM_OP_LDFD_C_NC
:
1045 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_NC
);
1049 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_S
);
1052 case ASM_OP_LDFD_SA
:
1053 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_SA
);
1057 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_NONE
);
1061 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_A
);
1064 case ASM_OP_LDFE_C_CLR
:
1065 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_CLR
);
1068 case ASM_OP_LDFE_C_NC
:
1069 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_NC
);
1073 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_S
);
1076 case ASM_OP_LDFE_SA
:
1077 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_SA
);
1081 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_NONE
);
1084 case ASM_OP_LDFP8_A
:
1085 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_A
);
1088 case ASM_OP_LDFP8_C_CLR
:
1089 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_CLR
);
1092 case ASM_OP_LDFP8_C_NC
:
1093 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_NC
);
1096 case ASM_OP_LDFP8_S
:
1097 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_S
);
1100 case ASM_OP_LDFP8_SA
:
1101 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_SA
);
1105 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_NONE
);
1108 case ASM_OP_LDFPD_A
:
1109 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_A
);
1112 case ASM_OP_LDFPD_C_CLR
:
1113 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_CLR
);
1116 case ASM_OP_LDFPD_C_NC
:
1117 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_NC
);
1120 case ASM_OP_LDFPD_S
:
1121 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_S
);
1124 case ASM_OP_LDFPD_SA
:
1125 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_SA
);
1129 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_NONE
);
1132 case ASM_OP_LDFPS_A
:
1133 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_A
);
1136 case ASM_OP_LDFPS_C_CLR
:
1137 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_CLR
);
1140 case ASM_OP_LDFPS_C_NC
:
1141 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_NC
);
1144 case ASM_OP_LDFPS_S
:
1145 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_S
);
1148 case ASM_OP_LDFPS_SA
:
1149 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_SA
);
1153 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_NONE
);
1157 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_A
);
1160 case ASM_OP_LDFS_C_CLR
:
1161 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_CLR
);
1164 case ASM_OP_LDFS_C_NC
:
1165 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_C_NC
);
1169 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_S
);
1172 case ASM_OP_LDFS_SA
:
1173 asm_cmpltr_add(i
, ASM_CC_FLDTYPE
, ASM_CT_SA
);
1176 case ASM_OP_LFETCH_
:
1177 asm_cmpltr_add(i
, ASM_CC_LFTYPE
, ASM_CT_NONE
);
1178 asm_cmpltr_add(i
, ASM_CC_LFETCH
, ASM_CT_NONE
);
1181 case ASM_OP_LFETCH_EXCL
:
1182 asm_cmpltr_add(i
, ASM_CC_LFTYPE
, ASM_CT_NONE
);
1183 asm_cmpltr_add(i
, ASM_CC_LFETCH
, ASM_CT_EXCL
);
1186 case ASM_OP_LFETCH_FAULT
:
1187 asm_cmpltr_add(i
, ASM_CC_LFTYPE
, ASM_CT_FAULT
);
1188 asm_cmpltr_add(i
, ASM_CC_LFETCH
, ASM_CT_NONE
);
1191 case ASM_OP_LFETCH_FAULT_EXCL
:
1192 asm_cmpltr_add(i
, ASM_CC_LFTYPE
, ASM_CT_FAULT
);
1193 asm_cmpltr_add(i
, ASM_CC_LFETCH
, ASM_CT_EXCL
);
1197 asm_cmpltr_add(i
, ASM_CC_MF
, ASM_CT_NONE
);
1201 asm_cmpltr_add(i
, ASM_CC_MF
, ASM_CT_A
);
1205 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_L
);
1209 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_R
);
1213 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_L
);
1217 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_R
);
1221 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_L
);
1225 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_R
);
1229 asm_cmpltr_add(i
, ASM_CC_MOV
, ASM_CT_NONE
);
1233 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_I
);
1237 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_M
);
1240 case ASM_OP_MOV_RET
:
1241 asm_cmpltr_add(i
, ASM_CC_MOV
, ASM_CT_RET
);
1244 case ASM_OP_MOV_CPUID
:
1245 ot
= ASM_OPER_CPUID
;
1248 case ASM_OP_MOV_DBR
:
1252 case ASM_OP_MOV_IBR
:
1260 case ASM_OP_MOV_MSR
:
1264 case ASM_OP_MOV_PKR
:
1268 case ASM_OP_MOV_PMC
:
1272 case ASM_OP_MOV_PMD
:
1280 case ASM_OP_MOV_PSR
:
1284 case ASM_OP_MOV_PSR_L
:
1285 ot
= ASM_OPER_PSR_L
;
1288 case ASM_OP_MOV_PSR_UM
:
1289 ot
= ASM_OPER_PSR_UM
;
1297 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_B
);
1301 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_F
);
1305 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_I
);
1309 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_M
);
1313 asm_cmpltr_add(i
, ASM_CC_UNIT
, ASM_CT_X
);
1316 case ASM_OP_PACK2_SSS
:
1317 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_SSS
);
1320 case ASM_OP_PACK2_USS
:
1321 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_USS
);
1324 case ASM_OP_PACK4_SSS
:
1325 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_SSS
);
1329 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_NONE
);
1332 case ASM_OP_PADD1_SSS
:
1333 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_SSS
);
1336 case ASM_OP_PADD1_UUS
:
1337 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_UUS
);
1340 case ASM_OP_PADD1_UUU
:
1341 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_UUU
);
1345 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_NONE
);
1348 case ASM_OP_PADD2_SSS
:
1349 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_SSS
);
1352 case ASM_OP_PADD2_UUS
:
1353 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_UUS
);
1356 case ASM_OP_PADD2_UUU
:
1357 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_UUU
);
1361 asm_cmpltr_add(i
, ASM_CC_PAVG
, ASM_CT_NONE
);
1364 case ASM_OP_PAVG1_RAZ
:
1365 asm_cmpltr_add(i
, ASM_CC_PAVG
, ASM_CT_RAZ
);
1369 asm_cmpltr_add(i
, ASM_CC_PAVG
, ASM_CT_NONE
);
1372 case ASM_OP_PAVG2_RAZ
:
1373 asm_cmpltr_add(i
, ASM_CC_PAVG
, ASM_CT_RAZ
);
1376 case ASM_OP_PCMP1_EQ
:
1377 asm_cmpltr_add(i
, ASM_CC_PREL
, ASM_CT_EQ
);
1380 case ASM_OP_PCMP1_GT
:
1381 asm_cmpltr_add(i
, ASM_CC_PREL
, ASM_CT_GT
);
1384 case ASM_OP_PCMP2_EQ
:
1385 asm_cmpltr_add(i
, ASM_CC_PREL
, ASM_CT_EQ
);
1388 case ASM_OP_PCMP2_GT
:
1389 asm_cmpltr_add(i
, ASM_CC_PREL
, ASM_CT_GT
);
1392 case ASM_OP_PCMP4_EQ
:
1393 asm_cmpltr_add(i
, ASM_CC_PREL
, ASM_CT_EQ
);
1396 case ASM_OP_PCMP4_GT
:
1397 asm_cmpltr_add(i
, ASM_CC_PREL
, ASM_CT_GT
);
1400 case ASM_OP_PMAX1_U
:
1401 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_U
);
1404 case ASM_OP_PMIN1_U
:
1405 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_U
);
1408 case ASM_OP_PMPY2_L
:
1409 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_L
);
1412 case ASM_OP_PMPY2_R
:
1413 asm_cmpltr_add(i
, ASM_CC_LR
, ASM_CT_R
);
1416 case ASM_OP_PMPYSHR2_
:
1417 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_NONE
);
1418 op
= ASM_OP_PMPYSHR2
;
1420 case ASM_OP_PMPYSHR2_U
:
1421 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_U
);
1422 op
= ASM_OP_PMPYSHR2
;
1424 case ASM_OP_PROBE_R
:
1425 asm_cmpltr_add(i
, ASM_CC_RW
, ASM_CT_R
);
1426 asm_cmpltr_add(i
, ASM_CC_PRTYPE
, ASM_CT_NONE
);
1429 case ASM_OP_PROBE_R_FAULT
:
1430 asm_cmpltr_add(i
, ASM_CC_RW
, ASM_CT_R
);
1431 asm_cmpltr_add(i
, ASM_CC_PRTYPE
, ASM_CT_FAULT
);
1434 case ASM_OP_PROBE_RW_FAULT
:
1435 asm_cmpltr_add(i
, ASM_CC_RW
, ASM_CT_RW
);
1436 asm_cmpltr_add(i
, ASM_CC_PRTYPE
, ASM_CT_FAULT
);
1439 case ASM_OP_PROBE_W
:
1440 asm_cmpltr_add(i
, ASM_CC_RW
, ASM_CT_W
);
1441 asm_cmpltr_add(i
, ASM_CC_PRTYPE
, ASM_CT_NONE
);
1444 case ASM_OP_PROBE_W_FAULT
:
1445 asm_cmpltr_add(i
, ASM_CC_RW
, ASM_CT_W
);
1446 asm_cmpltr_add(i
, ASM_CC_PRTYPE
, ASM_CT_FAULT
);
1450 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_NONE
);
1453 case ASM_OP_PSHR2_U
:
1454 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_U
);
1458 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_NONE
);
1461 case ASM_OP_PSHR4_U
:
1462 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_U
);
1466 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_NONE
);
1469 case ASM_OP_PSUB1_SSS
:
1470 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_SSS
);
1473 case ASM_OP_PSUB1_UUS
:
1474 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_UUS
);
1477 case ASM_OP_PSUB1_UUU
:
1478 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_UUU
);
1482 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_NONE
);
1485 case ASM_OP_PSUB2_SSS
:
1486 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_SSS
);
1489 case ASM_OP_PSUB2_UUS
:
1490 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_UUS
);
1493 case ASM_OP_PSUB2_UUU
:
1494 asm_cmpltr_add(i
, ASM_CC_SAT
, ASM_CT_UUU
);
1498 asm_cmpltr_add(i
, ASM_CC_PTC
, ASM_CT_E
);
1502 asm_cmpltr_add(i
, ASM_CC_PTC
, ASM_CT_G
);
1506 asm_cmpltr_add(i
, ASM_CC_PTC
, ASM_CT_GA
);
1510 asm_cmpltr_add(i
, ASM_CC_PTC
, ASM_CT_L
);
1514 asm_cmpltr_add(i
, ASM_CC_PTR
, ASM_CT_D
);
1518 asm_cmpltr_add(i
, ASM_CC_PTR
, ASM_CT_I
);
1522 asm_cmpltr_add(i
, ASM_CC_SETF
, ASM_CT_D
);
1525 case ASM_OP_SETF_EXP
:
1526 asm_cmpltr_add(i
, ASM_CC_SETF
, ASM_CT_EXP
);
1530 asm_cmpltr_add(i
, ASM_CC_SETF
, ASM_CT_S
);
1533 case ASM_OP_SETF_SIG
:
1534 asm_cmpltr_add(i
, ASM_CC_SETF
, ASM_CT_SIG
);
1538 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_NONE
);
1542 asm_cmpltr_add(i
, ASM_CC_UNS
, ASM_CT_U
);
1546 asm_cmpltr_add(i
, ASM_CC_SRLZ
, ASM_CT_D
);
1550 asm_cmpltr_add(i
, ASM_CC_SRLZ
, ASM_CT_I
);
1554 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_NONE
);
1557 case ASM_OP_ST1_REL
:
1558 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_REL
);
1562 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_NONE
);
1565 case ASM_OP_ST16_REL
:
1566 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_REL
);
1570 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_NONE
);
1573 case ASM_OP_ST2_REL
:
1574 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_REL
);
1578 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_NONE
);
1581 case ASM_OP_ST4_REL
:
1582 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_REL
);
1586 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_NONE
);
1589 case ASM_OP_ST8_REL
:
1590 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_REL
);
1593 case ASM_OP_ST8_SPILL
:
1594 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_SPILL
);
1597 case ASM_OP_STF_SPILL
:
1598 asm_cmpltr_add(i
, ASM_CC_STTYPE
, ASM_CT_SPILL
);
1602 asm_cmpltr_add(i
, ASM_CC_SYNC
, ASM_CT_I
);
1605 case ASM_OP_TBIT_NZ_AND
:
1606 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_NZ
);
1607 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
1610 case ASM_OP_TBIT_NZ_OR
:
1611 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_NZ
);
1612 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
1615 case ASM_OP_TBIT_NZ_OR_ANDCM
:
1616 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_NZ
);
1617 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
1621 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1622 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_NONE
);
1625 case ASM_OP_TBIT_Z_AND
:
1626 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1627 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
1630 case ASM_OP_TBIT_Z_OR
:
1631 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1632 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
1635 case ASM_OP_TBIT_Z_OR_ANDCM
:
1636 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1637 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
1640 case ASM_OP_TBIT_Z_UNC
:
1641 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1642 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_UNC
);
1645 case ASM_OP_TNAT_NZ_AND
:
1646 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_NZ
);
1647 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
1650 case ASM_OP_TNAT_NZ_OR
:
1651 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_NZ
);
1652 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
1655 case ASM_OP_TNAT_NZ_OR_ANDCM
:
1656 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_NZ
);
1657 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
1661 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1662 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_NONE
);
1665 case ASM_OP_TNAT_Z_AND
:
1666 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1667 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_AND
);
1670 case ASM_OP_TNAT_Z_OR
:
1671 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1672 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR
);
1675 case ASM_OP_TNAT_Z_OR_ANDCM
:
1676 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1677 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_OR_ANDCM
);
1680 case ASM_OP_TNAT_Z_UNC
:
1681 asm_cmpltr_add(i
, ASM_CC_TREL
, ASM_CT_Z
);
1682 asm_cmpltr_add(i
, ASM_CC_CTYPE
, ASM_CT_UNC
);
1685 case ASM_OP_UNPACK1_H
:
1686 asm_cmpltr_add(i
, ASM_CC_UNPACK
, ASM_CT_H
);
1687 op
= ASM_OP_UNPACK1
;
1689 case ASM_OP_UNPACK1_L
:
1690 asm_cmpltr_add(i
, ASM_CC_UNPACK
, ASM_CT_L
);
1691 op
= ASM_OP_UNPACK1
;
1693 case ASM_OP_UNPACK2_H
:
1694 asm_cmpltr_add(i
, ASM_CC_UNPACK
, ASM_CT_H
);
1695 op
= ASM_OP_UNPACK2
;
1697 case ASM_OP_UNPACK2_L
:
1698 asm_cmpltr_add(i
, ASM_CC_UNPACK
, ASM_CT_L
);
1699 op
= ASM_OP_UNPACK2
;
1701 case ASM_OP_UNPACK4_H
:
1702 asm_cmpltr_add(i
, ASM_CC_UNPACK
, ASM_CT_H
);
1703 op
= ASM_OP_UNPACK4
;
1705 case ASM_OP_UNPACK4_L
:
1706 asm_cmpltr_add(i
, ASM_CC_UNPACK
, ASM_CT_L
);
1707 op
= ASM_OP_UNPACK4
;
1710 asm_cmpltr_add(i
, ASM_CC_XMA
, ASM_CT_H
);
1714 asm_cmpltr_add(i
, ASM_CC_XMA
, ASM_CT_HU
);
1718 asm_cmpltr_add(i
, ASM_CC_XMA
, ASM_CT_L
);
1722 KASSERT(op
< ASM_OP_NUMBER_OF_OPCODES
);
1729 static __inline
void
1730 op_imm(struct asm_inst
*i
, int op
, uint64_t val
)
1732 i
->i_oper
[op
].o_type
= ASM_OPER_IMM
;
1733 i
->i_oper
[op
].o_value
= val
;
1736 static __inline
void
1737 op_type(struct asm_inst
*i
, int op
, enum asm_oper_type ot
)
1739 i
->i_oper
[op
].o_type
= ot
;
1742 static __inline
void
1743 op_value(struct asm_inst
*i
, int op
, uint64_t val
)
1745 i
->i_oper
[op
].o_value
= val
;
1748 static __inline
void
1749 operand(struct asm_inst
*i
, int op
, enum asm_oper_type ot
, uint64_t bits
,
1752 i
->i_oper
[op
].o_type
= ot
;
1753 i
->i_oper
[op
].o_value
= FIELD(bits
, o
, l
);
1757 imm(uint64_t bits
, int sign
, int o
, int l
)
1759 uint64_t val
= FIELD(bits
, o
, l
);
1761 if (sign
&& (val
& (1LL << (l
- 1))) != 0)
1767 s_imm(struct asm_inst
*i
, int op
, uint64_t bits
, int o
, int l
)
1769 i
->i_oper
[op
].o_type
= ASM_OPER_IMM
;
1770 i
->i_oper
[op
].o_value
= imm(bits
, 1, o
, l
);
1774 u_imm(struct asm_inst
*i
, int op
, uint64_t bits
, int o
, int l
)
1776 i
->i_oper
[op
].o_type
= ASM_OPER_IMM
;
1777 i
->i_oper
[op
].o_value
= imm(bits
, 0, o
, l
);
1781 vimm(uint64_t bits
, int sign
, va_list ap
)
1787 while ((frag
= va_arg(ap
, int)) != 0) {
1788 val
|= (uint64_t)FIELD(bits
, FRAG_OFS(frag
), FRAG_LEN(frag
))
1790 len
+= FRAG_LEN(frag
);
1792 if (sign
&& (val
& (1LL << (len
- 1))) != 0)
1798 s_immf(struct asm_inst
*i
, int op
, uint64_t bits
, ...)
1802 i
->i_oper
[op
].o_type
= ASM_OPER_IMM
;
1803 i
->i_oper
[op
].o_value
= vimm(bits
, 1, ap
);
1808 u_immf(struct asm_inst
*i
, int op
, uint64_t bits
, ...)
1812 i
->i_oper
[op
].o_type
= ASM_OPER_IMM
;
1813 i
->i_oper
[op
].o_value
= vimm(bits
, 0, ap
);
1818 disp(struct asm_inst
*i
, int op
, uint64_t bits
, ...)
1822 i
->i_oper
[op
].o_type
= ASM_OPER_DISP
;
1823 i
->i_oper
[op
].o_value
= vimm(bits
, 1, ap
) << 4;
1827 static __inline
void
1828 combine(uint64_t *dst
, int dl
, uint64_t src
, int sl
, int so
)
1830 *dst
= (*dst
& ((1LL << dl
) - 1LL)) |
1831 ((uint64_t)_FLD64(src
, so
, sl
) << dl
);
1835 asm_extract(enum asm_op op
, enum asm_fmt fmt
, uint64_t bits
,
1836 struct asm_bundle
*b
, int slot
)
1838 struct asm_inst
*i
= b
->b_inst
+ slot
;
1839 enum asm_oper_type ot
;
1841 KASSERT(op
!= ASM_OP_NONE
);
1846 ot
= asm_normalize(i
, op
);
1848 if (fmt
!= ASM_FMT_B6
&& fmt
!= ASM_FMT_B7
)
1849 operand(i
, 0, ASM_OPER_PREG
, bits
, 0, 6);
1853 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
1854 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
1855 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
1856 if ((op
== ASM_OP_ADD
&& FIELD(bits
, 27, 2) == 1) ||
1857 (op
== ASM_OP_SUB
&& FIELD(bits
, 27, 2) == 0))
1861 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
1862 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
1863 op_imm(i
, 3, 1LL + FIELD(bits
, 27, 2));
1864 operand(i
, 4, ASM_OPER_GREG
, bits
, 20, 7);
1867 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
1868 s_immf(i
, 2, bits
, FRAG(13,7), FRAG(36,1), 0);
1869 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
1872 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
1873 s_immf(i
, 2, bits
, FRAG(13,7), FRAG(27,6), FRAG(36,1), 0);
1874 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
1877 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
1878 s_immf(i
, 2, bits
, FRAG(13,7), FRAG(27,9), FRAG(22,5),
1880 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 2);
1882 case ASM_FMT_A6
: /* 2 dst */
1883 operand(i
, 1, ASM_OPER_PREG
, bits
, 6, 6);
1884 operand(i
, 2, ASM_OPER_PREG
, bits
, 27, 6);
1885 operand(i
, 3, ASM_OPER_GREG
, bits
, 13, 7);
1886 operand(i
, 4, ASM_OPER_GREG
, bits
, 20, 7);
1889 case ASM_FMT_A7
: /* 2 dst */
1890 if (FIELD(bits
, 13, 7) != 0)
1892 operand(i
, 1, ASM_OPER_PREG
, bits
, 6, 6);
1893 operand(i
, 2, ASM_OPER_PREG
, bits
, 27, 6);
1894 operand(i
, 3, ASM_OPER_GREG
, bits
, 13, 7);
1895 operand(i
, 4, ASM_OPER_GREG
, bits
, 20, 7);
1898 case ASM_FMT_A8
: /* 2 dst */
1899 operand(i
, 1, ASM_OPER_PREG
, bits
, 6, 6);
1900 operand(i
, 2, ASM_OPER_PREG
, bits
, 27, 6);
1901 s_immf(i
, 3, bits
, FRAG(13,7), FRAG(36,1), 0);
1902 operand(i
, 4, ASM_OPER_GREG
, bits
, 20, 7);
1906 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
1907 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
1908 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
1911 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
1912 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
1913 op_imm(i
, 3, 1LL + FIELD(bits
, 27, 2));
1914 operand(i
, 4, ASM_OPER_GREG
, bits
, 20, 7);
1916 case ASM_FMT_B1
: /* 0 dst */
1918 disp(i
, 1, bits
, FRAG(13,20), FRAG(36,1), 0);
1920 case ASM_FMT_B2
: /* 0 dst */
1921 if (FIELD(bits
, 0, 6) != 0)
1924 disp(i
, 1, bits
, FRAG(13,20), FRAG(36,1), 0);
1928 operand(i
, 1, ASM_OPER_BREG
, bits
, 6, 3);
1929 disp(i
, 2, bits
, FRAG(13,20), FRAG(36,1), 0);
1931 case ASM_FMT_B4
: /* 0 dst */
1933 operand(i
, 1, ASM_OPER_BREG
, bits
, 13, 3);
1937 if (FIELD(bits
, 32, 1) == 0)
1941 operand(i
, 1, ASM_OPER_BREG
, bits
, 6, 3);
1942 operand(i
, 2, ASM_OPER_BREG
, bits
, 13, 3);
1944 case ASM_FMT_B6
: /* 0 dst */
1946 disp(i
, 1, bits
, FRAG(13,20), FRAG(36,1), 0);
1947 disp(i
, 2, bits
, FRAG(6,7), FRAG(33,2), 0);
1950 case ASM_FMT_B7
: /* 0 dst */
1952 operand(i
, 1, ASM_OPER_BREG
, bits
, 13, 3);
1953 disp(i
, 2, bits
, FRAG(6,7), FRAG(33,2), 0);
1959 case ASM_FMT_B9
: /* 0 dst */
1960 u_immf(i
, 1, bits
, FRAG(6,20), FRAG(36,1), 0);
1964 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
1965 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
1966 operand(i
, 3, ASM_OPER_FREG
, bits
, 20, 7);
1967 operand(i
, 4, ASM_OPER_FREG
, bits
, 27, 7);
1970 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
1971 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
1972 operand(i
, 3, ASM_OPER_FREG
, bits
, 20, 7);
1973 operand(i
, 4, ASM_OPER_FREG
, bits
, 27, 7);
1976 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
1977 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
1978 operand(i
, 3, ASM_OPER_FREG
, bits
, 20, 7);
1979 operand(i
, 4, ASM_OPER_FREG
, bits
, 27, 7);
1981 case ASM_FMT_F4
: /* 2 dst */
1982 if (FIELD(bits
, 33, 1)) { /* ra */
1983 if (FIELD(bits
, 36, 1)) /* rb */
1984 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_UNORD
);
1986 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_LE
);
1988 if (FIELD(bits
, 36, 1)) /* rb */
1989 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_LT
);
1991 asm_cmpltr_add(i
, ASM_CC_FREL
, ASM_CT_EQ
);
1993 if (FIELD(bits
, 12, 1)) /* ta */
1994 asm_cmpltr_add(i
, ASM_CC_FCTYPE
, ASM_CT_UNC
);
1996 asm_cmpltr_add(i
, ASM_CC_FCTYPE
, ASM_CT_NONE
);
1998 operand(i
, 1, ASM_OPER_PREG
, bits
, 6, 6);
1999 operand(i
, 2, ASM_OPER_PREG
, bits
, 27, 6);
2000 operand(i
, 3, ASM_OPER_FREG
, bits
, 13, 7);
2001 operand(i
, 4, ASM_OPER_FREG
, bits
, 20, 7);
2004 case ASM_FMT_F5
: /* 2 dst */
2005 operand(i
, 1, ASM_OPER_PREG
, bits
, 6, 6);
2006 operand(i
, 2, ASM_OPER_PREG
, bits
, 27, 6);
2007 operand(i
, 3, ASM_OPER_FREG
, bits
, 13, 7);
2008 u_immf(i
, 4, bits
, FRAG(33,2), FRAG(20,7), 0);
2011 case ASM_FMT_F6
: /* 2 dst */
2013 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2014 operand(i
, 2, ASM_OPER_PREG
, bits
, 27, 6);
2015 operand(i
, 3, ASM_OPER_FREG
, bits
, 13, 7);
2016 operand(i
, 4, ASM_OPER_FREG
, bits
, 20, 7);
2019 case ASM_FMT_F7
: /* 2 dst */
2021 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2022 operand(i
, 2, ASM_OPER_PREG
, bits
, 27, 6);
2023 operand(i
, 3, ASM_OPER_FREG
, bits
, 20, 7);
2028 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2029 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
2030 operand(i
, 3, ASM_OPER_FREG
, bits
, 20, 7);
2033 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2034 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
2035 operand(i
, 3, ASM_OPER_FREG
, bits
, 20, 7);
2039 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2040 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
2043 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2044 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
2046 case ASM_FMT_F12
: /* 0 dst */
2048 u_imm(i
, 1, bits
, 13, 7);
2049 u_imm(i
, 2, bits
, 20, 7);
2056 case ASM_FMT_F14
: /* 0 dst */
2058 disp(i
, 1, bits
, FRAG(6,20), FRAG(36,1), 0);
2060 case ASM_FMT_F15
: /* 0 dst */
2061 u_imm(i
, 1, bits
, 6, 20);
2064 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2065 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2066 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
2067 switch (FIELD(bits
, 30, 2)) {
2068 case 0: op_imm(i
, 4, 0LL); break;
2069 case 1: op_imm(i
, 4, 7LL); break;
2070 case 2: op_imm(i
, 4, 15LL); break;
2071 case 3: op_imm(i
, 4, 16LL); break;
2075 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2076 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2077 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
2080 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2081 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2082 u_imm(i
, 3, bits
, 20, 4);
2085 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2086 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2087 u_imm(i
, 3, bits
, 20, 8);
2090 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2091 operand(i
, 2, ASM_OPER_GREG
, bits
, 20, 7);
2092 operand(i
, 3, ASM_OPER_GREG
, bits
, 13, 7);
2095 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2096 operand(i
, 2, ASM_OPER_GREG
, bits
, 20, 7);
2097 u_imm(i
, 3, bits
, 14, 5);
2100 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2101 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2102 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
2105 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2106 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2107 op_imm(i
, 3, 31LL - FIELD(bits
, 20, 5));
2110 if (FIELD(bits
, 13, 7) != 0)
2112 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2113 operand(i
, 2, ASM_OPER_GREG
, bits
, 20, 7);
2116 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2117 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2118 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
2119 u_imm(i
, 4, bits
, 27, 6);
2122 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2123 operand(i
, 2, ASM_OPER_GREG
, bits
, 20, 7);
2124 u_imm(i
, 3, bits
, 14, 6);
2125 op_imm(i
, 4, 1LL + FIELD(bits
, 27, 6));
2128 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2129 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2130 op_imm(i
, 3, 63LL - FIELD(bits
, 20, 6));
2131 op_imm(i
, 4, 1LL + FIELD(bits
, 27, 6));
2134 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2135 s_immf(i
, 2, bits
, FRAG(13,7), FRAG(36,1), 0);
2136 op_imm(i
, 3, 63LL - FIELD(bits
, 20, 6));
2137 op_imm(i
, 4, 1LL + FIELD(bits
, 27, 6));
2140 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2141 s_imm(i
, 2, bits
, 36, 1);
2142 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
2143 op_imm(i
, 4, 63LL - FIELD(bits
, 14, 6));
2144 op_imm(i
, 5, 1LL + FIELD(bits
, 27, 6));
2147 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2148 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2149 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
2150 op_imm(i
, 4, 63LL - FIELD(bits
, 31, 6));
2151 op_imm(i
, 5, 1LL + FIELD(bits
, 27, 4));
2153 case ASM_FMT_I16
: /* 2 dst */
2154 operand(i
, 1, ASM_OPER_PREG
, bits
, 6, 6);
2155 operand(i
, 2, ASM_OPER_PREG
, bits
, 27, 6);
2156 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
2157 u_imm(i
, 4, bits
, 14, 6);
2160 case ASM_FMT_I17
: /* 2 dst */
2161 operand(i
, 1, ASM_OPER_PREG
, bits
, 6, 6);
2162 operand(i
, 2, ASM_OPER_PREG
, bits
, 27, 6);
2163 operand(i
, 3, ASM_OPER_GREG
, bits
, 20, 7);
2167 u_immf(i
, 1, bits
, FRAG(6,20), FRAG(36,1), 0);
2169 case ASM_FMT_I20
: /* 0 dst */
2170 operand(i
, 1, ASM_OPER_GREG
, bits
, 13, 7);
2171 disp(i
, 2, bits
, FRAG(6,7), FRAG(20,13), FRAG(36,1), 0);
2175 switch (FIELD(bits
, 20, 2)) { /* wh */
2176 case 0: asm_cmpltr_add(i
, ASM_CC_MWH
, ASM_CT_SPTK
); break;
2177 case 1: asm_cmpltr_add(i
, ASM_CC_MWH
, ASM_CT_NONE
); break;
2178 case 2: asm_cmpltr_add(i
, ASM_CC_MWH
, ASM_CT_DPTK
); break;
2181 if (FIELD(bits
, 23, 1)) /* ih */
2182 asm_cmpltr_add(i
, ASM_CC_IH
, ASM_CT_IMP
);
2184 asm_cmpltr_add(i
, ASM_CC_IH
, ASM_CT_NONE
);
2185 operand(i
, 1, ASM_OPER_BREG
, bits
, 6, 3);
2186 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2187 disp(i
, 3, bits
, FRAG(24,9), 0);
2190 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2191 operand(i
, 2, ASM_OPER_BREG
, bits
, 13, 3);
2194 op_type(i
, 1, ASM_OPER_PR
);
2195 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2196 u_immf(i
, 3, bits
, FRAG(6,7), FRAG(24,8), FRAG(36,1), 0);
2197 i
->i_oper
[3].o_value
<<= 1;
2200 op_type(i
, 1, ASM_OPER_PR_ROT
);
2201 s_immf(i
, 2, bits
, FRAG(6,27), FRAG(36,1), 0);
2204 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2208 operand(i
, 1, ASM_OPER_AREG
, bits
, 20, 7);
2209 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2212 operand(i
, 1, ASM_OPER_AREG
, bits
, 20, 7);
2213 s_immf(i
, 2, bits
, FRAG(13,7), FRAG(36,1), 0);
2216 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2217 operand(i
, 2, ASM_OPER_AREG
, bits
, 20, 7);
2220 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2221 operand(i
, 2, ASM_OPER_GREG
, bits
, 20, 7);
2224 asm_hint(i
, ASM_CC_LDHINT
);
2225 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2226 if (i
->i_op
== ASM_OP_LD16
) {
2227 op_type(i
, 2, ASM_OPER_AREG
);
2228 op_value(i
, 2, AR_CSD
);
2231 operand(i
, i
->i_srcidx
, ASM_OPER_MEM
, bits
, 20, 7);
2234 asm_hint(i
, ASM_CC_LDHINT
);
2235 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2236 operand(i
, 2, ASM_OPER_MEM
, bits
, 20, 7);
2237 operand(i
, 3, ASM_OPER_GREG
, bits
, 13, 7);
2240 asm_hint(i
, ASM_CC_LDHINT
);
2241 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2242 operand(i
, 2, ASM_OPER_MEM
, bits
, 20, 7);
2243 s_immf(i
, 3, bits
, FRAG(13,7), FRAG(27,1), FRAG(36,1), 0);
2246 asm_hint(i
, ASM_CC_STHINT
);
2247 operand(i
, 1, ASM_OPER_MEM
, bits
, 20, 7);
2248 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2249 if (i
->i_op
== ASM_OP_ST16
) {
2250 op_type(i
, 3, ASM_OPER_AREG
);
2251 op_value(i
, 3, AR_CSD
);
2255 asm_hint(i
, ASM_CC_STHINT
);
2256 operand(i
, 1, ASM_OPER_MEM
, bits
, 20, 7);
2257 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2258 s_immf(i
, 3, bits
, FRAG(6,7), FRAG(27,1), FRAG(36,1), 0);
2261 asm_hint(i
, ASM_CC_LDHINT
);
2262 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2263 operand(i
, 2, ASM_OPER_MEM
, bits
, 20, 7);
2266 asm_hint(i
, ASM_CC_LDHINT
);
2267 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2268 operand(i
, 2, ASM_OPER_MEM
, bits
, 20, 7);
2269 operand(i
, 3, ASM_OPER_GREG
, bits
, 13, 7);
2272 asm_hint(i
, ASM_CC_LDHINT
);
2273 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2274 operand(i
, 2, ASM_OPER_MEM
, bits
, 20, 7);
2275 s_immf(i
, 3, bits
, FRAG(13,7), FRAG(27,1), FRAG(36,1), 0);
2278 asm_hint(i
, ASM_CC_STHINT
);
2279 operand(i
, 1, ASM_OPER_MEM
, bits
, 20, 7);
2280 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
2283 asm_hint(i
, ASM_CC_STHINT
);
2284 operand(i
, 1, ASM_OPER_MEM
, bits
, 20, 7);
2285 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
2286 s_immf(i
, 3, bits
, FRAG(6,7), FRAG(27,1), FRAG(36,1), 0);
2288 case ASM_FMT_M11
: /* 2 dst */
2289 asm_hint(i
, ASM_CC_LDHINT
);
2290 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2291 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
2292 operand(i
, 3, ASM_OPER_MEM
, bits
, 20, 7);
2295 case ASM_FMT_M12
: /* 2 dst */
2296 asm_hint(i
, ASM_CC_LDHINT
);
2297 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2298 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
2299 operand(i
, 3, ASM_OPER_MEM
, bits
, 20, 7);
2300 op_imm(i
, 4, 8LL << FIELD(bits
, 30, 1));
2304 asm_hint(i
, ASM_CC_LFHINT
);
2305 operand(i
, 1, ASM_OPER_MEM
, bits
, 20, 7);
2307 case ASM_FMT_M14
: /* 0 dst */
2308 asm_hint(i
, ASM_CC_LFHINT
);
2309 operand(i
, 1, ASM_OPER_MEM
, bits
, 20, 7);
2310 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2313 case ASM_FMT_M15
: /* 0 dst */
2314 asm_hint(i
, ASM_CC_LFHINT
);
2315 operand(i
, 1, ASM_OPER_MEM
, bits
, 20, 7);
2316 s_immf(i
, 2, bits
, FRAG(13,7), FRAG(27,1), FRAG(36,1), 0);
2321 asm_hint(i
, ASM_CC_LDHINT
);
2322 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2323 operand(i
, 2, ASM_OPER_MEM
, bits
, 20, 7);
2324 operand(i
, 3, ASM_OPER_GREG
, bits
, 13, 7);
2325 if (i
->i_op
== ASM_OP_CMP8XCHG16
) {
2326 op_type(i
, 4, ASM_OPER_AREG
);
2327 op_value(i
, 4, AR_CSD
);
2331 if (FIELD(bits
, 30, 6) < 8) {
2332 op_type(i
, oper
, ASM_OPER_AREG
);
2333 op_value(i
, oper
, AR_CCV
);
2338 asm_hint(i
, ASM_CC_LDHINT
);
2339 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2340 operand(i
, 2, ASM_OPER_MEM
, bits
, 20, 7);
2341 switch (FIELD(bits
, 13, 2)) {
2342 case 0: op_imm(i
, 3, 1LL << 4); break;
2343 case 1: op_imm(i
, 3, 1LL << 3); break;
2344 case 2: op_imm(i
, 3, 1LL << 2); break;
2345 case 3: op_imm(i
, 3, 1LL); break;
2347 if (FIELD(bits
, 15, 1))
2348 i
->i_oper
[3].o_value
*= -1LL;
2351 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2352 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2355 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2356 operand(i
, 2, ASM_OPER_FREG
, bits
, 13, 7);
2358 case ASM_FMT_M20
: /* 0 dst */
2359 operand(i
, 1, ASM_OPER_GREG
, bits
, 13, 7);
2360 disp(i
, 2, bits
, FRAG(6,7), FRAG(20,13), FRAG(36,1), 0);
2363 case ASM_FMT_M21
: /* 0 dst */
2364 operand(i
, 1, ASM_OPER_FREG
, bits
, 13, 7);
2365 disp(i
, 2, bits
, FRAG(6,7), FRAG(20,13), FRAG(36,1), 0);
2368 case ASM_FMT_M22
: /* 0 dst */
2369 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2370 disp(i
, 2, bits
, FRAG(13,20), FRAG(36,1), 0);
2373 case ASM_FMT_M23
: /* 0 dst */
2374 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2375 disp(i
, 2, bits
, FRAG(13,20), FRAG(36,1), 0);
2382 if (FIELD(bits
, 0, 6) != 0)
2387 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2390 operand(i
, 1, ASM_OPER_FREG
, bits
, 6, 7);
2393 operand(i
, 1, ASM_OPER_GREG
, bits
, 20, 7);
2396 operand(i
, 1, ASM_OPER_AREG
, bits
, 20, 7);
2397 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2400 operand(i
, 1, ASM_OPER_AREG
, bits
, 20, 7);
2401 s_immf(i
, 2, bits
, FRAG(13,7), FRAG(36,1), 0);
2404 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2405 operand(i
, 2, ASM_OPER_AREG
, bits
, 20, 7);
2408 operand(i
, 1, ASM_OPER_CREG
, bits
, 20, 7);
2409 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2412 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2413 operand(i
, 2, ASM_OPER_CREG
, bits
, 20, 7);
2417 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2418 op_type(i
, 2, ASM_OPER_AREG
);
2419 op_value(i
, 2, AR_PFS
);
2420 loc
= FIELD(bits
, 20, 7);
2421 out
= FIELD(bits
, 13, 7) - loc
;
2425 op_imm(i
, 6, (uint64_t)FIELD(bits
, 27, 4) << 3);
2429 if (FIELD(bits
, 27, 6) == 0x2D)
2430 op_type(i
, 1, ASM_OPER_PSR_L
);
2432 op_type(i
, 1, ASM_OPER_PSR_UM
);
2433 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2436 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2437 if (FIELD(bits
, 27, 6) == 0x25)
2438 op_type(i
, 2, ASM_OPER_PSR
);
2440 op_type(i
, 2, ASM_OPER_PSR_UM
);
2443 u_immf(i
, 1, bits
, FRAG(6,20), FRAG(36,1), 0);
2446 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2447 operand(i
, 2, ASM_OPER_GREG
, bits
, 20, 7);
2448 operand(i
, 3, ASM_OPER_GREG
, bits
, 13, 7);
2451 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2452 operand(i
, 2, ASM_OPER_GREG
, bits
, 20, 7);
2453 u_imm(i
, 3, bits
, 13, 2);
2455 case ASM_FMT_M40
: /* 0 dst */
2456 operand(i
, 1, ASM_OPER_GREG
, bits
, 20, 7);
2457 u_imm(i
, 2, bits
, 13, 2);
2461 operand(i
, 1, ASM_OPER_GREG
, bits
, 13, 7);
2464 operand(i
, 1, ot
, bits
, 20, 7);
2465 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2468 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2469 operand(i
, 2, ot
, bits
, 20, 7);
2472 u_immf(i
, 1, bits
, FRAG(6,21), FRAG(31,2), FRAG(36,1), 0);
2474 case ASM_FMT_M45
: /* 0 dst */
2475 operand(i
, 1, ASM_OPER_GREG
, bits
, 20, 7);
2476 operand(i
, 2, ASM_OPER_GREG
, bits
, 13, 7);
2480 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2481 operand(i
, 2, ASM_OPER_GREG
, bits
, 20, 7);
2485 u_immf(i
, 1, bits
, FRAG(6,20), FRAG(36,1), 0);
2486 combine(&i
->i_oper
[1].o_value
, 21, b
->b_inst
[1].i_bits
, 41, 0);
2490 operand(i
, 1, ASM_OPER_GREG
, bits
, 6, 7);
2491 u_immf(i
, 2, bits
, FRAG(13,7), FRAG(27,9), FRAG(22,5),
2493 combine(&i
->i_oper
[2].o_value
, 22, b
->b_inst
[1].i_bits
, 41, 0);
2494 combine(&i
->i_oper
[2].o_value
, 63, bits
, 1, 36);
2499 u_imm(i
, 1, bits
, 13, 20);
2500 combine(&i
->i_oper
[1].o_value
, 20, b
->b_inst
[1].i_bits
, 39, 2);
2501 combine(&i
->i_oper
[1].o_value
, 59, bits
, 1, 36);
2502 i
->i_oper
[1].o_value
<<= 4;
2503 i
->i_oper
[1].o_type
= ASM_OPER_DISP
;
2508 operand(i
, 1, ASM_OPER_BREG
, bits
, 6, 3);
2509 u_imm(i
, 2, bits
, 13, 20);
2510 combine(&i
->i_oper
[2].o_value
, 20, b
->b_inst
[1].i_bits
, 39, 2);
2511 combine(&i
->i_oper
[2].o_value
, 59, bits
, 1, 36);
2512 i
->i_oper
[2].o_value
<<= 4;
2513 i
->i_oper
[2].o_type
= ASM_OPER_DISP
;
2516 KASSERT(fmt
== ASM_FMT_NONE
);