This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Fix some of the ARM GAS failures
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, binutils at sourceware dot org
- Date: Wed, 25 May 2005 09:38:34 +0100
- Subject: Re: Fix some of the ARM GAS failures
- References: <1116965825.7031.16.camel@localhost.localdomain>
On Tue, 2005-05-24 at 21:17, Zack Weinberg wrote:
> This patch should improve the ARM-GAS situation somewhat. md_apply_fix3
> needs to truncate the relocation to 32 signed bits manually; if the host
> is 64-bit, fx_addnumber and fx_offset are 64-bit, and may generate
> spurious overflows. Also, we need a double cast on both sides of the
> hack to pass an integer around in tc_fix_data.
>
AFAICT tc_fix_data is a private type to the ARM-specific parts of the
assembler. Since storing the thumbness is the only use, and the type of
tc_fix_data is defined in tc-arm.h (TC_FIX_TYPE), it would make much
more sense to just change TC_FIX_TYPE to 'int' and get rid of all those
nasty casts.
Otherwise OK.
R.
> zw
> * config/tc-arm.c (fix_new_arm): Cast thumb_mode to size_t
> before casting it to PTR.
> (md_apply_fix3): Truncate value, *valP, fixP->fx_addnumber,
> and fixP->fx_offset to 32 signed bits.