This is the mail archive of the binutils@sourceware.org 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]

Re: m68hc11 - bug found with MOVW oprx16_xysp, oprx16_xysp1


Hi!

On Wed, Nov 7, 2012 at 1:18 AM, James Murray <jsm@jsm-net.demon.co.uk> wrote:
> I believe it to be caused by this section of code in
> gas/config/tc-m68hc11.c:2225
>
>               if ((mode & M6812_OP_IDX) && (current_architecture & cpu9s12x))
>                 {
>                   /* Must treat as a 16bit relocate as size of final result is
> unknown.  */
>
>                   byte <<= 3;
>                   byte |= 0xe2;
>                   number_to_chars_bigendian (f, byte, 1);
>                   fix_new (frag_now, f - frag_now->fr_literal, 2,
>                            sym, off, 0, BFD_RELOC_M68HC12_16B);
>                   f = frag_more (2);
>                   return 1;
>                 }

Yes, there is a problem here.  frag_more(2) must be called before fix_new().

Regards,

Stephane


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