This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Add FMA4 support in binutils
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Sebastian Pop <sebpop at gmail dot com>
- Cc: "rajagopal, dwarak" <dwarak dot rajagopal at amd dot com>, binutils at sourceware dot org, "Harle, Christophe" <christophe dot harle at amd dot com>
- Date: Thu, 29 Oct 2009 14:07:32 -0700
- Subject: Re: [PATCH] Add FMA4 support in binutils
- References: <E7FB0F2BB5FEF242BB2929F02A12B8F337501A@SAUSEXMB2.amd.com> <6dc9ffc80907060907w1c0b4acejf24695a3cbe472b7@mail.gmail.com> <cb9d34b20910291329y19c4c632ycff86d2cfb95e81c@mail.gmail.com>
On Thu, Oct 29, 2009 at 1:29 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> Hi,
>
> On Mon, Jul 6, 2009 at 10:07, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Mon, Jul 6, 2009 at 8:49 AM, rajagopal,
>> dwarak<dwarak.rajagopal@amd.com> wrote:
>>> Hello,
>>> This patch adds FMA4 support in binutils. The programmers guide for
>>> these instructions is located at
>>> http://support.amd.com/us/Processor_TechDocs/43479.pdf.
>>>
>>> Tested for x86_64. Passed make check. Is this Ok?
>>>
>>
>> Is FMA4 the same as the original FMA in Intel AVX? If yes,
>> how different are your assembler/disassembler implementation
>> from the one reverted by
>>
>> http://sourceware.org/ml/binutils/2009-01/msg00059.html
>> http://sourceware.org/ml/binutils/2009-02/msg00286.html
>> http://sourceware.org/ml/binutils/2009-02/msg00289.html
>> http://sourceware.org/ml/binutils/2009-02/msg00334.html
>>
>
> As stated in Table 1-2 page 27 of the FMA4 manual
> http://support.amd.com/us/Processor_TechDocs/43479.pdf operand
> decoding for AMD's FMA4 differs from the current implementation. ?The
> attached patch fixes the current behavior of gas and the disassembler
> as follows:
>
> 2009-10-29 ?Sebastian Pop ?<sebastian.pop@amd.com>
>
> ? ? ? ?* gas/config/tc-i386.c (build_modrm_byte): Do not swap REG and
> ? ? ? ?NDS operands for FMA4.
> ? ? ? ?* gas/testsuite/gas/i386/fma4.d: Updated patterns.
> ? ? ? ?* gas/testsuite/gas/i386/x86-64-fma4.d: Same.
> ? ? ? ?* opcodes/i386-dis.c (OP_VEX_FMA): Removed.
> ? ? ? ?(VexFMA): Removed.
> ? ? ? ?(Vex128FMA): Removed.
> ? ? ? ?(prefix_table): First source operand of FMA4 insns is decoded
> ? ? ? ?with Vex not with VexFMA.
> ? ? ? ?(OP_EX_VexW): Second source operand is decoded with get_vex_imm8
> ? ? ? ?when vex.w is set. ?Third source operand is decoded with get_vex_imm8
> ? ? ? ?when vex.w is cleared.
> ? ? ? ?(OP_VEX_FMA): Removed.
>
> Tested on x86-64-linux with make -k check and on simnow.
> Ok to commit?
>
It is OK.
--
H.J.