[PATCH v2 13/14] x86: convert testcases to use .insn

Clément Chigot chigot@adacore.com
Thu Apr 20 09:22:35 GMT 2023


On Thu, Apr 20, 2023 at 11:19 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 20.04.2023 11:09, Clément Chigot wrote:
> > On Thu, Apr 20, 2023 at 11:01 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> On 20.04.2023 10:56, Clément Chigot wrote:
> >>>> --- a/gas/testsuite/gas/i386/x86-64-opcode.s
> >>>> +++ b/gas/testsuite/gas/i386/x86-64-opcode.s
> >>>> @@ -458,16 +458,16 @@
> >>>>         int3
> >>>>         int    $0x90
> >>>>
> >>>> -       .byte 0xf6, 0xc9, 0x01
> >>>> -       .byte 0x66, 0xf7, 0xc9, 0x02, 0x00
> >>>> -       .byte 0xf7, 0xc9, 0x04, 0x00, 0x00, 0x00
> >>>> -       .byte 0x48, 0xf7, 0xc9, 0x08, 0x00, 0x00, 0x00
> >>>> -       .byte 0xc0, 0xf0, 0x02
> >>>> -       .byte 0xc1, 0xf0, 0x01
> >>>> -       .byte 0x48, 0xc1, 0xf0, 0x01
> >>>> -       .byte 0xd0, 0xf0
> >>>> -       .byte 0xd1, 0xf0
> >>>> -       .byte 0x48, 0xd1, 0xf0
> >>>> -       .byte 0xd2, 0xf0
> >>>> -       .byte 0xd3, 0xf0
> >>>> -       .byte 0x48, 0xd3, 0xf0
> >>>> +       .insn 0xf6/1, $1, %cl
> >>>> +       .insn 0xf7/1, $2{:u16}, %cx
> >>>> +       .insn 0xf7/1, $4{:u32}, %ecx
> >>>> +       .insn 0xf7/1, $8{:s32}, %rcx
> >>>> +       .insn 0xc0/6, $2, %al
> >>>> +       .insn 0xc1/6, $1, %eax
> >>>> +       .insn 0xc1/6, $1, %rax
> >>>> +       .insn 0xd0/6, %al
> >>>> +       .insn 0xd1/6, %eax
> >>>> +       .insn 0xd1/6, %rax
> >>>> +       .insn 0xd2/6, %al
> >>>> +       .insn 0xd3/6, %eax
> >>>> +       .insn 0xd3/6, %rax
> >>>
> >>> The test is failing on my side when building with --target=x86_64-elf.
> >>> I'm not sure what's wrong yet but gas seems to ignore everything after "/":
> >>>   | $ ../../binutils/objdump  -drw tmpdir/x86-64-opcode.o
> >>>   |  ...
> >>>   |  4ea: f6 f7                div    %bh
> >>>   |  4ec: f7 f7                div    %edi
> >>>   |  4ee: c0 c1 c1              rol    $0xc1,%cl
> >>>   |  4f1: d0 d1                rcl    %cl
> >>>   |  4f3: d1 d2                rcl    %edx
> >>>   |  4f5: d3 d3                rcl    %cl,%ebx
> >>
> >> Right, and I think I did address all of these issues (there were more than
> >> just here) in what was committed (and in fact already in v2), by passing
> >> --divide to as. Can you confirm --divide does not take the intended effect
> >> in that case?
> >
> > --divide is not passed to x86_64-opcode test.
>
> Well, you continue to supply ambiguous information up to here; it only
> becomes clear ...
>
> > But adding it resolves the issue:
> >   | $ ../as-new  --x32 --divide -J  -o tmpdir/x86-64-opcode.o
>
> ... here that what you mean is the ilp32/x86-64-opcode test (which is a
> clone of the x86-64-opcode one). So yes, I did overlook the need to add
> --divide there as well.

Oh yeah my bad. This is indeed ilp32 version of the test:
 FAIL: x86-64 (ILP32) opcode

Sorry about the confusion by not stating it earlier :(


More information about the Binutils mailing list