This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Add vpermil2pd/vpermil2ps for AMD Orochi processor
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Quentin Neill <quentin dot neill dot gnu at gmail dot com>
- Cc: binutils at sourceware dot org, Sebastian Pop <sebpop at gmail dot com>
- Date: Wed, 10 Feb 2010 07:55:33 -0800
- Subject: Re: [PATCH] Add vpermil2pd/vpermil2ps for AMD Orochi processor
- References: <1e2421411002100738t5e0321cbgce30789f1dff5ddb@mail.gmail.com>
On Wed, Feb 10, 2010 at 7:38 AM, Quentin Neill
<quentin.neill.gnu@gmail.com> wrote:
> This patch restores vpermil2pd/vpermil2ps insns with 5 operand support.
>
> I started with the original Intel code removed back in
> ? ?http://sourceware.org/ml/binutils-cvs/2009-01/msg00025.html
> and then adjusted for the AMD implementation.
>
> Tested with make -k check.
>
> Okay to commit?
>
> gas:
> ? ? ? ?* config/tc-i386.c (vex_imm4) New operand type.
> ? ? ? ?(fits_in_imm4): New.
> ? ? ? ?(VEX_check_operands): New.
> ? ? ? ?(check_reverse): Call VEX_check_operands.
> ? ? ? ?(build_modrm_byte): Reintroduce code for 5
> ? ? ? ?operand insns. ?Fix whitespace.
>
> gas/testsuite:
> ? ? ? ?* gas/i386/x86-64-xop.d: Add vpermil2p[sd] tests.
> ? ? ? ?* testsuite/gas/i386/x86-64-xop.s: Likewise.
> ? ? ? ?* testsuite/gas/i386/xop.d: Likewise.
> ? ? ? ?* testsuite/gas/i386/xop.s: Likewise.
>
> opcodes:
> ? ? ? ?* i386-dis.c (OP_EX_VexImmW): Reintroduced
> ? ? ? ?function to handle 5th imm8 operand.
> ? ? ? ?(PREFIX_VEX_3A48): Added.
> ? ? ? ?(PREFIX_VEX_3A49): Added.
> ? ? ? ?(VEX_W_3A48_P_2): Added.
> ? ? ? ?(VEX_W_3A49_P_2): Added.
> ? ? ? ?(prefix table): Added entries for PREFIX_VEX_3A48
> ? ? ? ?and PREFIX_VEX_3A49.
> ? ? ? ?(vex table): Added entries for VEX_W_3A48_P_2 and
> ? ? ? ?and VEX_W_3A49_P_2.
> ? ? ? ?* i386-gen.c (operand_type_init): Added OPERAND_TYPE_VEX_IMM4
> ? ? ? ?for VEX_Imm4 operands.
> ? ? ? ?* i386-opc.h (enum): Added Vex_Imm4.
> ? ? ? ?(i386_operand_type): Added vex_imm4.
> ? ? ? ?* i386-opc.tbl: Add entries for vpermilp[ds].
> ? ? ? ?* i386-init.h: Regenerated.
> ? ? ? ?* i386-tbl.h: Regenerated.
>
Please change VEX_Imm4 to Vec_Imm4.
What is // in
+ gas_assert ((i.reg_operands == 4
+ || (i.reg_operands == 3 && i.mem_operands == 1))
+ && i.tm.opcode_modifier.vexvvvv == VEXXDS
+ && i.tm.opcode_modifier.veximmext
+ && (operand_type_equal (&i.tm.operand_types[dest], ®xmm)
+ || operand_type_equal
(&i.tm.operand_types[dest], ®ymm))
+ && ((dest == 4
+ && i.imm_operands == 1
+ //&& i.types[0].bitfield.veximmext
^^^^^^^^^^^^^^^^^^^^^^^^^
+ && (i.tm.opcode_modifier.vexw == VEXW0
+ || i.tm.opcode_modifier.vexw == VEXW1))
+ || (dest == 3
+ && (i.imm_operands == 0
+ || (i.imm_operands == 1
+ && i.tm.opcode_modifier.immext))
+ && i.tm.opcode_modifier.veximmext)));
for?
--
H.J.