iq10.cpu 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113
  1. ; IQ10-only CPU description. -*- Scheme -*-
  2. ;
  3. ; Copyright 2001, 2002, 2007, 2009 Free Software Foundation, Inc.
  4. ;
  5. ; Contributed by Red Hat Inc; developed under contract from Vitesse.
  6. ;
  7. ; This file is part of the GNU Binutils.
  8. ;
  9. ; This program is free software; you can redistribute it and/or modify
  10. ; it under the terms of the GNU General Public License as published by
  11. ; the Free Software Foundation; either version 3 of the License, or
  12. ; (at your option) any later version.
  13. ;
  14. ; This program is distributed in the hope that it will be useful,
  15. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ; GNU General Public License for more details.
  18. ;
  19. ; You should have received a copy of the GNU General Public License
  20. ; along with this program; if not, write to the Free Software
  21. ; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  22. ; MA 02110-1301, USA.
  23. ; Instructions.
  24. (dni andoui-q10 "iq10 and upper ones immediate" (MACH10 USES-RS USES-RT)
  25. "andoui $rt,$rs,$hi16"
  26. (+ OP10_ANDOUI rs rt hi16)
  27. (set rt (and rs (or (sll hi16 16) #xFFFF)))
  28. ())
  29. (dni andoui2-q10 "iq10 and upper ones immediate" (ALIAS NO-DIS MACH10 USES-RS USES-RT)
  30. "andoui ${rt-rs},$hi16"
  31. (+ OP10_ANDOUI rt-rs hi16)
  32. (set rt-rs (and rt-rs (or (sll hi16 16) #xFFFF)))
  33. ())
  34. (dni orui-q10 "or upper immediate" (MACH10 USES-RS USES-RT)
  35. "orui $rt,$rs,$hi16"
  36. (+ OP10_ORUI rs rt hi16)
  37. (set rt (or rs (sll hi16 16)))
  38. ())
  39. (dni orui2-q10 "or upper immediate" (ALIAS NO-DIS MACH10 USES-RS USES-RT)
  40. "orui ${rt-rs},$hi16"
  41. (+ OP10_ORUI rt-rs hi16)
  42. (set rt-rs (or rt-rs (sll hi16 16)))
  43. ())
  44. (dni mrgbq10 "merge bytes" (MACH10 USES-RD USES-RS USES-RT)
  45. "mrgb $rd,$rs,$rt,$maskq10"
  46. (+ OP_SPECIAL rs rt rd maskq10 FUNC_MRGB)
  47. (sequence ((SI temp))
  48. (if (bitclear? mask 0)
  49. (set temp (and rs #xFF))
  50. (set temp (and rt #xFF)))
  51. (if (bitclear? mask 1)
  52. (set temp (or temp (and rs #xFF00)))
  53. (set temp (or temp (and rt #xFF00))))
  54. (if (bitclear? mask 2)
  55. (set temp (or temp (and rs #xFF0000)))
  56. (set temp (or temp (and rt #xFF0000))))
  57. (if (bitclear? mask 3)
  58. (set temp (or temp (and rs #xFF000000)))
  59. (set temp (or temp (and rt #xFF000000))))
  60. (set rd temp))
  61. ())
  62. (dni mrgbq102 "merge bytes" (ALIAS NO-DIS MACH10 USES-RD USES-RS USES-RT)
  63. "mrgb ${rd-rs},$rt,$maskq10"
  64. (+ OP_SPECIAL rt rd-rs maskq10 FUNC_MRGB)
  65. (sequence ((SI temp))
  66. (if (bitclear? mask 0)
  67. (set temp (and rd-rs #xFF))
  68. (set temp (and rt #xFF)))
  69. (if (bitclear? mask 1)
  70. (set temp (or temp (and rd-rs #xFF00)))
  71. (set temp (or temp (and rt #xFF00))))
  72. (if (bitclear? mask 2)
  73. (set temp (or temp (and rd-rs #xFF0000)))
  74. (set temp (or temp (and rt #xFF0000))))
  75. (if (bitclear? mask 3)
  76. (set temp (or temp (and rd-rs #xFF000000)))
  77. (set temp (or temp (and rt #xFF000000))))
  78. (set rd-rs temp))
  79. ())
  80. ; In the future, we'll want the j & jal to use the 21 bit target, with
  81. ; the upper five bits shifted up. For now, give 'em the 16 bit target.
  82. (dni jq10 "jump" (MACH10)
  83. "j $jmptarg"
  84. (+ OP_J (f-rs 0) (f-rt 0) jmptarg)
  85. ; "j $jmptargq10"
  86. ; (+ OP_J upper-5-jmptargq10 (f-rt 0) lower-16-jmptargq10)
  87. (delay 1 (set pc jmptarg))
  88. ())
  89. (dni jalq10 "jump and link" (MACH10 USES-RT)
  90. "jal $rt,$jmptarg"
  91. (+ OP_JAL (f-rs 0) rt jmptarg)
  92. ; "jal $rt,$jmptargq10"
  93. ; (+ OP_JAL upper-5-jmptargq10 rt lower-16-jmptargq10)
  94. (delay 1
  95. (sequence ()
  96. (set rt (add pc 8))
  97. (set pc jmptarg)))
  98. ())
  99. (dni jalq10-2 "jump and link, implied r31" (MACH10 USES-RT)
  100. "jal $jmptarg"
  101. (+ OP_JAL (f-rs 0) (f-rt 31) jmptarg)
  102. (delay 1
  103. (sequence ()
  104. (set rt (add pc 8))
  105. (set pc jmptarg)))
  106. ())
  107. ; Branch instructions.
  108. (dni bbil "branch bit immediate likely" (MACH10 USES-RS)
  109. "bbil $rs($bitnum),$offset"
  110. (+ OP10_BBIL rs bitnum offset)
  111. (if (bitset? rs bitnum)
  112. (delay 1 (set pc offset))
  113. (skip 1))
  114. ())
  115. (dni bbinl "branch bit immediate negated likely" (MACH10 USES-RS)
  116. "bbinl $rs($bitnum),$offset"
  117. (+ OP10_BBINL rs bitnum offset)
  118. (if (bitclear? rs bitnum)
  119. (delay 1 (set pc offset))
  120. (skip 1))
  121. ())
  122. (dni bbvl "branch bit variable likely" (MACH10 USES-RS USES-RT)
  123. "bbvl $rs,$rt,$offset"
  124. (+ OP10_BBVL rs rt offset)
  125. (if (bitset? rs (and rt #x1F))
  126. (delay 1 (set pc offset))
  127. (skip 1))
  128. ())
  129. (dni bbvnl "branch bit variable negated likely" (MACH10 USES-RS USES-RT)
  130. "bbvnl $rs,$rt,$offset"
  131. (+ OP10_BBVNL rs rt offset)
  132. (if (bitclear? rs (and rt #x1F))
  133. (delay 1 (set pc offset))
  134. (skip 1))
  135. ())
  136. (dni bgtzal "branch if greater than zero and link" (MACH10 USES-RS USES-R31)
  137. "bgtzal $rs,$offset"
  138. (+ OP_REGIMM rs FUNC_BGTZAL offset)
  139. (if (gt rs 0)
  140. (sequence ()
  141. (set (reg h-gr 31) (add pc 8))
  142. (delay 1 (set pc offset))))
  143. ())
  144. (dni bgtzall
  145. "branch if greater than zero and link likely" (MACH10 USES-RS USES-R31)
  146. "bgtzall $rs,$offset"
  147. (+ OP_REGIMM rs FUNC_BGTZALL offset)
  148. (if (gt rs 0)
  149. (sequence ()
  150. (set (reg h-gr 31) (add pc 8))
  151. (delay 1 (set pc offset)))
  152. (skip 1))
  153. ())
  154. (dni blezal "branch if less than or equal to zero and link" (MACH10 USES-RS USES-R31)
  155. "blezal $rs,$offset"
  156. (+ OP_REGIMM rs FUNC_BLEZAL offset)
  157. (if (le rs 0)
  158. (sequence ()
  159. (set (reg h-gr 31) (add pc 8))
  160. (delay 1 (set pc offset))))
  161. ())
  162. (dni blezall
  163. "branch if less than or equal to zero and link likely" (MACH10 USES-RS USES-R31)
  164. "blezall $rs,$offset"
  165. (+ OP_REGIMM rs FUNC_BLEZALL offset)
  166. (if (le rs 0)
  167. (sequence ()
  168. (set (reg h-gr 31) (add pc 8))
  169. (delay 1 (set pc offset)))
  170. (skip 1))
  171. ())
  172. (dni bgtz-q10 "branch if greater than zero" (MACH10 USES-RS)
  173. "bgtz $rs,$offset"
  174. (+ OP_REGIMM rs FUNC_BGTZ offset)
  175. (if (gt rs 0)
  176. (delay 1 (set pc offset)))
  177. ())
  178. (dni bgtzl-q10 "branch if greater than zero likely" (MACH10 USES-RS)
  179. "bgtzl $rs,$offset"
  180. (+ OP_REGIMM rs FUNC_BGTZL offset)
  181. (if (gt rs 0)
  182. (delay 1 (set pc offset))
  183. (skip 1))
  184. ())
  185. (dni blez-q10 "branch if less than or equal to zero" (MACH10 USES-RS)
  186. "blez $rs,$offset"
  187. (+ OP_REGIMM rs FUNC_BLEZ offset)
  188. (if (le rs 0)
  189. (delay 1 (set pc offset)))
  190. ())
  191. (dni blezl-q10 "branch if less than or equal to zero likely" (MACH10 USES-RS)
  192. "blezl $rs,$offset"
  193. (+ OP_REGIMM rs FUNC_BLEZL offset)
  194. (if (le rs 0)
  195. (delay 1 (set pc offset))
  196. (skip 1))
  197. ())
  198. (dni bmb-q10 "branch if matching byte-lane" (MACH10 USES-RS USES-RT)
  199. "bmb $rs,$rt,$offset"
  200. (+ OP10_BMB rs rt offset)
  201. (sequence ((BI branch?))
  202. (set branch? 0)
  203. (if (eq (and rs #xFF) (and rt #xFF))
  204. (set branch? 1))
  205. (if (eq (and rs #xFF00) (and rt #xFF00))
  206. (set branch? 1))
  207. (if (eq (and rs #xFF0000) (and rt #xFF0000))
  208. (set branch? 1))
  209. (if (eq (and rs #xFF000000) (and rt #xFF000000))
  210. (set branch? 1))
  211. (if branch?
  212. (delay 1 (set pc offset))))
  213. ())
  214. (dni bmbl "branch if matching byte-lane likely" (MACH10 USES-RS USES-RT)
  215. "bmbl $rs,$rt,$offset"
  216. (+ OP10_BMBL rs rt offset)
  217. (sequence ((BI branch?))
  218. (set branch? 0)
  219. (if (eq (and rs #xFF) (and rt #xFF))
  220. (set branch? 1))
  221. (if (eq (and rs #xFF00) (and rt #xFF00))
  222. (set branch? 1))
  223. (if (eq (and rs #xFF0000) (and rt #xFF0000))
  224. (set branch? 1))
  225. (if (eq (and rs #xFF000000) (and rt #xFF000000))
  226. (set branch? 1))
  227. (if branch?
  228. (delay 1 (set pc offset))
  229. (skip 1)))
  230. ())
  231. (dni bri "branch if register invalid" (MACH10 USES-RS)
  232. "bri $rs,$offset"
  233. (+ OP_REGIMM rs FUNC_BRI offset)
  234. (if (gt rs 0)
  235. (delay 1 (set pc offset))
  236. (skip 1))
  237. ())
  238. (dni brv "branch if register invalid" (MACH10 USES-RS)
  239. "brv $rs,$offset"
  240. (+ OP_REGIMM rs FUNC_BRV offset)
  241. (if (gt rs 0)
  242. (delay 1 (set pc offset))
  243. (skip 1))
  244. ())
  245. ; debug instructions
  246. (dni bctx "branch if the current context == instruction[21]" (MACH10 USES-RS)
  247. "bctx $rs,$offset"
  248. (+ OP_REGIMM rs FUNC_BCTX offset)
  249. (delay 1 (set pc offset))
  250. ())
  251. (dni yield "unconditional yield to the other context" (MACH10)
  252. "yield"
  253. (+ OP_SPECIAL (f-rs 0) (f-rt 0) (f-rd 0) (f-shamt 0) FUNC10_YIELD)
  254. (unimp yield)
  255. ())
  256. ; Special instructions.
  257. (dni crc32 "CRC, 32 bit input" (MACH10 USES-RD USES-RS USES-RT)
  258. "crc32 $rd,$rs,$rt"
  259. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_CRC32)
  260. (unimp crc32)
  261. ())
  262. (dni crc32b "CRC, 8 bit input" (MACH10 USES-RD USES-RS USES-RT)
  263. "crc32b $rd,$rs,$rt"
  264. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_CRC32B)
  265. (unimp crc32b)
  266. ())
  267. (dni cnt1s "Count ones" (MACH10 USES-RD USES-RS)
  268. "cnt1s $rd,$rs"
  269. (+ OP_SPECIAL rs rt rd (f-shamt 0) FUNC10_CNT1S)
  270. (unimp crcp)
  271. ())
  272. ; Special Instructions
  273. (dni avail "Mark Header Buffer Available" (MACH10 USES-RD)
  274. "avail $rd"
  275. (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_AVAIL)
  276. (unimp avail)
  277. ())
  278. (dni free "Mark Header Buffer Free" (MACH10 USES-RS USES-RD)
  279. "free $rd,$rs"
  280. (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_FREE)
  281. (unimp free)
  282. ())
  283. (dni tstod "Test Header Buffer Order Dependency" (MACH10 USES-RS USES-RD)
  284. "tstod $rd,$rs"
  285. (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_TSTOD)
  286. (unimp tstod)
  287. ())
  288. (dni cmphdr "Get a Complete Header" (MACH10 USES-RD)
  289. "cmphdr $rd"
  290. (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_CMPHDR)
  291. (unimp cmphdr)
  292. ())
  293. (dni mcid "Allocate a Multicast ID" (MACH10 USES-RD USES-RT)
  294. "mcid $rd,$rt"
  295. (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_MCID)
  296. (unimp mcid)
  297. ())
  298. (dni dba "Allocate a Data Buffer Pointer" (MACH10 USES-RD)
  299. "dba $rd"
  300. (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_DBA)
  301. (unimp dba)
  302. ())
  303. (dni dbd "Deallocate a Data Buffer Pointer" (MACH10 USES-RS USES-RT USES-RD)
  304. "dbd $rd,$rs,$rt"
  305. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_DBD)
  306. (unimp dbd)
  307. ())
  308. (dni dpwt "DSTN_PORT Write" (MACH10 USES-RS USES-RD)
  309. "dpwt $rd,$rs"
  310. (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_DPWT)
  311. (unimp dpwt)
  312. ())
  313. ; Architectural and coprocessor instructions.
  314. (dni chkhdrq10 "" (MACH10 USES-RS USES-RD)
  315. "chkhdr $rd,$rs"
  316. (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_CHKHDR)
  317. (unimp chkhdr)
  318. ())
  319. ; Coprocessor DMA Instructions (IQ10)
  320. (dni rba "Read Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD)
  321. "rba $rd,$rs,$rt"
  322. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBA)
  323. (unimp rba)
  324. ())
  325. (dni rbal "Read Bytes Absolute and Lock" (MACH10 USES-RS USES-RT USES-RD)
  326. "rbal $rd,$rs,$rt"
  327. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBAL)
  328. (unimp rbal)
  329. ())
  330. (dni rbar "Read Bytes Absolute and Release" (MACH10 USES-RS USES-RT USES-RD)
  331. "rbar $rd,$rs,$rt"
  332. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBAR)
  333. (unimp rbar)
  334. ())
  335. (dni wba "Write Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD)
  336. "wba $rd,$rs,$rt"
  337. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBA)
  338. (unimp wba)
  339. ())
  340. (dni wbau "Write Bytes Absolute and Unlock" (MACH10 USES-RS USES-RT USES-RD)
  341. "wbau $rd,$rs,$rt"
  342. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBAU)
  343. (unimp wbau)
  344. ())
  345. (dni wbac "Write Bytes Absolute Cacheable" (MACH10 USES-RS USES-RT USES-RD)
  346. "wbac $rd,$rs,$rt"
  347. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBAC)
  348. (unimp wbac)
  349. ())
  350. (dni rbi "Read Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT)
  351. "rbi $rd,$rs,$rt,$bytecount"
  352. (+ OP_COP3 rs rt rd FUNC10_RBI bytecount)
  353. (unimp rbi)
  354. ())
  355. (dni rbil "Read Bytes Immediate and Lock" (MACH10 USES-RD USES-RS USES-RT)
  356. "rbil $rd,$rs,$rt,$bytecount"
  357. (+ OP_COP3 rs rt rd FUNC10_RBIL bytecount)
  358. (unimp rbil)
  359. ())
  360. (dni rbir "Read Bytes Immediate and Release" (MACH10 USES-RD USES-RS USES-RT)
  361. "rbir $rd,$rs,$rt,$bytecount"
  362. (+ OP_COP3 rs rt rd FUNC10_RBIR bytecount)
  363. (unimp rbir)
  364. ())
  365. (dni wbi "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT)
  366. "wbi $rd,$rs,$rt,$bytecount"
  367. (+ OP_COP3 rs rt rd FUNC10_WBI bytecount)
  368. (unimp wbi)
  369. ())
  370. (dni wbic "Write Bytes Immediate Cacheable" (MACH10 USES-RD USES-RS USES-RT)
  371. "wbic $rd,$rs,$rt,$bytecount"
  372. (+ OP_COP3 rs rt rd FUNC10_WBIC bytecount)
  373. (unimp wbic)
  374. ())
  375. (dni wbiu "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT)
  376. "wbiu $rd,$rs,$rt,$bytecount"
  377. (+ OP_COP3 rs rt rd FUNC10_WBIU bytecount)
  378. (unimp wbiu)
  379. ())
  380. (dni pkrli "Packet Release Immediate" (MACH10 USES-RD USES-RS USES-RT)
  381. "pkrli $rd,$rs,$rt,$bytecount"
  382. (+ OP_COP2 rs rt rd FUNC10_PKRLI bytecount)
  383. (unimp pkrli)
  384. ())
  385. (dni pkrlih "Packet Release Immediate and Hold" (MACH10 USES-RD USES-RS USES-RT)
  386. "pkrlih $rd,$rs,$rt,$bytecount"
  387. (+ OP_COP2 rs rt rd FUNC10_PKRLIH bytecount)
  388. (unimp pkrlih)
  389. ())
  390. (dni pkrliu "Packet Release Immediate Unconditional" (MACH10 USES-RD USES-RS USES-RT)
  391. "pkrliu $rd,$rs,$rt,$bytecount"
  392. (+ OP_COP2 rs rt rd FUNC10_PKRLIU bytecount)
  393. (unimp pkrliu)
  394. ())
  395. (dni pkrlic "Packet Release Immediate Continue" (MACH10 USES-RD USES-RS USES-RT)
  396. "pkrlic $rd,$rs,$rt,$bytecount"
  397. (+ OP_COP2 rs rt rd FUNC10_PKRLIC bytecount)
  398. (unimp pkrlic)
  399. ())
  400. (dni pkrla "Packet Release Absolute" (MACH10 USES-RS USES-RT USES-RD)
  401. "pkrla $rd,$rs,$rt"
  402. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLA)
  403. (unimp pkrla)
  404. ())
  405. (dni pkrlau "Packet Release Absolute Unconditional" (MACH10 USES-RS USES-RT USES-RD)
  406. "pkrlau $rd,$rs,$rt"
  407. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAU)
  408. (unimp pkrlau)
  409. ())
  410. (dni pkrlah "Packet Release Absolute and Hold" (MACH10 USES-RS USES-RT USES-RD)
  411. "pkrlah $rd,$rs,$rt"
  412. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAH)
  413. (unimp pkrlah)
  414. ())
  415. (dni pkrlac "Packet Release Absolute Continue" (MACH10 USES-RS USES-RT USES-RD)
  416. "pkrlac $rd,$rs,$rt"
  417. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAC)
  418. (unimp pkrlac)
  419. ())
  420. ; Main Memory Access Instructions
  421. (dni lock "lock memory" (MACH10 USES-RD USES-RT)
  422. "lock $rd,$rt"
  423. (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_LOCK)
  424. (unimp lock)
  425. ())
  426. (dni unlk "unlock memory" (MACH10 USES-RT USES-RD)
  427. "unlk $rd,$rt"
  428. (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_UNLK)
  429. (unimp unlk)
  430. ())
  431. (dni swrd "Single Word Read" (MACH10 USES-RT USES-RD)
  432. "swrd $rd,$rt"
  433. (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_SWRD)
  434. (unimp swrd)
  435. ())
  436. (dni swrdl "Single Word Read and Lock" (MACH10 USES-RT USES-RD)
  437. "swrdl $rd,$rt"
  438. (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_SWRDL)
  439. (unimp swrdl)
  440. ())
  441. (dni swwr "Single Word Write" (MACH10 USES-RS USES-RT USES-RD)
  442. "swwr $rd,$rs,$rt"
  443. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_SWWR)
  444. (unimp swwr)
  445. ())
  446. (dni swwru "Single Word Write and Unlock" (MACH10 USES-RS USES-RT USES-RD)
  447. "swwru $rd,$rs,$rt"
  448. (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_SWWRU)
  449. (unimp swwru)
  450. ())
  451. (dni dwrd "Double Word Read" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
  452. "dwrd $rd,$rt"
  453. (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_DWRD)
  454. (unimp dwrd)
  455. ())
  456. (dni dwrdl "Double Word Read and Lock" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
  457. "dwrdl $rd,$rt"
  458. (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_DWRDL)
  459. (unimp dwrdl)
  460. ())
  461. ; CAM access instructions (IQ10)
  462. (dni cam36 "CAM Access in 36-bit Mode" (MACH10 USES-RT USES-RD)
  463. "cam36 $rd,$rt,${cam-z},${cam-y}"
  464. (+ OP_COP3 (f-rs 0) rt rd FUNC10_CAM36 cam-z cam-y)
  465. (unimp cam36)
  466. ())
  467. (dni cam72 "CAM Access in 72-bit Mode" (MACH10 USES-RT USES-RD)
  468. "cam72 $rd,$rt,${cam-y},${cam-z}"
  469. (+ OP_COP3 (f-rs 0) rt rd FUNC10_CAM72 cam-z cam-y)
  470. (unimp cam72)
  471. ())
  472. (dni cam144 "CAM Access in 144-bit Mode" (MACH10 USES-RT USES-RD)
  473. "cam144 $rd,$rt,${cam-y},${cam-z}"
  474. (+ OP_COP3 (f-rs 0) rt rd FUNC10_CAM144 cam-z cam-y)
  475. (unimp cam144)
  476. ())
  477. (dni cam288 "CAM Access in 288-bit Mode" (MACH10 USES-RT USES-RD)
  478. "cam288 $rd,$rt,${cam-y},${cam-z}"
  479. (+ OP_COP3 (f-rs 0) rt rd FUNC10_CAM288 cam-z cam-y)
  480. (unimp cam288)
  481. ())
  482. ; Counter manager instructions (IQ10)
  483. (dni cm32and "Counter Manager And" (MACH10 USES-RS USES-RT USES-RD)
  484. "cm32and $rd,$rs,$rt"
  485. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32AND)
  486. (unimp cm32and)
  487. ())
  488. (dni cm32andn "Counter Manager And With Inverse" (MACH10 USES-RS USES-RT USES-RD)
  489. "cm32andn $rd,$rs,$rt"
  490. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32ANDN)
  491. (unimp cm32andn)
  492. ())
  493. (dni cm32or "Counter Manager Or" (MACH10 USES-RS USES-RT USES-RD)
  494. "cm32or $rd,$rs,$rt"
  495. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32OR)
  496. (unimp cm32or)
  497. ())
  498. (dni cm32ra "Counter Manager 32-bit Rolling Add" (MACH10 USES-RS USES-RT USES-RD)
  499. "cm32ra $rd,$rs,$rt"
  500. (+ OP_COP3 rs rt rd (f-shamt 2) FUNC10_CM32RA)
  501. (unimp cm32ra)
  502. ())
  503. (dni cm32rd "Counter Manager 32-bit Rolling Decrement" (MACH10 USES-RT USES-RD)
  504. "cm32rd $rd,$rt"
  505. (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32RD)
  506. (unimp cm32rd)
  507. ())
  508. (dni cm32ri "Counter Manager 32-bit Rolling Increment" (MACH10 USES-RT USES-RD)
  509. "cm32ri $rd,$rt"
  510. (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32RI)
  511. (unimp cm32ri)
  512. ())
  513. (dni cm32rs "Counter Manager 32-bit Rolling Subtract" (MACH10 USES-RS USES-RT USES-RD)
  514. "cm32rs $rd,$rs,$rt"
  515. (+ OP_COP3 rs rt rd (f-shamt 2) FUNC10_CM32RS)
  516. (unimp cm32rs)
  517. ())
  518. (dni cm32sa "Counter Manager 32-bit Saturating Add" (MACH10 USES-RS USES-RT USES-RD)
  519. "cm32sa $rd,$rs,$rt"
  520. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32SA)
  521. (unimp cm32sa)
  522. ())
  523. (dni cm32sd "Counter Manager 32-bit Saturating Decrement" (MACH10 USES-RT USES-RD)
  524. "cm32sd $rd,$rt"
  525. (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32SD)
  526. (unimp cm32sd)
  527. ())
  528. (dni cm32si "Counter Manager 32-bit Saturating Increment" (MACH10 USES-RT USES-RD)
  529. "cm32si $rd,$rt"
  530. (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32SI)
  531. (unimp cm32si)
  532. ())
  533. (dni cm32ss "Counter Manager 32-bit Saturating Subtract" (MACH10 USES-RS USES-RT USES-RD)
  534. "cm32ss $rd,$rs,$rt"
  535. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32SS)
  536. (unimp cm32ss)
  537. ())
  538. (dni cm32xor "Counter Manager Xor" (MACH10 USES-RS USES-RT USES-RD)
  539. "cm32xor $rd,$rs,$rt"
  540. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32XOR)
  541. (unimp cm32xor)
  542. ())
  543. (dni cm64clr "Counter Manager Clear" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
  544. "cm64clr $rd,$rt"
  545. (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64CLR)
  546. (unimp cm64clr)
  547. ())
  548. (dni cm64ra "Counter Manager 64-bit Rolling Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  549. "cm64ra $rd,$rs,$rt"
  550. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RA)
  551. (unimp cm64ra)
  552. ())
  553. (dni cm64rd "Counter Manager 64-bit Rolling Decrement" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
  554. "cm64rd $rd,$rt"
  555. (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RD)
  556. (unimp cm64rd)
  557. ())
  558. (dni cm64ri "Counter Manager 32-bit Rolling Increment" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
  559. "cm64ri $rd,$rt"
  560. (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RI)
  561. (unimp cm64ri)
  562. ())
  563. (dni cm64ria2 "Counter Manager 32/32 Rolling Increment/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  564. "cm64ria2 $rd,$rs,$rt"
  565. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RIA2)
  566. (unimp cm64ria2)
  567. ())
  568. (dni cm64rs "Counter Manager 64-bit Rolling Subtract" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  569. "cm64rs $rd,$rs,$rt"
  570. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RS)
  571. (unimp cm64rs)
  572. ())
  573. (dni cm64sa "Counter Manager 64-bit Saturating Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  574. "cm64sa $rd,$rs,$rt"
  575. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SA)
  576. (unimp cm64sa)
  577. ())
  578. (dni cm64sd "Counter Manager 64-bit Saturating Decrement" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
  579. "cm64sd $rd,$rt"
  580. (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SD)
  581. (unimp cm64sd)
  582. ())
  583. (dni cm64si "Counter Manager 64-bit Saturating Increment" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
  584. "cm64si $rd,$rt"
  585. (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SI)
  586. (unimp cm64si)
  587. ())
  588. (dni cm64sia2 "Counter Manager 32/32 Saturating Increment/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  589. "cm64sia2 $rd,$rs,$rt"
  590. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SIA2)
  591. (unimp cm64sia2)
  592. ())
  593. (dni cm64ss "Counter Manager 64-bit Saturating Subtract" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  594. "cm64ss $rd,$rs,$rt"
  595. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SS)
  596. (unimp cm64ss)
  597. ())
  598. (dni cm128ria2 "Counter Manager 128-bit 64/64 Rolling Increment/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  599. "cm128ria2 $rd,$rs,$rt"
  600. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128RIA2)
  601. (unimp cm128ria2)
  602. ())
  603. (dni cm128ria3 "Counter Manager 128-bit 32/32/64 Rolling Increment/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  604. "cm128ria3 $rd,$rs,$rt,${cm-3z}"
  605. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128RIA3 cm-3z)
  606. (unimp cm128ria3)
  607. ())
  608. (dni cm128ria4 "Counter Manager 128-bit 32/32/32/32 Rolling Inc/Add" (MACH10 USES-RS USES-RT USES-RD)
  609. "cm128ria4 $rd,$rs,$rt,${cm-4z}"
  610. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128RIA4 cm-4z)
  611. (unimp cm128ria4)
  612. ())
  613. (dni cm128sia2 "Counter Manager 128-bit 64/64 Saturating Inc/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  614. "cm128sia2 $rd,$rs,$rt"
  615. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128SIA2)
  616. (unimp cm128sia2)
  617. ())
  618. (dni cm128sia3 "Counter Manager 128-bit 32/32/64 Saturating Inc/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
  619. "cm128sia3 $rd,$rs,$rt,${cm-3z}"
  620. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128SIA3 cm-3z)
  621. (unimp cm128sia3)
  622. ())
  623. (dni cm128sia4 "Counter Manager 128-bit 32/32/32/32 Saturating Inc/Add" (MACH10 USES-RS USES-RT USES-RD)
  624. "cm128sia4 $rd,$rs,$rt,${cm-4z}"
  625. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128SIA4 cm-4z)
  626. (unimp cm128sia4)
  627. ())
  628. (dni cm128vsa "Counter Manager Continuous State Dual Leaky Token Bucket Policing" (MACH10 USES-RS USES-RT USES-RD)
  629. "cm128vsa $rd,$rs,$rt"
  630. (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128VSA)
  631. (unimp cm128vsa)
  632. ())
  633. ; Coprocessor Data Movement Instructions
  634. ; Note that we don't set the USES-RD or USES-RT attributes for many of the following
  635. ; instructions, as it's the COP register that's being specified.
  636. ; ??? Is YIELD-INSN the right attribute for IQ10? The IQ2000 used the attribute to warn about
  637. ; yielding instructions in a delay slot, but that's not relevant in IQ10. What *is* relevant
  638. ; (and unique to IQ10) is instructions that yield if the destination register is accessed
  639. ; before the value is there, causing a yield.
  640. (dni cfc "copy from coprocessor control register" (MACH10 LOAD-DELAY USES-RD YIELD-INSN)
  641. "cfc $rd,$rt"
  642. (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_CFC)
  643. (unimp cfc)
  644. ())
  645. (dni ctc "copy to coprocessor control register" (MACH10 USES-RS)
  646. "ctc $rs,$rt"
  647. (+ OP_COP3 rs rt (f-rd 0) (f-shamt 0) FUNC10_CTC)
  648. (unimp ctc)
  649. ())
  650. ; Macros
  651. (dnmi m-avail "Mark Header Buffer Available" (MACH10 NO-DIS)
  652. "avail"
  653. (emit avail (f-rd 0))
  654. )
  655. (dnmi m-cam36 "CAM Access in 36-bit Mode" (MACH10 USES-RT USES-RD NO-DIS)
  656. "cam36 $rd,$rt,${cam-z}"
  657. (emit cam36 rd rt cam-z (f-cam-y 0))
  658. )
  659. (dnmi m-cam72 "CAM Access in 72-bit Mode" (MACH10 USES-RT USES-RD NO-DIS)
  660. "cam72 $rd,$rt,${cam-z}"
  661. (emit cam72 rd rt cam-z (f-cam-y 0))
  662. )
  663. (dnmi m-cam144 "CAM Access in 144-bit Mode" (MACH10 USES-RT USES-RD NO-DIS)
  664. "cam144 $rd,$rt,${cam-z}"
  665. (emit cam144 rd rt cam-z (f-cam-y 0))
  666. )
  667. (dnmi m-cam288 "CAM Access in 288-bit Mode" (MACH10 USES-RT USES-RD NO-DIS)
  668. "cam288 $rd,$rt,${cam-z}"
  669. (emit cam288 rd rt cam-z (f-cam-y 0))
  670. )
  671. (dnmi m-cm32read "Counter Manager 32-bit Rolling Add R0" (MACH10 USES-RT USES-RD NO-DIS)
  672. "cm32read $rd,$rt"
  673. (emit cm32ra rd (f-rs 0) rt)
  674. )
  675. (dnmi m-cm64read "Counter Manager 64-bit Rolling Add R0" (MACH10 USES-RT USES-RD NO-DIS)
  676. "cm64read $rd,$rt"
  677. (emit cm64ra rd (f-rs 0) rt)
  678. )
  679. (dnmi m-cm32mlog "Counter Manager 32-bit or R0" (MACH10 USES-RS USES-RT NO-DIS)
  680. "cm32mlog $rs,$rt"
  681. (emit cm32or (f-rd 0) rs rt)
  682. )
  683. (dnmi m-cm32and "Counter Manager And" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  684. "cm32and $rs,$rt"
  685. (emit cm32and (f-rd 0) rs rt)
  686. )
  687. (dnmi m-cm32andn "Counter Manager And With Inverse" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  688. "cm32andn $rs,$rt"
  689. (emit cm32andn (f-rd 0) rs rt)
  690. )
  691. (dnmi m-cm32or "Counter Manager Or" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  692. "cm32or $rs,$rt"
  693. (emit cm32or (f-rd 0) rs rt)
  694. )
  695. (dnmi m-cm32ra "Counter Manager 32-bit Rolling Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  696. "cm32ra $rs,$rt"
  697. (emit cm32ra (f-rd 0) rs rt)
  698. )
  699. (dnmi m-cm32rd "Counter Manager 32-bit Rolling Decrement" (MACH10 USES-RT USES-RD NO-DIS)
  700. "cm32rd $rt"
  701. (emit cm32rd (f-rd 0) rt)
  702. )
  703. (dnmi m-cm32ri "Counter Manager 32-bit Rolling Increment" (MACH10 USES-RT USES-RD NO-DIS)
  704. "cm32ri $rt"
  705. (emit cm32ri (f-rd 0) rt)
  706. )
  707. (dnmi m-cm32rs "Counter Manager 32-bit Rolling Subtract" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  708. "cm32rs $rs,$rt"
  709. (emit cm32rs (f-rd 0) rs rt)
  710. )
  711. (dnmi m-cm32sa "Counter Manager 32-bit Saturating Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  712. "cm32sa $rs,$rt"
  713. (emit cm32sa (f-rd 0) rs rt)
  714. )
  715. (dnmi m-cm32sd "Counter Manager 32-bit Saturating Decrement" (MACH10 USES-RT USES-RD NO-DIS)
  716. "cm32sd $rt"
  717. (emit cm32sd (f-rd 0) rt)
  718. )
  719. (dnmi m-cm32si "Counter Manager 32-bit Saturating Increment" (MACH10 USES-RT USES-RD NO-DIS)
  720. "cm32si $rt"
  721. (emit cm32si (f-rd 0) rt)
  722. )
  723. (dnmi m-cm32ss "Counter Manager 32-bit Saturating Subtract" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  724. "cm32ss $rs,$rt"
  725. (emit cm32ss (f-rd 0) rs rt)
  726. )
  727. (dnmi m-cm32xor "Counter Manager Xor" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  728. "cm32xor $rs,$rt"
  729. (emit cm32xor (f-rd 0) rs rt)
  730. )
  731. (dnmi m-cm64clr "Counter Manager Clear" (MACH10 USES-RT USES-RD NO-DIS)
  732. "cm64clr $rt"
  733. (emit cm64clr (f-rd 0) rt)
  734. )
  735. (dnmi m-cm64ra "Counter Manager 64-bit Rolling Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  736. "cm64ra $rs,$rt"
  737. (emit cm64ra (f-rd 0) rs rt)
  738. )
  739. (dnmi m-cm64rd "Counter Manager 64-bit Rolling Decrement" (MACH10 USES-RT USES-RD NO-DIS)
  740. "cm64rd $rt"
  741. (emit cm64rd (f-rd 0) rt)
  742. )
  743. (dnmi m-cm64ri "Counter Manager 32-bit Rolling Increment" (MACH10 USES-RT USES-RD NO-DIS)
  744. "cm64ri $rt"
  745. (emit cm64ri (f-rd 0) rt)
  746. )
  747. (dnmi m-cm64ria2 "Counter Manager 32/32 Rolling Increment/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  748. "cm64ria2 $rs,$rt"
  749. (emit cm64ria2 (f-rd 0) rs rt)
  750. )
  751. (dnmi m-cm64rs "Counter Manager 64-bit Rolling Subtract" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  752. "cm64rs $rs,$rt"
  753. (emit cm64rs (f-rd 0) rs rt)
  754. )
  755. (dnmi m-cm64sa "Counter Manager 64-bit Saturating Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  756. "cm64sa $rs,$rt"
  757. (emit cm64sa (f-rd 0) rs rt)
  758. )
  759. (dnmi m-cm64sd "Counter Manager 64-bit Saturating Decrement" (MACH10 USES-RT USES-RD NO-DIS)
  760. "cm64sd $rt"
  761. (emit cm64sd (f-rd 0) rt)
  762. )
  763. (dnmi m-cm64si "Counter Manager 64-bit Saturating Increment" (MACH10 USES-RT USES-RD NO-DIS)
  764. "cm64si $rt"
  765. (emit cm64si (f-rd 0) rt)
  766. )
  767. (dnmi m-cm64sia2 "Counter Manager 32/32 Saturating Increment/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  768. "cm64sia2 $rs,$rt"
  769. (emit cm64sia2 (f-rd 0) rs rt)
  770. )
  771. (dnmi m-cm64ss "Counter Manager 64-bit Saturating Subtract" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  772. "cm64ss $rs,$rt"
  773. (emit cm64ss (f-rd 0) rs rt)
  774. )
  775. (dnmi m-cm128ria2 "Counter Manager 128-bit 64/64 Rolling Increment/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  776. "cm128ria2 $rs,$rt"
  777. (emit cm128ria2 (f-rd 0) rs rt)
  778. )
  779. (dnmi m-cm128ria3 "Counter Manager 128-bit 32/32/64 Rolling Increment/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  780. "cm128ria3 $rs,$rt,${cm-3z}"
  781. (emit cm128ria3 (f-rd 0) rs rt cm-3z)
  782. )
  783. (dnmi m-cm128ria4 "Counter Manager 128-bit 32/32/32/32 Rolling Inc/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  784. "cm128ria4 $rs,$rt,${cm-4z}"
  785. (emit cm128ria4 (f-rd 0) rs rt cm-4z)
  786. )
  787. (dnmi m-cm128sia2 "Counter Manager 128-bit 64/64 Saturating Inc/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  788. "cm128sia2 $rs,$rt"
  789. (emit cm128sia2 (f-rd 0) rs rt)
  790. )
  791. (dnmi m-cm128sia3 "Counter Manager 128-bit 32/32/64 Saturating Inc/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  792. "cm128sia3 $rs,$rt,${cm-3z}"
  793. (emit cm128sia3 (f-rd 0) rs rt cm-3z)
  794. )
  795. (dnmi m-cm128sia4 "Counter Manager 128-bit 32/32/32/32 Saturating Inc/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  796. "cm128sia4 $rs,$rt,${cm-4z}"
  797. (emit cm128sia4 (f-rd 0) rs rt cm-4z)
  798. )
  799. (dnmi m-cmphdr "Get a Complete Header" (MACH10 NO-DIS)
  800. "cmphdr"
  801. (emit cmphdr (f-rd 0))
  802. )
  803. (dnmi m-dbd "Deallocate a Data Buffer Pointer" (MACH10 USES-RD USES-RT NO-DIS)
  804. "dbd $rd,$rt"
  805. (emit dbd rd (f-rs 0) rt)
  806. )
  807. (dnmi m2-dbd "Deallocate a Data Buffer Pointer" (MACH10 USES-RT NO-DIS)
  808. "dbd $rt"
  809. (emit dbd (f-rd 0) (f-rs 0) rt)
  810. )
  811. (dnmi m-dpwt "DSTN_PORT Write" (MACH10 USES-RS NO-DIS)
  812. "dpwt $rs"
  813. (emit dpwt (f-rd 0) rs)
  814. )
  815. (dnmi m-free "" (MACH10 USES-RS USES-RD NO-DIS)
  816. "free $rs"
  817. (emit free (f-rd 0) rs)
  818. )
  819. ;(dnmi m-jal "jump and link, implied r31" (MACH10 USES-RT NO-DIS)
  820. ; "jal $jmptarg"
  821. ; (emit jal (f-rt 31) jmptarg)
  822. ;)
  823. (dnmi m-lock "lock memory" (MACH10 USES-RT NO-DIS)
  824. "lock $rt"
  825. (emit lock (f-rd 0) rt)
  826. )
  827. (dnmi m-pkrla "Packet Release Absolute" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  828. "pkrla $rs,$rt"
  829. (emit pkrla (f-rd 0) rs rt)
  830. )
  831. (dnmi m-pkrlac "Packet Release Absolute Continue" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  832. "pkrlac $rs,$rt"
  833. (emit pkrlac (f-rd 0) rs rt)
  834. )
  835. (dnmi m-pkrlah "Packet Release Absolute and Hold" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  836. "pkrlah $rs,$rt"
  837. (emit pkrlah (f-rd 0) rs rt)
  838. )
  839. (dnmi m-pkrlau "Packet Release Absolute Unconditional" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  840. "pkrlau $rs,$rt"
  841. (emit pkrlau (f-rd 0) rs rt)
  842. )
  843. (dnmi m-pkrli "Packet Release Immediate" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
  844. "pkrli $rs,$rt,$bytecount"
  845. (emit pkrli (f-rd 0) rs rt bytecount)
  846. )
  847. (dnmi m-pkrlic "Packet Release Immediate Continue" (MACH10 USES-RS USES-RT NO-DIS)
  848. "pkrlic $rs,$rt,$bytecount"
  849. (emit pkrlic (f-rd 0) rs rt bytecount)
  850. )
  851. (dnmi m-pkrlih "Packet Release Immediate and Hold" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
  852. "pkrlih $rs,$rt,$bytecount"
  853. (emit pkrlih (f-rd 0) rs rt bytecount)
  854. )
  855. (dnmi m-pkrliu "Packet Release Immediate Unconditional" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
  856. "pkrliu $rs,$rt,$bytecount"
  857. (emit pkrliu (f-rd 0) rs rt bytecount)
  858. )
  859. (dnmi m-rba "Read Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  860. "rba $rs,$rt"
  861. (emit rba (f-rd 0) rs rt)
  862. )
  863. (dnmi m-rbal "Read Bytes Absolute and Lock" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  864. "rbal $rs,$rt"
  865. (emit rbal (f-rd 0) rs rt)
  866. )
  867. (dnmi m-rbar "Read Bytes Absolute and Release" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  868. "rbar $rs,$rt"
  869. (emit rbar (f-rd 0) rs rt)
  870. )
  871. (dnmi m-rbi "Read Bytes Immediate" (MACH10 USES-RS USES-RT NO-DIS)
  872. "rbi $rs,$rt,$bytecount"
  873. (emit rbi (f-rd 0) rs rt bytecount)
  874. )
  875. (dnmi m-rbil "Read Bytes Immediate and Lock" (MACH10 USES-RS USES-RT NO-DIS)
  876. "rbil $rs,$rt,$bytecount"
  877. (emit rbil (f-rd 0) rs rt bytecount)
  878. )
  879. (dnmi m-rbir "Read Bytes Immediate and Release" (MACH10 USES-RS USES-RT NO-DIS)
  880. "rbir $rs,$rt,$bytecount"
  881. (emit rbir (f-rd 0) rs rt bytecount)
  882. )
  883. (dnmi m-swwr "Single Word Write" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  884. "swwr $rs,$rt"
  885. (emit swwr (f-rd 0) rs rt)
  886. )
  887. (dnmi m-swwru "Single Word Write and Unlock" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  888. "swwru $rs,$rt"
  889. (emit swwru (f-rd 0) rs rt)
  890. )
  891. (dnmi m-tstod "Test Header Buffer Order Dependency" (MACH10 USES-RS USES-RD NO-DIS)
  892. "tstod $rs"
  893. (emit tstod (f-rd 0) rs)
  894. )
  895. (dnmi m-unlk "" (MACH10 USES-RT USES-RD NO-DIS)
  896. "unlk $rt"
  897. (emit unlk (f-rd 0) rt)
  898. )
  899. (dnmi m-wba "Write Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  900. "wba $rs,$rt"
  901. (emit wba (f-rd 0) rs rt)
  902. )
  903. (dnmi m-wbac "Write Bytes Absolute Cacheable" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  904. "wbac $rs,$rt"
  905. (emit wbac (f-rd 0) rs rt)
  906. )
  907. (dnmi m-wbau "Write Bytes Absolute and Unlock" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
  908. "wbau $rs,$rt"
  909. (emit wbau (f-rd 0) rs rt)
  910. )
  911. (dnmi m-wbi "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
  912. "wbi $rs,$rt,$bytecount"
  913. (emit wbi (f-rd 0) rs rt bytecount)
  914. )
  915. (dnmi m-wbic "Write Bytes Immediate Cacheable" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
  916. "wbic $rs,$rt,$bytecount"
  917. (emit wbic (f-rd 0) rs rt bytecount)
  918. )
  919. (dnmi m-wbiu "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
  920. "wbiu $rs,$rt,$bytecount"
  921. (emit wbiu (f-rd 0) rs rt bytecount)
  922. )