Lines Matching refs:regs
108 extern void show_registers(struct pt_regs *regs);
883 static void emulate_load_store_insn(struct pt_regs *regs, in emulate_load_store_insn() argument
899 orig31 = regs->regs[31]; in emulate_load_store_insn()
901 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, 0); in emulate_load_store_insn()
962 compute_return_epc(regs); in emulate_load_store_insn()
963 regs->regs[insn.spec3_format.rt] = value; in emulate_load_store_insn()
975 compute_return_epc(regs); in emulate_load_store_insn()
976 regs->regs[insn.spec3_format.rt] = value; in emulate_load_store_insn()
988 compute_return_epc(regs); in emulate_load_store_insn()
989 regs->regs[insn.spec3_format.rt] = value; in emulate_load_store_insn()
996 compute_return_epc(regs); in emulate_load_store_insn()
997 value = regs->regs[insn.spec3_format.rt]; in emulate_load_store_insn()
1009 compute_return_epc(regs); in emulate_load_store_insn()
1010 value = regs->regs[insn.spec3_format.rt]; in emulate_load_store_insn()
1039 compute_return_epc(regs); in emulate_load_store_insn()
1040 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
1058 compute_return_epc(regs); in emulate_load_store_insn()
1059 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
1077 compute_return_epc(regs); in emulate_load_store_insn()
1078 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
1096 compute_return_epc(regs); in emulate_load_store_insn()
1097 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
1119 compute_return_epc(regs); in emulate_load_store_insn()
1120 regs->regs[insn.i_format.rt] = value; in emulate_load_store_insn()
1131 compute_return_epc(regs); in emulate_load_store_insn()
1132 value = regs->regs[insn.i_format.rt]; in emulate_load_store_insn()
1151 compute_return_epc(regs); in emulate_load_store_insn()
1152 value = regs->regs[insn.i_format.rt]; in emulate_load_store_insn()
1179 compute_return_epc(regs); in emulate_load_store_insn()
1180 value = regs->regs[insn.i_format.rt]; in emulate_load_store_insn()
1194 die_if_kernel("Unaligned FP access in kernel code", regs); in emulate_load_store_insn()
1198 res = fpu_emulator_cop1Handler(regs, ¤t->thread.fpu, 1, in emulate_load_store_insn()
1284 compute_return_epc(regs); in emulate_load_store_insn()
1296 cu2_notifier_call_chain(CU2_LWC2_OP, regs); in emulate_load_store_insn()
1300 cu2_notifier_call_chain(CU2_LDC2_OP, regs); in emulate_load_store_insn()
1304 cu2_notifier_call_chain(CU2_SWC2_OP, regs); in emulate_load_store_insn()
1308 cu2_notifier_call_chain(CU2_SDC2_OP, regs); in emulate_load_store_insn()
1327 regs->cp0_epc = origpc; in emulate_load_store_insn()
1328 regs->regs[31] = orig31; in emulate_load_store_insn()
1330 if (fixup_exception(regs)) in emulate_load_store_insn()
1333 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_insn()
1339 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_insn()
1346 ("Unhandled kernel unaligned access or invalid instruction", regs); in emulate_load_store_insn()
1356 static void emulate_load_store_microMIPS(struct pt_regs *regs, in emulate_load_store_microMIPS() argument
1372 origpc = regs->cp0_epc; in emulate_load_store_microMIPS()
1373 orig31 = regs->regs[31]; in emulate_load_store_microMIPS()
1380 pc16 = (unsigned short __user *)msk_isa16_mode(regs->cp0_epc); in emulate_load_store_microMIPS()
1383 contpc = regs->cp0_epc + 2; in emulate_load_store_microMIPS()
1390 contpc = regs->cp0_epc + 4; in emulate_load_store_microMIPS()
1411 if (mm_isBranchInstr(regs, mminsn, &contpc)) in emulate_load_store_microMIPS()
1440 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1445 regs->regs[reg + 1] = value; in emulate_load_store_microMIPS()
1456 value = regs->regs[reg]; in emulate_load_store_microMIPS()
1461 value = regs->regs[reg + 1]; in emulate_load_store_microMIPS()
1479 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1484 regs->regs[reg + 1] = value; in emulate_load_store_microMIPS()
1499 value = regs->regs[reg]; in emulate_load_store_microMIPS()
1504 value = regs->regs[reg + 1]; in emulate_load_store_microMIPS()
1533 regs->regs[i] = value; in emulate_load_store_microMIPS()
1540 regs->regs[30] = value; in emulate_load_store_microMIPS()
1546 regs->regs[31] = value; in emulate_load_store_microMIPS()
1566 value = regs->regs[i]; in emulate_load_store_microMIPS()
1573 value = regs->regs[30]; in emulate_load_store_microMIPS()
1580 value = regs->regs[31]; in emulate_load_store_microMIPS()
1609 regs->regs[i] = value; in emulate_load_store_microMIPS()
1616 regs->regs[30] = value; in emulate_load_store_microMIPS()
1622 regs->regs[31] = value; in emulate_load_store_microMIPS()
1647 value = regs->regs[i]; in emulate_load_store_microMIPS()
1654 value = regs->regs[30]; in emulate_load_store_microMIPS()
1661 value = regs->regs[31]; in emulate_load_store_microMIPS()
1703 regs->cp0_epc = origpc; in emulate_load_store_microMIPS()
1704 regs->regs[31] = orig31; in emulate_load_store_microMIPS()
1706 die_if_kernel("Unaligned FP access in kernel code", regs); in emulate_load_store_microMIPS()
1711 res = fpu_emulator_cop1Handler(regs, ¤t->thread.fpu, 1, in emulate_load_store_microMIPS()
1763 regs->regs[i] = value; in emulate_load_store_microMIPS()
1768 regs->regs[31] = value; in emulate_load_store_microMIPS()
1779 value = regs->regs[i]; in emulate_load_store_microMIPS()
1785 value = regs->regs[31]; in emulate_load_store_microMIPS()
1835 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1845 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1855 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1873 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1895 regs->regs[reg] = value; in emulate_load_store_microMIPS()
1906 value = regs->regs[reg]; in emulate_load_store_microMIPS()
1916 value = regs->regs[reg]; in emulate_load_store_microMIPS()
1934 value = regs->regs[reg]; in emulate_load_store_microMIPS()
1945 regs->cp0_epc = contpc; /* advance or branch */ in emulate_load_store_microMIPS()
1954 regs->cp0_epc = origpc; in emulate_load_store_microMIPS()
1955 regs->regs[31] = orig31; in emulate_load_store_microMIPS()
1957 if (fixup_exception(regs)) in emulate_load_store_microMIPS()
1960 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_microMIPS()
1966 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_microMIPS()
1973 ("Unhandled kernel unaligned access or invalid instruction", regs); in emulate_load_store_microMIPS()
1977 static void emulate_load_store_MIPS16e(struct pt_regs *regs, void __user * addr) in emulate_load_store_MIPS16e() argument
1987 origpc = regs->cp0_epc; in emulate_load_store_MIPS16e()
1988 orig31 = regs->regs[31]; in emulate_load_store_MIPS16e()
2000 } else if (delay_slot(regs)) { in emulate_load_store_MIPS16e()
2060 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
2061 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
2071 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
2072 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
2084 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
2085 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
2103 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
2104 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
2127 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
2128 regs->regs[reg] = value; in emulate_load_store_MIPS16e()
2139 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
2140 value = regs->regs[reg]; in emulate_load_store_MIPS16e()
2152 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
2153 value = regs->regs[reg]; in emulate_load_store_MIPS16e()
2172 MIPS16e_compute_return_epc(regs, &oldinst); in emulate_load_store_MIPS16e()
2173 value = regs->regs[reg]; in emulate_load_store_MIPS16e()
2199 regs->cp0_epc = origpc; in emulate_load_store_MIPS16e()
2200 regs->regs[31] = orig31; in emulate_load_store_MIPS16e()
2202 if (fixup_exception(regs)) in emulate_load_store_MIPS16e()
2205 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_MIPS16e()
2211 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_MIPS16e()
2218 ("Unhandled kernel unaligned access or invalid instruction", regs); in emulate_load_store_MIPS16e()
2222 asmlinkage void do_ade(struct pt_regs *regs) in do_ade() argument
2230 1, regs, regs->cp0_badvaddr); in do_ade()
2234 if (regs->cp0_badvaddr == regs->cp0_epc) in do_ade()
2237 if (user_mode(regs) && !test_thread_flag(TIF_FIXADE)) in do_ade()
2250 if (get_isa16_mode(regs->cp0_epc)) { in do_ade()
2255 if (regs->cp0_badvaddr == msk_isa16_mode(regs->cp0_epc)) in do_ade()
2258 show_registers(regs); in do_ade()
2262 if (!user_mode(regs)) in do_ade()
2264 emulate_load_store_microMIPS(regs, in do_ade()
2265 (void __user *)regs->cp0_badvaddr); in do_ade()
2273 if (!user_mode(regs)) in do_ade()
2275 emulate_load_store_MIPS16e(regs, in do_ade()
2276 (void __user *)regs->cp0_badvaddr); in do_ade()
2286 show_registers(regs); in do_ade()
2287 pc = (unsigned int __user *)exception_epc(regs); in do_ade()
2290 if (!user_mode(regs)) in do_ade()
2292 emulate_load_store_insn(regs, (void __user *)regs->cp0_badvaddr, pc); in do_ade()
2298 die_if_kernel("Kernel unaligned instruction access", regs); in do_ade()