diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-09-15 17:47:26 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-09-15 17:47:26 +0000 |
commit | 9de868bf63da6e25619af0a1876200ca4cbd6375 (patch) | |
tree | e78da61f4dcb9ada0d228a8eeeba91489bbb5d97 /gas/config/tc-i386.c | |
parent | 44353522ecb0bfbddc5670741e5e8a3f7ae8d2e6 (diff) | |
download | gdb-9de868bf63da6e25619af0a1876200ca4cbd6375.zip gdb-9de868bf63da6e25619af0a1876200ca4cbd6375.tar.gz gdb-9de868bf63da6e25619af0a1876200ca4cbd6375.tar.bz2 |
2009-09-15 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (offset_in_range): Sign extend offset only
for 32bit address mode.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index bf756b8..e5ff75f 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1762,8 +1762,11 @@ offset_in_range (offsetT val, int size) default: abort (); } - /* If BFD64, sign extend val. */ - if (!use_rela_relocations) +#ifdef BFD64 + /* If BFD64, sign extend val for 32bit address mode. */ + if (flag_code != CODE_64BIT + || i.prefix[ADDR_PREFIX]) +#endif if ((val & ~(((addressT) 2 << 31) - 1)) == 0) val = (val ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31); |