|
From: <sv...@va...> - 2005-06-24 11:25:52
|
Author: cerion
Date: 2005-06-24 12:25:46 +0100 (Fri, 24 Jun 2005)
New Revision: 1223
Log:
fixed sign-extension bug for branches
Modified:
trunk/priv/guest-ppc32/toIR.c
Modified: trunk/priv/guest-ppc32/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-ppc32/toIR.c 2005-06-23 22:38:45 UTC (rev 1222)
+++ trunk/priv/guest-ppc32/toIR.c 2005-06-24 11:25:46 UTC (rev 1223)
@@ -477,9 +477,9 @@
return (UInt)((((Int)x) << 16) >> 16);
}
=20
-static UInt extend_s_24to32 ( UInt x )
+static UInt extend_s_26to32 ( UInt x )
{
- return (UInt)((((Int)x) << 8) >> 8);
+ return (UInt)((((Int)x) << 6) >> 6);
}
=20
/* Do a big-endian load of a 32-bit word, regardless of the endianness
@@ -2441,7 +2441,7 @@
UChar flag_LK =3D toUChar((theInstr >> 0) & 1); /* theInstr[0=
] */
=20
Int exts_BD =3D (Int)extend_s_16to32(BD << 2);
- Int exts_LI =3D (Int)extend_s_24to32(LI_24 << 2);
+ Int exts_LI =3D (Int)extend_s_26to32(LI_24 << 2);
=20
Addr32 nia =3D 0;
=20
|