mdmx.igen 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. // -*- C -*-
  2. // Simulator definition for the MIPS MDMX ASE.
  3. // Copyright (C) 2002-2022 Free Software Foundation, Inc.
  4. // Contributed by Ed Satterthwaite and Chris Demetriou, of Broadcom
  5. // Corporation (SiByte).
  6. //
  7. // This file is part of GDB, the GNU debugger.
  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, see <http://www.gnu.org/licenses/>.
  21. // Reference: MIPS64 Architecture Volume IV-b:
  22. // The MDMX Application-Specific Extension
  23. // Notes on "format selectors" (FMTSEL):
  24. //
  25. // A selector with final bit 0 indicates OB format.
  26. // A selector with final bits 01 indicates QH format.
  27. // A selector with final bits 11 has UNPREDICTABLE result per the spec.
  28. //
  29. // Similarly, for the single-bit fields which differentiate between
  30. // formats (FMTOP), 0 is OB format and 1 is QH format.
  31. // If you change this file to add instructions, please make sure that model
  32. // "sb1" configurations still build, and that you've added no new
  33. // instructions to the "sb1" model.
  34. // Helper:
  35. //
  36. // Check whether MDMX is usable, and if not signal an appropriate exception.
  37. //
  38. :function:::void:check_mdmx:instruction_word insn
  39. *mdmx:
  40. {
  41. if (! COP_Usable (1))
  42. SignalExceptionCoProcessorUnusable (1);
  43. if ((SR & (status_MX|status_FR)) != (status_MX|status_FR))
  44. SignalExceptionMDMX ();
  45. check_u64 (SD_, insn);
  46. }
  47. // Helper:
  48. //
  49. // Check whether a given MDMX format selector indicates a valid and usable
  50. // format, and if not signal an appropriate exception.
  51. //
  52. :function:::int:check_mdmx_fmtsel:instruction_word insn, int fmtsel
  53. *mdmx:
  54. {
  55. switch (fmtsel & 0x03)
  56. {
  57. case 0x00: /* ob */
  58. case 0x02:
  59. case 0x01: /* qh */
  60. return 1;
  61. case 0x03: /* UNPREDICTABLE */
  62. SignalException (ReservedInstruction, insn);
  63. return 0;
  64. }
  65. return 0;
  66. }
  67. // Helper:
  68. //
  69. // Check whether a given MDMX format bit indicates a valid and usable
  70. // format, and if not signal an appropriate exception.
  71. //
  72. :function:::int:check_mdmx_fmtop:instruction_word insn, int fmtop
  73. *mdmx:
  74. {
  75. switch (fmtop & 0x01)
  76. {
  77. case 0x00: /* ob */
  78. case 0x01: /* qh */
  79. return 1;
  80. }
  81. return 0;
  82. }
  83. :%s::::FMTSEL:int fmtsel
  84. *mdmx:
  85. *sb1:
  86. {
  87. if ((fmtsel & 0x1) == 0)
  88. return "ob";
  89. else if ((fmtsel & 0x3) == 1)
  90. return "qh";
  91. else
  92. return "?";
  93. }
  94. :%s::::FMTOP:int fmtop
  95. *mdmx:
  96. *sb1:
  97. {
  98. switch (fmtop)
  99. {
  100. case 0: return "ob";
  101. case 1: return "qh";
  102. default: return "?";
  103. }
  104. }
  105. :%s::::SHOP:int shop
  106. *mdmx:
  107. *sb1:
  108. {
  109. if ((shop & 0x11) == 0x00)
  110. switch ((shop >> 1) & 0x07)
  111. {
  112. case 3: return "upsl.ob";
  113. case 4: return "pach.ob";
  114. case 6: return "mixh.ob";
  115. case 7: return "mixl.ob";
  116. default: return "?";
  117. }
  118. else if ((shop & 0x03) == 0x01)
  119. switch ((shop >> 2) & 0x07)
  120. {
  121. case 0: return "mixh.qh";
  122. case 1: return "mixl.qh";
  123. case 2: return "pach.qh";
  124. case 4: return "bfla.qh";
  125. case 6: return "repa.qh";
  126. case 7: return "repb.qh";
  127. default: return "?";
  128. }
  129. else
  130. return "?";
  131. }
  132. 011110,5.FMTSEL,5.VT,5.VS,5.VD,001011:MDMX:64::ADD.fmt
  133. "add.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  134. *mdmx:
  135. *sb1:
  136. {
  137. check_mdmx (SD_, instruction_0);
  138. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  139. StoreFPR(VD,fmt_mdmx,MX_Add(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  140. }
  141. 011110,5.FMTSEL,5.VT,5.VS,0,0000,110111:MDMX:64::ADDA.fmt
  142. "adda.%s<FMTSEL> v<VS>, v<VT>"
  143. *mdmx:
  144. *sb1:
  145. {
  146. check_mdmx (SD_, instruction_0);
  147. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  148. MX_AddA(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
  149. }
  150. 011110,5.FMTSEL,5.VT,5.VS,1,0000,110111:MDMX:64::ADDL.fmt
  151. "addl.%s<FMTSEL> v<VS>, v<VT>"
  152. *mdmx:
  153. *sb1:
  154. {
  155. check_mdmx (SD_, instruction_0);
  156. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  157. MX_AddL(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
  158. }
  159. 011110,00,3.IMM,5.VT,5.VS,5.VD,0110,1.FMTOP,0:MDMX:64::ALNI.fmt
  160. "alni.%s<FMTOP> v<VD>, v<VS>, v<VT>, <IMM>"
  161. *mdmx:
  162. *sb1:
  163. {
  164. uint64_t result;
  165. int s;
  166. check_mdmx (SD_, instruction_0);
  167. check_mdmx_fmtop (SD_, instruction_0, FMTOP);
  168. s = (IMM << 3);
  169. result = ValueFPR(VS,fmt_mdmx) << s;
  170. if (s != 0) // x86 gcc treats >> 64 as >> 0
  171. result |= ValueFPR(VT,fmt_mdmx) >> (64 - s);
  172. StoreFPR(VD,fmt_mdmx,result);
  173. }
  174. 011110,5.RS,5.VT,5.VS,5.VD,0110,1.FMTOP,1:MDMX:64::ALNV.fmt
  175. "alnv.%s<FMTOP> v<VD>, v<VS>, v<VT>, r<RS>"
  176. *mdmx:
  177. *sb1:
  178. {
  179. uint64_t result;
  180. int s;
  181. check_mdmx (SD_, instruction_0);
  182. check_mdmx_fmtop (SD_, instruction_0, FMTOP);
  183. s = ((GPR[RS] & 0x7) << 3);
  184. result = ValueFPR(VS,fmt_mdmx) << s;
  185. if (s != 0) // x86 gcc treats >> 64 as >> 0
  186. result |= ValueFPR(VT,fmt_mdmx) >> (64 - s);
  187. StoreFPR(VD,fmt_mdmx,result);
  188. }
  189. 011110,5.FMTSEL,5.VT,5.VS,5.VD,001100:MDMX:64::AND.fmt
  190. "and.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  191. *mdmx:
  192. *sb1:
  193. {
  194. check_mdmx (SD_, instruction_0);
  195. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  196. StoreFPR(VD,fmt_mdmx,MX_And(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  197. }
  198. 011110,5.FMTSEL,5.VT,5.VS,00000,000001:MDMX:64::C.EQ.fmt
  199. "c.eq.%s<FMTSEL> v<VS>, v<VT>"
  200. *mdmx:
  201. *sb1:
  202. {
  203. check_mdmx (SD_, instruction_0);
  204. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  205. MX_Comp(ValueFPR(VS,fmt_mdmx),MX_C_EQ,VT,FMTSEL);
  206. }
  207. 011110,5.FMTSEL,5.VT,5.VS,00000,000101:MDMX:64::C.LE.fmt
  208. "c.le.%s<FMTSEL> v<VS>, v<VT>"
  209. *mdmx:
  210. *sb1:
  211. {
  212. check_mdmx (SD_, instruction_0);
  213. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  214. MX_Comp(ValueFPR(VS,fmt_mdmx),MX_C_LT|MX_C_EQ,VT,FMTSEL);
  215. }
  216. 011110,5.FMTSEL,5.VT,5.VS,00000,000100:MDMX:64::C.LT.fmt
  217. "c.lt.%s<FMTSEL> v<VS>, v<VT>"
  218. *mdmx:
  219. *sb1:
  220. {
  221. check_mdmx (SD_, instruction_0);
  222. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  223. MX_Comp(ValueFPR(VS,fmt_mdmx),MX_C_LT,VT,FMTSEL);
  224. }
  225. 011110,5.FMTSEL,5.VT,5.VS,5.VD,000111:MDMX:64::MAX.fmt
  226. "max.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  227. *mdmx:
  228. *sb1:
  229. {
  230. check_mdmx (SD_, instruction_0);
  231. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  232. StoreFPR(VD,fmt_mdmx,MX_Max(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  233. }
  234. 011110,5.FMTSEL,5.VT,5.VS,5.VD,000110:MDMX:64::MIN.fmt
  235. "min.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  236. *mdmx:
  237. *sb1:
  238. {
  239. check_mdmx (SD_, instruction_0);
  240. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  241. StoreFPR(VD,fmt_mdmx,MX_Min(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  242. }
  243. 011110,3.SEL,01,5.VT,5.VS,5.VD,000000:MDMX:64::MSGN.QH
  244. "msgn.qh v<VD>, v<VS>, v<VT>"
  245. *mdmx:
  246. {
  247. check_mdmx (SD_, instruction_0);
  248. StoreFPR(VD,fmt_mdmx,MX_Msgn(ValueFPR(VS,fmt_mdmx),VT,qh_fmtsel(SEL)));
  249. }
  250. 011110,5.FMTSEL,5.VT,5.VS,5.VD,110000:MDMX:64::MUL.fmt
  251. "mul.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  252. *mdmx:
  253. *sb1:
  254. {
  255. check_mdmx (SD_, instruction_0);
  256. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  257. StoreFPR(VD,fmt_mdmx,MX_Mul(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  258. }
  259. 011110,5.FMTSEL,5.VT,5.VS,0,0000,110011:MDMX:64::MULA.fmt
  260. "mula.%s<FMTSEL> v<VS>, v<VT>"
  261. *mdmx:
  262. *sb1:
  263. {
  264. check_mdmx (SD_, instruction_0);
  265. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  266. MX_MulA(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
  267. }
  268. 011110,5.FMTSEL,5.VT,5.VS,1,0000,110011:MDMX:64::MULL.fmt
  269. "mull.%s<FMTSEL> v<VS>, v<VT>"
  270. *mdmx:
  271. *sb1:
  272. {
  273. check_mdmx (SD_, instruction_0);
  274. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  275. MX_MulL(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
  276. }
  277. 011110,5.FMTSEL,5.VT,5.VS,0,0000,110010:MDMX:64::MULS.fmt
  278. "muls.%s<FMTSEL> v<VS>, v<VT>"
  279. *mdmx:
  280. *sb1:
  281. {
  282. check_mdmx (SD_, instruction_0);
  283. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  284. MX_MulS(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
  285. }
  286. 011110,5.FMTSEL,5.VT,5.VS,1,0000,110010:MDMX:64::MULSL.fmt
  287. "mulsl.%s<FMTSEL> v<VS>, v<VT>"
  288. *mdmx:
  289. *sb1:
  290. {
  291. check_mdmx (SD_, instruction_0);
  292. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  293. MX_MulSL(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
  294. }
  295. 011110,5.FMTSEL,5.VT,5.VS,5.VD,001111:MDMX:64::NOR.fmt
  296. "nor.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  297. *mdmx:
  298. *sb1:
  299. {
  300. check_mdmx (SD_, instruction_0);
  301. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  302. StoreFPR(VD,fmt_mdmx,MX_Nor(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  303. }
  304. 011110,5.FMTSEL,5.VT,5.VS,5.VD,001110:MDMX:64::OR.fmt
  305. "or.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  306. *mdmx:
  307. *sb1:
  308. {
  309. check_mdmx (SD_, instruction_0);
  310. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  311. StoreFPR(VD,fmt_mdmx,MX_Or(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  312. }
  313. 011110,5.FMTSEL,5.VT,5.VS,5.VD,000010:MDMX:64::PICKF.fmt
  314. "pickf.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  315. *mdmx:
  316. *sb1:
  317. {
  318. check_mdmx (SD_, instruction_0);
  319. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  320. StoreFPR(VD,fmt_mdmx,MX_Pick(0,ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  321. }
  322. 011110,5.FMTSEL,5.VT,5.VS,5.VD,000011:MDMX:64::PICKT.fmt
  323. "pickt.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  324. *mdmx:
  325. *sb1:
  326. {
  327. check_mdmx (SD_, instruction_0);
  328. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  329. StoreFPR(VD,fmt_mdmx,MX_Pick(1,ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  330. }
  331. 011110,1000,1.FMTOP,00000,00000,5.VD,111111:MDMX:64::RACH.fmt
  332. "rach.%s<FMTOP> v<VD>"
  333. *mdmx:
  334. *sb1:
  335. {
  336. check_mdmx (SD_, instruction_0);
  337. check_mdmx_fmtop (SD_, instruction_0, FMTOP);
  338. StoreFPR(VD,fmt_mdmx,MX_RAC(MX_RAC_H,FMTOP));
  339. }
  340. 011110,0000,1.FMTOP,00000,00000,5.VD,111111:MDMX:64::RACL.fmt
  341. "racl.%s<FMTOP> v<VD>"
  342. *mdmx:
  343. *sb1:
  344. {
  345. check_mdmx (SD_, instruction_0);
  346. check_mdmx_fmtop (SD_, instruction_0, FMTOP);
  347. StoreFPR(VD,fmt_mdmx,MX_RAC(MX_RAC_L,FMTOP));
  348. }
  349. 011110,0100,1.FMTOP,00000,00000,5.VD,111111:MDMX:64::RACM.fmt
  350. "racm.%s<FMTOP> v<VD>"
  351. *mdmx:
  352. *sb1:
  353. {
  354. check_mdmx (SD_, instruction_0);
  355. check_mdmx_fmtop (SD_, instruction_0, FMTOP);
  356. StoreFPR(VD,fmt_mdmx,MX_RAC(MX_RAC_M,FMTOP));
  357. }
  358. 011110,3.SEL,01,5.VT,00000,5.VD,100101:MDMX:64::RNAS.QH
  359. "rnas.qh v<VD>, v<VT>"
  360. *mdmx:
  361. {
  362. check_mdmx (SD_, instruction_0);
  363. StoreFPR(VD,fmt_mdmx,MX_RNAS(VT,qh_fmtsel(SEL)));
  364. }
  365. 011110,5.FMTSEL,5.VT,00000,5.VD,100001:MDMX:64::RNAU.fmt
  366. "rnau.%s<FMTSEL> v<VD>, v<VT>"
  367. *mdmx:
  368. *sb1:
  369. {
  370. check_mdmx (SD_, instruction_0);
  371. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  372. StoreFPR(VD,fmt_mdmx,MX_RNAU(VT,FMTSEL));
  373. }
  374. 011110,3.SEL,01,5.VT,00000,5.VD,100110:MDMX:64::RNES.QH
  375. "rnes.qh v<VD>, v<VT>"
  376. *mdmx:
  377. {
  378. check_mdmx (SD_, instruction_0);
  379. StoreFPR(VD,fmt_mdmx,MX_RNES(VT,qh_fmtsel(SEL)));
  380. }
  381. 011110,5.FMTSEL,5.VT,00000,5.VD,100010:MDMX:64::RNEU.fmt
  382. "rneu.%s<FMTSEL> v<VD>, v<VT>"
  383. *mdmx:
  384. *sb1:
  385. {
  386. check_mdmx (SD_, instruction_0);
  387. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  388. StoreFPR(VD,fmt_mdmx,MX_RNEU(VT,FMTSEL));
  389. }
  390. 011110,3.SEL,01,5.VT,00000,5.VD,100100:MDMX:64::RZS.QH
  391. "rzs.qh v<VD>, v<VT>"
  392. *mdmx:
  393. {
  394. check_mdmx (SD_, instruction_0);
  395. StoreFPR(VD,fmt_mdmx,MX_RZS(VT,qh_fmtsel(SEL)));
  396. }
  397. 011110,5.FMTSEL,5.VT,00000,5.VD,100000:MDMX:64::RZU.fmt
  398. "rzu.%s<FMTSEL> v<VD>, v<VT>"
  399. *mdmx:
  400. *sb1:
  401. {
  402. check_mdmx (SD_, instruction_0);
  403. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  404. StoreFPR(VD,fmt_mdmx,MX_RZU(VT,FMTSEL));
  405. }
  406. 011110,5.SHOP,5.VT,5.VS,5.VD,011111:MDMX:64::SHFL.op.fmt
  407. "shfl.%s<SHOP> v<VD>, v<VS>, v<VT>"
  408. *mdmx:
  409. *sb1:
  410. {
  411. check_mdmx (SD_, instruction_0);
  412. if (check_mdmx_fmtsel (SD_, instruction_0, SHOP))
  413. StoreFPR(VD,fmt_mdmx,MX_SHFL(SHOP,ValueFPR(VS,fmt_mdmx),ValueFPR(VT,fmt_mdmx)));
  414. }
  415. 011110,5.FMTSEL,5.VT,5.VS,5.VD,010000:MDMX:64::SLL.fmt
  416. "sll.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  417. *mdmx:
  418. *sb1:
  419. {
  420. check_mdmx (SD_, instruction_0);
  421. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  422. StoreFPR(VD,fmt_mdmx,MX_ShiftLeftLogical(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  423. }
  424. 011110,3.SEL,01,5.VT,5.VS,5.VD,010011:MDMX:64::SRA.QH
  425. "sra.qh v<VD>, v<VS>, v<VT>"
  426. *mdmx:
  427. {
  428. check_mdmx (SD_, instruction_0);
  429. StoreFPR(VD,fmt_mdmx,MX_ShiftRightArith(ValueFPR(VS,fmt_mdmx),VT,qh_fmtsel(SEL)));
  430. }
  431. 011110,5.FMTSEL,5.VT,5.VS,5.VD,010010:MDMX:64::SRL.fmt
  432. "srl.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  433. *mdmx:
  434. *sb1:
  435. {
  436. check_mdmx (SD_, instruction_0);
  437. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  438. StoreFPR(VD,fmt_mdmx,MX_ShiftRightLogical(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  439. }
  440. 011110,5.FMTSEL,5.VT,5.VS,5.VD,001010:MDMX:64::SUB.fmt
  441. "sub.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  442. *mdmx:
  443. *sb1:
  444. {
  445. check_mdmx (SD_, instruction_0);
  446. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  447. StoreFPR(VD,fmt_mdmx,MX_Sub(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  448. }
  449. 011110,5.FMTSEL,5.VT,5.VS,0,0000,110110:MDMX:64::SUBA.fmt
  450. "suba.%s<FMTSEL> v<VS>, v<VT>"
  451. *mdmx:
  452. *sb1:
  453. {
  454. check_mdmx (SD_, instruction_0);
  455. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  456. MX_SubA(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
  457. }
  458. 011110,5.FMTSEL,5.VT,5.VS,1,0000,110110:MDMX:64::SUBL.fmt
  459. "subl.%s<FMTSEL> v<VS>, v<VT>"
  460. *mdmx:
  461. *sb1:
  462. {
  463. check_mdmx (SD_, instruction_0);
  464. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  465. MX_SubL(ValueFPR(VS,fmt_mdmx),VT,FMTSEL);
  466. }
  467. 011110,1000,1.FMTOP,00000,5.VS,00000,111110:MDMX:64::WACH.fmt
  468. "wach.%s<FMTOP> v<VS>"
  469. *mdmx:
  470. *sb1:
  471. {
  472. check_mdmx (SD_, instruction_0);
  473. check_mdmx_fmtop (SD_, instruction_0, FMTOP);
  474. MX_WACH(FMTOP,ValueFPR(VS,fmt_mdmx));
  475. }
  476. 011110,0000,1.FMTOP,5.VT,5.VS,00000,111110:MDMX:64::WACL.fmt
  477. "wacl.%s<FMTOP> v<VS>, v<VT>"
  478. *mdmx:
  479. *sb1:
  480. {
  481. check_mdmx (SD_, instruction_0);
  482. check_mdmx_fmtop (SD_, instruction_0, FMTOP);
  483. MX_WACL(FMTOP,ValueFPR(VS,fmt_mdmx),ValueFPR(VT,fmt_mdmx));
  484. }
  485. 011110,5.FMTSEL,5.VT,5.VS,5.VD,001101:MDMX:64::XOR.fmt
  486. "xor.%s<FMTSEL> v<VD>, v<VS>, v<VT>"
  487. *mdmx:
  488. *sb1:
  489. {
  490. check_mdmx (SD_, instruction_0);
  491. if (check_mdmx_fmtsel (SD_, instruction_0, FMTSEL))
  492. StoreFPR(VD,fmt_mdmx,MX_Xor(ValueFPR(VS,fmt_mdmx),VT,FMTSEL));
  493. }