metag.h 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080
  1. /* Imagination Technologies Meta opcode table.
  2. Copyright (C) 2013-2015 Free Software Foundation, Inc.
  3. Contributed by Imagination Technologies Ltd.
  4. This file is part of GDB and GAS.
  5. GDB and GAS are free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 3, or (at
  8. your option) any later version.
  9. GDB and GAS are distributed in the hope that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with GDB or GAS; see the file COPYING3. If not, write to the
  15. Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
  16. MA 02110-1301, USA. */
  17. enum metag_unit
  18. {
  19. UNIT_CT,
  20. UNIT_D0,
  21. UNIT_D1,
  22. UNIT_A0,
  23. UNIT_A1,
  24. UNIT_PC,
  25. UNIT_RD,
  26. UNIT_TR,
  27. UNIT_TT,
  28. UNIT_FX,
  29. UNIT_DT, /* DSP Template Table */
  30. UNIT_ACC_D0,
  31. UNIT_ACC_D1,
  32. UNIT_RAM_D0,
  33. UNIT_RAM_D1,
  34. };
  35. typedef struct
  36. {
  37. const char * name;
  38. enum metag_unit unit;
  39. unsigned int no;
  40. } metag_reg;
  41. static const metag_reg metag_regtab[] =
  42. {
  43. { "TXENABLE", UNIT_CT, 0 },
  44. { "CT.0", UNIT_CT, 0 },
  45. { "TXMODE", UNIT_CT, 1 },
  46. { "CT.1", UNIT_CT, 1 },
  47. { "TXSTATUS", UNIT_CT, 2 },
  48. { "CT.2", UNIT_CT, 2 },
  49. { "TXRPT", UNIT_CT, 3 },
  50. { "CT.3", UNIT_CT, 3 },
  51. { "TXTIMER", UNIT_CT, 4 },
  52. { "CT.4", UNIT_CT, 4 },
  53. { "TXL1START", UNIT_CT, 5 },
  54. { "CT.5", UNIT_CT, 5 },
  55. { "TXL1END", UNIT_CT, 6 },
  56. { "CT.6", UNIT_CT, 6 },
  57. { "TXL1COUNT", UNIT_CT, 7 },
  58. { "CT.7", UNIT_CT, 7 },
  59. { "TXL2START", UNIT_CT, 8 },
  60. { "CT.8", UNIT_CT, 8 },
  61. { "TXL2END", UNIT_CT, 9 },
  62. { "CT.9", UNIT_CT, 9 },
  63. { "TXL2COUNT", UNIT_CT, 10 },
  64. { "CT.10", UNIT_CT, 10 },
  65. { "TXBPOBITS", UNIT_CT, 11 },
  66. { "CT.11", UNIT_CT, 11 },
  67. { "TXMRSIZE", UNIT_CT, 12 },
  68. { "CT.12", UNIT_CT, 12 },
  69. { "TXTIMERI", UNIT_CT, 13 },
  70. { "CT.13", UNIT_CT, 13 },
  71. { "TXDRCTRL", UNIT_CT, 14 },
  72. { "CT.14", UNIT_CT, 14 },
  73. { "TXDRSIZE", UNIT_CT, 15 },
  74. { "CT.15", UNIT_CT, 15 },
  75. { "TXCATCH0", UNIT_CT, 16 },
  76. { "CT.16", UNIT_CT, 16 },
  77. { "TXCATCH1", UNIT_CT, 17 },
  78. { "CT.17", UNIT_CT, 17 },
  79. { "TXCATCH2", UNIT_CT, 18 },
  80. { "CT.18", UNIT_CT, 18 },
  81. { "TXCATCH3", UNIT_CT, 19 },
  82. { "CT.19", UNIT_CT, 19 },
  83. { "TXDEFR", UNIT_CT, 20 },
  84. { "CT.20", UNIT_CT, 20 },
  85. { "TXCPRS", UNIT_CT, 21 },
  86. { "CT.21", UNIT_CT, 21 },
  87. { "TXCLKCTRL", UNIT_CT, 22 },
  88. { "CT.22", UNIT_CT, 22 },
  89. { "TXINTERN0", UNIT_CT, 23 },
  90. { "TXSTATE", UNIT_CT, 23 },
  91. { "CT.23", UNIT_CT, 23 },
  92. { "TXAMAREG0", UNIT_CT, 24 },
  93. { "CT.24", UNIT_CT, 24 },
  94. { "TXAMAREG1", UNIT_CT, 25 },
  95. { "CT.25", UNIT_CT, 25 },
  96. { "TXAMAREG2", UNIT_CT, 26 },
  97. { "CT.26", UNIT_CT, 26 },
  98. { "TXAMAREG3", UNIT_CT, 27 },
  99. { "CT.27", UNIT_CT, 27 },
  100. { "TXDIVTIME", UNIT_CT, 28 },
  101. { "CT.28", UNIT_CT, 28 },
  102. { "TXPRIVEXT", UNIT_CT, 29 },
  103. { "CT.29", UNIT_CT, 29 },
  104. { "TXTACTCYC", UNIT_CT, 30 },
  105. { "TXACTCYC", UNIT_CT, 30 },
  106. { "CT.30", UNIT_CT, 30 },
  107. { "TXIDLECYC", UNIT_CT, 31 },
  108. { "CT.31", UNIT_CT, 31 },
  109. { "D0Re0", UNIT_D0, 0 },
  110. { "D0.0", UNIT_D0, 0 },
  111. { "D0Ar6", UNIT_D0, 1 },
  112. { "D0.1", UNIT_D0, 1 },
  113. { "D0Ar4", UNIT_D0, 2 },
  114. { "D0.2", UNIT_D0, 2 },
  115. { "D0Ar2", UNIT_D0, 3 },
  116. { "D0.3", UNIT_D0, 3 },
  117. { "D0FrT", UNIT_D0, 4 },
  118. { "D0.4", UNIT_D0, 4 },
  119. { "D0.5", UNIT_D0, 5 },
  120. { "D0.6", UNIT_D0, 6 },
  121. { "D0.7", UNIT_D0, 7 },
  122. { "D0.8", UNIT_D0, 8 },
  123. { "D0.9", UNIT_D0, 9 },
  124. { "D0.10", UNIT_D0, 10 },
  125. { "D0.11", UNIT_D0, 11 },
  126. { "D0.12", UNIT_D0, 12 },
  127. { "D0.13", UNIT_D0, 13 },
  128. { "D0.14", UNIT_D0, 14 },
  129. { "D0.15", UNIT_D0, 15 },
  130. { "D0.16", UNIT_D0, 16 },
  131. { "D0.17", UNIT_D0, 17 },
  132. { "D0.18", UNIT_D0, 18 },
  133. { "D0.19", UNIT_D0, 19 },
  134. { "D0.20", UNIT_D0, 20 },
  135. { "D0.21", UNIT_D0, 21 },
  136. { "D0.22", UNIT_D0, 22 },
  137. { "D0.23", UNIT_D0, 23 },
  138. { "D0.24", UNIT_D0, 24 },
  139. { "D0.25", UNIT_D0, 25 },
  140. { "D0.26", UNIT_D0, 26 },
  141. { "D0.27", UNIT_D0, 27 },
  142. { "D0.28", UNIT_D0, 28 },
  143. { "D0.29", UNIT_D0, 29 },
  144. { "D0.30", UNIT_D0, 30 },
  145. { "D0.31", UNIT_D0, 31 },
  146. { "D1Re0", UNIT_D1, 0 },
  147. { "D1.0", UNIT_D1, 0 },
  148. { "D1Ar5", UNIT_D1, 1 },
  149. { "D1.1", UNIT_D1, 1 },
  150. { "D1Ar3", UNIT_D1, 2 },
  151. { "D1.2", UNIT_D1, 2 },
  152. { "D1Ar1", UNIT_D1, 3 },
  153. { "D1.3", UNIT_D1, 3 },
  154. { "D1RtP", UNIT_D1, 4 },
  155. { "D1.4", UNIT_D1, 4 },
  156. { "D1.5", UNIT_D1, 5 },
  157. { "D1.6", UNIT_D1, 6 },
  158. { "D1.7", UNIT_D1, 7 },
  159. { "D1.8", UNIT_D1, 8 },
  160. { "D1.9", UNIT_D1, 9 },
  161. { "D1.10", UNIT_D1, 10 },
  162. { "D1.11", UNIT_D1, 11 },
  163. { "D1.12", UNIT_D1, 12 },
  164. { "D1.13", UNIT_D1, 13 },
  165. { "D1.14", UNIT_D1, 14 },
  166. { "D1.15", UNIT_D1, 15 },
  167. { "D1.16", UNIT_D1, 16 },
  168. { "D1.17", UNIT_D1, 17 },
  169. { "D1.18", UNIT_D1, 18 },
  170. { "D1.19", UNIT_D1, 19 },
  171. { "D1.20", UNIT_D1, 20 },
  172. { "D1.21", UNIT_D1, 21 },
  173. { "D1.22", UNIT_D1, 22 },
  174. { "D1.23", UNIT_D1, 23 },
  175. { "D1.24", UNIT_D1, 24 },
  176. { "D1.25", UNIT_D1, 25 },
  177. { "D1.26", UNIT_D1, 26 },
  178. { "D1.27", UNIT_D1, 27 },
  179. { "D1.28", UNIT_D1, 28 },
  180. { "D1.29", UNIT_D1, 29 },
  181. { "D1.30", UNIT_D1, 30 },
  182. { "D1.31", UNIT_D1, 31 },
  183. { "A0StP", UNIT_A0, 0 },
  184. { "A0.0", UNIT_A0, 0 },
  185. { "A0FrP", UNIT_A0, 1 },
  186. { "A0.1", UNIT_A0, 1 },
  187. { "A0.2", UNIT_A0, 2 },
  188. { "A0.3", UNIT_A0, 3 },
  189. { "A0.4", UNIT_A0, 4 },
  190. { "A0.5", UNIT_A0, 5 },
  191. { "A0.6", UNIT_A0, 6 },
  192. { "A0.7", UNIT_A0, 7 },
  193. { "A0.8", UNIT_A0, 8 },
  194. { "A0.9", UNIT_A0, 9 },
  195. { "A0.10", UNIT_A0, 10 },
  196. { "A0.11", UNIT_A0, 11 },
  197. { "A0.12", UNIT_A0, 12 },
  198. { "A0.13", UNIT_A0, 13 },
  199. { "A0.14", UNIT_A0, 14 },
  200. { "A0.15", UNIT_A0, 15 },
  201. { "CPC0", UNIT_A0, 16 },
  202. { "A1GbP", UNIT_A1, 0 },
  203. { "A1.0", UNIT_A1, 0 },
  204. { "A1LbP", UNIT_A1, 1 },
  205. { "A1.1", UNIT_A1, 1 },
  206. { "A1.2", UNIT_A1, 2 },
  207. { "A1.3", UNIT_A1, 3 },
  208. { "A1.4", UNIT_A1, 4 },
  209. { "A1.5", UNIT_A1, 5 },
  210. { "A1.6", UNIT_A1, 6 },
  211. { "A1.7", UNIT_A1, 7 },
  212. { "A1.8", UNIT_A1, 8 },
  213. { "A1.9", UNIT_A1, 9 },
  214. { "A1.10", UNIT_A1, 10 },
  215. { "A1.11", UNIT_A1, 11 },
  216. { "A1.12", UNIT_A1, 12 },
  217. { "A1.13", UNIT_A1, 13 },
  218. { "A1.14", UNIT_A1, 14 },
  219. { "A1.15", UNIT_A1, 15 },
  220. { "CPC1", UNIT_A1, 16 },
  221. { "PC", UNIT_PC, 0 },
  222. { "PCX", UNIT_PC, 1 },
  223. { "RD", UNIT_RD, 0 },
  224. { "RA", UNIT_RD, 16 },
  225. { "RD", UNIT_RD, 16 },
  226. { "RAPF", UNIT_RD, 17 },
  227. { "RAM8X32", UNIT_RD, 22 },
  228. { "RAM8X", UNIT_RD, 23 },
  229. { "RABZ", UNIT_RD, 24 },
  230. { "RAWZ", UNIT_RD, 25 },
  231. { "RADZ", UNIT_RD, 26 },
  232. { "RABX", UNIT_RD, 28 },
  233. { "RAWX", UNIT_RD, 29 },
  234. { "RADX", UNIT_RD, 30 },
  235. { "RAMX", UNIT_RD, 31 },
  236. { "RAM16X", UNIT_RD, 31 },
  237. { "TXSTAT", UNIT_TR, 0 },
  238. { "TR.0", UNIT_TR, 0 },
  239. { "TXMASK", UNIT_TR, 1 },
  240. { "TR.1", UNIT_TR, 1 },
  241. { "TXSTATI", UNIT_TR, 2 },
  242. { "TR.2", UNIT_TR, 2 },
  243. { "TXMASKI", UNIT_TR, 3 },
  244. { "TR.3", UNIT_TR, 3 },
  245. { "TXPOLL", UNIT_TR, 4 },
  246. { "TR.4", UNIT_TR, 4 },
  247. { "TXGPIOI", UNIT_TR, 5 },
  248. { "TR.5", UNIT_TR, 5 },
  249. { "TXPOLLI", UNIT_TR, 6 },
  250. { "TR.6", UNIT_TR, 6 },
  251. { "TXGPIOO", UNIT_TR, 7 },
  252. { "TR.7", UNIT_TR, 7 },
  253. { "TTEXEC", UNIT_TT, 0 },
  254. { "TT.0", UNIT_TT, 0 },
  255. { "TTCTRL", UNIT_TT, 1 },
  256. { "TT.1", UNIT_TT, 1 },
  257. { "TTMARK", UNIT_TT, 2 },
  258. { "TT.2", UNIT_TT, 2 },
  259. { "TTREC", UNIT_TT, 3 },
  260. { "TT.3", UNIT_TT, 3 },
  261. { "GTEXEC", UNIT_TT, 4 },
  262. { "TT.4", UNIT_TT, 4 },
  263. { "FX.0", UNIT_FX, 0 },
  264. { "FX.1", UNIT_FX, 1 },
  265. { "FX.2", UNIT_FX, 2 },
  266. { "FX.3", UNIT_FX, 3 },
  267. { "FX.4", UNIT_FX, 4 },
  268. { "FX.5", UNIT_FX, 5 },
  269. { "FX.6", UNIT_FX, 6 },
  270. { "FX.7", UNIT_FX, 7 },
  271. { "FX.8", UNIT_FX, 8 },
  272. { "FX.9", UNIT_FX, 9 },
  273. { "FX.10", UNIT_FX, 10 },
  274. { "FX.11", UNIT_FX, 11 },
  275. { "FX.12", UNIT_FX, 12 },
  276. { "FX.13", UNIT_FX, 13 },
  277. { "FX.14", UNIT_FX, 14 },
  278. { "FX.15", UNIT_FX, 15 },
  279. };
  280. static const metag_reg metag_dsp_regtab[] =
  281. {
  282. { "D0AR.0", UNIT_RAM_D0, 0 },
  283. { "D0AR.1", UNIT_RAM_D0, 1 },
  284. { "D0AW.0", UNIT_RAM_D0, 2 },
  285. { "D0AW.1", UNIT_RAM_D0, 3 },
  286. { "D0BR.0", UNIT_RAM_D0, 4 },
  287. { "D0BR.1", UNIT_RAM_D0, 5 },
  288. { "D0BW.0", UNIT_RAM_D0, 6 },
  289. { "D0BW.1", UNIT_RAM_D0, 7 },
  290. { "D0ARI.0", UNIT_RAM_D0, 8 },
  291. { "D0ARI.1", UNIT_RAM_D0, 9 },
  292. { "D0AWI.0", UNIT_RAM_D0, 10 },
  293. { "D0AWI.1", UNIT_RAM_D0, 11 },
  294. { "D0BRI.0", UNIT_RAM_D0, 12 },
  295. { "D0BRI.1", UNIT_RAM_D0, 13 },
  296. { "D0BWI.0", UNIT_RAM_D0, 14 },
  297. { "D0BWI.1", UNIT_RAM_D0, 15 },
  298. { "AC0.0", UNIT_ACC_D0, 16 },
  299. { "AC0.1", UNIT_ACC_D0, 17 },
  300. { "AC0.2", UNIT_ACC_D0, 18 },
  301. { "AC0.3", UNIT_ACC_D0, 19 },
  302. { "D1AR.0", UNIT_RAM_D1, 0 },
  303. { "D1AR.1", UNIT_RAM_D1, 1 },
  304. { "D1AW.0", UNIT_RAM_D1, 2 },
  305. { "D1AW.1", UNIT_RAM_D1, 3 },
  306. { "D1BR.0", UNIT_RAM_D1, 4 },
  307. { "D1BR.1", UNIT_RAM_D1, 5 },
  308. { "D1BW.0", UNIT_RAM_D1, 6 },
  309. { "D1BW.1", UNIT_RAM_D1, 7 },
  310. { "D1ARI.0", UNIT_RAM_D1, 8 },
  311. { "D1ARI.1", UNIT_RAM_D1, 9 },
  312. { "D1AWI.0", UNIT_RAM_D1, 10 },
  313. { "D1AWI.1", UNIT_RAM_D1, 11 },
  314. { "D1BRI.0", UNIT_RAM_D1, 12 },
  315. { "D1BRI.1", UNIT_RAM_D1, 13 },
  316. { "D1BWI.0", UNIT_RAM_D1, 14 },
  317. { "D1BWI.1", UNIT_RAM_D1, 15 },
  318. { "AC1.0", UNIT_ACC_D1, 16 },
  319. { "AC1.1", UNIT_ACC_D1, 17 },
  320. { "AC1.2", UNIT_ACC_D1, 18 },
  321. { "AC1.3", UNIT_ACC_D1, 19 },
  322. { "T0", UNIT_DT, 0 },
  323. { "T1", UNIT_DT, 1 },
  324. { "T2", UNIT_DT, 2 },
  325. { "T3", UNIT_DT, 3 },
  326. { "T4", UNIT_DT, 4 },
  327. { "T5", UNIT_DT, 5 },
  328. { "T6", UNIT_DT, 6 },
  329. { "T7", UNIT_DT, 7 },
  330. { "T8", UNIT_DT, 8 },
  331. { "T9", UNIT_DT, 9 },
  332. { "TA", UNIT_DT, 10 },
  333. { "TB", UNIT_DT, 11 },
  334. { "TC", UNIT_DT, 12 },
  335. { "TD", UNIT_DT, 13 },
  336. { "TE", UNIT_DT, 14 },
  337. { "TF", UNIT_DT, 15 },
  338. };
  339. /* This table differs from 'metag_dsp_regtab' in that the number
  340. fields in this table are suitable for insertion into DSPRAM
  341. template definition instruction encodings.
  342. The table is indexed by "load". The main benefit of this is that we
  343. can implicitly check that the correct DSPRAM register has been used
  344. when parsing, e.g. the read pointer only appears in the load table
  345. and the write pointer only exists in the store table.
  346. The ordering of the table entries might look a bit weird but it is
  347. based on matching the longest register string. */
  348. static const metag_reg metag_dsp_tmpl_regtab[2][56] =
  349. {
  350. {
  351. { "D0AW.0+D0AWI.0++", UNIT_RAM_D0, 18 },
  352. { "D0AW.0+D0AWI.0", UNIT_RAM_D0, 18 },
  353. { "D0AW.0+D0AWI.1++", UNIT_RAM_D0, 19 },
  354. { "D0AW.0+D0AWI.1", UNIT_RAM_D0, 19 },
  355. { "D0AW.0++", UNIT_RAM_D0, 17 },
  356. { "D0AW.0", UNIT_RAM_D0, 16 },
  357. { "D0AWI.0", UNIT_RAM_D0, 18 },
  358. { "D0AWI.1", UNIT_RAM_D0, 19 },
  359. { "D0AW.1+D0AWI.0++", UNIT_RAM_D0, 22 },
  360. { "D0AW.1+D0AWI.0", UNIT_RAM_D0, 22 },
  361. { "D0AW.1+D0AWI.1++", UNIT_RAM_D0, 23 },
  362. { "D0AW.1+D0AWI.1", UNIT_RAM_D0, 23 },
  363. { "D0AW.1++", UNIT_RAM_D0, 21 },
  364. { "D0AW.1", UNIT_RAM_D0, 20 },
  365. { "D0BW.0+D0BWI.0++", UNIT_RAM_D0, 26 },
  366. { "D0BW.0+D0BWI.0", UNIT_RAM_D0, 26 },
  367. { "D0BW.0+D0BWI.1++", UNIT_RAM_D0, 27 },
  368. { "D0BW.0+D0BWI.1", UNIT_RAM_D0, 27 },
  369. { "D0BW.0++", UNIT_RAM_D0, 25 },
  370. { "D0BW.0", UNIT_RAM_D0, 24 },
  371. { "D0BWI.0", UNIT_RAM_D0, 18 },
  372. { "D0BWI.1", UNIT_RAM_D0, 19 },
  373. { "D0BW.1+D0BWI.0++", UNIT_RAM_D0, 30 },
  374. { "D0BW.1+D0BWI.0", UNIT_RAM_D0, 30 },
  375. { "D0BW.1+D0BWI.1++", UNIT_RAM_D0, 31 },
  376. { "D0BW.1+D0BWI.1", UNIT_RAM_D0, 31 },
  377. { "D0BW.1++", UNIT_RAM_D0, 29 },
  378. { "D0BW.1", UNIT_RAM_D0, 28 },
  379. { "D1AW.0+D1AWI.0++", UNIT_RAM_D1, 18 },
  380. { "D1AW.0+D1AWI.0", UNIT_RAM_D1, 18 },
  381. { "D1AW.0+D1AWI.1++", UNIT_RAM_D1, 19 },
  382. { "D1AW.0+D1AWI.1", UNIT_RAM_D1, 19 },
  383. { "D1AW.0++", UNIT_RAM_D1, 17 },
  384. { "D1AW.0", UNIT_RAM_D1, 16 },
  385. { "D1AWI.0", UNIT_RAM_D1, 18 },
  386. { "D1AWI.1", UNIT_RAM_D1, 19 },
  387. { "D1AW.1+D1AWI.0++", UNIT_RAM_D1, 22 },
  388. { "D1AW.1+D1AWI.0", UNIT_RAM_D1, 22 },
  389. { "D1AW.1+D1AWI.1++", UNIT_RAM_D1, 23 },
  390. { "D1AW.1+D1AWI.1", UNIT_RAM_D1, 23 },
  391. { "D1AW.1++", UNIT_RAM_D1, 21 },
  392. { "D1AW.1", UNIT_RAM_D1, 20 },
  393. { "D1BW.0+D1BWI.0++", UNIT_RAM_D1, 26 },
  394. { "D1BW.0+D1BWI.0", UNIT_RAM_D1, 26 },
  395. { "D1BW.0+D1BWI.1++", UNIT_RAM_D1, 27 },
  396. { "D1BW.0+D1BWI.1", UNIT_RAM_D1, 27 },
  397. { "D1BW.0++", UNIT_RAM_D1, 25 },
  398. { "D1BW.0", UNIT_RAM_D1, 24 },
  399. { "D1BWI.0", UNIT_RAM_D1, 18 },
  400. { "D1BWI.1", UNIT_RAM_D1, 19 },
  401. { "D1BW.1+D1BWI.0++", UNIT_RAM_D1, 30 },
  402. { "D1BW.1+D1BWI.0", UNIT_RAM_D1, 30 },
  403. { "D1BW.1+D1BWI.1++", UNIT_RAM_D1, 31 },
  404. { "D1BW.1+D1BWI.1", UNIT_RAM_D1, 31 },
  405. { "D1BW.1++", UNIT_RAM_D1, 29 },
  406. { "D1BW.1", UNIT_RAM_D1, 28 },
  407. },
  408. {
  409. { "D0AR.0+D0ARI.0++", UNIT_RAM_D0, 18 },
  410. { "D0AR.0+D0ARI.0", UNIT_RAM_D0, 18 },
  411. { "D0AR.0+D0ARI.1++", UNIT_RAM_D0, 19 },
  412. { "D0AR.0+D0ARI.1", UNIT_RAM_D0, 19 },
  413. { "D0AR.0++", UNIT_RAM_D0, 17 },
  414. { "D0AR.0", UNIT_RAM_D0, 16 },
  415. { "D0ARI.0", UNIT_RAM_D0, 18 },
  416. { "D0ARI.1", UNIT_RAM_D0, 19 },
  417. { "D0AR.1+D0ARI.0++", UNIT_RAM_D0, 22 },
  418. { "D0AR.1+D0ARI.0", UNIT_RAM_D0, 22 },
  419. { "D0AR.1+D0ARI.1++", UNIT_RAM_D0, 23 },
  420. { "D0AR.1+D0ARI.1", UNIT_RAM_D0, 23 },
  421. { "D0AR.1++", UNIT_RAM_D0, 21 },
  422. { "D0AR.1", UNIT_RAM_D0, 20 },
  423. { "D0BR.0+D0BRI.0++", UNIT_RAM_D0, 26 },
  424. { "D0BR.0+D0BRI.0", UNIT_RAM_D0, 26 },
  425. { "D0BR.0+D0BRI.1++", UNIT_RAM_D0, 27 },
  426. { "D0BR.0+D0BRI.1", UNIT_RAM_D0, 27 },
  427. { "D0BR.0++", UNIT_RAM_D0, 25 },
  428. { "D0BR.0", UNIT_RAM_D0, 24 },
  429. { "D0BRI.0", UNIT_RAM_D0, 18 },
  430. { "D0BRI.1", UNIT_RAM_D0, 19 },
  431. { "D0BR.1+D0BRI.0++", UNIT_RAM_D0, 30 },
  432. { "D0BR.1+D0BRI.0", UNIT_RAM_D0, 30 },
  433. { "D0BR.1+D0BRI.1++", UNIT_RAM_D0, 31 },
  434. { "D0BR.1+D0BRI.1", UNIT_RAM_D0, 31 },
  435. { "D0BR.1++", UNIT_RAM_D0, 29 },
  436. { "D0BR.1", UNIT_RAM_D0, 28 },
  437. { "D1AR.0+D1ARI.0++", UNIT_RAM_D1, 18 },
  438. { "D1AR.0+D1ARI.0", UNIT_RAM_D1, 18 },
  439. { "D1AR.0+D1ARI.1++", UNIT_RAM_D1, 19 },
  440. { "D1AR.0+D1ARI.1", UNIT_RAM_D1, 19 },
  441. { "D1AR.0++", UNIT_RAM_D1, 17 },
  442. { "D1AR.0", UNIT_RAM_D1, 16 },
  443. { "D1ARI.0", UNIT_RAM_D1, 18 },
  444. { "D1ARI.1", UNIT_RAM_D1, 19 },
  445. { "D1AR.1+D1ARI.0++", UNIT_RAM_D1, 22 },
  446. { "D1AR.1+D1ARI.0", UNIT_RAM_D1, 22 },
  447. { "D1AR.1+D1ARI.1++", UNIT_RAM_D1, 23 },
  448. { "D1AR.1+D1ARI.1", UNIT_RAM_D1, 23 },
  449. { "D1AR.1++", UNIT_RAM_D1, 21 },
  450. { "D1AR.1", UNIT_RAM_D1, 20 },
  451. { "D1BR.0+D1BRI.0++", UNIT_RAM_D1, 26 },
  452. { "D1BR.0+D1BRI.0", UNIT_RAM_D1, 26 },
  453. { "D1BR.0+D1BRI.1++", UNIT_RAM_D1, 27 },
  454. { "D1BR.0+D1BRI.1", UNIT_RAM_D1, 27 },
  455. { "D1BR.0++", UNIT_RAM_D1, 25 },
  456. { "D1BR.0", UNIT_RAM_D1, 24 },
  457. { "D1BR.1+D1BRI.0++", UNIT_RAM_D1, 30 },
  458. { "D1BR.1+D1BRI.0", UNIT_RAM_D1, 30 },
  459. { "D1BR.1+D1BRI.1++", UNIT_RAM_D1, 31 },
  460. { "D1BR.1+D1BRI.1", UNIT_RAM_D1, 31 },
  461. { "D1BR.1++", UNIT_RAM_D1, 29 },
  462. { "D1BR.1", UNIT_RAM_D1, 28 },
  463. { "D1BRI.0", UNIT_RAM_D1, 18 },
  464. { "D1BRI.1", UNIT_RAM_D1, 19 },
  465. },
  466. };
  467. typedef struct
  468. {
  469. const char * name;
  470. unsigned int part;
  471. } metag_acf;
  472. static const metag_acf metag_acftab[] =
  473. {
  474. { "ACF.0", 0},
  475. { "ACF.1", 1},
  476. { "ACF.2", 2},
  477. { "ACF.3", 3},
  478. };
  479. enum insn_encoding
  480. {
  481. ENC_NONE,
  482. ENC_MOV_U2U,
  483. ENC_MOV_PORT,
  484. ENC_MMOV,
  485. ENC_MDRD,
  486. ENC_MOVL_TTREC,
  487. ENC_GET_SET,
  488. ENC_GET_SET_EXT,
  489. ENC_MGET_MSET,
  490. ENC_COND_SET,
  491. ENC_XFR,
  492. ENC_MOV_CT,
  493. ENC_SWAP,
  494. ENC_JUMP,
  495. ENC_CALLR,
  496. ENC_ALU,
  497. ENC_SHIFT,
  498. ENC_MIN_MAX,
  499. ENC_BITOP,
  500. ENC_CMP,
  501. ENC_BRANCH,
  502. ENC_KICK,
  503. ENC_SWITCH,
  504. ENC_CACHER,
  505. ENC_CACHEW,
  506. ENC_ICACHE,
  507. ENC_LNKGET,
  508. ENC_FMOV,
  509. ENC_FMMOV,
  510. ENC_FMOV_DATA,
  511. ENC_FMOV_I,
  512. ENC_FPACK,
  513. ENC_FSWAP,
  514. ENC_FCMP,
  515. ENC_FMINMAX,
  516. ENC_FCONV,
  517. ENC_FCONVX,
  518. ENC_FBARITH,
  519. ENC_FEARITH,
  520. ENC_FREC,
  521. ENC_FSIMD,
  522. ENC_FGET_SET_ACF,
  523. ENC_DGET_SET,
  524. ENC_DTEMPLATE,
  525. ENC_DALU,
  526. ENC_MAX,
  527. };
  528. enum insn_type
  529. {
  530. INSN_GP,
  531. INSN_FPU,
  532. INSN_DSP,
  533. INSN_DSP_FPU,
  534. };
  535. typedef struct
  536. {
  537. const char *name;
  538. unsigned int core_flags;
  539. #define CoreMeta11 0x1 /* The earliest Meta core we support */
  540. #define CoreMeta12 0x2
  541. #define CoreMeta21 0x4
  542. #define FpuMeta21 0x21
  543. #define DspMeta21 0x100
  544. unsigned int meta_opcode;
  545. unsigned int meta_mask;
  546. enum insn_type insn_type;
  547. enum insn_encoding encoding;
  548. #define DSP_ARGS_1 0x0000001 /* De.r,Dx.r,De.r (3 register operands) */
  549. #define DSP_ARGS_ACC2 0x0000002 /* Accumulator source operand 2 */
  550. #define DSP_ARGS_QR 0x0000004 /* QUICKRoT */
  551. #define DSP_ARGS_XACC 0x0000008 /* Cross-unit accumulator op */
  552. #define DSP_ARGS_DACC 0x0000010 /* Target accumulator as destination */
  553. #define DSP_ARGS_SRD 0x0000020 /* Source the RD port */
  554. #define DSP_ARGS_2 0x0000040 /* De.r,Dx.r (2 register operands) */
  555. #define DSP_ARGS_DSP_SRC1 0x0000080 /* Source a DSP register */
  556. #define DSP_ARGS_DSP_SRC2 0x0000100 /* Source a DSP register */
  557. #define DSP_ARGS_IMM 0x0000200 /* Immediate value for src 2 */
  558. #define DSP_ARGS_SPLIT8 0x0000400 /* Data unit split 8 operations */
  559. #define DSP_ARGS_12 0x0000800 /* De.r,Dx.r */
  560. #define DSP_ARGS_13 0x0001000 /* Dx.r,Rx.r */
  561. #define DSP_ARGS_14 0x0002000 /* DSPe.r,Dx.r */
  562. #define DSP_ARGS_15 0x0004000 /* DSPx.r,#I16 */
  563. #define DSP_ARGS_16 0x0008000 /* De.r,DSPx.r */
  564. #define DSP_ARGS_17 0x0010000 /* De.r|ACe.r,Dx.r,Rx.r|RD */
  565. #define DSP_ARGS_18 0x0020000 /* De.r,Dx.r|ACx.r */
  566. #define DSP_ARGS_20 0x0080000 /* De.r,Dx.r|ACx.r,De.r */
  567. #define DSP_ARGS_21 0x0100000 /* De.r,Dx.r|ACx.r,#I5 */
  568. #define DSP_ARGS_22 0x0200000 /* De.r,Dx.r|ACx.r,De.r|#I5 */
  569. #define DSP_ARGS_23 0x0400000 /* Ux.r,Dx.r|ACx.r,De.r|#I5 */
  570. #define GP_ARGS_QR 0x0000001 /* QUICKRoT */
  571. unsigned int arg_type;
  572. } insn_template;
  573. enum major_opcode
  574. {
  575. OPC_ADD,
  576. OPC_SUB,
  577. OPC_AND,
  578. OPC_OR,
  579. OPC_XOR,
  580. OPC_SHIFT,
  581. OPC_MUL,
  582. OPC_CMP,
  583. OPC_ADDR,
  584. OPC_9,
  585. OPC_MISC,
  586. OPC_SET,
  587. OPC_GET,
  588. OPC_XFR,
  589. OPC_CPR,
  590. OPC_FPU,
  591. };
  592. #define GET_EXT_MINOR 0x7
  593. #define MOV_EXT_MINOR 0x6
  594. #define MOVL_MINOR 0x2
  595. #define MAJOR_OPCODE(opcode) (((opcode) >> 28) & 0xf)
  596. #define MINOR_OPCODE(opcode) (((opcode) >> 24) & 0xf)
  597. enum cond_code
  598. {
  599. COND_A,
  600. COND_EQ,
  601. COND_NE,
  602. COND_CS,
  603. COND_CC,
  604. COND_MI,
  605. COND_PL,
  606. COND_VS,
  607. COND_VC,
  608. COND_HI,
  609. COND_LS,
  610. COND_GE,
  611. COND_LT,
  612. COND_GT,
  613. COND_LE,
  614. COND_NV,
  615. };
  616. enum scond_code
  617. {
  618. SCOND_A,
  619. SCOND_LEQ,
  620. SCOND_LNE,
  621. SCOND_LLO,
  622. SCOND_LHS,
  623. SCOND_HEQ,
  624. SCOND_HNE,
  625. SCOND_HLO,
  626. SCOND_HHS,
  627. SCOND_LGR,
  628. SCOND_LLE,
  629. SCOND_HGR,
  630. SCOND_HLE,
  631. SCOND_EEQ,
  632. SCOND_ELO,
  633. SCOND_NV,
  634. };
  635. typedef struct
  636. {
  637. const char *name;
  638. enum scond_code code;
  639. } split_condition;
  640. static const split_condition metag_scondtab[] =
  641. {
  642. { "LEQ", SCOND_LEQ },
  643. { "LEZ", SCOND_LEQ },
  644. { "LNE", SCOND_LNE },
  645. { "LNZ", SCOND_LNE },
  646. { "LLO", SCOND_LLO },
  647. { "LCS", SCOND_LLO },
  648. { "LHS", SCOND_LHS },
  649. { "LCC", SCOND_LHS },
  650. { "HEQ", SCOND_HEQ },
  651. { "HEZ", SCOND_HEQ },
  652. { "HNE", SCOND_HNE },
  653. { "HNZ", SCOND_HNE },
  654. { "HLO", SCOND_HLO },
  655. { "HCS", SCOND_HLO },
  656. { "HHS", SCOND_HHS },
  657. { "HCC", SCOND_HHS },
  658. { "LGR", SCOND_LGR },
  659. { "LHI", SCOND_LGR },
  660. { "LLE", SCOND_LLE },
  661. { "LLS", SCOND_LLE },
  662. { "HGR", SCOND_HGR },
  663. { "HHI", SCOND_HGR },
  664. { "HLE", SCOND_HLE },
  665. { "HLS", SCOND_HLE },
  666. { "EEQ", SCOND_EEQ },
  667. { "EEZ", SCOND_EEQ },
  668. { "ELO", SCOND_ELO },
  669. { "ECS", SCOND_ELO },
  670. };
  671. static const split_condition metag_dsp_scondtab[] =
  672. {
  673. { "LEQ", SCOND_LEQ },
  674. { "LEZ", SCOND_LEQ },
  675. { "LNE", SCOND_LNE },
  676. { "LNZ", SCOND_LNE },
  677. { "LCS", SCOND_LLO },
  678. { "LLO", SCOND_LLO },
  679. { "LCC", SCOND_LHS },
  680. { "LHS", SCOND_LHS },
  681. { "HEQ", SCOND_HEQ },
  682. { "HEZ", SCOND_HEQ },
  683. { "HNE", SCOND_HNE },
  684. { "HNZ", SCOND_HNE },
  685. { "HCS", SCOND_HLO },
  686. { "HLO", SCOND_HLO },
  687. { "HCC", SCOND_HHS },
  688. { "HHS", SCOND_HHS },
  689. { "LHI", SCOND_LGR },
  690. { "LGR", SCOND_LGR },
  691. { "LLS", SCOND_LLE },
  692. { "LLE", SCOND_LLE },
  693. { "HHI", SCOND_HGR },
  694. { "HGR", SCOND_HGR },
  695. { "HLS", SCOND_HLE },
  696. { "HLE", SCOND_HLE },
  697. { "EEQ", SCOND_EEQ },
  698. { "EEZ", SCOND_EEQ },
  699. { "ECS", SCOND_ELO },
  700. { "ELO", SCOND_ELO },
  701. };
  702. static const split_condition metag_fpu_scondtab[] =
  703. {
  704. { "LEQ", SCOND_LEQ },
  705. { "LEZ", SCOND_LEQ },
  706. { "LNE", SCOND_LNE },
  707. { "LNZ", SCOND_LNE },
  708. { "LLO", SCOND_LLO },
  709. { "LCS", SCOND_LLO },
  710. { "LHS", SCOND_LHS },
  711. { "LCC", SCOND_LHS },
  712. { "HEQ", SCOND_HEQ },
  713. { "HEZ", SCOND_HEQ },
  714. { "HNE", SCOND_HNE },
  715. { "HNZ", SCOND_HNE },
  716. { "HLO", SCOND_HLO },
  717. { "HCS", SCOND_HLO },
  718. { "HHS", SCOND_HHS },
  719. { "HCC", SCOND_HHS },
  720. { "LGR", SCOND_LGR },
  721. { "LHI", SCOND_LGR },
  722. { "LLE", SCOND_LLE },
  723. { "LLS", SCOND_LLE },
  724. { "HGR", SCOND_HGR },
  725. { "HHI", SCOND_HGR },
  726. { "HLE", SCOND_HLE },
  727. { "HLS", SCOND_HLE },
  728. { "EEQ", SCOND_EEQ },
  729. { "EEZ", SCOND_EEQ },
  730. { "ELO", SCOND_ELO },
  731. { "ECS", SCOND_ELO },
  732. };
  733. enum fcond_code
  734. {
  735. FCOND_A,
  736. FCOND_FEQ,
  737. FCOND_UNE,
  738. FCOND_FLT,
  739. FCOND_UGE,
  740. FCOND_UVS = 7,
  741. FCOND_FVC,
  742. FCOND_UGT,
  743. FCOND_FLE,
  744. FCOND_FGE,
  745. FCOND_ULT,
  746. FCOND_FGT,
  747. FCOND_ULE,
  748. FCOND_NV,
  749. };
  750. #define COND_INSN(mnemonic, suffix, field_shift, flags, meta_opcode, \
  751. meta_mask, insn_type, encoding, args) \
  752. { mnemonic suffix, flags, meta_opcode, meta_mask, \
  753. insn_type, encoding, args }, \
  754. { mnemonic "A" suffix, flags, meta_opcode, meta_mask, \
  755. insn_type, encoding, args }, \
  756. { mnemonic "EQ" suffix, flags, meta_opcode | (COND_EQ << field_shift), \
  757. meta_mask, insn_type, encoding, args }, \
  758. { mnemonic "Z" suffix, flags, meta_opcode | (COND_EQ << field_shift), \
  759. meta_mask, insn_type, encoding, args }, \
  760. { mnemonic "NE" suffix, flags, meta_opcode | (COND_NE << field_shift), \
  761. meta_mask, insn_type, encoding, args }, \
  762. { mnemonic "NZ" suffix, flags, meta_opcode | (COND_NE << field_shift), \
  763. meta_mask, insn_type, encoding, args }, \
  764. { mnemonic "CS" suffix, flags, meta_opcode | (COND_CS << field_shift), \
  765. meta_mask, insn_type, encoding, args }, \
  766. { mnemonic "LO" suffix, flags, meta_opcode | (COND_CS << field_shift), \
  767. meta_mask, insn_type, encoding, args }, \
  768. { mnemonic "CC" suffix, flags, meta_opcode | (COND_CC << field_shift), \
  769. meta_mask, insn_type, encoding, args }, \
  770. { mnemonic "HS" suffix, flags, meta_opcode | (COND_CC << field_shift), \
  771. meta_mask, insn_type, encoding, args }, \
  772. { mnemonic "MI" suffix, flags, meta_opcode | (COND_MI << field_shift), \
  773. meta_mask, insn_type, encoding, args }, \
  774. { mnemonic "N" suffix, flags, meta_opcode | (COND_MI << field_shift), \
  775. meta_mask, insn_type, encoding, args }, \
  776. { mnemonic "PL" suffix, flags, meta_opcode | (COND_PL << field_shift), \
  777. meta_mask, insn_type, encoding, args }, \
  778. { mnemonic "NC" suffix, flags, meta_opcode | (COND_PL << field_shift), \
  779. meta_mask, insn_type, encoding, args }, \
  780. { mnemonic "VS" suffix, flags, meta_opcode | (COND_VS << field_shift), \
  781. meta_mask, insn_type, encoding, args }, \
  782. { mnemonic "VC" suffix, flags, meta_opcode | (COND_VC << field_shift), \
  783. meta_mask, insn_type, encoding, args }, \
  784. { mnemonic "HI" suffix, flags, meta_opcode | (COND_HI << field_shift), \
  785. meta_mask, insn_type, encoding, args }, \
  786. { mnemonic "LS" suffix, flags, meta_opcode | (COND_LS << field_shift), \
  787. meta_mask, insn_type, encoding, args }, \
  788. { mnemonic "GE" suffix, flags, meta_opcode | (COND_GE << field_shift), \
  789. meta_mask, insn_type, encoding, args }, \
  790. { mnemonic "LT" suffix, flags, meta_opcode | (COND_LT << field_shift), \
  791. meta_mask, insn_type, encoding, args }, \
  792. { mnemonic "GT" suffix, flags, meta_opcode | (COND_GT << field_shift), \
  793. meta_mask, insn_type, encoding, args }, \
  794. { mnemonic "LE" suffix, flags, meta_opcode | (COND_LE << field_shift), \
  795. meta_mask, insn_type, encoding, args }, \
  796. { mnemonic "NV" suffix, flags, meta_opcode | (COND_NV << field_shift), \
  797. meta_mask, insn_type, encoding, args }, \
  798. { mnemonic "FEQ" suffix, flags, meta_opcode | \
  799. (FCOND_FEQ << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  800. { mnemonic "FZ" suffix, flags, meta_opcode | \
  801. (FCOND_FEQ << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  802. { mnemonic "UNE" suffix, flags, meta_opcode | \
  803. (FCOND_UNE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  804. { mnemonic "UNZ" suffix, flags, meta_opcode | \
  805. (FCOND_UNE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  806. { mnemonic "FLT" suffix, flags, meta_opcode | \
  807. (FCOND_FLT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  808. { mnemonic "FLO" suffix, flags, meta_opcode | \
  809. (FCOND_FLT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  810. { mnemonic "UGE" suffix, flags, meta_opcode | \
  811. (FCOND_UGE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  812. { mnemonic "UHS" suffix, flags, meta_opcode | \
  813. (FCOND_UGE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  814. { mnemonic "UVS" suffix, flags, meta_opcode | \
  815. (FCOND_UVS << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  816. { mnemonic "FVC" suffix, flags, meta_opcode | \
  817. (FCOND_FVC << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  818. { mnemonic "UGT" suffix, flags, meta_opcode | \
  819. (FCOND_UGT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  820. { mnemonic "UHI" suffix, flags, meta_opcode | \
  821. (FCOND_UGT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  822. { mnemonic "FLE" suffix, flags, meta_opcode | \
  823. (FCOND_FLE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  824. { mnemonic "FGE" suffix, flags, meta_opcode | \
  825. (FCOND_FGE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  826. { mnemonic "FHS" suffix, flags, meta_opcode | \
  827. (FCOND_FGE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  828. { mnemonic "ULT" suffix, flags, meta_opcode | \
  829. (FCOND_ULT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  830. { mnemonic "ULO" suffix, flags, meta_opcode | \
  831. (FCOND_ULT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  832. { mnemonic "FGT" suffix, flags, meta_opcode | \
  833. (FCOND_FGT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  834. { mnemonic "FHI" suffix, flags, meta_opcode | \
  835. (FCOND_FGT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  836. { mnemonic "ULE" suffix, flags, meta_opcode | \
  837. (FCOND_ULE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  838. { mnemonic "NV" suffix, flags, meta_opcode | \
  839. (FCOND_NV << field_shift), meta_mask, INSN_FPU, encoding, args }
  840. #define FCOND_INSN(mnemonic, suffix, field_shift, flags, meta_opcode, \
  841. meta_mask, insn_type, encoding, args) \
  842. { mnemonic suffix, flags, meta_opcode, meta_mask, \
  843. insn_type, encoding, args }, \
  844. { mnemonic "A" suffix, flags, meta_opcode, meta_mask, \
  845. insn_type, encoding, args }, \
  846. { mnemonic "FEQ" suffix, flags, meta_opcode | \
  847. (FCOND_FEQ << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  848. { mnemonic "FZ" suffix, flags, meta_opcode | \
  849. (FCOND_FEQ << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  850. { mnemonic "UNE" suffix, flags, meta_opcode | \
  851. (FCOND_UNE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  852. { mnemonic "UNZ" suffix, flags, meta_opcode | \
  853. (FCOND_UNE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  854. { mnemonic "FLO" suffix, flags, meta_opcode | \
  855. (FCOND_FLT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  856. { mnemonic "FLT" suffix, flags, meta_opcode | \
  857. (FCOND_FLT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  858. { mnemonic "UHS" suffix, flags, meta_opcode | \
  859. (FCOND_UGE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  860. { mnemonic "UGE" suffix, flags, meta_opcode | \
  861. (FCOND_UGE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  862. { mnemonic "UVS" suffix, flags, meta_opcode | \
  863. (FCOND_UVS << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  864. { mnemonic "FVC" suffix, flags, meta_opcode | \
  865. (FCOND_FVC << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  866. { mnemonic "UHI" suffix, flags, meta_opcode | \
  867. (FCOND_UGT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  868. { mnemonic "UGT" suffix, flags, meta_opcode | \
  869. (FCOND_UGT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  870. { mnemonic "FLE" suffix, flags, meta_opcode | \
  871. (FCOND_FLE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  872. { mnemonic "FGE" suffix, flags, meta_opcode | \
  873. (FCOND_FGE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  874. { mnemonic "FHS" suffix, flags, meta_opcode | \
  875. (FCOND_FGE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  876. { mnemonic "ULT" suffix, flags, meta_opcode | \
  877. (FCOND_ULT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  878. { mnemonic "ULO" suffix, flags, meta_opcode | \
  879. (FCOND_ULT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  880. { mnemonic "FGT" suffix, flags, meta_opcode | \
  881. (FCOND_FGT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  882. { mnemonic "FHI" suffix, flags, meta_opcode | \
  883. (FCOND_FGT << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  884. { mnemonic "ULE" suffix, flags, meta_opcode | \
  885. (FCOND_ULE << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  886. { mnemonic "NV" suffix, flags, meta_opcode | \
  887. (FCOND_NV << field_shift), meta_mask, INSN_FPU, encoding, args }, \
  888. { mnemonic "EQ" suffix, flags, meta_opcode | (COND_EQ << field_shift), \
  889. meta_mask, insn_type, encoding, args }, \
  890. { mnemonic "Z" suffix, flags, meta_opcode | (COND_EQ << field_shift), \
  891. meta_mask, insn_type, encoding, args }, \
  892. { mnemonic "NE" suffix, flags, meta_opcode | (COND_NE << field_shift), \
  893. meta_mask, insn_type, encoding, args }, \
  894. { mnemonic "NZ" suffix, flags, meta_opcode | (COND_NE << field_shift), \
  895. meta_mask, insn_type, encoding, args }, \
  896. { mnemonic "CS" suffix, flags, meta_opcode | (COND_CS << field_shift), \
  897. meta_mask, insn_type, encoding, args }, \
  898. { mnemonic "LO" suffix, flags, meta_opcode | (COND_CS << field_shift), \
  899. meta_mask, insn_type, encoding, args }, \
  900. { mnemonic "CC" suffix, flags, meta_opcode | (COND_CC << field_shift), \
  901. meta_mask, insn_type, encoding, args }, \
  902. { mnemonic "HS" suffix, flags, meta_opcode | (COND_CC << field_shift), \
  903. meta_mask, insn_type, encoding, args }, \
  904. { mnemonic "MI" suffix, flags, meta_opcode | (COND_MI << field_shift), \
  905. meta_mask, insn_type, encoding, args }, \
  906. { mnemonic "N" suffix, flags, meta_opcode | (COND_MI << field_shift), \
  907. meta_mask, insn_type, encoding, args }, \
  908. { mnemonic "PL" suffix, flags, meta_opcode | (COND_PL << field_shift), \
  909. meta_mask, insn_type, encoding, args }, \
  910. { mnemonic "NC" suffix, flags, meta_opcode | (COND_PL << field_shift), \
  911. meta_mask, insn_type, encoding, args }, \
  912. { mnemonic "VS" suffix, flags, meta_opcode | (COND_VS << field_shift), \
  913. meta_mask, insn_type, encoding, args }, \
  914. { mnemonic "VC" suffix, flags, meta_opcode | (COND_VC << field_shift), \
  915. meta_mask, insn_type, encoding, args }, \
  916. { mnemonic "HI" suffix, flags, meta_opcode | (COND_HI << field_shift), \
  917. meta_mask, insn_type, encoding, args }, \
  918. { mnemonic "LS" suffix, flags, meta_opcode | (COND_LS << field_shift), \
  919. meta_mask, insn_type, encoding, args }, \
  920. { mnemonic "GE" suffix, flags, meta_opcode | (COND_GE << field_shift), \
  921. meta_mask, insn_type, encoding, args }, \
  922. { mnemonic "LT" suffix, flags, meta_opcode | (COND_LT << field_shift), \
  923. meta_mask, insn_type, encoding, args }, \
  924. { mnemonic "GT" suffix, flags, meta_opcode | (COND_GT << field_shift), \
  925. meta_mask, insn_type, encoding, args }, \
  926. { mnemonic "LE" suffix, flags, meta_opcode | (COND_LE << field_shift), \
  927. meta_mask, insn_type, encoding, args }, \
  928. { mnemonic "NV" suffix, flags, meta_opcode | (COND_NV << field_shift), \
  929. meta_mask, insn_type, encoding, args }
  930. #define TEMPLATE_INSN(flags, meta_opcode, meta_mask, insn_type) \
  931. { "T0", flags, meta_opcode | 0x0, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  932. { "T1", flags, meta_opcode | 0x1, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  933. { "T2", flags, meta_opcode | 0x2, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  934. { "T3", flags, meta_opcode | 0x3, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  935. { "T4", flags, meta_opcode | 0x4, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  936. { "T5", flags, meta_opcode | 0x5, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  937. { "T6", flags, meta_opcode | 0x6, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  938. { "T7", flags, meta_opcode | 0x7, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  939. { "T8", flags, meta_opcode | 0x8, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  940. { "T9", flags, meta_opcode | 0x9, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  941. { "TA", flags, meta_opcode | 0xa, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  942. { "TB", flags, meta_opcode | 0xb, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  943. { "TC", flags, meta_opcode | 0xc, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  944. { "TD", flags, meta_opcode | 0xd, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  945. { "TE", flags, meta_opcode | 0xe, meta_mask, insn_type, ENC_DTEMPLATE, 0 }, \
  946. { "TF", flags, meta_opcode | 0xf, meta_mask, insn_type, ENC_DTEMPLATE, 0 }
  947. /* Unimplemented GP instructions:
  948. CPR - coprocessor read
  949. CPW - coprocessor write
  950. MORT - morton order operation
  951. VPACK, VADD, VSUB - vector instructions
  952. The order of the entries in this table is extremely important. DO
  953. NOT modify it unless you know what you're doing. If you do modify
  954. it, be sure to run the entire testsuite to make sure you haven't
  955. caused a regression. */
  956. static const insn_template metag_optab[] =
  957. {
  958. /* Port-to-unit MOV */
  959. COND_INSN ("MOVB", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  960. 0xa1800000, 0xfff83e1f, INSN_GP, ENC_MOV_PORT, 0),
  961. COND_INSN ("MOVW", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  962. 0xa1800001, 0xfff83e1f, INSN_GP, ENC_MOV_PORT, 0),
  963. COND_INSN ("MOVD", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  964. 0xa1800200, 0xfff83e1f, INSN_GP, ENC_MOV_PORT, 0),
  965. COND_INSN ("MOVL", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  966. 0xa2800000, 0xfff8019f, INSN_GP, ENC_MOV_PORT, 0),
  967. /* Read pipeline prime/drain */
  968. { "MMOVD", CoreMeta11|CoreMeta12|CoreMeta21,
  969. 0xca000000, 0xff00001f, INSN_GP, ENC_MMOV, 0 },
  970. { "MMOVL", CoreMeta11|CoreMeta12|CoreMeta21,
  971. 0xcb000000, 0xff00001f, INSN_GP, ENC_MMOV, 0 },
  972. { "MMOVD", CoreMeta11|CoreMeta12|CoreMeta21,
  973. 0xcc000000, 0xff07c067, INSN_GP, ENC_MMOV, 0 },
  974. { "MMOVL", CoreMeta11|CoreMeta12|CoreMeta21,
  975. 0xcd000000, 0xff07c067, INSN_GP, ENC_MMOV, 0 },
  976. /* Read pipeline flush */
  977. { "MDRD", CoreMeta11|CoreMeta12|CoreMeta21,
  978. 0xcc000002, 0xffffc07f, INSN_GP, ENC_MDRD, 0 },
  979. /* Unit-to-TTREC MOVL */
  980. COND_INSN ("MOVL", "", 1, CoreMeta12|CoreMeta21,
  981. 0xa2002001, 0xff003e7f, INSN_GP, ENC_MOVL_TTREC, 0),
  982. /* MOV to RA (extended) */
  983. { "MOVB", CoreMeta11|CoreMeta12|CoreMeta21,
  984. 0xa6000000, 0xff00001e, INSN_GP, ENC_GET_SET_EXT, 0 },
  985. { "MOVW", CoreMeta11|CoreMeta12|CoreMeta21,
  986. 0xa6000002, 0xff00001e, INSN_GP, ENC_GET_SET_EXT, 0 },
  987. { "MOVD", CoreMeta11|CoreMeta12|CoreMeta21,
  988. 0xa6000004, 0xff00001e, INSN_GP, ENC_GET_SET_EXT, 0 },
  989. { "MOVL", CoreMeta11|CoreMeta12|CoreMeta21,
  990. 0xa6000006, 0xff00001e, INSN_GP, ENC_GET_SET_EXT, 0 },
  991. /* Extended GET */
  992. { "GETB", CoreMeta11|CoreMeta12|CoreMeta21,
  993. 0xa7000000, 0xff000006, INSN_GP, ENC_GET_SET_EXT, 0 },
  994. { "GETW", CoreMeta11|CoreMeta12|CoreMeta21,
  995. 0xa7000002, 0xff000006, INSN_GP, ENC_GET_SET_EXT, 0 },
  996. { "GETD", CoreMeta11|CoreMeta12|CoreMeta21,
  997. 0xa7000004, 0xff000006, INSN_GP, ENC_GET_SET_EXT, 0 },
  998. { "GETL", CoreMeta11|CoreMeta12|CoreMeta21,
  999. 0xa7000006, 0xff000006, INSN_GP, ENC_GET_SET_EXT, 0 },
  1000. /* Extended SET */
  1001. { "SETB", CoreMeta11|CoreMeta12|CoreMeta21,
  1002. 0xa5000000, 0xff000006, INSN_GP, ENC_GET_SET_EXT, 0 },
  1003. { "SETW", CoreMeta11|CoreMeta12|CoreMeta21,
  1004. 0xa5000002, 0xff000006, INSN_GP, ENC_GET_SET_EXT, 0 },
  1005. { "SETD", CoreMeta11|CoreMeta12|CoreMeta21,
  1006. 0xa5000004, 0xff000006, INSN_GP, ENC_GET_SET_EXT, 0 },
  1007. { "SETL", CoreMeta11|CoreMeta12|CoreMeta21,
  1008. 0xa5000006, 0xff000006, INSN_GP, ENC_GET_SET_EXT, 0 },
  1009. /* MOV to RA */
  1010. { "MOVB", CoreMeta11|CoreMeta12|CoreMeta21,
  1011. 0xc000000c, 0xfd00001e, INSN_GP, ENC_GET_SET, 0 },
  1012. { "MOVW", CoreMeta11|CoreMeta12|CoreMeta21,
  1013. 0xc100000c, 0xfd00001e, INSN_GP, ENC_GET_SET, 0 },
  1014. { "MOVD", CoreMeta11|CoreMeta12|CoreMeta21,
  1015. 0xc400000c, 0xfd00001e, INSN_GP, ENC_GET_SET, 0 },
  1016. { "MOVL", CoreMeta11|CoreMeta12|CoreMeta21,
  1017. 0xc500000c, 0xfd00001e, INSN_GP, ENC_GET_SET, 0 },
  1018. /* Standard GET */
  1019. { "GETB", CoreMeta11|CoreMeta12|CoreMeta21,
  1020. 0xc0000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1021. { "GETW", CoreMeta11|CoreMeta12|CoreMeta21,
  1022. 0xc1000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1023. { "GETD", CoreMeta11|CoreMeta12|CoreMeta21,
  1024. 0xc4000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1025. /* GET is a synonym for GETD. */
  1026. { "GET", CoreMeta11|CoreMeta12|CoreMeta21,
  1027. 0xc4000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1028. { "GETL", CoreMeta11|CoreMeta12|CoreMeta21,
  1029. 0xc5000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1030. /* Standard SET */
  1031. { "SETB", CoreMeta11|CoreMeta12|CoreMeta21,
  1032. 0xb0000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1033. { "SETW", CoreMeta11|CoreMeta12|CoreMeta21,
  1034. 0xb1000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1035. { "SETD", CoreMeta11|CoreMeta12|CoreMeta21,
  1036. 0xb4000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1037. /* SET is a synonym for SETD. */
  1038. { "SET", CoreMeta11|CoreMeta12|CoreMeta21,
  1039. 0xb4000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1040. { "SETL", CoreMeta11|CoreMeta12|CoreMeta21,
  1041. 0xb5000000, 0xfd000000, INSN_GP, ENC_GET_SET, 0 },
  1042. /* Multiple GET */
  1043. { "MGETD", CoreMeta11|CoreMeta12|CoreMeta21,
  1044. 0xc8000000, 0xff000007, INSN_GP, ENC_MGET_MSET, 0 },
  1045. { "MGETL", CoreMeta11|CoreMeta12|CoreMeta21,
  1046. 0xc9000000, 0xff000007, INSN_GP, ENC_MGET_MSET, 0 },
  1047. /* Multiple SET */
  1048. { "MSETD", CoreMeta11|CoreMeta12|CoreMeta21,
  1049. 0xb8000000, 0xff000007, INSN_GP, ENC_MGET_MSET, 0 },
  1050. { "MSETL", CoreMeta11|CoreMeta12|CoreMeta21,
  1051. 0xb9000000, 0xff000007, INSN_GP, ENC_MGET_MSET, 0 },
  1052. /* Conditional SET */
  1053. COND_INSN ("SETB", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1054. 0xa4000000, 0xff00039f, INSN_GP, ENC_COND_SET, 0),
  1055. COND_INSN ("SETW", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1056. 0xa4000001, 0xff00039f, INSN_GP, ENC_COND_SET, 0),
  1057. COND_INSN ("SETD", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1058. 0xa4000200, 0xff00039f, INSN_GP, ENC_COND_SET, 0),
  1059. COND_INSN ("SETL", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1060. 0xa4000201, 0xff00039f, INSN_GP, ENC_COND_SET, 0),
  1061. { "XFRD", CoreMeta11|CoreMeta12|CoreMeta21,
  1062. 0xd0000000, 0xf2000000, INSN_GP, ENC_XFR, 0 },
  1063. { "XFRL", CoreMeta11|CoreMeta12|CoreMeta21,
  1064. 0xd2000000, 0xf2000000, INSN_GP, ENC_XFR, 0 },
  1065. /* Fast control register setup */
  1066. { "MOV", CoreMeta11|CoreMeta12|CoreMeta21,
  1067. 0xa9000000, 0xff000005, INSN_GP, ENC_MOV_CT, 0 },
  1068. { "MOVT", CoreMeta11|CoreMeta12|CoreMeta21,
  1069. 0xa9000001, 0xff000005, INSN_GP, ENC_MOV_CT, 0 },
  1070. { "MOV", CoreMeta11|CoreMeta12|CoreMeta21,
  1071. 0xa9000004, 0xff000005, INSN_GP, ENC_MOV_CT, 0 },
  1072. { "MOVT", CoreMeta11|CoreMeta12|CoreMeta21,
  1073. 0xa9000005, 0xff000005, INSN_GP, ENC_MOV_CT, 0 },
  1074. /* Internal transfer operations */
  1075. { "JUMP", CoreMeta11|CoreMeta12|CoreMeta21,
  1076. 0xac000000, 0xff000004, INSN_GP, ENC_JUMP, 0 },
  1077. { "CALL", CoreMeta11|CoreMeta12|CoreMeta21,
  1078. 0xac000004, 0xff000004, INSN_GP, ENC_JUMP, 0 },
  1079. { "CALLR", CoreMeta11|CoreMeta12|CoreMeta21,
  1080. 0xab000000, 0xff000000, INSN_GP, ENC_CALLR, 0 },
  1081. /* Address unit ALU operations */
  1082. { "MOV", CoreMeta11|CoreMeta12|CoreMeta21,
  1083. 0x80000004, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1084. { "MOV", CoreMeta11|CoreMeta12|CoreMeta21,
  1085. 0x82000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1086. { "MOVT", CoreMeta11|CoreMeta12|CoreMeta21,
  1087. 0x82000005, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1088. { "ADD", CoreMeta11|CoreMeta12|CoreMeta21,
  1089. 0x80000000, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1090. { "ADD", CoreMeta11|CoreMeta12|CoreMeta21,
  1091. 0x82000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1092. { "ADDT", CoreMeta11|CoreMeta12|CoreMeta21,
  1093. 0x82000001, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1094. { "ADD", CoreMeta11|CoreMeta12|CoreMeta21,
  1095. 0x86000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1096. COND_INSN ("ADD", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1097. 0x84000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1098. COND_INSN ("ADD", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1099. 0x86000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1100. { "NEG", CoreMeta11|CoreMeta12|CoreMeta21,
  1101. 0x88000004, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1102. { "NEG", CoreMeta11|CoreMeta12|CoreMeta21,
  1103. 0x8a000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1104. { "NEGT", CoreMeta11|CoreMeta12|CoreMeta21,
  1105. 0x8a000005, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1106. { "SUB", CoreMeta11|CoreMeta12|CoreMeta21,
  1107. 0x88000000, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1108. { "SUB", CoreMeta11|CoreMeta12|CoreMeta21,
  1109. 0x8a000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1110. { "SUBT", CoreMeta11|CoreMeta12|CoreMeta21,
  1111. 0x8a000001, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1112. { "SUB", CoreMeta11|CoreMeta12|CoreMeta21,
  1113. 0x8e000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1114. COND_INSN ("SUB", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1115. 0x8c000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1116. COND_INSN ("SUB", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1117. 0x8e000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1118. /* Data unit ALU operations */
  1119. { "MOV", CoreMeta11|CoreMeta12|CoreMeta21,
  1120. 0x00000004, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1121. { "MOVS", CoreMeta11|CoreMeta12|CoreMeta21,
  1122. 0x08000004, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1123. { "MOV", CoreMeta11|CoreMeta12|CoreMeta21,
  1124. 0x02000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1125. { "MOVS", CoreMeta11|CoreMeta12|CoreMeta21,
  1126. 0x0a000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1127. { "MOVT", CoreMeta11|CoreMeta12|CoreMeta21,
  1128. 0x02000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1129. { "MOVST", CoreMeta11|CoreMeta12|CoreMeta21,
  1130. 0x0a000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1131. { "ADD", DspMeta21,
  1132. 0x00000100, 0xfe000104, INSN_DSP, ENC_DALU,
  1133. DSP_ARGS_1|DSP_ARGS_ACC2|DSP_ARGS_XACC|DSP_ARGS_IMM },
  1134. { "ADD", DspMeta21,
  1135. 0x02000003, 0xfe000003, INSN_DSP, ENC_DALU,
  1136. DSP_ARGS_1|DSP_ARGS_IMM },
  1137. COND_INSN ("ADD", "", 1, DspMeta21,
  1138. 0x040001e0, 0xfe0001fe, INSN_DSP, ENC_DALU, DSP_ARGS_1),
  1139. { "ADD", CoreMeta11|CoreMeta12|CoreMeta21,
  1140. 0x00000000, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1141. { "ADDS", DspMeta21,
  1142. 0x08000100, 0xfe000104, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_ACC2 },
  1143. { "ADDS", DspMeta21,
  1144. 0x0a000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1145. { "ADDS", CoreMeta11|CoreMeta12|CoreMeta21,
  1146. 0x08000000, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1147. { "ADD", CoreMeta11|CoreMeta12|CoreMeta21,
  1148. 0x02000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1149. { "ADDS", CoreMeta11|CoreMeta12|CoreMeta21,
  1150. 0x0a000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1151. { "ADDT", CoreMeta11|CoreMeta12|CoreMeta21,
  1152. 0x02000001, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1153. { "ADDST", CoreMeta11|CoreMeta12|CoreMeta21,
  1154. 0x0a000001, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1155. { "ADD", CoreMeta11|CoreMeta12|CoreMeta21,
  1156. 0x06000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1157. COND_INSN ("ADDS", "", 1, DspMeta21,
  1158. 0x0c0001e0, 0xfe0001fe, INSN_DSP, ENC_DALU, DSP_ARGS_1),
  1159. { "ADDS", CoreMeta11|CoreMeta12|CoreMeta21,
  1160. 0x0e000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1161. COND_INSN ("ADD", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1162. 0x04000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1163. COND_INSN ("ADDS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1164. 0x0c000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1165. COND_INSN ("ADD", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1166. 0x06000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1167. COND_INSN ("ADDS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1168. 0x0e000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1169. { "NEG", CoreMeta11|CoreMeta12|CoreMeta21,
  1170. 0x10000004, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1171. { "NEGS", CoreMeta11|CoreMeta12|CoreMeta21,
  1172. 0x18000004, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1173. { "NEG", CoreMeta11|CoreMeta12|CoreMeta21,
  1174. 0x12000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1175. { "NEGS", CoreMeta11|CoreMeta12|CoreMeta21,
  1176. 0x1a000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1177. { "NEGT", CoreMeta11|CoreMeta12|CoreMeta21,
  1178. 0x12000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1179. { "NEGST", CoreMeta11|CoreMeta12|CoreMeta21,
  1180. 0x1a000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1181. { "SUB", DspMeta21,
  1182. 0x10000100, 0xfe000104, INSN_DSP, ENC_DALU,
  1183. DSP_ARGS_1|DSP_ARGS_ACC2|DSP_ARGS_XACC },
  1184. { "SUB", DspMeta21,
  1185. 0x12000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1186. { "SUB", CoreMeta11|CoreMeta12|CoreMeta21,
  1187. 0x10000000, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1188. { "SUBS", CoreMeta11|CoreMeta12|CoreMeta21,
  1189. 0x18000000, 0xfe0001fc, INSN_GP, ENC_ALU, 0 },
  1190. { "SUB", CoreMeta11|CoreMeta12|CoreMeta21,
  1191. 0x12000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1192. { "SUBS", CoreMeta11|CoreMeta12|CoreMeta21,
  1193. 0x1a000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1194. { "SUBT", CoreMeta11|CoreMeta12|CoreMeta21,
  1195. 0x12000001, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1196. { "SUBS", DspMeta21,
  1197. 0x18000100, 0xfe000104, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_ACC2 },
  1198. { "SUBS", DspMeta21,
  1199. 0x1a000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1200. { "SUBST", CoreMeta11|CoreMeta12|CoreMeta21,
  1201. 0x1a000001, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1202. { "SUB", CoreMeta11|CoreMeta12|CoreMeta21,
  1203. 0x16000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1204. { "SUBS", CoreMeta11|CoreMeta12|CoreMeta21,
  1205. 0x1e000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1206. COND_INSN ("SUBS", "", 1, DspMeta21,
  1207. 0x1c0001e0, 0xfe0001fe, INSN_DSP, ENC_DALU, DSP_ARGS_1),
  1208. COND_INSN ("SUB", "", 1, DspMeta21,
  1209. 0x140001e0, 0xfe0001fe, INSN_DSP, ENC_DALU, DSP_ARGS_1),
  1210. COND_INSN ("SUB", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1211. 0x14000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1212. COND_INSN ("SUBS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1213. 0x1c000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1214. COND_INSN ("SUB", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1215. 0x16000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1216. COND_INSN ("SUBS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1217. 0x1e000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1218. { "AND", CoreMeta11|CoreMeta12|CoreMeta21,
  1219. 0x20000000, 0xfe0001fe, INSN_GP, ENC_ALU, 0 },
  1220. { "ANDS", CoreMeta11|CoreMeta12|CoreMeta21,
  1221. 0x28000000, 0xfe0001fe, INSN_GP, ENC_ALU, 0 },
  1222. { "ANDQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1223. 0x20000040, 0xfe00017e, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1224. { "ANDSQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1225. 0x28000040, 0xfe00017e, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1226. { "AND", CoreMeta11|CoreMeta12|CoreMeta21,
  1227. 0x22000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1228. { "ANDMB", CoreMeta11|CoreMeta12|CoreMeta21,
  1229. 0x22000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1230. { "ANDS", CoreMeta11|CoreMeta12|CoreMeta21,
  1231. 0x2a000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1232. { "ANDSMB", CoreMeta11|CoreMeta12|CoreMeta21,
  1233. 0x2a000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1234. { "ANDT", CoreMeta11|CoreMeta12|CoreMeta21,
  1235. 0x22000001, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1236. { "ANDMT", CoreMeta11|CoreMeta12|CoreMeta21,
  1237. 0x22000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1238. { "ANDST", CoreMeta11|CoreMeta12|CoreMeta21,
  1239. 0x2a000001, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1240. { "ANDSMT", CoreMeta11|CoreMeta12|CoreMeta21,
  1241. 0x2a000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1242. { "AND", DspMeta21,
  1243. 0x20000100, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1 },
  1244. { "AND", CoreMeta11|CoreMeta12|CoreMeta21,
  1245. 0x26000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1246. { "ANDS", CoreMeta11|CoreMeta12|CoreMeta21,
  1247. 0x2e000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1248. { "ANDQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1249. 0x26000021, 0xfe000021, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1250. { "ANDSQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1251. 0x2e000021, 0xfe000021, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1252. { "ANDQ", DspMeta21,
  1253. 0x20000140, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_QR },
  1254. COND_INSN ("ANDQ", "", 1, DspMeta21,
  1255. 0x240001c0, 0xfe0001de, INSN_DSP, ENC_DALU,
  1256. DSP_ARGS_1|DSP_ARGS_QR),
  1257. COND_INSN ("AND", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1258. 0x24000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1259. { "ANDSQ", DspMeta21,
  1260. 0x28000140, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_QR },
  1261. COND_INSN ("ANDSQ", "", 1, DspMeta21,
  1262. 0x2c0001c0, 0xfe0001de, INSN_DSP, ENC_DALU,
  1263. DSP_ARGS_1|DSP_ARGS_QR),
  1264. COND_INSN ("ANDS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1265. 0x2c000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1266. COND_INSN ("AND", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1267. 0x26000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1268. COND_INSN ("ANDS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1269. 0x2e000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1270. COND_INSN ("ANDQ", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1271. 0x26000001, 0xfe00003f, INSN_GP, ENC_ALU, GP_ARGS_QR),
  1272. COND_INSN ("ANDSQ", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1273. 0x2e000001, 0xfe00003f, INSN_GP, ENC_ALU, GP_ARGS_QR),
  1274. { "OR", CoreMeta11|CoreMeta12|CoreMeta21,
  1275. 0x30000000, 0xfe0001fe, INSN_GP, ENC_ALU, 0 },
  1276. { "ORS", CoreMeta11|CoreMeta12|CoreMeta21,
  1277. 0x38000000, 0xfe0001fe, INSN_GP, ENC_ALU, 0 },
  1278. { "ORQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1279. 0x30000040, 0xfe00017e, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1280. { "ORSQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1281. 0x38000040, 0xfe00017e, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1282. { "OR", CoreMeta11|CoreMeta12|CoreMeta21,
  1283. 0x32000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1284. { "ORMB", CoreMeta11|CoreMeta12|CoreMeta21,
  1285. 0x32000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1286. { "ORS", CoreMeta11|CoreMeta12|CoreMeta21,
  1287. 0x3a000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1288. { "ORSMB", CoreMeta11|CoreMeta12|CoreMeta21,
  1289. 0x3a000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1290. { "ORT", CoreMeta11|CoreMeta12|CoreMeta21,
  1291. 0x32000001, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1292. { "ORMT", CoreMeta11|CoreMeta12|CoreMeta21,
  1293. 0x32000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1294. { "ORST", CoreMeta11|CoreMeta12|CoreMeta21,
  1295. 0x3a000001, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1296. { "ORSMT", CoreMeta11|CoreMeta12|CoreMeta21,
  1297. 0x3a000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1298. { "OR", CoreMeta11|CoreMeta12|CoreMeta21,
  1299. 0x36000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1300. { "ORS", CoreMeta11|CoreMeta12|CoreMeta21,
  1301. 0x3e000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1302. { "ORQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1303. 0x36000021, 0xfe000021, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1304. { "ORSQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1305. 0x3e000021, 0xfe000021, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1306. { "ORQ", DspMeta21,
  1307. 0x30000140, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_QR },
  1308. COND_INSN ("ORQ", "", 1, DspMeta21,
  1309. 0x340001c0, 0xfe0001de, INSN_DSP, ENC_DALU,
  1310. DSP_ARGS_1|DSP_ARGS_QR),
  1311. COND_INSN ("OR", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1312. 0x34000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1313. { "ORSQ", DspMeta21,
  1314. 0x38000140, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_QR },
  1315. COND_INSN ("ORSQ", "", 1, DspMeta21,
  1316. 0x3c0001c0, 0xfe0001de, INSN_DSP, ENC_DALU,
  1317. DSP_ARGS_1|DSP_ARGS_QR),
  1318. COND_INSN ("ORS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1319. 0x3c000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1320. COND_INSN ("OR", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1321. 0x36000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1322. COND_INSN ("ORS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1323. 0x3e000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1324. COND_INSN ("ORQ", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1325. 0x36000001, 0xfe00003f, INSN_GP, ENC_ALU, GP_ARGS_QR),
  1326. COND_INSN ("ORSQ", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1327. 0x3e000001, 0xfe00003f, INSN_GP, ENC_ALU, GP_ARGS_QR),
  1328. { "XOR", CoreMeta11|CoreMeta12|CoreMeta21,
  1329. 0x40000000, 0xfe0001fe, INSN_GP, ENC_ALU, 0 },
  1330. { "XORS", CoreMeta11|CoreMeta12|CoreMeta21,
  1331. 0x48000000, 0xfe0001fe, INSN_GP, ENC_ALU, 0 },
  1332. { "XORQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1333. 0x40000040, 0xfe00017e, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1334. { "XORSQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1335. 0x48000040, 0xfe00017e, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1336. { "XOR", CoreMeta11|CoreMeta12|CoreMeta21,
  1337. 0x42000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1338. { "XORMB", CoreMeta11|CoreMeta12|CoreMeta21,
  1339. 0x42000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1340. { "XORS", CoreMeta11|CoreMeta12|CoreMeta21,
  1341. 0x4a000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1342. { "XORSMB", CoreMeta11|CoreMeta12|CoreMeta21,
  1343. 0x4a000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1344. { "XORT", CoreMeta11|CoreMeta12|CoreMeta21,
  1345. 0x42000001, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1346. { "XORMT", CoreMeta11|CoreMeta12|CoreMeta21,
  1347. 0x42000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1348. { "XORST", CoreMeta11|CoreMeta12|CoreMeta21,
  1349. 0x4a000001, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1350. { "XORSMT", CoreMeta11|CoreMeta12|CoreMeta21,
  1351. 0x4a000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1352. { "XOR", CoreMeta11|CoreMeta12|CoreMeta21,
  1353. 0x46000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1354. { "XORS", CoreMeta11|CoreMeta12|CoreMeta21,
  1355. 0x4e000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1356. { "XORQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1357. 0x46000021, 0xfe000021, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1358. { "XORSQ", CoreMeta11|CoreMeta12|CoreMeta21,
  1359. 0x4e000021, 0xfe000021, INSN_GP, ENC_ALU, GP_ARGS_QR },
  1360. { "XORQ", DspMeta21,
  1361. 0x40000140, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_QR },
  1362. COND_INSN ("XORQ", "", 1, DspMeta21,
  1363. 0x440001c0, 0xfe0001de, INSN_DSP, ENC_DALU,
  1364. DSP_ARGS_1|DSP_ARGS_QR),
  1365. COND_INSN ("XOR", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1366. 0x44000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1367. { "XORSQ", DspMeta21,
  1368. 0x48000140, 0xfe000140, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_QR },
  1369. COND_INSN ("XORSQ", "", 1, DspMeta21,
  1370. 0x4c0001c0, 0xfe0001de, INSN_DSP, ENC_DALU,
  1371. DSP_ARGS_1|DSP_ARGS_QR),
  1372. COND_INSN ("XORS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1373. 0x4c000000, 0xfe00001e, INSN_GP, ENC_ALU, 0),
  1374. COND_INSN ("XOR", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1375. 0x46000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1376. COND_INSN ("XORS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1377. 0x4e000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1378. COND_INSN ("XORQ", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1379. 0x46000001, 0xfe00003f, INSN_GP, ENC_ALU, GP_ARGS_QR),
  1380. COND_INSN ("XORSQ", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1381. 0x4e000001, 0xfe00003f, INSN_GP, ENC_ALU, GP_ARGS_QR),
  1382. { "LSL", CoreMeta11|CoreMeta12|CoreMeta21,
  1383. 0x50000000, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0 },
  1384. { "LSL", CoreMeta11|CoreMeta12|CoreMeta21,
  1385. 0x54000020, 0xfc0001e0, INSN_GP, ENC_SHIFT, 0 },
  1386. COND_INSN ("LSL", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1387. 0x54000000, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0),
  1388. { "LSLS", CoreMeta11|CoreMeta12|CoreMeta21,
  1389. 0x58000000, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0 },
  1390. { "LSLS", CoreMeta11|CoreMeta12|CoreMeta21,
  1391. 0x5c000020, 0xfc0001e0, INSN_GP, ENC_SHIFT, 0 },
  1392. COND_INSN ("LSLS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1393. 0x5c000000, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0),
  1394. { "LSR", CoreMeta11|CoreMeta12|CoreMeta21,
  1395. 0x50000040, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0 },
  1396. { "LSR", CoreMeta11|CoreMeta12|CoreMeta21,
  1397. 0x54000060, 0xfc0001e0, INSN_GP, ENC_SHIFT, 0 },
  1398. COND_INSN ("LSR", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1399. 0x54000040, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0),
  1400. { "LSRS", CoreMeta11|CoreMeta12|CoreMeta21,
  1401. 0x58000040, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0 },
  1402. { "LSRS", CoreMeta11|CoreMeta12|CoreMeta21,
  1403. 0x5c000060, 0xfc0001e0, INSN_GP, ENC_SHIFT, 0 },
  1404. COND_INSN ("LSRS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1405. 0x5c000040, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0),
  1406. { "ASL", CoreMeta11|CoreMeta12|CoreMeta21,
  1407. 0x50000080, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0 },
  1408. { "ASL", CoreMeta11|CoreMeta12|CoreMeta21,
  1409. 0x540000a0, 0xfc0001e0, INSN_GP, ENC_SHIFT, 0 },
  1410. COND_INSN ("ASL", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1411. 0x54000080, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0),
  1412. { "ASLS", CoreMeta11|CoreMeta12|CoreMeta21,
  1413. 0x58000080, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0 },
  1414. { "ASLS", CoreMeta11|CoreMeta12|CoreMeta21,
  1415. 0x5c0000a0, 0xfc0001e0, INSN_GP, ENC_SHIFT, 0 },
  1416. COND_INSN ("ASLS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1417. 0x5c000080, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0),
  1418. { "ASR", CoreMeta11|CoreMeta12|CoreMeta21,
  1419. 0x500000c0, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0 },
  1420. { "ASR", CoreMeta11|CoreMeta12|CoreMeta21,
  1421. 0x540000e0, 0xfc0001e0, INSN_GP, ENC_SHIFT, 0 },
  1422. COND_INSN ("ASR", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1423. 0x540000c0, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0),
  1424. { "ASRS", CoreMeta11|CoreMeta12|CoreMeta21,
  1425. 0x580000c0, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0 },
  1426. { "ASRS", CoreMeta11|CoreMeta12|CoreMeta21,
  1427. 0x5c0000e0, 0xfc0001e0, INSN_GP, ENC_SHIFT, 0 },
  1428. COND_INSN ("ASRS", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1429. 0x5c0000c0, 0xfc0001ff, INSN_GP, ENC_SHIFT, 0),
  1430. { "MULW", CoreMeta11|CoreMeta12|CoreMeta21,
  1431. 0x60000000, 0xfe0001fe, INSN_GP, ENC_ALU, 0 },
  1432. { "MULD", CoreMeta11|CoreMeta12|CoreMeta21,
  1433. 0x60000040, 0xfe0001fe, INSN_GP, ENC_ALU, 0 },
  1434. /* MUL is a synonym from MULD. */
  1435. { "MUL", CoreMeta11|CoreMeta12|CoreMeta21,
  1436. 0x60000040, 0xfe0001fe, INSN_GP, ENC_ALU, 0 },
  1437. { "MULW", CoreMeta11|CoreMeta12|CoreMeta21,
  1438. 0x62000000, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1439. { "MULD", CoreMeta11|CoreMeta12|CoreMeta21,
  1440. 0x62000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1441. { "MUL", CoreMeta11|CoreMeta12|CoreMeta21,
  1442. 0x62000004, 0xfe000005, INSN_GP, ENC_ALU, 0 },
  1443. { "MULWT", CoreMeta11|CoreMeta12|CoreMeta21,
  1444. 0x62000001, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1445. { "MULDT", CoreMeta11|CoreMeta12|CoreMeta21,
  1446. 0x62000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1447. { "MULT", CoreMeta11|CoreMeta12|CoreMeta21,
  1448. 0x62000005, 0xfe000007, INSN_GP, ENC_ALU, 0 },
  1449. { "MULW", CoreMeta11|CoreMeta12|CoreMeta21,
  1450. 0x64000020, 0xfe0001e0, INSN_GP, ENC_ALU, 0 },
  1451. { "MULD", CoreMeta11|CoreMeta12|CoreMeta21,
  1452. 0x64000060, 0xfe0001e0, INSN_GP, ENC_ALU, 0 },
  1453. { "MUL", CoreMeta11|CoreMeta12|CoreMeta21,
  1454. 0x64000060, 0xfe0001e0, INSN_GP, ENC_ALU, 0 },
  1455. { "MULW", CoreMeta11|CoreMeta12|CoreMeta21,
  1456. 0x66000020, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1457. { "MULD", CoreMeta11|CoreMeta12|CoreMeta21,
  1458. 0x66000021, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1459. { "MUL", CoreMeta11|CoreMeta12|CoreMeta21,
  1460. 0x66000021, 0xfe000021, INSN_GP, ENC_ALU, 0 },
  1461. COND_INSN ("MULW", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1462. 0x64000000, 0xfe0001fe, INSN_GP, ENC_ALU, 0),
  1463. COND_INSN ("MULD", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1464. 0x64000040, 0xfe0001fe, INSN_GP, ENC_ALU, 0),
  1465. COND_INSN ("MUL", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1466. 0x64000040, 0xfe0001fe, INSN_GP, ENC_ALU, 0),
  1467. COND_INSN ("MULW", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1468. 0x66000000, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1469. COND_INSN ("MULD", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1470. 0x66000001, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1471. COND_INSN ("MUL", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1472. 0x66000001, 0xfe00003f, INSN_GP, ENC_ALU, 0),
  1473. { "MIN", CoreMeta11|CoreMeta12|CoreMeta21,
  1474. 0x70000020, 0xfe0001ff, INSN_GP, ENC_MIN_MAX, 0 },
  1475. { "MAX", CoreMeta11|CoreMeta12|CoreMeta21,
  1476. 0x70000024, 0xfe0001ff, INSN_GP, ENC_MIN_MAX, 0 },
  1477. { "FFB", CoreMeta11|CoreMeta12|CoreMeta21,
  1478. 0x70000004, 0xfe003fff, INSN_GP, ENC_BITOP, 0 },
  1479. { "NORM", CoreMeta11|CoreMeta12|CoreMeta21,
  1480. 0x70000008, 0xfe003fff, INSN_GP, ENC_BITOP, 0 },
  1481. { "ABS", CoreMeta11|CoreMeta12|CoreMeta21,
  1482. 0x70000028, 0xfe003fff, INSN_GP, ENC_BITOP, 0 },
  1483. { "XSDB", CoreMeta11|CoreMeta12|CoreMeta21,
  1484. 0xaa000000, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1485. { "XSDSB", CoreMeta11|CoreMeta12|CoreMeta21,
  1486. 0xaa000008, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1487. { "XSDW", CoreMeta11|CoreMeta12|CoreMeta21,
  1488. 0xaa000002, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1489. { "XSDSW", CoreMeta11|CoreMeta12|CoreMeta21,
  1490. 0xaa00000a, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1491. { "RTDW", CoreMeta11|CoreMeta12|CoreMeta21,
  1492. 0xaa000006, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1493. { "RTDSW", CoreMeta11|CoreMeta12|CoreMeta21,
  1494. 0xaa00000e, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1495. { "NMIN", CoreMeta11|CoreMeta12|CoreMeta21,
  1496. 0x7000002c, 0xfe0001ff, INSN_GP, ENC_MIN_MAX, 0 },
  1497. /* Condition setting operations */
  1498. { "CMP", CoreMeta11|CoreMeta12|CoreMeta21,
  1499. 0x70000000, 0xfef801fe, INSN_GP, ENC_CMP, 0 },
  1500. { "TST", CoreMeta11|CoreMeta12|CoreMeta21,
  1501. 0x78000000, 0xfef801fe, INSN_GP, ENC_CMP, 0 },
  1502. { "CMP", CoreMeta11|CoreMeta12|CoreMeta21,
  1503. 0x72000000, 0xfe000005, INSN_GP, ENC_CMP, 0 },
  1504. { "CMPMB", CoreMeta11|CoreMeta12|CoreMeta21,
  1505. 0x72000004, 0xfe000005, INSN_GP, ENC_CMP, 0 },
  1506. { "TST", CoreMeta11|CoreMeta12|CoreMeta21,
  1507. 0x7a000000, 0xfe000005, INSN_GP, ENC_CMP, 0 },
  1508. { "TSTMB", CoreMeta11|CoreMeta12|CoreMeta21,
  1509. 0x7a000004, 0xfe000005, INSN_GP, ENC_CMP, 0 },
  1510. { "CMPT", CoreMeta11|CoreMeta12|CoreMeta21,
  1511. 0x72000001, 0xfe000007, INSN_GP, ENC_CMP, 0 },
  1512. { "CMPMT", CoreMeta11|CoreMeta12|CoreMeta21,
  1513. 0x72000005, 0xfe000007, INSN_GP, ENC_CMP, 0 },
  1514. { "TSTT", CoreMeta11|CoreMeta12|CoreMeta21,
  1515. 0x7a000001, 0xfe000007, INSN_GP, ENC_CMP, 0 },
  1516. { "TSTMT", CoreMeta11|CoreMeta12|CoreMeta21,
  1517. 0x7a000005, 0xfe000007, INSN_GP, ENC_CMP, 0 },
  1518. COND_INSN ("CMP", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1519. 0x74000000, 0xfef801fe, INSN_GP, ENC_CMP, 0),
  1520. COND_INSN ("TST", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1521. 0x7c000000, 0xfef801fe, INSN_GP, ENC_CMP, 0),
  1522. COND_INSN ("CMP", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1523. 0x76000000, 0xfef8003e, INSN_GP, ENC_CMP, 0),
  1524. COND_INSN ("TST", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1525. 0x7e000000, 0xfef8003e, INSN_GP, ENC_CMP, 0),
  1526. /* No-op (BNV) */
  1527. { "NOP", CoreMeta11|CoreMeta12|CoreMeta21,
  1528. 0xa0fffffe, 0xffffffff, INSN_GP, ENC_NONE, 0 },
  1529. /* Branch */
  1530. COND_INSN ("B", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1531. 0xa0000000, 0xff00001f, INSN_GP, ENC_BRANCH, 0),
  1532. COND_INSN ("B", "R", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1533. 0xa0000001, 0xff00001f, INSN_GP, ENC_BRANCH, 0),
  1534. /* System operations */
  1535. { "LOCK0", CoreMeta11|CoreMeta12|CoreMeta21,
  1536. 0xa8000000, 0xffffffff, INSN_GP, ENC_NONE, 0 },
  1537. { "LOCK1", CoreMeta11|CoreMeta12|CoreMeta21,
  1538. 0xa8000001, 0xffffffff, INSN_GP, ENC_NONE, 0 },
  1539. { "LOCK2", CoreMeta11|CoreMeta12|CoreMeta21,
  1540. 0xa8000003, 0xffffffff, INSN_GP, ENC_NONE, 0 },
  1541. { "RTI", CoreMeta11|CoreMeta12|CoreMeta21,
  1542. 0xa3ffffff, 0xffffffff, INSN_GP, ENC_NONE, 0 },
  1543. { "RTH", CoreMeta11|CoreMeta12|CoreMeta21,
  1544. 0xa37fffff, 0xffffffff, INSN_GP, ENC_NONE, 0 },
  1545. COND_INSN ("KICK", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1546. 0xa3000001, 0xff003e1f, INSN_GP, ENC_KICK, 0),
  1547. { "SWITCH", CoreMeta11|CoreMeta12|CoreMeta21,
  1548. 0xaf000000, 0xff000000, INSN_GP, ENC_SWITCH, 0 },
  1549. { "DCACHE", CoreMeta11|CoreMeta12|CoreMeta21,
  1550. 0xad000000, 0xff000087, INSN_GP, ENC_CACHEW, 0 },
  1551. { "ICACHEEXIT", CoreMeta12|CoreMeta21,
  1552. 0xae000000, 0xffffffff, INSN_GP, ENC_NONE, 0 },
  1553. { "ICACHEEXITR", CoreMeta12|CoreMeta21,
  1554. 0xae000001, 0xffffffff, INSN_GP, ENC_NONE, 0 },
  1555. { "ICACHE", CoreMeta12|CoreMeta21,
  1556. 0xae000000, 0xff0001e1, INSN_GP, ENC_ICACHE, 0 },
  1557. { "ICACHER", CoreMeta12|CoreMeta21,
  1558. 0xae000001, 0xff0001e1, INSN_GP, ENC_ICACHE, 0 },
  1559. /* Meta 2 instructions */
  1560. { "CACHERD", CoreMeta21,
  1561. 0xad000081, 0xff000087, INSN_GP, ENC_CACHER, 0 },
  1562. { "CACHERL", CoreMeta21,
  1563. 0xad000083, 0xff000087, INSN_GP, ENC_CACHER, 0 },
  1564. { "CACHEWD", CoreMeta21,
  1565. 0xad000001, 0xff000087, INSN_GP, ENC_CACHEW, 0 },
  1566. { "CACHEWL", CoreMeta21,
  1567. 0xad000003, 0xff000087, INSN_GP, ENC_CACHEW, 0 },
  1568. COND_INSN ("DEFR", "", 1, CoreMeta21,
  1569. 0xa3002001, 0xff003e1f, INSN_GP, ENC_KICK, 0),
  1570. { "BEXD", CoreMeta21,
  1571. 0xaa000004, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1572. { "BEXSD", CoreMeta21,
  1573. 0xaa00000c, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1574. { "BEXL", CoreMeta21,
  1575. 0xaa000014, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1576. { "BEXSL", CoreMeta21,
  1577. 0xaa00001c, 0xff003ffe, INSN_GP, ENC_BITOP, 0 },
  1578. { "LNKGETB", CoreMeta21,
  1579. 0xad000080, 0xff000087, INSN_GP, ENC_LNKGET, 0 },
  1580. { "LNKGETW", CoreMeta21,
  1581. 0xad000082, 0xff000087, INSN_GP, ENC_LNKGET, 0 },
  1582. { "LNKGETD", CoreMeta21,
  1583. 0xad000084, 0xff000087, INSN_GP, ENC_LNKGET, 0 },
  1584. { "LNKGETL", CoreMeta21,
  1585. 0xad000086, 0xff000087, INSN_GP, ENC_LNKGET, 0 },
  1586. COND_INSN ("LNKSETB", "", 1, CoreMeta21,
  1587. 0xa4000080, 0xff00039f, INSN_GP, ENC_COND_SET, 0),
  1588. COND_INSN ("LNKSETW", "", 1, CoreMeta21,
  1589. 0xa4000081, 0xff00039f, INSN_GP, ENC_COND_SET, 0),
  1590. COND_INSN ("LNKSETD", "", 1, CoreMeta21,
  1591. 0xa4000280, 0xff00039f, INSN_GP, ENC_COND_SET, 0),
  1592. COND_INSN ("LNKSETL", "", 1, CoreMeta21,
  1593. 0xa4000281, 0xff00039f, INSN_GP, ENC_COND_SET, 0),
  1594. /* Meta 2 FPU instructions */
  1595. /* Port-to-unit MOV */
  1596. COND_INSN ("MOVL", "", 1, FpuMeta21,
  1597. 0xa1800201, 0xfff83e1f, INSN_FPU, ENC_MOV_PORT, 0),
  1598. /* Read pipeline drain */
  1599. { "MMOVD", FpuMeta21,
  1600. 0xce000006, 0xfffc007f, INSN_FPU, ENC_MMOV, 0 },
  1601. { "MMOVL", FpuMeta21,
  1602. 0xcf000006, 0xfffc007f, INSN_FPU, ENC_MMOV, 0 },
  1603. /* FP data movement instructions */
  1604. FCOND_INSN ("ABS", "", 1, FpuMeta21,
  1605. 0xf0000080, 0xff843f9f, INSN_FPU, ENC_FMOV, 0),
  1606. { "MMOVD", FpuMeta21,
  1607. 0xbe000002, 0xff84007e, INSN_FPU, ENC_FMMOV, 0 },
  1608. { "MMOVL", FpuMeta21,
  1609. 0xbf000002, 0xff84007e, INSN_FPU, ENC_FMMOV, 0 },
  1610. { "MMOVD", FpuMeta21,
  1611. 0xce000002, 0xff84007e, INSN_FPU, ENC_FMMOV, 0 },
  1612. { "MMOVL", FpuMeta21,
  1613. 0xcf000002, 0xff84007e, INSN_FPU, ENC_FMMOV, 0 },
  1614. { "MOVD", FpuMeta21,
  1615. 0x08000144, 0xfe03e1ff, INSN_FPU, ENC_FMOV_DATA, 0 },
  1616. { "MOVD", FpuMeta21,
  1617. 0x080001c4, 0xfe83c1ff, INSN_FPU, ENC_FMOV_DATA, 0 },
  1618. { "MOVL", FpuMeta21,
  1619. 0x08000154, 0xfe03e1ff, INSN_FPU, ENC_FMOV_DATA, 0 },
  1620. { "MOVL", FpuMeta21,
  1621. 0x080001d4, 0xfe83c1ff, INSN_FPU, ENC_FMOV_DATA, 0 },
  1622. FCOND_INSN ("MOV", "", 1, FpuMeta21,
  1623. 0xf0000000, 0xff843f9f, INSN_FPU, ENC_FMOV, 0),
  1624. { "MOV", FpuMeta21,
  1625. 0xf0000001, 0xff800001, INSN_FPU, ENC_FMOV_I, 0 },
  1626. FCOND_INSN ("NEG", "", 1, FpuMeta21,
  1627. 0xf0000100, 0xff843f9f, INSN_FPU, ENC_FMOV, 0),
  1628. { "PACK", FpuMeta21,
  1629. 0xf0000180, 0xff8c21ff, INSN_FPU, ENC_FPACK, 0 },
  1630. { "SWAP", FpuMeta21,
  1631. 0xf00001c0, 0xff8c7fff, INSN_FPU, ENC_FSWAP, 0 },
  1632. /* FP comparison instructions */
  1633. FCOND_INSN ("CMP", "", 1, FpuMeta21,
  1634. 0xf3000000, 0xfff4201f, INSN_FPU, ENC_FCMP, 0),
  1635. FCOND_INSN ("MAX", "", 1, FpuMeta21,
  1636. 0xf3000081, 0xff84219f, INSN_FPU, ENC_FMINMAX, 0),
  1637. FCOND_INSN ("MIN", "", 1, FpuMeta21,
  1638. 0xf3000001, 0xff84219f, INSN_FPU, ENC_FMINMAX, 0),
  1639. /* FP data conversion instructions */
  1640. FCOND_INSN ("DTOF", "", 1, FpuMeta21,
  1641. 0xf2000121, 0xff843fff, INSN_FPU, ENC_FCONV, 0),
  1642. FCOND_INSN ("FTOD", "", 1, FpuMeta21,
  1643. 0xf2000101, 0xff843fff, INSN_FPU, ENC_FCONV, 0),
  1644. FCOND_INSN ("DTOH", "", 1, FpuMeta21,
  1645. 0xf2000320, 0xff843fff, INSN_FPU, ENC_FCONV, 0),
  1646. FCOND_INSN ("FTOH", "", 1, FpuMeta21,
  1647. 0xf2000300, 0xff843fbf, INSN_FPU, ENC_FCONV, 0),
  1648. FCOND_INSN ("DTOI", "", 1, FpuMeta21,
  1649. 0xf2002120, 0xff842fff, INSN_FPU, ENC_FCONV, 0),
  1650. FCOND_INSN ("FTOI", "", 1, FpuMeta21,
  1651. 0xf2002100, 0xff842fbf, INSN_FPU, ENC_FCONV, 0),
  1652. FCOND_INSN ("DTOL", "", 1, FpuMeta21,
  1653. 0xf2002320, 0xff8c6fff, INSN_FPU, ENC_FCONV, 0),
  1654. FCOND_INSN ("DTOX", "", 1, FpuMeta21,
  1655. 0xf2000020, 0xff8401bf, INSN_FPU, ENC_FCONVX, 0),
  1656. FCOND_INSN ("FTOX", "", 1, FpuMeta21,
  1657. 0xf2000000, 0xff8401bf, INSN_FPU, ENC_FCONVX, 0),
  1658. FCOND_INSN ("DTOXL", "", 1, FpuMeta21,
  1659. 0xf20000a0, 0xff8c40ff, INSN_FPU, ENC_FCONVX, 0),
  1660. FCOND_INSN ("HTOD", "", 1, FpuMeta21,
  1661. 0xf2000321, 0xff843fff, INSN_FPU, ENC_FCONV, 0),
  1662. FCOND_INSN ("HTOF", "", 1, FpuMeta21,
  1663. 0xf2000301, 0xff843fbf, INSN_FPU, ENC_FCONV, 0),
  1664. FCOND_INSN ("ITOD", "", 1, FpuMeta21,
  1665. 0xf2002121, 0xff843fff, INSN_FPU, ENC_FCONV, 0),
  1666. FCOND_INSN ("ITOF", "", 1, FpuMeta21,
  1667. 0xf2002101, 0xff843fbf, INSN_FPU, ENC_FCONV, 0),
  1668. FCOND_INSN ("LTOD", "", 1, FpuMeta21,
  1669. 0xf2002321, 0xff8c7fff, INSN_FPU, ENC_FCONV, 0),
  1670. FCOND_INSN ("XTOD", "", 1, FpuMeta21,
  1671. 0xf2000021, 0xff8401bf, INSN_FPU, ENC_FCONVX, 0),
  1672. FCOND_INSN ("XTOF", "", 1, FpuMeta21,
  1673. 0xf2000001, 0xff8401bf, INSN_FPU, ENC_FCONVX, 0),
  1674. FCOND_INSN ("XLTOD", "", 1, FpuMeta21,
  1675. 0xf20000a1, 0xff8c40ff, INSN_FPU, ENC_FCONVX, 0),
  1676. /* FP basic arithmetic instructions */
  1677. FCOND_INSN ("ADD", "", 1, FpuMeta21,
  1678. 0xf1000001, 0xff84211f, INSN_FPU, ENC_FBARITH, 0),
  1679. FCOND_INSN ("MUL", "", 1, FpuMeta21,
  1680. 0xf1000100, 0xff84211f, INSN_FPU, ENC_FBARITH, 0),
  1681. FCOND_INSN ("SUB", "", 1, FpuMeta21,
  1682. 0xf1000101, 0xff84211f, INSN_FPU, ENC_FBARITH, 0),
  1683. /* FP extended arithmetic instructions */
  1684. { "MAC", FpuMeta21,
  1685. 0xf6000000, 0xfffc219f, INSN_FPU, ENC_FEARITH, 0 },
  1686. { "MACS", FpuMeta21,
  1687. 0xf6000100, 0xfffc219f, INSN_FPU, ENC_FEARITH, 0 },
  1688. { "MAR", FpuMeta21,
  1689. 0xf6000004, 0xff84211f, INSN_FPU, ENC_FEARITH, 0 },
  1690. { "MARS", FpuMeta21,
  1691. 0xf6000104, 0xff84211f, INSN_FPU, ENC_FEARITH, 0 },
  1692. { "MAW", FpuMeta21,
  1693. 0xf6000008, 0xff84219f, INSN_FPU, ENC_FEARITH, 0 },
  1694. { "MAWS", FpuMeta21,
  1695. 0xf6000108, 0xff84219f, INSN_FPU, ENC_FEARITH, 0 },
  1696. { "MAW1", FpuMeta21,
  1697. 0xf6000009, 0xff84219f, INSN_FPU, ENC_FEARITH, 0 },
  1698. { "MAWS1", FpuMeta21,
  1699. 0xf6000109, 0xff84219f, INSN_FPU, ENC_FEARITH, 0 },
  1700. FCOND_INSN ("MXA", "", 1, FpuMeta21,
  1701. 0xf5000000, 0xff84211f, INSN_FPU, ENC_FEARITH, 0),
  1702. FCOND_INSN ("MXAS", "", 1, FpuMeta21,
  1703. 0xf5000100, 0xff84211f, INSN_FPU, ENC_FEARITH, 0),
  1704. FCOND_INSN ("MXA1", "", 1, FpuMeta21,
  1705. 0xf5000001, 0xff84211f, INSN_FPU, ENC_FEARITH, 0),
  1706. FCOND_INSN ("MXAS1", "", 1, FpuMeta21,
  1707. 0xf5000101, 0xff84211f, INSN_FPU, ENC_FEARITH, 0),
  1708. { "MUZ", FpuMeta21,
  1709. 0xf6000010, 0xff84211d, INSN_FPU, ENC_FEARITH, 0 },
  1710. { "MUZS", FpuMeta21,
  1711. 0xf6000110, 0xff84211d, INSN_FPU, ENC_FEARITH, 0 },
  1712. { "MUZ1", FpuMeta21,
  1713. 0xf6000011, 0xff84211d, INSN_FPU, ENC_FEARITH, 0 },
  1714. { "MUZS1", FpuMeta21,
  1715. 0xf6000111, 0xff84211d, INSN_FPU, ENC_FEARITH, 0 },
  1716. { "RCP", FpuMeta21,
  1717. 0xf7000000, 0xff84391f, INSN_FPU, ENC_FREC, 0 },
  1718. { "RSQ", FpuMeta21,
  1719. 0xf7000100, 0xff84391f, INSN_FPU, ENC_FREC, 0 },
  1720. /* FP SIMD arithmetic instructions */
  1721. { "ADDRE", FpuMeta21,
  1722. 0xf4000000, 0xff8c637f, INSN_FPU, ENC_FSIMD, 0 },
  1723. { "MULRE", FpuMeta21,
  1724. 0xf4000001, 0xff8c637f, INSN_FPU, ENC_FSIMD, 0 },
  1725. { "SUBRE", FpuMeta21,
  1726. 0xf4000100, 0xff8c637f, INSN_FPU, ENC_FSIMD, 0 },
  1727. /* FP memory instructions */
  1728. { "MGETD", FpuMeta21,
  1729. 0xce000000, 0xff00001f, INSN_FPU, ENC_MGET_MSET, 0 },
  1730. { "MGET", FpuMeta21,
  1731. 0xce000000, 0xff00001f, INSN_FPU, ENC_MGET_MSET, 0 },
  1732. { "MGETL", FpuMeta21,
  1733. 0xcf000000, 0xff00001f, INSN_FPU, ENC_MGET_MSET, 0 },
  1734. { "MSETD", FpuMeta21,
  1735. 0xbe000000, 0xff00001f, INSN_FPU, ENC_MGET_MSET, 0 },
  1736. { "MSET", FpuMeta21,
  1737. 0xbe000000, 0xff00001f, INSN_FPU, ENC_MGET_MSET, 0 },
  1738. { "MSETL", FpuMeta21,
  1739. 0xbf000000, 0xff00001f, INSN_FPU, ENC_MGET_MSET, 0 },
  1740. /* FP accumulator memory instructions */
  1741. { "GETL", FpuMeta21,
  1742. 0xcf000004, 0xffe03f9f, INSN_FPU, ENC_FGET_SET_ACF, 0 },
  1743. { "SETL", FpuMeta21,
  1744. 0xbf000004, 0xffe03f9f, INSN_FPU, ENC_FGET_SET_ACF, 0 },
  1745. /* DSP FPU data movement */
  1746. { "MOV", DspMeta21|FpuMeta21,
  1747. 0x08000146, 0xfe0001ee, INSN_DSP_FPU, ENC_DALU,
  1748. DSP_ARGS_2|DSP_ARGS_DSP_SRC1 },
  1749. { "MOV", DspMeta21|FpuMeta21,
  1750. 0x080001c6, 0xfe0001ee, INSN_DSP_FPU, ENC_DALU,
  1751. DSP_ARGS_2|DSP_ARGS_DSP_SRC2 },
  1752. /* Unit-to-unit MOV */
  1753. COND_INSN ("MOV", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1754. 0xa3000000, 0xff00021f, INSN_GP, ENC_MOV_U2U, 0),
  1755. COND_INSN ("TTMOV", "", 1, CoreMeta12|CoreMeta21,
  1756. 0xa3000201, 0xff00021f, INSN_GP, ENC_MOV_U2U, 0),
  1757. COND_INSN ("SWAP", "", 1, CoreMeta11|CoreMeta12|CoreMeta21,
  1758. 0xa3000200, 0xff00021f, INSN_GP, ENC_SWAP, 0),
  1759. /* DSP memory instructions */
  1760. { "GETD", DspMeta21,
  1761. 0x94000100, 0xff0001fc, INSN_DSP, ENC_DGET_SET, 0 },
  1762. { "SETD", DspMeta21,
  1763. 0x94000000, 0xff0001fc, INSN_DSP, ENC_DGET_SET, 0 },
  1764. { "GETL", DspMeta21,
  1765. 0x94000104, 0xff0001fc, INSN_DSP, ENC_DGET_SET, 0 },
  1766. { "SETL", DspMeta21,
  1767. 0x94000004, 0xff0001fc, INSN_DSP, ENC_DGET_SET, 0 },
  1768. /* DSP read pipeline prime/drain */
  1769. { "MMOVD", DspMeta21,
  1770. 0xca000001, 0xff00001f, INSN_DSP, ENC_MMOV, 0 },
  1771. { "MMOVL", DspMeta21,
  1772. 0xcb000001, 0xff00001f, INSN_DSP, ENC_MMOV, 0 },
  1773. { "MMOVD", DspMeta21,
  1774. 0xcc000001, 0xff07c067, INSN_DSP, ENC_MMOV, 0 },
  1775. { "MMOVL", DspMeta21,
  1776. 0xcd000001, 0xff07c067, INSN_DSP, ENC_MMOV, 0 },
  1777. /* DSP Template instantiation */
  1778. TEMPLATE_INSN (DspMeta21, 0x90000000, 0xff00000f, INSN_DSP),
  1779. TEMPLATE_INSN (DspMeta21, 0x93000000, 0xff0001ff, INSN_DSP),
  1780. TEMPLATE_INSN (DspMeta21, 0x95000000, 0xff00000f, INSN_DSP),
  1781. { "AND", DspMeta21,
  1782. 0x22000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1783. { "ANDS", DspMeta21,
  1784. 0x28000100, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1 },
  1785. { "ANDS", DspMeta21,
  1786. 0x2a000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1787. { "MAX", DspMeta21,
  1788. 0x70000124, 0xfe0001ec, INSN_DSP, ENC_DALU, DSP_ARGS_1 },
  1789. { "MIN", DspMeta21,
  1790. 0x70000120, 0xfe0001ec, INSN_DSP, ENC_DALU, DSP_ARGS_1 },
  1791. { "NMIN", DspMeta21,
  1792. 0x7000012c, 0xfe0001ec, INSN_DSP, ENC_DALU, DSP_ARGS_1 },
  1793. { "OR", DspMeta21,
  1794. 0x30000100, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1 },
  1795. { "OR", DspMeta21,
  1796. 0x32000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1797. { "ORS", DspMeta21,
  1798. 0x38000100, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1 },
  1799. { "ORS", DspMeta21,
  1800. 0x3a000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1801. { "XOR", DspMeta21,
  1802. 0x40000100, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1 },
  1803. { "XOR", DspMeta21,
  1804. 0x42000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1805. { "XORS", DspMeta21,
  1806. 0x48000100, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1 },
  1807. { "XORS", DspMeta21,
  1808. 0x4a000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1809. { "ADDB8", DspMeta21,
  1810. 0x20000108, 0xfe00010c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1811. { "ADDT8", DspMeta21,
  1812. 0x2000010c, 0xfe00010c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1813. { "ADDSB8", DspMeta21,
  1814. 0x28000108, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1815. { "ADDST8", DspMeta21,
  1816. 0x2800010c, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1817. { "MULB8", DspMeta21,
  1818. 0x40000108, 0xfe00012c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1819. { "MULT8", DspMeta21,
  1820. 0x4000010c, 0xfe00012c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1821. { "MULSB8", DspMeta21,
  1822. 0x48000108, 0xfe00012c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1823. { "MULST8", DspMeta21,
  1824. 0x4800010c, 0xfe00012c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1825. { "SUBB8", DspMeta21,
  1826. 0x30000108, 0xfe00010c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1827. { "SUBT8", DspMeta21,
  1828. 0x3000010c, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1829. { "SUBSB8", DspMeta21,
  1830. 0x38000108, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1831. { "SUBST8", DspMeta21,
  1832. 0x3800010c, 0xfe00014c, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_SPLIT8 },
  1833. { "MUL", DspMeta21,
  1834. 0x60000100, 0xfe000100, INSN_DSP, ENC_DALU,
  1835. DSP_ARGS_1|DSP_ARGS_DACC },
  1836. { "MUL", DspMeta21,
  1837. 0x62000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_1|DSP_ARGS_IMM },
  1838. { "ABS", DspMeta21,
  1839. 0x70000128, 0xfe0001ec, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1840. { "FFB", DspMeta21,
  1841. 0x70000104, 0xfe0001ec, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1842. { "NORM", DspMeta21,
  1843. 0x70000108, 0xfe0001ec, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1844. { "CMP", DspMeta21,
  1845. 0x70000000, 0xfe0000ec, INSN_DSP, ENC_DALU, DSP_ARGS_2|DSP_ARGS_IMM },
  1846. { "CMP", DspMeta21,
  1847. 0x72000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_2|DSP_ARGS_IMM },
  1848. { "TST", DspMeta21,
  1849. 0x78000100, 0xfe0001ec, INSN_DSP, ENC_DALU, DSP_ARGS_2|DSP_ARGS_IMM },
  1850. { "TST", DspMeta21,
  1851. 0x7a000003, 0xfe000003, INSN_DSP, ENC_DALU, DSP_ARGS_2|DSP_ARGS_IMM },
  1852. { "MOV", DspMeta21,
  1853. 0x00000104, 0xfe078146, INSN_DSP, ENC_DALU,
  1854. DSP_ARGS_2|DSP_ARGS_DSP_SRC1|DSP_ARGS_DSP_SRC2|DSP_ARGS_IMM },
  1855. { "MOVS", DspMeta21,
  1856. 0x08000104, 0xfe000146, INSN_DSP, ENC_DALU, DSP_ARGS_2|DSP_ARGS_DSP_SRC2 },
  1857. { "MOV", DspMeta21,
  1858. 0x91000000, 0xff000000, INSN_DSP, ENC_DALU,
  1859. DSP_ARGS_2|DSP_ARGS_DSP_SRC1|DSP_ARGS_IMM },
  1860. { "MOV", DspMeta21,
  1861. 0x92000000, 0xff000000, INSN_DSP, ENC_DALU, DSP_ARGS_2|DSP_ARGS_DSP_SRC2 },
  1862. { "NEG", DspMeta21,
  1863. 0x10000104, 0xfe000146, INSN_DSP, ENC_DALU, DSP_ARGS_2|DSP_ARGS_DSP_SRC2 },
  1864. { "NEGS", DspMeta21,
  1865. 0x18000104, 0xfe000146, INSN_DSP, ENC_DALU, DSP_ARGS_2|DSP_ARGS_DSP_SRC2 },
  1866. { "XSDB", DspMeta21,
  1867. 0xaa000100, 0xff0001ee, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1868. { "XSD", DspMeta21,
  1869. 0xaa000100, 0xff0001ee, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1870. { "XSDW", DspMeta21,
  1871. 0xaa000102, 0xff0001ee, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1872. { "XSDSB", DspMeta21,
  1873. 0xaa000108, 0xff0001ee, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1874. { "XSDS", DspMeta21,
  1875. 0xaa000108, 0xff0001ee, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1876. { "XSDSW", DspMeta21,
  1877. 0xaa00010a, 0xff0001ee, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1878. { "LSL", DspMeta21,
  1879. 0x50000100, 0xfc0001c0, INSN_DSP, ENC_DALU, 0 },
  1880. { "LSR", DspMeta21,
  1881. 0x50000140, 0xfc0001c0, INSN_DSP, ENC_DALU, 0 },
  1882. { "ASL", DspMeta21,
  1883. 0x50000180, 0xfc0001c0, INSN_DSP, ENC_DALU, 0 },
  1884. { "ASR", DspMeta21,
  1885. 0x500001c0, 0xfc0001c0, INSN_DSP, ENC_DALU, 0 },
  1886. { "LSL", DspMeta21,
  1887. 0x54000120, 0xfc0001e0, INSN_DSP, ENC_DALU, DSP_ARGS_IMM },
  1888. { "LSR", DspMeta21,
  1889. 0x54000160, 0xfc0001e0, INSN_DSP, ENC_DALU, DSP_ARGS_IMM },
  1890. { "ASL", DspMeta21,
  1891. 0x540001a0, 0xfc0001e0, INSN_DSP, ENC_DALU, DSP_ARGS_IMM },
  1892. { "ASR", DspMeta21,
  1893. 0x540001e0, 0xfc0001e0, INSN_DSP, ENC_DALU, DSP_ARGS_IMM },
  1894. COND_INSN ("LSL", "", 1, DspMeta21,
  1895. 0x54000100, 0xfc0001fe, INSN_DSP, ENC_DALU, 0),
  1896. COND_INSN ("LSR", "", 1, DspMeta21,
  1897. 0x54000140, 0xfc0001fe, INSN_DSP, ENC_DALU, 0),
  1898. COND_INSN ("ASL", "", 1, DspMeta21,
  1899. 0x54000180, 0xfc0001fe, INSN_DSP, ENC_DALU, 0),
  1900. COND_INSN ("ASR", "", 1, DspMeta21,
  1901. 0x540001c0, 0xfc0001fe, INSN_DSP, ENC_DALU, 0),
  1902. { "LSLS", DspMeta21,
  1903. 0x58000100, 0xfc0001c0, INSN_DSP, ENC_DALU, 0 },
  1904. { "LSRS", DspMeta21,
  1905. 0x58000140, 0xfc0001c0, INSN_DSP, ENC_DALU, 0 },
  1906. { "ASLS", DspMeta21,
  1907. 0x58000180, 0xfc0001c0, INSN_DSP, ENC_DALU, 0 },
  1908. { "ASRS", DspMeta21,
  1909. 0x580001c0, 0xfc0001c0, INSN_DSP, ENC_DALU, 0 },
  1910. COND_INSN ("LSLS", "", 1, DspMeta21,
  1911. 0x5c000100, 0xfc0001fe, INSN_DSP, ENC_DALU, 0),
  1912. COND_INSN ("LSRS", "", 1, DspMeta21,
  1913. 0x5c000140, 0xfc0001fe, INSN_DSP, ENC_DALU, 0),
  1914. COND_INSN ("ASLS", "", 1, DspMeta21,
  1915. 0x5c000180, 0xfc0001fe, INSN_DSP, ENC_DALU, 0),
  1916. COND_INSN ("ASRS", "", 1, DspMeta21,
  1917. 0x5c0001c0, 0xfc0001fe, INSN_DSP, ENC_DALU, 0),
  1918. { "LSLS", DspMeta21,
  1919. 0x5c000120, 0xfc0001e0, INSN_DSP, ENC_DALU, 0 },
  1920. { "LSRS", DspMeta21,
  1921. 0x5c000160, 0xfc0001e0, INSN_DSP, ENC_DALU, 0 },
  1922. { "ASLS", DspMeta21,
  1923. 0x5c0001a0, 0xfc0001e0, INSN_DSP, ENC_DALU, 0 },
  1924. { "ASRS", DspMeta21,
  1925. 0x5c0001e0, 0xfc0001e0, INSN_DSP, ENC_DALU, 0 },
  1926. { "RTDW", DspMeta21,
  1927. 0xaa000106, 0xff00010e, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1928. { "RTDSW", DspMeta21,
  1929. 0xaa00010e, 0xff00010e, INSN_DSP, ENC_DALU, DSP_ARGS_2 },
  1930. };
  1931. #define UNIT_MASK 0xf
  1932. #define SHORT_UNIT_MASK 0x3
  1933. #define EXT_BASE_REG_MASK 0x1
  1934. #define REG_MASK 0x1f
  1935. #define CC_MASK 0xf
  1936. #define RMASK_MASK 0x7f
  1937. #define GET_SET_IMM_MASK 0x3f
  1938. #define GET_SET_IMM_BITS 6
  1939. #define GET_SET_EXT_IMM_MASK 0xfff
  1940. #define GET_SET_EXT_IMM_BITS 12
  1941. #define DGET_SET_IMM_MASK 0x3
  1942. #define DGET_SET_IMM_BITS 2
  1943. #define MGET_MSET_MAX_REGS 8
  1944. #define MMOV_MAX_REGS 8
  1945. #define IMM16_MASK 0xffff
  1946. #define IMM16_BITS 16
  1947. #define IMM19_MASK 0x7ffff
  1948. #define IMM19_BITS 19
  1949. #define IMM8_MASK 0xff
  1950. #define IMM8_BITS 8
  1951. #define IMM24_MASK 0xffffff
  1952. #define IMM24_BITS 24
  1953. #define IMM5_MASK 0x1f
  1954. #define IMM5_BITS 5
  1955. #define IMM6_MASK 0x3f
  1956. #define IMM6_BITS 6
  1957. #define IMM15_MASK 0x7fff
  1958. #define IMM15_BITS 15
  1959. #define IMM4_MASK 0x1f
  1960. #define IMM4_BITS 4
  1961. #define CALLR_REG_MASK 0x7
  1962. #define CPC_REG_MASK 0xf
  1963. #define O2R_REG_MASK 0x7
  1964. #define ACF_PART_MASK 0x3
  1965. #define DSP_REG_MASK 0xf
  1966. #define DSP_PART_MASK 0x17
  1967. #define TEMPLATE_NUM_REGS 4
  1968. #define TEMPLATE_REGS_MASK 0xf
  1969. #define IS_TEMPLATE_DEF(insn) (insn->dsp_daoppame_flags & DSP_DAOPPAME_TEMP)
  1970. unsigned int metag_get_set_size_bytes (unsigned int opcode);
  1971. unsigned int metag_get_set_ext_size_bytes (unsigned int opcode);
  1972. unsigned int metag_cond_set_size_bytes (unsigned int opcode);