Lines Matching refs:insn
42 static inline enum direction decode_direction(unsigned int insn) in decode_direction() argument
44 unsigned long tmp = (insn >> 21) & 1; in decode_direction()
49 switch ((insn>>19)&0xf) { in decode_direction()
59 static inline int decode_access_size(struct pt_regs *regs, unsigned int insn) in decode_access_size() argument
63 tmp = ((insn >> 19) & 0xf); in decode_access_size()
74 printk("Impossible unaligned trap. insn=%08x\n", insn); in decode_access_size()
87 static inline int decode_asi(unsigned int insn, struct pt_regs *regs) in decode_asi() argument
89 if (insn & 0x800000) { in decode_asi()
90 if (insn & 0x2000) in decode_asi()
93 return (unsigned char)(insn >> 5); /* imm_asi */ in decode_asi()
99 static inline int decode_signedness(unsigned int insn) in decode_signedness() argument
101 return (insn & 0x400000); in decode_signedness()
170 unsigned int insn, unsigned int rd) in compute_effective_address() argument
173 unsigned int rs1 = (insn >> 14) & 0x1f; in compute_effective_address()
174 unsigned int rs2 = insn & 0x1f; in compute_effective_address()
177 if (insn & 0x2000) { in compute_effective_address()
179 addr = (fetch_reg(rs1, regs) + sign_extend_imm13(insn)); in compute_effective_address()
249 static inline int floating_point_load_or_store_p(unsigned int insn) in floating_point_load_or_store_p() argument
251 return (insn >> 24) & 1; in floating_point_load_or_store_p()
254 static inline int ok_for_kernel(unsigned int insn) in ok_for_kernel() argument
256 return !floating_point_load_or_store_p(insn); in ok_for_kernel()
262 unsigned int insn = current_thread_info()->kern_una_insn; in kernel_mna_trap_fault() local
269 address = compute_effective_address(regs, insn, in kernel_mna_trap_fault()
270 ((insn >> 25) & 0x1f)); in kernel_mna_trap_fault()
306 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) in kernel_unaligned_trap() argument
308 enum direction dir = decode_direction(insn); in kernel_unaligned_trap()
309 int size = decode_access_size(regs, insn); in kernel_unaligned_trap()
313 current_thread_info()->kern_una_insn = insn; in kernel_unaligned_trap()
315 orig_asi = asi = decode_asi(insn, regs); in kernel_unaligned_trap()
327 if (!ok_for_kernel(insn) || dir == both) { in kernel_unaligned_trap()
338 addr = compute_effective_address(regs, insn, in kernel_unaligned_trap()
339 ((insn >> 25) & 0x1f)); in kernel_unaligned_trap()
354 reg_addr = fetch_reg_addr(((insn>>25)&0x1f), regs); in kernel_unaligned_trap()
357 decode_signedness(insn), asi); in kernel_unaligned_trap()
380 err = do_int_store(((insn>>25)&0x1f), size, in kernel_unaligned_trap()
396 int handle_popc(u32 insn, struct pt_regs *regs) in handle_popc() argument
399 int ret, rd = ((insn >> 25) & 0x1f); in handle_popc()
403 if (insn & 0x2000) { in handle_popc()
405 value = sign_extend_imm13(insn); in handle_popc()
407 maybe_flush_windows(0, insn & 0x1f, rd, from_kernel); in handle_popc()
408 value = fetch_reg(insn & 0x1f, regs); in handle_popc()
437 int handle_ldf_stq(u32 insn, struct pt_regs *regs) in handle_ldf_stq() argument
439 unsigned long addr = compute_effective_address(regs, insn, 0); in handle_ldf_stq()
442 int asi = decode_asi(insn, regs); in handle_ldf_stq()
449 if (insn & 0x200000) { in handle_ldf_stq()
453 freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); in handle_ldf_stq()
514 switch (insn & 0x180000) { in handle_ldf_stq()
520 freg = (insn >> 25) & 0x1f; in handle_ldf_stq()
522 freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); in handle_ldf_stq()
570 void handle_ld_nf(u32 insn, struct pt_regs *regs) in handle_ld_nf() argument
572 int rd = ((insn >> 25) & 0x1f); in handle_ld_nf()
582 if ((insn & 0x780000) == 0x180000) in handle_ld_nf()
586 if ((insn & 0x780000) == 0x180000) in handle_ld_nf()
590 if ((insn & 0x780000) == 0x180000) in handle_ld_nf()
601 u32 insn; in handle_lddfmna() local
612 if (get_user(insn, (u32 __user *) pc) != -EFAULT) { in handle_lddfmna()
613 int asi = decode_asi(insn, regs); in handle_lddfmna()
630 freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); in handle_lddfmna()
665 u32 insn; in handle_stdfmna() local
676 if (get_user(insn, (u32 __user *) pc) != -EFAULT) { in handle_stdfmna()
677 int asi = decode_asi(insn, regs); in handle_stdfmna()
678 freg = ((insn >> 25) & 0x1e) | ((insn >> 20) & 0x20); in handle_stdfmna()