Lines Matching refs:instruction

88 static int handle_unaligned_ins(insn_size_t instruction, struct pt_regs *regs,  in handle_unaligned_ins()  argument
96 index = (instruction>>8)&15; /* 0x0F00 */ in handle_unaligned_ins()
99 index = (instruction>>4)&15; /* 0x00F0 */ in handle_unaligned_ins()
102 count = 1<<(instruction&3); in handle_unaligned_ins()
112 switch (instruction>>12) { in handle_unaligned_ins()
114 if (instruction & 8) { in handle_unaligned_ins()
146 dstu += (instruction&0x000F)<<2; in handle_unaligned_ins()
154 if (instruction & 4) in handle_unaligned_ins()
168 srcu += (instruction & 0x000F) << 2; in handle_unaligned_ins()
179 if (instruction & 4) in handle_unaligned_ins()
194 switch ((instruction&0xFF00)>>8) { in handle_unaligned_ins()
201 dstu += (instruction & 0x000F) << 1; in handle_unaligned_ins()
210 srcu += (instruction & 0x000F) << 1; in handle_unaligned_ins()
228 srcu += (instruction & 0x00FF) << 1; in handle_unaligned_ins()
245 srcu += (instruction & 0x00FF) << 2; in handle_unaligned_ins()
272 insn_size_t instruction; in handle_delayslot() local
276 if (copy_from_user(&instruction, addr, sizeof(instruction))) { in handle_delayslot()
286 return handle_unaligned_ins(instruction, regs, ma); in handle_delayslot()
305 int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, in handle_unaligned_access() argument
315 if (instruction_size(instruction) != 2) in handle_unaligned_access()
318 index = (instruction>>8)&15; /* 0x0F00 */ in handle_unaligned_access()
329 unaligned_fixups_notify(current, instruction, regs); in handle_unaligned_access()
335 switch (instruction&0xF000) { in handle_unaligned_access()
337 if (instruction==0x000B) { in handle_unaligned_access()
339 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
343 else if ((instruction&0x00FF)==0x0023) { in handle_unaligned_access()
345 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
349 else if ((instruction&0x00FF)==0x0003) { in handle_unaligned_access()
351 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
370 if ((instruction&0x00FF)==0x002B) { in handle_unaligned_access()
372 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
376 else if ((instruction&0x00FF)==0x000B) { in handle_unaligned_access()
378 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
397 switch (instruction&0x0F00) { in handle_unaligned_access()
406 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
413 regs->pc += SH_PC_8BIT_OFFSET(instruction); in handle_unaligned_access()
420 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
427 regs->pc += SH_PC_8BIT_OFFSET(instruction); in handle_unaligned_access()
437 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
439 regs->pc += SH_PC_12BIT_OFFSET(instruction); in handle_unaligned_access()
443 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
446 regs->pc += SH_PC_12BIT_OFFSET(instruction); in handle_unaligned_access()
457 ret = handle_unaligned_ins(instruction, regs, ma); in handle_unaligned_access()
459 regs->pc += instruction_size(instruction); in handle_unaligned_access()
480 insn_size_t instruction; in do_address_error() local
498 if (copy_from_user(&instruction, (insn_size_t *)(regs->pc & ~1), in do_address_error()
499 sizeof(instruction))) { in do_address_error()
506 unaligned_fixups_notify(current, instruction, regs); in do_address_error()
515 regs->pc += instruction_size(instruction); in do_address_error()
527 tmp = handle_unaligned_access(instruction, regs, in do_address_error()
547 if (copy_from_user(&instruction, (void __user *)(regs->pc), in do_address_error()
548 sizeof(instruction))) { in do_address_error()
556 unaligned_fixups_notify(current, instruction, regs); in do_address_error()
558 handle_unaligned_access(instruction, regs, &user_mem_access, in do_address_error()