(read_sleb128): Fix handling of large values
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74429
138bc75d-0d04-0410-961f-
82ee72b054a4
+2003-12-08 Jan Hubicka <jh@suse.cz>
+
+ * unwind-pe.h (read_uleb128): Fix handling of large values
+ (read_sleb128): Fix handling of large values
+
2003-12-08 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/10060
do
{
byte = *p++;
- result |= (byte & 0x7f) << shift;
+ result |= ((_Unwind_Word)byte & 0x7f) << shift;
shift += 7;
}
while (byte & 0x80);
do
{
byte = *p++;
- result |= (byte & 0x7f) << shift;
+ result |= ((_Unwind_Word)byte & 0x7f) << shift;
shift += 7;
}
while (byte & 0x80);
/* Sign-extend a negative value. */
if (shift < 8 * sizeof(result) && (byte & 0x40) != 0)
- result |= -(1L << shift);
+ result |= -(((_Unwind_Word)1L) << shift);
*val = (_Unwind_Sword) result;
return p;