------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  
2005-11-06 03:57 -------
Subject: Re:  Wrong output for 64-bit difference of labels

> ------- Additional Comments From amodra at bigpond dot net dot au  2005-11-06 
> 03:12 -------
> I'd be inclined to use
> 
>  if (fixP->fx_size > 4)

I was thinking that other sizes might in theory be used for expressions.
For example, GCC uses .word for label differences in switch tables.

>    {
>      /* Handle constant output. */
>      number_to_chars_bigendian (fixpos, *valP, fixP->fx_size);
>      return;
>    }
> 
> After all, if the fixup is for a dword, none of the insn handling code in
> md_apply_fix is appropriate.  In fact, it would be even better to avoid 
> anything
> in md_apply_fix that assumes a fixup is for an insn, ie. bfd_hppa_insn2fmt
> shouldn't be in md_apply_fix at all.  Instead, pass the insn fmt (if it is an
> insn) in via fx_r_format.

I agree.  It appears that there aren't any conflicts between data and
insn format values.  It also appears that insn formats are set by pa_ip,
so it shouldn't be necessary to call bfd_hppa_insn2fmt.

I'm amazed that data fixups work at all on hppa64.

Dave


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=1804

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to