mie.vim: add comparison and branch instruction highlighting

This commit is contained in:
2025-04-28 15:51:53 +01:00
parent 75b90cfcb9
commit a94956ec78

View File

@@ -8,13 +8,13 @@ set cpoptions&vim
syn keyword mieUnspecifiedStatement record data define type global syn keyword mieUnspecifiedStatement record data define type global
syn keyword mieInstruction syn keyword mieInstruction
\ alloca load store call br cmp \ alloca load store call br cmp
\ c.z c.nz c.eq c.ne c.lt c.le c.gt c.ge \ add sub div mul msg
\ br br.t br.f
\ add sub div mul push pop msg
\ getelementptr switch ret \ getelementptr switch ret
syn keyword mieInstructionFlag
\ eq gt ge lt le
syn match mieRegister "%[0-9]\>" syn match mieRegister "%[0-9]\>"
syn match mieRegister "%[1-9][0-9]\+\>" syn match mieRegister "%[1-9][0-9]\+\>"
syn match mieRegister "%\w\+\>" syn match mieRegister "%[A-Za-z\.][A-Za-z0-9\.]*\>"
syn match mieIdentifier /@\(\w\+\)\(\.\(\w\+\)\)*\>/ syn match mieIdentifier /@\(\w\+\)\(\.\(\w\+\)\)*\>/
syn match mieIdentifier /@\.\(\w\+\)\(\.\(\w\+\)\)*\>/ syn match mieIdentifier /@\.\(\w\+\)\(\.\(\w\+\)\)*\>/
syn match mieLabel /\(\w\+\)\(\.\(\w\+\)\)*\:/ syn match mieLabel /\(\w\+\)\(\.\(\w\+\)\)*\:/
@@ -60,6 +60,7 @@ hi def link mieClassName Type
hi def link mieLambdaName @variable.parameter hi def link mieLambdaName @variable.parameter
hi def link mieInstruction Function hi def link mieInstruction Function
hi def link mieInstructionFlag StorageClass
hi def link mieIdentifier Identifier hi def link mieIdentifier Identifier
hi def link mieLabel Tag hi def link mieLabel Tag
hi def link mieIndexBase @variable.builtin hi def link mieIndexBase @variable.builtin