This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch]: fix arm-eabi build failure on non-C99 systems
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Tristan Gingold <gingold at adacore dot com>, "binutils at sourceware dot org Development" <binutils at sourceware dot org>
- Date: Tue, 16 Sep 2014 19:12:05 +0100
- Subject: Re: [Patch]: fix arm-eabi build failure on non-C99 systems
- Authentication-results: sourceware.org; auth=none
- References: <20E8B5FD-4404-4A60-BFA8-0279E164283A at adacore dot com>
On 16/09/14 13:21, Tristan Gingold wrote:
> Hello,
>
> gas/config/tc-arm.c uses int64_t, which isn't available on non C99 compliant systems (like mingw32).
> As bfd provides typedef for these types, better to use them.
>
> No regression for arm-eabi.
> Ok to commit ?
>
OK.
You might also want to look at tc-aarch64.c and tc-nds32.c, both of
which use int64_t. Consider the aarch64 changes pre-approved.
R.
> Tristan.
>
> gas/
> 2014-09-16 Tristan Gingold <gingold@adacore.com>
>
> * config/tc-arm.c (move_or_literal_pool, add_to_lit_pool): Use
> bfd_int64_t instead of int64_t.
>
> index cd3db2b..5077f87 100644
> --- a/gas/config/tc-arm.c
> +++ b/gas/config/tc-arm.c
> @@ -3200,7 +3200,7 @@ add_to_lit_pool (unsigned int nbytes)
> imm1 = inst.operands[1].imm;
> imm2 = (inst.operands[1].regisimm ? inst.operands[1].reg
> : inst.reloc.exp.X_unsigned ? 0
> - : ((int64_t) inst.operands[1].imm) >> 32);
> + : ((bfd_int64_t) inst.operands[1].imm) >> 32);
> if (target_big_endian)
> {
> imm1 = imm2;
> @@ -7812,7 +7812,7 @@ move_or_literal_pool (int i, enum lit_type t, bfd_boolean mode_3)
> ? inst.operands[1].reg
> : inst.reloc.exp.X_unsigned
> ? 0
> - : ((int64_t)((int) immlo)) >> 32;
> + : ((bfd_int64_t)((int) immlo)) >> 32;
> int cmode = neon_cmode_for_move_imm (immlo, immhi, FALSE, &immbits,
> &op, 64, NT_invtype);
>
>
>