Use fuword32() to fetch instructions, this will work on both 32 and 64 bit

compilation.
This commit is contained in:
Jayachandran C. 2010-07-31 19:11:38 +00:00
parent e285f763bd
commit dcd2709851

View File

@ -820,7 +820,7 @@ trap(struct trapframe *trapframe)
va += sizeof(int);
/* read break instruction */
instr = fuword((caddr_t)va);
instr = fuword32((caddr_t)va);
#if 0
printf("trap: %s (%d) breakpoint %x at %x: (adr %x ins %x)\n",
p->p_comm, p->p_pid, instr, trapframe->pc,
@ -869,7 +869,7 @@ trap(struct trapframe *trapframe)
if (DELAYBRANCH(trapframe->cause))
va += sizeof(int);
/* read break instruction */
instr = fuword((caddr_t)va);
instr = fuword32((caddr_t)va);
if (DELAYBRANCH(trapframe->cause)) { /* Check BD bit */
locr0->pc = MipsEmulateBranch(locr0, trapframe->pc, 0,