Lines Matching refs:regs

110 extern void show_registers(struct pt_regs *regs);
112 static void emulate_load_store_insn(struct pt_regs *regs, in emulate_load_store_insn() argument
118 bool user = user_mode(regs); in emulate_load_store_insn()
121 orig31 = regs->regs[31]; in emulate_load_store_insn()
123 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, 0); in emulate_load_store_insn()
176 compute_return_epc(regs); in emulate_load_store_insn()
177 regs->regs[insn.mxu_lx_format.rd] = value; in emulate_load_store_insn()
185 compute_return_epc(regs); in emulate_load_store_insn()
186 regs->regs[insn.dsp_format.rd] = value; in emulate_load_store_insn()
194 compute_return_epc(regs); in emulate_load_store_insn()
195 regs->regs[insn.dsp_format.rd] = value; in emulate_load_store_insn()
214 compute_return_epc(regs); in emulate_load_store_insn()
215 regs->regs[insn.dsp_format.rd] = value; in emulate_load_store_insn()
223 compute_return_epc(regs); in emulate_load_store_insn()
224 regs->regs[insn.dsp_format.rd] = value; in emulate_load_store_insn()
244 compute_return_epc(regs); in emulate_load_store_insn()
245 regs->regs[insn.spec3_format.rt] = value; in emulate_load_store_insn()
253 compute_return_epc(regs); in emulate_load_store_insn()
254 regs->regs[insn.spec3_format.rt] = value; in emulate_load_store_insn()
262 compute_return_epc(regs); in emulate_load_store_insn()
263 regs->regs[insn.spec3_format.rt] = value; in emulate_load_store_insn()
268 compute_return_epc(regs); in emulate_load_store_insn()
269 value = regs->regs[insn.spec3_format.rt]; in emulate_load_store_insn()
277 compute_return_epc(regs); in emulate_load_store_insn()
278 value = regs->regs[insn.spec3_format.rt]; in emulate_load_store_insn()
300 compute_return_epc(regs); in emulate_load_store_insn()
301 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
315 compute_return_epc(regs); in emulate_load_store_insn()
316 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
330 compute_return_epc(regs); in emulate_load_store_insn()
331 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
349 compute_return_epc(regs); in emulate_load_store_insn()
350 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
372 compute_return_epc(regs); in emulate_load_store_insn()
373 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
384 compute_return_epc(regs); in emulate_load_store_insn()
385 value = regs->regs[insn.i_format.rt]; in emulate_load_store_insn()
400 compute_return_epc(regs); in emulate_load_store_insn()
401 value = regs->regs[insn.i_format.rt]; in emulate_load_store_insn()
424 compute_return_epc(regs); in emulate_load_store_insn()
425 value = regs->regs[insn.i_format.rt]; in emulate_load_store_insn()
444 die_if_kernel("Unaligned FP access in kernel code", regs); in emulate_load_store_insn()
447 res = fpu_emulator_cop1Handler(regs, &current->thread.fpu, 1, in emulate_load_store_insn()
541 compute_return_epc(regs); in emulate_load_store_insn()
555 cu2_notifier_call_chain(CU2_LWC2_OP, regs); in emulate_load_store_insn()
559 cu2_notifier_call_chain(CU2_LDC2_OP, regs); in emulate_load_store_insn()
563 cu2_notifier_call_chain(CU2_SWC2_OP, regs); in emulate_load_store_insn()
567 cu2_notifier_call_chain(CU2_SDC2_OP, regs); in emulate_load_store_insn()
586 regs->cp0_epc = origpc; in emulate_load_store_insn()
587 regs->regs[31] = orig31; in emulate_load_store_insn()
589 if (fixup_exception(regs)) in emulate_load_store_insn()
592 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_insn()
598 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_insn()
605 ("Unhandled kernel unaligned access or invalid instruction", regs); in emulate_load_store_insn()
615 static void emulate_load_store_microMIPS(struct pt_regs *regs, in emulate_load_store_microMIPS() argument
629 bool user = user_mode(regs); in emulate_load_store_microMIPS()
631 origpc = regs->cp0_epc; in emulate_load_store_microMIPS()
632 orig31 = regs->regs[31]; in emulate_load_store_microMIPS()
639 pc16 = (unsigned short __user *)msk_isa16_mode(regs->cp0_epc); in emulate_load_store_microMIPS()
642 contpc = regs->cp0_epc + 2; in emulate_load_store_microMIPS()
649 contpc = regs->cp0_epc + 4; in emulate_load_store_microMIPS()
670 if (mm_isBranchInstr(regs, mminsn, &contpc)) in emulate_load_store_microMIPS()
699 regs->regs[reg] = value; in emulate_load_store_microMIPS()
704 regs->regs[reg + 1] = value; in emulate_load_store_microMIPS()
715 value = regs->regs[reg]; in emulate_load_store_microMIPS()
720 value = regs->regs[reg + 1]; in emulate_load_store_microMIPS()
738 regs->regs[reg] = value; in emulate_load_store_microMIPS()
743 regs->regs[reg + 1] = value; in emulate_load_store_microMIPS()
758 value = regs->regs[reg]; in emulate_load_store_microMIPS()
763 value = regs->regs[reg + 1]; in emulate_load_store_microMIPS()
791 regs->regs[i] = value; in emulate_load_store_microMIPS()
798 regs->regs[30] = value; in emulate_load_store_microMIPS()
804 regs->regs[31] = value; in emulate_load_store_microMIPS()
823 value = regs->regs[i]; in emulate_load_store_microMIPS()
830 value = regs->regs[30]; in emulate_load_store_microMIPS()
837 value = regs->regs[31]; in emulate_load_store_microMIPS()
865 regs->regs[i] = value; in emulate_load_store_microMIPS()
872 regs->regs[30] = value; in emulate_load_store_microMIPS()
878 regs->regs[31] = value; in emulate_load_store_microMIPS()
902 value = regs->regs[i]; in emulate_load_store_microMIPS()
909 value = regs->regs[30]; in emulate_load_store_microMIPS()
916 value = regs->regs[31]; in emulate_load_store_microMIPS()
961 regs->cp0_epc = origpc; in emulate_load_store_microMIPS()
962 regs->regs[31] = orig31; in emulate_load_store_microMIPS()
964 die_if_kernel("Unaligned FP access in kernel code", regs); in emulate_load_store_microMIPS()
968 res = fpu_emulator_cop1Handler(regs, &current->thread.fpu, 1, in emulate_load_store_microMIPS()
1022 regs->regs[i] = value; in emulate_load_store_microMIPS()
1027 regs->regs[31] = value; in emulate_load_store_microMIPS()
1038 value = regs->regs[i]; in emulate_load_store_microMIPS()
1044 value = regs->regs[31]; in emulate_load_store_microMIPS()
1094 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1104 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1114 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1132 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1154 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1165 value = regs->regs[reg]; in emulate_load_store_microMIPS()
1175 value = regs->regs[reg]; in emulate_load_store_microMIPS()
1193 value = regs->regs[reg]; in emulate_load_store_microMIPS()
1204 regs->cp0_epc = contpc; /* advance or branch */ in emulate_load_store_microMIPS()
1213 regs->cp0_epc = origpc; in emulate_load_store_microMIPS()
1214 regs->regs[31] = orig31; in emulate_load_store_microMIPS()
1216 if (fixup_exception(regs)) in emulate_load_store_microMIPS()
1219 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_microMIPS()
1225 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_microMIPS()
1232 ("Unhandled kernel unaligned access or invalid instruction", regs); in emulate_load_store_microMIPS()
1236 static void emulate_load_store_MIPS16e(struct pt_regs *regs, void __user * addr) in emulate_load_store_MIPS16e() argument
1247 bool user = user_mode(regs); in emulate_load_store_MIPS16e()
1249 origpc = regs->cp0_epc; in emulate_load_store_MIPS16e()
1250 orig31 = regs->regs[31]; in emulate_load_store_MIPS16e()
1263 } else if (delay_slot(regs)) { in emulate_load_store_MIPS16e()
1355 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
1356 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
1366 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
1367 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
1379 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
1380 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
1398 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
1399 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
1422 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
1423 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
1434 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
1435 value = regs->regs[reg]; in emulate_load_store_MIPS16e()
1447 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
1448 value = regs->regs[reg]; in emulate_load_store_MIPS16e()
1467 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
1468 value = regs->regs[reg]; in emulate_load_store_MIPS16e()
1494 regs->cp0_epc = origpc; in emulate_load_store_MIPS16e()
1495 regs->regs[31] = orig31; in emulate_load_store_MIPS16e()
1497 if (fixup_exception(regs)) in emulate_load_store_MIPS16e()
1500 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_MIPS16e()
1506 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_MIPS16e()
1513 ("Unhandled kernel unaligned access or invalid instruction", regs); in emulate_load_store_MIPS16e()
1517 asmlinkage void do_ade(struct pt_regs *regs) in do_ade() argument
1524 1, regs, regs->cp0_badvaddr); in do_ade()
1532 if ((regs->cp0_badvaddr >= (1UL << cpu_vmbits)) && in do_ade()
1533 (regs->cp0_badvaddr < XKSSEG)) { in do_ade()
1534 if (fixup_exception(regs)) { in do_ade()
1535 current->thread.cp0_baduaddr = regs->cp0_badvaddr; in do_ade()
1545 if (regs->cp0_badvaddr == regs->cp0_epc) in do_ade()
1548 if (user_mode(regs) && !test_thread_flag(TIF_FIXADE)) in do_ade()
1561 if (get_isa16_mode(regs->cp0_epc)) { in do_ade()
1566 if (regs->cp0_badvaddr == msk_isa16_mode(regs->cp0_epc)) in do_ade()
1569 show_registers(regs); in do_ade()
1572 emulate_load_store_microMIPS(regs, in do_ade()
1573 (void __user *)regs->cp0_badvaddr); in do_ade()
1578 emulate_load_store_MIPS16e(regs, in do_ade()
1579 (void __user *)regs->cp0_badvaddr); in do_ade()
1587 show_registers(regs); in do_ade()
1588 pc = (unsigned int *)exception_epc(regs); in do_ade()
1590 emulate_load_store_insn(regs, (void __user *)regs->cp0_badvaddr, pc); in do_ade()
1595 die_if_kernel("Kernel unaligned instruction access", regs); in do_ade()