This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix md_apply_fix3 cleanup fallout in tc-cris.c


First, I'd like to say thanks for doing the md_apply_fix3 cleanup, Nick.
Here's a fix I applied for some fallout with changes committed at that
time.  Gas tests fails all over the place on sparc-sun-solaris2.8 (a
big-endian target to check my spotting) when configured with
--enable-64-bit-bfd --target=cris-elf.  Some other tests fail there and
not on i686-pc-linux-gnu; I'll have to check more.

I also didn't see those cleanup patches on the binutils@ list.  Please
everybody, make sure that patches touching *anything* outside ports that
you're the *sole* maintainer of, or patches that might be of interest for
other maintainers, are sent to the mailing list.

	* config/tc-cris.c (md_apply_fix3): Cast value, not pointer, in
	val assignment.

Index: tc-cris.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-cris.c,v
retrieving revision 1.19
diff -p -c -r1.19 tc-cris.c
*** tc-cris.c	2001/11/15 21:28:54	1.19
--- tc-cris.c	2001/11/17 17:57:02
*************** md_apply_fix3 (fixP, valP, seg)
*** 2978,2984 ****
       valueT *valP;
       segT seg;
  {
!   long val = * (long *) valP;
    char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
  
    if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)
--- 2978,2987 ----
       valueT *valP;
       segT seg;
  {
!   /* This assignment truncates upper bits if valueT is 64 bits (as with
!      --enable-64-bit-bfd), which is fine here, though we cast to avoid
!      any compiler warnings.  */
!   long val = (long) *valP;
    char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
  
    if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]