Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/mips/mips/trap.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/mips/mips/trap.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.37.2.2 retrieving revision 1.37.2.3 diff -u -p -r1.37.2.2 -r1.37.2.3 --- src/sys/arch/mips/mips/trap.c 1996/09/09 20:39:56 1.37.2.2 +++ src/sys/arch/mips/mips/trap.c 1996/09/19 05:44:28 1.37.2.3 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.37.2.2 1996/09/09 20:39:56 thorpej Exp $ */ +/* $NetBSD: trap.c,v 1.37.2.3 1996/09/19 05:44:28 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1126,10 +1126,18 @@ trapDump(msg) } #endif +static unsigned GetBranchDest __P((InstFmt *InstPtr)); + /* - * forward declaration + * Compute destination of a branch instruction. + * XXX Compute desination of r4000 squashed branches? */ -static unsigned GetBranchDest __P((InstFmt *InstPtr)); +static unsigned +GetBranchDest(InstPtr) + InstFmt *InstPtr; +{ + return ((unsigned)InstPtr + 4 + ((short)InstPtr->IType.imm << 2)); +} /* * Return the resulting PC as if the branch was executed. @@ -1145,13 +1153,8 @@ MachEmulateBranch(regsPtr, instPC, fpcCS unsigned retAddr; int condition; -#ifdef notyet /* Compute desination of r4000 squashed branches */ -#define GetBranchDest(InstPtr, inst) \ - ((unsigned)InstPtr + 4 + ((short)inst.IType.imm << 2)) - inst.word = (instPC < MACH_CACHED_MEMORY_ADDR) ? fuiword((caddr_t)instPC) : *(unsigned*)instPC; -#endif #if 0 printf("regsPtr=%x PC=%x Inst=%x fpcCsr=%x\n", regsPtr, instPC, inst.word, fpcCSR); /* XXX */ @@ -1275,12 +1278,6 @@ MachEmulateBranch(regsPtr, instPC, fpcCS return (retAddr); } -static unsigned -GetBranchDest(InstPtr) - InstFmt *InstPtr; -{ - return ((unsigned)InstPtr + 4 + ((short)InstPtr->IType.imm << 2)); -} /* * This routine is called by procxmt() to single step one instruction.