public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Clément Chigot" <chigot@adacore.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>,
	"H.J. Lu" <hjl.tools@gmail.com>,
	 "Jiang, Haochen" <haochen.jiang@intel.com>
Subject: Re: [PATCH v2 13/14] x86: convert testcases to use .insn
Date: Thu, 20 Apr 2023 11:09:45 +0200	[thread overview]
Message-ID: <CAJ307EhrAiyRFZNoAHjRDRQ5Sz=rHWG5tb8ceN5yy4EbtXdeXw@mail.gmail.com> (raw)
In-Reply-To: <15454510-ffe4-7afa-6151-f918983769a5@suse.com>

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.
But adding it resolves the issue:
  | $ ../as-new  --x32 --divide -J  -o tmpdir/x86-64-opcode.o
.../x86-64-opcode.s
  | $ ../../binutils/objdump  -drw tmpdir/x86-64-opcode.o
  |  4ea: f6 c9 01              test   $0x1,%cl
  |  4ed: 66 f7 c9 02 00        test   $0x2,%cx
  |  4f2: f7 c9 04 00 00 00    test   $0x4,%ecx
  |  4f8: 48 f7 c9 08 00 00 00 test   $0x8,%rcx
  |  4ff: c0 f0 02              shl    $0x2,%al
  |  502: c1 f0 01              shl    $0x1,%eax
  |  505: 48 c1 f0 01          shl    $0x1,%rax
  |  509: d0 f0                shl    %al
  |  50b: d1 f0                shl    %eax
  |  50d: 48 d1 f0              shl    %rax
  |  510: d2 f0                shl    %cl,%al
  |  512: d3 f0                shl    %cl,%eax
  |  514: 48 d3 f0              shl    %cl,%rax

  reply	other threads:[~2023-04-20  9:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 10:17 [PATCH v2 00/14] x86: new .insn directive Jan Beulich
2023-03-10 10:19 ` [PATCH v2 01/14] x86: introduce " Jan Beulich
2023-03-10 10:19 ` [PATCH v2 02/14] x86: parse VEX and alike specifiers for .insn Jan Beulich
2023-03-10 10:20 ` [PATCH v2 03/14] x86: parse special opcode modifiers " Jan Beulich
2023-03-10 10:21 ` [PATCH v2 04/14] x86: re-work build_modrm_byte()'s register assignment Jan Beulich
2023-03-10 10:21 ` [PATCH v2 05/14] x86: VexVVVV is now merely a boolean Jan Beulich
2023-03-10 10:22 ` [PATCH v2 06/14] x86: drop "shimm" special case template expansions Jan Beulich
2023-03-10 10:22 ` [PATCH v2 07/14] x86/AT&T: restrict recognition of the "absolute branch" prefix character Jan Beulich
2023-03-10 10:23 ` [PATCH v2 08/14] x86: process instruction operands for .insn Jan Beulich
2023-03-10 10:24 ` [PATCH v2 09/14] x86: handle EVEX Disp8 " Jan Beulich
2023-03-10 10:24 ` [PATCH v2 10/14] x86: allow for multiple immediates in output_disp() Jan Beulich
2023-03-10 10:25 ` [PATCH v2 11/14] x86: handle immediate operands for .insn Jan Beulich
2023-03-10 10:26 ` [PATCH v2 12/14] x86: document .insn Jan Beulich
2023-03-10 10:26 ` [PATCH v2 13/14] x86: convert testcases to use .insn Jan Beulich
2023-04-20  8:56   ` Clément Chigot
2023-04-20  9:01     ` Jan Beulich
2023-04-20  9:09       ` Clément Chigot [this message]
2023-04-20  9:19         ` Jan Beulich
2023-04-20  9:22           ` Clément Chigot
2023-03-10 10:27 ` [PATCH RFC v2 14/14] x86: .insn example - VEX-encoded instructions of original Xeon Phi Jan Beulich
2023-03-24  9:51 ` [PATCH v2 00/14] x86: new .insn directive Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ307EhrAiyRFZNoAHjRDRQ5Sz=rHWG5tb8ceN5yy4EbtXdeXw@mail.gmail.com' \
    --to=chigot@adacore.com \
    --cc=binutils@sourceware.org \
    --cc=haochen.jiang@intel.com \
    --cc=hjl.tools@gmail.com \
    --cc=jbeulich@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).