Lines Matching defs:insn

34 static inline enum direction decode_direction(unsigned int insn)
36 unsigned long tmp = (insn >> 21) & 1;
41 if(((insn>>19)&0x3f) == 15)
49 static inline int decode_access_size(unsigned int insn)
51 insn = (insn >> 19) & 3;
53 if(!insn)
55 else if(insn == 3)
57 else if(insn == 2)
60 printk("Impossible unaligned trap. insn=%08x\n", insn);
67 static inline int decode_signedness(unsigned int insn)
69 return (insn & 0x400000);
137 unsigned int insn)
139 unsigned int rs1 = (insn >> 14) & 0x1f;
140 unsigned int rs2 = insn & 0x1f;
141 unsigned int rd = (insn >> 25) & 0x1f;
143 if(insn & 0x2000) {
145 return (fetch_reg(rs1, regs) + sign_extend_imm13(insn));
153 unsigned int insn)
155 unsigned int rs1 = (insn >> 14) & 0x1f;
156 unsigned int rs2 = insn & 0x1f;
157 unsigned int rd = (insn >> 25) & 0x1f;
159 if(insn & 0x2000) {
161 return (safe_fetch_reg(rs1, regs) + sign_extend_imm13(insn));
205 static inline int floating_point_load_or_store_p(unsigned int insn)
207 return (insn >> 24) & 1;
210 static inline int ok_for_kernel(unsigned int insn)
212 return !floating_point_load_or_store_p(insn);
215 static void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn)
221 unsigned long address = compute_effective_address(regs, insn);
240 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn)
242 enum direction dir = decode_direction(insn);
243 int size = decode_access_size(insn);
245 if(!ok_for_kernel(insn) || dir == both) {
250 unsigned long addr = compute_effective_address(regs, insn);
256 err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f),
259 decode_signedness(insn));
263 err = do_int_store(((insn>>25)&0x1f), size,
271 kernel_mna_trap_fault(regs, insn);
277 asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn)
280 (void __user *)safe_compute_effective_address(regs, insn),