fixed bug that caused some armv4 instructions to not highlight

This commit is contained in:
ARM9 2015-04-03 16:32:27 +02:00
parent e457b8cd10
commit c5eaf804fb
3 changed files with 22 additions and 19 deletions

View File

@ -18,7 +18,7 @@ if version >= 508 || !exists("did_armv5_syntax_inits")
command -nargs=+ HiLink hi def link <args>
endif
so <sfile>:p:h/include/arm_base_syntax.vim
so <sfile>:p:h/include/armv5_base_syntax.vim
HiLink armv4Instr armv5Instructions
HiLink armv5InstrCond armv5Instructions

View File

@ -53,22 +53,5 @@ exec 'syn match armv4STR "\%(STR\)' . armCond . '\%(B\?T\?\|H\)\?\>"'
exec 'syn match armv4Stack "\%(LDM\|STM\)' . armCond . '\%([ID][BA]\|[EF][DA]\)\>"'
exec 'syn match armv4SWP "SWP' . armCond . 'B\?\>"'
"
" ARMv5 instructions
"
exec 'syn match armv5InstrCond "\%(BLX\|CLZ\|MCRR\|MRRC\|QADD\|QSUB\|QDADD\|QDSUB\)' . armCond . '\>"'
HiLink armv4InstrCond armv5InstrCond
syn match armv5InstrNoCond "\%(BKPT\|CDP2\|LDC2\|MCR2\|MRC2\|PLD\|STC2\)\>"
HiLink armv4InstrNoCond armv5InstrNoCond
exec 'syn match armv5Mul "\%(SMLA\|SMLAL\|SMLAW\|SMUL\|SMULW\)[BT][BT]' . armCond . '\>"'
exec 'syn match armv5LDR "\%(LDR\)' . armCond . 'D\>"'
exec 'syn match armv5STR "\%(STR\)' . armCond . 'D\>"'
HiLink armv4LDR armv5LDR
HiLink armv4STR armv5STR
"syn match armRelative "@R[0-7]\|@a\s*+\s*dptr\|@[ab]"

View File

@ -0,0 +1,20 @@
so <sfile>:p:h/arm_base_syntax.vim
"
" ARMv5 instructions
"
exec 'syn match armv5InstrCond "\%(BLX\|CLZ\|MCRR\|MRRC\|QADD\|QSUB\|QDADD\|QDSUB\)' . armCond . '\>"'
HiLink armv4InstrCond armv5InstrCond
syn match armv5InstrNoCond "\%(BKPT\|CDP2\|LDC2\|MCR2\|MRC2\|PLD\|STC2\)\>"
HiLink armv4InstrNoCond armv5InstrNoCond
exec 'syn match armv5Mul "\%(SMLA\|SMLAL\|SMLAW\|SMUL\|SMULW\)[BT][BT]' . armCond . '\>"'
exec 'syn match armv5LDR "\%(LDR\)' . armCond . 'D\>"'
exec 'syn match armv5STR "\%(STR\)' . armCond . 'D\>"'
HiLink armv4LDR armv5LDR
HiLink armv4STR armv5STR