KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

603 lines
30KB

  1. <?php
  2. /*************************************************************************************
  3. * asm.php
  4. * -------
  5. * Author: Tux (tux@inmail.cz)
  6. * Copyright: (c) 2004 Tux (http://tux.a4.cz/),
  7. * 2004-2009 Nigel McNie (http://qbnz.com/highlighter),
  8. * 2009-2011 Benny Baumann (http://qbnz.com/highlighter),
  9. * 2011 Dennis Yurichev (dennis@conus.info),
  10. * 2011 Marat Dukhan (mdukhan3.at.gatech.dot.edu)
  11. * Release Version: 1.0.8.11
  12. * Date Started: 2004/07/27
  13. *
  14. * x86 Assembler language file for GeSHi.
  15. * Based on the following documents:
  16. * - "Intel64 and IA-32 Architectures Programmer's Reference Manual
  17. * Volume 2 (2A & 2B): Instructions Set Reference, A-Z",
  18. * Order Number 25383-039US, May 2011
  19. * - "Intel Advanced Vector Extensions Programming Reference",
  20. * Order Number 319433-011, June 2011
  21. * - "AMD64 Architecture Programmer's Manual Volume 3:
  22. * General-Purpose and System Instructions", Publication No. 24594,
  23. * Revision 3.15, November 2009
  24. * - "AMD64 Architecture Programmer's Manual Volume 4:
  25. * 128-Bit and 256-Bit Media Instructions", Publication No. 26568,
  26. * Revision 3.12, May 2011
  27. * - "AMD64 Architecture Programmer's Manual Volume 5:
  28. * 64-Bit Media and x87 Floating-Point Instructions",
  29. * Publication No. 26569, Revision 3.11, December 2009
  30. * - "AMD64 Technology Lightweight Profiling Specification",
  31. * Publication No. 43724, Revision 3.08, August 2010
  32. * - "Application Note 108: Cyrix Extended MMX Instruction Set"
  33. * - "VIA Padlock Programming Guide", 3rd May 2005
  34. * - http://en.wikipedia.org/wiki/X86_instruction_listings
  35. * - NASM 2.10rc8 Online Documenation at
  36. * http://www.nasm.us/xdoc/2.10rc8/html/nasmdoc0.html
  37. * Color scheme is taken from SciTE. Previous versions of this file
  38. * also used words from SciTE configuration file (based on NASM syntax)
  39. *
  40. * CHANGES
  41. * -------
  42. * 2011/10/07
  43. * - Rearranged instructions and registers into groups
  44. * - Updated to support the following extensions
  45. * - CMOV, BMI1, BMI2, TBM, FSGSBASE
  46. * - LZCNT, TZCNT, POPCNT, MOVBE, CRC32
  47. * - MMX, MMX+, EMMX
  48. * - 3dnow!, 3dnow!+, 3dnow! Geode, 3dnow! Prefetch
  49. * - SSE, SSE2, SSE3, SSSE3, SSE4A, SSE4.1, SSE4.2
  50. * - AVX, AVX2, XOP, FMA3, FMA4, CVT16
  51. * - VMX, SVM
  52. * - AES, PCLMULQDQ, Padlock, RDRAND
  53. * - Updated NASM macros and directives
  54. * 2010/07/01 (1.0.8.11)
  55. * - Added MMX/SSE/new x86-64 registers, MMX/SSE (up to 4.2) instructions
  56. * 2008/05/23 (1.0.7.22)
  57. * - Added description of extra language features (SF#1970248)
  58. * 2004/11/27 (1.0.2)
  59. * - Added support for multiple object splitters
  60. * 2004/10/27 (1.0.1)
  61. * - Added support for URLs
  62. * - Added binary and hexadecimal regexps
  63. * 2004/08/05 (1.0.0)
  64. * - First Release
  65. *
  66. * TODO (updated 2004/11/27)
  67. * -------------------------
  68. *
  69. *************************************************************************************
  70. *
  71. * This file is part of GeSHi.
  72. *
  73. * GeSHi is free software; you can redistribute it and/or modify
  74. * it under the terms of the GNU General Public License as published by
  75. * the Free Software Foundation; either version 2 of the License, or
  76. * (at your option) any later version.
  77. *
  78. * GeSHi is distributed in the hope that it will be useful,
  79. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  80. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  81. * GNU General Public License for more details.
  82. *
  83. * You should have received a copy of the GNU General Public License
  84. * along with GeSHi; if not, write to the Free Software
  85. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  86. *
  87. ************************************************************************************/
  88. $language_data = array (
  89. 'LANG_NAME' => 'ASM',
  90. 'COMMENT_SINGLE' => array(1 => ';'),
  91. 'COMMENT_MULTI' => array(),
  92. //Line address prefix suppression
  93. 'COMMENT_REGEXP' => array(2 => "/^(?:[0-9a-f]{0,4}:)?[0-9a-f]{4}(?:[0-9a-f]{4})?/mi"),
  94. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  95. 'QUOTEMARKS' => array("'", '"'),
  96. 'ESCAPE_CHAR' => '',
  97. 'KEYWORDS' => array(
  98. /* General-Purpose */
  99. 1 => array(
  100. /* BCD instructions */
  101. 'aaa','aad','aam','aas','daa','das',
  102. /* Control flow instructions */
  103. 'ja','jae','jb','jbe','jc','je','jg','jge','jl','jle','jmp','jna',
  104. 'jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz',
  105. 'jo','jp','jpe','jpo','js','jz','jcxz','jecxz','jrcxz','loop','loope','loopne',
  106. 'call','ret','enter','leave','syscall','sysenter','int','into',
  107. /* Predicate instructions */
  108. 'seta','setae','setb','setbe','setc','sete','setg','setge','setl','setle','setna',
  109. 'setnae','setnb','setnbe','setnc','setne','setng','setnge','setnl','setnle','setno',
  110. 'setnp','setns','setnz','seto','setp','setpe','setpo','sets','setz','salc',
  111. /* Conditional move instructions */
  112. 'cmovo','cmovno','cmovb','cmovc','cmovnae','cmovae','cmovnb','cmovnc','cmove','cmovz',
  113. 'cmovne','cmovnz','cmovbe','cmovna','cmova','cmovnbe','cmovs','cmovns','cmovp','cmovpe',
  114. 'cmovnp','cmovpo','cmovl','cmovnge','cmovge','cmovnl','cmovle','cmovng','cmovg','cmovnle',
  115. /* ALU instructions */
  116. 'add','sub','adc','sbb','neg','cmp','inc','dec','and','or','xor','not','test',
  117. 'shl','shr','sal','sar','shld','shrd','rol','ror','rcl','rcr',
  118. 'cbw','cwd','cwde','cdq','cdqe','cqo','bsf','bsr','bt','btc','btr','bts',
  119. 'idiv','imul','div','mul','bswap','nop',
  120. /* Memory instructions */
  121. 'lea','mov','movsx','movsxd','movzx','xlatb','bound','xchg','xadd','cmpxchg','cmpxchg8b','cmpxchg16b',
  122. /* Stack instructions */
  123. 'push','pop','pusha','popa','pushad','popad','pushf','popf','pushfd','popfd','pushfq','popfq',
  124. /* EFLAGS manipulations instructions */
  125. 'clc','cld','stc','std','cmc','lahf','sahf',
  126. /* Prefix instructions */
  127. 'lock','rep','repe','repz','repne','repnz',
  128. /* String instructions */
  129. 'cmps','cmpsb','cmpsw',/*'cmpsd',*/ 'cmpsq', /*CMPSD conflicts with the SSE2 instructions of the same name*/
  130. 'movs','movsb','movsw',/*'movsd',*/ 'movsq', /*MOVSD conflicts with the SSE2 instructions of the same name*/
  131. 'scas','scasb','scasw','scasd','scasq',
  132. 'stos','stosb','stosw','stosd','stosq',
  133. 'lods','lodsb','lodsw','lodsd','lodsq',
  134. /* Information instructions */
  135. 'cpuid','rdtsc','rdtscp','rdpmc','xgetbv',
  136. 'sgdt','sidt','sldt','smsw','str','lar',
  137. /* LWP instructions */
  138. 'llwpcb','slwpcb','lwpval','lwpins',
  139. /* Instructions from miscellaneous extensions */
  140. 'crc32','popcnt','lzcnt','tzcnt','movbe','pclmulqdq','rdrand',
  141. /* FSGSBASE instructions */
  142. 'rdfsbase','rdgsbase','wrfsbase','wrgsbase',
  143. /* BMI1 instructions */
  144. 'andn','bextr','blsi','blsmk','blsr',
  145. /* BMI2 instructions */
  146. 'bzhi','mulx','pdep','pext','rorx','sarx','shlx','shrx',
  147. /* TBM instructions */
  148. 'blcfill','blci','blcic','blcmsk','blcs','blsfill','blsic','t1mskc','tzmsk',
  149. /* Legacy instructions */
  150. 'arpl','ud2','lds','les','lfs','lgs','lss','lsl','verr','verw',
  151. /* Privileged instructions */
  152. 'cli','sti','clts','hlt','rsm','in','insb','insw','insd',
  153. 'out','outsb','outsw','outsd','clflush','invd','invlpg','invpcid','wbinvd',
  154. 'iret','iretd','iretq','sysexit','sysret','lidt','lgdt','lldt','lmsw','ltr',
  155. 'monitor','mwait','rdmsr','wrmsr','swapgs',
  156. 'fxsave','fxsave64','fxrstor','fxrstor64',
  157. 'xsave','xsaveopt','xrstor','xsetbv','getsec',
  158. /* VMX instructions */
  159. 'invept','invvpid','vmcall','vmclear','vmlaunch','vmresume',
  160. 'vmptrld','vmptrst','vmread','vmwrite','vmxoff','vmxon',
  161. /* SVM (AMD-V) instructions */
  162. 'invlpga','skinit','clgi','stgi','vmload','vmsave','vmmcall','vmrun'
  163. ),
  164. /*FPU*/
  165. 2 => array(
  166. 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp',
  167. 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv',
  168. 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1',
  169. 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul',
  170. 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv',
  171. 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave',
  172. 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp',
  173. 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1',
  174. 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos',
  175. 'fstenvd','fucom','fucomp','fucompp','ffreep',
  176. /* FCMOV instructions */
  177. 'fcomi','fcomip','fucomi','fucomip',
  178. 'fcmovb','fcmove','fcmovbe','fcmovu','fcmovnb','fcmovne','fcmovnbe','fcmovnu',
  179. /* SSE3 instructions */
  180. 'fisttp'
  181. ),
  182. /*SIMD*/
  183. 3 => array(
  184. /* MMX instructions */
  185. 'movd','movq',
  186. 'paddb','paddw','paddd','paddsb','paddsw','paddusb','paddusw',
  187. 'psubb','psubw','psubd','psubsb','psubsw','psubusb','psubusw',
  188. 'pand','pandn','por','pxor',
  189. 'pcmpeqb','pcmpeqd','pcmpeqw','pcmpgtb','pcmpgtd','pcmpgtw',
  190. 'pmaddwd','pmulhw','pmullw',
  191. 'psllw','pslld','psllq','psrlw','psrld','psrlq','psraw','psrad',
  192. 'packuswb','packsswb','packssdw',
  193. 'punpcklbw','punpcklwd','punpckldq','punpckhbw','punpckhwd','punpckhdq',
  194. 'emms',
  195. /* MMX+ instructions */
  196. 'pavgb','pavgw',
  197. 'pextrw','pinsrw','pmovmskb',
  198. 'pmaxsw','pmaxub','pminsw','pminub',
  199. 'pmulhuw','psadbw','pshufw',
  200. 'prefetchnta','prefetcht0','prefetcht1','prefetcht2',
  201. 'maskmovq','movntq','sfence',
  202. /* EMMX instructions (only available on Cyrix MediaGXm) */
  203. 'paddsiw','psubsiw',
  204. /*'pmulhrw',*/'pmachriw','pmulhriw', /* PMULHRW conflicts with the 3dnow! instruction of the same name */
  205. 'pmagw','pdistib','paveb',
  206. 'pmvzb','pmvnzb','pmvlzb','pmvgezb',
  207. /* 3dnow! instructions! */
  208. 'pfacc','pfadd','pfsub','pfsubr','pfmul',
  209. 'pfcmpeq','pfcmpge','pfcmpgt',
  210. 'pfmax','pfmin',
  211. 'pfrcp','pfrcpit1','pfrcpit2','pfrsqit1','pfrsqrt',
  212. 'pi2fd','pf2id',
  213. 'pavgusb','pmulhrw',
  214. 'femms',
  215. /* 3dnow!+ instructions */
  216. 'pfnacc','pfpnacc','pi2fw','pf2iw','pswapd',
  217. /* 3dnow! Geode instructions */
  218. 'pfrsqrtv','pfrcpv',
  219. /* 3dnow! Prefetch instructions */
  220. 'prefetch','prefetchw',
  221. /* SSE instructions */
  222. 'addss','addps','subss','subps',
  223. 'mulss','mulps','divss','divps','sqrtss','sqrtps',
  224. 'rcpss','rcpps','rsqrtss','rsqrtps',
  225. 'maxss','maxps','minss','minps',
  226. 'cmpss','comiss','ucomiss','cmpps',
  227. 'cmpeqss','cmpltss','cmpless','cmpunordss','cmpneqss','cmpnltss','cmpnless','cmpordss',
  228. 'cmpeqps','cmpltps','cmpleps','cmpunordps','cmpneqps','cmpnltps','cmpnleps','cmpordps',
  229. 'andnps','andps','orps','xorps',
  230. 'cvtsi2ss','cvtss2si','cvttss2si',
  231. 'cvtpi2ps','cvtps2pi','cvttps2pi',
  232. 'movss','movlps','movhps','movlhps','movhlps','movaps','movups','movntps','movmskps',
  233. 'shufps','unpckhps','unpcklps',
  234. 'ldmxcsr','stmxcsr',
  235. /* SSE2 instructions */
  236. 'addpd','addsd','subpd','subsd',
  237. 'mulsd','mulpd','divsd','divpd','sqrtsd','sqrtpd',
  238. 'maxsd','maxpd','minsd','minpd',
  239. 'cmpsd','comisd','ucomisd','cmppd',
  240. 'cmpeqsd','cmpltsd','cmplesd','cmpunordsd','cmpneqsd','cmpnltsd','cmpnlesd','cmpordsd',
  241. 'cmpeqpd','cmpltpd','cmplepd','cmpunordpd','cmpneqpd','cmpnltpd','cmpnlepd','cmpordpd',
  242. 'andnpd','andpd','orpd','xorpd',
  243. 'cvtsd2ss','cvtpd2ps','cvtss2sd','cvtps2pd',
  244. 'cvtdq2ps','cvtps2dq','cvttps2dq',
  245. 'cvtdq2pd','cvtpd2dq','cvttpd2dq',
  246. 'cvtsi2sd','cvtsd2si','cvttsd2si',
  247. 'cvtpi2pd','cvtpd2pi','cvttpd2pi',
  248. 'movsd','movlpd','movhpd','movapd','movupd','movntpd','movmskpd',
  249. 'shufpd','unpckhpd','unpcklpd',
  250. 'movnti','movdqa','movdqu','movntdq','maskmovdqu',
  251. 'movdq2q','movq2dq',
  252. 'paddq','psubq','pmuludq',
  253. 'pslldq','psrldq',
  254. 'punpcklqdq','punpckhqdq',
  255. 'pshufhw','pshuflw','pshufd',
  256. 'lfence','mfence',
  257. /* SSE3 instructions */
  258. 'addsubps','addsubpd',
  259. 'haddps','haddpd','hsubps','hsubpd',
  260. 'movsldup','movshdup','movddup',
  261. 'lddqu',
  262. /* SSSE3 instructions */
  263. 'psignb','psignw','psignd',
  264. 'pabsb','pabsw','pabsd',
  265. 'palignr','pshufb',
  266. 'pmulhrsw','pmaddubsw',
  267. 'phaddw','phaddd','phaddsw',
  268. 'phsubw','phsubd','phsubsw',
  269. /* SSE4A instructions */
  270. 'extrq','insertq','movntsd','movntss',
  271. /* SSE4.1 instructions */
  272. 'mpsadbw','phminposuw',
  273. 'pmuldq','pmulld',
  274. 'dpps','dppd',
  275. 'blendps','blendpd','blendvps','blendvpd','pblendvb','pblendw',
  276. 'pmaxsb','pmaxuw','pmaxsd','pmaxud','pminsb','pminuw','pminsd','pminud',
  277. 'roundps','roundss','roundpd','roundsd',
  278. 'insertps','pinsrb','pinsrd','pinsrq',
  279. 'extractps','pextrb','pextrd','pextrq',
  280. 'pmovsxbw','pmovsxbd','pmovsxbq','pmovsxwd','pmovsxwq','pmovsxdq',
  281. 'pmovzxbw','pmovzxbd','pmovzxbq','pmovzxwd','pmovzxwq','pmovzxdq',
  282. 'ptest',
  283. 'pcmpeqq',
  284. 'packusdw',
  285. 'movntdqa',
  286. /* SSE4.2 instructions */
  287. 'pcmpgtq',
  288. 'pcmpestri','pcmpestrm','pcmpistri','pcmpistrm',
  289. /* AES instructions */
  290. 'aesenc','aesenclast','aesdec','aesdeclast','aeskeygenassist','aesimc',
  291. /* VIA Padlock instructions */
  292. 'xcryptcbc','xcryptcfb','xcryptctr','xcryptecb','xcryptofb',
  293. 'xsha1','xsha256','montmul','xstore',
  294. /* AVX instructions */
  295. 'vaddss','vaddps','vaddsd','vaddpd','vsubss','vsubps','vsubsd','vsubpd',
  296. 'vaddsubps','vaddsubpd',
  297. 'vhaddps','vhaddpd','vhsubps','vhsubpd',
  298. 'vmulss','vmulps','vmulsd','vmulpd',
  299. 'vmaxss','vmaxps','vmaxsd','vmaxpd','vminss','vminps','vminsd','vminpd',
  300. 'vandps','vandpd','vandnps','vandnpd','vorps','vorpd','vxorps','vxorpd',
  301. 'vblendps','vblendpd','vblendvps','vblendvpd',
  302. 'vcmpss','vcomiss','vucomiss','vcmpsd','vcomisd','vucomisd','vcmpps','vcmppd',
  303. 'vcmpeqss','vcmpltss','vcmpless','vcmpunordss','vcmpneqss','vcmpnltss','vcmpnless','vcmpordss',
  304. 'vcmpeq_uqss','vcmpngess','vcmpngtss','vcmpfalsess','vcmpneq_oqss','vcmpgess','vcmpgtss','vcmptruess',
  305. 'vcmpeq_osss','vcmplt_oqss','vcmple_oqss','vcmpunord_sss','vcmpneq_usss','vcmpnlt_uqss','vcmpnle_uqss','vcmpord_sss',
  306. 'vcmpeq_usss','vcmpnge_uqss','vcmpngt_uqss','vcmpfalse_osss','vcmpneq_osss','vcmpge_oqss','vcmpgt_oqss','vcmptrue_usss',
  307. 'vcmpeqps','vcmpltps','vcmpleps','vcmpunordps','vcmpneqps','vcmpnltps','vcmpnleps','vcmpordps',
  308. 'vcmpeq_uqps','vcmpngeps','vcmpngtps','vcmpfalseps','vcmpneq_oqps','vcmpgeps','vcmpgtps','vcmptrueps',
  309. 'vcmpeq_osps','vcmplt_oqps','vcmple_oqps','vcmpunord_sps','vcmpneq_usps','vcmpnlt_uqps','vcmpnle_uqps','vcmpord_sps',
  310. 'vcmpeq_usps','vcmpnge_uqps','vcmpngt_uqps','vcmpfalse_osps','vcmpneq_osps','vcmpge_oqps','vcmpgt_oqps','vcmptrue_usps',
  311. 'vcmpeqsd','vcmpltsd','vcmplesd','vcmpunordsd','vcmpneqsd','vcmpnltsd','vcmpnlesd','vcmpordsd',
  312. 'vcmpeq_uqsd','vcmpngesd','vcmpngtsd','vcmpfalsesd','vcmpneq_oqsd','vcmpgesd','vcmpgtsd','vcmptruesd',
  313. 'vcmpeq_ossd','vcmplt_oqsd','vcmple_oqsd','vcmpunord_ssd','vcmpneq_ussd','vcmpnlt_uqsd','vcmpnle_uqsd','vcmpord_ssd',
  314. 'vcmpeq_ussd','vcmpnge_uqsd','vcmpngt_uqsd','vcmpfalse_ossd','vcmpneq_ossd','vcmpge_oqsd','vcmpgt_oqsd','vcmptrue_ussd',
  315. 'vcmpeqpd','vcmpltpd','vcmplepd','vcmpunordpd','vcmpneqpd','vcmpnltpd','vcmpnlepd','vcmpordpd',
  316. 'vcmpeq_uqpd','vcmpngepd','vcmpngtpd','vcmpfalsepd','vcmpneq_oqpd','vcmpgepd','vcmpgtpd','vcmptruepd',
  317. 'vcmpeq_ospd','vcmplt_oqpd','vcmple_oqpd','vcmpunord_spd','vcmpneq_uspd','vcmpnlt_uqpd','vcmpnle_uqpd','vcmpord_spd',
  318. 'vcmpeq_uspd','vcmpnge_uqpd','vcmpngt_uqpd','vcmpfalse_ospd','vcmpneq_ospd','vcmpge_oqpd','vcmpgt_oqpd','vcmptrue_uspd',
  319. 'vcvtsd2ss','vcvtpd2ps','vcvtss2sd','vcvtps2pd',
  320. 'vcvtsi2ss','vcvtss2si','vcvttss2si',
  321. 'vcvtpi2ps','vcvtps2pi','vcvttps2pi',
  322. 'vcvtdq2ps','vcvtps2dq','vcvttps2dq',
  323. 'vcvtdq2pd','vcvtpd2dq','vcvttpd2dq',
  324. 'vcvtsi2sd','vcvtsd2si','vcvttsd2si',
  325. 'vcvtpi2pd','vcvtpd2pi','vcvttpd2pi',
  326. 'vdivss','vdivps','vdivsd','vdivpd','vsqrtss','vsqrtps','vsqrtsd','vsqrtpd',
  327. 'vdpps','vdppd',
  328. 'vmaskmovps','vmaskmovpd',
  329. 'vmovss','vmovsd','vmovaps','vmovapd','vmovups','vmovupd','vmovntps','vmovntpd',
  330. 'vmovhlps','vmovlhps','vmovlps','vmovlpd','vmovhps','vmovhpd',
  331. 'vmovsldup','vmovshdup','vmovddup',
  332. 'vmovmskps','vmovmskpd',
  333. 'vroundss','vroundps','vroundsd','vroundpd',
  334. 'vrcpss','vrcpps','vrsqrtss','vrsqrtps',
  335. 'vunpcklps','vunpckhps','vunpcklpd','vunpckhpd',
  336. 'vbroadcastss','vbroadcastsd','vbroadcastf128',
  337. 'vextractps','vinsertps','vextractf128','vinsertf128',
  338. 'vshufps','vshufpd','vpermilps','vpermilpd','vperm2f128',
  339. 'vtestps','vtestpd',
  340. 'vpaddb','vpaddusb','vpaddsb','vpaddw','vpaddusw','vpaddsw','vpaddd','vpaddq',
  341. 'vpsubb','vpsubusb','vpsubsb','vpsubw','vpsubusw','vpsubsw','vpsubd','vpsubq',
  342. 'vphaddw','vphaddsw','vphaddd','vphsubw','vphsubsw','vphsubd',
  343. 'vpsllw','vpslld','vpsllq','vpsrlw','vpsrld','vpsrlq','vpsraw','vpsrad',
  344. 'vpand','vpandn','vpor','vpxor',
  345. 'vpblendwb','vpblendw',
  346. 'vpsignb','vpsignw','vpsignd',
  347. 'vpavgb','vpavgw',
  348. 'vpabsb','vpabsw','vpabsd',
  349. 'vmovd','vmovq','vmovdqa','vmovdqu','vlddqu','vmovntdq','vmovntdqa','vmaskmovdqu',
  350. 'vpmovsxbw','vpmovsxbd','vpmovsxbq','vpmovsxwd','vpmovsxwq','vpmovsxdq',
  351. 'vpmovzxbw','vpmovzxbd','vpmovzxbq','vpmovzxwd','vpmovzxwq','vpmovzxdq',
  352. 'vpackuswb','vpacksswb','vpackusdw','vpackssdw',
  353. 'vpcmpeqb','vpcmpeqw','vpcmpeqd','vpcmpeqq','vpcmpgtb','vpcmpgtw','vpcmpgtd','vpcmpgtq',
  354. 'vpmaddubsw','vpmaddwd',
  355. 'vpmullw','vpmulhuw','vpmulhw','vpmulhrsw','vpmulld','vpmuludq','vpmuldq',
  356. 'vpmaxub','vpmaxsb','vpmaxuw','vpmaxsw','vpmaxud','vpmaxsd',
  357. 'vpminub','vpminsb','vpminuw','vpminsw','vpminud','vpminsd',
  358. 'vpmovmskb','vptest',
  359. 'vpunpcklbw','vpunpcklwd','vpunpckldq','vpunpcklqdq',
  360. 'vpunpckhbw','vpunpckhwd','vpunpckhdq','vpunpckhqdq',
  361. 'vpslldq','vpsrldq','vpalignr',
  362. 'vpshufb','vpshuflw','vpshufhw','vpshufd',
  363. 'vpextrb','vpextrw','vpextrd','vpextrq','vpinsrb','vpinsrw','vpinsrd','vpinsrq',
  364. 'vpsadbw','vmpsadbw','vphminposuw',
  365. 'vpcmpestri','vpcmpestrm','vpcmpistri','vpcmpistrm',
  366. 'vpclmulqdq','vaesenc','vaesenclast','vaesdec','vaesdeclast','vaeskeygenassist','vaesimc',
  367. 'vldmxcsr','vstmxcsr','vzeroall','vzeroupper',
  368. /* AVX2 instructions */
  369. 'vbroadcasti128','vpbroadcastb','vpbroadcastw','vpbroadcastd','vpbroadcastq',
  370. 'vpblendd',
  371. 'vpermd','vpermq','vperm2i128',
  372. 'vextracti128','vinserti128',
  373. 'vpmaskmovd','vpmaskmovq',
  374. 'vpsllvd','vpsllvq','vpsravd','vpsrlvd',
  375. 'vpgatherdd','vpgatherqd','vgatherdq','vgatherqq',
  376. 'vpermps','vpermpd',
  377. 'vgatherdpd','vgatherqpd','vgatherdps','vgatherqps',
  378. /* XOP instructions */
  379. 'vfrczss','vfrczps','vfrczsd','vfrczpd',
  380. 'vpermil2ps','vperlil2pd',
  381. 'vpcomub','vpcomb','vpcomuw','vpcomw','vpcomud','vpcomd','vpcomuq','vpcomq',
  382. 'vphaddubw','vphaddbw','vphaddubd','vphaddbd','vphaddubq','vphaddbq',
  383. 'vphadduwd','vphaddwd','vphadduwq','vphaddwq','vphaddudq','vphadddq',
  384. 'vphsubbw','vphsubwd','vphsubdq',
  385. 'vpmacsdd','vpmacssdd','vpmacsdql','vpmacssdql','vpmacsdqh','vpmacssdqh',
  386. 'vpmacsww','vpmacssww','vpmacswd','vpmacsswd',
  387. 'vpmadcswd','vpmadcsswd',
  388. 'vpcmov','vpperm',
  389. 'vprotb','vprotw','vprotd','vprotq',
  390. 'vpshab','vpshaw','vpshad','vpshaq',
  391. 'vpshlb','vpshlw','vpshld','vpshlq',
  392. /* CVT16 instructions */
  393. 'vcvtph2ps','vcvtps2ph',
  394. /* FMA4 instructions */
  395. 'vfmaddss','vfmaddps','vfmaddsd','vfmaddpd',
  396. 'vfmsubss','vfmsubps','vfmsubsd','vfmsubpd',
  397. 'vnfmaddss','vnfmaddps','vnfmaddsd','vnfmaddpd',
  398. 'vnfmsubss','vnfmsubps','vnfmsubsd','vnfmsubpd',
  399. 'vfmaddsubps','vfmaddsubpd','vfmsubaddps','vfmsubaddpd',
  400. /* FMA3 instructions */
  401. 'vfmadd132ss','vfmadd213ss','vfmadd231ss',
  402. 'vfmadd132ps','vfmadd213ps','vfmadd231ps',
  403. 'vfmadd132sd','vfmadd213sd','vfmadd231sd',
  404. 'vfmadd132pd','vfmadd213pd','vfmadd231pd',
  405. 'vfmaddsub132ps','vfmaddsub213ps','vfmaddsub231ps',
  406. 'vfmaddsub132pd','vfmaddsub213pd','vfmaddsub231pd',
  407. 'vfmsubadd132ps','vfmsubadd213ps','vfmsubadd231ps',
  408. 'vfmsubadd132pd','vfmsubadd213pd','vfmsubadd231pd',
  409. 'vfmsub132ss','vfmsub213ss','vfmsub231ss',
  410. 'vfmsub132ps','vfmsub213ps','vfmsub231ps',
  411. 'vfmsub132sd','vfmsub213sd','vfmsub231sd',
  412. 'vfmsub132pd','vfmsub213pd','vfmsub231pd',
  413. 'vfnmadd132ss','vfnmadd213ss','vfnmadd231ss',
  414. 'vfnmadd132ps','vfnmadd213ps','vfnmadd231ps',
  415. 'vfnmadd132sd','vfnmadd213sd','vfnmadd231sd',
  416. 'vfnmadd132pd','vfnmadd213pd','vfnmadd231pd',
  417. 'vfnmsub132ss','vfnmsub213ss','vfnmsub231ss',
  418. 'vfnmsub132ps','vfnmsub213ps','vfnmsub231ps',
  419. 'vfnmsub132sd','vfnmsub213sd','vfnmsub231sd',
  420. 'vfnmsub132pd','vfnmsub213pd','vfnmsub231pd'
  421. ),
  422. /*registers*/
  423. 4 => array(
  424. /* General-Purpose Registers */
  425. 'al','ah','bl','bh','cl','ch','dl','dh','sil','dil','bpl','spl',
  426. 'r8b','r9b','r10b','r11b','r12b','r13b','r14b','r15b',
  427. 'ax','bx','cx','dx','si','di','bp','sp',
  428. 'r8w','r9w','r10w','r11w','r12w','r13w','r14w','r15w',
  429. 'eax','ebx','ecx','edx','esi','edi','ebp','esp',
  430. 'r8d','r9d','r10d','r11d','r12d','r13d','r14d','r15d',
  431. 'rax','rcx','rdx','rbx','rsp','rbp','rsi','rdi',
  432. 'r8','r9','r10','r11','r12','r13','r14','r15',
  433. /* Debug Registers */
  434. 'dr0','dr1','dr2','dr3','dr6','dr7',
  435. /* Control Registers */
  436. 'cr0','cr2','cr3','cr4','cr8',
  437. /* Test Registers (Supported on Intel 486 only) */
  438. 'tr3','tr4','tr5','tr6','tr7',
  439. /* Segment Registers */
  440. 'cs','ds','es','fs','gs','ss',
  441. /* FPU Registers */
  442. 'st','st0','st1','st2','st3','st4','st5','st6','st7',
  443. /* MMX Registers */
  444. 'mm0','mm1','mm2','mm3','mm4','mm5','mm6','mm7',
  445. /* SSE Registers */
  446. 'xmm0','xmm1','xmm2','xmm3','xmm4','xmm5','xmm6','xmm7',
  447. 'xmm8','xmm9','xmm10','xmm11','xmm12','xmm13','xmm14','xmm15',
  448. /* AVX Registers */
  449. 'ymm0','ymm1','ymm2','ymm3','ymm4','ymm5','ymm6','ymm7',
  450. 'ymm8','ymm9','ymm10','ymm11','ymm12','ymm13','ymm14','ymm15'
  451. ),
  452. /*Directive*/
  453. 5 => array(
  454. 'db','dw','dd','dq','dt','do','dy',
  455. 'resb','resw','resd','resq','rest','reso','resy','incbin','equ','times','safeseh',
  456. '__utf16__','__utf32__',
  457. 'default','cpu','float','start','imagebase','osabi',
  458. '..start','..imagebase','..gotpc','..gotoff','..gottpoff','..got','..plt','..sym','..tlsie',
  459. 'section','segment','__sect__','group','absolute',
  460. '.bss','.comment','.data','.lbss','.ldata','.lrodata','.rdata','.rodata','.tbss','.tdata','.text',
  461. 'alloc','bss','code','exec','data','noalloc','nobits','noexec','nowrite','progbits','rdata','tls','write',
  462. 'private','public','common','stack','overlay','class',
  463. 'extern','global','import','export',
  464. '%define','%idefine','%xdefine','%ixdefine','%assign','%undef',
  465. '%defstr','%idefstr','%deftok','%ideftok',
  466. '%strcat','%strlen','%substr',
  467. '%macro','%imacro','%rmacro','%exitmacro','%endmacro','%unmacro',
  468. '%if','%ifn','%elif','%elifn','%else','%endif',
  469. '%ifdef','%ifndef','%elifdef','%elifndef',
  470. '%ifmacro','%ifnmacro','%elifmacro','%elifnmacro',
  471. '%ifctx','%ifnctx','%elifctx','%elifnctx',
  472. '%ifidn','%ifnidn','%elifidn','%elifnidn',
  473. '%ifidni','%ifnidni','%elifidni','%elifnidni',
  474. '%ifid','%ifnid','%elifid','%elifnid',
  475. '%ifnum','%ifnnum','%elifnum','%elifnnum',
  476. '%ifstr','%ifnstr','%elifstr','%elifnstr',
  477. '%iftoken','%ifntoken','%eliftoken','%elifntoken',
  478. '%ifempty','%ifnempty','%elifempty','%elifnempty',
  479. '%ifenv','%ifnenv','%elifenv','%elifnenv',
  480. '%rep','%exitrep','%endrep',
  481. '%while','%exitwhile','%endwhile',
  482. '%include','%pathsearch','%depend','%use',
  483. '%push','%pop','%repl','%arg','%local','%stacksize','flat','flat64','large','small',
  484. '%error','%warning','%fatal',
  485. '%00','.nolist','%rotate','%line','%!','%final','%clear',
  486. 'struc','endstruc','istruc','at','iend',
  487. 'align','alignb','sectalign',
  488. 'bits','use16','use32','use64',
  489. '__nasm_major__','__nasm_minor__','__nasm_subminor__','___nasm_patchlevel__',
  490. '__nasm_version_id__','__nasm_ver__',
  491. '__file__','__line__','__pass__','__bits__','__output_format__',
  492. '__date__','__time__','__date_num__','__time_num__','__posix_time__',
  493. '__utc_date__','__utc_time__','__utc_date_num__','__utc_time_num__',
  494. '__float_daz__','__float_round__','__float__',
  495. /* Keywords from standard packages */
  496. '__use_altreg__',
  497. '__use_smartalign__','smartalign','__alignmode__',
  498. '__use_fp__','__infinity__','__nan__','__qnan__','__snan__',
  499. '__float8__','__float16__','__float32__','__float64__','__float80m__','__float80e__','__float128l__','__float128h__'
  500. ),
  501. /*Operands*/
  502. 6 => array(
  503. 'a16','a32','a64','o16','o32','o64','strict',
  504. 'byte','word','dword','qword','tword','oword','yword','nosplit',
  505. '%0','%1','%2','%3','%4','%5','%6','%7','%8','%9',
  506. 'abs','rel',
  507. 'seg','wrt'
  508. )
  509. ),
  510. 'SYMBOLS' => array(
  511. 1 => array(
  512. '[', ']', '(', ')',
  513. '+', '-', '*', '/', '%',
  514. '.', ',', ';', ':'
  515. ),
  516. 2 => array(
  517. '$','$$','%+','%?','%??'
  518. )
  519. ),
  520. 'CASE_SENSITIVE' => array(
  521. GESHI_COMMENTS => false,
  522. 1 => false,
  523. 2 => false,
  524. 3 => false,
  525. 4 => false,
  526. 5 => false,
  527. 6 => false
  528. ),
  529. 'STYLES' => array(
  530. 'KEYWORDS' => array(
  531. 1 => 'color: #00007f; font-weight: bold;',
  532. 2 => 'color: #0000ff;',
  533. 3 => 'color: #b00040;',
  534. 4 => 'color: #46aa03; font-weight: bold;',
  535. 5 => 'color: #0000ff; font-weight: bold;',
  536. 6 => 'color: #0000ff; font-weight: bold;'
  537. ),
  538. 'COMMENTS' => array(
  539. 1 => 'color: #666666; font-style: italic;',
  540. 2 => 'color: #adadad; font-style: italic;'
  541. ),
  542. 'ESCAPE_CHAR' => array(
  543. 0 => 'color: #000099; font-weight: bold;'
  544. ),
  545. 'BRACKETS' => array(
  546. 0 => 'color: #009900; font-weight: bold;'
  547. ),
  548. 'STRINGS' => array(
  549. 0 => 'color: #7f007f;'
  550. ),
  551. 'NUMBERS' => array(
  552. 0 => 'color: #ff0000;'
  553. ),
  554. 'METHODS' => array(
  555. ),
  556. 'SYMBOLS' => array(
  557. 1 => 'color: #339933;',
  558. 2 => 'color: #0000ff; font-weight: bold;'
  559. ),
  560. 'REGEXPS' => array(
  561. ),
  562. 'SCRIPT' => array(
  563. )
  564. ),
  565. 'URLS' => array(
  566. 1 => '',
  567. 2 => '',
  568. 3 => '',
  569. 4 => '',
  570. 5 => '',
  571. 6 => ''
  572. ),
  573. 'NUMBERS' =>
  574. GESHI_NUMBER_BIN_PREFIX_PERCENT |
  575. GESHI_NUMBER_BIN_SUFFIX |
  576. GESHI_NUMBER_HEX_PREFIX |
  577. GESHI_NUMBER_HEX_SUFFIX |
  578. GESHI_NUMBER_OCT_SUFFIX |
  579. GESHI_NUMBER_INT_BASIC |
  580. GESHI_NUMBER_FLT_NONSCI |
  581. GESHI_NUMBER_FLT_NONSCI_F |
  582. GESHI_NUMBER_FLT_SCI_ZERO,
  583. 'OOLANG' => false,
  584. 'OBJECT_SPLITTERS' => array(
  585. ),
  586. 'REGEXPS' => array(
  587. ),
  588. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  589. 'SCRIPT_DELIMITERS' => array(
  590. ),
  591. 'HIGHLIGHT_STRICT_BLOCK' => array(
  592. ),
  593. 'TAB_WIDTH' => 8,
  594. 'PARSER_CONTROL' => array(
  595. 'KEYWORDS' => array(
  596. 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\#>|^])",
  597. 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])"
  598. )
  599. )
  600. );
  601. ?>