Lines Matching +full:3 +full:rd
33 #define VSX_REGISTER_XTP(rd) ((((rd) & 1) << 5) | ((rd) & 0xfe)) argument
99 if (((regs->ccr >> (31 - bi)) & 1) != ((bo >> 3) & 1)) in branch_taken()
148 ea = (signed short) (instr & ~3); /* sign-extend */ in dsform_ea()
286 up[0] = byterev_8(up[3]); in do_byte_reverse()
287 up[3] = tmp; in do_byte_reverse()
837 i = IS_LE ? 3 - j : j; in emulate_vsx_load()
841 u32 val = reg->w[IS_LE ? 3 : 0]; in emulate_vsx_load()
843 i = IS_LE ? 3 - j : j; in emulate_vsx_load()
936 i = IS_LE ? 3 - j : j; in emulate_vsx_store()
1101 "1: " op " %2,0,%3\n" \
1106 "3: li %0,%4\n" \
1109 EX_TABLE(1b, 3b) \
1121 "3: li %0,%3\n" \
1124 EX_TABLE(1b, 3b) \
1133 "3: li %0,%3\n" \
1136 EX_TABLE(1b, 3b) \
1146 op->ccval = (regs->ccr & 0x0fffffff) | ((regs->xer >> 3) & 0x10000000); in set_cr0()
1168 struct instruction_op *op, int rd, in add_with_carry() argument
1177 op->reg = rd; in add_with_carry()
1361 unsigned int opcode, ra, rb, rc, rd, spr, u; in analyse_instr() local
1412 rd = 7 - ((word >> 23) & 0x7); in analyse_instr()
1414 rd *= 4; in analyse_instr()
1417 op->ccval = (regs->ccr & ~(0xfUL << rd)) | (val << rd); in analyse_instr()
1452 rd = (word >> 21) & 0x1f; in analyse_instr()
1456 op->ccval = (regs->ccr & ~(1UL << (31 - rd))) | in analyse_instr()
1457 (val << (31 - rd)); in analyse_instr()
1466 switch ((word >> 21) & 3) { in analyse_instr()
1484 rd = (word >> 21) & 0x1f; in analyse_instr()
1497 rd = (suffix >> 21) & 0x1f; in analyse_instr()
1498 op->reg = rd; in analyse_instr()
1499 op->val = regs->gpr[rd]; in analyse_instr()
1515 if (rd & trap_compare(regs->gpr[ra], (short) word)) in analyse_instr()
1519 case 3: /* twi */ in analyse_instr()
1520 if (rd & trap_compare((int)regs->gpr[ra], (short) word)) in analyse_instr()
1536 asm volatile(PPC_MADDHD(%0, %1, %2, %3) : in analyse_instr()
1542 asm volatile(PPC_MADDHDU(%0, %1, %2, %3) : in analyse_instr()
1548 asm volatile(PPC_MADDLD(%0, %1, %2, %3) : in analyse_instr()
1567 add_with_carry(regs, op, rd, ~regs->gpr[ra], imm, 1); in analyse_instr()
1574 if ((rd & 1) == 0) in analyse_instr()
1577 do_cmp_unsigned(regs, op, val, imm, rd >> 2); in analyse_instr()
1584 if ((rd & 1) == 0) in analyse_instr()
1587 do_cmp_signed(regs, op, val, imm, rd >> 2); in analyse_instr()
1592 add_with_carry(regs, op, rd, regs->gpr[ra], imm, 0); in analyse_instr()
1597 add_with_carry(regs, op, rd, regs->gpr[ra], imm, 0); in analyse_instr()
1631 val = DATA32(regs->gpr[rd]); in analyse_instr()
1639 val = DATA32(regs->gpr[rd]); in analyse_instr()
1647 val = DATA32(regs->gpr[rd]); in analyse_instr()
1652 op->val = regs->gpr[rd] | (unsigned short) word; in analyse_instr()
1657 op->val = regs->gpr[rd] | (imm << 16); in analyse_instr()
1661 op->val = regs->gpr[rd] ^ (unsigned short) word; in analyse_instr()
1666 op->val = regs->gpr[rd] ^ (imm << 16); in analyse_instr()
1670 op->val = regs->gpr[rd] & (unsigned short) word; in analyse_instr()
1676 op->val = regs->gpr[rd] & (imm << 16); in analyse_instr()
1683 val = regs->gpr[rd]; in analyse_instr()
1687 switch ((word >> 2) & 3) { in analyse_instr()
1697 case 3: /* rldimi */ in analyse_instr()
1733 if (rd == 0x1f || in analyse_instr()
1734 (rd & trap_compare((int)regs->gpr[ra], in analyse_instr()
1740 if (rd & trap_compare(regs->gpr[ra], regs->gpr[rb])) in analyse_instr()
1748 op->reg = rd; in analyse_instr()
1754 op->reg = rd; in analyse_instr()
1762 op->reg = rd; in analyse_instr()
1787 * 'ra' encodes the CR field number (bfa) in the top 3 bits. in analyse_instr()
1808 val = regs->gpr[rd]; in analyse_instr()
1821 op->reg = rd; in analyse_instr()
1831 op->val = regs->gpr[rd]; in analyse_instr()
1845 if ((rd & 1) == 0) { in analyse_instr()
1851 do_cmp_signed(regs, op, val, val2, rd >> 2); in analyse_instr()
1858 if ((rd & 1) == 0) { in analyse_instr()
1864 do_cmp_unsigned(regs, op, val, val2, rd >> 2); in analyse_instr()
1868 do_cmpb(regs, op, regs->gpr[rd], regs->gpr[rb]); in analyse_instr()
1875 add_with_carry(regs, op, rd, ~regs->gpr[ra], in analyse_instr()
1885 add_with_carry(regs, op, rd, regs->gpr[ra], in analyse_instr()
1913 add_with_carry(regs, op, rd, ~regs->gpr[ra], in analyse_instr()
1918 add_with_carry(regs, op, rd, regs->gpr[ra], in analyse_instr()
1923 add_with_carry(regs, op, rd, ~regs->gpr[ra], 0L, in analyse_instr()
1928 add_with_carry(regs, op, rd, regs->gpr[ra], 0L, in analyse_instr()
1933 add_with_carry(regs, op, rd, ~regs->gpr[ra], -1L, in analyse_instr()
1942 add_with_carry(regs, op, rd, regs->gpr[ra], -1L, in analyse_instr()
2040 val = (unsigned int) regs->gpr[rd]; in analyse_instr()
2045 val = regs->gpr[rd]; in analyse_instr()
2050 op->val = regs->gpr[rd] & regs->gpr[rb]; in analyse_instr()
2054 op->val = regs->gpr[rd] & ~regs->gpr[rb]; in analyse_instr()
2058 do_popcnt(regs, op, regs->gpr[rd], 8); in analyse_instr()
2062 op->val = ~(regs->gpr[rd] | regs->gpr[rb]); in analyse_instr()
2066 do_prty(regs, op, regs->gpr[rd], 32); in analyse_instr()
2070 do_prty(regs, op, regs->gpr[rd], 64); in analyse_instr()
2074 do_bpermd(regs, op, regs->gpr[rd], regs->gpr[rb]); in analyse_instr()
2078 op->val = ~(regs->gpr[rd] ^ regs->gpr[rb]); in analyse_instr()
2082 op->val = regs->gpr[rd] ^ regs->gpr[rb]; in analyse_instr()
2086 do_popcnt(regs, op, regs->gpr[rd], 32); in analyse_instr()
2090 op->val = regs->gpr[rd] | ~regs->gpr[rb]; in analyse_instr()
2094 op->val = regs->gpr[rd] | regs->gpr[rb]; in analyse_instr()
2098 op->val = ~(regs->gpr[rd] & regs->gpr[rb]); in analyse_instr()
2102 do_popcnt(regs, op, regs->gpr[rd], 64); in analyse_instr()
2108 val = (unsigned int) regs->gpr[rd]; in analyse_instr()
2115 val = regs->gpr[rd]; in analyse_instr()
2120 op->val = (signed short) regs->gpr[rd]; in analyse_instr()
2124 op->val = (signed char) regs->gpr[rd]; in analyse_instr()
2128 op->val = (signed int) regs->gpr[rd]; in analyse_instr()
2138 op->val = (regs->gpr[rd] << sh) & 0xffffffffUL; in analyse_instr()
2146 op->val = (regs->gpr[rd] & 0xffffffffUL) >> sh; in analyse_instr()
2154 ival = (signed int) regs->gpr[rd]; in analyse_instr()
2167 ival = (signed int) regs->gpr[rd]; in analyse_instr()
2181 op->val = regs->gpr[rd] << sh; in analyse_instr()
2189 op->val = regs->gpr[rd] >> sh; in analyse_instr()
2197 ival = (signed long int) regs->gpr[rd]; in analyse_instr()
2211 ival = (signed long int) regs->gpr[rd]; in analyse_instr()
2227 val = (signed int) regs->gpr[rd]; in analyse_instr()
2252 op->reg = rd; in analyse_instr()
2258 op->reg = rd; in analyse_instr()
2279 op->reg = rd; in analyse_instr()
2280 op->val = regs->gpr[rd]; in analyse_instr()
2324 if (!((rd & 1) || rd == ra || rd == rb)) in analyse_instr()
2329 if (!(rd & 1)) in analyse_instr()
2503 op->val = byterev_8(regs->gpr[rd]); in analyse_instr()
2513 op->val = byterev_4(regs->gpr[rd]); in analyse_instr()
2529 op->val = byterev_2(regs->gpr[rd]); in analyse_instr()
2534 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2540 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2546 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2554 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2565 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2577 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2586 op->reg = VSX_REGISTER_XTP(rd); in analyse_instr()
2594 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2603 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2614 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2628 op->reg = VSX_REGISTER_XTP(rd); in analyse_instr()
2633 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2640 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2646 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2653 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2659 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2667 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2676 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2685 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2692 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2700 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2707 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2715 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2724 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2733 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2740 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2748 op->reg = rd | ((word & 1) << 5); in analyse_instr()
2801 if (ra >= rd) in analyse_instr()
2803 op->type = MKOP(LOAD_MULTI, 0, 4 * (32 - rd)); in analyse_instr()
2808 op->type = MKOP(STORE_MULTI, 0, 4 * (32 - rd)); in analyse_instr()
2840 if (!((rd & 1) || (rd == ra))) in analyse_instr()
2849 switch (word & 3) { in analyse_instr()
2851 if (rd & 1) in analyse_instr()
2858 op->reg = rd + 32; in analyse_instr()
2863 case 3: /* lxssp */ in analyse_instr()
2866 op->reg = rd + 32; in analyse_instr()
2878 switch (word & 3) { in analyse_instr()
2897 op->reg = VSX_REGISTER_XTP(rd); in analyse_instr()
2922 op->reg = rd + 32; in analyse_instr()
2933 op->reg = rd + 32; in analyse_instr()
2939 case 3: /* stxssp with LSB of DS field = 0 */ in analyse_instr()
2944 op->reg = rd + 32; in analyse_instr()
2955 op->reg = rd + 32; in analyse_instr()
2967 switch (word & 3) { in analyse_instr()
2975 if (!(rd & 1)) in analyse_instr()
2987 rd = (suffix >> 21) & 0x1f; in analyse_instr()
2988 op->reg = rd; in analyse_instr()
2989 op->val = regs->gpr[rd]; in analyse_instr()
3004 op->reg = rd + 32; in analyse_instr()
3010 op->reg = rd + 32; in analyse_instr()
3016 op->reg = rd + 32; in analyse_instr()
3022 op->reg = rd + 32; in analyse_instr()
3036 op->reg = rd + 32; in analyse_instr()
3052 op->reg = VSX_REGISTER_XTP(rd); in analyse_instr()
3065 op->reg = VSX_REGISTER_XTP(rd); in analyse_instr()
3114 case 3: /* Type 11 Modified Register-to-Register */ in analyse_instr()
3124 if (ra == rd) in analyse_instr()
3161 op->reg = rd; in analyse_instr()
3327 int i, rd, nb; in emulate_loadstore() local
3411 ((regs->xer >> 3) & 0x10000000); in emulate_loadstore()
3471 rd = op->reg; in emulate_loadstore()
3483 regs->gpr[rd] = v32; in emulate_loadstore()
3486 rd = (rd + 1) & 0x1f; in emulate_loadstore()
3541 rd = op->reg; in emulate_loadstore()
3543 unsigned int v32 = regs->gpr[rd]; in emulate_loadstore()
3555 rd = (rd + 1) & 0x1f; in emulate_loadstore()