diff options
author | Alan Modra <amodra@gmail.com> | 2004-03-15 14:21:43 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2004-03-15 14:21:43 +0000 |
commit | 8ce8c090f3e7509af869a05090bc5b0656c487d8 (patch) | |
tree | edb56dd469bb8c892ab94115ea54ffec36599a9c /bfd/libbfd.c | |
parent | 7bfeee7be23ed74042abf81e7e3b64eb05f8fb62 (diff) | |
download | gdb-8ce8c090f3e7509af869a05090bc5b0656c487d8.zip gdb-8ce8c090f3e7509af869a05090bc5b0656c487d8.tar.gz gdb-8ce8c090f3e7509af869a05090bc5b0656c487d8.tar.bz2 |
* bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
(BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
(bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
(bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
(bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
* configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
(BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
when using long.
* libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
(bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
(bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
(bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
(bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
* dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
(read_8_bytes, read_indirect_string, read_address): Likewise.
(read_abbrevs, parse_comp_unit): Likewise.
* targets.c (struct bfd_target): Likewise.
* aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
* hppabsd-core.c: Likewise. Formatting.
* hpux-core.c: Likewise.
* irix-core.c: Likewise.
* netbsd-core.c: Likewise.
* osf-core.c: Likewise.
* ptrace-core.c: Likewise.
* sco5-core.c: Likewise.
* trad-core.c: Likewise.
* configure: Regenerate.
* bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/libbfd.c')
-rw-r--r-- | bfd/libbfd.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/bfd/libbfd.c b/bfd/libbfd.c index f17101e..be090e9 100644 --- a/bfd/libbfd.c +++ b/bfd/libbfd.c @@ -391,9 +391,9 @@ DESCRIPTION /* Sign extension to bfd_signed_vma. */ #define COERCE16(x) (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000) #define COERCE32(x) (((bfd_signed_vma) (x) ^ 0x80000000) - 0x80000000) -#define EIGHT_GAZILLION ((BFD_HOST_64_BIT) 1 << 63) +#define EIGHT_GAZILLION ((bfd_int64_t) 1 << 63) #define COERCE64(x) \ - (((bfd_signed_vma) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION) + (((bfd_int64_t) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION) bfd_vma bfd_getb16 (const void *p) @@ -491,12 +491,12 @@ bfd_getl_signed_32 (const void *p) return COERCE32 (v); } -bfd_vma +bfd_uint64_t bfd_getb64 (const void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 +#ifdef BFD_HOST_64_BIT const bfd_byte *addr = p; - bfd_vma v; + bfd_uint64_t v; v = addr[0]; v <<= 8; v |= addr[1]; v <<= 8; @@ -514,12 +514,12 @@ bfd_getb64 (const void *p ATTRIBUTE_UNUSED) #endif } -bfd_vma +bfd_uint64_t bfd_getl64 (const void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 +#ifdef BFD_HOST_64_BIT const bfd_byte *addr = p; - bfd_vma v; + bfd_uint64_t v; v = addr[7]; v <<= 8; v |= addr[6]; v <<= 8; @@ -538,12 +538,12 @@ bfd_getl64 (const void *p ATTRIBUTE_UNUSED) } -bfd_signed_vma +bfd_int64_t bfd_getb_signed_64 (const void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 +#ifdef BFD_HOST_64_BIT const bfd_byte *addr = p; - bfd_vma v; + bfd_uint64_t v; v = addr[0]; v <<= 8; v |= addr[1]; v <<= 8; @@ -561,12 +561,12 @@ bfd_getb_signed_64 (const void *p ATTRIBUTE_UNUSED) #endif } -bfd_signed_vma +bfd_int64_t bfd_getl_signed_64 (const void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 +#ifdef BFD_HOST_64_BIT const bfd_byte *addr = p; - bfd_vma v; + bfd_uint64_t v; v = addr[7]; v <<= 8; v |= addr[6]; v <<= 8; @@ -605,9 +605,9 @@ bfd_putl32 (bfd_vma data, void *p) } void -bfd_putb64 (bfd_vma data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) +bfd_putb64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 +#ifdef BFD_HOST_64_BIT bfd_byte *addr = p; addr[0] = (data >> (7*8)) & 0xff; addr[1] = (data >> (6*8)) & 0xff; @@ -623,9 +623,9 @@ bfd_putb64 (bfd_vma data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) } void -bfd_putl64 (bfd_vma data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) +bfd_putl64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 +#ifdef BFD_HOST_64_BIT bfd_byte *addr = p; addr[7] = (data >> (7*8)) & 0xff; addr[6] = (data >> (6*8)) & 0xff; @@ -641,7 +641,7 @@ bfd_putl64 (bfd_vma data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) } void -bfd_put_bits (bfd_vma data, void *p, int bits, bfd_boolean big_p) +bfd_put_bits (bfd_uint64_t data, void *p, int bits, bfd_boolean big_p) { bfd_byte *addr = p; int i; @@ -660,11 +660,11 @@ bfd_put_bits (bfd_vma data, void *p, int bits, bfd_boolean big_p) } } -bfd_vma +bfd_uint64_t bfd_get_bits (const void *p, int bits, bfd_boolean big_p) { const bfd_byte *addr = p; - bfd_vma data; + bfd_uint64_t data; int i; int bytes; |