25 #define SPR_DSISR 0x12
31 #define SPR_VRSAVE 0x100
32 #define SPR_TBRL 0x10c
33 #define SPR_TBRU 0x10d
34 #define SPR_SPRG0 0x110
35 #define SPR_SPRG1 0x111
36 #define SPR_SPRG2 0x112
37 #define SPR_SPRG3 0x113
42 #define SPR_SPEFSCR 0x200
43 #define SPR_IBAT0U 0x210
44 #define SPR_IBAT0L 0x211
45 #define SPR_IBAT1U 0x212
46 #define SPR_IBAT1L 0x213
47 #define SPR_IBAT2U 0x214
48 #define SPR_IBAT2L 0x215
49 #define SPR_IBAT3U 0x216
50 #define SPR_IBAT3L 0x217
51 #define SPR_DBAT0U 0x218
52 #define SPR_DBAT0L 0x219
53 #define SPR_DBAT1U 0x21a
54 #define SPR_DBAT1L 0x21b
55 #define SPR_DBAT2U 0x21c
56 #define SPR_DBAT2L 0x21d
57 #define SPR_DBAT3U 0x21e
58 #define SPR_DBAT3L 0x21f
59 #define SPR_UMMCR0 0x3a8
60 #define SPR_UMMCR1 0x3ac
61 #define SPR_UPMC1 0x3a9
62 #define SPR_UPMC2 0x3aa
63 #define SPR_USIA 0x3ab
64 #define SPR_UPMC3 0x3ad
65 #define SPR_UPMC4 0x3ae
66 #define SPR_MMCR0 0x3b8
67 #define SPR_PMC1 0x3b9
68 #define SPR_PMC2 0x3ba
70 #define SPR_MMCR1 0x3bc
71 #define SPR_PMC3 0x3bd
72 #define SPR_PMC4 0x3be
74 #define SPR_DMISS 0x3d0
75 #define SPR_DCMP 0x3d1
76 #define SPR_HASH1 0x3d2
77 #define SPR_HASH2 0x3d3
78 #define SPR_IMISS 0x3d4
79 #define SPR_ICMP 0x3d5
81 #define SPR_HID0 0x3f0
82 #define SPR_HID1 0x3f1
83 #define SPR_IABR 0x3f2
84 #define SPR_HID2 0x3f3
85 #define SPR_HID4 0x3f4
86 #define SPR_DABR 0x3f5
87 #define SPR_HID5 0x3f6
88 #define SPR_HID6 0x3f9
90 #define SPR_ICTC 0x3fb
91 #define SPR_THRM1 0x3fc
92 #define SPR_THRM2 0x3fd
93 #define SPR_THRM3 0x3fe
96 #define PPC_UT64(x) (strtol(x, NULL, 16))
97 #define PPC_UT32(x) ((ut32)PPC_UT64(x))
102 return (mb <= me) ? maskmb & maskme : maskmb | maskme;
108 return (mb <= me) ? maskmb & maskme : maskmb | maskme;
118 if ((
int)((
int)
str[
idx] - 0x41) > max_operands) {
125 static char cspr[16];
289 snprintf(cspr,
sizeof(cspr),
"spr_%u", spr);
302 {
"cmpb",
"A = ((byte) B == (byte) C)", 3 },
303 {
"cmpd",
"A = (B == C)", 3 },
304 {
"cmpdi",
"A = (B == C)", 3 },
305 {
"cmpld",
"A = ((unsigned) B == (unsigned) C)", 3 },
306 {
"cmpldi",
"A = ((unsigned) B == (unsigned) C)", 3 },
307 {
"cmplw",
"A = ((unsigned) B == (unsigned) C)", 3 },
308 {
"cmplwi",
"A = ((unsigned) B == (unsigned) C)", 3 },
309 {
"cmpw",
"A = (B == C)", 3 },
310 {
"cmpwi",
"A = (B == C)", 3 },
311 {
"beq",
"if (A & FLG_EQ) goto B", 2 },
312 {
"beq-",
"if (A & FLG_EQ) goto B", 2 },
313 {
"beq+",
"if (A & FLG_EQ) goto B", 2 },
314 {
"bge",
"if (A & FLG_GE) goto B", 2 },
315 {
"bge-",
"if (A & FLG_GE) goto B", 2 },
316 {
"bge+",
"if (A & FLG_GE) goto B", 2 },
317 {
"bgt",
"if (A & FLG_GT) goto B", 2 },
318 {
"bgt-",
"if (A & FLG_GT) goto B", 2 },
319 {
"bgt+",
"if (A & FLG_GT) goto B", 2 },
320 {
"ble",
"if (A & FLG_LE) goto B", 2 },
321 {
"ble-",
"if (A & FLG_LE) goto B", 2 },
322 {
"ble+",
"if (A & FLG_LE) goto B", 2 },
323 {
"blt",
"if (A & FLG_LT) goto B", 2 },
324 {
"blt-",
"if (A & FLG_LT) goto B", 2 },
325 {
"blt+",
"if (A & FLG_LT) goto B", 2 },
326 {
"bne",
"if (A & FLG_NE) goto B", 2 },
327 {
"bne-",
"if (A & FLG_NE) goto B", 2 },
328 {
"bne+",
"if (A & FLG_NE) goto B", 2 },
329 {
"rldic",
"A = rol64(B, C) & D", 4 },
330 {
"rldcl",
"A = rol64(B, C) & D", 4 },
331 {
"rldicl",
"A = rol64(B, C) & D", 4 },
332 {
"rldcr",
"A = rol64(B, C) & D", 4 },
333 {
"rldicr",
"A = rol64(B, C) & D", 4 },
334 {
"rldimi",
"A = (rol64(B, C) & D) | (A & E)", 5 },
335 {
"rlwimi",
"A = (rol32(B, C) & D) | (A & E)", 5 },
336 {
"rlwimi.",
"A = (rol32(B, C) & D) | (A & E)", 5 },
337 {
"rlwinm",
"A = rol32(B, C) & D", 5 },
338 {
"rlwinm.",
"A = rol32(B, C) & D", 5 },
339 {
"rlwnm",
"A = rol32(B, C) & D", 5 },
340 {
"rlwnm.",
"A = rol32(B, C) & D", 5 },
341 {
"td",
"if (B A C) trap", 3 },
342 {
"tdi",
"if (B A C) trap", 3 },
343 {
"tdu",
"if (B A C) trap", 3 },
344 {
"tdui",
"if (B A C) trap", 3 },
345 {
"tw",
"if ((word) B A (word) C) trap", 3 },
346 {
"twi",
"if ((word) B A (word) C) trap", 3 },
347 {
"twu",
"if ((word) B A (word) C) trap", 3 },
348 {
"twui",
"if ((word) B A (word) C) trap", 3 },
349 {
"mfspr",
"A = B", 2 },
350 {
"mtspr",
"A = B", 2 },
351 {
"add",
"A = B + C", 3 },
352 {
"addc",
"A = B + C", 3 },
353 {
"adde",
"A = B + C", 3 },
354 {
"addi",
"A = B + C", 3 },
355 {
"addic",
"A = B + C", 3 },
356 {
"addis",
"A = B + (C << 16)", 3 },
357 {
"addme",
"A = B - A", 2 },
358 {
"addze",
"A = zero extended(B)", 2 },
359 {
"and",
"A = B & C", 3 },
360 {
"andc",
"A = B & C", 3 },
361 {
"andi",
"A = B & C", 3 },
362 {
"andis",
"A = B & (C << 16)", 3 },
363 {
"attn",
"attention A", 1 },
364 {
"b",
"goto A", 1 },
365 {
"ba",
"goto A", 1 },
374 {
"bct",
"goto ct", 0 },
375 {
"bctr",
"goto ctr", 3 },
376 {
"bctrl",
"call ctr", 3 },
377 {
"bdnz",
"if (ctr != 0) goto A", 1 },
378 {
"bdnza",
"if (ctr != 0) goto A", 1 },
379 {
"bdnzf",
"if (ctr != 0 && !cond) goto A", 1 },
380 {
"bdnzfa",
"if (ctr != 0 && !cond) goto A", 1 },
381 {
"bdnzfl",
"if (ctr != 0 && !cond) call A", 1 },
382 {
"bdnzfla",
"if (ctr != 0 && !cond) call A", 1 },
383 {
"bdnzflrl",
"if (ctr != 0 && !cond) call A", 1 },
384 {
"bdnzl",
"if (ctr != 0) call A", 1 },
385 {
"bdnzla",
"if (ctr != 0) call A", 1 },
386 {
"bdnzlr",
"if (ctr != 0) call A", 1 },
387 {
"bdnzlrl",
"if (ctr != 0) call A", 1 },
388 {
"bdnzt",
"if (ctr != 0 && cond) goto A", 1 },
389 {
"bdnzta",
"if (ctr != 0 && cond) goto A", 1 },
390 {
"bdnztl",
"if (ctr != 0 && cond) call A", 1 },
391 {
"bdnztla",
"if (ctr != 0 && cond) call A", 1 },
392 {
"bdnztlr",
"if (ctr != 0 && cond) call A", 1 },
393 {
"bdnztlrl",
"if (ctr != 0 && cond) call A", 1 },
394 {
"bdz",
"if (ctr == 0) goto A", 1 },
395 {
"bdza",
"if (ctr == 0) goto A", 1 },
396 {
"bdzf",
"if (ctr == 0 && !cond) goto A", 1 },
397 {
"bdzfa",
"if (ctr == 0 && !cond) goto A", 1 },
398 {
"bdzfl",
"if (ctr == 0 && !cond) call A", 1 },
399 {
"bdzfla",
"if (ctr == 0 && !cond) call A", 1 },
400 {
"bdzflr",
"if (ctr == 0 && !cond) call A", 1 },
401 {
"bdzflrl",
"if (ctr == 0 && !cond) call A", 1 },
402 {
"bdzl",
"if (ctr == 0) call A", 1 },
403 {
"bdzla",
"if (ctr == 0) call A", 1 },
404 {
"bdzlr",
"if (ctr == 0) call A", 1 },
405 {
"bdzlrl",
"if (ctr == 0) call A", 1 },
406 {
"bdzt",
"if (ctr == 0 && cond) goto A", 1 },
407 {
"bdzta",
"if (ctr == 0 && cond) goto A", 1 },
408 {
"bdztl",
"if (ctr == 0 && cond) call A", 1 },
409 {
"bdztla",
"if (ctr == 0 && cond) call A", 1 },
410 {
"bdztlr",
"if (ctr == 0 && cond) call A", 1 },
411 {
"bdztlrl",
"if (ctr == 0 && cond) call A", 1 },
412 {
"bf",
"if (!cond) goto A", 1 },
413 {
"bfa",
"if (!cond) goto A", 1 },
414 {
"bfctr",
"if (!cond) goto ctr", 0 },
415 {
"bfctrl",
"if (!cond) call ctr", 0 },
416 {
"bfl",
"if (!cond) call A", 1 },
417 {
"bfla",
"if (!cond) call A", 1 },
418 {
"bflr",
"if (!cond) call A", 1 },
419 {
"bflrl",
"if (!cond) call A", 1 },
420 {
"bl",
"call A", 1 },
421 {
"bla",
"call A", 1 },
422 {
"blr",
"return", 0 },
423 {
"blrl",
"return", 0 },
424 {
"bltlr",
"if (A & FLG_LT) return", 1 },
425 {
"blelr",
"if (A & FLG_LE) return", 1 },
426 {
"bgtlr",
"if (A & FLG_GT) return", 1 },
427 {
"bgelr",
"if (A & FLG_GE) return", 1 },
428 {
"bnelr",
"if (A & FLG_NE) return", 1 },
429 {
"beqlr",
"if (A & FLG_EQ) return", 1 },
430 {
"brinc",
"A = bit_revese(B, C)", 3 },
431 {
"bt",
"if (cond) goto A", 1 },
432 {
"bta",
"if (cond) goto A", 1 },
433 {
"btctr",
"if (cond) goto ctr", 1 },
434 {
"btctrl",
"if (cond) call ctr", 1 },
435 {
"btl",
"if (cond) call A", 1 },
436 {
"btla",
"if (cond) call A", 1 },
437 {
"btlr",
"if (cond) call A", 1 },
438 {
"btlrl",
"if (cond) call A", 1 },
439 {
"clrldi",
"A = B & mask(0, C)", 2 },
440 {
"clrlwi",
"A = B & mask(0, C)", 2 },
441 {
"cntlzd",
"A = cnt_leading_zeros(B)", 2 },
442 {
"cntlzw",
"A = cnt_leading_zeros(B)", 2 },
443 {
"crand",
"A = B & C", 3 },
444 {
"crandc",
"A = B & C", 3 },
445 {
"crclr",
"A = A ^ A", 1 },
446 {
"creqv",
"A = B == C", 3 },
447 {
"crmove",
"A = B", 2 },
448 {
"crnand",
"A = B & !C", 3 },
449 {
"crnor",
"A = B | !C", 3 },
450 {
"crnot",
"A = !B", 2 },
451 {
"cror",
"A = B | C", 3 },
452 {
"crorc",
"A = B | C", 3 },
453 {
"crset",
"A = B", 2 },
454 {
"crxor",
"A = B ^ C", 3 },
455 {
"dcba",
"dcb_alloc(A,B)", 2 },
456 {
"dcbf",
"dcb_flush(A,B)", 2 },
457 {
"dcbi",
"dcb_inval(A,B)", 2 },
458 {
"dcbst",
"dcb_store(A,B)", 2 },
459 {
"dcbt",
"dcb_touch(A,B)", 2 },
460 {
"dcbtst",
"dcb_touch_store(A, B)", 2 },
461 {
"dcbz",
"dcb_zero(A,B)", 2 },
462 {
"dcbzl",
"dcb_zero_line(A, B)", 2 },
463 {
"dccci",
"dcc_inval(A, B)", 3 },
464 {
"divd",
"A = B / C", 3 },
465 {
"divdu",
"A = (unsigned) B / C", 3 },
466 {
"divw",
"A = (word) B / C", 3 },
467 {
"divwu",
"A = (word unsigned) B / C", 3 },
468 {
"dss",
"altivec_ds_stop(A)", 1 },
469 {
"dssall",
"altivec_ds_stop_all", 0 },
470 {
"dst",
"altivec_ds_touch(A,B,C)", 3 },
471 {
"dstst",
"altivec_ds_touch_store(A, B, C)", 3 },
472 {
"dststt",
"altivec_ds_touch_store_tran(A, B, C)", 3 },
473 {
"dstt",
"altivec_ds_touch_tran(A, B, C)", 3 },
474 {
"eieio",
"enforce_in_order_exec_io", 0 },
475 {
"eqv",
"A = B ^ C", 3 },
476 {
"evabs",
"A = (vector) abs(B)", 2 },
477 {
"evaddiw",
"A = (vector) B + C", 3 },
478 {
"evaddsmiaaw",
"A = (vector) B + C", 3 },
479 {
"evaddssiaaw",
"A = (vector) B + C", 3 },
480 {
"evaddumiaaw",
"A = (vector) B + C", 3 },
481 {
"evaddusiaaw",
"A = (vector) B + C", 3 },
482 {
"evaddw",
"A = (vector) B + C", 3 },
483 {
"evand",
"A = (vector) B + C", 3 },
484 {
"evandc",
"A = (vector) B + C", 3 },
485 {
"evcmpeq",
"A = (vector) B == C", 3 },
486 {
"evcmpgts",
"A = (vector) B > C", 3 },
487 {
"evcmpgtu",
"A = (unsigned vector) B > C", 3 },
488 {
"evcmplts",
"A = (vector) B < C", 3 },
489 {
"evcmpltu",
"A = (unsigned vector) B <> C", 3 },
490 {
"evcntlsw",
"A = (vector) cnt_sign_bits(B)", 2 },
491 {
"evcntlzw",
"A = (vector) cnt_zero_bits(B)", 2 },
492 {
"evdivws",
"A = (vector) B / C", 3 },
493 {
"evdivwu",
"A = (unsigned vector) B + C", 3 },
494 {
"eveqv",
"A = (vector) B ^ C", 3 },
497 {
"evldd",
"A = vector[C + B]", 3 },
498 {
"evlddx",
"A = vector[C + B]", 3 },
499 {
"evldh",
"A = vector[C + B]", 3 },
500 {
"evldhx",
"A = vector[C + B]", 3 },
501 {
"evldw",
"A = vector[C + B]", 3 },
502 {
"evldwx",
"A = vector[C + B]", 3 },
512 {
"evlwhe",
"A = vector[C + B]", 3 },
513 {
"evlwhex",
"A = vector[C + B]", 3 },
514 {
"evlwhos",
"A = vector[C + B]", 3 },
515 {
"evlwhosx",
"A = vector[C + B]", 3 },
516 {
"evlwhou",
"A = vector[C + B]", 3 },
517 {
"evlwhoux",
"A = vector[C + B]", 3 },
652 {
"extsb",
"A = extend_sign(B)", 2 },
653 {
"extsh",
"A = extend_sign(B)", 2 },
654 {
"extsw",
"A = extend_sign(B)", 2 },
655 {
"fabs",
"A = abs(B)", 2 },
656 {
"fadd",
"A = B + C", 3 },
657 {
"fadds",
"A = (float) B + C", 3 },
658 {
"fcfid",
"A = (double) B", 2 },
659 {
"fcfids",
"A = (float) B", 2 },
660 {
"fcfidu",
"A = (double) B", 2 },
661 {
"fcfidus",
"A = (float) B", 2 },
662 {
"fcmpu",
"A = B == C", 3 },
664 {
"fcpsgn",
"A = flt_copy_sign(B,C)", 3 },
665 {
"fctid",
"A = (int64) B", 2 },
666 {
"fctiduz",
"A = (uint64) B + C", 3 },
667 {
"fctidz",
"A = (int64) B + C", 3 },
668 {
"fctiw",
"A = (int32) B + C", 3 },
669 {
"fctiwuz",
"A = (uint32) B + C", 3 },
670 {
"fctiwz",
"A = (int32) B + C", 3 },
671 {
"fdiv",
"A = B / C", 3 },
672 {
"fdivs",
"A = (float) B / C", 3 },
673 {
"fmadd",
"A = (B * C) + D", 4 },
674 {
"fmadds",
"A = (float) (B * C) + D", 3 },
675 {
"fmr",
"A = B", 2 },
676 {
"fmsub",
"A = (B * C) - d", 4 },
677 {
"fmsubs",
"A = (float) (B * C) - D", 4 },
678 {
"fmul",
"A = B * C", 3 },
679 {
"fmuls",
"A = (float) B * C", 3 },
680 {
"fnabs",
"A = - abs(B)", 2 },
681 {
"fneg",
"A = - B", 2 },
682 {
"fnmadd",
"A = -((B * C) + D)", 4 },
683 {
"fnmadds",
"A = (float) -((B * C) + D)", 4 },
684 {
"fnmsub",
"A = -((B * C) - D)", 4 },
685 {
"fnmsubs",
"A = (float) -((B * C) - D)", 4 },
686 {
"fre",
"A = 1/B", 2 },
687 {
"fres",
"A = (float) 1/B", 2 },
688 {
"frim",
"A = trunc(B)", 2 },
689 {
"frin",
"A = floor(B)", 2 },
690 {
"frip",
"A = ceil(B)", 2 },
691 {
"friz",
"A = trunc(B)", 2 },
692 {
"frsp",
"A = (float) B", 3 },
693 {
"frsqrte",
"A = 1/sqrt(B)", 2 },
694 {
"frsqrtes",
"A = (float) 1/sqrt(B)", 2 },
695 {
"fsel",
"if (B >= 0.0) A = C; else A = D", 4 },
696 {
"fsqrt",
"A = sqrt(B)", 2 },
697 {
"fsqrts",
"A = (float) sqrt(B)", 3 },
698 {
"fsub",
"A = B - C", 3 },
699 {
"fsubs",
"A = (float) B - C", 3 },
700 {
"icbi",
"inst_cache_block_inval", 0 },
701 {
"icbt",
"inst_cache_block_touch", 3 },
702 {
"iccci",
"inst_cache_inval(A,B)", 2 },
707 {
"isync",
"sync_instr_cache", 0 },
708 {
"la",
"A = C + B", 3 },
709 {
"lbz",
"A = byte[C + B]", 3 },
710 {
"lbzcix",
"A = byte[C + B]", 3 },
711 {
"lbzu",
"A = byte[C + B]", 3 },
712 {
"lbzux",
"A = Byte[C + B]", 3 },
713 {
"lbzx",
"A = byte[C + B]", 3 },
714 {
"ld",
"A = [C + B]", 3 },
719 {
"ldu",
"A = [C + B]", 3 },
720 {
"ldux",
"A = [C + B]", 3 },
721 {
"ldx",
"A = [C + B]", 3 },
722 {
"lfd",
"A = double[C + B]", 3 },
723 {
"lfdu",
"A = double[C + B]", 3 },
724 {
"lfdux",
"A = double[C + B]", 3 },
725 {
"lfdx",
"A = double[C + B]", 3 },
730 {
"lfiwzx",
"A = float[C + B]", 3 },
731 {
"lfs",
"A = float[C + B]", 3 },
732 {
"lfsu",
"A = float[C + B]", 3 },
733 {
"lfsux",
"A = float[C + B]", 3 },
734 {
"lfsx",
"A = float[C + B]", 3 },
735 {
"lha",
"A = half[C + B]", 3 },
736 {
"lhau",
"A = half[C + B]", 3 },
737 {
"lhaux",
"A = half[C + B]", 3 },
738 {
"lhax",
"A = half[C + B]", 3 },
739 {
"lhbrx",
"A = half[C + B]", 3 },
740 {
"lhz",
"A = half[C + B]", 3 },
741 {
"lhzcix",
"A = half[C + B]", 3 },
742 {
"lhzu",
"A = half[C + B]", 3 },
743 {
"lhzux",
"A = half[C + B]", 3 },
744 {
"lhzx",
"A = half[C + B]", 3 },
745 {
"li",
"A = B", 2 },
746 {
"lis",
"A = (B << 16)", 2 },
747 {
"lmw",
"A = multiple word[C + B]", 3 },
748 {
"lswi",
"A = string word[C + B]", 3 },
749 {
"lvebx",
"A = vector[C + B]", 3 },
750 {
"lvehx",
"A = vector[C + B]", 3 },
751 {
"lvewx",
"A = vector[C + B]", 3 },
752 {
"lvsl",
"A = vector[C + B]", 3 },
753 {
"lvsr",
"A = vector[C + B]", 3 },
754 {
"lvx",
"A = vector[C + B]", 3 },
755 {
"lvxl",
"A = vector[C + B]", 3 },
756 {
"lwa",
"A = word[C + B]", 3 },
757 {
"lwarx",
"A = word[C + B]", 3 },
758 {
"lwaux",
"A = word[C + B]", 3 },
759 {
"lwax",
"A = word[C + B]", 3 },
760 {
"lwbrx",
"A = word[C + B]", 3 },
761 {
"lwsync",
"sync_load_store", 0 },
762 {
"lwz",
"A = word[C + B]", 3 },
763 {
"lwzcix",
"A = word[C + B]", 3 },
764 {
"lwzu",
"A = word[C + B]", 3 },
765 {
"lwzux",
"A = word[C + B]", 3 },
766 {
"lwzx",
"A = word[C + B]", 3 },
768 {
"lxvdbx",
"A = vector[C + B]", 3 },
769 {
"lxvdsx",
"A = vector[C + B]", 3 },
770 {
"lxvwdx",
"A = vector[C + B]", 3 },
771 {
"mbar",
"memory_barrier(A)", 1 },
772 {
"mcrf",
"A = B", 2 },
773 {
"mcrfs",
"A = B", 2 },
774 {
"mfamr",
"A = amr", 1 },
775 {
"mfasr",
"A = asr", 1 },
776 {
"mfbr0",
"A = br0", 1 },
777 {
"mfbra",
"A = br1", 1 },
778 {
"mfbrb",
"A = br2", 1 },
779 {
"mfbrc",
"A = br3", 1 },
780 {
"mfbrd",
"A = br4", 1 },
781 {
"mfbr5",
"A = br5", 1 },
782 {
"mfbr6",
"A = br6", 1 },
783 {
"mfbr7",
"A = br7", 1 },
784 {
"mfcfar",
"A = cfar", 3 },
785 {
"mfcr",
"A = crB", 2 },
786 {
"mfctr",
"A = ctr", 3 },
787 {
"mfdar",
"A = dar", 1 },
788 {
"mfdbatl",
"A = dbatBl", 1 },
789 {
"mfdbatu",
"A = dbatBu", 1 },
790 {
"mfdccr",
"A = dccr", 1 },
791 {
"mfdcr",
"A = dcr", 1 },
792 {
"mfdear",
"A = dear", 1 },
793 {
"mfdscr",
"A = dscr", 1 },
794 {
"mfdsisr",
"A = dsisr", 1 },
795 {
"mfesr",
"A = esr", 1 },
796 {
"mffs",
"A = fs", 1 },
797 {
"mfibatl",
"A = ibatBl", 2 },
798 {
"mfibatu",
"A = ibatBu", 2 },
799 {
"mficcr",
"A = iccr", 1 },
800 {
"mflr",
"A = lr", 1 },
801 {
"mfmsr",
"A = msr", 1 },
802 {
"mfocrf",
"A = ocrf", 1 },
803 {
"mfpid",
"A = pid", 1 },
804 {
"mfpvr",
"A = pvr", 1 },
805 {
"mfrtcl",
"A = rtc_lo", 1 },
806 {
"mfrtcu",
"A = rtc_hi", 1 },
807 {
"mfspefscr",
"A = fscr", 1 },
808 {
"mfsr",
"A = srB", 3 },
809 {
"mfsrin",
"A = sr_indirect(B)", 2 },
810 {
"mfsrr2",
"A = srr2", 1 },
811 {
"mfsrr3",
"A = srr3", 1 },
812 {
"mftb",
"A = tb(B)", 2 },
813 {
"mftbhi",
"A = tb_hi(B)", 2 },
814 {
"mftblo",
"A = tb_lo(B)", 2 },
815 {
"mftbu",
"A = tbu", 1 },
816 {
"mftcr",
"A = tcr", 1 },
817 {
"mfvscr",
"A = vscr", 1 },
818 {
"mfxer",
"A = xer", 1 },
819 {
"mr",
"A = B", 2 },
820 {
"msync",
"sync_memory", 3 },
821 {
"mtamr",
"amr = A", 1 },
822 {
"mtbr0",
"br0 = A", 1 },
823 {
"mtbr1",
"br1 = A", 1 },
824 {
"mtbr2",
"br2 = A", 1 },
825 {
"mtbr3",
"br3 = A", 1 },
826 {
"mtbr4",
"br4 = A", 1 },
827 {
"mtbr5",
"br5 = A", 1 },
828 {
"mtbr6",
"br6 = A", 1 },
829 {
"mtbr7",
"br7 = A", 1 },
830 {
"mtcfar",
"cfar = A", 1 },
831 {
"mtcr",
"tcr = A", 1 },
832 {
"mtcrf",
"crf = A", 1 },
833 {
"mtctr",
"ctr = A", 1 },
834 {
"mtdar",
"dar = A", 1 },
835 {
"mtdbatl",
"dbatBl = A", 2 },
836 {
"mtdbatu",
"dbatBu = A", 2 },
837 {
"mtdccr",
"dccr = A", 1 },
838 {
"mtdcr",
"dcr = A", 1 },
839 {
"mtdear",
"dear = A", 1 },
840 {
"mtdscr",
"dscr = A", 1 },
841 {
"mtdsisr",
"dsisr = A", 1 },
842 {
"mtesr",
"esr = A", 1 },
843 {
"mtfsb0",
"fsb0 = A", 1 },
844 {
"mtfsb1",
"fsb1 = A", 1 },
845 {
"mtfsf",
"fsf = A", 1 },
846 {
"mtfsfi",
"fsfi = A", 1 },
847 {
"mtibatl",
"ibatBl = A", 2 },
848 {
"mtibatu",
"ibatBu = A", 2 },
849 {
"mticcr",
"iccr = A", 1 },
850 {
"mtlr",
"lr = A", 1 },
851 {
"mtmsr",
"msr = A", 1 },
852 {
"mtmsrd",
"msr = A", 1 },
853 {
"mtocrf",
"cr0 = B & fxm_mask(A)", 2 },
854 {
"mtpid",
"pid = A", 1 },
855 {
"mtspefscr",
"fscr = A", 1 },
856 {
"mtsr",
"srA = B", 2 },
857 {
"mtsrin",
"sr_indirect(A) = B", 2 },
858 {
"mtsrr2",
"srr2 = A", 1 },
859 {
"mtsrr3",
"srr3 = A ", 1 },
860 {
"mttbhi",
"tb_hi(A) = B", 2 },
861 {
"mttbl",
"tbl(A) = B", 2 },
862 {
"mttblo",
"tb_lo(A) = B", 2 },
863 {
"mttbu",
"tbu = A", 1 },
864 {
"mtvscr",
"vscr = A", 1 },
865 {
"mtxer",
"xer = A", 1 },
866 {
"mulhd",
"A = hi(B) * hi(C)", 3 },
867 {
"mulhdu",
"A = (unsigned) hi(B) * hi(C)", 3 },
868 {
"mulhw",
"A = (word) hi(B) * hi(C)", 3 },
869 {
"mulhwu",
"A = (unsigned word) hi(B) * hi(C)", 3 },
870 {
"mulld",
"A = lo(B) * lo(C)", 3 },
871 {
"mulli",
"A = lo(B) * lo(C)", 3 },
872 {
"mullw",
"A = (word) lo(B) * lo(C)", 3 },
873 {
"nand",
"A = B & !C", 3 },
874 {
"neg",
"A = -B", 2 },
876 {
"nor",
"A = B | !C", 3 },
877 {
"not",
"A = !B", 2 },
878 {
"or",
"A = B | C", 3 },
879 {
"orc",
"A = B | C", 3 },
880 {
"ori",
"A = B | C", 3 },
881 {
"oris",
"A = B | (C << 16)", 3 },
882 {
"popcntd",
"A = count_bits(B)", 2 },
883 {
"popcntw",
"A = count_bits(B)", 2 },
884 {
"ptesync",
"sync_page_tbl", 0 },
1018 {
"rfci",
"msr = csrr1; nia = csrr0; ret", 0 },
1019 {
"rfdi",
"msr = drr1; nia = drr0; ret", 0 },
1020 {
"rfi",
"msr = srr1; nia = srr0; ret", 0 },
1021 {
"rfid",
"msr = srr1; nia = srr0; ret", 0 },
1022 {
"rfmci",
"msr = mcrr1; nia = mcrr0; ret", 3 },
1023 {
"rotld",
"A = rot64(B,C)", 3 },
1024 {
"rotldi",
"A = rot64(B,C)", 3 },
1025 {
"rotlw",
"A = rot32(B,C)", 3 },
1026 {
"rotlwi",
"A = rot32(B,C)", 3 },
1027 {
"sc",
"syscall", 0 },
1028 {
"slbia",
"slb_inval_all", 0 },
1029 {
"slbie",
"slb_inval_entry(A)", 1 },
1030 {
"slbmfee",
"A = slb[B]", 2 },
1031 {
"slbmte",
"slb[A] = B", 2 },
1032 {
"sld",
"A = B << C", 3 },
1033 {
"sldi",
"A = B << C", 3 },
1034 {
"slw",
"A = (word) B << C", 3 },
1035 {
"slwi",
"A = (word) B << C", 3 },
1036 {
"srad",
"A = B >> C", 3 },
1037 {
"sradi",
"A = B >> C", 3 },
1038 {
"sraw",
"A = (word) B >> C", 3 },
1039 {
"srawi",
"A = (word) B >> C", 3 },
1040 {
"srd",
"A = B >> C", 3 },
1041 {
"srw",
"A = (word) B >> C", 3 },
1042 {
"srwi",
"A = (word) B >> C", 3 },
1043 {
"stb",
"byte[C + B] = A", 3 },
1044 {
"stbcix",
"byte[C + B] = A", 3 },
1045 {
"stbu",
"byte[C + B] = A", 3 },
1046 {
"stbux",
"byte[C + B] = A", 3 },
1047 {
"stbx",
"byte[C + B] = A", 3 },
1048 {
"std",
"[C + B] = A", 3 },
1049 {
"stdbrx",
"[C + B] = A", 3 },
1050 {
"stdcix",
"[C + B] = A", 3 },
1051 {
"stdcx",
"[C + B] = A", 3 },
1052 {
"stdu",
"[C + B] = A", 3 },
1053 {
"stdux",
"[C + B] = A", 3 },
1054 {
"stdx",
"[C + B] = A", 3 },
1055 {
"stfd",
"float[C + B] = A", 3 },
1056 {
"stfdu",
"float[C + B] = A", 3 },
1057 {
"stfdux",
"float[C + B] = A", 3 },
1058 {
"stfdx",
"float[C + B] = A", 3 },
1059 {
"stfiwx",
"float[C + B] = A", 3 },
1060 {
"stfs",
"float[C + B] = A", 3 },
1061 {
"stfsu",
"float[C + B] = A", 3 },
1062 {
"stfsux",
"float[C + B] = A", 3 },
1063 {
"stfsx",
"float[C + B] = A", 3 },
1064 {
"sth",
"half[C + B] = A", 3 },
1065 {
"sthbrx",
"half[C + B] = A", 3 },
1066 {
"sthcix",
"half[C + B] = A", 3 },
1067 {
"sthu",
"half[C + B] = A", 3 },
1068 {
"sthux",
"half[C + B] = A", 3 },
1069 {
"sthx",
"half[C + B] = A", 3 },
1070 {
"stmw",
"multiple word[C + B] = A", 3 },
1071 {
"stswi",
"string word[C + B] = A", 3 },
1072 {
"stvebx",
"vector byte[C + B] = A", 3 },
1073 {
"stvehx",
"vector half[C + B] = A", 3 },
1074 {
"stvewx",
"vector word[C + B] = A", 3 },
1075 {
"stvx",
"vector[C + B] = A", 3 },
1076 {
"stvxl",
"vector[C + B] = A", 3 },
1077 {
"stw",
"word[C + B] = A", 3 },
1078 {
"stwbrx",
"word[C + B] = A", 3 },
1079 {
"stwcix",
"word[C + B] = A", 3 },
1080 {
"stwcx",
"word[C + B] = A", 3 },
1081 {
"stwu",
"word[C + B] = A", 3 },
1082 {
"stwux",
"word[C + B] = A", 3 },
1083 {
"stwx",
"word[C + B] = A", 3 },
1084 {
"stxsdx",
"vsx[C + B] = A", 3 },
1085 {
"stxvdbx",
"vector double[C + B] = A", 3 },
1086 {
"stxvwdx",
"vector word[C + B] = A", 3 },
1087 {
"sub",
"A = C - B", 3 },
1088 {
"subc",
"A = C - B", 3 },
1089 {
"subf",
"A = C - B", 3 },
1090 {
"subfc",
"A = C - B", 3 },
1091 {
"subfe",
"A = C - B", 3 },
1092 {
"subfic",
"A = C - B", 3 },
1093 {
"subfme",
"A = C - B", 3 },
1094 {
"subfze",
"A = C - B", 3 },
1095 {
"sync",
"sync_instr_cache", 0 },
1096 {
"tdeq",
"if (A == B) trap", 2 },
1097 {
"tdeqi",
"if (A == B) trap", 2 },
1098 {
"tdgt",
"if (A > B) trap", 2 },
1099 {
"tdgti",
"if (A > B) trap", 2 },
1100 {
"tdlgt",
"if (A > B) trap", 2 },
1101 {
"tdlgti",
"if (A > B) trap", 2 },
1102 {
"tdllt",
"if (A < B) trap", 2 },
1103 {
"tdllti",
"if (A < B) trap", 2 },
1104 {
"tdlt",
"if (A < B) trap", 2 },
1105 {
"tdlti",
"if (A < B) trap", 2 },
1106 {
"tdne",
"if (A != B) trap", 2 },
1107 {
"tdnei",
"if (A != B) trap", 2 },
1108 {
"tlbia",
"inval_all_tlb", 0 },
1109 {
"tlbie",
"inval_tbl(A, B)", 2 },
1110 {
"tlbiel",
"inval_tbl(A)", 1 },
1111 {
"tlbivax",
"inval_va(A, B)", 2 },
1112 {
"tlbld",
"tlb_data_load(A)", 1 },
1113 {
"tlbli",
"tlb_instr_load(A)", 1 },
1114 {
"tlbre",
"A = tlb_read_entry(B,C)", 3 },
1115 {
"tlbrehi",
"A = tlb_read_entry_hi(B)", 2 },
1116 {
"tlbrelo",
"A = tlb_read_entry_lo(B)", 2 },
1117 {
"tlbsx",
"A = tlb_search(B)", 2 },
1118 {
"tlbsync",
"sync_tlb", 3 },
1119 {
"tlbwe",
"tlb_write_entry(B,C) = A", 3 },
1120 {
"tlbwehi",
"tlb_write_entry_hi(B) = A", 2 },
1121 {
"tlbwelo",
"tlb_write_entry_lo(B) = A", 2 },
1122 {
"trap",
"trap", 3 },
1123 {
"tweq",
"if ((word) A == (word) B) trap", 2 },
1124 {
"tweqi",
"if ((word) A == (word) B) trap", 2 },
1125 {
"twgt",
"if ((word) A > (word) B) trap", 2 },
1126 {
"twgti",
"if ((word) A > (word) B) trap", 2 },
1127 {
"twlgt",
"if ((word) A > (word) B) trap", 2 },
1128 {
"twlgti",
"if ((word) A > (word) B) trap", 2 },
1129 {
"twllt",
"if ((word) A < (word) B) trap", 2 },
1130 {
"twllti",
"if ((word) A < (word) B) trap", 2 },
1131 {
"twlt",
"if ((word) A < (word) B) trap", 2 },
1132 {
"twlti",
"if ((word) A < (word) B) trap", 2 },
1133 {
"twne",
"if ((word) A != (word) B) trap", 2 },
1134 {
"twnei",
"if ((word) A != (word) B) trap", 2 },
1135 {
"vaddcuw",
"A = (unsigned vector) B + C", 3 },
1136 {
"vaddfp",
"A = (float vector) B + C", 3 },
1137 {
"vaddsbs",
"A = (byte vector) B + C", 3 },
1138 {
"vaddshs",
"A = (half vector) B + C", 3 },
1139 {
"vaddsws",
"A = (word vector) B + C", 3 },
1149 {
"vand",
"A = B & C", 3 },
1150 {
"vandc",
"A = B & C", 3 },
1151 {
"vavgsb",
"A = (byte vector) avg(B, C)", 3 },
1152 {
"vavgsh",
"A = (half vector) avg(B, C)", 3 },
1153 {
"vavgsw",
"A = (word vector) avg(B, C)", 3 },
1154 {
"vavgub",
"A = (unsigned byte vector) avg(B, C)", 3 },
1155 {
"vavguh",
"A = (unsigned half vector) avg(B, C)", 3 },
1156 {
"vavguw",
"A = (unsigned word vector) avg(B, C)", 3 },
1157 {
"vcfsx",
"A = (float vector) B", 2 },
1158 {
"vcfux",
"A = (float vector) B", 2 },
1159 {
"vclzb",
"A = (byte vector) count_zeros(B)", 2 },
1160 {
"vclzd",
"A = (vector) count_zeros(B)", 2 },
1161 {
"vclzh",
"A = (half vector) count_zeros(B)", 2 },
1162 {
"vclzw",
"A = (word vector) count_zeros(B)", 2 },
1163 {
"vcmpbfp",
"A = !(B < C) | (B == C) | !(B > C)", 3 },
1164 {
"vcmpeqfp",
"A = (float) B == (float) C", 3 },
1165 {
"vcmpequb",
"A = (unsigned byte) B == (byte) C", 3 },
1166 {
"vcmpequd",
"A = (unsigned) B == (unsigned) C", 3 },
1167 {
"vcmpequh",
"A = (unsigned half) B == (unsigned half) C", 3 },
1168 {
"vcmpequw",
"A = (unsigned word) B == (unsigned word) C", 3 },
1169 {
"vcmpgefp",
"A = (float) B >= (float) C", 3 },
1170 {
"vcmpgtsb",
"A = (byte) B > (byte) C", 3 },
1171 {
"vcmpgtsd",
"A = B > C", 3 },
1172 {
"vcmpgtsh",
"A = (half) B > (half) C", 3 },
1173 {
"vcmpgtsw",
"A = (word) B > (word) C", 3 },
1174 {
"vcmpgtub",
"A = (unsigned byte) B > (byte) C", 3 },
1175 {
"vcmpgtud",
"A = (unsigned) B > (unsigned) C", 3 },
1176 {
"vcmpgtuh",
"A = (unsigned half) B > (unsigned half) C", 3 },
1177 {
"vcmpgtuw",
"A = (unsigned word) B > (unsigned word) C", 3 },
1178 {
"vctsxs",
"A = (word) B", 2 },
1179 {
"vctuxs",
"A = (unsigned word) B", 2 },
1180 {
"veqv",
"A = (vector) B ^ C", 3 },
1181 {
"vexptefp",
"A = (float vector) pow(2, B)", 2 },
1182 {
"vlogefp",
"A = (float vector) log2(B)", 2 },
1183 {
"vmaddfp",
"A = (float vector) (B * C) + round(D)", 4 },
1184 {
"vmaxfp",
"A = (float vector) max(B, C)", 3 },
1185 {
"vmaxsb",
"A = (byte vector) max(B, C)", 3 },
1186 {
"vmaxsd",
"A = (vector) max(B, C)", 3 },
1187 {
"vmaxsh",
"A = (half vector) max(B, C)", 3 },
1188 {
"vmaxsw",
"A = (word vector) max(B, C)", 3 },
1189 {
"vmaxub",
"A = (unsigned byte vector) max(B, C)", 3 },
1190 {
"vmaxud",
"A = (vector) max(B, C)", 3 },
1191 {
"vmaxuh",
"A = (unsigned half vector) max(B, C)", 3 },
1192 {
"vmaxuw",
"A = (unsigned word vector) max(B, C)", 3 },
1195 {
"vminfp",
"A = (float vector) min(B, C)", 3 },
1196 {
"vminsb",
"A = (byte vector) min(B, C)", 3 },
1197 {
"vminsd",
"A = (vector) min(B, C)", 3 },
1198 {
"vminsh",
"A = (half vector) min(B, C)", 3 },
1199 {
"vminsw",
"A = (word vector) min(B, C)", 3 },
1200 {
"vminub",
"A = (unsigned byte vector) min(B, C)", 3 },
1201 {
"vminud",
"A = (vector) min(B, C)", 3 },
1202 {
"vminuh",
"A = (unsigned half vector) min(B, C)", 3 },
1203 {
"vminuw",
"A = (unsigned word vector) min(B, C)", 3 },
1205 {
"vmrghb",
"A = (byte vector) merge_hi(B, C)", 3 },
1206 {
"vmrghh",
"A = (half vector) merge_hi(B, C)", 3 },
1207 {
"vmrghw",
"A = (word vector) merge_hi(B, C)", 3 },
1208 {
"vmrglb",
"A = (byte vector) merge_lo(B, C)", 3 },
1209 {
"vmrglh",
"A = (half vector) merge_lo(B, C)", 3 },
1210 {
"vmrglw",
"A = (word vector) merge_lo(B, C)", 3 },
1211 {
"vmsummbm",
"A = (byte vector) B + C", 3 },
1212 {
"vmsumshm",
"A = (half vector) B + C", 3 },
1213 {
"vmsumshs",
"A = (half vector) B + C", 3 },
1214 {
"vmsumubm",
"A = (unsigned byte vector) B + C", 3 },
1215 {
"vmsumuhm",
"A = (unsigned half vector) B + C", 3 },
1216 {
"vmsumuhs",
"A = (unsigned half vector) B + C", 3 },
1217 {
"vmulesb",
"A = (byte vector) B * C", 3 },
1218 {
"vmulesh",
"A = (half vector) B * C", 3 },
1219 {
"vmulesw",
"A = (word vector) B * C", 3 },
1220 {
"vmuleub",
"A = (unsigned byte vector) B * C", 3 },
1221 {
"vmuleuh",
"A = (unsigned half vector) B * C", 3 },
1222 {
"vmuleuw",
"A = (unsigned word vector) B * C", 3 },
1223 {
"vmulosb",
"A = (byte vector) B * C", 3 },
1224 {
"vmulosh",
"A = (byte vector) B * C", 3 },
1225 {
"vmulosw",
"A = (byte vector) B * C", 3 },
1226 {
"vmuloub",
"A = (byte vector) B * C", 3 },
1227 {
"vmulouh",
"A = (unsigned byte vector) B * C", 3 },
1228 {
"vmulouw",
"A = (unsigned byte vector) B * C", 3 },
1229 {
"vmuluwm",
"A = (unsigned word vector) B * C", 3 },
1230 {
"vnand",
"A = (vector) B & C", 3 },
1231 {
"vnmsubfp",
"A = (float vector) (B * C) - round(D)", 4 },
1232 {
"vnor",
"A = (vector) B | !C", 3 },
1233 {
"vor",
"A = (vector) B | C", 3 },
1234 {
"vorc",
"A = (vector) B | C", 3 },
1237 {
"vpkpx",
"A = (vector) pack_pixel(B, C)", 3 },
1238 {
"vpkshss",
"A = (half vector) pack_pixel_saturate(B, C)", 3 },
1239 {
"vpkshus",
"A = (unsigned half vector) pack_pixel_saturate(B, C)", 3 },
1240 {
"vpkswss",
"A = (word vector) pack_pixel_saturate(B, C)", 3 },
1241 {
"vpkswus",
"A = (unsigned word vector) pack_pixel_saturate(B, C)", 3 },
1246 {
"vpopcntb",
"A = (vector) count_8bits(B)", 2 },
1247 {
"vpopcntd",
"A = (vector) count_64bits(B)", 2 },
1248 {
"vpopcnth",
"A = (vector) count_16bits(B)", 2 },
1249 {
"vpopcntw",
"A = (vector) count_32bits(B)", 2 },
1250 {
"vrefp",
"A = (float vector) 1/B", 2 },
1251 {
"vrfim",
"A = (vector) floor(B)", 2 },
1252 {
"vrfin",
"A = (vector) near(B)", 2 },
1253 {
"vrfip",
"A = (vector) ceil(B)", 2 },
1254 {
"vrfiz",
"A = (vector) trunc(B)", 2 },
1255 {
"vrlb",
"A = (vector) rotl_byte(B, C)", 3 },
1256 {
"vrld",
"A = (vector) rotl(B, C)", 3 },
1257 {
"vrlh",
"A = (vector) rotl_half(B, C)", 3 },
1258 {
"vrlw",
"A = (vector) rotl_word(B, C)", 3 },
1259 {
"vrsqrtefp",
"A = (vector) sqrt(B)", 2 },
1260 {
"vsel",
"A = (vector) if (D & 1) B else C", 4 },
1261 {
"vsl",
"A = (vector) B << C", 3 },
1262 {
"vslb",
"A = (byte vector) B << C", 3 },
1263 {
"vsld",
"A = (vector) B << C", 3 },
1264 {
"vsldoi",
"A = (vector) B << (octet) C", 3 },
1265 {
"vslh",
"A = (half vector) B << C", 3 },
1266 {
"vslo",
"A = (vector) B <<< (octet) C", 3 },
1267 {
"vslw",
"A = (word vector) B + C", 3 },
1268 {
"vspltb",
"A = (vector) splat_byte(B, C)", 3 },
1269 {
"vsplth",
"A = (vector) splat_half(B, C)", 3 },
1270 {
"vspltisb",
"A = (vector) splat_byte(B, C)", 3 },
1271 {
"vspltish",
"A = (vector) splat_half(B, C)", 3 },
1272 {
"vspltisw",
"A = (vector) splat_word(B, C)", 3 },
1273 {
"vspltw",
"A = (vector) splat_word(B, C)", 3 },
1274 {
"vsr",
"A = (vector) B >> C", 3 },
1275 {
"vsrab",
"A = (byte vector) B >> C", 3 },
1276 {
"vsrad",
"A = (vector) B >> C", 3 },
1277 {
"vsrah",
"A = (half vector) B >> C", 3 },
1278 {
"vsraw",
"A = (word vector) B >> C", 3 },
1279 {
"vsrb",
"A = (byte vector) B >> C", 3 },
1280 {
"vsrd",
"A = (vector) B >> C", 3 },
1281 {
"vsrh",
"A = (half vector) B >> C", 3 },
1282 {
"vsro",
"A = (vector) B >> (octet) C", 3 },
1283 {
"vsrw",
"A = (word vector) B >> C", 3 },
1284 {
"vsubcuw",
"A = (unsigned word vector) (C - B) & 1", 3 },
1285 {
"vsubfp",
"A = (float vector) C - B", 3 },
1286 {
"vsubsbs",
"A = (byte vector) C - B", 3 },
1287 {
"vsubshs",
"A = (half vector) C - B", 3 },
1288 {
"vsubsws",
"A = (word vector) C - B", 3 },
1289 {
"vsububm",
"A = (byte vector) C - B", 3 },
1290 {
"vsububs",
"A = (byte vector) C - B", 3 },
1291 {
"vsubudm",
"A = (unsigned vector) C - B", 3 },
1292 {
"vsubuhm",
"A = (unsigned half vector) C - B", 3 },
1293 {
"vsubuhs",
"A = (unsigned half vector) C - B", 3 },
1294 {
"vsubuwm",
"A = (unsigned word vector) C - B", 3 },
1295 {
"vsubuws",
"A = (unsigned word vector) C - B", 3 },
1296 {
"vsumbsws",
"A = (word vector) B + C", 3 },
1297 {
"vsumdsbs",
"A = (byte vector) B + C", 3 },
1298 {
"vsumdshs",
"A = (half vector) B + C", 3 },
1299 {
"vsumdubs",
"A = (unsigned vector) B + C", 3 },
1300 {
"vsumsws",
"A = (word vector) B + C", 3 },
1301 {
"vupkhpx",
"A = (vector) unpack_hi_pixel(B)", 3 },
1302 {
"vupkhsb",
"A = (byte vector) unpack_hi_pixel(B)", 3 },
1303 {
"vupkhsh",
"A = (half vector) unpack_hi_pixel(B)", 3 },
1304 {
"vupklpx",
"A = (vector) unpack_lo_pixel(B)", 3 },
1305 {
"vupklsb",
"A = (byte vector) unpack_lo_pixel(B)", 3 },
1306 {
"vupklsh",
"A = (half vector) unpack_lo_pixel(B)", 3 },
1307 {
"vxor",
"A = (vector) B ^ C", 3 },
1308 {
"wait",
"wait_interrupt", 0 },
1309 {
"waitimpl",
"wait_interrupt_thread_reservation", 0 },
1310 {
"waitrsv",
"wait_interrupt_implemention", 0 },
1311 {
"wrtee",
"msr &= A", 1 },
1312 {
"wrteei",
"msr &= A", 1 },
1314 {
"xor",
"A = B ^ C", 3 },
1315 {
"xori",
"A = B ^ C", 3 },
1316 {
"xoris",
"A = B ^ (C << 16)", 3 },
1317 {
"xsabsdp",
"A = (double vector) abs(B)", 2 },
1318 {
"xsadddp",
"A = (double vector) B + C", 3 },
1319 {
"xscmpodp",
"A = (double vector) B == C", 3 },
1320 {
"xscmpudp",
"A = (double vector) B == C", 3 },
1321 {
"xscpsgndp",
"A = (double vector) copy_sign(B, C)", 3 },
1322 {
"xscvdpsp",
"A = (double vector) round(B)", 2 },
1323 {
"xscvdpsxds",
"A = (vector) ((double) B)", 2 },
1324 {
"xscvdpsxws",
"A = (word vector) ((double) B)", 2 },
1325 {
"xscvdpuxds",
"A = (unsigned vector) ((double) B)", 2 },
1326 {
"xscvdpuxws",
"A = (unsigned word vector) ((double) B)", 2 },
1327 {
"xscvspdp",
"A = (double vector) ((float) B)", 2 },
1328 {
"xscvsxddp",
"A = (double vector) B", 2 },
1329 {
"xscvuxddp",
"A = (double vector) ((unsigned) B)", 2 },
1330 {
"xsdivdp",
"A = (double vector) B / C", 3 },
1334 {
"xsmaxdp",
"A = (double vector) max(B, C)", 3 },
1335 {
"xsmindp",
"A = (double vector) min(B, C)", 3 },
1339 {
"xsmuldp",
"A = (double vector) B * C", 3 },
1340 {
"xsnabsdp",
"A = (double vector) -abs(B)", 2 },
1341 {
"xsnegdp",
"A = (double vector) -B", 2 },
1348 {
"xsrdpi",
"A = (double vector) round(B)", 2 },
1349 {
"xsrdpic",
"A = (double vector) round(B)", 2 },
1350 {
"xsrdpim",
"A = (double vector) floor(B)", 2 },
1351 {
"xsrdpip",
"A = (double vector) ceil(B)", 2 },
1352 {
"xsrdpiz",
"A = (double vector) trunc(B)", 2 },
1353 {
"xsredp",
"A = (double vector) 1/B", 2 },
1354 {
"xsrsqrtedp",
"A = (double vector) 1/sqrt(B)", 2 },
1355 {
"xssqrtdp",
"A = sqrt(B)", 2 },
1356 {
"xssubdp",
"A = C - B", 3 },
1357 {
"xstdivdp",
"A = test_sw_divide(B, C)", 3 },
1358 {
"xstsqrtdp",
"A = test_sw_sqrt(B)", 2 },
1359 {
"xvabsdp",
"A = (double vector) abs(B)", 2 },
1360 {
"xvabssp",
"A = (float vector) abs(B)", 2 },
1361 {
"xvadddp",
"A = (double vector) B + C", 3 },
1362 {
"xvaddsp",
"A = (float vector) B + C", 3 },
1363 {
"xvcmpeqdp",
"A = (double vector) B == (double vector) C", 3 },
1364 {
"xvcmpeqsp",
"A = (float vector) B == (float vector) C", 3 },
1365 {
"xvcmpgedp",
"A = (double vector) B >= (double vector) C", 3 },
1366 {
"xvcmpgesp",
"A = (float vector) B >= (float vector) C", 3 },
1367 {
"xvcmpgtdp",
"A = (double vector) B > (double vector) C", 3 },
1368 {
"xvcmpgtsp",
"A = (float vector) B > (float vector) C", 3 },
1369 {
"xvcpsgndp",
"A = (double vector) copy_sign(B, C)", 3 },
1370 {
"xvcpsgnsp",
"A = (float vector) copy_sign(B, C)", 3 },
1371 {
"xvcvdpsp",
"A = (float vector) ((double vector)B)", 2 },
1372 {
"xvcvdpsxds",
"A = (vector) B", 2 },
1373 {
"xvcvdpsxws",
"A = (word vector) B", 2 },
1374 {
"xvcvdpuxds",
"A = (unsigned vector) B", 2 },
1375 {
"xvcvdpuxws",
"A = (unsigned word vector) B", 2 },
1376 {
"xvcvspdp",
"(double vector) ((float vector) B)", 2 },
1377 {
"xvcvspsxds",
"A = (vector) ((float vector) B)", 2 },
1378 {
"xvcvspsxws",
"A = (word vector) ((float vector) B)", 2 },
1379 {
"xvcvspuxds",
"A = (unsigned vector) ((float vector) B)", 2 },
1380 {
"xvcvspuxws",
"A = (unsigned word vector) ((float vector) B)", 2 },
1381 {
"xvcvsxddp",
"A = (double vector) B", 2 },
1382 {
"xvcvsxdsp",
"A = (float vector) B", 2 },
1383 {
"xvcvsxwdp",
"A = (double vector) ((word) B)", 2 },
1384 {
"xvcvsxwsp",
"A = (float vector) ((word) B)", 2 },
1385 {
"xvcvuxddp",
"A = (double vector) (unsigned) B", 2 },
1386 {
"xvcvuxdsp",
"A = (float vector) (unsigned) B", 2 },
1387 {
"xvcvuxwdp",
"A = (double vector) ((unsigned word) B)", 2 },
1388 {
"xvcvuxwsp",
"A = (float vector) ((unsigned word) B)", 2 },
1389 {
"xvdivdp",
"A = (double vector) B / C", 3 },
1390 {
"xvdivsp",
"A = (float vector) B / C", 3 },
1396 {
"xvmaxdp",
"A = (double vector) max(B)", 2 },
1397 {
"xvmaxsp",
"A = (float vector) max(B)", 2 },
1398 {
"xvmindp",
"A = (double vector) min(B)", 2 },
1399 {
"xvminsp",
"A = (float vector) min(B)", 2 },
1400 {
"xvmovdp",
"A = (double vector) B", 2 },
1401 {
"xvmovsp",
"A = (float vector) B", 2 },
1407 {
"xvmuldp",
"A = (double vector) B * C", 3 },
1408 {
"xvmulsp",
"A = (float vector) B * C", 3 },
1409 {
"xvnabsdp",
"A = (double vector) -abs(B)", 2 },
1410 {
"xvnabssp",
"A = (float vector) -abs(B)", 2 },
1411 {
"xvnegdp",
"A = (double vector) -B", 2 },
1412 {
"xvnegsp",
"A = (float vector) -B", 2 },
1423 {
"xvrdpi",
"A = (double vector) round(B)", 2 },
1424 {
"xvrdpic",
"A = (double vector) round(B)", 2 },
1425 {
"xvrdpim",
"A = (double vector) floor(B)", 2 },
1426 {
"xvrdpip",
"A = (double vector) ceil(B)", 2 },
1427 {
"xvrdpiz",
"A = (double vector) trunc(B)", 2 },
1428 {
"xvredp",
"A = (double vector) 1/B", 2 },
1429 {
"xvresp",
"A = (float vector) B", 2 },
1430 {
"xvrspi",
"A = (float vector) round(B)", 2 },
1431 {
"xvrspic",
"A = (float vector) round(B)", 2 },
1432 {
"xvrspim",
"A = (float vector) floor(B)", 2 },
1433 {
"xvrspip",
"A = (float vector) ceil(B)", 2 },
1434 {
"xvrspiz",
"A = (float vector) trunc(B)", 2 },
1435 {
"xvrsqrtedp",
"A = (double vector) 1/sqrt(B)", 2 },
1436 {
"xvrsqrtesp",
"A = (float vector) 1/sqrt(B)", 2 },
1437 {
"xvsqrtdp",
"A = (double vector) sqrt(B)", 2 },
1438 {
"xvsqrtsp",
"A = (float vector) sqrt(B)", 2 },
1439 {
"xvsubdp",
"A = (double vector) C - B", 3 },
1440 {
"xvsubsp",
"A = (float vector) C - B", 3 },
1441 {
"xvtdivdp",
"A = (double vector) B / C", 3 },
1442 {
"xvtdivsp",
"A = (float vector) B / C", 3 },
1443 {
"xvtsqrtdp",
"A = (double vector) test_sw_sqrt(B)", 3 },
1444 {
"xvtsqrtsp",
"A = (float vector) test_sw_sqrt(B)", 3 },
1445 {
"xxland",
"A = B & C", 3 },
1446 {
"xxlandc",
"A = B & C", 3 },
1447 {
"xxleqv",
"A = B ^ C", 3 },
1448 {
"xxlnand",
"A = B & !C", 3 },
1449 {
"xxlnor",
"A = B + !C", 3 },
1450 {
"xxlor",
"A = B | C", 3 },
1451 {
"xxlorc",
"A = B | C", 3 },
1452 {
"xxlxor",
"A = B ^ C", 3 },
1453 {
"xxmrghd",
"A = hi(B) || hi(C)", 3 },
1454 {
"xxmrghw",
"A = (word vector) hi(B) || hi(C)", 3 },
1455 {
"xxmrgld",
"A = lo(B) || lo(C)", 3 },
1456 {
"xxmrglw",
"A = (word vector) lo(B) || lo(C)", 3 },
1461 {
"xxsldwi",
"A = B << C", 3 },
1462 {
"xxspltd",
"A = split(B)", 2 },
1463 {
"xxspltw",
"A = (word vector) split(B)", 2 },
1464 {
"xxswapd",
"swap(A,B)", 2 },
1468 char ppc_mask[32] = { 0 };
1472 for (j =
k = 0;
ops[
i].str[j] !=
'\0'; j++,
k++) {
1474 if (
i >= 0 &&
i <= 26 &&
argv[
ops[
i].max_operands][0] == 0) {
1477 if (
ops[
i].max_operands == 3) {
1486 int letter =
ops[
i].str[j] -
'@';
1487 const char *
w =
argv[letter];
1489 if (letter == 4 && !strncmp(
argv[0],
"rlwinm", 6)) {
1496 }
else if (letter == 4 && (!strncmp(
argv[0],
"rldcl", 5) || !strncmp(
argv[0],
"rldicl", 6))) {
1502 }
else if (letter == 4 && !strncmp(
argv[0],
"rldic", 5)) {
1509 }
else if (letter == 4 && (!strncmp(
argv[0],
"rldcr", 5) || !strncmp(
argv[0],
"rldicr", 6))) {
1515 }
else if (letter == 4 && !strncmp(
argv[0],
"rldimi", 6)) {
1523 }
else if (letter == 5 && !strncmp(
argv[0],
"rldimi", 6)) {
1532 }
else if (letter == 4 && !strncmp(
argv[0],
"rlwimi", 6)) {
1540 }
else if (letter == 5 && !strncmp(
argv[0],
"rlwimi", 6)) {
1549 }
else if (letter == 4 && !strncmp(
argv[0],
"rlwnm", 5)) {
1556 }
else if (letter == 1 &&
i >= 36 &&
i <= 43) {
1589 }
else if ((
i == 44 && letter == 2) || (
i == 45 && letter == 1)) {
1609 for (
i = 0;
i < argc;
i++) {
1611 strcat(
newstr, (
i == 0 ||
i == argc - 1) ?
" " :
", ");
1620 int i,
len = strlen(data);
1627 char str[1024] = { 0 };
1628 char *
buf, *ptr, *optr;
1630 if (!strcmp(data,
"jr ra")) {
1650 ptr = strchr(
buf,
' ');
1652 ptr = strchr(
buf,
'\t');
1656 for (++ptr; *ptr ==
' '; ptr++) {
1660 strncpy(
w1, ptr,
WSZ - 1);
1663 ptr = strchr(ptr,
',');
1666 for (++ptr; *ptr ==
' '; ptr++) {
1669 strncpy(
w1, optr,
WSZ - 1);
1670 strncpy(
w2, ptr,
WSZ - 1);
1672 ptr = strchr(ptr,
',');
1675 for (++ptr; *ptr ==
' '; ptr++) {
1678 strncpy(
w2, optr,
WSZ - 1);
1679 strncpy(
w3, ptr,
WSZ - 1);
1682 ptr = strchr(ptr,
',');
1685 for (++ptr; *ptr ==
' '; ptr++) {
1688 strncpy(
w3, optr,
WSZ - 1);
1689 strncpy(
w4, ptr,
WSZ - 1);
1692 ptr = strchr(ptr,
',');
1695 for (++ptr; *ptr ==
' '; ptr++) {
1698 strncpy(
w4, optr,
WSZ - 1);
1699 strncpy(
w5, ptr,
WSZ - 1);
1710 for (
i = 0;
i < 4;
i++) {
1711 if (wa[
i][0] !=
'\0') {
1721 #if EXPERIMENTAL_ZERO
1723 if (!memcmp(
p,
"0 = ", 4))
1726 if (!strcmp(
w1,
w2)) {
1728 #define REPLACE(x, y) \
1730 int snprintf_len1_ = snprintf(a, 64, x, w1, w1); \
1731 int snprintf_len2_ = snprintf(b, 64, y, w1); \
1732 if (snprintf_len1_ < 64 && snprintf_len2_ < 64) { \
1733 p = rz_str_replace(p, a, b, 0); \
1738 REPLACE(
"%s = %s +",
"%s +=");
1739 REPLACE(
"%s = %s -",
"%s -=");
1740 REPLACE(
"%s = %s &",
"%s &=");
1741 REPLACE(
"%s = %s |",
"%s |=");
1742 REPLACE(
"%s = %s ^",
"%s ^=");
1743 REPLACE(
"%s = %s >>",
"%s >>=");
1744 REPLACE(
"%s = %s <<",
"%s <<=");
1758 .
name =
"ppc.pseudo",
1759 .desc =
"PowerPC pseudo syntax",
1763 #ifndef RZ_PLUGIN_INCORE
static RASN1String * newstr(const char *string)
RZ_API void Ht_() free(HtName_(Ht) *ht)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
void * malloc(size_t size)
static static fork const void static count static fd const char const char static newpath char char argv
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
static bool parse(RzParse *p, const char *data, RzStrBuf *sb)
static int can_replace(const char *str, int idx, int max_operands)
static const char * getspr(const char *reg)
RZ_API RzLibStruct rizin_plugin
RzParsePlugin rz_parse_plugin_ppc_pseudo
static ut32 mask32(ut32 mb, ut32 me)
static ut64 mask64(ut64 mb, ut64 me)
static int replace(int argc, const char *argv[], char *newstr)
RZ_API char * rz_str_replace(char *str, const char *key, const char *val, int g)
RZ_API void rz_str_trim(RZ_NONNULL RZ_INOUT char *str)
Removes whitespace characters (space, tab, newline etc.) from the beginning and end of a string.
RZ_API int rz_str_replace_char(char *s, int a, int b)
RZ_API const char * rz_strbuf_set(RzStrBuf *sb, const char *s)
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
ut64(WINAPI *w32_GetEnabledXStateFeatures)()