mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-28 14:30:48 +00:00
64 bit bfd fix.
This commit is contained in:
parent
bc1821e659
commit
ba2adb9390
@ -1,3 +1,8 @@
|
||||
2000-04-17 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* config/tc-i386.c (offset_in_range): Sign extend val so BFD64
|
||||
doesn't give spurious errors.
|
||||
|
||||
2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
|
||||
|
||||
* as.h (SEEK_SET): Define if undefined.
|
||||
|
@ -465,15 +465,20 @@ offset_in_range (val, size)
|
||||
offsetT val;
|
||||
int size;
|
||||
{
|
||||
offsetT mask;
|
||||
bfd_vma mask;
|
||||
|
||||
switch (size)
|
||||
{
|
||||
case 1: mask = ((offsetT) 1 << 8) - 1; break;
|
||||
case 2: mask = ((offsetT) 1 << 16) - 1; break;
|
||||
case 4: mask = ((offsetT) 1 << 32) - 1; break;
|
||||
case 1: mask = ((bfd_vma) 1 << 8) - 1; break;
|
||||
case 2: mask = ((bfd_vma) 1 << 16) - 1; break;
|
||||
case 4: mask = ((bfd_vma) 1 << 32) - 1; break;
|
||||
default: abort();
|
||||
}
|
||||
|
||||
/* If BFD64, sign extend val. */
|
||||
if ((val & ~ (((bfd_vma) 1 << 32) - 1)) == 0)
|
||||
val = (val ^ ((bfd_vma) 1 << 31)) - ((bfd_vma) 1 << 31);
|
||||
|
||||
if ((val & ~ mask) != 0 && (val & ~ mask) != ~ mask)
|
||||
{
|
||||
char buf1[40], buf2[40];
|
||||
|
Loading…
Reference in New Issue
Block a user