[PATCH] Add FMA4 support in binutils
H.J. Lu
hjl.tools@gmail.com
Thu Oct 29 21:07:00 GMT 2009
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.
More information about the Binutils
mailing list