From 387ca90b9f3da33b0219a472b308d6e005a11178 Mon Sep 17 00:00:00 2001 From: Victor Ding Date: Fri, 20 Apr 2018 12:48:20 -0400 Subject: [PATCH] Introduce some instructions on X86 Following instructions are now available for downstream projects: pmovzxbd pmovzxwd packuswb punpckhbw punpcklbw vmovdqu vpcmpeqb vpcmpeqw vpmovmskb vperm2i128 Signed-off-by: Victor Ding --- compiler/x/codegen/X86Ops.ins | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/compiler/x/codegen/X86Ops.ins b/compiler/x/codegen/X86Ops.ins index 5b64b3d84f6..9369973a103 100644 --- a/compiler/x/codegen/X86Ops.ins +++ b/compiler/x/codegen/X86Ops.ins @@ -2038,6 +2038,14 @@ INSTRUCTION(MOVDQURegMem, movdqu, BINARY(VEX_L128, VEX_vNONE, PREFIX_F3, REX__, ESCAPE_0F__, 0x6f, 0, ModRM_RM__, Immediate_0), PROPERTY0(IA32OpProp_ModifiesTarget), PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_SourceIsMemRef | IA32OpProp1_XMMTarget)), +INSTRUCTION(VMOVDQURegReg, vmovdqu, + BINARY(VEX_L256, VEX_vNONE, PREFIX_F3, REX__, ESCAPE_0F__, 0x6f, 0, ModRM_RM__, Immediate_0), + PROPERTY0(IA32OpProp_ModifiesTarget | IA32OpProp_SourceRegisterInModRM), + PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(VMOVDQURegMem, vmovdqu, + BINARY(VEX_L256, VEX_vNONE, PREFIX_F3, REX__, ESCAPE_0F__, 0x6f, 0, ModRM_RM__, Immediate_0), + PROPERTY0(IA32OpProp_ModifiesTarget), + PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_SourceIsMemRef | IA32OpProp1_XMMTarget)), INSTRUCTION(MOVDQUMemReg, movdqu, BINARY(VEX_L128, VEX_vNONE, PREFIX_F3, REX__, ESCAPE_0F__, 0x7f, 0, ModRM_MR__, Immediate_0), PROPERTY0(IA32OpProp_ModifiesTarget), @@ -2466,14 +2474,42 @@ INSTRUCTION(PAUSE, pause, BINARY(VEX_L___, VEX_vNONE, PREFIX_F3, REX__, ESCAPE_____, 0x90, 0, ModRM_NONE, Immediate_0), PROPERTY0(0), PROPERTY1(0)), +INSTRUCTION(PACKUSWBRegReg, packuswb, + BINARY(VEX_L128, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x67, 0, ModRM_RM__, Immediate_0), + PROPERTY0(IA32OpProp_SourceRegisterInModRM), + PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(PUNPCKHBWRegReg, punpckhbw, + BINARY(VEX_L128, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x68, 0, ModRM_RM__, Immediate_0), + PROPERTY0(IA32OpProp_SourceRegisterInModRM), + PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(PUNPCKLBWRegReg, punpcklbw, + BINARY(VEX_L128, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x60, 0, ModRM_RM__, Immediate_0), + PROPERTY0(IA32OpProp_SourceRegisterInModRM), + PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), INSTRUCTION(PCMPEQBRegReg, pcmpeqb, BINARY(VEX_L128, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x74, 0, ModRM_RM__, Immediate_0), PROPERTY0(IA32OpProp_SourceRegisterInModRM), PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(VPCMPEQBRegReg, vpcmpeqb, + BINARY(VEX_L256, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x74, 0, ModRM_RM__, Immediate_0), + PROPERTY0(IA32OpProp_SourceRegisterInModRM), + PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(VPCMPEQBRegMem, vpcmpeqb, + BINARY(VEX_L256, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x74, 0, ModRM_RM__, Immediate_0), + PROPERTY0(0), + PROPERTY1(IA32OpProp1_XMMTarget | IA32OpProp1_SourceIsMemRef)), INSTRUCTION(PCMPEQWRegReg, pcmpeqw, BINARY(VEX_L128, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x75, 0, ModRM_RM__, Immediate_0), PROPERTY0(IA32OpProp_SourceRegisterInModRM), PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(VPCMPEQWRegReg, vpcmpeqw, + BINARY(VEX_L256, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x75, 0, ModRM_RM__, Immediate_0), + PROPERTY0(IA32OpProp_SourceRegisterInModRM), + PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(VPCMPEQWRegMem, vpcmpeqw, + BINARY(VEX_L256, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x75, 0, ModRM_RM__, Immediate_0), + PROPERTY0(0), + PROPERTY1(IA32OpProp1_XMMTarget | IA32OpProp1_SourceIsMemRef)), INSTRUCTION(PCMPGTBRegReg, pcmpgtb, BINARY(VEX_L128, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x64, 0, ModRM_RM__, Immediate_0), PROPERTY0(IA32OpProp_SourceRegisterInModRM), @@ -2486,14 +2522,26 @@ INSTRUCTION(PMOVMSKB4RegReg, pmovmskb, BINARY(VEX_L128, VEX_vNONE, PREFIX_66, REX__, ESCAPE_0F__, 0xd7, 0, ModRM_RM__, Immediate_0), PROPERTY0(IA32OpProp_SourceRegisterInModRM), PROPERTY1(IA32OpProp1_XMMSource)), +INSTRUCTION(VPMOVMSKB4RegReg, vpmovmskb, + BINARY(VEX_L256, VEX_vNONE, PREFIX_66, REX__, ESCAPE_0F__, 0xd7, 0, ModRM_RM__, Immediate_0), + PROPERTY0(IA32OpProp_SourceRegisterInModRM), + PROPERTY1(IA32OpProp1_XMMSource)), INSTRUCTION(PMOVZXBDRegReg, pmovzxbd, BINARY(VEX_L128, VEX_vNONE, PREFIX_66, REX__, ESCAPE_0F38, 0x31, 0, ModRM_RM__, Immediate_0), PROPERTY0(IA32OpProp_SourceRegisterInModRM), PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(PMOVZXBDRegMem, pmovzxbd, + BINARY(VEX_L128, VEX_vNONE, PREFIX_66, REX__, ESCAPE_0F38, 0x31, 0, ModRM_RM__, Immediate_0), + PROPERTY0(0), + PROPERTY1(IA32OpProp1_SourceIsMemRef | IA32OpProp1_XMMTarget)), INSTRUCTION(PMOVZXWDRegReg, pmovzxwd, BINARY(VEX_L128, VEX_vNONE, PREFIX_66, REX__, ESCAPE_0F38, 0x33, 0, ModRM_RM__, Immediate_0), PROPERTY0(IA32OpProp_SourceRegisterInModRM), PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(PMOVZXWDRegMem, pmovzxwd, + BINARY(VEX_L128, VEX_vNONE, PREFIX_66, REX__, ESCAPE_0F38, 0x33, 0, ModRM_RM__, Immediate_0), + PROPERTY0(0), + PROPERTY1(IA32OpProp1_SourceIsMemRef | IA32OpProp1_XMMTarget)), INSTRUCTION(PMULLDRegReg, pmulld, BINARY(VEX_L128, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F38, 0x40, 0, ModRM_RM__, Immediate_0), PROPERTY0(IA32OpProp_ModifiesTarget | IA32OpProp_SourceRegisterInModRM | IA32OpProp_UsesTarget), @@ -3722,6 +3770,10 @@ INSTRUCTION(PSRLQRegImm1, psrlq, BINARY(VEX_L128, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F__, 0x73, 2, ModRM_EXT_, Immediate_1), PROPERTY0(IA32OpProp_ModifiesTarget | IA32OpProp_ByteImmediate | IA32OpProp_DoubleFP | IA32OpProp_TargetRegisterInModRM | IA32OpProp_UsesTarget), PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), +INSTRUCTION(VPERM2I128RegRegImm1, vperm2i128 , + BINARY(VEX_L256, VEX_vReg_, PREFIX_66, REX__, ESCAPE_0F3A, 0x46, 0, ModRM_RM__, Immediate_1), + PROPERTY0(IA32OpProp_ModifiesTarget | IA32OpProp_ByteImmediate | IA32OpProp_SourceRegisterInModRM | IA32OpProp_UsesTarget), + PROPERTY1(IA32OpProp1_XMMSource | IA32OpProp1_XMMTarget)), // OpCodes beyond this point are pseudo instructions; they are for OMR internal usage only. INSTRUCTION(FENCE, Fence, // Address of binary is to be written to specified data address, SymbolReference controls code motion across fence