Lines Matching refs:instruction

86 static int handle_unaligned_ins(insn_size_t instruction, struct pt_regs *regs,  in handle_unaligned_ins()  argument
94 index = (instruction>>8)&15; /* 0x0F00 */ in handle_unaligned_ins()
97 index = (instruction>>4)&15; /* 0x00F0 */ in handle_unaligned_ins()
100 count = 1<<(instruction&3); in handle_unaligned_ins()
110 switch (instruction>>12) { in handle_unaligned_ins()
112 if (instruction & 8) { in handle_unaligned_ins()
144 dstu += (instruction&0x000F)<<2; in handle_unaligned_ins()
152 if (instruction & 4) in handle_unaligned_ins()
166 srcu += (instruction & 0x000F) << 2; in handle_unaligned_ins()
177 if (instruction & 4) in handle_unaligned_ins()
192 switch ((instruction&0xFF00)>>8) { in handle_unaligned_ins()
199 dstu += (instruction & 0x000F) << 1; in handle_unaligned_ins()
208 srcu += (instruction & 0x000F) << 1; in handle_unaligned_ins()
226 srcu += (instruction & 0x00FF) << 1; in handle_unaligned_ins()
243 srcu += (instruction & 0x00FF) << 2; in handle_unaligned_ins()
270 insn_size_t instruction; in handle_delayslot() local
274 if (copy_from_user(&instruction, addr, sizeof(instruction))) { in handle_delayslot()
284 return handle_unaligned_ins(instruction, regs, ma); in handle_delayslot()
303 int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, in handle_unaligned_access() argument
313 if (instruction_size(instruction) != 2) in handle_unaligned_access()
316 index = (instruction>>8)&15; /* 0x0F00 */ in handle_unaligned_access()
327 unaligned_fixups_notify(current, instruction, regs); in handle_unaligned_access()
333 switch (instruction&0xF000) { in handle_unaligned_access()
335 if (instruction==0x000B) { in handle_unaligned_access()
337 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
341 else if ((instruction&0x00FF)==0x0023) { in handle_unaligned_access()
343 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
347 else if ((instruction&0x00FF)==0x0003) { in handle_unaligned_access()
349 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
368 if ((instruction&0x00FF)==0x002B) { in handle_unaligned_access()
370 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
374 else if ((instruction&0x00FF)==0x000B) { in handle_unaligned_access()
376 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
395 switch (instruction&0x0F00) { in handle_unaligned_access()
404 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
411 regs->pc += SH_PC_8BIT_OFFSET(instruction); in handle_unaligned_access()
418 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
425 regs->pc += SH_PC_8BIT_OFFSET(instruction); in handle_unaligned_access()
435 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
437 regs->pc += SH_PC_12BIT_OFFSET(instruction); in handle_unaligned_access()
441 ret = handle_delayslot(regs, instruction, ma); in handle_unaligned_access()
444 regs->pc += SH_PC_12BIT_OFFSET(instruction); in handle_unaligned_access()
455 ret = handle_unaligned_ins(instruction, regs, ma); in handle_unaligned_access()
457 regs->pc += instruction_size(instruction); in handle_unaligned_access()
479 insn_size_t instruction; in do_address_error() local
497 if (copy_from_user(&instruction, (insn_size_t *)(regs->pc & ~1), in do_address_error()
498 sizeof(instruction))) { in do_address_error()
505 unaligned_fixups_notify(current, instruction, regs); in do_address_error()
514 regs->pc += instruction_size(instruction); in do_address_error()
526 tmp = handle_unaligned_access(instruction, regs, in do_address_error()
550 if (copy_from_user(&instruction, (void __user *)(regs->pc), in do_address_error()
551 sizeof(instruction))) { in do_address_error()
559 unaligned_fixups_notify(current, instruction, regs); in do_address_error()
561 handle_unaligned_access(instruction, regs, &user_mem_access, in do_address_error()