[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GAS illegally encodes FMA4.
From: |
Quentin Neill |
Subject: |
Re: GAS illegally encodes FMA4. |
Date: |
Wed, 3 Nov 2010 14:41:38 -0500 |
On 18 Sep 08:02, NEGISHI, Kiyoshi <negishi <at> usa.net> wrote:
> Hi,
>
> I believe that encoding old INTEL AVX FMA and AMD FMA4 is different
> specifications.
>
> in gas format:
> vfmaddpd %xmm4,%xmm6,%xmm2,%xmm7
>
> operand order is
> vfmaddpd src3, src2, src1, dest
>
> that's right?
>
> gas encoding this is
> c4 e3 c9 69 fc 20
>
> this means
> ModRM.reg=%xmm7 VEX.vvvv=%xmm6 ModRM.r/m=%xmm4 imm8[7:4]=%xmm2
>
> This is AVX FMA encoding because src1=imm8[7:4].
>
> The AMD FMA4 encoding is src1=VEX.vvvv, so right:
> c4 e3 e9 69 fc 60
>
> ModRM.reg=%xmm7 VEX.vvvv=%xmm2 ModRM.r/m=%xmm4 imm8[7:4]=%xmm6
>
> Negishi.
HI Negishi
Can you post the version, inputs, and options used?
I can't reproduce the problem.
Using trunk from two days ago with this input (see t1 below)
vfmaddpd %xmm4,%xmm6,%xmm2,%xmm7
encoded as
c4 e3 ed 69 fc 60
When I feed it this input (t2.s below, note the register arguments)
vfmaddpd %xmm4,%xmm2,%xmm6,%xmm7
it is encoded as
c4 e3 c9 69 fc 20
--
Quentin
--------------- t1 ---------------
$ /home/qneill/wk/binutils/trunk.git/bld.trunk/gas/as-new --version
GNU assembler (GNU Binutils) 2.20.51.20101101
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-unknown-linux-gnu'.
$
$ cat t1.s
.text
_start:
vfmaddpd %xmm4,%xmm6,%xmm2,%xmm7
$
$ /home/qneill/wk/binutils/trunk.git/bld.trunk/gas/as-new -msyntax=att
--64 t1.s -o t1-att-64.o
$ /home/qneill/wk/binutils/trunk.git/bld.trunk/binutils/objdump -dw
-Matt,64 t1-att-64.o
t1-att-64.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <_start>:
0: c4 e3 e9 69 fc 60 vfmaddpd %xmm4,%xmm6,%xmm2,%xmm7
--------------- t2 ---------------
$ /home/qneill/wk/binutils/trunk.git/bld.trunk/gas/as-new --version
GNU assembler (GNU Binutils) 2.20.51.20101101
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-unknown-linux-gnu'.
$
$ cat t2.s
.text
_start:
vfmaddpd %xmm4,%xmm2,%xmm6,%xmm7
$
$ /home/qneill/wk/binutils/trunk.git/bld.trunk/gas/as-new -msyntax=att
--64 t2.s -o t2-att-64.o
$ /home/qneill/wk/binutils/trunk.git/bld.trunk/binutils/objdump -dw
-Matt,64 t2-att-64.o
t2-att-64.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <_start>:
0: c4 e3 c9 69 fc 20 vfmaddpd %xmm4,%xmm2,%xmm6,%xmm7
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: GAS illegally encodes FMA4.,
Quentin Neill <=