micromips.igen 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092
  1. // Simulator definition for the micromips ASE.
  2. // Copyright (C) 2005-2015 Free Software Foundation, Inc.
  3. // Contributed by Imagination Technologies, Ltd.
  4. // Written by Andrew Bennett <andrew.bennett@imgtec.com>
  5. //
  6. // This file is part of the MIPS sim.
  7. //
  8. // This program is free software; you can redistribute it and/or modify
  9. // it under the terms of the GNU General Public License as published by
  10. // the Free Software Foundation; either version 3 of the License, or
  11. // (at your option) any later version.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU General Public License
  19. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. :compute:::int:TBASE:BASE:((BASE < 2) ? (16 + BASE) \: BASE)
  21. :compute:::int:TRD:RD:((RD < 2) ? (16 + RD) \: RD)
  22. :compute:::int:TRS:RS:((RS < 2) ? (16 + RS) \: RS)
  23. :compute:::int:TRT:RT:((RT < 2) ? (16 + RT) \: RT)
  24. :compute:::int:TRT_S:RT_S:((RT_S == 1 ) ? 17 \: RT_S)
  25. :compute:::int:ERT:RT:(compute_movep_src_reg (SD_, RT))
  26. :compute:::int:ERS:RS:(compute_movep_src_reg (SD_, RS))
  27. :compute:::int:IMM_DEC1:IMMEDIATE:((IMMEDIATE == 7) ? -1 \: ((IMMEDIATE == 0) ? 1 \: IMMEDIATE << 2))
  28. :compute:::int:IMM_DEC2:IMMEDIATE:((IMMEDIATE < 8) ? IMMEDIATE \: (IMMEDIATE - 16))
  29. :compute:::int:IMM_DEC3:IMMEDIATE:((IMMEDIATE < 2) ? IMMEDIATE + 256 \: ((IMMEDIATE < 256) ? IMMEDIATE \: ((IMMEDIATE < 510) ? IMMEDIATE - 512 \: IMMEDIATE - 768)))
  30. :compute:::int:IMM_DEC4:IMMEDIATE:(compute_andi16_imm (SD_, IMMEDIATE))
  31. :compute:::int:IMM_DEC5:IMMEDIATE:((IMMEDIATE < 15) ? IMMEDIATE \: -1)
  32. :compute:::int:IMM_DEC6:IMMEDIATE:((IMMEDIATE < 127) ? IMMEDIATE \: -1)
  33. :compute:::int:SHIFT_DEC:SHIFT:((SHIFT == 0) ? 8 \: SHIFT)
  34. :compute:::int:IMM_SHIFT_1BIT:IMMEDIATE:(IMMEDIATE << 1)
  35. :compute:::int:IMM_SHIFT_2BIT:IMMEDIATE:(IMMEDIATE << 2)
  36. :function:::address_word:delayslot_micromips:address_word target, address_word nia, int delayslot_instruction_size
  37. {
  38. instruction_word delay_insn;
  39. sim_events_slip (SD, 1);
  40. DSPC = CIA;
  41. CIA = nia;
  42. STATE |= simDELAYSLOT;
  43. ENGINE_ISSUE_PREFIX_HOOK();
  44. micromips_instruction_decode (SD, CPU, CIA, delayslot_instruction_size);
  45. STATE &= ~simDELAYSLOT;
  46. return target;
  47. }
  48. :function:::address_word:process_isa_mode:address_word target
  49. {
  50. SD->isa_mode = target & 0x1;
  51. return (target & (-1 << 1));
  52. }
  53. :function:::address_word:do_micromips_jalr:int rt, int rs, address_word nia, int delayslot_instruction_size
  54. {
  55. GPR[rt] = (nia + delayslot_instruction_size) | ISA_MODE_MICROMIPS;
  56. return (process_isa_mode (SD_,
  57. delayslot_micromips (SD_, GPR[rs], nia, delayslot_instruction_size)));
  58. }
  59. :function:::address_word:do_micromips_jal:address_word target, address_word nia, int delayslot_instruction_size
  60. {
  61. RA = (nia + delayslot_instruction_size) | ISA_MODE_MICROMIPS;
  62. return delayslot_micromips (SD_, target, nia, delayslot_instruction_size);
  63. }
  64. :function:::unsigned32:compute_movep_src_reg:int reg
  65. {
  66. switch(reg)
  67. {
  68. case 0: return 0;
  69. case 1: return 17;
  70. case 2: return 2;
  71. case 3: return 3;
  72. case 4: return 16;
  73. case 5: return 18;
  74. case 6: return 19;
  75. case 7: return 20;
  76. default: return 0;
  77. }
  78. }
  79. :function:::unsigned32:compute_andi16_imm:int encoded_imm
  80. {
  81. switch (encoded_imm)
  82. {
  83. case 0: return 128;
  84. case 1: return 1;
  85. case 2: return 2;
  86. case 3: return 3;
  87. case 4: return 4;
  88. case 5: return 7;
  89. case 6: return 8;
  90. case 7: return 15;
  91. case 8: return 16;
  92. case 9: return 31;
  93. case 10: return 32;
  94. case 11: return 63;
  95. case 12: return 64;
  96. case 13: return 255;
  97. case 14: return 32768;
  98. case 15: return 65535;
  99. default: return 0;
  100. }
  101. }
  102. :function:::FP_formats:convert_fmt_micromips:int fmt
  103. {
  104. switch (fmt)
  105. {
  106. case 0: return fmt_single;
  107. case 1: return fmt_double;
  108. case 2: return fmt_ps;
  109. default: return fmt_unknown;
  110. }
  111. }
  112. :function:::FP_formats:convert_fmt_micromips_cvt_d:int fmt
  113. {
  114. switch (fmt)
  115. {
  116. case 0: return fmt_single;
  117. case 1: return fmt_word;
  118. case 2: return fmt_long;
  119. default: return fmt_unknown;
  120. }
  121. }
  122. :function:::FP_formats:convert_fmt_micromips_cvt_s:int fmt
  123. {
  124. switch (fmt)
  125. {
  126. case 0: return fmt_double;
  127. case 1: return fmt_word;
  128. case 2: return fmt_long;
  129. default: return fmt_unknown;
  130. }
  131. }
  132. 011011,3.RD,6.IMMEDIATE,1:POOL16E:16::ADDIUR1SP
  133. "addiur1sp r<TRD>, <IMMEDIATE>"
  134. *micromips32:
  135. *micromips64:
  136. {
  137. do_addiu (SD_, SPIDX, TRD, IMMEDIATE << 2);
  138. }
  139. 011011,3.RD,3.RS,3.IMMEDIATE,0:POOL16E:16::ADDIUR2
  140. "addiur2 r<TRD>, r<TRS>, <IMM_DEC1>"
  141. *micromips32:
  142. *micromips64:
  143. {
  144. do_addiu (SD_, TRS, TRD, IMM_DEC1);
  145. }
  146. 010011,5.RD,4.IMMEDIATE,0:POOL16D:16::ADDIUS5
  147. "addius5 r<RD>, <IMM_DEC2>"
  148. *micromips32:
  149. *micromips64:
  150. {
  151. do_addiu (SD_, RD, RD, IMM_DEC2);
  152. }
  153. 010011,9.IMMEDIATE,1:POOL16D:16::ADDIUSP
  154. "addiusp <IMM_DEC3>"
  155. *micromips32:
  156. *micromips64:
  157. {
  158. do_addiu (SD_, SPIDX, SPIDX, IMM_DEC3 << 2);
  159. }
  160. 000001,3.RD,3.RT,3.RS,0:POOL16A:16::ADDU16
  161. "addu16 r<TRD>, r<TRS>, r<TRT>"
  162. *micromips32:
  163. *micromips64:
  164. {
  165. do_addu (SD_, TRS, TRT, TRD);
  166. }
  167. 001011,3.RD,3.RS,4.IMMEDIATE:MICROMIPS:16::ANDI16
  168. "andi16 r<TRD>, r<TRS>, <IMM_DEC4>"
  169. *micromips32:
  170. *micromips64:
  171. {
  172. do_andi (SD_, TRS, TRD, IMM_DEC4);
  173. }
  174. 010001,0010,3.RT,3.RS:POOL16C:16::AND16
  175. "and16 r<TRT>, r<TRS>"
  176. *micromips32:
  177. *micromips64:
  178. {
  179. do_and (SD_, TRS, TRT, TRT);
  180. }
  181. 110011,10.IMMEDIATE:MICROMIPS:16::B16
  182. "b16 <IMMEDIATE>"
  183. *micromips32:
  184. *micromips64:
  185. {
  186. NIA = delayslot_micromips (SD_, NIA + (EXTEND11 (IMMEDIATE << 1)),
  187. NIA, MICROMIPS_DELAYSLOT_SIZE_ANY);
  188. }
  189. 100011,3.RS,7.IMMEDIATE:MICROMIPS:16::BEQZ16
  190. "beqz16 r<TRS>, <IMMEDIATE>"
  191. *micromips32:
  192. *micromips64:
  193. {
  194. if (GPR[TRS] == 0)
  195. NIA = delayslot_micromips (SD_, NIA + (EXTEND8 (IMMEDIATE << 1)),
  196. NIA, MICROMIPS_DELAYSLOT_SIZE_ANY);
  197. }
  198. 101011,3.RS,7.IMMEDIATE:MICROMIPS:16::BNEZ16
  199. "bnez16 r<TRS>, <IMMEDIATE>"
  200. *micromips32:
  201. *micromips64:
  202. {
  203. if (GPR[TRS] != 0)
  204. NIA = delayslot_micromips (SD_, NIA + (EXTEND8 (IMMEDIATE << 1)),
  205. NIA, MICROMIPS_DELAYSLOT_SIZE_ANY);
  206. }
  207. 010001,101000,4.CODE:POOL16C:16::BREAK16
  208. "break16 %#lx<CODE>"
  209. *micromips32:
  210. *micromips64:
  211. {
  212. do_break16 (SD_, instruction_0);
  213. }
  214. 010001,01110,5.RS:POOL16C:16::JALR16
  215. "jalr16 r<RS>"
  216. *micromips32:
  217. *micromips64:
  218. {
  219. NIA = do_micromips_jalr (SD_, RAIDX, RS, NIA, MICROMIPS_DELAYSLOT_SIZE_32);
  220. }
  221. 010001,01111,5.RS:POOL16C:16::JALRS16
  222. "jalrs16 r<RS>"
  223. *micromips32:
  224. *micromips64:
  225. {
  226. NIA = do_micromips_jalr (SD_, RAIDX, RS, NIA, MICROMIPS_DELAYSLOT_SIZE_16);
  227. }
  228. 010001,01100,5.RS:POOL16C:16::JR16
  229. "jr16 r<RS>"
  230. *micromips32:
  231. *micromips64:
  232. {
  233. NIA = process_isa_mode (SD_,
  234. delayslot_micromips (SD_, GPR[RS], NIA, MICROMIPS_DELAYSLOT_SIZE_ANY));
  235. }
  236. 010001,11000,5.IMMEDIATE:POOL16C:16::JRADDIUSP
  237. "jraddiusp <IMMEDIATE>"
  238. *micromips32:
  239. *micromips64:
  240. {
  241. address_word temp = RA;
  242. do_addiu (SD_, SPIDX, SPIDX, IMMEDIATE << 2);
  243. NIA = process_isa_mode (SD_, temp);
  244. }
  245. 010001,01101,5.RS:POOL16C:16::JRC
  246. "jrc r<RS>"
  247. *micromips32:
  248. *micromips64:
  249. {
  250. NIA = process_isa_mode (SD_, GPR[RS]);
  251. }
  252. 000010,3.RT,3.BASE,4.IMMEDIATE:MICROMIPS:16::LBU16
  253. "lbu16 r<TRT>, <IMM_DEC5>(r<TBASE>)"
  254. *micromips32:
  255. *micromips64:
  256. {
  257. /* LBU can have a negative offset. As the offset argument to do_load is
  258. unsigned we need to do the address calcuation before the function call so
  259. that the load address has been correctly calculated */
  260. GPR[TRT] = do_load (SD_, AccessLength_BYTE, GPR[TBASE] + IMM_DEC5, 0);
  261. }
  262. 001010,3.RT,3.BASE,4.IMMEDIATE:MICROMIPS:16::LHU16
  263. "lhu16 r<TRT>, <IMM_SHIFT_1BIT>(r<TBASE>)"
  264. *micromips32:
  265. *micromips64:
  266. {
  267. GPR[TRT] = do_load (SD_, AccessLength_HALFWORD, GPR[TBASE], IMM_SHIFT_1BIT);
  268. }
  269. 111011,3.RD,7.IMMEDIATE:MICROMIPS:16::LI16
  270. "li16 r<TRD>, <IMM_DEC6>"
  271. *micromips32:
  272. *micromips64:
  273. {
  274. GPR[TRD] = IMM_DEC6;
  275. }
  276. 011010,3.RT,3.BASE,4.IMMEDIATE:MICROMIPS:16::LW16
  277. "lw16 r<TRT>, <IMM_SHIFT_2BIT>(r<TBASE>)"
  278. *micromips32:
  279. *micromips64:
  280. {
  281. GPR[TRT] = EXTEND32 (
  282. do_load (SD_, AccessLength_WORD, GPR[TBASE], IMM_SHIFT_2BIT));
  283. }
  284. :%s::::LWMREGS:int lwmregs
  285. *micromips32:
  286. *micromips64:
  287. {
  288. if (lwmregs == 3)
  289. return "s0, s1, s2, s3, ra";
  290. else if (lwmregs == 2)
  291. return "s0, s1, s2, ra";
  292. else if (lwmregs == 1)
  293. return "s0, s1, ra";
  294. else if (lwmregs == 0)
  295. return "s0, ra";
  296. else
  297. return "";
  298. }
  299. 010001,0100,2.LWMREGS,4.IMMEDIATE:POOL16C:16::LWM16
  300. "lwm16 %s<LWMREGS>, <IMM_SHIFT_2BIT>(sp)"
  301. *micromips32:
  302. *micromips64:
  303. {
  304. int address = GPR[SPIDX] + IMM_SHIFT_2BIT;
  305. int reg_offset;
  306. for (reg_offset = 0; reg_offset <= LWMREGS; reg_offset++)
  307. GPR[16 + reg_offset] = EXTEND32 (
  308. do_load (SD_, AccessLength_WORD, address, reg_offset * 4));
  309. RA = EXTEND32 (do_load (SD_, AccessLength_WORD, address, reg_offset * 4));
  310. }
  311. 011001,3.RT,7.IMMEDIATE:MICROMIPS:16::LWGP
  312. "lwgp r<TRT>, <IMM_SHIFT_2BIT>(gp)"
  313. *micromips32:
  314. *micromips64:
  315. {
  316. GPR[TRT] = EXTEND32 (
  317. do_load (SD_, AccessLength_WORD, GPR[28], IMM_SHIFT_2BIT));
  318. }
  319. 010010,5.RT,5.IMMEDIATE:MICROMIPS:16::LWSP
  320. "lwsp r<RT>, <IMM_SHIFT_2BIT>(sp)"
  321. *micromips32:
  322. *micromips64:
  323. {
  324. GPR[RT] = EXTEND32 (do_load (SD_, AccessLength_WORD, SP, IMM_SHIFT_2BIT));
  325. }
  326. 010001,10000,5.RD:POOL16C:16::MFHI16
  327. "mfhi16 r<RD>"
  328. *micromips32:
  329. *micromips64:
  330. {
  331. do_mfhi (SD_, RD);
  332. }
  333. 010001,10010,5.RD:POOL16C:16::MFLO16
  334. "mflo16 r<RD>"
  335. *micromips32:
  336. *micromips64:
  337. {
  338. do_mflo (SD_, RD);
  339. }
  340. 000011,5.RD,5.RS:MICROMIPS:16::MOVE16
  341. "nop":RD==0&&RS==0
  342. "move16 r<RD>, r<RS>"
  343. *micromips32:
  344. *micromips64:
  345. {
  346. GPR[RD] = GPR[RS];
  347. }
  348. :%s::::DESTREGS:int regs
  349. *micromips32:
  350. *micromips64:
  351. {
  352. switch (regs)
  353. {
  354. case 0: return "a1, a2,";
  355. case 1: return "a1, a3,";
  356. case 2: return "a2, a3,";
  357. case 3: return "a0, s5,";
  358. case 4: return "a0, s6,";
  359. case 5: return "a0, a1,";
  360. case 6: return "a0, a2,";
  361. case 7: return "a0, a3,";
  362. default: return "";
  363. }
  364. }
  365. 100001,3.DESTREGS,3.RT,3.RS,0:MICROMIPS:16::MOVEP
  366. "movep %s<DESTREGS> r<ERS>, r<ERT>"
  367. *micromips32:
  368. *micromips64:
  369. {
  370. int rd;
  371. int re;
  372. int dest = DESTREGS;
  373. if (dest == 0 || dest == 1)
  374. rd = 5;
  375. else if (dest == 2)
  376. rd = 6;
  377. else
  378. rd = 4;
  379. if (dest == 0 || dest == 6)
  380. re = 6;
  381. else if (dest == 1 || dest == 2 || dest == 7)
  382. re = 7;
  383. else if (dest == 3)
  384. re = 21;
  385. else if (dest == 4)
  386. re = 22;
  387. /* assume dest is 5 */
  388. else
  389. re = 5;
  390. GPR[rd] = GPR[ERS];
  391. GPR[re] = GPR[ERT];
  392. }
  393. 010001,0000,3.RT,3.RS:POOL16C:16::NOT16
  394. "not16 r<TRT>, r<TRS>"
  395. *micromips32:
  396. *micromips64:
  397. {
  398. do_nor (SD_, 0, TRS, TRT);
  399. }
  400. 010001,0011,3.RT,3.RS:POOL16C:16::OR16
  401. "or16 r<TRT>, r<TRS>"
  402. *micromips32:
  403. *micromips64:
  404. {
  405. do_or (SD_, TRS, TRT, TRT);
  406. }
  407. 100010,3.RT_S,3.BASE,4.IMMEDIATE:MICROMIPS:16::SB16
  408. "sb16 r<TRT_S>, <IMMEDIATE>(r<TBASE>)"
  409. *micromips32:
  410. *micromips64:
  411. {
  412. do_store (SD_, AccessLength_BYTE, GPR[TBASE], IMMEDIATE, GPR[TRT_S]);
  413. }
  414. 010001,101100,4.CODE:POOL16C:16::SDBBP16
  415. "sdbbp16 %#lx<CODE>"
  416. *micromips32:
  417. *micromips64:
  418. {
  419. SignalException (DebugBreakPoint, instruction_0);
  420. }
  421. 101010,3.RT_S,3.BASE,4.IMMEDIATE:MICROMIPS:16::SH16
  422. "sh16 r<TRT_S>, <IMM_SHIFT_1BIT>(r<TBASE>)"
  423. *micromips32:
  424. *micromips64:
  425. {
  426. do_store (SD_, AccessLength_HALFWORD, GPR[TBASE], IMM_SHIFT_1BIT, GPR[TRT_S]);
  427. }
  428. 001001,3.RD,3.RT,3.SHIFT,0:POOL16B:16::SLL16
  429. "sll16 r<TRD>, r<TRT>, <SHIFT_DEC>"
  430. *micromips32:
  431. *micromips64:
  432. {
  433. do_sll (SD_, TRT, TRD, SHIFT_DEC);
  434. }
  435. 001001,3.RD,3.RT,3.SHIFT,1:POOL16B:16::SRL16
  436. "srl16 r<TRD>, r<TRT>, <SHIFT_DEC>"
  437. *micromips32:
  438. *micromips64:
  439. {
  440. do_srl (SD_, TRT, TRD, SHIFT_DEC);
  441. }
  442. 000001,3.RD,3.RT,3.RS,1:POOL16A:16::SUBU16
  443. "subu16 r<TRD>, r<TRS>, r<TRT>"
  444. *micromips32:
  445. *micromips64:
  446. {
  447. do_subu (SD_, TRS, TRT, TRD);
  448. }
  449. 111010,3.RT_S,3.BASE,4.IMMEDIATE:MICROMIPS:16::SW16
  450. "sw16 r<TRT_S>, <IMM_SHIFT_2BIT>(r<TBASE>)"
  451. *micromips32:
  452. *micromips64:
  453. {
  454. do_store (SD_, AccessLength_WORD, GPR[TBASE], IMM_SHIFT_2BIT, GPR[TRT_S]);
  455. }
  456. 110010,5.RT,5.IMMEDIATE:MICROMIPS:16::SWSP
  457. "swsp r<RT>, <IMM_SHIFT_2BIT>(sp)"
  458. *micromips32:
  459. *micromips64:
  460. {
  461. do_store (SD_, AccessLength_WORD, SP, IMM_SHIFT_2BIT, GPR[RT]);
  462. }
  463. 010001,0101,2.LWMREGS,4.IMMEDIATE:POOL16C:16::SWM16
  464. "swm16 %s<LWMREGS>, <IMM_SHIFT_2BIT>(sp)"
  465. *micromips32:
  466. *micromips64:
  467. {
  468. int address = GPR[SPIDX] + IMM_SHIFT_2BIT;
  469. int reg_offset;
  470. for (reg_offset = 0; reg_offset <= LWMREGS; reg_offset++)
  471. do_store (SD_, AccessLength_WORD, address, reg_offset * 4,
  472. GPR[16 + reg_offset]);
  473. do_store (SD_, AccessLength_WORD, address, reg_offset * 4, RA);
  474. }
  475. 010001,0001,3.RT,3.RS:POOL16C:16::XOR16
  476. "xor16 r<TRT>, r<TRS>"
  477. *micromips32:
  478. *micromips64:
  479. {
  480. do_xor (SD_, TRS, TRT, TRT);
  481. }
  482. 000000,5.RT,5.RS,5.RD,00100,010000:POOL32A:32::ADD
  483. "add r<RD>, r<RS>, r<RT>"
  484. *micromips32:
  485. *micromips64:
  486. {
  487. do_add (SD_, RS, RT, RD);
  488. }
  489. 000100,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:32::ADDI
  490. "addi r<RT>, r<RS>, <IMMEDIATE>"
  491. *micromips32:
  492. *micromips64:
  493. {
  494. do_addi (SD_, RS, RT, IMMEDIATE);
  495. }
  496. 001100,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:32::ADDIU
  497. "li r<RT>, <IMMEDIATE>":RS==0
  498. "addiu r<RT>, r<RS>, <IMMEDIATE>"
  499. *micromips32:
  500. *micromips64:
  501. {
  502. do_addiu (SD_, RS, RT, IMMEDIATE);
  503. }
  504. 011110,3.RS,23.IMMEDIATE:MICROMIPS:32::ADDIUPC
  505. "addiupc r<TRS>, <IMM_SHIFT_2BIT>"
  506. *micromips32:
  507. *micromips64:
  508. {
  509. GPR[TRS] = EXTEND32 ((CIA & ~3) + EXTEND25 (IMM_SHIFT_2BIT));
  510. }
  511. 000000,5.RT,5.RS,5.RD,00101,010000:POOL32A:32::ADDU
  512. "addu r<RD>, r<RS>, r<RT>"
  513. *micromips32:
  514. *micromips64:
  515. {
  516. do_addu (SD_, RS, RT, RD);
  517. }
  518. 000000,5.RT,5.RS,5.RD,01001,010000:POOL32A:32::AND
  519. "and r<RD>, r<RS>, r<RT>"
  520. *micromips32:
  521. *micromips64:
  522. {
  523. do_and (SD_, RS, RT, RD);
  524. }
  525. 110100,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:32::ANDI
  526. "andi r<RT>, r<RS>, <IMMEDIATE>"
  527. *micromips32:
  528. *micromips64:
  529. {
  530. do_andi (SD_, RS, RT, IMMEDIATE);
  531. }
  532. 010000,1110,1.TF,3.CC,00,16.IMMEDIATE:POOL32I:32,f::BC1a
  533. "bc1%s<TF> <IMMEDIATE>":CC == 0
  534. "bc1%s<TF> <CC>, <IMMEDIATE>"
  535. *micromips32:
  536. *micromips64:
  537. {
  538. check_fpu (SD_);
  539. if (GETFCC(CC) == TF)
  540. {
  541. address_word dest = NIA + (EXTEND16 (IMMEDIATE) << 1);
  542. NIA = delayslot_micromips (SD_, dest, NIA, MICROMIPS_DELAYSLOT_SIZE_ANY);
  543. }
  544. }
  545. 010000,1010,1.TF,3.CC,00,16.IMMEDIATE:POOL32I:32::BC2a
  546. "bc2%s<TF> <CC>, <IMMEDIATE>":CC == 0
  547. "bc2%s<TF> <CC>, <IMMEDIATE>"
  548. *micromips32:
  549. *micromips64:
  550. 100101,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:32::BEQ
  551. "b <IMMEDIATE>":RT == 0 && RS == 0
  552. "beq r<RS>, r<RT>, <IMMEDIATE>"
  553. *micromips32:
  554. *micromips64:
  555. {
  556. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  557. if ((signed_word) GPR[RS] == (signed_word) GPR[RT])
  558. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  559. MICROMIPS_DELAYSLOT_SIZE_ANY);
  560. }
  561. 010000,00010,5.RS,16.IMMEDIATE:POOL32I:32::BGEZ
  562. "bgez r<RS>, <IMMEDIATE>"
  563. *micromips32:
  564. *micromips64:
  565. {
  566. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  567. if ((signed_word) GPR[RS] >= 0)
  568. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  569. MICROMIPS_DELAYSLOT_SIZE_ANY);
  570. }
  571. 010000,00111,5.RS,16.IMMEDIATE:POOL32I:32::BEQZC
  572. "beqzc r<RS>, <IMMEDIATE>"
  573. *micromips32:
  574. *micromips64:
  575. {
  576. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  577. if (GPR[RS] == 0)
  578. NIA = NIA + offset;
  579. }
  580. 010000,00011,5.RS,16.IMMEDIATE:POOL32I:32::BGEZAL
  581. "bal <IMMEDIATE>":RS == 0
  582. "bgezal r<RS>, <IMMEDIATE>"
  583. *micromips32:
  584. *micromips64:
  585. {
  586. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  587. if (RS == 31)
  588. Unpredictable ();
  589. RA = (NIA + MICROMIPS_DELAYSLOT_SIZE_32) | ISA_MODE_MICROMIPS;
  590. if ((signed_word) GPR[RS] >= 0)
  591. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  592. MICROMIPS_DELAYSLOT_SIZE_32);
  593. }
  594. 010000,00110,5.RS,16.IMMEDIATE:POOL32I:32::BGTZ
  595. "bgtz r<RS>, <IMMEDIATE>"
  596. *micromips32:
  597. *micromips64:
  598. {
  599. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  600. if ((signed_word) GPR[RS] > 0)
  601. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  602. MICROMIPS_DELAYSLOT_SIZE_ANY);
  603. }
  604. 010000,10011,5.RS,16.IMMEDIATE:POOL32I:32::BGEZALS
  605. "bal <IMMEDIATE>":RS == 0
  606. "bgezals r<RS>, <IMMEDIATE>"
  607. *micromips32:
  608. *micromips64:
  609. {
  610. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  611. if (RS == 31)
  612. Unpredictable ();
  613. RA = (NIA + MICROMIPS_DELAYSLOT_SIZE_16) | ISA_MODE_MICROMIPS;
  614. if ((signed_word) GPR[RS] >= 0)
  615. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  616. MICROMIPS_DELAYSLOT_SIZE_16);
  617. }
  618. 010000,00100,5.RS,16.IMMEDIATE:POOL32I:32::BLEZ
  619. "blez r<RS>, <IMMEDIATE>"
  620. *micromips32:
  621. *micromips64:
  622. {
  623. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  624. /* NOTE: The branch occurs AFTER the next instruction has been
  625. executed */
  626. if ((signed_word) GPR[RS] <= 0)
  627. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  628. MICROMIPS_DELAYSLOT_SIZE_ANY);
  629. }
  630. 010000,00000,5.RS,16.IMMEDIATE:POOL32I:32::BLTZ
  631. "bltz r<RS>, <IMMEDIATE>"
  632. *micromips32:
  633. *micromips64:
  634. {
  635. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  636. if ((signed_word) GPR[RS] < 0)
  637. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  638. MICROMIPS_DELAYSLOT_SIZE_ANY);
  639. }
  640. 010000,00001,5.RS,16.IMMEDIATE:POOL32I:32::BLTZAL
  641. "bltzal r<RS>, <IMMEDIATE>"
  642. *micromips32:
  643. *micromips64:
  644. {
  645. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  646. if (RS == 31)
  647. Unpredictable ();
  648. RA = (NIA + MICROMIPS_DELAYSLOT_SIZE_32) | ISA_MODE_MICROMIPS;
  649. /* NOTE: The branch occurs AFTER the next instruction has been
  650. executed */
  651. if ((signed_word) GPR[RS] < 0)
  652. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  653. MICROMIPS_DELAYSLOT_SIZE_32);
  654. }
  655. 010000,10001,5.RS,16.IMMEDIATE:POOL32I:32::BLTZALS
  656. "bltzals r<RS>, <IMMEDIATE>"
  657. *micromips32:
  658. *micromips64:
  659. {
  660. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  661. if (RS == 31)
  662. Unpredictable ();
  663. RA = (NIA + MICROMIPS_DELAYSLOT_SIZE_16) | ISA_MODE_MICROMIPS;
  664. if ((signed_word) GPR[RS] < 0)
  665. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  666. MICROMIPS_DELAYSLOT_SIZE_16);
  667. }
  668. 101101,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:32::BNE
  669. "bne r<RS>, r<RT>, <IMMEDIATE>"
  670. *micromips32:
  671. *micromips64:
  672. {
  673. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  674. if ((signed_word) GPR[RS] != (signed_word) GPR[RT])
  675. NIA = delayslot_micromips (SD_, NIA + offset, NIA,
  676. MICROMIPS_DELAYSLOT_SIZE_ANY);
  677. }
  678. 010000,00101,5.RS,16.IMMEDIATE:POOL32I:32::BNEZC
  679. "bnezc r<RS>, <IMMEDIATE>"
  680. *micromips32:
  681. *micromips64:
  682. {
  683. address_word offset = EXTEND16 (IMMEDIATE) << 1;
  684. if ((signed_word) GPR[RS] != 0)
  685. NIA = NIA + offset;
  686. }
  687. 000000,20.CODE,000111:POOL32A:32::BREAK
  688. "break %#lx<CODE>"
  689. *micromips32:
  690. *micromips64:
  691. {
  692. do_break (SD_, instruction_0);
  693. }
  694. 001000,5.OP,5.BASE,0110,12.IMMEDIATE:POOL32B:32::CACHE
  695. "cache <OP>, <IMMEDIATE>(r<BASE>)"
  696. *micromips32:
  697. *micromips64:
  698. {
  699. address_word base = GPR[BASE];
  700. address_word offset = EXTEND12 (IMMEDIATE);
  701. address_word vaddr = loadstore_ea (SD_, base, offset);
  702. address_word paddr;
  703. int uncached;
  704. if (AddressTranslation (vaddr, isDATA, isLOAD, &paddr, &uncached,
  705. isTARGET, isREAL))
  706. CacheOp (OP, vaddr, paddr, instruction_0);
  707. }
  708. 011000,5.OP,5.BASE,1010011,9.IMMEDIATE:POOL32C:32::CACHEE
  709. "cachee <OP>, <IMMEDIATE>(r<BASE>)"
  710. *micromips32:
  711. *micromips64:
  712. 010101,5.RT,5.FS,0001000000,111011:POOL32F:32,f::CFC1
  713. "cfc1 r<RT>, f<FS>"
  714. *micromips32:
  715. *micromips64:
  716. {
  717. do_cfc1 (SD_, RT, FS);
  718. }
  719. 000000,5.RT,5.IMPL,1100110100,111100:POOL32A:32::CFC2
  720. "cfc2 r<RT>, <IMPL>"
  721. *micromips32:
  722. *micromips64:
  723. 000000,5.RT,5.RS,0100101100,111100:POOL32A:32::CLO
  724. "clo r<RT>, r<RS>"
  725. *micromips32:
  726. *micromips64:
  727. {
  728. do_clo (SD_, RT, RS);
  729. }
  730. 000000,5.RT,5.RS,0101101100,111100:POOL32A:32::CLZ
  731. "clz r<RT>, r<RS>"
  732. *micromips32:
  733. *micromips64:
  734. {
  735. do_clz (SD_, RT, RS);
  736. }
  737. 000000,23.COFUN,010:POOL32A:32::COP2
  738. "cop2 <COFUN>"
  739. *micromips32:
  740. *micromips64:
  741. 010101,5.RT,5.FS,0001100000,111011:POOL32F:32,f::CTC1
  742. "ctc1 r<RT>, f<FS>"
  743. *micromips32:
  744. *micromips64:
  745. {
  746. do_ctc1 (SD_, RT, FS);
  747. }
  748. 000000,5.RT,5.IMPL,1101110100,111100:POOL32A:32::CTC2
  749. "ctc2 r<RT>, <IMPL>"
  750. *micromips32:
  751. *micromips64:
  752. 000000,00000000001110001101,111100:POOL32A:32::DERET
  753. "deret"
  754. *micromips32:
  755. *micromips64:
  756. 000000,00000,5.RS,0100011101,111100:POOL32A:32::DI
  757. "di":RS == 0
  758. "di r<RS>"
  759. *micromips32:
  760. *micromips64:
  761. {
  762. do_di (SD_, RS);
  763. }
  764. 000000,5.RT,5.RS,1010101100,111100:POOL32A:32::DIV
  765. "div r<RS>, r<RT>"
  766. *micromips32:
  767. *micromips64:
  768. {
  769. do_div (SD_, RS, RT);
  770. }
  771. 000000,5.RT,5.RS,1011101100,111100:POOL32A:32::DIVU
  772. "divu r<RS>, r<RT>"
  773. *micromips32:
  774. *micromips64:
  775. {
  776. do_divu (SD_, RS, RT);
  777. }
  778. 000000,00000000000001100000,000000:POOL32A:32::EHB
  779. "ehb"
  780. *micromips32:
  781. *micromips64:
  782. 000000,00000,5.RS,0101011101,111100:POOL32A:32::EI
  783. "ei":RS == 0
  784. "ei r<RS>"
  785. *micromips32:
  786. *micromips64:
  787. {
  788. do_ei (SD_, RS);
  789. }
  790. 000000,00000000001111001101,111100:POOL32A:32::ERET
  791. "eret"
  792. *micromips32:
  793. *micromips64:
  794. {
  795. if (SR & status_ERL)
  796. {
  797. /* Oops, not yet available */
  798. sim_io_printf (SD, "Warning: ERET when SR[ERL] set not supported");
  799. NIA = EPC;
  800. SR &= ~status_ERL;
  801. }
  802. else
  803. {
  804. NIA = EPC;
  805. SR &= ~status_EXL;
  806. }
  807. }
  808. 000000,5.RT,5.RS,5.MSBD,5.LSB,101100:POOL32A:32::EXT
  809. "ext r<RT>, r<RS>, <LSB>, <MSBD+1>"
  810. *micromips32:
  811. *micromips64:
  812. {
  813. do_ext (SD_, RT, RS, LSB, MSBD);
  814. }
  815. 000000,5.RT,5.RS,5.MSBD,5.LSB,001100:POOL32A:32::INS
  816. "ins r<RT>, r<RS>, <LSB>, <MSBD-LSB+1>"
  817. *micromips32:
  818. *micromips64:
  819. {
  820. do_ins (SD_, RT, RS, LSB, MSBD);
  821. }
  822. 110101,26.IMMEDIATE:MICROMIPS:32::J
  823. "j <IMM_SHIFT_1BIT>"
  824. *micromips32:
  825. *micromips64:
  826. {
  827. address_word region = (NIA & MASK (63, 27));
  828. NIA = delayslot_micromips (SD_, region | (IMM_SHIFT_1BIT), NIA,
  829. MICROMIPS_DELAYSLOT_SIZE_ANY);
  830. }
  831. 111101,26.IMMEDIATE:MICROMIPS:32::JAL
  832. "jal <IMM_SHIFT_1BIT>"
  833. *micromips32:
  834. *micromips64:
  835. {
  836. /* NOTE: The region used is that of the delay slot and NOT the
  837. current instruction */
  838. address_word region = (NIA & MASK (63, 27));
  839. NIA = do_micromips_jal (SD_, (region | (IMM_SHIFT_1BIT)), NIA,
  840. MICROMIPS_DELAYSLOT_SIZE_32);
  841. }
  842. 011101,26.IMMEDIATE:MICROMIPS:32::JALS
  843. "jals <IMM_SHIFT_1BIT>"
  844. *micromips32:
  845. *micromips64:
  846. {
  847. address_word region = (NIA & MASK (63, 27));
  848. NIA = do_micromips_jal (SD_, (region | (IMM_SHIFT_1BIT)), NIA,
  849. MICROMIPS_DELAYSLOT_SIZE_16);
  850. }
  851. 000000,5.RT!0,5.RS,0000111100,111100:POOL32A:32::JALR
  852. "jalr r<RS>":RT == 31
  853. "jalr r<RT>, r<RS>"
  854. *micromips32:
  855. *micromips64:
  856. {
  857. if (RS == RT)
  858. Unpredictable ();
  859. NIA = do_micromips_jalr (SD_, RT, RS, NIA, MICROMIPS_DELAYSLOT_SIZE_32);
  860. }
  861. 000000,5.RT,5.RS,0100111100,111100:POOL32A:32::JALRS
  862. "jalrs r<RT>, r<RS>"
  863. *micromips32:
  864. *micromips64:
  865. {
  866. if (RS == RT)
  867. Unpredictable ();
  868. NIA = do_micromips_jalr (SD_, RT, RS, NIA, MICROMIPS_DELAYSLOT_SIZE_16);
  869. }
  870. 111100,26.IMMEDIATE:MICROMIPS:32::JALX
  871. "jalx <IMM_SHIFT_2BIT>"
  872. *micromips32:
  873. *micromips64:
  874. {
  875. address_word region = (NIA & MASK (63, 26));
  876. NIA = do_micromips_jal (SD_, (region | (IMM_SHIFT_2BIT)) | ISA_MODE_MIPS32,
  877. NIA, MICROMIPS_DELAYSLOT_SIZE_32);
  878. SD->isa_mode = ISA_MODE_MIPS32;
  879. }
  880. 000000,00000,5.RS,0000111100,111100:POOL32A:32::JR
  881. "jr r<RS>"
  882. *micromips32:
  883. *micromips64:
  884. {
  885. NIA = process_isa_mode (SD_,
  886. delayslot_micromips (SD_, GPR[RS], NIA,
  887. MICROMIPS_DELAYSLOT_SIZE_32));
  888. }
  889. 000000,5.RT,5.RS,0001111100,111100:POOL32A:32::JALR.HB
  890. "jalr.hb r<RT>, r<RS>"
  891. *micromips32:
  892. *micromips64:
  893. {
  894. if (RS == RT)
  895. Unpredictable ();
  896. NIA = do_micromips_jalr (SD_, RT, RS, NIA, MICROMIPS_DELAYSLOT_SIZE_32);
  897. }
  898. 000000,5.RT,5.RS,0101111100,111100:POOL32A:32::JALRS.HB
  899. "jalrs.hb r<RT>, r<RS>"
  900. *micromips32:
  901. *micromips64:
  902. {
  903. if (RS == RT)
  904. Unpredictable ();
  905. NIA = do_micromips_jalr (SD_, RT, RS, NIA, MICROMIPS_DELAYSLOT_SIZE_16);
  906. }
  907. 000000,00000,5.RS,0111111100,111100:POOL32A:32::JR.HB
  908. "jr.hb r<RS>"
  909. *micromips32:
  910. *micromips64:
  911. {
  912. NIA = process_isa_mode (SD_,
  913. delayslot_micromips (SD_, GPR[RS], NIA,
  914. MICROMIPS_DELAYSLOT_SIZE_32));
  915. }
  916. 000111,5.RT,5.BASE,16.IMMEDIATE:MICROMIPS:32::LB
  917. "lb r<RT>, <IMMEDIATE>(r<BASE>)"
  918. *micromips32:
  919. *micromips64:
  920. {
  921. do_lb (SD_, RT, IMMEDIATE, BASE);
  922. }
  923. 011000,5.RT,5.BASE,0110100,9.IMMEDIATE:POOL32C:32::LBE
  924. "lbe r<RT>, <IMMEDIATE>(r<BASE>)"
  925. *micromips32:
  926. *micromips64:
  927. 000101,5.RT,5.BASE,16.IMMEDIATE:MICROMIPS:32::LBU
  928. "lbu r<RT>, <IMMEDIATE>(r<BASE>)"
  929. *micromips32:
  930. *micromips64:
  931. {
  932. do_lbu (SD_, RT, IMMEDIATE, BASE);
  933. }
  934. 011000,5.RT,5.BASE,0110000,9.IMMEDIATE:POOL32C:32::LBUE
  935. "lbue r<RT>, <IMMEDIATE>(r<BASE>)"
  936. *micromips32:
  937. *micromips64:
  938. 101111,5.FT,5.BASE,16.IMMEDIATE:MICROMIPS:32,f::LDC1a
  939. "ldc1 f<FT>, <IMMEDIATE>(r<BASE>)"
  940. *micromips32:
  941. {
  942. check_fpu (SD_);
  943. COP_LD (1, FT, do_load_double (SD_, GPR[BASE], EXTEND16 (IMMEDIATE)));
  944. }
  945. 101111,5.FT,5.BASE,16.IMMEDIATE:MICROMIPS:32,f::LDC1b
  946. "ldc1 f<FT>, <IMMEDIATE>(r<BASE>)"
  947. *micromips64:
  948. {
  949. check_fpu (SD_);
  950. COP_LD (1, FT, do_load (SD_, AccessLength_DOUBLEWORD, GPR[BASE],
  951. EXTEND16 (IMMEDIATE)));
  952. }
  953. 001000,5.RT,5.BASE,0010,12.IMMEDIATE:POOL32B:32::LDC2
  954. "ldc2 r<RT>, <IMMEDIATE>(r<BASE>)"
  955. *micromips32:
  956. *micromips64:
  957. 001111,5.RT,5.BASE,16.IMMEDIATE:MICROMIPS:32::LH
  958. "lh r<RT>, <IMMEDIATE>(r<BASE>)"
  959. *micromips32:
  960. *micromips64:
  961. {
  962. do_lh (SD_, RT, IMMEDIATE, BASE);
  963. }
  964. 011000,5.RT,5.BASE,0110101,9.IMMEDIATE:POOL32C:32::LHE
  965. "lhe r<RT>, <IMMEDIATE>(r<BASE>)"
  966. *micromips32:
  967. *micromips64:
  968. 001101,5.RT,5.BASE,16.IMMEDIATE:MICROMIPS:32::LHU
  969. "lhu r<RT>, <IMMEDIATE>(r<BASE>)"
  970. *micromips32:
  971. *micromips64:
  972. {
  973. do_lhu (SD_, RT, IMMEDIATE, BASE);
  974. }
  975. 011000,5.RT,5.BASE,0110001,9.IMMEDIATE:POOL32C:32::LHUE
  976. "lhue r<RT>, <IMMEDIATE>(r<BASE>)"
  977. *micromips32:
  978. *micromips64:
  979. 011000,5.RT,5.BASE,0011,12.IMMEDIATE:POOL32C:32::LL
  980. "ll r<RT>, <IMMEDIATE>(r<BASE>)"
  981. *micromips32:
  982. *micromips64:
  983. {
  984. do_ll (SD_, RT, EXTEND12 (IMMEDIATE), BASE);
  985. }
  986. 011000,5.RT,5.BASE,0110110,9.IMMEDIATE:POOL32C:32::LLE
  987. "lle r<RT>, <IMMEDIATE>(r<BASE>)"
  988. *micromips32:
  989. *micromips64:
  990. 010000,01101,5.RS,16.IMMEDIATE:POOL32I:32::LUI
  991. "lui r<RS>, <IMMEDIATE>"
  992. *micromips32:
  993. *micromips64:
  994. {
  995. do_lui (SD_, RS, IMMEDIATE);
  996. }
  997. 010101,5.INDEX,5.BASE,5.FD,00101,001000:POOL32F:32,f::LUXC1
  998. "luxc1 f<FD>, r<INDEX>(r<BASE>)"
  999. *micromips32:
  1000. {
  1001. do_luxc1_32 (SD_, FD, INDEX, BASE);
  1002. }
  1003. 010101,5.INDEX,5.BASE,5.FD,00101,001000:POOL32F:64,f::LUXC1
  1004. "luxc1 f<FD>, r<INDEX>(r<BASE>)"
  1005. *micromips64:
  1006. {
  1007. check_fpu (SD_);
  1008. check_u64 (SD_, instruction_0);
  1009. do_luxc1_64 (SD_, FD, INDEX, BASE);
  1010. }
  1011. 111111,5.RT,5.BASE,16.IMMEDIATE:MICROMIPS:32::LW
  1012. "lw r<RT>, <IMMEDIATE>(r<BASE>)"
  1013. *micromips32:
  1014. *micromips64:
  1015. {
  1016. do_lw (SD_, RT, IMMEDIATE, BASE);
  1017. }
  1018. 100111,5.FT,5.BASE,16.IMMEDIATE:MICROMIPS:32,f::LWC1
  1019. "lwc1 f<FT>, <IMMEDIATE>(r<BASE>)"
  1020. *micromips32:
  1021. *micromips64:
  1022. {
  1023. do_lwc1 (SD_, FT, IMMEDIATE, BASE);
  1024. }
  1025. 001000,5.RT,5.BASE,0000,12.IMMEDIATE:POOL32B:32::LWC2
  1026. "lwc2 r<RT>, <IMMEDIATE>(r<BASE>)"
  1027. *micromips32:
  1028. *micromips64:
  1029. 011000,5.RT,5.BASE,0110111,9.IMMEDIATE:POOL32C:32::LWE
  1030. "lwe r<RT>, <IMMEDIATE>(r<BASE>)"
  1031. *micromips32:
  1032. *micromips64:
  1033. 011000,5.RT,5.BASE,0110011,9.IMMEDIATE:POOL32C:32::LWEE
  1034. "lwee r<RT>, <IMMEDIATE>(r<BASE>)"
  1035. *micromips32:
  1036. *micromips64:
  1037. 011000,5.RT,5.BASE,0000,12.IMMEDIATE:POOL32C:32::LWL
  1038. "lwl r<RT>, <IMMEDIATE>(r<BASE>)"
  1039. *micromips32:
  1040. *micromips64:
  1041. {
  1042. do_lwl (SD_, RT, EXTEND12 (IMMEDIATE), BASE);
  1043. }
  1044. 011000,5.RT,5.BASE,0110010,9.IMMEDIATE:POOL32C:32::LWLE
  1045. "lwle r<RT>, <IMMEDIATE>(r<BASE>)"
  1046. *micromips32:
  1047. *micromips64:
  1048. :%s::::LWM32REGS:int lwmregs
  1049. *micromips32:
  1050. *micromips64:
  1051. {
  1052. if (lwmregs & 0x10)
  1053. {
  1054. switch(lwmregs & 0xf)
  1055. {
  1056. case 0:
  1057. return "ra";
  1058. case 1:
  1059. return "s0, ra";
  1060. case 2:
  1061. return "s0, s1, ra";
  1062. case 3:
  1063. return "s0, s1, s2, ra";
  1064. case 4:
  1065. return "s0, s1, s2, s3, ra";
  1066. case 5:
  1067. return "s0, s1, s2, s3, s4, ra";
  1068. case 6:
  1069. return "s0, s1, s2, s3, s4, s5, ra";
  1070. case 7:
  1071. return "s0, s1, s2, s3, s4, s5, s6, ra";
  1072. case 8:
  1073. return "s0, s1, s2, s3, s4, s5, s6, s7, ra";
  1074. case 9:
  1075. return "s0, s1, s2, s3, s4, s5, s6, s7, s8, ra";
  1076. default:
  1077. return "";
  1078. }
  1079. }
  1080. else
  1081. {
  1082. switch(lwmregs & 0xf)
  1083. {
  1084. case 1:
  1085. return "s0";
  1086. case 2:
  1087. return "s0, s1";
  1088. case 3:
  1089. return "s0, s1, s2";
  1090. case 4:
  1091. return "s0, s1, s2, s3";
  1092. case 5:
  1093. return "s0, s1, s2, s3, s4";
  1094. case 6:
  1095. return "s0, s1, s2, s3, s4, s5";
  1096. case 7:
  1097. return "s0, s1, s2, s3, s4, s5, s6";
  1098. case 8:
  1099. return "s0, s1, s2, s3, s4, s5, s6, s7";
  1100. case 9:
  1101. return "s0, s1, s2, s3, s4, s5, s6, s7, s8";
  1102. default:
  1103. return "";
  1104. }
  1105. }
  1106. }
  1107. 001000,5.LWM32REGS,5.BASE,0101,12.IMMEDIATE:POOL32B:32::LWM32
  1108. "lwm32 %s<LWM32REGS>, <IMMEDIATE>(r<BASE>)"
  1109. *micromips32:
  1110. *micromips64:
  1111. {
  1112. int address_base = GPR[BASE] + EXTEND12 (IMMEDIATE);
  1113. int reg_offset;
  1114. for (reg_offset = 0; reg_offset < (LWM32REGS & 0xf); reg_offset++)
  1115. {
  1116. int dst = (reg_offset == 8) ? 30 : 16 + reg_offset;
  1117. GPR[dst] = EXTEND32 (do_load (SD_, AccessLength_WORD, address_base,
  1118. 4 * reg_offset));
  1119. }
  1120. if (LWM32REGS & 0x10)
  1121. RA = EXTEND32 (do_load (SD_, AccessLength_WORD, address_base,
  1122. 4 * reg_offset));
  1123. }
  1124. 001000,5.RD,5.BASE,0001,12.IMMEDIATE:POOL32B:32::LWP
  1125. "lwp r<RD>, <IMMEDIATE>(r<BASE>)"
  1126. *micromips32:
  1127. *micromips64:
  1128. {
  1129. if (BASE == RD || RD == 31)
  1130. Unpredictable ();
  1131. else
  1132. {
  1133. do_lw (SD_, RD, EXTEND12 (IMMEDIATE), BASE);
  1134. do_lw (SD_, RD + 1, EXTEND12 (IMMEDIATE) + 4, BASE);
  1135. }
  1136. }
  1137. 011000,5.RT,5.BASE,0001,12.IMMEDIATE:POOL32C:32::LWR
  1138. "lwr r<RT>, <IMMEDIATE>(r<BASE>)"
  1139. *micromips32:
  1140. *micromips64:
  1141. {
  1142. do_lwr (SD_, RT, EXTEND12 (IMMEDIATE), BASE);
  1143. }
  1144. 011000,5.RT,5.BASE,1110,12.IMMEDIATE:POOL32C:32::LWU
  1145. "lwu r<RT>, <IMMEDIATE>(r<BASE>)"
  1146. *micromips32:
  1147. *micromips64:
  1148. {
  1149. do_lwu (SD_, RT, IMMEDIATE, BASE, instruction_0);
  1150. }
  1151. 010101,5.INDEX,5.BASE,5.FD,00001,001000:POOL32F:32,f::LWXC1
  1152. "lwxc1 f<FD>, <INDEX>(r<BASE>)"
  1153. *micromips32:
  1154. *micromips64:
  1155. {
  1156. do_lwxc1 (SD_, FD, INDEX, BASE, instruction_0);
  1157. }
  1158. 000000,5.INDEX,5.BASE,5.RD,00100,011000:POOL32A:32::LWXS
  1159. "lwxs r<RD>, r<INDEX>(r<BASE>)"
  1160. *micromips32:
  1161. *micromips64:
  1162. {
  1163. GPR[RD] = EXTEND32 (do_load (SD_, AccessLength_WORD, GPR[BASE],
  1164. GPR[INDEX] * 4));
  1165. }
  1166. 000000,5.RT,5.RS,1100101100,111100:POOL32A:32::MADD
  1167. "madd r<RS>, r<RT>"
  1168. *micromips32:
  1169. *micromips64:
  1170. {
  1171. do_madd (SD_, RS, RT);
  1172. }
  1173. 000000,5.RT,5.RS,1101101100,111100:POOL32A:32::MADDU
  1174. "maddu r<RS>, r<RT>"
  1175. *micromips32:
  1176. *micromips64:
  1177. {
  1178. do_maddu (SD_, RS, RT);
  1179. }
  1180. 000000,5.RT,5.RS,00,3.SEL,00011,111100:POOL32A:32::MFC0
  1181. "mfc0 r<RS>, r<RT>": SEL == 0
  1182. "mfc0 r<RS>, r<RT>, <SEL>"
  1183. *micromips32:
  1184. *micromips64:
  1185. {
  1186. DecodeCoproc (instruction_0, 0, cp0_mfc0, RT, RS, SEL);
  1187. }
  1188. 010101,5.RT,5.FS,0010000000,111011:POOL32F:32,f::MFC1
  1189. "mfc1 r<RT>, f<FS>"
  1190. *micromips32:
  1191. *micromips64:
  1192. {
  1193. do_mfc1b (SD_, RT, FS);
  1194. }
  1195. 000000,5.RT,5.IMPL,0100110100,111100:POOL32A:32::MFC2
  1196. "mfc2 r<RT>, <IMPL>"
  1197. *micromips32:
  1198. *micromips64:
  1199. 010101,5.RT,5.FS,0011000000,111011:POOL32F:32,f::MFHC1
  1200. "mfhc1 r<RT>, f<FS>"
  1201. *micromips32:
  1202. *micromips64:
  1203. {
  1204. do_mfhc1 (SD_, RT, FS);
  1205. }
  1206. 000000,5.RT,5.IMPL,1000110100,111100:POOL32A:32::MFHC2
  1207. "mfhc2 r<RT>, <IMPL>"
  1208. *micromips32:
  1209. *micromips64:
  1210. 000000,00000,5.RS,0000110101,111100:POOL32A:32::MFHI
  1211. "mfhi r<RS>"
  1212. *micromips32:
  1213. *micromips64:
  1214. {
  1215. do_mfhi (SD_, RS);
  1216. }
  1217. 000000,00000,5.RS,0001110101,111100:POOL32A:32::MFLO
  1218. "mflo r<RS>"
  1219. *micromips32:
  1220. *micromips64:
  1221. {
  1222. do_mflo (SD_, RS);
  1223. }
  1224. // MOVF
  1225. // MOVT
  1226. 010101,5.RT,5.RS,3.CC,0,1.TF,00101,111011:POOL32F:32::MOVtf
  1227. "mov%s<TF> r<RT>, r<RS>, CC"
  1228. *micromips32:
  1229. *micromips64:
  1230. {
  1231. do_movtf (SD_, TF, RT, RS, CC);
  1232. }
  1233. 000000,5.RT,5.RS,5.RD,00000,011000:POOL32A:32::MOVN
  1234. "movn r<RD>, r<RS>, r<RT>"
  1235. *micromips32:
  1236. *micromips64:
  1237. {
  1238. do_movn (SD_, RD, RS, RT);
  1239. }
  1240. 000000,5.RT,5.RS,5.RD,00001,011000:POOL32A:32::MOVZ
  1241. "movz r<RD>, r<RS>, r<RT>"
  1242. *micromips32:
  1243. *micromips64:
  1244. {
  1245. do_movz (SD_, RD, RS, RT);
  1246. }
  1247. 000000,5.RT,5.RS,1110101100,111100:POOL32A:32::MSUB
  1248. "msub r<RS>, r<RT>"
  1249. *micromips32:
  1250. *micromips64:
  1251. {
  1252. do_msub (SD_, RS, RT);
  1253. }
  1254. 000000,5.RT,5.RS,1111101100,111100:POOL32A:32::MSUBU
  1255. "msubu r<RS>, r<RT>"
  1256. *micromips32:
  1257. *micromips64:
  1258. {
  1259. do_msubu (SD_, RS, RT);
  1260. }
  1261. 000000,5.RT,5.RS,00,3.SEL,01011,111100:POOL32A:32::MTC0
  1262. "mtc0 r<RS>, r<RT>": SEL == 0
  1263. "mtc0 r<RS>, r<RT>, <SEL>"
  1264. *micromips32:
  1265. *micromips64:
  1266. {
  1267. DecodeCoproc (instruction_0, 0, cp0_mtc0, RT, RS, SEL);
  1268. }
  1269. 010101,5.RT,5.FS,0010100000,111011:POOL32F:32,f::MTC1
  1270. "mtc1 r<RT>, f<FS>"
  1271. *micromips32:
  1272. *micromips64:
  1273. {
  1274. do_mtc1b (SD_, RT, FS);
  1275. }
  1276. 000000,5.RT,5.IMPL,0101110100,111100:POOL32A:32::MTC2
  1277. "mtc2 r<RT>, <IMPL>"
  1278. *micromips32:
  1279. *micromips64:
  1280. 010101,5.RT,5.FS,0011100000,111011:POOL32F:32,f::MTHC1
  1281. "mthc1 r<RT>, f<FS>"
  1282. *micromips32:
  1283. *micromips64:
  1284. {
  1285. do_mthc1 (SD_, RT, FS);
  1286. }
  1287. 000000,5.RT,5.IMPL,1001110100,111100:POOL32A:32::MTHC2
  1288. "mthc2 r<RT>, <IMPL>"
  1289. *micromips32:
  1290. *micromips64:
  1291. 000000,00000,5.RS,0010110101,111100:POOL32A:32::MTHI
  1292. "mthi r<RS>"
  1293. *micromips32:
  1294. *micromips64:
  1295. {
  1296. do_mthi (SD_, RS);
  1297. }
  1298. 000000,00000,5.RS,0011110101,111100:POOL32A:32::MTLO
  1299. "mtlo r<RS>"
  1300. *micromips32:
  1301. *micromips64:
  1302. {
  1303. do_mtlo (SD_, RS);
  1304. }
  1305. 000000,5.RT,5.RS,5.RD,01000,010000:POOL32A:32::MUL
  1306. "mul r<RD>, r<RS>, r<RT>"
  1307. *micromips32:
  1308. *micromips64:
  1309. {
  1310. do_mul (SD_, RD, RS, RT);
  1311. }
  1312. 000000,5.RT,5.RS,1000101100,111100:POOL32A:32::MULT
  1313. "mult r<RS>, r<RT>"
  1314. *micromips32:
  1315. *micromips64:
  1316. {
  1317. do_mult (SD_, RS, RT, 0);
  1318. }
  1319. 000000,5.RT,5.RS,1001101100,111100:POOL32A:32::MULTU
  1320. "multu r<RS> r<RT>"
  1321. *micromips32:
  1322. *micromips64:
  1323. {
  1324. do_multu (SD_, RS, RT, 0);
  1325. }
  1326. 000000,00000000000000000000,000000:POOL32A:32::NOP
  1327. "nop"
  1328. *micromips32:
  1329. *micromips64:
  1330. {
  1331. }
  1332. 000000,5.RT,5.RS,5.RD,01011,010000:POOL32A:32::NOR
  1333. "nor r<RD>, r<RS>, r<RT>"
  1334. *micromips32:
  1335. *micromips64:
  1336. {
  1337. do_nor (SD_, RS, RT, RD);
  1338. }
  1339. 000000,5.RT,5.RS,5.RD,01010,010000:POOL32A:32::OR
  1340. "or r<RD>, r<RS>, r<RT>"
  1341. *micromips32:
  1342. *micromips64:
  1343. {
  1344. do_or (SD_, RS, RT, RD);
  1345. }
  1346. 010100,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:32::ORI
  1347. "ori r<RT>, r<RS>, <IMMEDIATE>"
  1348. *micromips32:
  1349. *micromips64:
  1350. {
  1351. do_ori (SD_, RS, RT, IMMEDIATE);
  1352. }
  1353. 000000,00000000000010100000,000000:POOL32A:32::PAUSE
  1354. "pause"
  1355. *micromips32:
  1356. *micromips64:
  1357. 011000,5.HINT,5.BASE,0010,12.IMMEDIATE:POOL32C:32::PREF
  1358. "pref <HINT>, <IMMEDIATE>(r<BASE>)"
  1359. *micromips32:
  1360. *micromips64:
  1361. {
  1362. do_pref (SD_, HINT, EXTEND12 (IMMEDIATE), BASE);
  1363. }
  1364. 011000,5.HINT,5.BASE,1010010,9.IMMEDIATE:POOL32C:32::PREFE
  1365. "prefe <HINT>, <IMMEDIATE>(r<BASE>)"
  1366. *micromips32:
  1367. *micromips64:
  1368. 010101,5.INDEX,5.BASE,5.HINT,00110,100000:POOL32F:32::PREFX
  1369. "prefx <HINT>, r<INDEX>(r<BASE>)"
  1370. *micromips32:
  1371. *micromips64:
  1372. {
  1373. do_prefx (SD_, HINT, INDEX, BASE);
  1374. }
  1375. 000000,5.RT,5.RS,0110101100,111100:POOL32A:32::RDHWR
  1376. "rdhwr r<RS>, r<RT>"
  1377. *micromips32:
  1378. *micromips64:
  1379. {
  1380. do_rdhwr (SD_, RT, RS);
  1381. }
  1382. 000000,5.RT,5.RS,1110000101,111100:POOL32A:32::RDPGPR
  1383. "rdpgpr r<RS>, r<RT>"
  1384. *micromips32:
  1385. *micromips64:
  1386. 000000,5.RT,5.RS,5.SHIFT,00011,000000:POOL32A:32::ROTR
  1387. "rotr r<RT>, r<RS>, <SHIFT>"
  1388. *micromips32:
  1389. *micromips64:
  1390. {
  1391. GPR[RT] = do_ror (SD_, GPR[RS], SHIFT);
  1392. }
  1393. 000000,5.RT,5.RS,5.RD,00011,010000:POOL32A:32::ROTRV
  1394. "rotrv r<RD>, r<RT>, r<RS>"
  1395. *micromips32:
  1396. *micromips64:
  1397. {
  1398. GPR[RD] = do_ror (SD_, GPR[RT], GPR[RS]);
  1399. }
  1400. 000110,5.RT,5.BASE,16.IMMEDIATE:MICROMIPS:32::SB
  1401. "sb r<RT>, <IMMEDIATE>(r<BASE>)"
  1402. *micromips32:
  1403. *micromips64:
  1404. {
  1405. do_store (SD_, AccessLength_BYTE, GPR[BASE], EXTEND16 (IMMEDIATE), GPR[RT]);
  1406. }
  1407. 011000,5.RT,5.BASE,1010101,9.IMMEDIATE:POOL32C:32::SBE
  1408. "sbe r<RT>, <IMMEDIATE>(r<BASE>)"
  1409. *micromips32:
  1410. *micromips64:
  1411. 011000,5.RT,5.BASE,1011,12.IMMEDIATE:POOL32C:32::SC
  1412. "sc r<RT>, <IMMEDIATE>(r<BASE>)"
  1413. *micromips32:
  1414. *micromips64:
  1415. {
  1416. do_sc (SD_, RT, EXTEND12 (IMMEDIATE), BASE, instruction_0);
  1417. }
  1418. 011000,5.RT,5.BASE,1010110,9.IMMEDIATE:POOL32C:32::SCE
  1419. "sce r<RT>, <IMMEDIATE>(r<BASE>)"
  1420. *micromips32:
  1421. *micromips64:
  1422. 000000,10.CODE,1101101101,111100:POOL32A:32::SDBBP
  1423. "sdbbp %#lx<CODE>"
  1424. *micromips32:
  1425. *micromips64:
  1426. {
  1427. SignalException (DebugBreakPoint, instruction_0);
  1428. }
  1429. 101110,5.FT,5.BASE,16.IMMEDIATE:MICROMIPS:32,f::SDC1a
  1430. "sdc1 f<FT>, <IMMEDIATE>(r<BASE>)"
  1431. *micromips32:
  1432. {
  1433. do_sdc1 (SD_, FT, IMMEDIATE, BASE);
  1434. }
  1435. 101110,5.FT,5.BASE,16.IMMEDIATE:MICROMIPS:32,f::SDC1b
  1436. "sdc1 f<FT>, <IMMEDIATE>(r<BASE>)"
  1437. *micromips64:
  1438. {
  1439. check_fpu (SD_);
  1440. do_store (SD_, AccessLength_DOUBLEWORD, GPR[BASE], EXTEND16 (IMMEDIATE),
  1441. COP_SD (1, FT));
  1442. }
  1443. 001000,5.RT,5.BASE,1010,12.IMMEDIATE:MICROMIPS:32::SDC2
  1444. "sdc2 r<RT>, <IMMEDIATE>(r<BASE>)"
  1445. *micromips32:
  1446. *micromips64:
  1447. 000000,5.RT,5.RS,0010101100,111100:POOL32A:32::SEB
  1448. "seb r<RT>, r<RS>"
  1449. *micromips32:
  1450. *micromips64:
  1451. {
  1452. do_seb (SD_, RT, RS);
  1453. }
  1454. 000000,5.RT,5.RS,0011101100,111100:POOL32A:32::SEH
  1455. "seh r<RT>, r<RS>"
  1456. *micromips32:
  1457. *micromips64:
  1458. {
  1459. do_seh (SD_, RT, RS);
  1460. }
  1461. 001110,5.RT,5.BASE,16.IMMEDIATE:MICROMIPS:32::SH
  1462. "sh r<RT>, <IMMEDIATE>(r<BASE>)"
  1463. *micromips32:
  1464. *micromips64:
  1465. {
  1466. do_store (SD_, AccessLength_HALFWORD, GPR[BASE], EXTEND16 (IMMEDIATE),
  1467. GPR[RT]);
  1468. }
  1469. 011000,5.RT,5.BASE,1010100,9.IMMEDIATE:POOL32C:32::SHE
  1470. "she r<RT>, <IMMEDIATE>(r<BASE>)"
  1471. *micromips32:
  1472. *micromips64:
  1473. 000000,5.RT!0,5.RS!0,5.SHIFT,00000,000000:POOL32A:32::SLL
  1474. "sll r<RT>, r<RS>, <SHIFT>"
  1475. *micromips32:
  1476. *micromips64:
  1477. {
  1478. do_sll (SD_, RS, RT, SHIFT);
  1479. }
  1480. 000000,5.RT,5.RS,5.RD,00000,010000:POOL32A:32::SLLV
  1481. "sllv r<RD>, r<RT>, r<RS>"
  1482. *micromips32:
  1483. *micromips64:
  1484. {
  1485. do_sllv (SD_, RS, RT, RD);
  1486. }
  1487. 000000,5.RT,5.RS,5.RD,01101,010000:POOL32A:32::SLT
  1488. "slt r<RD>, r<RS>, r<RT>"
  1489. *micromips32:
  1490. *micromips64:
  1491. {
  1492. do_slt (SD_, RS, RT, RD);
  1493. }
  1494. 100100,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:32::SLTI
  1495. "slti r<RT>, r<RS>, <IMMEDIATE>"
  1496. *micromips32:
  1497. *micromips64:
  1498. {
  1499. do_slti (SD_, RS, RT, IMMEDIATE);
  1500. }
  1501. 101100,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:32::SLTIU
  1502. "sltiu r<RT>, r<RS>, <IMMEDIATE>"
  1503. *micromips32:
  1504. *micromips64:
  1505. {
  1506. do_sltiu (SD_, RS, RT, IMMEDIATE);
  1507. }
  1508. 000000,5.RT,5.RS,5.RD,01110,010000:POOL32A:32::SLTU
  1509. "sltu r<RD>, r<RS>, r<RT>"
  1510. *micromips32:
  1511. *micromips64:
  1512. {
  1513. do_sltu (SD_, RS, RT, RD);
  1514. }
  1515. 000000,5.RT,5.RS,5.SHIFT,00010,000000:POOL32A:32::SRA
  1516. "sra r<RT>, r<RS>, <SHIFT>"
  1517. *micromips32:
  1518. *micromips64:
  1519. {
  1520. do_sra (SD_, RS, RT, SHIFT);
  1521. }
  1522. 000000,5.RT,5.RS,5.RD,00010,010000:POOL32A:32::SRAV
  1523. "srav r<RD>, r<RT>, r<RS>"
  1524. *micromips32:
  1525. *micromips64:
  1526. {
  1527. do_srav (SD_, RS, RT, RD);
  1528. }
  1529. 000000,5.RT,5.RS,5.SHIFT,00001,000000:POOL32A:32::SRL
  1530. "srl r<RT>, r<RS>, <SHIFT>"
  1531. *micromips32:
  1532. *micromips64:
  1533. {
  1534. do_srl (SD_, RS, RT, SHIFT);
  1535. }
  1536. 000000,5.RT,5.RS,5.RD,00001,010000:POOL32A:32::SRLV
  1537. "srlv r<RD>, r<RT>, r<RS>"
  1538. *micromips32:
  1539. *micromips64:
  1540. {
  1541. do_srlv (SD_, RS, RT, RD);
  1542. }
  1543. 000000,00000000000000100000,000000:POOL32A:32::SSNOP
  1544. "ssnop"
  1545. *micromips32:
  1546. *micromips64:
  1547. {
  1548. }
  1549. 000000,5.RT,5.RS,5.RD,00110,010000:POOL32A:32::SUB
  1550. "sub r<RD>, r<RS>, r<RT>"
  1551. *micromips32:
  1552. *micromips64:
  1553. {
  1554. do_sub (SD_, RD, RS, RT);
  1555. }
  1556. 000000,5.RT,5.RS,5.RD,00111,010000:POOL32A:32::SUBU
  1557. "subu r<RD>, r<RS>, r<RT>"
  1558. *micromips32:
  1559. *micromips64:
  1560. {
  1561. do_subu (SD_, RS, RT, RD);
  1562. }
  1563. 010101,5.INDEX,5.BASE,5.FD,00110,001000:POOL32F:32,f::SUXC1
  1564. "suxc1 f<FD>, r<INDEX>(r<BASE>)"
  1565. *micromips32:
  1566. {
  1567. do_suxc1_32 (SD_, FD, INDEX, BASE);
  1568. }
  1569. 010101,5.INDEX,5.BASE,5.FD,00110,001000:POOL32F:64,f::SUXC1
  1570. "suxc1 f<FD>, r<INDEX>(r<BASE>)"
  1571. *micromips64:
  1572. {
  1573. check_fpu (SD_);
  1574. check_u64 (SD_, instruction_0);
  1575. do_suxc1_64 (SD_, FD, INDEX, BASE);
  1576. }
  1577. 111110,5.RT,5.BASE,16.IMMEDIATE:MICROMIPS:32::SW
  1578. "sw r<RT>, <IMMEDIATE>(r<BASE>)"
  1579. *micromips32:
  1580. *micromips64:
  1581. {
  1582. do_store (SD_, AccessLength_WORD, GPR[BASE], EXTEND16 (IMMEDIATE), GPR[RT]);
  1583. }
  1584. 100110,5.FT,5.BASE,16.IMMEDIATE:MICROMIPS:32,f::SWC1
  1585. "swc1 f<FT>, <IMMEDIATE>(r<BASE>)"
  1586. *micromips32:
  1587. *micromips64:
  1588. {
  1589. do_swc1 (SD_, FT, IMMEDIATE, BASE, instruction_0);
  1590. }
  1591. 001000,5.RT,5.BASE,1000,12.IMMEDIATE:POOL32B:32::SWC2
  1592. "swc2 r<RT>, <IMMEDIATE>(r<BASE>)"
  1593. *micromips32:
  1594. *micromips64:
  1595. 011000,5.RT,5.BASE,1010111,9.IMMEDIATE:POOL32C:32::SWE
  1596. "swe r<RT>, <IMMEDIATE>(r<BASE>)"
  1597. *micromips32:
  1598. *micromips64:
  1599. 011000,5.RT,5.BASE,1000,12.IMMEDIATE:POOL32C:32::SWL
  1600. "swl r<RT>, <IMMEDIATE>(r<BASE>)"
  1601. *micromips32:
  1602. *micromips64:
  1603. {
  1604. do_store_left (SD_, AccessLength_WORD, GPR[BASE], EXTEND12 (IMMEDIATE),
  1605. GPR[RT]);
  1606. }
  1607. 011000,5.RT,5.BASE,1010000,9.IMMEDIATE:POOL32C:32::SWLE
  1608. "swle r<RT>, <IMMEDIATE>(r<BASE>)"
  1609. *micromips32:
  1610. *micromips64:
  1611. 001000,5.LWM32REGS,5.BASE,1101,12.IMMEDIATE:POOL32B:32::SWM32
  1612. "swm32 %s<LWM32REGS>, <IMMEDIATE>(r<BASE>)"
  1613. *micromips32:
  1614. *micromips64:
  1615. {
  1616. int address_base = GPR[BASE] + EXTEND12 (IMMEDIATE);
  1617. int reg_offset;
  1618. for (reg_offset = 0; reg_offset < (LWM32REGS & 0xf); reg_offset++)
  1619. {
  1620. int src = (reg_offset == 8) ? 30 : 16 + reg_offset;
  1621. do_store (SD_, AccessLength_WORD, address_base, 4 * reg_offset,
  1622. GPR[src]);
  1623. }
  1624. if (LWM32REGS & 0x10)
  1625. do_store (SD_, AccessLength_WORD, address_base, 4 * reg_offset, RA);
  1626. }
  1627. 001000,5.RS1,5.BASE,1001,12.IMMEDIATE:POOL32B:32::SWP
  1628. "swp r<RS1>, <IMMEDIATE>(r<BASE>)"
  1629. *micromips32:
  1630. *micromips64:
  1631. {
  1632. if (RS1 == 31)
  1633. Unpredictable ();
  1634. else
  1635. {
  1636. do_sw (SD_, RS1, EXTEND12 (IMMEDIATE), BASE);
  1637. do_sw (SD_, RS1 + 1, EXTEND12 (IMMEDIATE) + 4, BASE);
  1638. }
  1639. }
  1640. 011000,5.RT,5.BASE,1001,12.IMMEDIATE:POOL32C:32::SWR
  1641. "swr r<RT>, <IMMEDIATE>(r<BASE>)"
  1642. *micromips32:
  1643. *micromips64:
  1644. {
  1645. do_store_right (SD_, AccessLength_WORD, GPR[BASE], EXTEND12 (IMMEDIATE),
  1646. GPR[RT]);
  1647. }
  1648. 011000,5.RT,5.BASE,1010001,9.IMMEDIATE:POOL32C:32::SWRE
  1649. "swre r<RT>, <IMMEDIATE>(r<BASE>)"
  1650. *micromips32:
  1651. *micromips64:
  1652. 010101,5.INDEX,5.BASE,5.FD,00010,001000:POOL32F:32,f::SWXC1
  1653. "swxc1 f<FD>, r<INDEX>(r<BASE>)"
  1654. *micromips32:
  1655. *micromips64:
  1656. {
  1657. do_swxc1 (SD_, FD, INDEX, BASE, instruction_0);
  1658. }
  1659. 000000,00000,5.STYPE,0110101101,111100:POOL32A:32::SYNC
  1660. "sync <STYPE>"
  1661. *micromips32:
  1662. *micromips64:
  1663. {
  1664. SyncOperation (STYPE);
  1665. }
  1666. 010000,10000,5.BASE,16.IMMEDIATE:POOL32I:32::SYNCI
  1667. "synci <IMMEDIATE>(r<BASE>)"
  1668. *micromips32:
  1669. *micromips64:
  1670. {
  1671. }
  1672. 000000,10.CODE,1000101101,111100:POOL32A:32::SYSCALL
  1673. "syscall %#lx<CODE>"
  1674. *micromips32:
  1675. *micromips64:
  1676. {
  1677. SignalException (SystemCall, instruction_0);
  1678. }
  1679. 000000,5.RT,5.RS,4.CODE,000000,111100:POOL32A:32::TEQ
  1680. "teq r<RS>, r<RT>"
  1681. *micromips32:
  1682. *micromips64:
  1683. {
  1684. do_teq (SD_, RS, RT, instruction_0);
  1685. }
  1686. 010000,01110,5.RS,16.IMMEDIATE:POOL32I:32::TEQI
  1687. "teqi r<RS>, <IMMEDIATE>"
  1688. *micromips32:
  1689. *micromips64:
  1690. {
  1691. do_teqi (SD_, RS, IMMEDIATE, instruction_0);
  1692. }
  1693. 000000,5.RT,5.RS,4.CODE,001000,111100:POOL32A:32::TGE
  1694. "tge r<RS>, r<RT>"
  1695. *micromips32:
  1696. *micromips64:
  1697. {
  1698. do_tge (SD_, RS, RT, instruction_0);
  1699. }
  1700. 010000,01001,5.RS,16.IMMEDIATE:POOL32I:32::TGEI
  1701. "tgei r<RS>, <IMMEDIATE>"
  1702. *micromips32:
  1703. *micromips64:
  1704. {
  1705. do_tgei (SD_, RS, IMMEDIATE, instruction_0);
  1706. }
  1707. 010000,01011,5.RS,16.IMMEDIATE:POOL32I:32::TGEIU
  1708. "tgeiu r<RS>, <IMMEDIATE>"
  1709. *micromips32:
  1710. *micromips64:
  1711. {
  1712. do_tgeiu (SD_, RS, IMMEDIATE, instruction_0);
  1713. }
  1714. 000000,5.RT,5.RS,4.CODE,010000,111100:POOL32A:32::TGEU
  1715. "tgeu r<RS>, r<RT>"
  1716. *micromips32:
  1717. *micromips64:
  1718. {
  1719. do_tgeu (SD_, RS, RT, instruction_0);
  1720. }
  1721. 000000,00000000000000001101,111100:POOL32A:32::TLBP
  1722. "tlbp"
  1723. *micromips32:
  1724. *micromips64:
  1725. 000000,00000000000001001101,111100:POOL32A:32::TLBR
  1726. "tlbr"
  1727. *micromips32:
  1728. *micromips64:
  1729. 000000,00000000000010001101,111100:POOL32A:32::TLBWI
  1730. "tlbwi"
  1731. *micromips32:
  1732. *micromips64:
  1733. 000000,00000000000011001101,111100:POOL32A:32::TLBWR
  1734. "tlbwr"
  1735. *micromips32:
  1736. *micromips64:
  1737. 000000,5.RT,5.RS,4.CODE,100000,111100:POOL32A:32::TLT
  1738. "tlt r<RS>, r<RT>, %#lx<CODE>"
  1739. *micromips32:
  1740. *micromips64:
  1741. {
  1742. do_tlt (SD_, RS, RT, instruction_0);
  1743. }
  1744. 010000,01000,5.RS,16.IMMEDIATE:POOL32I:32::TLTI
  1745. "tlti r<RS>, <IMMEDIATE>"
  1746. *micromips32:
  1747. *micromips64:
  1748. {
  1749. do_tlti (SD_, RS, IMMEDIATE, instruction_0);
  1750. }
  1751. 010000,01010,5.RS,16.IMMEDIATE:POOL32I:32::TLTIU
  1752. "tltiu r<RS>, <IMMEDIATE>"
  1753. *micromips32:
  1754. *micromips64:
  1755. {
  1756. do_tltiu (SD_, RS, IMMEDIATE, instruction_0);
  1757. }
  1758. 000000,5.RT,5.RS,4.CODE,101000,111100:POOL32A:32::TLTU
  1759. "tltu r<RS>, r<RT>"
  1760. *micromips32:
  1761. *micromips64:
  1762. {
  1763. do_tltu (SD_, RS, RT, instruction_0);
  1764. }
  1765. 000000,5.RT,5.RS,4.CODE,110000,111100:POOL32A:32::TNE
  1766. "tne r<RS>, r<RT>"
  1767. *micromips32:
  1768. *micromips64:
  1769. {
  1770. do_tne (SD_, RS, RT, instruction_0);
  1771. }
  1772. 010000,01100,5.RS,16.IMMEDIATE:POOL32I:32::TNEI
  1773. "tnei r<RS>, <IMMEDIATE>"
  1774. *micromips32:
  1775. *micromips64:
  1776. {
  1777. do_tnei (SD_, RS, IMMEDIATE, instruction_0);
  1778. }
  1779. 000000,10.CODE,1001001101,111100:POOL32A:32::WAIT
  1780. "wait"
  1781. *micromips32:
  1782. *micromips64:
  1783. 000000,5.RT,5.RS,1111000101,111100:POOL32A:32::WRPGPR
  1784. "wrpgpr r<RS>, r<RT>"
  1785. *micromips32:
  1786. *micromips64:
  1787. 000000,5.RT,5.RS,0111101100,111100:POOL32A:32::WSBH
  1788. "wsbh r<RT>, r<RS>"
  1789. *micromips32:
  1790. *micromips64:
  1791. {
  1792. do_wsbh (SD_, RT, RS);
  1793. }
  1794. 000000,5.RT,5.RS,5.RD,01100,010000:POOL32A:32::XOR
  1795. "xor r<RD>, r<RS>, r<RT>"
  1796. *micromips32:
  1797. *micromips64:
  1798. {
  1799. do_xor (SD_, RS, RT, RD);
  1800. }
  1801. 011100,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:32::XORI
  1802. "xori r<RT>, r<RS>, <IMMEDIATE>"
  1803. *micromips32:
  1804. *micromips64:
  1805. {
  1806. do_xori (SD_, RS, RT, IMMEDIATE);
  1807. }
  1808. :%s::::FMT_MICROMIPS:int fmt
  1809. {
  1810. switch (fmt)
  1811. {
  1812. case 0: return "s";
  1813. case 1: return "d";
  1814. case 2: return "ps";
  1815. default: return "?";
  1816. }
  1817. }
  1818. :%s::::FMT_MICROMIPS_CVT_D:int fmt
  1819. {
  1820. switch (fmt)
  1821. {
  1822. case 0: return "s";
  1823. case 1: return "w";
  1824. case 2: return "l";
  1825. default: return "?";
  1826. }
  1827. }
  1828. :%s::::FMT_MICROMIPS_CVT_S:int fmt
  1829. {
  1830. switch (fmt)
  1831. {
  1832. case 0: return "d";
  1833. case 1: return "w";
  1834. case 2: return "l";
  1835. default: return "?";
  1836. }
  1837. }
  1838. 010101,5.FT,5.FS,0,2.FMT_MICROMIPS!3,0001101,111011:POOL32F:32,f::ABS.fmt
  1839. "abs.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  1840. *micromips32:
  1841. *micromips64:
  1842. {
  1843. do_abs_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FT, FS,
  1844. instruction_0);
  1845. }
  1846. 010101,5.FT,5.FS,5.FD,0,2.FMT_MICROMIPS!3,00,110000:POOL32F:32,f::ADD.fmt
  1847. "add.%s<FMT_MICROMIPS> f<FD>, f<FS>, f<FT>"
  1848. *micromips32:
  1849. *micromips64:
  1850. {
  1851. do_add_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FD, FS, FT,
  1852. instruction_0);
  1853. }
  1854. 010101,5.FT,5.FS,5.FD,5.RS,011001:POOL32F:32,f::ALNV.PS
  1855. "alnv.ps f<FD>, f<FS>, f<FT>, r<RS>"
  1856. *micromips32:
  1857. *micromips64:
  1858. {
  1859. do_alnv_ps (SD_, FD, FS, FT, RS, instruction_0);
  1860. }
  1861. 010101,5.FT,5.FS,3.CC,0,2.FMT_MICROMIPS!3,4.COND,111100:POOL32F:32,f::C.cond.fmt
  1862. "c.%s<COND>.%s<FMT_MICROMIPS> f<FS>, f<FT>":CC == 0
  1863. "c.%s<COND>.%s<FMT_MICROMIPS> <CC>, f<FS>, f<FT>"
  1864. *micromips32:
  1865. *micromips64:
  1866. {
  1867. do_c_cond_fmt (SD_, COND, convert_fmt_micromips (SD_, FMT_MICROMIPS), CC,
  1868. FS, FT, instruction_0);
  1869. }
  1870. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,01001100,111011:POOL32F:32,f::CEIL.L.fmt
  1871. "ceil.l.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  1872. *micromips32:
  1873. *micromips64:
  1874. {
  1875. do_ceil_fmt (SD_, fmt_long, FMT_MICROMIPS, FT, FS, instruction_0);
  1876. }
  1877. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,01101100,111011:POOL32F:32,f::CEIL.W.fmt
  1878. "ceil.w.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  1879. *micromips32:
  1880. *micromips64:
  1881. {
  1882. do_ceil_fmt (SD_, fmt_word, FMT_MICROMIPS, FT, FS, instruction_0);
  1883. }
  1884. 010101,5.FT,5.FS,0,2.FMT_MICROMIPS_CVT_D!3,1001101,111011:POOL32F:32,f::CVT.D.fmt
  1885. "cvt.d.%s<FMT_MICROMIPS_CVT_D> f<FT>, f<FS>"
  1886. *micromips32:
  1887. *micromips64:
  1888. {
  1889. do_cvt_d_fmt (SD_, convert_fmt_micromips_cvt_d (SD_, FMT_MICROMIPS_CVT_D),
  1890. FT, FS, instruction_0);
  1891. }
  1892. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,00000100,111011:POOL32F:32,f::CVT.L.fmt
  1893. "cvt.l.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  1894. *micromips32:
  1895. *micromips64:
  1896. {
  1897. do_cvt_l_fmt (SD_, FMT_MICROMIPS, FT, FS, instruction_0);
  1898. }
  1899. 010101,5.FT,5.FS,5.FD,00110,000000:POOL32F:32,f::CVT.PS.S
  1900. "cvt.ps.s f<FD>, f<FS>, f<FT>"
  1901. *micromips32:
  1902. *micromips64:
  1903. {
  1904. do_cvt_ps_s (SD_, FD, FS, FT, instruction_0);
  1905. }
  1906. 010101,5.FT,5.FS,0,2.FMT_MICROMIPS_CVT_S!3,1101101,111011:POOL32F:32,f::CVT.S.fmt
  1907. "cvt.s.%s<FMT_MICROMIPS_CVT_S> f<FT>, f<FS>"
  1908. *micromips32:
  1909. *micromips64:
  1910. {
  1911. do_cvt_s_fmt (SD_, convert_fmt_micromips_cvt_s (SD_, FMT_MICROMIPS_CVT_S),
  1912. FT, FS, instruction_0);
  1913. }
  1914. 010101,5.FT,5.FS,00,10000100,111011:POOL32F:32,f::CVT.S.PL
  1915. "cvt.s.pl f<FT>, f<FS>"
  1916. *micromips32:
  1917. *micromips64:
  1918. {
  1919. do_cvt_s_pl (SD_, FT, FS, instruction_0);
  1920. }
  1921. 010101,5.FT,5.FS,00,10100100,111011:POOL32F:32,f::CVT.S.PU
  1922. "cvt.s.pu f<FT>, f<FS>"
  1923. *micromips32:
  1924. *micromips64:
  1925. {
  1926. do_cvt_s_pu (SD_, FT, FS, instruction_0);
  1927. }
  1928. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,00100100,111011:POOL32F:32,f::CVT.W.fmt
  1929. "cvt.w.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  1930. *micromips32:
  1931. *micromips64:
  1932. {
  1933. do_cvt_w_fmt (SD_, FMT_MICROMIPS, FT, FS, instruction_0);
  1934. }
  1935. 010101,5.FT,5.FS,5.FD,0,2.FMT_MICROMIPS!2!3,11,110000:POOL32F:32,f::DIV.fmt
  1936. "div.%s<FMT_MICROMIPS> f<FD>, f<FS>, f<FT>"
  1937. *micromips32:
  1938. *micromips64:
  1939. {
  1940. do_div_fmt (SD_, FMT_MICROMIPS, FD, FS, FT, instruction_0);
  1941. }
  1942. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,00001100,111011:POOL32F:32,f::FLOOR.L.fmt
  1943. "floor.l.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  1944. *micromips32:
  1945. *micromips64:
  1946. {
  1947. do_floor_fmt (SD_, fmt_long, FMT_MICROMIPS, FT, FS);
  1948. }
  1949. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,00101100,111011:POOL32F:32,f::FLOOR.W.fmt
  1950. "floor.w.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  1951. *micromips32:
  1952. *micromips64:
  1953. {
  1954. do_floor_fmt (SD_, fmt_word, FMT_MICROMIPS, FT, FS);
  1955. }
  1956. 010101,5.FT,5.FS,5.FD,5.FR,0,2.FMT_MICROMIPS!3,001:POOL32F:32,f::MADD.fmt
  1957. "madd.%s<FMT_MICROMIPS> f<FD>, f<FR>, f<FS>, f<FT>"
  1958. *micromips32:
  1959. *micromips64:
  1960. {
  1961. do_madd_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FD, FR, FS,
  1962. FT, instruction_0);
  1963. }
  1964. 010101,5.FT,5.FS,0,2.FMT_MICROMIPS!3,0000001,111011:POOL32F:32,f::MOV.fmt
  1965. "mov.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  1966. *micromips32:
  1967. *micromips64:
  1968. {
  1969. do_mov_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FT, FS,
  1970. instruction_0);
  1971. }
  1972. 010101,5.FT,5.FS,3.CC,00,2.FMT_MICROMIPS!3,00,1.TF,100000:POOL32F:32,f::MOVtf.fmt
  1973. "mov%s<TF>.%s<FMT_MICROMIPS> f<FT>, f<FS>, <CC>"
  1974. *micromips32:
  1975. *micromips64:
  1976. {
  1977. do_movtf_fmt (SD_, TF, convert_fmt_micromips (SD_, FMT_MICROMIPS), FT,
  1978. FS, CC);
  1979. }
  1980. 010101,5.FT,5.FS,5.FD,0,2.FMT_MICROMIPS!3,00,111000:POOL32F:32,f::MOVN.fmt
  1981. "movn.%s<FMT_MICROMIPS> f<FD>, f<FS>, r<FT>"
  1982. *micromips32:
  1983. *micromips64:
  1984. {
  1985. do_movn_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FD, FS, FT);
  1986. }
  1987. 010101,5.FT,5.FS,5.FD,0,2.FMT_MICROMIPS!3,01,111000:POOL32F:32,f::MOVZ.fmt
  1988. "movz.%s<FMT_MICROMIPS> f<FD>, f<FS>, r<FT>"
  1989. *micromips32:
  1990. *micromips64:
  1991. {
  1992. do_movz_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FD, FS, FT);
  1993. }
  1994. 010101,5.FT,5.FS,5.FD,5.FR,1,2.FMT_MICROMIPS!3,001:POOL32F:32,f::MSUB.fmt
  1995. "msub.%s<FMT_MICROMIPS> f<FD>, f<FR>, f<FS>, f<FT>"
  1996. *micromips32:
  1997. *micromips64:
  1998. {
  1999. do_msub_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FD, FR, FS,
  2000. FT, instruction_0);
  2001. }
  2002. 010101,5.FT,5.FS,5.FD,0,2.FMT_MICROMIPS!3,10,110000:POOL32F:32,f::MUL.fmt
  2003. "mul.%s<FMT_MICROMIPS> f<FD>, f<FS>, f<FT>"
  2004. *micromips32:
  2005. *micromips64:
  2006. {
  2007. do_mul_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FD, FS, FT,
  2008. instruction_0);
  2009. }
  2010. 010101,5.FT,5.FS,0,2.FMT_MICROMIPS!3,0101101,111011:POOL32F:32,f::NEG.fmt
  2011. "neg.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  2012. *micromips32:
  2013. *micromips64:
  2014. {
  2015. do_neg_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FT, FS,
  2016. instruction_0);
  2017. }
  2018. 010101,5.FT,5.FS,5.FD,5.FR,0,2.FMT_MICROMIPS!3,010:POOL32F:32,f::NMADD.fmt
  2019. "nmadd.%s<FMT_MICROMIPS> f<FD>, f<FR>, f<FS>, f<FT>"
  2020. *micromips32:
  2021. *micromips64:
  2022. {
  2023. do_nmadd_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FD, FR, FS,
  2024. FT, instruction_0);
  2025. }
  2026. 010101,5.FT,5.FS,5.FD,5.FR,1,2.FMT_MICROMIPS!3,010:POOL32F:32,f::NMSUB.fmt
  2027. "nmsub.%s<FMT_MICROMIPS> f<FD>, f<FR>, f<FS>, f<FT>"
  2028. *micromips32:
  2029. *micromips64:
  2030. {
  2031. do_nmsub_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FD, FR, FS,
  2032. FT, instruction_0);
  2033. }
  2034. 010101,5.FT,5.FS,5.FD,00010,000000:POOL32F:32,f::PLL.PS
  2035. "pll.ps f<FD>, f<FS>, f<FT>"
  2036. *micromips32:
  2037. *micromips64:
  2038. {
  2039. do_pll_ps (SD_, FD, FS, FT, instruction_0);
  2040. }
  2041. 010101,5.FT,5.FS,5.FD,00011,000000:POOL32F:32,f::PLU.PS
  2042. "plu.ps f<FD>, f<FS>, f<FT>"
  2043. *micromips32:
  2044. *micromips64:
  2045. {
  2046. do_plu_ps (SD_, FD, FS, FT, instruction_0);
  2047. }
  2048. 010101,5.FT,5.FS,5.FD,00100,000000:POOL32F:32,f::PUL.PS
  2049. "pul.ps f<FD>, f<FS>, f<FT>"
  2050. *micromips32:
  2051. *micromips64:
  2052. {
  2053. do_pul_ps (SD_, FD, FS, FT, instruction_0);
  2054. }
  2055. 010101,5.FT,5.FS,5.FD,00101,000000:POOL32F:32,f::PUU.PS
  2056. "puu.ps f<FD>, f<FS>, f<FT>"
  2057. *micromips32:
  2058. *micromips64:
  2059. {
  2060. do_puu_ps (SD_, FD, FS, FT, instruction_0);
  2061. }
  2062. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,01001000,111011:POOL32F:32,f::RECIP.fmt
  2063. "recip.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  2064. *micromips32:
  2065. *micromips64:
  2066. {
  2067. do_recip_fmt (SD_, FMT_MICROMIPS, FT, FS);
  2068. }
  2069. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,11001100,111011:POOL32F:32,f::ROUND.L.fmt
  2070. "round.l.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  2071. *micromips32:
  2072. *micromips64:
  2073. {
  2074. do_round_fmt (SD_, fmt_long, FMT_MICROMIPS, FT, FS);
  2075. }
  2076. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,11101100,111011:POOL32F:32,f::ROUND.W.fmt
  2077. "round.w.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  2078. *micromips32:
  2079. *micromips64:
  2080. {
  2081. do_round_fmt (SD_, fmt_word, FMT_MICROMIPS, FT, FS);
  2082. }
  2083. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,00001000,111011:POOL32F:32,f::RSQRT.fmt
  2084. "rsqrt.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  2085. *micromips32:
  2086. *micromips64:
  2087. {
  2088. do_rsqrt_fmt (SD_, FMT_MICROMIPS, FT, FS);
  2089. }
  2090. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,00101000,111011:POOL32F:32,f::SQRT.fmt
  2091. "sqrt.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  2092. *micromips32:
  2093. *micromips64:
  2094. {
  2095. do_sqrt_fmt (SD_, FMT_MICROMIPS, FT, FS);
  2096. }
  2097. 010101,5.FT,5.FS,5.FD,0,2.FMT_MICROMIPS!3,01,110000:POOL32F:32,f::SUB.fmt
  2098. "sub.%s<FMT_MICROMIPS> f<FD>, f<FS>, f<FT>"
  2099. *micromips32:
  2100. *micromips64:
  2101. {
  2102. do_sub_fmt (SD_, convert_fmt_micromips (SD_, FMT_MICROMIPS), FD, FS, FT,
  2103. instruction_0);
  2104. }
  2105. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,10001100,111011:POOL32F:32,f::TRUNC.L.fmt
  2106. "trunc.l.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  2107. *micromips32:
  2108. *micromips64:
  2109. {
  2110. do_trunc_fmt (SD_, fmt_long, FMT_MICROMIPS, FT, FS);
  2111. }
  2112. 010101,5.FT,5.FS,0,1.FMT_MICROMIPS,10101100,111011:POOL32F:32,f::TRUNC.W.fmt
  2113. "trunc.w.%s<FMT_MICROMIPS> f<FT>, f<FS>"
  2114. *micromips32:
  2115. *micromips64:
  2116. {
  2117. do_trunc_fmt (SD_, fmt_word, FMT_MICROMIPS, FT, FS);
  2118. }
  2119. 001000,5.LWM32REGS,5.BASE,0111,12.OFFSET:POOL32B:64::LDM
  2120. "ldm %s<LWM32REGS>, <OFFSET>(r<BASE>)"
  2121. *micromips64:
  2122. {
  2123. int address_base = GPR[BASE] + EXTEND12 (OFFSET);
  2124. int reg_offset;
  2125. for (reg_offset = 0; reg_offset < (LWM32REGS & 0xf); reg_offset++)
  2126. {
  2127. int dst = (reg_offset == 8) ? 30 : 16 + reg_offset;
  2128. GPR[dst] = EXTEND64 (do_load (SD_, AccessLength_DOUBLEWORD, address_base,
  2129. 8 * reg_offset));
  2130. }
  2131. if (LWM32REGS & 0x10)
  2132. RA = EXTEND64 (do_load (SD_, AccessLength_DOUBLEWORD, address_base,
  2133. 8 * reg_offset));
  2134. }
  2135. 001000,5.RD,5.BASE,0100,12.OFFSET:POOL32B:64::LDP
  2136. "ldp r<RD>, <OFFSET>(r<BASE>)"
  2137. *micromips64:
  2138. {
  2139. if (BASE == RD || RD == 31)
  2140. Unpredictable ();
  2141. else
  2142. {
  2143. check_u64 (SD_, instruction_0);
  2144. GPR[RD] = EXTEND64 (do_load (SD_, AccessLength_DOUBLEWORD, GPR[BASE],
  2145. EXTEND12 (OFFSET)));
  2146. GPR[RD + 1] = EXTEND64 (do_load (SD_, AccessLength_DOUBLEWORD, GPR[BASE],
  2147. EXTEND12 (OFFSET) + 8));
  2148. }
  2149. }
  2150. 001000,5.LWM32REGS,5.BASE,1111,12.OFFSET:POOL32B:64::SDM
  2151. "sdm %s<LWM32REGS>, <OFFSET>(r<BASE>)"
  2152. *micromips64:
  2153. {
  2154. int address_base = GPR[BASE] + EXTEND12 (OFFSET);
  2155. int reg_offset;
  2156. for (reg_offset = 0; reg_offset < (LWM32REGS & 0xf); reg_offset++)
  2157. {
  2158. int src = (reg_offset == 8) ? 30 : 16 + reg_offset;
  2159. do_store (SD_, AccessLength_DOUBLEWORD, address_base, 8 * reg_offset,
  2160. GPR[src]);
  2161. }
  2162. if (LWM32REGS & 0x10)
  2163. do_store (SD_, AccessLength_DOUBLEWORD, address_base, 8 * reg_offset, RA);
  2164. }
  2165. 001000,5.RD,5.BASE,1100,12.OFFSET:POOL32B:64::SDP
  2166. "sdp r<RD>, <OFFSET>(r<BASE>)"
  2167. *micromips64:
  2168. {
  2169. if (RD == 31)
  2170. Unpredictable ();
  2171. else
  2172. {
  2173. check_u64 (SD_, instruction_0);
  2174. do_store (SD_, AccessLength_DOUBLEWORD, GPR[BASE], EXTEND12 (OFFSET),
  2175. GPR[RD]);
  2176. do_store (SD_, AccessLength_DOUBLEWORD, GPR[BASE], EXTEND12 (OFFSET) + 8,
  2177. GPR[RD + 1]);
  2178. }
  2179. }
  2180. 010110,5.RT,5.RS,5.RD,00,100010000:POOL32S:64::DADD
  2181. "dadd r<RD>, r<RS>, r<RT>"
  2182. *micromips64:
  2183. {
  2184. check_u64 (SD_, instruction_0);
  2185. do_dadd (SD_, RD, RS, RT);
  2186. }
  2187. 010110,5.RT,5.RS,10.IMMEDIATE,011100:POOL32S:64::DADDI
  2188. "daddi r<RT>, r<RS>, <IMMEDIATE>"
  2189. *micromips64:
  2190. {
  2191. check_u64 (SD_, instruction_0);
  2192. do_daddi (SD_, RT, RS, IMMEDIATE);
  2193. }
  2194. 010111,5.RT,5.RS,16.IMMEDIATE:MICROMIPS:64::DADDIU
  2195. "daddiu r<RT>, r<RS>, <IMMEDIATE>"
  2196. *micromips64:
  2197. {
  2198. check_u64 (SD_, instruction_0);
  2199. do_daddiu (SD_, RS, RT, IMMEDIATE);
  2200. }
  2201. 010110,5.RT,5.RS,5.RD,00,101010000:POOL32S:64::DADDU
  2202. "daddu r<RD>, r<RS>, r<RT>"
  2203. *micromips64:
  2204. {
  2205. check_u64 (SD_, instruction_0);
  2206. do_daddu (SD_, RS, RT, RD);
  2207. }
  2208. 010110,5.RT,5.RS,0100101100,111100:POOL32S:64::DCLO
  2209. "dclo r<RT>, r<RS>"
  2210. *micromips64:
  2211. {
  2212. check_u64 (SD_, instruction_0);
  2213. do_dclo (SD_, RT, RS);
  2214. }
  2215. 010110,5.RT,5.RS,0101101100,111100:POOL32S:64::DCLZ
  2216. "dclz r<RT>, r<RS>"
  2217. *micromips64:
  2218. {
  2219. check_u64 (SD_, instruction_0);
  2220. do_dclz (SD_, RT, RS);
  2221. }
  2222. 010110,5.RT,5.RS,1010101100,111100:POOL32S:64::DDIV
  2223. "ddiv r<RS>, r<RT>"
  2224. *micromips64:
  2225. {
  2226. check_u64 (SD_, instruction_0);
  2227. do_ddiv (SD_, RS, RT);
  2228. }
  2229. 010110,5.RT,5.RS,1011101100,111100:POOL32S:64::DDIVU
  2230. "ddivu r<RS>, r<RT>"
  2231. *micromips64:
  2232. {
  2233. check_u64 (SD_, instruction_0);
  2234. do_ddivu (SD_, RS, RT);
  2235. }
  2236. 010110,5.RT,5.RS,5.SIZE,5.LSB,101100:POOL32S:64::DEXT
  2237. "dext r<RT>, r<RS>, <LSB>, <SIZE+1>"
  2238. *micromips64:
  2239. {
  2240. check_u64 (SD_, instruction_0);
  2241. do_dext (SD_, RT, RS, LSB, SIZE);
  2242. }
  2243. 010110,5.RT,5.RS,5.SIZE,5.LSB,100100:POOL32S:64::DEXTM
  2244. "dextm r<RT>, r<RS>, <LSB>, <SIZE+33>"
  2245. *micromips64:
  2246. {
  2247. check_u64 (SD_, instruction_0);
  2248. do_dextm (SD_, RT, RS, LSB, SIZE);
  2249. }
  2250. 010110,5.RT,5.RS,5.SIZE,5.LSB,010100:POOL32S:64::DEXTU
  2251. "dextu r<RT>, r<RS>, <LSB+32>, <SIZE+1>"
  2252. *micromips64:
  2253. {
  2254. check_u64 (SD_, instruction_0);
  2255. do_dextu (SD_, RT, RS, LSB, SIZE);
  2256. }
  2257. 010110,5.RT,5.RS,5.MSB,5.LSB,001100:POOL32S:64::DINS
  2258. "dins r<RT>, r<RS>, <LSB>, <MSB-LSB+1>"
  2259. *micromips64:
  2260. {
  2261. check_u64 (SD_, instruction_0);
  2262. do_dins (SD_, RT, RS, LSB, MSB);
  2263. }
  2264. 010110,5.RT,5.RS,5.MSB,5.LSB,000100:POOL32S:64::DINSM
  2265. "dinsm r<RT>, r<RS>, <LSB>, <MSB+32-LSB+1>"
  2266. *micromips64:
  2267. {
  2268. check_u64 (SD_, instruction_0);
  2269. do_dinsm (SD_, RT, RS, LSB, MSB);
  2270. }
  2271. 010110,5.RT,5.RS,5.MSB,5.LSB,110100:POOL32S:64::DINSU
  2272. "dinsu r<RT>, r<RS>, <LSB+32>, <MSB-LSB+1>"
  2273. *micromips64:
  2274. {
  2275. check_u64 (SD_, instruction_0);
  2276. do_dinsu (SD_, RT, RS, LSB, MSB);
  2277. }
  2278. 010110,5.RT,5.RS,00,3.SEL,00011,111100:POOL32S:64::DMFC0
  2279. "dmfc0 r<RT>, r<RS>": SEL == 0
  2280. "dmfc0 r<RT>, r<RS>, <SEL>"
  2281. *micromips64:
  2282. {
  2283. check_u64 (SD_, instruction_0);
  2284. DecodeCoproc (instruction_0, 0, cp0_dmfc0, RT, RS, SEL);
  2285. }
  2286. 010101,5.RT,5.FS,00,10010000,111011:POOL32F:64::DMFC1
  2287. "dmfc1 r<RT>, f<FS>"
  2288. *micromips64:
  2289. {
  2290. check_fpu (SD_);
  2291. check_u64 (SD_, instruction_0);
  2292. do_dmfc1b (SD_, RT, FS);
  2293. }
  2294. 010110,5.RT,5.RS,00,3.SEL,01011,111100:POOL32S:64::DMTC0
  2295. "dmtc0 r<RT>, r<RS>": SEL == 0
  2296. "dmtc0 r<RT>, r<RS>, <SEL>"
  2297. *micromips64:
  2298. {
  2299. check_u64 (SD_, instruction_0);
  2300. DecodeCoproc (instruction_0, 0, cp0_dmtc0, RT, RS, SEL);
  2301. }
  2302. 010101,5.RT,5.FS,00,10110000,111011:POOL32F:64::DMTC1
  2303. "dmtc1 r<RT>, f<FS>"
  2304. *micromips64:
  2305. {
  2306. check_fpu (SD_);
  2307. check_u64 (SD_, instruction_0);
  2308. do_dmtc1b (SD_, RT, FS);
  2309. }
  2310. 010110,5.RT,5.RS,1000101100,111100:POOL32S:64::DMULT
  2311. "dmult r<RS>, r<RT>"
  2312. *micromips64:
  2313. {
  2314. check_u64 (SD_, instruction_0);
  2315. do_dmult (SD_, RS, RT, 0);
  2316. }
  2317. 010110,5.RT,5.RS,1001101100,111100:POOL32S:64::DMULTU
  2318. "dmultu r<RS>, r<RT>"
  2319. *micromips64:
  2320. {
  2321. check_u64 (SD_, instruction_0);
  2322. do_dmultu (SD_, RS, RT, 0);
  2323. }
  2324. 010110,5.RT,5.RS,5.SA,00,011000000:POOL32S:64::DROTR
  2325. "drotr r<RT>, r<RS>, <SA>"
  2326. *micromips64:
  2327. {
  2328. check_u64 (SD_, instruction_0);
  2329. GPR[RT] = do_dror (SD_, GPR[RS], SA);
  2330. }
  2331. 010110,5.RT,5.RS,5.SA,00,011001000:POOL32S:64::DROTR32
  2332. "drotr32 r<RT>, r<RS>, <SA+32>"
  2333. *micromips64:
  2334. {
  2335. check_u64 (SD_, instruction_0);
  2336. GPR[RT] = do_dror (SD_, GPR[RS], SA + 32);
  2337. }
  2338. 010110,5.RT,5.RS,5.RD,00,011010000:POOL32S:64::DROTRV
  2339. "drotrv r<RD>, r<RT>, r<RS>"
  2340. *micromips64:
  2341. {
  2342. check_u64 (SD_, instruction_0);
  2343. GPR[RD] = do_dror (SD_, GPR[RT], GPR[RS]);
  2344. }
  2345. 010110,5.RT,5.RS,0111101100,111100:POOL32S:64::DSBH
  2346. "dsbh r<RT>, r<RS>"
  2347. *micromips64:
  2348. {
  2349. check_u64 (SD_, instruction_0);
  2350. do_dsbh (SD_, RT, RS);
  2351. }
  2352. 010110,5.RT,5.RS,1111101100,111100:POOL32S:64::DSHD
  2353. "dshd r<RT>, r<RS>"
  2354. *micromips64:
  2355. {
  2356. check_u64 (SD_, instruction_0);
  2357. do_dshd (SD_, RS, RT);
  2358. }
  2359. 010110,5.RT,5.RS,5.SA,00,000000000:POOL32S:64::DSLL
  2360. "dsll r<RT>, r<RS>, <SA>"
  2361. *micromips64:
  2362. {
  2363. check_u64 (SD_, instruction_0);
  2364. do_dsll (SD_, RS, RT, SA);
  2365. }
  2366. 010110,5.RT,5.RS,5.SA,00,000001000:POOL32S:64::DSLL32
  2367. "dsll32 r<RT>, r<RS>, <SA>"
  2368. *micromips64:
  2369. {
  2370. check_u64 (SD_, instruction_0);
  2371. do_dsll32 (SD_, RT, RS, SA);
  2372. }
  2373. 010110,5.RT,5.RS,5.RD,00,000010000:POOL32S:64::DSLLV
  2374. "dsllv r<RD>, r<RT>, r<RS>"
  2375. *micromips64:
  2376. {
  2377. check_u64 (SD_, instruction_0);
  2378. do_dsllv (SD_, RS, RT, RD);
  2379. }
  2380. 010110,5.RT,5.RS,5.SA,00,010000000:POOL32S:64::DSRA
  2381. "dsra r<RT>, r<RS>, <SA>"
  2382. *micromips64:
  2383. {
  2384. check_u64 (SD_, instruction_0);
  2385. do_dsra (SD_, RS, RT, SA);
  2386. }
  2387. 010110,5.RT,5.RS,5.SA,00,010001000:POOL32S:64::DSRA32
  2388. "dsra32 r<RT>, r<RS>, <SA>"
  2389. *micromips64:
  2390. {
  2391. check_u64 (SD_, instruction_0);
  2392. do_dsra32 (SD_, RT, RS, SA);
  2393. }
  2394. 010110,5.RT,5.RS,5.RD,00,010010000:POOL32S:64::DSRAV
  2395. "dsrav r<RD>, r<RS>, r<RT>"
  2396. *micromips64:
  2397. {
  2398. check_u64 (SD_, instruction_0);
  2399. do_dsrav (SD_, RS, RT, RD);
  2400. }
  2401. 010110,5.RT,5.RS,5.SA,00,001000000:POOL32S:64::DSRL
  2402. "dsrl r<RT>, r<RS>, <SA>"
  2403. *micromips64:
  2404. {
  2405. check_u64 (SD_, instruction_0);
  2406. do_dsrl (SD_, RS, RT, SA);
  2407. }
  2408. 010110,5.RT,5.RS,5.SA,00,001001000:POOL32S:64::DSRL32
  2409. "dsrl32 r<RT>, r<RS>, <SA>"
  2410. *micromips64:
  2411. {
  2412. check_u64 (SD_, instruction_0);
  2413. do_dsrl32 (SD_, RT, RS, SA);
  2414. }
  2415. 010110,5.RT,5.RS,5.RD,00,001010000:POOL32S:64::DSRLV
  2416. "dsrlv r<RD>, r<RT>, r<RS>"
  2417. *micromips64:
  2418. {
  2419. check_u64 (SD_, instruction_0);
  2420. do_dsrlv (SD_, RS, RT, RD);
  2421. }
  2422. 010110,5.RT,5.RS,5.RD,00,110001000:POOL32S:64::DSUB
  2423. "dsub r<RD>, r<RS>, r<RT>"
  2424. *micromips64:
  2425. {
  2426. check_u64 (SD_, instruction_0);
  2427. do_dsub (SD_, RD, RS, RT);
  2428. }
  2429. 010110,5.RT,5.RS,5.RD,00,111001000:POOL32S:64::DSUBU
  2430. "dsubu r<RD>, r<RS>, r<RT>"
  2431. *micromips64:
  2432. {
  2433. check_u64 (SD_, instruction_0);
  2434. do_dsubu (SD_, RS, RT, RD);
  2435. }
  2436. 110111,5.RT,5.BASE,16.OFFSET:MICROMIPS64:64::LD
  2437. "ld r<RT>, <OFFSET>(r<BASE>)"
  2438. *micromips64:
  2439. {
  2440. check_u64 (SD_, instruction_0);
  2441. GPR[RT] = EXTEND64 (do_load (SD_, AccessLength_DOUBLEWORD, GPR[BASE],
  2442. EXTEND16 (OFFSET)));
  2443. }
  2444. 011000,5.RT,5.BASE,0100,12.OFFSET:POOL32C:64::LDL
  2445. "ldl r<RT>, <OFFSET>(r<BASE>)"
  2446. *micromips64:
  2447. {
  2448. check_u64 (SD_, instruction_0);
  2449. GPR[RT] = do_load_left (SD_, AccessLength_DOUBLEWORD, GPR[BASE],
  2450. EXTEND12 (OFFSET), GPR[RT]);
  2451. }
  2452. 011000,5.RT,5.BASE,0101,12.OFFSET:POOL32C:64::LDR
  2453. "ldr r<RT>, <OFFSET>(r<BASE>)"
  2454. *micromips64:
  2455. {
  2456. check_u64 (SD_, instruction_0);
  2457. GPR[RT] = do_load_right (SD_, AccessLength_DOUBLEWORD, GPR[BASE],
  2458. EXTEND12 (OFFSET), GPR[RT]);
  2459. }
  2460. 010101,5.INDEX,5.BASE,5.FD,00,011001000:POOL32F:64,f::LDXC1
  2461. "ldxc1 f<FD>, r<INDEX>(r<BASE>)"
  2462. *micromips64:
  2463. {
  2464. check_fpu (SD_);
  2465. check_u64 (SD_, instruction_0);
  2466. COP_LD (1, FD, do_load (SD_, AccessLength_DOUBLEWORD, GPR[BASE], GPR[INDEX]));
  2467. }
  2468. 011000,5.RT,5.BASE,0111,12.OFFSET:POOL32C:64::LLD
  2469. "lld r<RT>, <OFFSET>(r<BASE>)"
  2470. *micromips64:
  2471. {
  2472. check_u64 (SD_, instruction_0);
  2473. do_lld (SD_, RT, OFFSET, BASE);
  2474. }
  2475. 011000,5.RT,5.BASE,1111,12.OFFSET:POOL32C:64::SCD
  2476. "scd r<RT>, <OFFSET>(r<BASE>)"
  2477. *micromips64:
  2478. {
  2479. check_u64 (SD_, instruction_0);
  2480. do_scd (SD_, RT, OFFSET, BASE);
  2481. }
  2482. 110110,5.RT,5.BASE,16.OFFSET:MICROMIPS64:64::SD
  2483. "sd r<RT>, <OFFSET>(r<BASE>)"
  2484. *micromips64:
  2485. {
  2486. check_u64 (SD_, instruction_0);
  2487. do_store (SD_, AccessLength_DOUBLEWORD, GPR[BASE], EXTEND16 (OFFSET),
  2488. GPR[RT]);
  2489. }
  2490. 011000,5.RT,5.BASE,1100,12.OFFSET:POOL32C:64::SDL
  2491. "sdl r<RT>, <OFFSET>(r<BASE>)"
  2492. *micromips64:
  2493. {
  2494. check_u64 (SD_, instruction_0);
  2495. do_store_left (SD_, AccessLength_DOUBLEWORD, GPR[BASE], EXTEND12 (OFFSET),
  2496. GPR[RT]);
  2497. }
  2498. 011000,5.RT,5.BASE,1101,12.OFFSET:POOL32C:64::SDR
  2499. "sdr r<RT>, <OFFSET>(r<BASE>)"
  2500. *micromips64:
  2501. {
  2502. check_u64 (SD_, instruction_0);
  2503. do_store_right (SD_, AccessLength_DOUBLEWORD, GPR[BASE], EXTEND12 (OFFSET),
  2504. GPR[RT]);
  2505. }
  2506. 010101,5.INDEX,5.BASE,5.FD,00,100001000:POOL32F:64,f::SDXC1
  2507. "sdxc1 f<FD>, r<INDEX>(r<BASE>)"
  2508. *micromips64:
  2509. {
  2510. check_fpu (SD_);
  2511. check_u64 (SD_, instruction_0);
  2512. do_store (SD_, AccessLength_DOUBLEWORD, GPR[BASE], GPR[INDEX],
  2513. COP_SD (1, FD));
  2514. }