Lines Matching refs:rd
469 static void __kprobes set_cr0(struct pt_regs *regs, int rd) in set_cr0() argument
471 long val = regs->gpr[rd]; in set_cr0()
486 static void __kprobes add_with_carry(struct pt_regs *regs, int rd, in add_with_carry() argument
494 regs->gpr[rd] = val; in add_with_carry()
563 unsigned int opcode, ra, rb, rd, spr, u; in emulate_step() local
647 rd = (instr >> 21) & 0x1f; in emulate_step()
651 regs->ccr = (regs->ccr & ~(1UL << (31 - rd))) | in emulate_step()
652 (val << (31 - rd)); in emulate_step()
683 rd = (instr >> 21) & 0x1f; in emulate_step()
689 regs->gpr[rd] = regs->gpr[ra] * (short) instr; in emulate_step()
694 add_with_carry(regs, rd, ~regs->gpr[ra], imm, 1); in emulate_step()
701 if ((rd & 1) == 0) in emulate_step()
704 do_cmp_unsigned(regs, val, imm, rd >> 2); in emulate_step()
711 if ((rd & 1) == 0) in emulate_step()
714 do_cmp_signed(regs, val, imm, rd >> 2); in emulate_step()
719 add_with_carry(regs, rd, regs->gpr[ra], imm, 0); in emulate_step()
724 add_with_carry(regs, rd, regs->gpr[ra], imm, 0); in emulate_step()
725 set_cr0(regs, rd); in emulate_step()
732 regs->gpr[rd] = imm; in emulate_step()
739 regs->gpr[rd] = imm; in emulate_step()
745 val = DATA32(regs->gpr[rd]); in emulate_step()
753 val = DATA32(regs->gpr[rd]); in emulate_step()
761 val = DATA32(regs->gpr[rd]); in emulate_step()
767 regs->gpr[ra] = regs->gpr[rd] | imm; in emulate_step()
772 regs->gpr[ra] = regs->gpr[rd] | (imm << 16); in emulate_step()
777 regs->gpr[ra] = regs->gpr[rd] ^ imm; in emulate_step()
782 regs->gpr[ra] = regs->gpr[rd] ^ (imm << 16); in emulate_step()
787 regs->gpr[ra] = regs->gpr[rd] & imm; in emulate_step()
793 regs->gpr[ra] = regs->gpr[rd] & (imm << 16); in emulate_step()
800 val = regs->gpr[rd]; in emulate_step()
839 regs->gpr[rd] = regs->msr & MSR_MASK; in emulate_step()
844 imm = regs->gpr[rd]; in emulate_step()
858 | (regs->gpr[rd] & imm); in emulate_step()
866 regs->gpr[rd] = regs->ccr; in emulate_step()
867 regs->gpr[rd] &= 0xffffffffUL; in emulate_step()
872 val = regs->gpr[rd]; in emulate_step()
885 regs->gpr[rd] = regs->xer; in emulate_step()
886 regs->gpr[rd] &= 0xffffffffUL; in emulate_step()
889 regs->gpr[rd] = regs->link; in emulate_step()
892 regs->gpr[rd] = regs->ctr; in emulate_step()
901 regs->xer = (regs->gpr[rd] & 0xffffffffUL); in emulate_step()
904 regs->link = regs->gpr[rd]; in emulate_step()
907 regs->ctr = regs->gpr[rd]; in emulate_step()
919 if ((rd & 1) == 0) { in emulate_step()
925 do_cmp_signed(regs, val, val2, rd >> 2); in emulate_step()
932 if ((rd & 1) == 0) { in emulate_step()
938 do_cmp_unsigned(regs, val, val2, rd >> 2); in emulate_step()
945 add_with_carry(regs, rd, ~regs->gpr[ra], in emulate_step()
950 asm("mulhdu %0,%1,%2" : "=r" (regs->gpr[rd]) : in emulate_step()
955 add_with_carry(regs, rd, regs->gpr[ra], in emulate_step()
960 asm("mulhwu %0,%1,%2" : "=r" (regs->gpr[rd]) : in emulate_step()
965 regs->gpr[rd] = regs->gpr[rb] - regs->gpr[ra]; in emulate_step()
969 asm("mulhd %0,%1,%2" : "=r" (regs->gpr[rd]) : in emulate_step()
974 asm("mulhw %0,%1,%2" : "=r" (regs->gpr[rd]) : in emulate_step()
979 regs->gpr[rd] = -regs->gpr[ra]; in emulate_step()
983 add_with_carry(regs, rd, ~regs->gpr[ra], regs->gpr[rb], in emulate_step()
988 add_with_carry(regs, rd, regs->gpr[ra], regs->gpr[rb], in emulate_step()
993 add_with_carry(regs, rd, ~regs->gpr[ra], 0L, in emulate_step()
998 add_with_carry(regs, rd, regs->gpr[ra], 0L, in emulate_step()
1003 add_with_carry(regs, rd, ~regs->gpr[ra], -1L, in emulate_step()
1008 regs->gpr[rd] = regs->gpr[ra] * regs->gpr[rb]; in emulate_step()
1012 add_with_carry(regs, rd, regs->gpr[ra], -1L, in emulate_step()
1017 regs->gpr[rd] = (unsigned int) regs->gpr[ra] * in emulate_step()
1022 regs->gpr[rd] = regs->gpr[ra] + regs->gpr[rb]; in emulate_step()
1026 regs->gpr[rd] = regs->gpr[ra] / regs->gpr[rb]; in emulate_step()
1030 regs->gpr[rd] = (unsigned int) regs->gpr[ra] / in emulate_step()
1035 regs->gpr[rd] = (long int) regs->gpr[ra] / in emulate_step()
1040 regs->gpr[rd] = (int) regs->gpr[ra] / in emulate_step()
1050 "r" (regs->gpr[rd])); in emulate_step()
1055 "r" (regs->gpr[rd])); in emulate_step()
1059 regs->gpr[ra] = regs->gpr[rd] & regs->gpr[rb]; in emulate_step()
1063 regs->gpr[ra] = regs->gpr[rd] & ~regs->gpr[rb]; in emulate_step()
1067 regs->gpr[ra] = ~(regs->gpr[rd] | regs->gpr[rb]); in emulate_step()
1071 regs->gpr[ra] = ~(regs->gpr[rd] ^ regs->gpr[rb]); in emulate_step()
1075 regs->gpr[ra] = regs->gpr[rd] ^ regs->gpr[rb]; in emulate_step()
1079 regs->gpr[ra] = regs->gpr[rd] | ~regs->gpr[rb]; in emulate_step()
1083 regs->gpr[ra] = regs->gpr[rd] | regs->gpr[rb]; in emulate_step()
1087 regs->gpr[ra] = ~(regs->gpr[rd] & regs->gpr[rb]); in emulate_step()
1091 regs->gpr[ra] = (signed short) regs->gpr[rd]; in emulate_step()
1095 regs->gpr[ra] = (signed char) regs->gpr[rd]; in emulate_step()
1099 regs->gpr[ra] = (signed int) regs->gpr[rd]; in emulate_step()
1109 regs->gpr[ra] = (regs->gpr[rd] << sh) & 0xffffffffUL; in emulate_step()
1117 regs->gpr[ra] = (regs->gpr[rd] & 0xffffffffUL) >> sh; in emulate_step()
1124 ival = (signed int) regs->gpr[rd]; in emulate_step()
1134 ival = (signed int) regs->gpr[rd]; in emulate_step()
1144 sh = regs->gpr[rd] & 0x7f; in emulate_step()
1146 regs->gpr[ra] = regs->gpr[rd] << sh; in emulate_step()
1154 regs->gpr[ra] = regs->gpr[rd] >> sh; in emulate_step()
1161 ival = (signed long int) regs->gpr[rd]; in emulate_step()
1172 ival = (signed long int) regs->gpr[rd]; in emulate_step()
1205 if (rd == 0) { in emulate_step()
1212 if (rd == 0) { in emulate_step()
1249 regs->gpr[rd] = val; in emulate_step()
1260 __put_user_asmx(regs->gpr[rd], ea, err, "stwcx.", cr); in emulate_step()
1278 regs->gpr[rd] = val; in emulate_step()
1289 __put_user_asmx(regs->gpr[rd], ea, err, "stdcx.", cr); in emulate_step()
1298 err = read_mem(®s->gpr[rd], xform_ea(instr, regs, u), in emulate_step()
1305 err = read_mem(®s->gpr[rd], xform_ea(instr, regs, u), in emulate_step()
1311 err = read_mem(®s->gpr[rd], xform_ea(instr, regs, u), in emulate_step()
1321 err = do_vec_load(rd, do_lvx, ea, regs); in emulate_step()
1329 err = do_vec_store(rd, do_stvx, ea, regs); in emulate_step()
1336 val = regs->gpr[rd]; in emulate_step()
1343 val = regs->gpr[rd]; in emulate_step()
1349 val = regs->gpr[rd]; in emulate_step()
1355 err = read_mem(®s->gpr[rd], xform_ea(instr, regs, u), in emulate_step()
1362 err = read_mem(®s->gpr[rd], xform_ea(instr, regs, u), in emulate_step()
1365 regs->gpr[rd] = (signed int) regs->gpr[rd]; in emulate_step()
1371 err = read_mem(®s->gpr[rd], xform_ea(instr, regs, u), in emulate_step()
1374 regs->gpr[rd] = (signed short) regs->gpr[rd]; in emulate_step()
1379 val = regs->gpr[rd]; in emulate_step()
1387 regs->gpr[rd] = byterev_8(val); in emulate_step()
1395 regs->gpr[rd] = byterev_4(val); in emulate_step()
1404 err = do_fp_load(rd, do_lfs, ea, 4, regs); in emulate_step()
1412 err = do_fp_load(rd, do_lfd, ea, 8, regs); in emulate_step()
1420 err = do_fp_store(rd, do_stfs, ea, 4, regs); in emulate_step()
1428 err = do_fp_store(rd, do_stfd, ea, 8, regs); in emulate_step()
1434 val = byterev_8(regs->gpr[rd]); in emulate_step()
1440 val = byterev_4(regs->gpr[rd]); in emulate_step()
1447 regs->gpr[rd] = byterev_2(val); in emulate_step()
1451 val = byterev_2(regs->gpr[rd]); in emulate_step()
1460 rd |= (instr & 1) << 5; in emulate_step()
1462 err = do_vsx_load(rd, do_lxvd2x, ea, regs); in emulate_step()
1469 rd |= (instr & 1) << 5; in emulate_step()
1471 err = do_vsx_store(rd, do_stxvd2x, ea, regs); in emulate_step()
1480 err = read_mem(®s->gpr[rd], dform_ea(instr, regs), 4, regs); in emulate_step()
1485 err = read_mem(®s->gpr[rd], dform_ea(instr, regs), 1, regs); in emulate_step()
1490 val = regs->gpr[rd]; in emulate_step()
1496 val = regs->gpr[rd]; in emulate_step()
1502 err = read_mem(®s->gpr[rd], dform_ea(instr, regs), 2, regs); in emulate_step()
1507 err = read_mem(®s->gpr[rd], dform_ea(instr, regs), 2, regs); in emulate_step()
1509 regs->gpr[rd] = (signed short) regs->gpr[rd]; in emulate_step()
1514 val = regs->gpr[rd]; in emulate_step()
1520 if (ra >= rd) in emulate_step()
1524 err = read_mem(®s->gpr[rd], ea, 4, regs); in emulate_step()
1528 } while (++rd < 32); in emulate_step()
1534 err = write_mem(regs->gpr[rd], ea, 4, regs); in emulate_step()
1538 } while (++rd < 32); in emulate_step()
1547 err = do_fp_load(rd, do_lfs, ea, 4, regs); in emulate_step()
1555 err = do_fp_load(rd, do_lfd, ea, 8, regs); in emulate_step()
1563 err = do_fp_store(rd, do_stfs, ea, 4, regs); in emulate_step()
1571 err = do_fp_store(rd, do_stfd, ea, 8, regs); in emulate_step()
1579 err = read_mem(®s->gpr[rd], dsform_ea(instr, regs), in emulate_step()
1583 err = read_mem(®s->gpr[rd], dsform_ea(instr, regs), in emulate_step()
1587 err = read_mem(®s->gpr[rd], dsform_ea(instr, regs), in emulate_step()
1590 regs->gpr[rd] = (signed int) regs->gpr[rd]; in emulate_step()
1596 val = regs->gpr[rd]; in emulate_step()
1627 set_cr0(regs, rd); in emulate_step()