From c2ecccb33c307faa21f4d2f47348e7346b032d94 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 2 Jul 2020 06:30:00 -0700 Subject: x86: Add SwapSources We check register-only source operand to decide if two source operands of VEX encoded instructions should be swapped. But source operands in AMX instructions with two source operands swapped are all register-only operand. Add SwapSources to indicate two source operands should be swapped. gas/ * config/tc-i386.c (build_modrm_byte): Check vexswapsources to swap two source operands. opcodes/ * i386-gen.c (opcode_modifiers): Add VexSwapSources. * i386-opc.h (VexSwapSources): New. (i386_opcode_modifier): Add vexswapsources. * i386-opc.tbl: Add VexSwapSources to BMI2 and BMI instructions with two source operands swapped. * i386-tbl.h: Regenerated. --- opcodes/i386-opc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'opcodes/i386-opc.h') diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h index 1744386..c65febb 100644 --- a/opcodes/i386-opc.h +++ b/opcodes/i386-opc.h @@ -635,6 +635,9 @@ enum */ ImplicitQuadGroup, + /* Two source operands are swapped. */ + SwapSources, + /* Support encoding optimization. */ Optimize, @@ -710,6 +713,7 @@ typedef struct i386_opcode_modifier unsigned int disp8memshift:3; unsigned int nodefmask:1; unsigned int implicitquadgroup:1; + unsigned int swapsources:1; unsigned int optimize:1; unsigned int attmnemonic:1; unsigned int attsyntax:1; -- cgit v1.1