diff options
author | Alan Modra <amodra@gmail.com> | 2000-04-17 03:18:36 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-04-17 03:18:36 +0000 |
commit | ba2adb9390cde6fb0df49f4ef02ed4738e01bdad (patch) | |
tree | 1be526030fb2f5d6066586cfb15fd2bdd3243321 /gas/config/tc-i386.c | |
parent | bc1821e659134bd92db6c633bb853b4582f982a2 (diff) | |
download | gdb-ba2adb9390cde6fb0df49f4ef02ed4738e01bdad.zip gdb-ba2adb9390cde6fb0df49f4ef02ed4738e01bdad.tar.gz gdb-ba2adb9390cde6fb0df49f4ef02ed4738e01bdad.tar.bz2 |
64 bit bfd fix.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index d863ecd..638bbd0 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -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]; |