From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 627363858C83 for ; Thu, 20 Apr 2023 09:09:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 627363858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1a667067275so7759315ad.1 for ; Thu, 20 Apr 2023 02:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1681981796; x=1684573796; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qhdPyj4tKWpbLXJJr/IpeusNH7Saww8BBklZYjEL5b0=; b=aoPHTNS+c+6PgGv1yTgrElg0NSNWzcoeRixaGSHxyVRU72ooYRcWaLuqXTvQfVOWck XFRxrpapmuEOBYMHvVpsx7KqyxDoImw+q9q/oiY7cgC2iVJgkb92v/G+y20Ox7QW1j7e maEZfHj9xRiDRW1VD269bKQM61/aw3bl+9WEqKHXZaWYDPUVm+GwCWSOAABQoN2nJ2ZF kSNiJriNhXwN4raaqtM0PWRUxCcMY1j95cxFOJpSfF45WxQVHJ6DrMjt4AOUrUyGVRz6 FVr4ICvrRB/BsbbqmhsI6DyBdzgiCsoIzZKuvqjUZdVvQU4cKu0vc/K2NZcLQFUq7xLd FQag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681981796; x=1684573796; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qhdPyj4tKWpbLXJJr/IpeusNH7Saww8BBklZYjEL5b0=; b=NVRGpyekjWVtoYTQbfNlmIWhUn9hZ2dMEBq+09hLlqwKGNKXGMQsV7J+lLppCBbDiY clJRxBw/agngl6X/vAJwibktCVVzKMVLFue/K4BO6fM2oVYLdHdqJr0dQyoo3xelJ3b7 Hc7NQwDKXgrr0WvNVU2cTp/TQXlNMI6INN6kDTEi8sKdHtY76HyK4Isfk+JDt35xUqRk KlpN9rsw2/jXI8HDstYvQX07u0swLZgWeUrkVjtL6WGDOr3nEynnVSeOykW2J//HHcTL 3L0ugudyiXTSvVEHUcVqp88WWrJ5WO7jPu+J1QplUzQSXxS58mLITy9RiNn8ZEnjc2WO NTzQ== X-Gm-Message-State: AAQBX9fF681AjRPV0+UyW7Uz4qySa1B18mU9FfIzwCnFoe2lyXpdxw7U u1PReY5VmV9fea4UYUyskUtEnxjupMKMC8AiAE11YQ== X-Google-Smtp-Source: AKy350aCNJZJZRTZQ17cSHp6PZLk/xHfnYp5yv2RDv8WJIIsFHeqUse9up5jhkwz/2aG2bXDMtlcUTgfs+P6DI99cy0= X-Received: by 2002:a17:902:f68b:b0:1a6:48e6:ea7c with SMTP id l11-20020a170902f68b00b001a648e6ea7cmr1142526plg.6.1681981796417; Thu, 20 Apr 2023 02:09:56 -0700 (PDT) MIME-Version: 1.0 References: <2b0ca132-9d85-86a8-8b91-828fa66881b8@suse.com> <15454510-ffe4-7afa-6151-f918983769a5@suse.com> In-Reply-To: <15454510-ffe4-7afa-6151-f918983769a5@suse.com> From: =?UTF-8?Q?Cl=C3=A9ment_Chigot?= Date: Thu, 20 Apr 2023 11:09:45 +0200 Message-ID: Subject: Re: [PATCH v2 13/14] x86: convert testcases to use .insn To: Jan Beulich Cc: Binutils , "H.J. Lu" , "Jiang, Haochen" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Apr 20, 2023 at 11:01=E2=80=AFAM Jan Beulich wr= ote: > > On 20.04.2023 10:56, Cl=C3=A9ment 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=3Dx86_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 tha= n > 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 effec= t > 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