From eed97314387e218f0db909070c17dbdf94e3bc45 Mon Sep 17 00:00:00 2001 From: ARM9 Date: Fri, 10 Jul 2015 00:30:37 +0200 Subject: [PATCH] local labels --- syntax/include/arm_base_syntax.vim | 7 ++++--- test/armv4-test.s | 11 ++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/syntax/include/arm_base_syntax.vim b/syntax/include/arm_base_syntax.vim index 4e55b51..da3a486 100644 --- a/syntax/include/arm_base_syntax.vim +++ b/syntax/include/arm_base_syntax.vim @@ -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 :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\)\?\>"' diff --git a/test/armv4-test.s b/test/armv4-test.s index 36129b6..664bec6 100644 --- a/test/armv4-test.s +++ b/test/armv4-test.s @@ -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