Lines Matching refs:insn
41 static inline enum direction decode_direction(unsigned int insn) in decode_direction() argument
43 unsigned long tmp = (insn >> 21) & 1; in decode_direction()
48 switch ((insn>>19)&0xf) { in decode_direction()
58 static inline int decode_access_size(struct pt_regs *regs, unsigned int insn) in decode_access_size() argument
62 tmp = ((insn >> 19) & 0xf); in decode_access_size()
73 printk("Impossible unaligned trap. insn=%08x\n", insn); in decode_access_size()
86 static inline int decode_asi(unsigned int insn, struct pt_regs *regs) in decode_asi() argument
88 if (insn & 0x800000) { in decode_asi()
89 if (insn & 0x2000) in decode_asi()
92 return (unsigned char)(insn >> 5); /* imm_asi */ in decode_asi()
98 static inline int decode_signedness(unsigned int insn) in decode_signedness() argument
100 return (insn & 0x400000); in decode_signedness()
169 unsigned int insn, unsigned int rd) in compute_effective_address() argument
172 unsigned int rs1 = (insn >> 14) & 0x1f; in compute_effective_address()
173 unsigned int rs2 = insn & 0x1f; in compute_effective_address()
176 if (insn & 0x2000) { in compute_effective_address()
178 addr = (fetch_reg(rs1, regs) + sign_extend_imm13(insn)); in compute_effective_address()
248 static inline int floating_point_load_or_store_p(unsigned int insn) in floating_point_load_or_store_p() argument
250 return (insn >> 24) & 1; in floating_point_load_or_store_p()
253 static inline int ok_for_kernel(unsigned int insn) in ok_for_kernel() argument
255 return !floating_point_load_or_store_p(insn); in ok_for_kernel()
261 unsigned int insn = current_thread_info()->kern_una_insn; in kernel_mna_trap_fault() local
268 address = compute_effective_address(regs, insn, in kernel_mna_trap_fault()
269 ((insn >> 25) & 0x1f)); in kernel_mna_trap_fault()
305 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) in kernel_unaligned_trap() argument
307 enum direction dir = decode_direction(insn); in kernel_unaligned_trap()
308 int size = decode_access_size(regs, insn); in kernel_unaligned_trap()
312 current_thread_info()->kern_una_insn = insn; in kernel_unaligned_trap()
314 orig_asi = asi = decode_asi(insn, regs); in kernel_unaligned_trap()
326 if (!ok_for_kernel(insn) || dir == both) { in kernel_unaligned_trap()
337 addr = compute_effective_address(regs, insn, in kernel_unaligned_trap()
338 ((insn >> 25) & 0x1f)); in kernel_unaligned_trap()
353 reg_addr = fetch_reg_addr(((insn>>25)&0x1f), regs); in kernel_unaligned_trap()
356 decode_signedness(insn), asi); in kernel_unaligned_trap()
379 err = do_int_store(((insn>>25)&0x1f), size, in kernel_unaligned_trap()
395 int handle_popc(u32 insn, struct pt_regs *regs) in handle_popc() argument
398 int ret, rd = ((insn >> 25) & 0x1f); in handle_popc()
402 if (insn & 0x2000) { in handle_popc()
404 value = sign_extend_imm13(insn); in handle_popc()
406 maybe_flush_windows(0, insn & 0x1f, rd, from_kernel); in handle_popc()
407 value = fetch_reg(insn & 0x1f, regs); in handle_popc()
436 int handle_ldf_stq(u32 insn, struct pt_regs *regs) in handle_ldf_stq() argument
438 unsigned long addr = compute_effective_address(regs, insn, 0); in handle_ldf_stq()
441 int asi = decode_asi(insn, regs); in handle_ldf_stq()
448 if (insn & 0x200000) { in handle_ldf_stq()
452 freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); in handle_ldf_stq()
513 switch (insn & 0x180000) { in handle_ldf_stq()
519 freg = (insn >> 25) & 0x1f; in handle_ldf_stq()
521 freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); in handle_ldf_stq()
569 void handle_ld_nf(u32 insn, struct pt_regs *regs) in handle_ld_nf() argument
571 int rd = ((insn >> 25) & 0x1f); in handle_ld_nf()
581 if ((insn & 0x780000) == 0x180000) in handle_ld_nf()
585 if ((insn & 0x780000) == 0x180000) in handle_ld_nf()
589 if ((insn & 0x780000) == 0x180000) in handle_ld_nf()
600 u32 insn; in handle_lddfmna() local
611 if (get_user(insn, (u32 __user *) pc) != -EFAULT) { in handle_lddfmna()
612 int asi = decode_asi(insn, regs); in handle_lddfmna()
629 freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); in handle_lddfmna()
664 u32 insn; in handle_stdfmna() local
675 if (get_user(insn, (u32 __user *) pc) != -EFAULT) { in handle_stdfmna()
676 int asi = decode_asi(insn, regs); in handle_stdfmna()
677 freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); in handle_stdfmna()