Date: Sat, 9 Jan 2010 02:17:14 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r201880 - projects/mips/sys/mips/mips Message-ID: <201001090217.o092HEt7063179@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Sat Jan 9 02:17:14 2010 New Revision: 201880 URL: http://svn.freebsd.org/changeset/base/201880 Log: Compute the target of the jump in the 'J' and 'JAL' instructions correctly. The 256MB segment is formed by taking the top 4 bits of the address of the instruction in the "branch delay" slot as opposed to the 'J' or 'JAL' instruction itself. Approved by: imp (mentor) Modified: projects/mips/sys/mips/mips/trap.c Modified: projects/mips/sys/mips/mips/trap.c ============================================================================== --- projects/mips/sys/mips/mips/trap.c Sat Jan 9 01:46:38 2010 (r201879) +++ projects/mips/sys/mips/mips/trap.c Sat Jan 9 02:17:14 2010 (r201880) @@ -1091,7 +1091,7 @@ MipsEmulateBranch(struct trapframe *fram case OP_J: case OP_JAL: retAddr = (inst.JType.target << 2) | - ((unsigned)instPC & 0xF0000000); + ((unsigned)(instPC + 4) & 0xF0000000); break; case OP_BEQ:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001090217.o092HEt7063179>