diff options
author | Alan Modra <amodra@gmail.com> | 2019-12-11 21:06:17 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-12-11 21:14:19 +1030 |
commit | 09c78487342254de6a4498f8b3aa1f3f1d508898 (patch) | |
tree | bfca43ed669d166e6669061cb7f96501ed0af162 /bfd | |
parent | 569d50f1c611690d9ab4fa25eadf0ed565bf7e76 (diff) | |
download | gdb-09c78487342254de6a4498f8b3aa1f3f1d508898.zip gdb-09c78487342254de6a4498f8b3aa1f3f1d508898.tar.gz gdb-09c78487342254de6a4498f8b3aa1f3f1d508898.tar.bz2 |
Make bfd_get_8 return a bfd_vma like other bfd_get_* functions
And similarly for bfd_get_signed_8.
bfd/
* libbfd.c (bfd_get_8): Return a bfd_vma.
(bfd_get_signed_8): Return a bfd_signed_vma.
* bfd-in2.h: Regenerate.
binutils/
* od-xcoff.c (dump_dumpx_core): Adjust for bfd_h_get_8 change.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 4 | ||||
-rw-r--r-- | bfd/libbfd.c | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 65b8167..bdf33b6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2019-12-11 Alan Modra <amodra@gmail.com> + * libbfd.c (bfd_get_8): Return a bfd_vma. + (bfd_get_signed_8): Return a bfd_signed_vma. + * bfd-in2.h: Regenerate. + +2019-12-11 Alan Modra <amodra@gmail.com> + * xtensa-modules.c (Field_* functions): Don't mask using shifts. (Operand_soffsetx4_decode, Operand_simm4_decode), (Operand_simm8_decode, Operand_simm8x256_decode), diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 44902fc..6f3e41d 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -654,9 +654,9 @@ void bfd_set_filename (bfd *abfd, char *filename); #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(const unsigned char *) (ptr) & 0xff) + ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) diff --git a/bfd/libbfd.c b/bfd/libbfd.c index 6ff7172..3a3e523 100644 --- a/bfd/libbfd.c +++ b/bfd/libbfd.c @@ -449,9 +449,9 @@ DESCRIPTION .#define bfd_put_signed_8 \ . bfd_put_8 .#define bfd_get_8(abfd, ptr) \ -. (*(const unsigned char *) (ptr) & 0xff) +. ((bfd_vma) *(const unsigned char *) (ptr) & 0xff) .#define bfd_get_signed_8(abfd, ptr) \ -. (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) +. ((((bfd_signed_vma) *(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) . .#define bfd_put_16(abfd, val, ptr) \ . BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) |