Finnished ARMv6
This commit is contained in:
		
							
								
								
									
										64
									
								
								syntax/arm.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								syntax/arm.vim
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,64 @@
 | 
			
		||||
" Vim syntax file
 | 
			
		||||
" Language: ARM
 | 
			
		||||
" Maintainer: ARM9
 | 
			
		||||
 | 
			
		||||
if version < 600
 | 
			
		||||
  syntax clear
 | 
			
		||||
elseif exists("b:current_syntax")
 | 
			
		||||
  finish
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
syn case ignore
 | 
			
		||||
 | 
			
		||||
if version >= 508 || !exists("did_armv6_syntax_inits")
 | 
			
		||||
  if version < 508
 | 
			
		||||
    let did_armv6_syntax_inits = 1
 | 
			
		||||
    command -nargs=+ HiLink hi link <args>
 | 
			
		||||
  else
 | 
			
		||||
    command -nargs=+ HiLink hi def link <args>
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
  so <sfile>:p:h/include/arm_base_syntax.vim
 | 
			
		||||
 | 
			
		||||
  HiLink armv4Instr         armv6Instructions
 | 
			
		||||
  HiLink armv4Stack         armv6Instructions
 | 
			
		||||
  HiLink armv4SWP           armv6Instructions
 | 
			
		||||
 | 
			
		||||
  HiLink armv5InstrCond     armv6Instructions
 | 
			
		||||
  HiLink armv5InstrNoCond   armv6Instructions
 | 
			
		||||
  HiLink armv5Mul           armv6Instructions
 | 
			
		||||
  HiLink armv5LDR           armv6Instructions
 | 
			
		||||
  HiLink armv5STR           armv6Instructions
 | 
			
		||||
 | 
			
		||||
  HiLink armv6Instr         armv6Instructions
 | 
			
		||||
  HiLink armv6InstrNoCond   armv6Instructions
 | 
			
		||||
  HiLink armv6Mul           armv6Instructions
 | 
			
		||||
  HiLink armv6LDR           armv6Instructions
 | 
			
		||||
  HiLink armv6STR           armv6Instructions
 | 
			
		||||
  
 | 
			
		||||
  HiLink armv7Instr         armv6Instructions
 | 
			
		||||
 | 
			
		||||
  HiLink armNumericOp       armOperator
 | 
			
		||||
  HiLink armRelative        armOperator
 | 
			
		||||
 | 
			
		||||
  " Link to standard syn groups so the 'colorschemes' work
 | 
			
		||||
  HiLink armOperator        Operator
 | 
			
		||||
  HiLink armNumber          Number
 | 
			
		||||
  HiLink armComment         Comment
 | 
			
		||||
  HiLink armString          String
 | 
			
		||||
 | 
			
		||||
  HiLink armIdentifier      Label
 | 
			
		||||
  HiLink armLabel           Label
 | 
			
		||||
  HiLink gasDirective       PreProc
 | 
			
		||||
  HiLink armDirective       PreProc
 | 
			
		||||
  HiLink armCPreProc        Identifier
 | 
			
		||||
 | 
			
		||||
  HiLink armRegister        Type
 | 
			
		||||
  HiLink armv6Instructions  Function
 | 
			
		||||
 | 
			
		||||
  HiLink armTodo            Todo
 | 
			
		||||
  delcommand HiLink
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
let b:current_syntax = "arm"
 | 
			
		||||
 | 
			
		||||
@ -87,7 +87,6 @@ HiLink armv4STR  armv5STR
 | 
			
		||||
"
 | 
			
		||||
" VFP/NEON
 | 
			
		||||
"
 | 
			
		||||
exec 'syn match armVfp "\%(\)' . armCond . '\>"'
 | 
			
		||||
 | 
			
		||||
"syn match armRelative      "@R[0-7]\|@a\s*+\s*dptr\|@[ab]"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -15,9 +15,27 @@ syn keyword armv6Register Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15
 | 
			
		||||
" ARMv6 instructions
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
exec 'syn match armv6Instr "\%(SH\?\|Q\|U[QH]\?\)\%(ADD16\|SUB16\|ADD8\|SUB8\|ASX\|SAX\)' . armCond . '\>"'
 | 
			
		||||
 | 
			
		||||
exec 'syn match armv6Instr "\%(USAD8\|USADA8\|SSAT\|SSAT16\|USAT\|USAT16\)' . armCond . '\>"'
 | 
			
		||||
 | 
			
		||||
exec 'syn match armv6Instr "\%(MOVT\|MRA\|MAR\|MRRC2\|MCRR2\|ORN\|BFC\|BFI\|SBFX\|UBFX\)' . armCond . '\>"'
 | 
			
		||||
 | 
			
		||||
exec 'syn match armv6Instr "\%(PKHBT\|PKHTB\|SXTH\|SXTB16\|SXTB\|SXTAH\|SXTAB16\|SXTAB\|UXTH\|UXTB\|UXTB16\|UXTAH\|UXTAB16\|UXTAB\|RBIT\|REV\|REV16\|REVSH\|SEL\)' . armCond . '\>"'
 | 
			
		||||
 | 
			
		||||
exec 'syn match armv6Mul "\%(UMAAL\|SMUAD\|SMLAD\|SMLALD\|SMUSD\|SMLSD\|SMLSLD\|SMMUL\|SMMLA\|SMMLS\)' . armCond . '\>"'
 | 
			
		||||
 | 
			
		||||
exec 'syn match armv6LDR "\%(LDREX[HBD]\)' . armCond . '\>"'
 | 
			
		||||
exec 'syn match armv6STR "\%(STREX[HBD]\|CLREX\)' . armCond . '\>"'
 | 
			
		||||
 | 
			
		||||
syn match armv6InstrNoCond "\%(IT\|CBN\?Z\|TBB\|TBH\|CPSID\|CPSIE\|CPS\|SETEND\|SRS\%(IA\|IB\|DA\|DB\)\|RFE\%(IA\|IB\|DA\|DB\)\)"
 | 
			
		||||
 | 
			
		||||
exec 'syn match armv7Instr "\%(DBG\|DMB\|DSB\|ISB\|SEV\|WFE\|WFI\|YIELD\)' . armCond . '\>"'
 | 
			
		||||
 | 
			
		||||
"
 | 
			
		||||
" VFP/NEON
 | 
			
		||||
"
 | 
			
		||||
exec 'syn match armVfp "\%(\)' . armCond . '\>"'
 | 
			
		||||
 | 
			
		||||
syn match armVfp 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user