diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-11-14 05:48:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-11-14 05:48:46 +0100 |
commit | 4b60a6cdb3982d93837e8f285c3b7443c79abcd0 (patch) | |
tree | 12787989896bfa186df9d28cf264a6cd4cb069f4 /runtime/syntax | |
parent | 2593e037c9e9a00ebd86fa3f8a8011c39511c314 (diff) | |
download | vim-4b60a6cdb3982d93837e8f285c3b7443c79abcd0.zip |
Update runtime files.
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/masm.vim | 112 | ||||
-rw-r--r-- | runtime/syntax/mix.vim | 83 |
2 files changed, 149 insertions, 46 deletions
diff --git a/runtime/syntax/masm.vim b/runtime/syntax/masm.vim index 1711601f3..bb3c9681b 100644 --- a/runtime/syntax/masm.vim +++ b/runtime/syntax/masm.vim @@ -2,14 +2,11 @@ " Language: Microsoft Macro Assembler (80x86) " Orig Author: Rob Brady <robb@datatone.com> " Maintainer: Wu Yongwei <wuyongwei@gmail.com> -" Last Change: $Date: 2012/02/04 12:45:39 $ -" $Revision: 1.46 $ - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" Last Change: $Date: 2013/11/13 11:49:24 $ +" $Revision: 1.48 $ + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -194,6 +191,10 @@ syn keyword masmRegister R8D R9D R10D R11D R12D R13D R14D R15D syn keyword masmRegister R8W R9W R10W R11W R12W R13W R14W R15W 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]\>" + " Instruction prefixes syn keyword masmOpcode LOCK REP REPE REPNE REPNZ REPZ @@ -302,50 +303,69 @@ syn keyword masmOpcode FISTTP LDDQU ADDSUBPS ADDSUBPD syn keyword masmOpcode HADDPS HSUBPS HADDPD HSUBPD syn keyword masmOpcode MOVSHDUP MOVSLDUP MOVDDUP MONITOR MWAIT +" SSSE3 opcodes (Core and later) +syn keyword masmOpcode PSIGNB PSIGNW PSIGND PABSB PABSW PABSD +syn keyword masmOpcode PALIGNR PSHUFB PMULHRSW PMADDUBSW +syn keyword masmOpcode PHSUBW PHSUBD PHSUBSW PHADDW PHADDD PHADDSW + +" SSE 4.1 opcodes (Penryn and later) +syn keyword masmOpcode MPSADBW PHMINPOSUW PMULDQ PMULLD DPPS DPPD +syn keyword masmOpcode BLENDPS BLENDPD BLENDVPS BLENDVPD +syn keyword masmOpcode PBLENDVB PBLENDW +syn keyword masmOpcode PMINSB PMAXSB PMINSD PMAXSD +syn keyword masmOpcode PMINUW PMAXUW PMINUD PMAXUD +syn keyword masmOpcode ROUNDPS ROUNDSS ROUNDPD ROUNDSD +syn keyword masmOpcode INSERTPS PINSRB PINSRD PINSRQ +syn keyword masmOpcode EXTRACTPS PEXTRB PEXTRD PEXTRQ +syn keyword masmOpcode PMOVSXBW PMOVZXBW PMOVSXBD PMOVZXBD +syn keyword masmOpcode PMOVSXBQ PMOVZXBQ PMOVSXWD PMOVZXWD +syn keyword masmOpcode PMOVSXWQ PMOVZXWQ PMOVSXDQ PMOVZXDQ +syn keyword masmOpcode PTEST PCMPEQQ PACKUSDW MOVNTDQA + +" SSE 4.2 opcodes (Nehalem and later) +syn keyword masmOpcode PCMPESTRI PCMPESTRM PCMPISTRI PCMPISTRM PCMPGTQ +syn keyword masmOpcode CRC32 POPCNT LZCNT + +" AES-NI (Westmere (2010) and later) +syn keyword masmOpcode AESENC AESENCLAST AESDEC AESDECLAST +syn keyword masmOpcode AESKEYGENASSIST AESIMC PCLMULQDQ + +" AVX (Sandy Bridge (2011) and later) +syn keyword masmOpcode VBROADCASTSS VBROADCASTSD VBROADCASTF128 +syn keyword masmOpcode VINSERTF128 VEXTRACTF128 VMASKMOVPS VMASKMOVPD +syn keyword masmOpcode VPERMILPS VPERMILPD VPERM2F128 +syn keyword masmOpcode VZEROALL VZEROUPPER + " 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]\)\)\)\>" -" Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_masm_syntax_inits") - if version < 508 - let did_masm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink masmLabel PreProc - HiLink masmComment Comment - HiLink masmDirective Statement - HiLink masmType Type - HiLink masmOperator Type - HiLink masmOption Special - HiLink masmRegister Special - HiLink masmString String - HiLink masmText String - HiLink masmTitle Title - HiLink masmOpcode Statement - HiLink masmOpFloat Statement - - HiLink masmHexadecimal Number - HiLink masmDecimal Number - HiLink masmOctal Number - HiLink masmBinary Number - HiLink masmFloatRaw Number - HiLink masmFloat Number - - HiLink masmIdentifier Identifier - - syntax sync minlines=50 - - delcommand HiLink -endif +" The default highlighting +hi def link masmLabel PreProc +hi def link masmComment Comment +hi def link masmDirective Statement +hi def link masmType Type +hi def link masmOperator Type +hi def link masmOption Special +hi def link masmRegister Special +hi def link masmString String +hi def link masmText String +hi def link masmTitle Title +hi def link masmOpcode Statement +hi def link masmOpFloat Statement + +hi def link masmHexadecimal Number +hi def link masmDecimal Number +hi def link masmOctal Number +hi def link masmBinary Number +hi def link masmFloatRaw Number +hi def link masmFloat Number + +hi def link masmIdentifier Identifier + +syntax sync minlines=50 let b:current_syntax = "masm" diff --git a/runtime/syntax/mix.vim b/runtime/syntax/mix.vim new file mode 100644 index 000000000..9ab98eacf --- /dev/null +++ b/runtime/syntax/mix.vim @@ -0,0 +1,83 @@ +" Vim syntax file +" Language: MIX (Donald Knuth's assembly language used in TAOCP) +" Maintainer: Wu Yongwei <wuyongwei@gmail.com> +" Filenames: *.mixal *.mix +" Last Change: 2013 Nov 13 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case ignore + +" Special processing of ALF directive: implementations vary whether quotation +" marks are needed +syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixAlfDirective,mixString nextgroup=mixEndComment contained + +" Region for parameters +syn match mixParam #[-+*/:=0-9a-z,()"]\+# contains=mixIdentifier,mixSpecial,mixNumber,mixString,mixLabel nextgroup=mixEndComment contained + +" Comment at the line end +syn match mixEndComment ".*" contains=mixRegister contained + +" Identifier; must go before literals +syn match mixIdentifier "[a-z0-9_]\+" contained + +" Literals +syn match mixSpecial "[-+*/:=]" contained +syn match mixNumber "[0-9]\+\>" contained +syn region mixString start=+"+ skip=+\\"+ end=+"+ contained + +" Labels +syn match mixLabel "^[a-z0-9_]\{,10\}\s\+" nextgroup=mixAlfSpecial,mixOpcode,mixDirective +syn match mixLabel "[0-9][BF]" contained + +" Comments +syn match mixComment "^\*.*" contains=mixRegister + +" Directives +syn keyword mixDirective ORIG EQU CON END nextgroup=mixParam contained skipwhite +syn keyword mixDirective ALF nextgroup=mixAlfParam contained + +" Opcodes +syn keyword mixOpcode NOP HLT NUM CHAR FLOT FIX nextgroup=mixEndComment contained +syn keyword mixOpcode FADD FSUB FMUL FDIV FCMP MOVE ADD SUB MUL DIV IOC IN OUT JRED JBUS JMP JSJ JOV JNOV JL JE JG JLE JNE JGE SLA SRA SLAX SRAX SLC SRC nextgroup=mixParam contained skipwhite + +syn match mixOpcode "LD[AX1-6]N\?\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "ST[AX1-6JZ]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "EN[TN][AX1-6]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "INC[AX1-6]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "DEC[AX1-6]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "CMP[AX1-6]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "J[AX1-6]N\?[NZP]\>" nextgroup=mixParam contained skipwhite + +" Switch back to being case sensitive +syn case match + +" Registers (only to used in comments now) +syn keyword mixRegister rA rX rI1 rI2 rI3 rI4 rI5 rI6 rJ contained + +" The default highlighting +hi def link mixRegister Special +hi def link mixLabel Define +hi def link mixComment Comment +hi def link mixEndComment Comment +hi def link mixDirective Keyword +hi def link mixOpcode Keyword + +hi def link mixSpecial Special +hi def link mixNumber Number +hi def link mixString String +hi def link mixAlfParam String +hi def link mixIdentifier Identifier + +let b:current_syntax = "mix" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 |