local labels

This commit is contained in:
ARM9 2015-07-10 00:30:37 +02:00
parent 2935a2b0d6
commit eed9731438
2 changed files with 14 additions and 4 deletions

View File

@ -12,7 +12,7 @@ syn match armNumber "[#\$]\?\d\+\>"
syn match armNumber "[#\$]\?0b[01]\+\>"
syn match armNumber "[#\$]\?[01]\+b\>"
" floats
syn match armNumber "\d*\.\d\+f\?\>"
syn match armNumber "\d*\.\d\+\>"
" Comments
syn region armComment start="//\|@" end="$" contains=armTodo
@ -26,6 +26,7 @@ syn region armString start="'" skip=+\\'+ end="'\|$"
" Assembler identifiers/labels/directives
syn match armIdentifier "\<\h\w*\>"
syn match armLabel "\<\h\w*:"
syn match armLabel "\d\{1,2\}[:fb]"
syn match armCPreProc "#\h\w*\>"
so <sfile>:p:h/gas_directives.vim
@ -42,11 +43,11 @@ let armCond = '\%(AL\|CC\|CS\|EQ\|GE\|GT\|HI\|HS\|LE\|LO\|LS\|LT\|MI\|NE\|PL\|VC
"
" ARMv4 and thumb instructions
"
exec 'syn match armv4Instr "\%(ADC\|ADD\|ADR\|AND\|BIC\|EOR\|MLA\|MOV\|MUL\|MVN\|NEG\|ORR\|RSB\|RSC\|SBC\|SMLAL\|SMULL\|SUB\|UMLAL\|UMULL\)' . armCond . 'S\?\>"'
exec 'syn match armv4Instr "\%(ADC\|ADD\|AND\|BIC\|EOR\|MLA\|MOV\|MUL\|MVN\|NEG\|ORR\|RSB\|RSC\|SBC\|SMLAL\|SMULL\|SUB\|UMLAL\|UMULL\)' . armCond . 'S\?\>"'
exec 'syn match armv4InstrCond "\%(B\|BL\|BX\|CDP\|CMN\|CMP\|LDC\|MCR\|MRC\|MRS\|MSR\|STC\|SWI\|TEQ\|TST\)' . armCond . '\>"'
syn match armv4InstrNoCond "\%(ADRL\|ASR\|LSL\|LSR\|NOP\|POP\|PUSH\|ROR\|RRX\)\>"
syn match armv4InstrNoCond "\%(ASR\|LSL\|LSR\|NOP\|POP\|PUSH\|ROR\|RRX\)\>"
exec 'syn match armv4LDR "\%(LDR\)' . armCond . '\%(B\?T\?\|H\|S[BH]\)\?\>"'
exec 'syn match armv4STR "\%(STR\)' . armCond . '\%(B\?T\?\|H\)\?\>"'

View File

@ -1,11 +1,20 @@
1:
b 1b
bl 0f
2:
bx 2b
0:
adc r1, r15, R14
add A1, v1, V8
smull r0, r1,R2
smull r0, r1,R2
@ illegal
blx 0002f
smlalBt r1,r15
SMLawTb V8, v3
SMLALtb A1, a4
smull r0, r1,R2
@ vim:ft=armv4