Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
ia64.vim294 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:		IA-64 (Itanium) assembly language3" Maintainer:		Doug Kearns <dougkearns@gmail.com>4" Previous Maintainer:	Parth Malwankar <pmalwankar@yahoo.com>5" File Version:		0.86" Last Change:		2020 Sep 257 8" quit when a syntax file was already loaded9if exists("b:current_syntax")10  finish11endif12 13 14"ignore case for assembly15syn case ignore16 17syn sync minlines=518 19" Read the MASM syntax to start with20" This is needed as both IA-64 as well as IA-32 instructions are supported21source <sfile>:p:h/masm.vim22 23"  Identifier Keyword characters (defines \k)24syn iskeyword @,48-57,#,$,.,:,?,@-@,_,~25 26syn region ia64Comment start="//"  end="$"   contains=ia64Todo27syn region ia64Comment start="/\*" end="\*/" contains=ia64Todo28 29syn match ia64Identifier	"[a-zA-Z_$][a-zA-Z0-9_$]*"30syn match ia64Directive		"\.[a-zA-Z_$][a-zA-Z_$.]\+"31syn match ia64Label		"[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=:\>"he=e-132syn match ia64Label		"[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=::\>"he=e-233syn match ia64Label		"[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=#\>"he=e-134syn region ia64string		start=+L\="+ skip=+\\\\\|\\"+ end=+"+35syn match ia64Octal		"0[0-7_]*\>"36syn match ia64Binary		"0[bB][01_]*\>"37syn match ia64Hex		"0[xX][0-9a-fA-F_]*\>"38syn match ia64Decimal		"[1-9_][0-9_]*\>"39syn match ia64Float		"[0-9_]*\.[0-9_]*\([eE][+-]\=[0-9_]*\)\=\>"40 41"simple instructions42syn keyword ia64opcode add adds addl addp4 alloc and andcm cover epc43syn keyword ia64opcode fabs fand fandcm fc flushrs fneg fnegabs for44syn keyword ia64opcode fpabs fpack fpneg fpnegabs fselect fand fabdcm45syn keyword ia64opcode fc fwb fxor loadrs movl mux1 mux2 or padd446syn keyword ia64opcode pavgsub1 pavgsub2 popcnt psad1 pshl2 pshl4 pshladd247syn keyword ia64opcode pshradd2 psub4 rfi rsm rum shl shladd shladdp448syn keyword ia64opcode shrp ssm sub sum sync.i tak thash49syn keyword ia64opcode tpa ttag xor50 51"put to override these being recognized as floats. They are orignally from masm.vim52"put here to avoid confusion with float53syn match   ia64Directive       "\.186"54syn match   ia64Directive       "\.286"55syn match   ia64Directive       "\.286c"56syn match   ia64Directive       "\.286p"57syn match   ia64Directive       "\.287"58syn match   ia64Directive       "\.386"59syn match   ia64Directive       "\.386c"60syn match   ia64Directive       "\.386p"61syn match   ia64Directive       "\.387"62syn match   ia64Directive       "\.486"63syn match   ia64Directive       "\.486c"64syn match   ia64Directive       "\.486p"65syn match   ia64Directive       "\.8086"66syn match   ia64Directive       "\.8087"67 68 69 70"delimiters71syn match ia64delimiter ";;"72 73"operators74syn match ia64operators "[\[\]()#,]"75syn match ia64operators "\(+\|-\|=\)"76 77"TODO78syn match ia64Todo      "\(TODO\|XXX\|FIXME\|NOTE\)"79 80"What follows is a long list of regular expressions for parsing the81"ia64 instructions that use many completers82 83"br84syn match ia64opcode "br\(\(\.\(cond\|call\|ret\|ia\|cloop\|ctop\|cexit\|wtop\|wexit\)\)\=\(\.\(spnt\|dpnt\|sptk\|dptk\)\)\=\(\.few\|\.many\)\=\(\.clr\)\=\)\=\>"85"break86syn match ia64opcode "break\(\.[ibmfx]\)\=\>"87"brp88syn match ia64opcode "brp\(\.\(sptk\|dptk\|loop\|exit\)\)\(\.imp\)\=\>"89syn match ia64opcode "brp\.ret\(\.\(sptk\|dptk\)\)\{1}\(\.imp\)\=\>"90"bsw91syn match ia64opcode "bsw\.[01]\>"92"chk93syn match ia64opcode "chk\.\(s\(\.[im]\)\=\)\>"94syn match ia64opcode "chk\.a\.\(clr\|nc\)\>"95"clrrrb96syn match ia64opcode "clrrrb\(\.pr\)\=\>"97"cmp/cmp498syn match ia64opcode "cmp4\=\.\(eq\|ne\|l[te]\|g[te]\|[lg]tu\|[lg]eu\)\(\.unc\)\=\>"99syn match ia64opcode "cmp4\=\.\(eq\|[lgn]e\|[lg]t\)\.\(\(or\(\.andcm\|cm\)\=\)\|\(and\(\(\.or\)\=cm\)\=\)\)\>"100"cmpxchg101syn match ia64opcode "cmpxchg[1248]\.\(acq\|rel\)\(\.nt1\|\.nta\)\=\>"102"czx103syn match ia64opcode "czx[12]\.[lr]\>"104"dep105syn match ia64opcode "dep\(\.z\)\=\>"106"extr107syn match ia64opcode "extr\(\.u\)\=\>"108"fadd109syn match ia64opcode "fadd\(\.[sd]\)\=\(\.s[0-3]\)\=\>"110"famax/famin111syn match ia64opcode "fa\(max\|min\)\(\.s[0-3]\)\=\>"112"fchkf/fmax/fmin113syn match ia64opcode "f\(chkf\|max\|min\)\(\.s[0-3]\)\=\>"114"fclass115syn match ia64opcode "fclass\(\.n\=m\)\(\.unc\)\=\>"116"fclrf/fpamax117syn match ia64opcode "f\(clrf\|pamax\|pamin\)\(\.s[0-3]\)\=\>"118"fcmp119syn match ia64opcode "fcmp\.\(n\=[lg][te]\|n\=eq\|\(un\)\=ord\)\(\.unc\)\=\(\.s[0-3]\)\=\>"120"fcvt/fcvt.xf/fcvt.xuf.pc.sf121syn match ia64opcode "fcvt\.\(\(fxu\=\(\.trunc\)\=\(\.s[0-3]\)\=\)\|\(xf\|xuf\(\.[sd]\)\=\(\.s[0-3]\)\=\)\)\>"122"fetchadd123syn match ia64opcode "fetchadd[48]\.\(acq\|rel\)\(\.nt1\|\.nta\)\=\>"124"fma/fmpy/fms125syn match ia64opcode "fm\([as]\|py\)\(\.[sd]\)\=\(\.s[0-3]\)\=\>"126"fmerge/fpmerge127syn match ia64opcode "fp\=merge\.\(ns\|se\=\)\>"128"fmix129syn match ia64opcode "fmix\.\(lr\|[lr]\)\>"130"fnma/fnorm/fnmpy131syn match ia64opcode "fn\(ma\|mpy\|orm\)\(\.[sd]\)\=\(\.s[0-3]\)\=\>"132"fpcmp133syn match ia64opcode "fpcmp\.\(n\=[lg][te]\|n\=eq\|\(un\)\=ord\)\(\.s[0-3]\)\=\>"134"fpcvt135syn match ia64opcode "fpcvt\.fxu\=\(\(\.trunc\)\=\(\.s[0-3]\)\=\)\>"136"fpma/fpmax/fpmin/fpmpy/fpms/fpnma/fpnmpy/fprcpa/fpsqrta137syn match ia64opcode "fp\(max\=\|min\|n\=mpy\|ms\|nma\|rcpa\|sqrta\)\(\.s[0-3]\)\=\>"138"frcpa/frsqrta139syn match ia64opcode "fr\(cpa\|sqrta\)\(\.s[0-3]\)\=\>"140"fsetc/famin/fchkf141syn match ia64opcode "f\(setc\|amin\|chkf\)\(\.s[0-3]\)\=\>"142"fsub143syn match ia64opcode "fsub\(\.[sd]\)\=\(\.s[0-3]\)\=\>"144"fswap145syn match ia64opcode "fswap\(\.n[lr]\=\)\=\>"146"fsxt147syn match ia64opcode "fsxt\.[lr]\>"148"getf149syn match ia64opcode "getf\.\([sd]\|exp\|sig\)\>"150"invala151syn match ia64opcode "invala\(\.[ae]\)\=\>"152"itc/itr153syn match ia64opcode "it[cr]\.[id]\>"154"ld155syn match ia64opcode "ld[1248]\>\|ld[1248]\(\.\(sa\=\|a\|c\.\(nc\|clr\(\.acq\)\=\)\|acq\|bias\)\)\=\(\.nt[1a]\)\=\>"156syn match ia64opcode "ld8\.fill\(\.nt[1a]\)\=\>"157"ldf158syn match ia64opcode "ldf[sde8]\(\(\.\(sa\=\|a\|c\.\(nc\|clr\)\)\)\=\(\.nt[1a]\)\=\)\=\>"159syn match ia64opcode "ldf\.fill\(\.nt[1a]\)\=\>"160"ldfp161syn match ia64opcode "ldfp[sd8]\(\(\.\(sa\=\|a\|c\.\(nc\|clr\)\)\)\=\(\.nt[1a]\)\=\)\=\>"162"lfetch163syn match ia64opcode "lfetch\(\.fault\(\.excl\)\=\|\.excl\)\=\(\.nt[12a]\)\=\>"164"mf165syn match ia64opcode "mf\(\.a\)\=\>"166"mix167syn match ia64opcode "mix[124]\.[lr]\>"168"mov169syn match ia64opcode "mov\(\.[im]\)\=\>"170syn match ia64opcode "mov\(\.ret\)\=\(\(\.sptk\|\.dptk\)\=\(\.imp\)\=\)\=\>"171"nop172syn match ia64opcode "nop\(\.[ibmfx]\)\=\>"173"pack174syn match ia64opcode "pack\(2\.[su]ss\|4\.sss\)\>"175"padd //padd4 added to keywords176syn match ia64opcode "padd[12]\(\.\(sss\|uus\|uuu\)\)\=\>"177"pavg178syn match ia64opcode "pavg[12]\(\.raz\)\=\>"179"pcmp180syn match ia64opcode "pcmp[124]\.\(eq\|gt\)\>"181"pmax/pmin182syn match ia64opcode "pm\(ax\|in\)\(\(1\.u\)\|2\)\>"183"pmpy184syn match ia64opcode "pmpy2\.[rl]\>"185"pmpyshr186syn match ia64opcode "pmpyshr2\(\.u\)\=\>"187"probe188syn match ia64opcode "probe\.[rw]\>"189syn match ia64opcode "probe\.\(\(r\|w\|rw\)\.fault\)\>"190"pshr191syn match ia64opcode "pshr[24]\(\.u\)\=\>"192"psub193syn match ia64opcode "psub[12]\(\.\(sss\|uu[su]\)\)\=\>"194"ptc195syn match ia64opcode "ptc\.\(l\|e\|ga\=\)\>"196"ptr197syn match ia64opcode "ptr\.\(d\|i\)\>"198"setf199syn match ia64opcode "setf\.\(s\|d\|exp\|sig\)\>"200"shr201syn match ia64opcode "shr\(\.u\)\=\>"202"srlz203syn match ia64opcode "srlz\(\.[id]\)\>"204"st205syn match ia64opcode "st[1248]\(\.rel\)\=\(\.nta\)\=\>"206syn match ia64opcode "st8\.spill\(\.nta\)\=\>"207"stf208syn match ia64opcode "stf[1248]\(\.nta\)\=\>"209syn match ia64opcode "stf\.spill\(\.nta\)\=\>"210"sxt211syn match ia64opcode "sxt[124]\>"212"tbit/tnat213syn match ia64opcode "t\(bit\|nat\)\(\.nz\|\.z\)\=\(\.\(unc\|or\(\.andcm\|cm\)\=\|and\(\.orcm\|cm\)\=\)\)\=\>"214"unpack215syn match ia64opcode "unpack[124]\.[lh]\>"216"xchq217syn match ia64opcode "xchg[1248]\(\.nt[1a]\)\=\>"218"xma/xmpy219syn match ia64opcode "xm\(a\|py\)\.[lh]u\=\>"220"zxt221syn match ia64opcode "zxt[124]\>"222 223 224"The regex for different ia64 registers are given below225 226"limits the rXXX and fXXX and cr suffix in the range 0-127227syn match ia64registers "\([fr]\|cr\)\([0-9]\|[1-9][0-9]\|1[0-1][0-9]\|12[0-7]\)\{1}\>"228"branch ia64registers229syn match ia64registers "b[0-7]\>"230"predicate ia64registers231syn match ia64registers "p\([0-9]\|[1-5][0-9]\|6[0-3]\)\>"232"application ia64registers233syn match ia64registers "ar\.\(fpsr\|mat\|unat\|rnat\|pfs\|bsp\|bspstore\|rsc\|lc\|ec\|ccv\|itc\|k[0-7]\)\>"234"ia32 AR's235syn match ia64registers "ar\.\(eflag\|fcr\|csd\|ssd\|cflg\|fsr\|fir\|fdr\)\>"236"sp/gp/pr/pr.rot/rp237syn keyword ia64registers sp gp pr pr.rot rp ip tp238"in/out/local239syn match ia64registers "\(in\|out\|loc\)\([0-9]\|[1-8][0-9]\|9[0-5]\)\>"240"argument ia64registers241syn match ia64registers "farg[0-7]\>"242"return value ia64registers243syn match ia64registers "fret[0-7]\>"244"psr245syn match ia64registers "psr\(\.\(l\|um\)\)\=\>"246"cr247syn match ia64registers "cr\.\(dcr\|itm\|iva\|pta\|ipsr\|isr\|ifa\|iip\|itir\|iipa\|ifs\|iim\|iha\|lid\|ivr\|tpr\|eoi\|irr[0-3]\|itv\|pmv\|lrr[01]\|cmcv\)\>"248"Indirect registers249syn match ia64registers "\(cpuid\|dbr\|ibr\|pkr\|pmc\|pmd\|rr\|itr\|dtr\)\>"250"MUX permutations for 8-bit elements251syn match ia64registers "\(@rev\|@mix\|@shuf\|@alt\|@brcst\)\>"252"floating point classes253syn match ia64registers "\(@nat\|@qnan\|@snan\|@pos\|@neg\|@zero\|@unorm\|@norm\|@inf\)\>"254"link relocation operators255syn match ia64registers "\(@\(\(\(gp\|sec\|seg\|image\)rel\)\|ltoff\|fptr\|ptloff\|ltv\|section\)\)\>"256 257"Data allocation syntax258syn match ia64data "data[1248]\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>"259syn match ia64data "real\([48]\|1[06]\)\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>"260syn match ia64data "stringz\=\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>"261 262" Define the default highlighting.263" Only when an item doesn't have highlighting yet264 265"put masm groups with our groups266hi def link masmOperator	ia64operator267hi def link masmDirective	ia64Directive268hi def link masmOpcode		ia64Opcode269hi def link masmIdentifier	ia64Identifier270hi def link masmFloat		ia64Float271 272"ia64 specific stuff273hi def link ia64Label		Define274hi def link ia64Comment		Comment275hi def link ia64Directive	Type276hi def link ia64opcode		Statement277hi def link ia64registers	Operator278hi def link ia64string		String279hi def link ia64Hex		Number280hi def link ia64Binary		Number281hi def link ia64Octal		Number282hi def link ia64Float		Float283hi def link ia64Decimal		Number284hi def link ia64Identifier	Identifier285hi def link ia64data		Type286hi def link ia64delimiter	Delimiter287hi def link ia64operator	Operator288hi def link ia64Todo		Todo289 290 291let b:current_syntax = "ia64"292 293" vim: ts=8 sw=2294 
codekingpro/portable-devtools · Team Ai