[committed 2/2] opcodes/arc: Implement style support in the disassembler

Claudiu Zissulescu Ianculescu claziss@gmail.com
Wed Jul 20 13:51:59 GMT 2022


Ahhh, sorry for that.

Thanks for spotting that!
Claudiu

On Wed, Jul 20, 2022 at 6:20 AM Alan Modra <amodra@gmail.com> wrote:

> On Mon, Jul 18, 2022 at 02:25:01PM +0300, Claudiu Zissulescu via Binutils
> wrote:
> > Update the ARC disassembler to supply style information to the
> > disassembler output. The output formatting remains unchanged.
>
> I see lots of fails in the arc gas teststuite.  Please do run the
> testsuite.
>
> regexp "^0x[0-9a-f]+ 21c1 006b                  adc.lt  r1,r1,0x1$"
> line   "0x000000c4 21c1 006b            adc.lt  r1,r1,1"
>
> It's this one:
> > -             (*info->fprintf_func) (info->stream, "%#x", value);
> > +             (*info->fprintf_styled_func) (info->stream,
> dis_style_immediate,
> > +                                           "%" PRIx32, value);
>
> PRIx32 is wrong anyway, when "value" is an int.  Fixed.
>
> diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c
> index dbaa96178a8..3490bad4f66 100644
> --- a/opcodes/arc-dis.c
> +++ b/opcodes/arc-dis.c
> @@ -1408,7 +1408,7 @@ print_insn_arc (bfd_vma memaddr,
>                                               "%s", rname);
>               else
>                 (*info->fprintf_styled_func) (info->stream,
> dis_style_immediate,
> -                                             "%" PRIx32, value);
> +                                             "%#x", value);
>             }
>         }
>
>
> --
> Alan Modra
> Australia Development Lab, IBM
>


More information about the Binutils mailing list