diff --git a/syntax/include/arm_base_syntax.vim b/syntax/include/arm_base_syntax.vim index b721d5a..bfa9b02 100644 --- a/syntax/include/arm_base_syntax.vim +++ b/syntax/include/arm_base_syntax.vim @@ -10,13 +10,13 @@ syn match armIdentifier "\<[.\$_A-Za-z0-9]\+\>" syn match armLabel "\<[.\$_A-Za-z0-9]\+:" " dec -syn match armNumber "[#\$]\?\d\+" +syn match armNumber "[#\$]\?\d\+\>" " hex -syn match armNumber "[#\$]\?0x\x\+" +syn match armNumber "[#\$]\?0x\x\+\>" " bin -syn match armNumber "[#\$]\?0b[01]\+" +syn match armNumber "[#\$]\?0b[01]\+\>" " floats -syn match armNumber "\%(\d\+\.\d*\|\d*\.\d\+\)\%([eE]\?[-+]\?\d\+\)\?" +syn match armNumber "\%(\d\+\.\d*\|\d*\.\d\+\)\%([eE]\?[-+]\?\d\+\)\?\>" " Comments syn region armComment start="//\|@" end="$" contains=armTodo @@ -33,12 +33,12 @@ so :p:h/arm_directives.vim syn match armCPreProc "^\s*#\s*\(include\|define\|undef\|if\|ifdef\|ifndef\|elif\|else\|endif\|error\|pragma\)\>" " Registers -syn match armRegister "R\%(1[0-5]\|[0-9]\)" -syn match armRegister "C\%(1[0-5]\|[0-9]\)" -syn match armRegister "P\%(1[0-5]\|[0-9]\)" +syn match armRegister "\" +syn match armRegister "\" +syn match armRegister "\" syn keyword armRegister FP SP LR PC SPSR CPSR CPSR_c CPSR_cxsf BP -syn match armRegister "A[1-3]" -syn match armRegister "V[1-8]" +syn match armRegister "\" +syn match armRegister "\" " Conditional field to avoid repetition let armCond = '\%(AL\|CC\|CS\|EQ\|GE\|GT\|HI\|HS\|LE\|LO\|LS\|LT\|MI\|NE\|PL\|VC\|VS\)\?' diff --git a/syntax/include/armv6_base_syntax.vim b/syntax/include/armv6_base_syntax.vim index 93abd76..7ec97c0 100644 --- a/syntax/include/armv6_base_syntax.vim +++ b/syntax/include/armv6_base_syntax.vim @@ -2,8 +2,8 @@ so :p:h/armv5_base_syntax.vim " VFP/NEON registers -syn match armv6Register "[SD]\%(3[01]\|[12]\?[0-9]\)\>" -syn match armv6Register "Q\%(1[0-5]\|[0-9]\)\>" +syn match armv6Register "\<[SD]\%(3[01]\|[12]\?[0-9]\)\>" +syn match armv6Register "\" " " ARMv6 instructions diff --git a/test/armv7-test.s b/test/armv7-test.s index 4854de8..aede69e 100644 --- a/test/armv7-test.s +++ b/test/armv7-test.s @@ -21,10 +21,11 @@ mla r5,R6 mov R6,R7 b 001b blx 0002f - +add r14,#4 +sub r13,#0x28 push {r0, r1, r2-r9} pop {r1-r14} -push {q0-q14} +vpush {q0-q14} FSHTOS @@ -38,14 +39,18 @@ fdivs vdiv vsqrt +s30doesd32 + vadd.i8 d12, d16, d31 vmull.s32 q2, d5, D6 .float .01, 3.14159 - +{14,140-402(0x1b-0b1101+.0#0.0#.0.[123]0xffff%#0x34%$0xf$#0b111#$0b11b{ldr#0b11-ldr1)} @ illegal 1.0f 0.f .1f vmul Q15, Q16, d31, s31, s32, d32 vmull q01, q09, q14, q16 pop {s3-s32} + +vadd#1234?ldr$12?str12 @ vim:ft=arm