Mercurial > vim
changeset 33237:8752bc69eea9
runtime(masm): add support for AVX-2 and AVX-512 (#13061)
Commit: https://github.com/vim/vim/commit/e7833e73471a110c7c38c80935e1b840f254a3da
Author: Wu Yongwei <wuyongwei@gmail.com>
Date: Mon Sep 11 00:27:31 2023 +0800
runtime(masm): add support for AVX-2 and AVX-512 (https://github.com/vim/vim/issues/13061)
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 10 Sep 2023 18:30:07 +0200 |
parents | ad35075433ee |
children | 6c1d29d45734 |
files | runtime/syntax/masm.vim |
diffstat | 1 files changed, 184 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/syntax/masm.vim +++ b/runtime/syntax/masm.vim @@ -2,7 +2,7 @@ " Language: Microsoft Macro Assembler (80x86) " Orig Author: Rob Brady <robb@datatone.com> " Maintainer: Wu Yongwei <wuyongwei@gmail.com> -" Last Change: 2022-04-24 20:07:04 +0800 +" Last Change: 2023-09-09 20:48:26 +0800 " Quit when a syntax file was already loaded if exists("b:current_syntax") @@ -194,8 +194,8 @@ syn keyword masmRegister R8W R9W R10W R1 syn keyword masmRegister R8B R9B R10B R11B R12B R13B R14B R15B " SSE/AVX registers -syn match masmRegister "\(X\|Y\)MM[0-9]\>" -syn match masmRegister "\(X\|Y\)MM1[0-5]\>" +syn match masmRegister "\(X\|Y\|Z\)MM[12]\?[0-9]\>" +syn match masmRegister "\(X\|Y\|Z\)MM3[01]\>" " Instruction prefixes syn keyword masmOpcode LOCK REP REPE REPNE REPNZ REPZ @@ -338,11 +338,192 @@ syn keyword masmOpcode VINSERTF128 VEXT syn keyword masmOpcode VPERMILPS VPERMILPD VPERM2F128 syn keyword masmOpcode VZEROALL VZEROUPPER +" AVX-2 (Haswell and later) +syn keyword masmOpcode VPBROADCASTB VPBROADCASTW VPBROADCASTD +syn keyword masmOpcode VPBROADCASTQ VBROADCASTI128 +syn keyword masmOpcode VINSERTI128 VEXTRACTI128 +syn keyword masmOpcode VGATHERDPD VGATHERQPD VGATHERDPS VGATHERQPS +syn keyword masmOpcode VPGATHERDD VPGATHERDQ VPGATHERQD VPGATHERQQ +syn keyword masmOpcode VPMASKMOVD VPMASKMOVQ +syn keyword masmOpcode PERMPS VPERMD VPERMPD VPERMQ VPERM2I128 +syn keyword masmOpcode VPBLENDD VPSLLVD VPSLLVQ VPSRLVD VPSRLVQ +syn keyword masmOpcode VPSRAVD + +" AVX-512 (Knights Landing/Skylake-X and later) +syn keyword masmOpcode KAND KANDN KMOV KUNPCK KNOT KOR KORTEST +syn keyword masmOpcode KSHIFTL KSHIFTR KXNOR KXOR KADD KTEST +syn keyword masmOpcode VBLENDMPD VBLENDMPS +syn keyword masmOpcode VPBLENDMD VPBLENDMQ VPBLENDMB VPBLENDMW +syn keyword masmOpcode VPCMPD VPCMPUD VPCMPQ VPCMPUQ +syn keyword masmOpcode VPCMPB VPCMPUB VPCMPW VPCMPUW +syn keyword masmOpcode VPTESTMD VPTESTMQ VPTESTNMD VPTESTNMQ +syn keyword masmOpcode VPTESTMB VPTESTMW VPTESTNMB VPTESTNMW +syn keyword masmOpcode VCOMPRESSPD VCOMPRESSPS VPCOMPRESSD VPCOMPRESSQ +syn keyword masmOpcode VEXPANDPD VEXPANDPS VPEXPANDD VPEXPANDQ +syn keyword masmOpcode VPERMB VPERMW VPERMT2B VPERMT2W VPERMI2PD +syn keyword masmOpcode VPERMI2PS VPERMI2D VPERMI2Q VPERMI2B VPERMI2W +syn keyword masmOpcode VPERMT2PS VPERMT2PD VPERMT2D VPERMT2Q +syn keyword masmOpcode VSHUFF32x4 VSHUFF64x2 VSHUFI32x4 VSHUFI64x2 +syn keyword masmOpcode VPMULTISHIFTQB VPTERNLOGD VPTERNLOGQ +syn keyword masmOpcode VPMOVQD VPMOVSQD VPMOVUSQD VPMOVQW VPMOVSQW +syn keyword masmOpcode VPMOVUSQW VPMOVQB VPMOVSQB VPMOVUSQB VPMOVDW +syn keyword masmOpcode VPMOVSDW VPMOVUSDW VPMOVDB VPMOVSDB VPMOVUSDB +syn keyword masmOpcode VPMOVWB VPMOVSWB VPMOVUSWB +syn keyword masmOpcode VCVTPS2UDQ VCVTPD2UDQ VCVTTPS2UDQ VCVTTPD2UDQ +syn keyword masmOpcode VCVTSS2USI VCVTSD2USI VCVTTSS2USI VCVTTSD2USI +syn keyword masmOpcode VCVTPS2QQ VCVTPD2QQ VCVTPS2UQQ VCVTPD2UQQ +syn keyword masmOpcode VCVTTPS2QQ VCVTTPD2QQ VCVTTPS2UQQ VCVTTPD2UQQ +syn keyword masmOpcode VCVTUDQ2PS VCVTUDQ2PD VCVTUSI2PS VCVTUSI2PD +syn keyword masmOpcode VCVTUSI2SD VCVTUSI2SS VCVTUQQ2PS VCVTUQQ2PD +syn keyword masmOpcode VCVTQQ2PD VCVTQQ2PS VGETEXPPD +syn keyword masmOpcode VGETEXPPS VGETEXPSD VGETEXPSS +syn keyword masmOpcode VGETMANTPD VGETMANTPS VGETMANTSD VGETMANTSS +syn keyword masmOpcode VFIXUPIMMPD VFIXUPIMMPS VFIXUPIMMSD VFIXUPIMMSS +syn keyword masmOpcode VRCP14PD VRCP14PS VRCP14SD VRCP14SS +syn keyword masmOpcode VRNDSCALEPS VRNDSCALEPD VRNDSCALESS VRNDSCALESD +syn keyword masmOpcode VRSQRT14PD VRSQRT14PS VRSQRT14SD VRSQRT14SS +syn keyword masmOpcode VSCALEFPS VSCALEFPD VSCALEFSS VSCALEFSD +syn keyword masmOpcode VBROADCASTI32X2 VBROADCASTI32X4 VBROADCASTI32X8 +syn keyword masmOpcode VBROADCASTI64X2 VBROADCASTI64X4 +syn keyword masmOpcode VALIGND VALIGNQ VDBPSADBW VPABSQ VPMAXSQ +syn keyword masmOpcode VPMAXUQ VPMINSQ VPMINUQ VPROLD VPROLVD VPROLQ +syn keyword masmOpcode VPROLVQ VPRORD VPRORVD VPRORQ VPRORVQ +syn keyword masmOpcode VPSCATTERDD VPSCATTERDQ VPSCATTERQD VPSCATTERQQ +syn keyword masmOpcode VSCATTERDPS VSCATTERDPD VSCATTERQPS VSCATTERQPD +syn keyword masmOpcode VPCONFLICTD VPCONFLICTQ VPLZCNTD VPLZCNTQ +syn keyword masmOpcode VPBROADCASTMB2Q VPBROADCASTMW2D +syn keyword masmOpcode VEXP2PD VEXP2PS +syn keyword masmOpcode VRCP28PD VRCP28PS VRCP28SD VRCP28SS +syn keyword masmOpcode VRSQRT28PD VRSQRT28PS VRSQRT28SD VRSQRT28SS +syn keyword masmOpcode VGATHERPF0DPS VGATHERPF0QPS VGATHERPF0DPD +syn keyword masmOpcode VGATHERPF0QPD VGATHERPF1DPS VGATHERPF1QPS +syn keyword masmOpcode VGATHERPF1DPD VGATHERPF1QPD VSCATTERPF0DPS +syn keyword masmOpcode VSCATTERPF0QPS VSCATTERPF0DPD VSCATTERPF0QPD +syn keyword masmOpcode VSCATTERPF1DPS VSCATTERPF1QPS VSCATTERPF1DPD +syn keyword masmOpcode VSCATTERPF1QPD +syn keyword masmOpcode V4FMADDPS V4FMADDSS V4FNMADDPS V4FNMADDSS +syn keyword masmOpcode VP4DPWSSD VP4DPWSSDS +syn keyword masmOpcode VFPCLASSPS VFPCLASSPD VFPCLASSSS VFPCLASSSD +syn keyword masmOpcode VRANGEPS VRANGEPD VRANGESS VRANGESD +syn keyword masmOpcode VREDUCEPS VREDUCEPD VREDUCESS VREDUCESD +syn keyword masmOpcode VPMOVM2D VPMOVM2Q VPMOVM2B VPMOVM2W VPMOVD2M +syn keyword masmOpcode VPMOVQ2M VPMOVB2M VPMOVW2M VPMULLQ +syn keyword masmOpcode VPCOMPRESSB VPCOMPRESSW VPEXPANDB VPEXPANDW +syn keyword masmOpcode VPSHLD VPSHLDV VPSHRD VPSHRDV +syn keyword masmOpcode VPDPBUSD VPDPBUSDS VPDPWSSD VPDPWSSDS +syn keyword masmOpcode VPMADD52LUQ VPMADD52HUQ +syn keyword masmOpcode VPOPCNTD VPOPCNTQ VPOPCNTB VPOPCNTW +syn keyword masmOpcode VPSHUFBITQMB VP2INTERSECTD VP2INTERSECTQ +syn keyword masmOpcode VGF2P8AFFINEINVQB VGF2P8AFFINEQB +syn keyword masmOpcode VGF2P8MULB VPCLMULQDQ +syn keyword masmOpcode VAESDEC VAESDECLAST VAESENC VAESENCLAST +syn keyword masmOpcode VCVTNE2PS2BF16 VCVTNEPS2BF16 VDPBF16PS +syn keyword masmOpcode VADDPH VADDSH VSUBPH VSUBSH VMULPH VMULSH +syn keyword masmOpcode VDIVPH VDIVSH VSQRTPH VSQRTSH +syn keyword masmOpcode VFMADD132PH VFMADD213PH VFMADD231PH +syn keyword masmOpcode VFMADD132SH VFMADD213SH VFMADD231SH +syn keyword masmOpcode VFNMADD132PH VFNMADD213PH VFNMADD231PH +syn keyword masmOpcode VFNMADD132SH VFNMADD213SH VFNMADD231SH +syn keyword masmOpcode VFMSUB132PH VFMSUB213PH VFMSUB231PH +syn keyword masmOpcode VFMSUB132SH VFMSUB213SH VFMSUB231SH +syn keyword masmOpcode VFNMSUB132PH VFNMSUB213PH VFNMSUB231PH +syn keyword masmOpcode VFNMSUB132SH VFNMSUB213SH VFNMSUB231SH +syn keyword masmOpcode VFMADDSUB132PH VFMADDSUB213PH VFMADDSUB231PH +syn keyword masmOpcode VFMSUBADD132PH VFMSUBADD213PH VFMSUBADD231PH +syn keyword masmOpcode VREDUCEPH VREDUCESH VRNDSCALEPH VRNDSCALESH +syn keyword masmOpcode VSCALEFPH VSCALEFSH VFMULCPH VFMULCSH VFCMULCPH +syn keyword masmOpcode VFCMULCSH VFMADDCPH VFMADDCSH VFCMADDCPH +syn keyword masmOpcode VFCMADDCSH VRCPPH VRCPSH VRSQRTPH VRSQRTSH +syn keyword masmOpcode VCMPPH VCMPSH VCOMISH VUCOMISH VMAXPH VMAXSH +syn keyword masmOpcode VMINPH VMINSH VFPCLASSPH VFPCLASSSH +syn keyword masmOpcode VCVTW2PH VCVTUW2PH VCVTDQ2PH VCVTUDQ2PH +syn keyword masmOpcode VCVTQQ2PH VCVTUQQ2PH VCVTPS2PHX VCVTPD2PH +syn keyword masmOpcode VCVTSI2SH VCVTUSI2SH VCVTSS2SH VCVTSD2SH +syn keyword masmOpcode VCVTPH2W VCVTTPH2W VCVTPH2UW VCVTTPH2UW +syn keyword masmOpcode VCVTPH2DQ VCVTTPH2DQ VCVTPH2UDQ VCVTTPH2UDQ +syn keyword masmOpcode VCVTPH2QQ VCVTTPH2QQ VCVTPH2UQQ VCVTTPH2UQQ +syn keyword masmOpcode VCVTPH2PSX VCVTPH2PD VCVTSH2SI VCVTTSH2SI +syn keyword masmOpcode VCVTSH2USI VCVTTSH2USI VCVTSH2SS VCVTSH2SD +syn keyword masmOpcode VGETEXPPH VGETEXPSH VGETMANTPH VGETMANTSH +syn keyword masmOpcode VMOVSH VMOVW VADDPD VADDPS VADDSD VADDSS +syn keyword masmOpcode VANDPD VANDPS VANDNPD VANDNPS +syn keyword masmOpcode VCMPPD VCMPPS VCMPSD VCMPSS +syn keyword masmOpcode VCOMISD VCOMISS VDIVPD VDIVPS VDIVSD VDIVSS +syn keyword masmOpcode VCVTDQ2PD VCVTDQ2PS VCVTPD2DQ VCVTPD2PS +syn keyword masmOpcode VCVTPH2PS VCVTPS2PH VCVTPS2DQ VCVTPS2PD +syn keyword masmOpcode VCVTSD2SI VCVTSD2SS VCVTSI2SD VCVTSI2SS +syn keyword masmOpcode VCVTSS2SD VCVTSS2SI VCVTTPD2DQ VCVTTPS2DQ +syn keyword masmOpcode VCVTTSD2SI VCVTTSS2SI VMAXPD VMAXPS +syn keyword masmOpcode VMAXSD VMAXSS VMINPD VMINPS VMINSD VMINSS +syn keyword masmOpcode VMOVAPD VMOVAPS VMOVD VMOVQ VMOVDDUP +syn keyword masmOpcode VMOVHLPS VMOVHPD VMOVHPS VMOVLHPS VMOVLPD +syn keyword masmOpcode VMOVLPS VMOVNTDQA VMOVNTDQ VMOVNTPD VMOVNTPS +syn keyword masmOpcode VMOVSD VMOVSHDUP VMOVSLDUP VMOVSS VMOVUPD +syn keyword masmOpcode VMOVUPS VMOVDQA32 VMOVDQA64 VMOVDQU8 +syn keyword masmOpcode VMOVDQU16 VMOVDQU32 VMOVDQU64 VMULPD VMULPS +syn keyword masmOpcode VMULSD VMULSS VORPD VORPS VSQRTPD VSQRTPS +syn keyword masmOpcode VSQRTSD VSQRTSS VSUBPD VSUBPS VSUBSD VSUBSS +syn keyword masmOpcode VUCOMISD VUCOMISS VUNPCKHPD VUNPCKHPS VUNPCKLPD +syn keyword masmOpcode VUNPCKLPS VXORPD VXORPS VEXTRACTPS VINSERTPS +syn keyword masmOpcode VPEXTRB VPEXTRW VPEXTRD VPEXTRQ VPINSRB VPINSRW +syn keyword masmOpcode VPINSRD VPINSRQ VPACKSSWB VPACKSSDW VPACKUSDW +syn keyword masmOpcode VPACKUSWB VPADDB VPADDW VPADDD VPADDQ VPADDSB +syn keyword masmOpcode VPADDSW VPADDUSB VPADDUSW VPANDD VPANDQ VPANDND +syn keyword masmOpcode VPANDNQ VPAVGB VPAVGW VPCMPEQB VPCMPEQW +syn keyword masmOpcode VPCMPEQD VPCMPEQQ VPCMPGTB VPCMPGTW VPCMPGTD +syn keyword masmOpcode VPCMPGTQ VPMAXSB VPMAXSW VPMAXSD VPMAXSQ +syn keyword masmOpcode VPMAXUB VPMAXUW VPMAXUD VPMAXUQ VPMINSB VPMINSW +syn keyword masmOpcode VPMINSD VPMINSQ VPMINUB VPMINUW VPMINUD VPMINUQ +syn keyword masmOpcode VPMOVSXBW VPMOVSXBD VPMOVSXBQ VPMOVSXWD +syn keyword masmOpcode VPMOVSXWQ VPMOVSXDQ VPMOVZXBW VPMOVZXBD +syn keyword masmOpcode VPMOVZXBQ VPMOVZXWD VPMOVZXWQ VPMOVZXDQ VPMULDQ +syn keyword masmOpcode VPMULUDQ VPMULHRSW VPMULHUW VPMULHW VPMULLD +syn keyword masmOpcode VPMULLQ VPMULLW VPORD VPORQ VPSUBB VPSUBW +syn keyword masmOpcode VPSUBD VPSUBQ VPSUBSB VPSUBSW VPSUBUSB VPSUBUSW +syn keyword masmOpcode VPUNPCKHBW VPUNPCKHWD VPUNPCKHDQ VPUNPCKHQDQ +syn keyword masmOpcode VPUNPCKLBW VPUNPCKLWD VPUNPCKLDQ VPUNPCKLQDQ +syn keyword masmOpcode VPXORD VPXORQ VPSADBW VPSHUFB VPSHUFHW VPSHUFLW +syn keyword masmOpcode VPSHUFD VPSLLDQ VPSLLW VPSLLD VPSLLQ VPSRAW +syn keyword masmOpcode VPSRAD VPSRAQ VPSRLDQ VPSRLW VPSRLD VPSRLQ +syn keyword masmOpcode VPSLLVW VPSRLVW VPSHUFPD VPSHUFPS VEXTRACTF32X4 +syn keyword masmOpcode VEXTRACTF64X2 VEXTRACTF32X8 VEXTRACTF64X4 +syn keyword masmOpcode VEXTRACTI32X4 VEXTRACTI64X2 VEXTRACTI32X8 +syn keyword masmOpcode VEXTRACTI64X4 VINSERTF32x4 VINSERTF64X2 +syn keyword masmOpcode VINSERTF32X8 VINSERTF64x4 VINSERTI32X4 +syn keyword masmOpcode VINSERTI64X2 VINSERTI32X8 VINSERTI64X4 +syn keyword masmOpcode VPABSB VPABSW VPABSD VPABSQ VPALIGNR +syn keyword masmOpcode VPMADDUBSW VPMADDWD +syn keyword masmOpcode VFMADD132PD VFMADD213PD VFMADD231PD +syn keyword masmOpcode VFMADD132PS VFMADD213PS VFMADD231PS +syn keyword masmOpcode VFMADD132SD VFMADD213SD VFMADD231SD +syn keyword masmOpcode VFMADD132SS VFMADD213SS VFMADD231SS +syn keyword masmOpcode VFMADDSUB132PD VFMADDSUB213PD VFMADDSUB231PD +syn keyword masmOpcode VFMADDSUB132PS VFMADDSUB213PS VFMADDSUB231PS +syn keyword masmOpcode VFMSUBADD132PD VFMSUBADD213PD VFMSUBADD231PD +syn keyword masmOpcode VFMSUBADD132PS VFMSUBADD213PS VFMSUBADD231PS +syn keyword masmOpcode VFMSUB132PD VFMSUB213PD VFMSUB231PD +syn keyword masmOpcode VFMSUB132PS VFMSUB213PS VFMSUB231PS +syn keyword masmOpcode VFMSUB132SD VFMSUB213SD VFMSUB231SD +syn keyword masmOpcode VFMSUB132SS VFMSUB213SS VFMSUB231SS +syn keyword masmOpcode VFNMADD132PD VFNMADD213PD VFNMADD231PD +syn keyword masmOpcode VFNMADD132PS VFNMADD213PS VFNMADD231PS +syn keyword masmOpcode VFNMADD132SD VFNMADD213SD VFNMADD231SD +syn keyword masmOpcode VFNMADD132SS VFNMADD213SS VFNMADD231SS +syn keyword masmOpcode VFNMSUB132PD VFNMSUB213PD VFNMSUB231PD +syn keyword masmOpcode VFNMSUB132PS VFNMSUB213PS VFNMSUB231PS +syn keyword masmOpcode VFNMSUB132SD VFNMSUB213SD VFNMSUB231SD +syn keyword masmOpcode VFNMSUB132SS VFNMSUB213SS VFNMSUB231SS +syn keyword masmOpcode VPSRAVW VPSRAVQ + " Other opcodes in Pentium and later processors syn keyword masmOpcode CMPXCHG8B CPUID UD2 syn keyword masmOpcode RSM RDMSR WRMSR RDPMC RDTSC SYSENTER SYSEXIT syn match masmOpcode "CMOV\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" +" Not really used by MASM, but useful for viewing GCC-generated assembly code +" in Intel syntax +syn match masmHexadecimal "[-+]\?0[Xx]\x*" +syn keyword masmOpcode MOVABS " The default highlighting hi def link masmLabel PreProc