Nasm syntax highlighting is out of date with no support for 64 bit registers or SSE2+ opcodes. This patch adds both of these.
-- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
# HG changeset patch # User Mike Sampson <[email protected]> # Date 1285415926 -36000 # Branch nasm-syntax # Node ID 1411ca2068ac67d3b5ba980c764e822e419426b2 # Parent d0049ff5969e3aa82999e9c5550f09da7b294ff5 Update nasm syntax file with 64 bit registers plus SSE2 - SSE4. diff -r d0049ff5969e -r 1411ca2068ac runtime/syntax/nasm.vim --- a/runtime/syntax/nasm.vim Tue Sep 21 22:34:02 2010 +0200 +++ b/runtime/syntax/nasm.vim Sat Sep 25 21:58:46 2010 +1000 @@ -231,16 +231,18 @@ syn match nasmGen08Register "\<[A-D][HL]\>" syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>" syn match nasmGen32Register "\<E\([A-D]X\|[DS]I\|[BS]P\)\>" +syn match nasmGen64Register "\<R\([A-D]X\|[DS]I\|[BS]P\)\>" +syn match nasmGen64Register "\<R\(8\|9\|1[0-5]\)[BDW]\=\>" syn match nasmSegRegister "\<[C-GS]S\>" -syn match nasmSpcRegister "\<E\=IP\>" +syn match nasmSpcRegister "\<[ER]\=IP\>" syn match nasmFpuRegister "\<ST\o\>" syn match nasmMmxRegister "\<MM\o\>" syn match nasmSseRegister "\<XMM\o\>" +syn match nasm64SseRegister "\<XMM\([8-9]\|1[0-5]\)\>" syn match nasmCtrlRegister "\<CR\o\>" syn match nasmDebugRegister "\<DR\o\>" syn match nasmTestRegister "\<TR\o\>" syn match nasmRegisterError "\<\(CR[15-9]\|DR[4-58-9]\|TR[0-28-9]\)\>" -syn match nasmRegisterError "\<X\=MM[8-9]\>" syn match nasmRegisterError "\<ST\((\d)\|[8-9]\>\)" syn match nasmRegisterError "\<E\([A-D][HL]\|[C-GS]S\)\>" " Memory reference operand (address): @@ -393,6 +395,40 @@ syn keyword nasmSseInstruction SHUFPS SQRTPS SQRTSS STMXCSR SUBPS SUBSS syn keyword nasmSseInstruction UCOMISS UNPCKHPS UNPCKLPS XORPS +" Streaming SIMD Extension 2 Packed Instructions: (requires SSE2 unit) +syn keyword nasmSse2Instruction ADDPD ADDSD ANDNPD ANDPD CMPPD CMPSD +syn keyword nasmSse2Instruction COMISD CVTDQ2PD CVTDQ2PS CVTPD2DQ CVTPD2PI +syn keyword nasmSse2Instruction CVTPD2PS CVTPI2PD CVTPS2DQ CVTPS2PD CVTSD2SI +syn keyword nasmSse2Instruction CVTSD2SS CVTSI2SD CVTSS2SD CVTTPD2DQ +syn keyword nasmSse2Instruction CVTTPD2PI CVTTPS2DQ CVTTSD2SI DIVPD DIVSD +syn keyword nasmSse2Instruction MAXPD MAXSD MINPD MINSD MOVAPD MOVDQ2Q MOVDQA +syn keyword nasmSse2Instruction MOVDQU MOVHPD MOVLPD MOVMSKPD MOVQ2DQ MOVSD +syn keyword nasmSse2Instruction MOVUPD MULPD MULSD ORDP PADDQ PMULUDQ PSHUFHW +syn keyword nasmSse2Instruction PSHUFLW PSHUFD PSLLDQ PSRLDQ PSUBQ PUNPCKHQDQ +syn keyword nasmSse2Instruction PUNPCKLQDQ SHUFPD SQRTPD SQRTSD SUBPD SUBSD +syn keyword nasmSse2Instruction UCOMISD UNPCKHPD UNPCKLPD XORPD + +" Streaming SIMD Extension 3 Packed Instructions: (requires SSE3 unit) +syn keyword nasmSse3Instruction ADDSUBPD ADDSUBPS HADDPD HADDPS HSUBPD HSUBPS +syn keyword nasmSse3Instruction MOVDDUP MOVSHDUP MOVSLDUP + +" Supplemental Streaming SIMD Extension 3 Packed Instructions: (requires SSSE3 unit) +syn keyword nasmSsse3Instruction PSIGNW PSIGND PSIGNB PSHUFB PMULHRSW PMADDUBSW +syn keyword nasmSsse3Instruction PHSUBW PHSUBSW PHSUBD PHADDW PHADDSW PHADDD +syn keyword nasmSsse3Instruction PALIGNR PABSW PABSD PABSB + +" Streaming SIMD Extension 4 Packed Instructions: (requires SSE4 unit) +syn keyword nasmSse4Instruction BLENDPD BLENDPS BLENDVPD BLENDVPS CRC32 DPPD +syn keyword nasmSse4Instruction DPPS EXTRACTPS EXTRQ INSERTPS INSERTQ LZCNT +syn keyword nasmSse4Instruction MOVNTDQA MOVNTSD MOVNTSS MPSADBW PACKUSDW +syn keyword nasmSse4Instruction PBLENDVB PBLENDW PCMPEQQ PCMPESTRI PCMPESTRM +syn keyword nasmSse4Instruction PCMPGTQ PCMPISTRI PCMPISTRM PEXTRB PEXTRD PEXTRQ +syn keyword nasmSse4Instruction PEXTRW PHMINPOSUW PINSRB PINSRD PINSRQ PMAXSB +syn keyword nasmSse4Instruction PMAXSD PMAXUD PMAXUW PMINSB PMINSD PMINUD PMINUW +syn keyword nasmSse4Instruction PMOVSXBD PMOVSXBQ PMOVSXBW PMOVSXDQ PMOVSXWD +syn keyword nasmSse4Instruction PMOVSXWQ PMOVZXBD PMOVZXBQ PMOVZXBW PMOVZXDQ +syn keyword nasmSse4Instruction PMOVZXWD PMOVZXWQ PMULDQ PMULLD POPCNT PTEST +syn keyword nasmSse4Instruction ROUNDPD ROUNDPS ROUNDSD ROUNDSS " Three Dimensional Now Packed Instructions: (requires 3DNow! unit) syn keyword nasmNowInstruction FEMMS PAVGUSB PF2ID PFACC PFADD PFCMPEQ PFCMPGE @@ -508,6 +544,10 @@ HiLink nasmFpuInstruction Statement HiLink nasmMmxInstruction Statement HiLink nasmSseInstruction Statement + HiLink nasmSse2Instruction Statement + HiLink nasmSse3Instruction Statement + HiLink nasmSsse3Instruction Statement + HiLink nasmSse4Instruction Statement HiLink nasmNowInstruction Statement HiLink nasmAmdInstruction Special HiLink nasmCrxInstruction Special
