]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
correction to branch instr for ppc hack
authorCerion Armour-Brown <cerion@valgrind.org>
Thu, 17 Feb 2005 16:14:16 +0000 (16:14 +0000)
committerCerion Armour-Brown <cerion@valgrind.org>
Thu, 17 Feb 2005 16:14:16 +0000 (16:14 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@925

VEX/switchback/switchback.c

index 98e1336ceeee8589bdffdd089a2e8ddf7a7547c1..0ef08d8d80037938f349f96b0fc785db8decdb23 100644 (file)
@@ -280,7 +280,7 @@ void switchback ( void )
    assert(p[0] == 0 /* whatever the encoding for nop is */);
 
    /* branch to diff */
-   p[0] = ((18<<26) | ((diff >> 2) & 0xFFFFFF) | (0<<1) | (0<<0));
+   p[0] = ((18<<26) | (diff & 0x3FFFFFC) | (0<<1) | (0<<0));
 
    flush_cache( &p[0], sizeof(UInt) );