xc16x-desc.c 112 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521
  1. /* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */
  2. /* CPU data for xc16x.
  3. THIS FILE IS MACHINE GENERATED WITH CGEN.
  4. Copyright (C) 1996-2022 Free Software Foundation, Inc.
  5. This file is part of the GNU Binutils and/or GDB, the GNU debugger.
  6. This file is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 3, or (at your option)
  9. any later version.
  10. It is distributed in the hope that it will be useful, but WITHOUT
  11. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  12. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  13. License for more details.
  14. You should have received a copy of the GNU General Public License along
  15. with this program; if not, write to the Free Software Foundation, Inc.,
  16. 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  17. */
  18. #include "sysdep.h"
  19. #include <stdio.h>
  20. #include <stdarg.h>
  21. #include <stdlib.h>
  22. #include "ansidecl.h"
  23. #include "bfd.h"
  24. #include "symcat.h"
  25. #include "xc16x-desc.h"
  26. #include "xc16x-opc.h"
  27. #include "opintl.h"
  28. #include "libiberty.h"
  29. #include "xregex.h"
  30. /* Attributes. */
  31. static const CGEN_ATTR_ENTRY bool_attr[] =
  32. {
  33. { "#f", 0 },
  34. { "#t", 1 },
  35. { 0, 0 }
  36. };
  37. static const CGEN_ATTR_ENTRY MACH_attr[] ATTRIBUTE_UNUSED =
  38. {
  39. { "base", MACH_BASE },
  40. { "xc16x", MACH_XC16X },
  41. { "max", MACH_MAX },
  42. { 0, 0 }
  43. };
  44. static const CGEN_ATTR_ENTRY ISA_attr[] ATTRIBUTE_UNUSED =
  45. {
  46. { "xc16x", ISA_XC16X },
  47. { "max", ISA_MAX },
  48. { 0, 0 }
  49. };
  50. static const CGEN_ATTR_ENTRY PIPE_attr[] ATTRIBUTE_UNUSED =
  51. {
  52. { "NONE", PIPE_NONE },
  53. { "OS", PIPE_OS },
  54. { 0, 0 }
  55. };
  56. const CGEN_ATTR_TABLE xc16x_cgen_ifield_attr_table[] =
  57. {
  58. { "MACH", & MACH_attr[0], & MACH_attr[0] },
  59. { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
  60. { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
  61. { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
  62. { "RESERVED", &bool_attr[0], &bool_attr[0] },
  63. { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
  64. { "SIGNED", &bool_attr[0], &bool_attr[0] },
  65. { "RELOC", &bool_attr[0], &bool_attr[0] },
  66. { 0, 0, 0 }
  67. };
  68. const CGEN_ATTR_TABLE xc16x_cgen_hardware_attr_table[] =
  69. {
  70. { "MACH", & MACH_attr[0], & MACH_attr[0] },
  71. { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
  72. { "CACHE-ADDR", &bool_attr[0], &bool_attr[0] },
  73. { "PC", &bool_attr[0], &bool_attr[0] },
  74. { "PROFILE", &bool_attr[0], &bool_attr[0] },
  75. { 0, 0, 0 }
  76. };
  77. const CGEN_ATTR_TABLE xc16x_cgen_operand_attr_table[] =
  78. {
  79. { "MACH", & MACH_attr[0], & MACH_attr[0] },
  80. { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
  81. { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
  82. { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
  83. { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
  84. { "SIGNED", &bool_attr[0], &bool_attr[0] },
  85. { "NEGATIVE", &bool_attr[0], &bool_attr[0] },
  86. { "RELAX", &bool_attr[0], &bool_attr[0] },
  87. { "SEM-ONLY", &bool_attr[0], &bool_attr[0] },
  88. { "RELOC", &bool_attr[0], &bool_attr[0] },
  89. { "HASH-PREFIX", &bool_attr[0], &bool_attr[0] },
  90. { "DOT-PREFIX", &bool_attr[0], &bool_attr[0] },
  91. { "POF-PREFIX", &bool_attr[0], &bool_attr[0] },
  92. { "PAG-PREFIX", &bool_attr[0], &bool_attr[0] },
  93. { "SOF-PREFIX", &bool_attr[0], &bool_attr[0] },
  94. { "SEG-PREFIX", &bool_attr[0], &bool_attr[0] },
  95. { 0, 0, 0 }
  96. };
  97. const CGEN_ATTR_TABLE xc16x_cgen_insn_attr_table[] =
  98. {
  99. { "MACH", & MACH_attr[0], & MACH_attr[0] },
  100. { "PIPE", & PIPE_attr[0], & PIPE_attr[0] },
  101. { "ALIAS", &bool_attr[0], &bool_attr[0] },
  102. { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
  103. { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] },
  104. { "COND-CTI", &bool_attr[0], &bool_attr[0] },
  105. { "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
  106. { "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
  107. { "RELAXABLE", &bool_attr[0], &bool_attr[0] },
  108. { "RELAXED", &bool_attr[0], &bool_attr[0] },
  109. { "NO-DIS", &bool_attr[0], &bool_attr[0] },
  110. { "PBB", &bool_attr[0], &bool_attr[0] },
  111. { 0, 0, 0 }
  112. };
  113. /* Instruction set variants. */
  114. static const CGEN_ISA xc16x_cgen_isa_table[] = {
  115. { "xc16x", 16, 32, 16, 32 },
  116. { 0, 0, 0, 0, 0 }
  117. };
  118. /* Machine variants. */
  119. static const CGEN_MACH xc16x_cgen_mach_table[] = {
  120. { "xc16x", "xc16x", MACH_XC16X, 32 },
  121. { 0, 0, 0, 0 }
  122. };
  123. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_gr_names_entries[] =
  124. {
  125. { "r0", 0, {0, {{{0, 0}}}}, 0, 0 },
  126. { "r1", 1, {0, {{{0, 0}}}}, 0, 0 },
  127. { "r2", 2, {0, {{{0, 0}}}}, 0, 0 },
  128. { "r3", 3, {0, {{{0, 0}}}}, 0, 0 },
  129. { "r4", 4, {0, {{{0, 0}}}}, 0, 0 },
  130. { "r5", 5, {0, {{{0, 0}}}}, 0, 0 },
  131. { "r6", 6, {0, {{{0, 0}}}}, 0, 0 },
  132. { "r7", 7, {0, {{{0, 0}}}}, 0, 0 },
  133. { "r8", 8, {0, {{{0, 0}}}}, 0, 0 },
  134. { "r9", 9, {0, {{{0, 0}}}}, 0, 0 },
  135. { "r10", 10, {0, {{{0, 0}}}}, 0, 0 },
  136. { "r11", 11, {0, {{{0, 0}}}}, 0, 0 },
  137. { "r12", 12, {0, {{{0, 0}}}}, 0, 0 },
  138. { "r13", 13, {0, {{{0, 0}}}}, 0, 0 },
  139. { "r14", 14, {0, {{{0, 0}}}}, 0, 0 },
  140. { "r15", 15, {0, {{{0, 0}}}}, 0, 0 }
  141. };
  142. CGEN_KEYWORD xc16x_cgen_opval_gr_names =
  143. {
  144. & xc16x_cgen_opval_gr_names_entries[0],
  145. 16,
  146. 0, 0, 0, 0, ""
  147. };
  148. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_ext_names_entries[] =
  149. {
  150. { "0x1", 0, {0, {{{0, 0}}}}, 0, 0 },
  151. { "0x2", 1, {0, {{{0, 0}}}}, 0, 0 },
  152. { "0x3", 2, {0, {{{0, 0}}}}, 0, 0 },
  153. { "0x4", 3, {0, {{{0, 0}}}}, 0, 0 },
  154. { "1", 0, {0, {{{0, 0}}}}, 0, 0 },
  155. { "2", 1, {0, {{{0, 0}}}}, 0, 0 },
  156. { "3", 2, {0, {{{0, 0}}}}, 0, 0 },
  157. { "4", 3, {0, {{{0, 0}}}}, 0, 0 }
  158. };
  159. CGEN_KEYWORD xc16x_cgen_opval_ext_names =
  160. {
  161. & xc16x_cgen_opval_ext_names_entries[0],
  162. 8,
  163. 0, 0, 0, 0, ""
  164. };
  165. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_psw_names_entries[] =
  166. {
  167. { "IEN", 136, {0, {{{0, 0}}}}, 0, 0 },
  168. { "r0.11", 240, {0, {{{0, 0}}}}, 0, 0 },
  169. { "r1.11", 241, {0, {{{0, 0}}}}, 0, 0 },
  170. { "r2.11", 242, {0, {{{0, 0}}}}, 0, 0 },
  171. { "r3.11", 243, {0, {{{0, 0}}}}, 0, 0 },
  172. { "r4.11", 244, {0, {{{0, 0}}}}, 0, 0 },
  173. { "r5.11", 245, {0, {{{0, 0}}}}, 0, 0 },
  174. { "r6.11", 246, {0, {{{0, 0}}}}, 0, 0 },
  175. { "r7.11", 247, {0, {{{0, 0}}}}, 0, 0 },
  176. { "r8.11", 248, {0, {{{0, 0}}}}, 0, 0 },
  177. { "r9.11", 249, {0, {{{0, 0}}}}, 0, 0 },
  178. { "r10.11", 250, {0, {{{0, 0}}}}, 0, 0 },
  179. { "r11.11", 251, {0, {{{0, 0}}}}, 0, 0 },
  180. { "r12.11", 252, {0, {{{0, 0}}}}, 0, 0 },
  181. { "r13.11", 253, {0, {{{0, 0}}}}, 0, 0 },
  182. { "r14.11", 254, {0, {{{0, 0}}}}, 0, 0 },
  183. { "r15.11", 255, {0, {{{0, 0}}}}, 0, 0 }
  184. };
  185. CGEN_KEYWORD xc16x_cgen_opval_psw_names =
  186. {
  187. & xc16x_cgen_opval_psw_names_entries[0],
  188. 17,
  189. 0, 0, 0, 0, ""
  190. };
  191. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_grb_names_entries[] =
  192. {
  193. { "rl0", 0, {0, {{{0, 0}}}}, 0, 0 },
  194. { "rh0", 1, {0, {{{0, 0}}}}, 0, 0 },
  195. { "rl1", 2, {0, {{{0, 0}}}}, 0, 0 },
  196. { "rh1", 3, {0, {{{0, 0}}}}, 0, 0 },
  197. { "rl2", 4, {0, {{{0, 0}}}}, 0, 0 },
  198. { "rh2", 5, {0, {{{0, 0}}}}, 0, 0 },
  199. { "rl3", 6, {0, {{{0, 0}}}}, 0, 0 },
  200. { "rh3", 7, {0, {{{0, 0}}}}, 0, 0 },
  201. { "rl4", 8, {0, {{{0, 0}}}}, 0, 0 },
  202. { "rh4", 9, {0, {{{0, 0}}}}, 0, 0 },
  203. { "rl5", 10, {0, {{{0, 0}}}}, 0, 0 },
  204. { "rh5", 11, {0, {{{0, 0}}}}, 0, 0 },
  205. { "rl6", 12, {0, {{{0, 0}}}}, 0, 0 },
  206. { "rh6", 13, {0, {{{0, 0}}}}, 0, 0 },
  207. { "rl7", 14, {0, {{{0, 0}}}}, 0, 0 },
  208. { "rh7", 15, {0, {{{0, 0}}}}, 0, 0 }
  209. };
  210. CGEN_KEYWORD xc16x_cgen_opval_grb_names =
  211. {
  212. & xc16x_cgen_opval_grb_names_entries[0],
  213. 16,
  214. 0, 0, 0, 0, ""
  215. };
  216. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_conditioncode_names_entries[] =
  217. {
  218. { "cc_UC", 0, {0, {{{0, 0}}}}, 0, 0 },
  219. { "cc_NET", 1, {0, {{{0, 0}}}}, 0, 0 },
  220. { "cc_Z", 2, {0, {{{0, 0}}}}, 0, 0 },
  221. { "cc_EQ", 2, {0, {{{0, 0}}}}, 0, 0 },
  222. { "cc_NZ", 3, {0, {{{0, 0}}}}, 0, 0 },
  223. { "cc_NE", 3, {0, {{{0, 0}}}}, 0, 0 },
  224. { "cc_V", 4, {0, {{{0, 0}}}}, 0, 0 },
  225. { "cc_NV", 5, {0, {{{0, 0}}}}, 0, 0 },
  226. { "cc_N", 6, {0, {{{0, 0}}}}, 0, 0 },
  227. { "cc_NN", 7, {0, {{{0, 0}}}}, 0, 0 },
  228. { "cc_ULT", 8, {0, {{{0, 0}}}}, 0, 0 },
  229. { "cc_UGE", 9, {0, {{{0, 0}}}}, 0, 0 },
  230. { "cc_C", 8, {0, {{{0, 0}}}}, 0, 0 },
  231. { "cc_NC", 9, {0, {{{0, 0}}}}, 0, 0 },
  232. { "cc_SGT", 10, {0, {{{0, 0}}}}, 0, 0 },
  233. { "cc_SLE", 11, {0, {{{0, 0}}}}, 0, 0 },
  234. { "cc_SLT", 12, {0, {{{0, 0}}}}, 0, 0 },
  235. { "cc_SGE", 13, {0, {{{0, 0}}}}, 0, 0 },
  236. { "cc_UGT", 14, {0, {{{0, 0}}}}, 0, 0 },
  237. { "cc_ULE", 15, {0, {{{0, 0}}}}, 0, 0 }
  238. };
  239. CGEN_KEYWORD xc16x_cgen_opval_conditioncode_names =
  240. {
  241. & xc16x_cgen_opval_conditioncode_names_entries[0],
  242. 20,
  243. 0, 0, 0, 0, ""
  244. };
  245. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_extconditioncode_names_entries[] =
  246. {
  247. { "cc_UC", 0, {0, {{{0, 0}}}}, 0, 0 },
  248. { "cc_NET", 2, {0, {{{0, 0}}}}, 0, 0 },
  249. { "cc_Z", 4, {0, {{{0, 0}}}}, 0, 0 },
  250. { "cc_EQ", 4, {0, {{{0, 0}}}}, 0, 0 },
  251. { "cc_NZ", 6, {0, {{{0, 0}}}}, 0, 0 },
  252. { "cc_NE", 6, {0, {{{0, 0}}}}, 0, 0 },
  253. { "cc_V", 8, {0, {{{0, 0}}}}, 0, 0 },
  254. { "cc_NV", 10, {0, {{{0, 0}}}}, 0, 0 },
  255. { "cc_N", 12, {0, {{{0, 0}}}}, 0, 0 },
  256. { "cc_NN", 14, {0, {{{0, 0}}}}, 0, 0 },
  257. { "cc_ULT", 16, {0, {{{0, 0}}}}, 0, 0 },
  258. { "cc_UGE", 18, {0, {{{0, 0}}}}, 0, 0 },
  259. { "cc_C", 16, {0, {{{0, 0}}}}, 0, 0 },
  260. { "cc_NC", 18, {0, {{{0, 0}}}}, 0, 0 },
  261. { "cc_SGT", 20, {0, {{{0, 0}}}}, 0, 0 },
  262. { "cc_SLE", 22, {0, {{{0, 0}}}}, 0, 0 },
  263. { "cc_SLT", 24, {0, {{{0, 0}}}}, 0, 0 },
  264. { "cc_SGE", 26, {0, {{{0, 0}}}}, 0, 0 },
  265. { "cc_UGT", 28, {0, {{{0, 0}}}}, 0, 0 },
  266. { "cc_ULE", 30, {0, {{{0, 0}}}}, 0, 0 },
  267. { "cc_nusr0", 1, {0, {{{0, 0}}}}, 0, 0 },
  268. { "cc_nusr1", 3, {0, {{{0, 0}}}}, 0, 0 },
  269. { "cc_usr0", 5, {0, {{{0, 0}}}}, 0, 0 },
  270. { "cc_usr1", 7, {0, {{{0, 0}}}}, 0, 0 }
  271. };
  272. CGEN_KEYWORD xc16x_cgen_opval_extconditioncode_names =
  273. {
  274. & xc16x_cgen_opval_extconditioncode_names_entries[0],
  275. 24,
  276. 0, 0, 0, 0, ""
  277. };
  278. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_grb8_names_entries[] =
  279. {
  280. { "dpp0", 0, {0, {{{0, 0}}}}, 0, 0 },
  281. { "dpp1", 1, {0, {{{0, 0}}}}, 0, 0 },
  282. { "dpp2", 2, {0, {{{0, 0}}}}, 0, 0 },
  283. { "dpp3", 3, {0, {{{0, 0}}}}, 0, 0 },
  284. { "psw", 136, {0, {{{0, 0}}}}, 0, 0 },
  285. { "cp", 8, {0, {{{0, 0}}}}, 0, 0 },
  286. { "mdl", 7, {0, {{{0, 0}}}}, 0, 0 },
  287. { "mdh", 6, {0, {{{0, 0}}}}, 0, 0 },
  288. { "mdc", 135, {0, {{{0, 0}}}}, 0, 0 },
  289. { "sp", 9, {0, {{{0, 0}}}}, 0, 0 },
  290. { "csp", 4, {0, {{{0, 0}}}}, 0, 0 },
  291. { "vecseg", 137, {0, {{{0, 0}}}}, 0, 0 },
  292. { "stkov", 10, {0, {{{0, 0}}}}, 0, 0 },
  293. { "stkun", 11, {0, {{{0, 0}}}}, 0, 0 },
  294. { "cpucon1", 12, {0, {{{0, 0}}}}, 0, 0 },
  295. { "cpucon2", 13, {0, {{{0, 0}}}}, 0, 0 },
  296. { "zeros", 142, {0, {{{0, 0}}}}, 0, 0 },
  297. { "ones", 143, {0, {{{0, 0}}}}, 0, 0 },
  298. { "spseg", 134, {0, {{{0, 0}}}}, 0, 0 },
  299. { "tfr", 214, {0, {{{0, 0}}}}, 0, 0 },
  300. { "rl0", 240, {0, {{{0, 0}}}}, 0, 0 },
  301. { "rh0", 241, {0, {{{0, 0}}}}, 0, 0 },
  302. { "rl1", 242, {0, {{{0, 0}}}}, 0, 0 },
  303. { "rh1", 243, {0, {{{0, 0}}}}, 0, 0 },
  304. { "rl2", 244, {0, {{{0, 0}}}}, 0, 0 },
  305. { "rh2", 245, {0, {{{0, 0}}}}, 0, 0 },
  306. { "rl3", 246, {0, {{{0, 0}}}}, 0, 0 },
  307. { "rh3", 247, {0, {{{0, 0}}}}, 0, 0 },
  308. { "rl4", 248, {0, {{{0, 0}}}}, 0, 0 },
  309. { "rh4", 249, {0, {{{0, 0}}}}, 0, 0 },
  310. { "rl5", 250, {0, {{{0, 0}}}}, 0, 0 },
  311. { "rh5", 251, {0, {{{0, 0}}}}, 0, 0 },
  312. { "rl6", 252, {0, {{{0, 0}}}}, 0, 0 },
  313. { "rh6", 253, {0, {{{0, 0}}}}, 0, 0 },
  314. { "rl7", 254, {0, {{{0, 0}}}}, 0, 0 },
  315. { "rh7", 255, {0, {{{0, 0}}}}, 0, 0 }
  316. };
  317. CGEN_KEYWORD xc16x_cgen_opval_grb8_names =
  318. {
  319. & xc16x_cgen_opval_grb8_names_entries[0],
  320. 36,
  321. 0, 0, 0, 0, ""
  322. };
  323. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_r8_names_entries[] =
  324. {
  325. { "dpp0", 0, {0, {{{0, 0}}}}, 0, 0 },
  326. { "dpp1", 1, {0, {{{0, 0}}}}, 0, 0 },
  327. { "dpp2", 2, {0, {{{0, 0}}}}, 0, 0 },
  328. { "dpp3", 3, {0, {{{0, 0}}}}, 0, 0 },
  329. { "psw", 136, {0, {{{0, 0}}}}, 0, 0 },
  330. { "cp", 8, {0, {{{0, 0}}}}, 0, 0 },
  331. { "mdl", 7, {0, {{{0, 0}}}}, 0, 0 },
  332. { "mdh", 6, {0, {{{0, 0}}}}, 0, 0 },
  333. { "mdc", 135, {0, {{{0, 0}}}}, 0, 0 },
  334. { "sp", 9, {0, {{{0, 0}}}}, 0, 0 },
  335. { "csp", 4, {0, {{{0, 0}}}}, 0, 0 },
  336. { "vecseg", 137, {0, {{{0, 0}}}}, 0, 0 },
  337. { "stkov", 10, {0, {{{0, 0}}}}, 0, 0 },
  338. { "stkun", 11, {0, {{{0, 0}}}}, 0, 0 },
  339. { "cpucon1", 12, {0, {{{0, 0}}}}, 0, 0 },
  340. { "cpucon2", 13, {0, {{{0, 0}}}}, 0, 0 },
  341. { "zeros", 142, {0, {{{0, 0}}}}, 0, 0 },
  342. { "ones", 143, {0, {{{0, 0}}}}, 0, 0 },
  343. { "spseg", 134, {0, {{{0, 0}}}}, 0, 0 },
  344. { "tfr", 214, {0, {{{0, 0}}}}, 0, 0 },
  345. { "r0", 240, {0, {{{0, 0}}}}, 0, 0 },
  346. { "r1", 241, {0, {{{0, 0}}}}, 0, 0 },
  347. { "r2", 242, {0, {{{0, 0}}}}, 0, 0 },
  348. { "r3", 243, {0, {{{0, 0}}}}, 0, 0 },
  349. { "r4", 244, {0, {{{0, 0}}}}, 0, 0 },
  350. { "r5", 245, {0, {{{0, 0}}}}, 0, 0 },
  351. { "r6", 246, {0, {{{0, 0}}}}, 0, 0 },
  352. { "r7", 247, {0, {{{0, 0}}}}, 0, 0 },
  353. { "r8", 248, {0, {{{0, 0}}}}, 0, 0 },
  354. { "r9", 249, {0, {{{0, 0}}}}, 0, 0 },
  355. { "r10", 250, {0, {{{0, 0}}}}, 0, 0 },
  356. { "r11", 251, {0, {{{0, 0}}}}, 0, 0 },
  357. { "r12", 252, {0, {{{0, 0}}}}, 0, 0 },
  358. { "r13", 253, {0, {{{0, 0}}}}, 0, 0 },
  359. { "r14", 254, {0, {{{0, 0}}}}, 0, 0 },
  360. { "r15", 255, {0, {{{0, 0}}}}, 0, 0 }
  361. };
  362. CGEN_KEYWORD xc16x_cgen_opval_r8_names =
  363. {
  364. & xc16x_cgen_opval_r8_names_entries[0],
  365. 36,
  366. 0, 0, 0, 0, ""
  367. };
  368. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_regmem8_names_entries[] =
  369. {
  370. { "dpp0", 0, {0, {{{0, 0}}}}, 0, 0 },
  371. { "dpp1", 1, {0, {{{0, 0}}}}, 0, 0 },
  372. { "dpp2", 2, {0, {{{0, 0}}}}, 0, 0 },
  373. { "dpp3", 3, {0, {{{0, 0}}}}, 0, 0 },
  374. { "psw", 136, {0, {{{0, 0}}}}, 0, 0 },
  375. { "cp", 8, {0, {{{0, 0}}}}, 0, 0 },
  376. { "mdl", 7, {0, {{{0, 0}}}}, 0, 0 },
  377. { "mdh", 6, {0, {{{0, 0}}}}, 0, 0 },
  378. { "mdc", 135, {0, {{{0, 0}}}}, 0, 0 },
  379. { "sp", 9, {0, {{{0, 0}}}}, 0, 0 },
  380. { "csp", 4, {0, {{{0, 0}}}}, 0, 0 },
  381. { "vecseg", 137, {0, {{{0, 0}}}}, 0, 0 },
  382. { "stkov", 10, {0, {{{0, 0}}}}, 0, 0 },
  383. { "stkun", 11, {0, {{{0, 0}}}}, 0, 0 },
  384. { "cpucon1", 12, {0, {{{0, 0}}}}, 0, 0 },
  385. { "cpucon2", 13, {0, {{{0, 0}}}}, 0, 0 },
  386. { "zeros", 142, {0, {{{0, 0}}}}, 0, 0 },
  387. { "ones", 143, {0, {{{0, 0}}}}, 0, 0 },
  388. { "spseg", 134, {0, {{{0, 0}}}}, 0, 0 },
  389. { "tfr", 214, {0, {{{0, 0}}}}, 0, 0 },
  390. { "r0", 240, {0, {{{0, 0}}}}, 0, 0 },
  391. { "r1", 241, {0, {{{0, 0}}}}, 0, 0 },
  392. { "r2", 242, {0, {{{0, 0}}}}, 0, 0 },
  393. { "r3", 243, {0, {{{0, 0}}}}, 0, 0 },
  394. { "r4", 244, {0, {{{0, 0}}}}, 0, 0 },
  395. { "r5", 245, {0, {{{0, 0}}}}, 0, 0 },
  396. { "r6", 246, {0, {{{0, 0}}}}, 0, 0 },
  397. { "r7", 247, {0, {{{0, 0}}}}, 0, 0 },
  398. { "r8", 248, {0, {{{0, 0}}}}, 0, 0 },
  399. { "r9", 249, {0, {{{0, 0}}}}, 0, 0 },
  400. { "r10", 250, {0, {{{0, 0}}}}, 0, 0 },
  401. { "r11", 251, {0, {{{0, 0}}}}, 0, 0 },
  402. { "r12", 252, {0, {{{0, 0}}}}, 0, 0 },
  403. { "r13", 253, {0, {{{0, 0}}}}, 0, 0 },
  404. { "r14", 254, {0, {{{0, 0}}}}, 0, 0 },
  405. { "r15", 255, {0, {{{0, 0}}}}, 0, 0 }
  406. };
  407. CGEN_KEYWORD xc16x_cgen_opval_regmem8_names =
  408. {
  409. & xc16x_cgen_opval_regmem8_names_entries[0],
  410. 36,
  411. 0, 0, 0, 0, ""
  412. };
  413. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_regdiv8_names_entries[] =
  414. {
  415. { "r0", 0, {0, {{{0, 0}}}}, 0, 0 },
  416. { "r1", 17, {0, {{{0, 0}}}}, 0, 0 },
  417. { "r2", 34, {0, {{{0, 0}}}}, 0, 0 },
  418. { "r3", 51, {0, {{{0, 0}}}}, 0, 0 },
  419. { "r4", 68, {0, {{{0, 0}}}}, 0, 0 },
  420. { "r5", 85, {0, {{{0, 0}}}}, 0, 0 },
  421. { "r6", 102, {0, {{{0, 0}}}}, 0, 0 },
  422. { "r7", 119, {0, {{{0, 0}}}}, 0, 0 },
  423. { "r8", 136, {0, {{{0, 0}}}}, 0, 0 },
  424. { "r9", 153, {0, {{{0, 0}}}}, 0, 0 },
  425. { "r10", 170, {0, {{{0, 0}}}}, 0, 0 },
  426. { "r11", 187, {0, {{{0, 0}}}}, 0, 0 },
  427. { "r12", 204, {0, {{{0, 0}}}}, 0, 0 },
  428. { "r13", 221, {0, {{{0, 0}}}}, 0, 0 },
  429. { "r14", 238, {0, {{{0, 0}}}}, 0, 0 },
  430. { "r15", 255, {0, {{{0, 0}}}}, 0, 0 }
  431. };
  432. CGEN_KEYWORD xc16x_cgen_opval_regdiv8_names =
  433. {
  434. & xc16x_cgen_opval_regdiv8_names_entries[0],
  435. 16,
  436. 0, 0, 0, 0, ""
  437. };
  438. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_reg0_name_entries[] =
  439. {
  440. { "0x1", 1, {0, {{{0, 0}}}}, 0, 0 },
  441. { "0x2", 2, {0, {{{0, 0}}}}, 0, 0 },
  442. { "0x3", 3, {0, {{{0, 0}}}}, 0, 0 },
  443. { "0x4", 4, {0, {{{0, 0}}}}, 0, 0 },
  444. { "0x5", 5, {0, {{{0, 0}}}}, 0, 0 },
  445. { "0x6", 6, {0, {{{0, 0}}}}, 0, 0 },
  446. { "0x7", 7, {0, {{{0, 0}}}}, 0, 0 },
  447. { "0x8", 8, {0, {{{0, 0}}}}, 0, 0 },
  448. { "0x9", 9, {0, {{{0, 0}}}}, 0, 0 },
  449. { "0xa", 10, {0, {{{0, 0}}}}, 0, 0 },
  450. { "0xb", 11, {0, {{{0, 0}}}}, 0, 0 },
  451. { "0xc", 12, {0, {{{0, 0}}}}, 0, 0 },
  452. { "0xd", 13, {0, {{{0, 0}}}}, 0, 0 },
  453. { "0xe", 14, {0, {{{0, 0}}}}, 0, 0 },
  454. { "0xf", 15, {0, {{{0, 0}}}}, 0, 0 },
  455. { "1", 1, {0, {{{0, 0}}}}, 0, 0 },
  456. { "2", 2, {0, {{{0, 0}}}}, 0, 0 },
  457. { "3", 3, {0, {{{0, 0}}}}, 0, 0 },
  458. { "4", 4, {0, {{{0, 0}}}}, 0, 0 },
  459. { "5", 5, {0, {{{0, 0}}}}, 0, 0 },
  460. { "6", 6, {0, {{{0, 0}}}}, 0, 0 },
  461. { "7", 7, {0, {{{0, 0}}}}, 0, 0 },
  462. { "8", 8, {0, {{{0, 0}}}}, 0, 0 },
  463. { "9", 9, {0, {{{0, 0}}}}, 0, 0 },
  464. { "10", 10, {0, {{{0, 0}}}}, 0, 0 },
  465. { "11", 11, {0, {{{0, 0}}}}, 0, 0 },
  466. { "12", 12, {0, {{{0, 0}}}}, 0, 0 },
  467. { "13", 13, {0, {{{0, 0}}}}, 0, 0 },
  468. { "14", 14, {0, {{{0, 0}}}}, 0, 0 },
  469. { "15", 15, {0, {{{0, 0}}}}, 0, 0 }
  470. };
  471. CGEN_KEYWORD xc16x_cgen_opval_reg0_name =
  472. {
  473. & xc16x_cgen_opval_reg0_name_entries[0],
  474. 30,
  475. 0, 0, 0, 0, ""
  476. };
  477. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_reg0_name1_entries[] =
  478. {
  479. { "0x1", 1, {0, {{{0, 0}}}}, 0, 0 },
  480. { "0x2", 2, {0, {{{0, 0}}}}, 0, 0 },
  481. { "0x3", 3, {0, {{{0, 0}}}}, 0, 0 },
  482. { "0x4", 4, {0, {{{0, 0}}}}, 0, 0 },
  483. { "0x5", 5, {0, {{{0, 0}}}}, 0, 0 },
  484. { "0x6", 6, {0, {{{0, 0}}}}, 0, 0 },
  485. { "0x7", 7, {0, {{{0, 0}}}}, 0, 0 },
  486. { "1", 1, {0, {{{0, 0}}}}, 0, 0 },
  487. { "2", 2, {0, {{{0, 0}}}}, 0, 0 },
  488. { "3", 3, {0, {{{0, 0}}}}, 0, 0 },
  489. { "4", 4, {0, {{{0, 0}}}}, 0, 0 },
  490. { "5", 5, {0, {{{0, 0}}}}, 0, 0 },
  491. { "6", 6, {0, {{{0, 0}}}}, 0, 0 },
  492. { "7", 7, {0, {{{0, 0}}}}, 0, 0 }
  493. };
  494. CGEN_KEYWORD xc16x_cgen_opval_reg0_name1 =
  495. {
  496. & xc16x_cgen_opval_reg0_name1_entries[0],
  497. 14,
  498. 0, 0, 0, 0, ""
  499. };
  500. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_regbmem8_names_entries[] =
  501. {
  502. { "dpp0", 0, {0, {{{0, 0}}}}, 0, 0 },
  503. { "dpp1", 1, {0, {{{0, 0}}}}, 0, 0 },
  504. { "dpp2", 2, {0, {{{0, 0}}}}, 0, 0 },
  505. { "dpp3", 3, {0, {{{0, 0}}}}, 0, 0 },
  506. { "psw", 136, {0, {{{0, 0}}}}, 0, 0 },
  507. { "cp", 8, {0, {{{0, 0}}}}, 0, 0 },
  508. { "mdl", 7, {0, {{{0, 0}}}}, 0, 0 },
  509. { "mdh", 6, {0, {{{0, 0}}}}, 0, 0 },
  510. { "mdc", 135, {0, {{{0, 0}}}}, 0, 0 },
  511. { "sp", 9, {0, {{{0, 0}}}}, 0, 0 },
  512. { "csp", 4, {0, {{{0, 0}}}}, 0, 0 },
  513. { "vecseg", 137, {0, {{{0, 0}}}}, 0, 0 },
  514. { "stkov", 10, {0, {{{0, 0}}}}, 0, 0 },
  515. { "stkun", 11, {0, {{{0, 0}}}}, 0, 0 },
  516. { "cpucon1", 12, {0, {{{0, 0}}}}, 0, 0 },
  517. { "cpucon2", 13, {0, {{{0, 0}}}}, 0, 0 },
  518. { "zeros", 142, {0, {{{0, 0}}}}, 0, 0 },
  519. { "ones", 143, {0, {{{0, 0}}}}, 0, 0 },
  520. { "spseg", 134, {0, {{{0, 0}}}}, 0, 0 },
  521. { "tfr", 214, {0, {{{0, 0}}}}, 0, 0 },
  522. { "rl0", 240, {0, {{{0, 0}}}}, 0, 0 },
  523. { "rh0", 241, {0, {{{0, 0}}}}, 0, 0 },
  524. { "rl1", 242, {0, {{{0, 0}}}}, 0, 0 },
  525. { "rh1", 243, {0, {{{0, 0}}}}, 0, 0 },
  526. { "rl2", 244, {0, {{{0, 0}}}}, 0, 0 },
  527. { "rh2", 245, {0, {{{0, 0}}}}, 0, 0 },
  528. { "rl3", 246, {0, {{{0, 0}}}}, 0, 0 },
  529. { "rh3", 247, {0, {{{0, 0}}}}, 0, 0 },
  530. { "rl4", 248, {0, {{{0, 0}}}}, 0, 0 },
  531. { "rh4", 249, {0, {{{0, 0}}}}, 0, 0 },
  532. { "rl5", 250, {0, {{{0, 0}}}}, 0, 0 },
  533. { "rh5", 251, {0, {{{0, 0}}}}, 0, 0 },
  534. { "rl6", 252, {0, {{{0, 0}}}}, 0, 0 },
  535. { "rh6", 253, {0, {{{0, 0}}}}, 0, 0 },
  536. { "rl7", 254, {0, {{{0, 0}}}}, 0, 0 },
  537. { "rh7", 255, {0, {{{0, 0}}}}, 0, 0 }
  538. };
  539. CGEN_KEYWORD xc16x_cgen_opval_regbmem8_names =
  540. {
  541. & xc16x_cgen_opval_regbmem8_names_entries[0],
  542. 36,
  543. 0, 0, 0, 0, ""
  544. };
  545. static CGEN_KEYWORD_ENTRY xc16x_cgen_opval_memgr8_names_entries[] =
  546. {
  547. { "dpp0", 65024, {0, {{{0, 0}}}}, 0, 0 },
  548. { "dpp1", 65026, {0, {{{0, 0}}}}, 0, 0 },
  549. { "dpp2", 65028, {0, {{{0, 0}}}}, 0, 0 },
  550. { "dpp3", 65030, {0, {{{0, 0}}}}, 0, 0 },
  551. { "psw", 65296, {0, {{{0, 0}}}}, 0, 0 },
  552. { "cp", 65040, {0, {{{0, 0}}}}, 0, 0 },
  553. { "mdl", 65038, {0, {{{0, 0}}}}, 0, 0 },
  554. { "mdh", 65036, {0, {{{0, 0}}}}, 0, 0 },
  555. { "mdc", 65294, {0, {{{0, 0}}}}, 0, 0 },
  556. { "sp", 65042, {0, {{{0, 0}}}}, 0, 0 },
  557. { "csp", 65032, {0, {{{0, 0}}}}, 0, 0 },
  558. { "vecseg", 65298, {0, {{{0, 0}}}}, 0, 0 },
  559. { "stkov", 65044, {0, {{{0, 0}}}}, 0, 0 },
  560. { "stkun", 65046, {0, {{{0, 0}}}}, 0, 0 },
  561. { "cpucon1", 65048, {0, {{{0, 0}}}}, 0, 0 },
  562. { "cpucon2", 65050, {0, {{{0, 0}}}}, 0, 0 },
  563. { "zeros", 65308, {0, {{{0, 0}}}}, 0, 0 },
  564. { "ones", 65310, {0, {{{0, 0}}}}, 0, 0 },
  565. { "spseg", 65292, {0, {{{0, 0}}}}, 0, 0 },
  566. { "tfr", 65452, {0, {{{0, 0}}}}, 0, 0 }
  567. };
  568. CGEN_KEYWORD xc16x_cgen_opval_memgr8_names =
  569. {
  570. & xc16x_cgen_opval_memgr8_names_entries[0],
  571. 20,
  572. 0, 0, 0, 0, ""
  573. };
  574. /* The hardware table. */
  575. #define A(a) (1 << CGEN_HW_##a)
  576. const CGEN_HW_ENTRY xc16x_cgen_hw_table[] =
  577. {
  578. { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  579. { "h-sint", HW_H_SINT, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  580. { "h-uint", HW_H_UINT, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  581. { "h-addr", HW_H_ADDR, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  582. { "h-iaddr", HW_H_IADDR, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  583. { "h-pc", HW_H_PC, CGEN_ASM_NONE, 0, { 0|A(PC), { { { (1<<MACH_BASE), 0 } } } } },
  584. { "h-gr", HW_H_GR, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_gr_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  585. { "h-cr", HW_H_CR, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_gr_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  586. { "h-ext", HW_H_EXT, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_ext_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  587. { "h-psw", HW_H_PSW, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_psw_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  588. { "h-grb", HW_H_GRB, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_grb_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  589. { "h-cc", HW_H_CC, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_conditioncode_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  590. { "h-ecc", HW_H_ECC, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_extconditioncode_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  591. { "h-grb8", HW_H_GRB8, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_grb8_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  592. { "h-r8", HW_H_R8, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_r8_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  593. { "h-regmem8", HW_H_REGMEM8, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_regmem8_names, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  594. { "h-regdiv8", HW_H_REGDIV8, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_regdiv8_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  595. { "h-r0", HW_H_R0, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_reg0_name, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  596. { "h-r01", HW_H_R01, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_reg0_name1, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  597. { "h-regbmem8", HW_H_REGBMEM8, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_regbmem8_names, { 0|A(CACHE_ADDR)|A(PROFILE), { { { (1<<MACH_BASE), 0 } } } } },
  598. { "h-memgr8", HW_H_MEMGR8, CGEN_ASM_KEYWORD, (PTR) & xc16x_cgen_opval_memgr8_names, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  599. { "h-cond", HW_H_COND, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  600. { "h-cbit", HW_H_CBIT, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  601. { "h-sgtdis", HW_H_SGTDIS, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  602. { 0, 0, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }
  603. };
  604. #undef A
  605. /* The instruction field table. */
  606. #define A(a) (1 << CGEN_IFLD_##a)
  607. const CGEN_IFLD xc16x_cgen_ifld_table[] =
  608. {
  609. { XC16X_F_NIL, "f-nil", 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  610. { XC16X_F_ANYOF, "f-anyof", 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  611. { XC16X_F_OP1, "f-op1", 0, 32, 7, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  612. { XC16X_F_OP2, "f-op2", 0, 32, 3, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  613. { XC16X_F_CONDCODE, "f-condcode", 0, 32, 7, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  614. { XC16X_F_ICONDCODE, "f-icondcode", 0, 32, 15, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  615. { XC16X_F_RCOND, "f-rcond", 0, 32, 7, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  616. { XC16X_F_QCOND, "f-qcond", 0, 32, 7, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  617. { XC16X_F_EXTCCODE, "f-extccode", 0, 32, 15, 5, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  618. { XC16X_F_R0, "f-r0", 0, 32, 9, 2, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  619. { XC16X_F_R1, "f-r1", 0, 32, 15, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  620. { XC16X_F_R2, "f-r2", 0, 32, 11, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  621. { XC16X_F_R3, "f-r3", 0, 32, 12, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  622. { XC16X_F_R4, "f-r4", 0, 32, 11, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  623. { XC16X_F_UIMM2, "f-uimm2", 0, 32, 13, 2, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  624. { XC16X_F_UIMM3, "f-uimm3", 0, 32, 10, 3, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  625. { XC16X_F_UIMM4, "f-uimm4", 0, 32, 15, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  626. { XC16X_F_UIMM7, "f-uimm7", 0, 32, 15, 7, { 0|A(RELOC)|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  627. { XC16X_F_UIMM8, "f-uimm8", 0, 32, 23, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  628. { XC16X_F_UIMM16, "f-uimm16", 0, 32, 31, 16, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  629. { XC16X_F_MEMORY, "f-memory", 0, 32, 31, 16, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  630. { XC16X_F_MEMGR8, "f-memgr8", 0, 32, 31, 16, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  631. { XC16X_F_REL8, "f-rel8", 0, 32, 15, 8, { 0|A(RELOC)|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  632. { XC16X_F_RELHI8, "f-relhi8", 0, 32, 23, 8, { 0|A(RELOC)|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  633. { XC16X_F_REG8, "f-reg8", 0, 32, 15, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  634. { XC16X_F_REGMEM8, "f-regmem8", 0, 32, 15, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  635. { XC16X_F_REGOFF8, "f-regoff8", 0, 32, 15, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  636. { XC16X_F_REGHI8, "f-reghi8", 0, 32, 23, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  637. { XC16X_F_REGB8, "f-regb8", 0, 32, 15, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  638. { XC16X_F_SEG8, "f-seg8", 0, 32, 15, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  639. { XC16X_F_SEGNUM8, "f-segnum8", 0, 32, 23, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  640. { XC16X_F_MASK8, "f-mask8", 0, 32, 23, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  641. { XC16X_F_PAGENUM, "f-pagenum", 0, 32, 25, 10, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  642. { XC16X_F_DATAHI8, "f-datahi8", 0, 32, 31, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  643. { XC16X_F_DATA8, "f-data8", 0, 32, 23, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  644. { XC16X_F_OFFSET16, "f-offset16", 0, 32, 31, 16, { 0|A(RELOC)|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  645. { XC16X_F_OP_BIT1, "f-op-bit1", 0, 32, 11, 1, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  646. { XC16X_F_OP_BIT2, "f-op-bit2", 0, 32, 11, 2, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  647. { XC16X_F_OP_BIT4, "f-op-bit4", 0, 32, 11, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  648. { XC16X_F_OP_BIT3, "f-op-bit3", 0, 32, 10, 3, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  649. { XC16X_F_OP_2BIT, "f-op-2bit", 0, 32, 10, 2, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  650. { XC16X_F_OP_BITONE, "f-op-bitone", 0, 32, 10, 1, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  651. { XC16X_F_OP_ONEBIT, "f-op-onebit", 0, 32, 9, 1, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  652. { XC16X_F_OP_1BIT, "f-op-1bit", 0, 32, 8, 1, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  653. { XC16X_F_OP_LBIT4, "f-op-lbit4", 0, 32, 15, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  654. { XC16X_F_OP_LBIT2, "f-op-lbit2", 0, 32, 15, 2, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  655. { XC16X_F_OP_BIT8, "f-op-bit8", 0, 32, 31, 8, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  656. { XC16X_F_OP_BIT16, "f-op-bit16", 0, 32, 31, 16, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  657. { XC16X_F_QBIT, "f-qbit", 0, 32, 7, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  658. { XC16X_F_QLOBIT, "f-qlobit", 0, 32, 31, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  659. { XC16X_F_QHIBIT, "f-qhibit", 0, 32, 27, 4, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  660. { XC16X_F_QLOBIT2, "f-qlobit2", 0, 32, 27, 2, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  661. { XC16X_F_POF, "f-pof", 0, 32, 31, 16, { 0, { { { (1<<MACH_BASE), 0 } } } } },
  662. { 0, 0, 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } } } } }
  663. };
  664. #undef A
  665. /* multi ifield declarations */
  666. /* multi ifield definitions */
  667. /* The operand table. */
  668. #define A(a) (1 << CGEN_OPERAND_##a)
  669. #define OPERAND(op) XC16X_OPERAND_##op
  670. const CGEN_OPERAND xc16x_cgen_operand_table[] =
  671. {
  672. /* pc: program counter */
  673. { "pc", XC16X_OPERAND_PC, HW_H_PC, 0, 0,
  674. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_NIL] } },
  675. { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } } } } },
  676. /* sr: source register */
  677. { "sr", XC16X_OPERAND_SR, HW_H_GR, 11, 4,
  678. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_R2] } },
  679. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  680. /* dr: destination register */
  681. { "dr", XC16X_OPERAND_DR, HW_H_GR, 15, 4,
  682. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_R1] } },
  683. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  684. /* dri: destination register */
  685. { "dri", XC16X_OPERAND_DRI, HW_H_GR, 11, 4,
  686. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_R4] } },
  687. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  688. /* srb: source register */
  689. { "srb", XC16X_OPERAND_SRB, HW_H_GRB, 11, 4,
  690. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_R2] } },
  691. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  692. /* drb: destination register */
  693. { "drb", XC16X_OPERAND_DRB, HW_H_GRB, 15, 4,
  694. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_R1] } },
  695. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  696. /* sr2: 2 bit source register */
  697. { "sr2", XC16X_OPERAND_SR2, HW_H_GR, 9, 2,
  698. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_R0] } },
  699. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  700. /* src1: source register 1 */
  701. { "src1", XC16X_OPERAND_SRC1, HW_H_GR, 15, 4,
  702. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_R1] } },
  703. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  704. /* src2: source register 2 */
  705. { "src2", XC16X_OPERAND_SRC2, HW_H_GR, 11, 4,
  706. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_R2] } },
  707. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  708. /* srdiv: source register 2 */
  709. { "srdiv", XC16X_OPERAND_SRDIV, HW_H_REGDIV8, 15, 8,
  710. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REG8] } },
  711. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  712. /* RegNam: PSW bits */
  713. { "RegNam", XC16X_OPERAND_REGNAM, HW_H_PSW, 15, 8,
  714. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REG8] } },
  715. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  716. /* uimm2: 2 bit unsigned number */
  717. { "uimm2", XC16X_OPERAND_UIMM2, HW_H_EXT, 13, 2,
  718. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_UIMM2] } },
  719. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  720. /* uimm3: 3 bit unsigned number */
  721. { "uimm3", XC16X_OPERAND_UIMM3, HW_H_R01, 10, 3,
  722. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_UIMM3] } },
  723. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  724. /* uimm4: 4 bit unsigned number */
  725. { "uimm4", XC16X_OPERAND_UIMM4, HW_H_UINT, 15, 4,
  726. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_UIMM4] } },
  727. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  728. /* uimm7: 7 bit trap number */
  729. { "uimm7", XC16X_OPERAND_UIMM7, HW_H_UINT, 15, 7,
  730. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_UIMM7] } },
  731. { 0|A(HASH_PREFIX)|A(RELOC)|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  732. /* uimm8: 8 bit unsigned immediate */
  733. { "uimm8", XC16X_OPERAND_UIMM8, HW_H_UINT, 23, 8,
  734. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_UIMM8] } },
  735. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  736. /* uimm16: 16 bit unsigned immediate */
  737. { "uimm16", XC16X_OPERAND_UIMM16, HW_H_UINT, 31, 16,
  738. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_UIMM16] } },
  739. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  740. /* upof16: 16 bit unsigned immediate */
  741. { "upof16", XC16X_OPERAND_UPOF16, HW_H_ADDR, 31, 16,
  742. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_MEMORY] } },
  743. { 0|A(POF_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  744. /* reg8: 8 bit word register number */
  745. { "reg8", XC16X_OPERAND_REG8, HW_H_R8, 15, 8,
  746. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REG8] } },
  747. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  748. /* regmem8: 8 bit word register number */
  749. { "regmem8", XC16X_OPERAND_REGMEM8, HW_H_REGMEM8, 15, 8,
  750. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REGMEM8] } },
  751. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  752. /* regbmem8: 8 bit byte register number */
  753. { "regbmem8", XC16X_OPERAND_REGBMEM8, HW_H_REGBMEM8, 15, 8,
  754. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REGMEM8] } },
  755. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  756. /* regoff8: 8 bit word register number */
  757. { "regoff8", XC16X_OPERAND_REGOFF8, HW_H_R8, 15, 8,
  758. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REGOFF8] } },
  759. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  760. /* reghi8: 8 bit word register number */
  761. { "reghi8", XC16X_OPERAND_REGHI8, HW_H_R8, 23, 8,
  762. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REGHI8] } },
  763. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  764. /* regb8: 8 bit byte register number */
  765. { "regb8", XC16X_OPERAND_REGB8, HW_H_GRB8, 15, 8,
  766. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REGB8] } },
  767. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  768. /* genreg: 8 bit word register number */
  769. { "genreg", XC16X_OPERAND_GENREG, HW_H_R8, 15, 8,
  770. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REGB8] } },
  771. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  772. /* seg: 8 bit segment number */
  773. { "seg", XC16X_OPERAND_SEG, HW_H_UINT, 15, 8,
  774. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_SEG8] } },
  775. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  776. /* seghi8: 8 bit hi segment number */
  777. { "seghi8", XC16X_OPERAND_SEGHI8, HW_H_UINT, 23, 8,
  778. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_SEGNUM8] } },
  779. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  780. /* caddr: 16 bit address offset */
  781. { "caddr", XC16X_OPERAND_CADDR, HW_H_ADDR, 31, 16,
  782. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OFFSET16] } },
  783. { 0|A(RELOC)|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  784. /* rel: 8 bit signed relative offset */
  785. { "rel", XC16X_OPERAND_REL, HW_H_SINT, 15, 8,
  786. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_REL8] } },
  787. { 0|A(RELOC)|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  788. /* relhi: hi 8 bit signed relative offset */
  789. { "relhi", XC16X_OPERAND_RELHI, HW_H_SINT, 23, 8,
  790. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_RELHI8] } },
  791. { 0|A(RELOC)|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  792. /* condbit: condition bit */
  793. { "condbit", XC16X_OPERAND_CONDBIT, HW_H_COND, 0, 0,
  794. { 0, { (const PTR) 0 } },
  795. { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } } } } },
  796. /* bit1: gap of 1 bit */
  797. { "bit1", XC16X_OPERAND_BIT1, HW_H_UINT, 11, 1,
  798. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OP_BIT1] } },
  799. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  800. /* bit2: gap of 2 bits */
  801. { "bit2", XC16X_OPERAND_BIT2, HW_H_UINT, 11, 2,
  802. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OP_BIT2] } },
  803. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  804. /* bit4: gap of 4 bits */
  805. { "bit4", XC16X_OPERAND_BIT4, HW_H_UINT, 11, 4,
  806. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OP_BIT4] } },
  807. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  808. /* lbit4: gap of 4 bits */
  809. { "lbit4", XC16X_OPERAND_LBIT4, HW_H_UINT, 15, 4,
  810. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OP_LBIT4] } },
  811. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  812. /* lbit2: gap of 2 bits */
  813. { "lbit2", XC16X_OPERAND_LBIT2, HW_H_UINT, 15, 2,
  814. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OP_LBIT2] } },
  815. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  816. /* bit8: gap of 8 bits */
  817. { "bit8", XC16X_OPERAND_BIT8, HW_H_UINT, 31, 8,
  818. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OP_BIT8] } },
  819. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  820. /* u4: gap of 4 bits */
  821. { "u4", XC16X_OPERAND_U4, HW_H_R0, 15, 4,
  822. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_UIMM4] } },
  823. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  824. /* bitone: field of 1 bit */
  825. { "bitone", XC16X_OPERAND_BITONE, HW_H_UINT, 9, 1,
  826. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OP_ONEBIT] } },
  827. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  828. /* bit01: field of 1 bit */
  829. { "bit01", XC16X_OPERAND_BIT01, HW_H_UINT, 8, 1,
  830. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OP_1BIT] } },
  831. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  832. /* cond: condition code */
  833. { "cond", XC16X_OPERAND_COND, HW_H_CC, 7, 4,
  834. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_CONDCODE] } },
  835. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  836. /* icond: indirect condition code */
  837. { "icond", XC16X_OPERAND_ICOND, HW_H_CC, 15, 4,
  838. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_ICONDCODE] } },
  839. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  840. /* extcond: extended condition code */
  841. { "extcond", XC16X_OPERAND_EXTCOND, HW_H_ECC, 15, 5,
  842. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_EXTCCODE] } },
  843. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  844. /* memory: 16 bit memory */
  845. { "memory", XC16X_OPERAND_MEMORY, HW_H_ADDR, 31, 16,
  846. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_MEMORY] } },
  847. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  848. /* memgr8: 16 bit memory */
  849. { "memgr8", XC16X_OPERAND_MEMGR8, HW_H_MEMGR8, 31, 16,
  850. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_MEMGR8] } },
  851. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  852. /* cbit: carry bit */
  853. { "cbit", XC16X_OPERAND_CBIT, HW_H_CBIT, 0, 0,
  854. { 0, { (const PTR) 0 } },
  855. { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } } } } },
  856. /* qbit: bit addr */
  857. { "qbit", XC16X_OPERAND_QBIT, HW_H_UINT, 7, 4,
  858. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_QBIT] } },
  859. { 0|A(DOT_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  860. /* qlobit: bit addr */
  861. { "qlobit", XC16X_OPERAND_QLOBIT, HW_H_UINT, 31, 4,
  862. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_QLOBIT] } },
  863. { 0|A(DOT_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  864. /* qhibit: bit addr */
  865. { "qhibit", XC16X_OPERAND_QHIBIT, HW_H_UINT, 27, 4,
  866. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_QHIBIT] } },
  867. { 0|A(DOT_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  868. /* mask8: 8 bit mask */
  869. { "mask8", XC16X_OPERAND_MASK8, HW_H_UINT, 23, 8,
  870. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_MASK8] } },
  871. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  872. /* masklo8: 8 bit mask */
  873. { "masklo8", XC16X_OPERAND_MASKLO8, HW_H_UINT, 31, 8,
  874. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_DATAHI8] } },
  875. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  876. /* pagenum: 10 bit page number */
  877. { "pagenum", XC16X_OPERAND_PAGENUM, HW_H_UINT, 25, 10,
  878. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_PAGENUM] } },
  879. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  880. /* data8: 8 bit data */
  881. { "data8", XC16X_OPERAND_DATA8, HW_H_UINT, 23, 8,
  882. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_DATA8] } },
  883. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  884. /* datahi8: 8 bit data */
  885. { "datahi8", XC16X_OPERAND_DATAHI8, HW_H_UINT, 31, 8,
  886. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_DATAHI8] } },
  887. { 0|A(HASH_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  888. /* sgtdisbit: segmentation enable bit */
  889. { "sgtdisbit", XC16X_OPERAND_SGTDISBIT, HW_H_SGTDIS, 0, 0,
  890. { 0, { (const PTR) 0 } },
  891. { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } } } } },
  892. /* upag16: 16 bit unsigned immediate */
  893. { "upag16", XC16X_OPERAND_UPAG16, HW_H_UINT, 31, 16,
  894. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_UIMM16] } },
  895. { 0|A(PAG_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  896. /* useg8: 8 bit segment */
  897. { "useg8", XC16X_OPERAND_USEG8, HW_H_UINT, 15, 8,
  898. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_SEG8] } },
  899. { 0|A(SEG_PREFIX), { { { (1<<MACH_BASE), 0 } } } } },
  900. /* useg16: 16 bit address offset */
  901. { "useg16", XC16X_OPERAND_USEG16, HW_H_UINT, 31, 16,
  902. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OFFSET16] } },
  903. { 0|A(SEG_PREFIX)|A(RELOC)|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  904. /* usof16: 16 bit address offset */
  905. { "usof16", XC16X_OPERAND_USOF16, HW_H_UINT, 31, 16,
  906. { 0, { (const PTR) &xc16x_cgen_ifld_table[XC16X_F_OFFSET16] } },
  907. { 0|A(SOF_PREFIX)|A(RELOC)|A(ABS_ADDR), { { { (1<<MACH_BASE), 0 } } } } },
  908. /* hash: # prefix */
  909. { "hash", XC16X_OPERAND_HASH, HW_H_SINT, 0, 0,
  910. { 0, { (const PTR) 0 } },
  911. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  912. /* dot: . prefix */
  913. { "dot", XC16X_OPERAND_DOT, HW_H_SINT, 0, 0,
  914. { 0, { (const PTR) 0 } },
  915. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  916. /* pof: pof: prefix */
  917. { "pof", XC16X_OPERAND_POF, HW_H_SINT, 0, 0,
  918. { 0, { (const PTR) 0 } },
  919. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  920. /* pag: pag: prefix */
  921. { "pag", XC16X_OPERAND_PAG, HW_H_SINT, 0, 0,
  922. { 0, { (const PTR) 0 } },
  923. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  924. /* sof: sof: prefix */
  925. { "sof", XC16X_OPERAND_SOF, HW_H_SINT, 0, 0,
  926. { 0, { (const PTR) 0 } },
  927. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  928. /* segm: seg: prefix */
  929. { "segm", XC16X_OPERAND_SEGM, HW_H_SINT, 0, 0,
  930. { 0, { (const PTR) 0 } },
  931. { 0, { { { (1<<MACH_BASE), 0 } } } } },
  932. /* sentinel */
  933. { 0, 0, 0, 0, 0,
  934. { 0, { (const PTR) 0 } },
  935. { 0, { { { (1<<MACH_BASE), 0 } } } } }
  936. };
  937. #undef A
  938. /* The instruction table. */
  939. #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
  940. #define A(a) (1 << CGEN_INSN_##a)
  941. static const CGEN_IBASE xc16x_cgen_insn_table[MAX_INSNS] =
  942. {
  943. /* Special null first entry.
  944. A `num' value of zero is thus invalid.
  945. Also, the special `invalid' insn resides here. */
  946. { 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_NONE, 0 } } } } },
  947. /* add $reg8,$pof$upof16 */
  948. {
  949. XC16X_INSN_ADDRPOF, "addrpof", "add", 32,
  950. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  951. },
  952. /* sub $reg8,$pof$upof16 */
  953. {
  954. XC16X_INSN_SUBRPOF, "subrpof", "sub", 32,
  955. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  956. },
  957. /* addb $regb8,$pof$upof16 */
  958. {
  959. XC16X_INSN_ADDBRPOF, "addbrpof", "addb", 32,
  960. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  961. },
  962. /* subb $regb8,$pof$upof16 */
  963. {
  964. XC16X_INSN_SUBBRPOF, "subbrpof", "subb", 32,
  965. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  966. },
  967. /* add $reg8,$pag$upag16 */
  968. {
  969. XC16X_INSN_ADDRPAG, "addrpag", "add", 32,
  970. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  971. },
  972. /* sub $reg8,$pag$upag16 */
  973. {
  974. XC16X_INSN_SUBRPAG, "subrpag", "sub", 32,
  975. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  976. },
  977. /* addb $regb8,$pag$upag16 */
  978. {
  979. XC16X_INSN_ADDBRPAG, "addbrpag", "addb", 32,
  980. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  981. },
  982. /* subb $regb8,$pag$upag16 */
  983. {
  984. XC16X_INSN_SUBBRPAG, "subbrpag", "subb", 32,
  985. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  986. },
  987. /* addc $reg8,$pof$upof16 */
  988. {
  989. XC16X_INSN_ADDCRPOF, "addcrpof", "addc", 32,
  990. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  991. },
  992. /* subc $reg8,$pof$upof16 */
  993. {
  994. XC16X_INSN_SUBCRPOF, "subcrpof", "subc", 32,
  995. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  996. },
  997. /* addcb $regb8,$pof$upof16 */
  998. {
  999. XC16X_INSN_ADDCBRPOF, "addcbrpof", "addcb", 32,
  1000. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1001. },
  1002. /* subcb $regb8,$pof$upof16 */
  1003. {
  1004. XC16X_INSN_SUBCBRPOF, "subcbrpof", "subcb", 32,
  1005. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1006. },
  1007. /* addc $reg8,$pag$upag16 */
  1008. {
  1009. XC16X_INSN_ADDCRPAG, "addcrpag", "addc", 32,
  1010. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1011. },
  1012. /* subc $reg8,$pag$upag16 */
  1013. {
  1014. XC16X_INSN_SUBCRPAG, "subcrpag", "subc", 32,
  1015. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1016. },
  1017. /* addcb $regb8,$pag$upag16 */
  1018. {
  1019. XC16X_INSN_ADDCBRPAG, "addcbrpag", "addcb", 32,
  1020. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1021. },
  1022. /* subcb $regb8,$pag$upag16 */
  1023. {
  1024. XC16X_INSN_SUBCBRPAG, "subcbrpag", "subcb", 32,
  1025. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1026. },
  1027. /* add $pof$upof16,$reg8 */
  1028. {
  1029. XC16X_INSN_ADDRPOFR, "addrpofr", "add", 32,
  1030. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1031. },
  1032. /* sub $pof$upof16,$reg8 */
  1033. {
  1034. XC16X_INSN_SUBRPOFR, "subrpofr", "sub", 32,
  1035. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1036. },
  1037. /* addb $pof$upof16,$regb8 */
  1038. {
  1039. XC16X_INSN_ADDBRPOFR, "addbrpofr", "addb", 32,
  1040. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1041. },
  1042. /* subb $pof$upof16,$regb8 */
  1043. {
  1044. XC16X_INSN_SUBBRPOFR, "subbrpofr", "subb", 32,
  1045. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1046. },
  1047. /* addc $pof$upof16,$reg8 */
  1048. {
  1049. XC16X_INSN_ADDCRPOFR, "addcrpofr", "addc", 32,
  1050. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1051. },
  1052. /* subc $pof$upof16,$reg8 */
  1053. {
  1054. XC16X_INSN_SUBCRPOFR, "subcrpofr", "subc", 32,
  1055. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1056. },
  1057. /* addcb $pof$upof16,$regb8 */
  1058. {
  1059. XC16X_INSN_ADDCBRPOFR, "addcbrpofr", "addcb", 32,
  1060. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1061. },
  1062. /* subcb $pof$upof16,$regb8 */
  1063. {
  1064. XC16X_INSN_SUBCBRPOFR, "subcbrpofr", "subcb", 32,
  1065. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1066. },
  1067. /* add $reg8,$hash$pof$uimm16 */
  1068. {
  1069. XC16X_INSN_ADDRHPOF, "addrhpof", "add", 32,
  1070. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1071. },
  1072. /* sub $reg8,$hash$pof$uimm16 */
  1073. {
  1074. XC16X_INSN_SUBRHPOF, "subrhpof", "sub", 32,
  1075. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1076. },
  1077. /* add $reg8,$hash$pag$uimm16 */
  1078. {
  1079. XC16X_INSN_ADDBRHPOF, "addbrhpof", "add", 32,
  1080. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1081. },
  1082. /* sub $reg8,$hash$pag$uimm16 */
  1083. {
  1084. XC16X_INSN_SUBBRHPOF, "subbrhpof", "sub", 32,
  1085. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1086. },
  1087. /* add $dr,$hash$pof$uimm3 */
  1088. {
  1089. XC16X_INSN_ADDRHPOF3, "addrhpof3", "add", 16,
  1090. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1091. },
  1092. /* sub $dr,$hash$pof$uimm3 */
  1093. {
  1094. XC16X_INSN_SUBRHPOF3, "subrhpof3", "sub", 16,
  1095. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1096. },
  1097. /* addb $drb,$hash$pag$uimm3 */
  1098. {
  1099. XC16X_INSN_ADDBRHPAG3, "addbrhpag3", "addb", 16,
  1100. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1101. },
  1102. /* subb $drb,$hash$pag$uimm3 */
  1103. {
  1104. XC16X_INSN_SUBBRHPAG3, "subbrhpag3", "subb", 16,
  1105. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1106. },
  1107. /* add $dr,$hash$pag$uimm3 */
  1108. {
  1109. XC16X_INSN_ADDRHPAG3, "addrhpag3", "add", 16,
  1110. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1111. },
  1112. /* sub $dr,$hash$pag$uimm3 */
  1113. {
  1114. XC16X_INSN_SUBRHPAG3, "subrhpag3", "sub", 16,
  1115. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1116. },
  1117. /* addb $drb,$hash$pof$uimm3 */
  1118. {
  1119. XC16X_INSN_ADDBRHPOF3, "addbrhpof3", "addb", 16,
  1120. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1121. },
  1122. /* subb $drb,$hash$pof$uimm3 */
  1123. {
  1124. XC16X_INSN_SUBBRHPOF3, "subbrhpof3", "subb", 16,
  1125. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1126. },
  1127. /* addb $regb8,$hash$pof$uimm8 */
  1128. {
  1129. XC16X_INSN_ADDRBHPOF, "addrbhpof", "addb", 32,
  1130. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1131. },
  1132. /* subb $regb8,$hash$pof$uimm8 */
  1133. {
  1134. XC16X_INSN_SUBRBHPOF, "subrbhpof", "subb", 32,
  1135. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1136. },
  1137. /* addb $regb8,$hash$pag$uimm8 */
  1138. {
  1139. XC16X_INSN_ADDBRHPAG, "addbrhpag", "addb", 32,
  1140. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1141. },
  1142. /* subb $regb8,$hash$pag$uimm8 */
  1143. {
  1144. XC16X_INSN_SUBBRHPAG, "subbrhpag", "subb", 32,
  1145. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1146. },
  1147. /* addc $reg8,$hash$pof$uimm16 */
  1148. {
  1149. XC16X_INSN_ADDCRHPOF, "addcrhpof", "addc", 32,
  1150. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1151. },
  1152. /* subc $reg8,$hash$pof$uimm16 */
  1153. {
  1154. XC16X_INSN_SUBCRHPOF, "subcrhpof", "subc", 32,
  1155. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1156. },
  1157. /* addc $reg8,$hash$pag$uimm16 */
  1158. {
  1159. XC16X_INSN_ADDCBRHPOF, "addcbrhpof", "addc", 32,
  1160. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1161. },
  1162. /* subc $reg8,$hash$pag$uimm16 */
  1163. {
  1164. XC16X_INSN_SUBCBRHPOF, "subcbrhpof", "subc", 32,
  1165. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1166. },
  1167. /* addc $dr,$hash$pof$uimm3 */
  1168. {
  1169. XC16X_INSN_ADDCRHPOF3, "addcrhpof3", "addc", 16,
  1170. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1171. },
  1172. /* subc $dr,$hash$pof$uimm3 */
  1173. {
  1174. XC16X_INSN_SUBCRHPOF3, "subcrhpof3", "subc", 16,
  1175. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1176. },
  1177. /* addcb $drb,$hash$pag$uimm3 */
  1178. {
  1179. XC16X_INSN_ADDCBRHPAG3, "addcbrhpag3", "addcb", 16,
  1180. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1181. },
  1182. /* subcb $drb,$hash$pag$uimm3 */
  1183. {
  1184. XC16X_INSN_SUBCBRHPAG3, "subcbrhpag3", "subcb", 16,
  1185. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1186. },
  1187. /* addc $dr,$hash$pag$uimm3 */
  1188. {
  1189. XC16X_INSN_ADDCRHPAG3, "addcrhpag3", "addc", 16,
  1190. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1191. },
  1192. /* subc $dr,$hash$pag$uimm3 */
  1193. {
  1194. XC16X_INSN_SUBCRHPAG3, "subcrhpag3", "subc", 16,
  1195. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1196. },
  1197. /* addcb $drb,$hash$pof$uimm3 */
  1198. {
  1199. XC16X_INSN_ADDCBRHPOF3, "addcbrhpof3", "addcb", 16,
  1200. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1201. },
  1202. /* subcb $drb,$hash$pof$uimm3 */
  1203. {
  1204. XC16X_INSN_SUBCBRHPOF3, "subcbrhpof3", "subcb", 16,
  1205. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1206. },
  1207. /* addcb $regb8,$hash$pof$uimm8 */
  1208. {
  1209. XC16X_INSN_ADDCRBHPOF, "addcrbhpof", "addcb", 32,
  1210. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1211. },
  1212. /* subcb $regb8,$hash$pof$uimm8 */
  1213. {
  1214. XC16X_INSN_SUBCRBHPOF, "subcrbhpof", "subcb", 32,
  1215. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1216. },
  1217. /* addcb $regb8,$hash$pag$uimm8 */
  1218. {
  1219. XC16X_INSN_ADDCBRHPAG, "addcbrhpag", "addcb", 32,
  1220. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1221. },
  1222. /* subcb $regb8,$hash$pag$uimm8 */
  1223. {
  1224. XC16X_INSN_SUBCBRHPAG, "subcbrhpag", "subcb", 32,
  1225. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1226. },
  1227. /* add $dr,$hash$uimm3 */
  1228. {
  1229. XC16X_INSN_ADDRI, "addri", "add", 16,
  1230. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1231. },
  1232. /* sub $dr,$hash$uimm3 */
  1233. {
  1234. XC16X_INSN_SUBRI, "subri", "sub", 16,
  1235. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1236. },
  1237. /* addb $drb,$hash$uimm3 */
  1238. {
  1239. XC16X_INSN_ADDBRI, "addbri", "addb", 16,
  1240. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1241. },
  1242. /* subb $drb,$hash$uimm3 */
  1243. {
  1244. XC16X_INSN_SUBBRI, "subbri", "subb", 16,
  1245. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1246. },
  1247. /* add $reg8,$hash$uimm16 */
  1248. {
  1249. XC16X_INSN_ADDRIM, "addrim", "add", 32,
  1250. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1251. },
  1252. /* sub $reg8,$hash$uimm16 */
  1253. {
  1254. XC16X_INSN_SUBRIM, "subrim", "sub", 32,
  1255. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1256. },
  1257. /* addb $regb8,$hash$uimm8 */
  1258. {
  1259. XC16X_INSN_ADDBRIM, "addbrim", "addb", 32,
  1260. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1261. },
  1262. /* subb $regb8,$hash$uimm8 */
  1263. {
  1264. XC16X_INSN_SUBBRIM, "subbrim", "subb", 32,
  1265. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1266. },
  1267. /* addc $dr,$hash$uimm3 */
  1268. {
  1269. XC16X_INSN_ADDCRI, "addcri", "addc", 16,
  1270. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1271. },
  1272. /* subc $dr,$hash$uimm3 */
  1273. {
  1274. XC16X_INSN_SUBCRI, "subcri", "subc", 16,
  1275. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1276. },
  1277. /* addcb $drb,$hash$uimm3 */
  1278. {
  1279. XC16X_INSN_ADDCBRI, "addcbri", "addcb", 16,
  1280. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1281. },
  1282. /* subcb $drb,$hash$uimm3 */
  1283. {
  1284. XC16X_INSN_SUBCBRI, "subcbri", "subcb", 16,
  1285. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1286. },
  1287. /* addc $reg8,$hash$uimm16 */
  1288. {
  1289. XC16X_INSN_ADDCRIM, "addcrim", "addc", 32,
  1290. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1291. },
  1292. /* subc $reg8,$hash$uimm16 */
  1293. {
  1294. XC16X_INSN_SUBCRIM, "subcrim", "subc", 32,
  1295. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1296. },
  1297. /* addcb $regb8,$hash$uimm8 */
  1298. {
  1299. XC16X_INSN_ADDCBRIM, "addcbrim", "addcb", 32,
  1300. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1301. },
  1302. /* subcb $regb8,$hash$uimm8 */
  1303. {
  1304. XC16X_INSN_SUBCBRIM, "subcbrim", "subcb", 32,
  1305. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1306. },
  1307. /* add $dr,$sr */
  1308. {
  1309. XC16X_INSN_ADDR, "addr", "add", 16,
  1310. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1311. },
  1312. /* sub $dr,$sr */
  1313. {
  1314. XC16X_INSN_SUBR, "subr", "sub", 16,
  1315. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1316. },
  1317. /* addb $drb,$srb */
  1318. {
  1319. XC16X_INSN_ADDBR, "addbr", "addb", 16,
  1320. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1321. },
  1322. /* subb $drb,$srb */
  1323. {
  1324. XC16X_INSN_SUBBR, "subbr", "subb", 16,
  1325. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1326. },
  1327. /* add $dr,[$sr2] */
  1328. {
  1329. XC16X_INSN_ADD2, "add2", "add", 16,
  1330. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1331. },
  1332. /* sub $dr,[$sr2] */
  1333. {
  1334. XC16X_INSN_SUB2, "sub2", "sub", 16,
  1335. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1336. },
  1337. /* addb $drb,[$sr2] */
  1338. {
  1339. XC16X_INSN_ADDB2, "addb2", "addb", 16,
  1340. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1341. },
  1342. /* subb $drb,[$sr2] */
  1343. {
  1344. XC16X_INSN_SUBB2, "subb2", "subb", 16,
  1345. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1346. },
  1347. /* add $dr,[$sr2+] */
  1348. {
  1349. XC16X_INSN_ADD2I, "add2i", "add", 16,
  1350. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1351. },
  1352. /* sub $dr,[$sr2+] */
  1353. {
  1354. XC16X_INSN_SUB2I, "sub2i", "sub", 16,
  1355. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1356. },
  1357. /* addb $drb,[$sr2+] */
  1358. {
  1359. XC16X_INSN_ADDB2I, "addb2i", "addb", 16,
  1360. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1361. },
  1362. /* subb $drb,[$sr2+] */
  1363. {
  1364. XC16X_INSN_SUBB2I, "subb2i", "subb", 16,
  1365. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1366. },
  1367. /* addc $dr,$sr */
  1368. {
  1369. XC16X_INSN_ADDCR, "addcr", "addc", 16,
  1370. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1371. },
  1372. /* subc $dr,$sr */
  1373. {
  1374. XC16X_INSN_SUBCR, "subcr", "subc", 16,
  1375. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1376. },
  1377. /* addcb $drb,$srb */
  1378. {
  1379. XC16X_INSN_ADDBCR, "addbcr", "addcb", 16,
  1380. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1381. },
  1382. /* subcb $drb,$srb */
  1383. {
  1384. XC16X_INSN_SUBBCR, "subbcr", "subcb", 16,
  1385. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1386. },
  1387. /* addc $dr,[$sr2] */
  1388. {
  1389. XC16X_INSN_ADDCR2, "addcr2", "addc", 16,
  1390. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1391. },
  1392. /* subc $dr,[$sr2] */
  1393. {
  1394. XC16X_INSN_SUBCR2, "subcr2", "subc", 16,
  1395. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1396. },
  1397. /* addcb $drb,[$sr2] */
  1398. {
  1399. XC16X_INSN_ADDBCR2, "addbcr2", "addcb", 16,
  1400. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1401. },
  1402. /* subcb $drb,[$sr2] */
  1403. {
  1404. XC16X_INSN_SUBBCR2, "subbcr2", "subcb", 16,
  1405. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1406. },
  1407. /* addc $dr,[$sr2+] */
  1408. {
  1409. XC16X_INSN_ADDCR2I, "addcr2i", "addc", 16,
  1410. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1411. },
  1412. /* subc $dr,[$sr2+] */
  1413. {
  1414. XC16X_INSN_SUBCR2I, "subcr2i", "subc", 16,
  1415. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1416. },
  1417. /* addcb $drb,[$sr2+] */
  1418. {
  1419. XC16X_INSN_ADDBCR2I, "addbcr2i", "addcb", 16,
  1420. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1421. },
  1422. /* subcb $drb,[$sr2+] */
  1423. {
  1424. XC16X_INSN_SUBBCR2I, "subbcr2i", "subcb", 16,
  1425. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1426. },
  1427. /* add $regmem8,$memgr8 */
  1428. {
  1429. XC16X_INSN_ADDRM2, "addrm2", "add", 32,
  1430. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1431. },
  1432. /* add $memgr8,$regmem8 */
  1433. {
  1434. XC16X_INSN_ADDRM3, "addrm3", "add", 32,
  1435. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1436. },
  1437. /* add $reg8,$memory */
  1438. {
  1439. XC16X_INSN_ADDRM, "addrm", "add", 32,
  1440. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1441. },
  1442. /* add $memory,$reg8 */
  1443. {
  1444. XC16X_INSN_ADDRM1, "addrm1", "add", 32,
  1445. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1446. },
  1447. /* sub $regmem8,$memgr8 */
  1448. {
  1449. XC16X_INSN_SUBRM3, "subrm3", "sub", 32,
  1450. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1451. },
  1452. /* sub $memgr8,$regmem8 */
  1453. {
  1454. XC16X_INSN_SUBRM2, "subrm2", "sub", 32,
  1455. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1456. },
  1457. /* sub $reg8,$memory */
  1458. {
  1459. XC16X_INSN_SUBRM1, "subrm1", "sub", 32,
  1460. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1461. },
  1462. /* sub $memory,$reg8 */
  1463. {
  1464. XC16X_INSN_SUBRM, "subrm", "sub", 32,
  1465. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1466. },
  1467. /* addb $regbmem8,$memgr8 */
  1468. {
  1469. XC16X_INSN_ADDBRM2, "addbrm2", "addb", 32,
  1470. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1471. },
  1472. /* addb $memgr8,$regbmem8 */
  1473. {
  1474. XC16X_INSN_ADDBRM3, "addbrm3", "addb", 32,
  1475. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1476. },
  1477. /* addb $regb8,$memory */
  1478. {
  1479. XC16X_INSN_ADDBRM, "addbrm", "addb", 32,
  1480. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1481. },
  1482. /* addb $memory,$regb8 */
  1483. {
  1484. XC16X_INSN_ADDBRM1, "addbrm1", "addb", 32,
  1485. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1486. },
  1487. /* subb $regbmem8,$memgr8 */
  1488. {
  1489. XC16X_INSN_SUBBRM3, "subbrm3", "subb", 32,
  1490. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1491. },
  1492. /* subb $memgr8,$regbmem8 */
  1493. {
  1494. XC16X_INSN_SUBBRM2, "subbrm2", "subb", 32,
  1495. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1496. },
  1497. /* subb $regb8,$memory */
  1498. {
  1499. XC16X_INSN_SUBBRM1, "subbrm1", "subb", 32,
  1500. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1501. },
  1502. /* subb $memory,$regb8 */
  1503. {
  1504. XC16X_INSN_SUBBRM, "subbrm", "subb", 32,
  1505. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1506. },
  1507. /* addc $regmem8,$memgr8 */
  1508. {
  1509. XC16X_INSN_ADDCRM2, "addcrm2", "addc", 32,
  1510. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1511. },
  1512. /* addc $memgr8,$regmem8 */
  1513. {
  1514. XC16X_INSN_ADDCRM3, "addcrm3", "addc", 32,
  1515. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1516. },
  1517. /* addc $reg8,$memory */
  1518. {
  1519. XC16X_INSN_ADDCRM, "addcrm", "addc", 32,
  1520. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1521. },
  1522. /* addc $memory,$reg8 */
  1523. {
  1524. XC16X_INSN_ADDCRM1, "addcrm1", "addc", 32,
  1525. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1526. },
  1527. /* subc $regmem8,$memgr8 */
  1528. {
  1529. XC16X_INSN_SUBCRM3, "subcrm3", "subc", 32,
  1530. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1531. },
  1532. /* subc $memgr8,$regmem8 */
  1533. {
  1534. XC16X_INSN_SUBCRM2, "subcrm2", "subc", 32,
  1535. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1536. },
  1537. /* subc $reg8,$memory */
  1538. {
  1539. XC16X_INSN_SUBCRM1, "subcrm1", "subc", 32,
  1540. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1541. },
  1542. /* subc $memory,$reg8 */
  1543. {
  1544. XC16X_INSN_SUBCRM, "subcrm", "subc", 32,
  1545. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1546. },
  1547. /* addcb $regbmem8,$memgr8 */
  1548. {
  1549. XC16X_INSN_ADDCBRM2, "addcbrm2", "addcb", 32,
  1550. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1551. },
  1552. /* addcb $memgr8,$regbmem8 */
  1553. {
  1554. XC16X_INSN_ADDCBRM3, "addcbrm3", "addcb", 32,
  1555. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1556. },
  1557. /* addcb $regb8,$memory */
  1558. {
  1559. XC16X_INSN_ADDCBRM, "addcbrm", "addcb", 32,
  1560. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1561. },
  1562. /* addcb $memory,$regb8 */
  1563. {
  1564. XC16X_INSN_ADDCBRM1, "addcbrm1", "addcb", 32,
  1565. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1566. },
  1567. /* subcb $regbmem8,$memgr8 */
  1568. {
  1569. XC16X_INSN_SUBCBRM3, "subcbrm3", "subcb", 32,
  1570. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1571. },
  1572. /* subcb $memgr8,$regbmem8 */
  1573. {
  1574. XC16X_INSN_SUBCBRM2, "subcbrm2", "subcb", 32,
  1575. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1576. },
  1577. /* subcb $regb8,$memory */
  1578. {
  1579. XC16X_INSN_SUBCBRM1, "subcbrm1", "subcb", 32,
  1580. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1581. },
  1582. /* subcb $memory,$regb8 */
  1583. {
  1584. XC16X_INSN_SUBCBRM, "subcbrm", "subcb", 32,
  1585. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1586. },
  1587. /* mul $src1,$src2 */
  1588. {
  1589. XC16X_INSN_MULS, "muls", "mul", 16,
  1590. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1591. },
  1592. /* mulu $src1,$src2 */
  1593. {
  1594. XC16X_INSN_MULU, "mulu", "mulu", 16,
  1595. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1596. },
  1597. /* div $srdiv */
  1598. {
  1599. XC16X_INSN_DIV, "div", "div", 16,
  1600. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1601. },
  1602. /* divl $srdiv */
  1603. {
  1604. XC16X_INSN_DIVL, "divl", "divl", 16,
  1605. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1606. },
  1607. /* divlu $srdiv */
  1608. {
  1609. XC16X_INSN_DIVLU, "divlu", "divlu", 16,
  1610. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1611. },
  1612. /* divu $srdiv */
  1613. {
  1614. XC16X_INSN_DIVU, "divu", "divu", 16,
  1615. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1616. },
  1617. /* cpl $dr */
  1618. {
  1619. XC16X_INSN_CPL, "cpl", "cpl", 16,
  1620. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1621. },
  1622. /* cplb $drb */
  1623. {
  1624. XC16X_INSN_CPLB, "cplb", "cplb", 16,
  1625. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1626. },
  1627. /* neg $dr */
  1628. {
  1629. XC16X_INSN_NEG, "neg", "neg", 16,
  1630. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1631. },
  1632. /* negb $drb */
  1633. {
  1634. XC16X_INSN_NEGB, "negb", "negb", 16,
  1635. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1636. },
  1637. /* and $dr,$sr */
  1638. {
  1639. XC16X_INSN_ANDR, "andr", "and", 16,
  1640. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1641. },
  1642. /* or $dr,$sr */
  1643. {
  1644. XC16X_INSN_ORR, "orr", "or", 16,
  1645. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1646. },
  1647. /* xor $dr,$sr */
  1648. {
  1649. XC16X_INSN_XORR, "xorr", "xor", 16,
  1650. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1651. },
  1652. /* andb $drb,$srb */
  1653. {
  1654. XC16X_INSN_ANDBR, "andbr", "andb", 16,
  1655. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1656. },
  1657. /* orb $drb,$srb */
  1658. {
  1659. XC16X_INSN_ORBR, "orbr", "orb", 16,
  1660. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1661. },
  1662. /* xorb $drb,$srb */
  1663. {
  1664. XC16X_INSN_XORBR, "xorbr", "xorb", 16,
  1665. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1666. },
  1667. /* and $dr,$hash$uimm3 */
  1668. {
  1669. XC16X_INSN_ANDRI, "andri", "and", 16,
  1670. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1671. },
  1672. /* or $dr,$hash$uimm3 */
  1673. {
  1674. XC16X_INSN_ORRI, "orri", "or", 16,
  1675. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1676. },
  1677. /* xor $dr,$hash$uimm3 */
  1678. {
  1679. XC16X_INSN_XORRI, "xorri", "xor", 16,
  1680. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1681. },
  1682. /* andb $drb,$hash$uimm3 */
  1683. {
  1684. XC16X_INSN_ANDBRI, "andbri", "andb", 16,
  1685. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1686. },
  1687. /* orb $drb,$hash$uimm3 */
  1688. {
  1689. XC16X_INSN_ORBRI, "orbri", "orb", 16,
  1690. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1691. },
  1692. /* xorb $drb,$hash$uimm3 */
  1693. {
  1694. XC16X_INSN_XORBRI, "xorbri", "xorb", 16,
  1695. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1696. },
  1697. /* and $reg8,$hash$uimm16 */
  1698. {
  1699. XC16X_INSN_ANDRIM, "andrim", "and", 32,
  1700. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1701. },
  1702. /* or $reg8,$hash$uimm16 */
  1703. {
  1704. XC16X_INSN_ORRIM, "orrim", "or", 32,
  1705. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1706. },
  1707. /* xor $reg8,$hash$uimm16 */
  1708. {
  1709. XC16X_INSN_XORRIM, "xorrim", "xor", 32,
  1710. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1711. },
  1712. /* andb $regb8,$hash$uimm8 */
  1713. {
  1714. XC16X_INSN_ANDBRIM, "andbrim", "andb", 32,
  1715. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1716. },
  1717. /* orb $regb8,$hash$uimm8 */
  1718. {
  1719. XC16X_INSN_ORBRIM, "orbrim", "orb", 32,
  1720. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1721. },
  1722. /* xorb $regb8,$hash$uimm8 */
  1723. {
  1724. XC16X_INSN_XORBRIM, "xorbrim", "xorb", 32,
  1725. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1726. },
  1727. /* and $dr,[$sr2] */
  1728. {
  1729. XC16X_INSN_AND2, "and2", "and", 16,
  1730. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1731. },
  1732. /* or $dr,[$sr2] */
  1733. {
  1734. XC16X_INSN_OR2, "or2", "or", 16,
  1735. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1736. },
  1737. /* xor $dr,[$sr2] */
  1738. {
  1739. XC16X_INSN_XOR2, "xor2", "xor", 16,
  1740. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1741. },
  1742. /* andb $drb,[$sr2] */
  1743. {
  1744. XC16X_INSN_ANDB2, "andb2", "andb", 16,
  1745. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1746. },
  1747. /* orb $drb,[$sr2] */
  1748. {
  1749. XC16X_INSN_ORB2, "orb2", "orb", 16,
  1750. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1751. },
  1752. /* xorb $drb,[$sr2] */
  1753. {
  1754. XC16X_INSN_XORB2, "xorb2", "xorb", 16,
  1755. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1756. },
  1757. /* and $dr,[$sr2+] */
  1758. {
  1759. XC16X_INSN_AND2I, "and2i", "and", 16,
  1760. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1761. },
  1762. /* or $dr,[$sr2+] */
  1763. {
  1764. XC16X_INSN_OR2I, "or2i", "or", 16,
  1765. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1766. },
  1767. /* xor $dr,[$sr2+] */
  1768. {
  1769. XC16X_INSN_XOR2I, "xor2i", "xor", 16,
  1770. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1771. },
  1772. /* andb $drb,[$sr2+] */
  1773. {
  1774. XC16X_INSN_ANDB2I, "andb2i", "andb", 16,
  1775. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1776. },
  1777. /* orb $drb,[$sr2+] */
  1778. {
  1779. XC16X_INSN_ORB2I, "orb2i", "orb", 16,
  1780. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1781. },
  1782. /* xorb $drb,[$sr2+] */
  1783. {
  1784. XC16X_INSN_XORB2I, "xorb2i", "xorb", 16,
  1785. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1786. },
  1787. /* and $pof$reg8,$upof16 */
  1788. {
  1789. XC16X_INSN_ANDPOFR, "andpofr", "and", 32,
  1790. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1791. },
  1792. /* or $pof$reg8,$upof16 */
  1793. {
  1794. XC16X_INSN_ORPOFR, "orpofr", "or", 32,
  1795. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1796. },
  1797. /* xor $pof$reg8,$upof16 */
  1798. {
  1799. XC16X_INSN_XORPOFR, "xorpofr", "xor", 32,
  1800. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1801. },
  1802. /* andb $pof$regb8,$upof16 */
  1803. {
  1804. XC16X_INSN_ANDBPOFR, "andbpofr", "andb", 32,
  1805. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1806. },
  1807. /* orb $pof$regb8,$upof16 */
  1808. {
  1809. XC16X_INSN_ORBPOFR, "orbpofr", "orb", 32,
  1810. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1811. },
  1812. /* xorb $pof$regb8,$upof16 */
  1813. {
  1814. XC16X_INSN_XORBPOFR, "xorbpofr", "xorb", 32,
  1815. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1816. },
  1817. /* and $pof$upof16,$reg8 */
  1818. {
  1819. XC16X_INSN_ANDRPOFR, "andrpofr", "and", 32,
  1820. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1821. },
  1822. /* or $pof$upof16,$reg8 */
  1823. {
  1824. XC16X_INSN_ORRPOFR, "orrpofr", "or", 32,
  1825. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1826. },
  1827. /* xor $pof$upof16,$reg8 */
  1828. {
  1829. XC16X_INSN_XORRPOFR, "xorrpofr", "xor", 32,
  1830. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1831. },
  1832. /* andb $pof$upof16,$regb8 */
  1833. {
  1834. XC16X_INSN_ANDBRPOFR, "andbrpofr", "andb", 32,
  1835. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1836. },
  1837. /* orb $pof$upof16,$regb8 */
  1838. {
  1839. XC16X_INSN_ORBRPOFR, "orbrpofr", "orb", 32,
  1840. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1841. },
  1842. /* xorb $pof$upof16,$regb8 */
  1843. {
  1844. XC16X_INSN_XORBRPOFR, "xorbrpofr", "xorb", 32,
  1845. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1846. },
  1847. /* and $regmem8,$memgr8 */
  1848. {
  1849. XC16X_INSN_ANDRM2, "andrm2", "and", 32,
  1850. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1851. },
  1852. /* and $memgr8,$regmem8 */
  1853. {
  1854. XC16X_INSN_ANDRM3, "andrm3", "and", 32,
  1855. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1856. },
  1857. /* and $reg8,$memory */
  1858. {
  1859. XC16X_INSN_ANDRM, "andrm", "and", 32,
  1860. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1861. },
  1862. /* and $memory,$reg8 */
  1863. {
  1864. XC16X_INSN_ANDRM1, "andrm1", "and", 32,
  1865. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1866. },
  1867. /* or $regmem8,$memgr8 */
  1868. {
  1869. XC16X_INSN_ORRM3, "orrm3", "or", 32,
  1870. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1871. },
  1872. /* or $memgr8,$regmem8 */
  1873. {
  1874. XC16X_INSN_ORRM2, "orrm2", "or", 32,
  1875. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1876. },
  1877. /* or $reg8,$memory */
  1878. {
  1879. XC16X_INSN_ORRM1, "orrm1", "or", 32,
  1880. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1881. },
  1882. /* or $memory,$reg8 */
  1883. {
  1884. XC16X_INSN_ORRM, "orrm", "or", 32,
  1885. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1886. },
  1887. /* xor $regmem8,$memgr8 */
  1888. {
  1889. XC16X_INSN_XORRM3, "xorrm3", "xor", 32,
  1890. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1891. },
  1892. /* xor $memgr8,$regmem8 */
  1893. {
  1894. XC16X_INSN_XORRM2, "xorrm2", "xor", 32,
  1895. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1896. },
  1897. /* xor $reg8,$memory */
  1898. {
  1899. XC16X_INSN_XORRM1, "xorrm1", "xor", 32,
  1900. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1901. },
  1902. /* xor $memory,$reg8 */
  1903. {
  1904. XC16X_INSN_XORRM, "xorrm", "xor", 32,
  1905. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1906. },
  1907. /* andb $regbmem8,$memgr8 */
  1908. {
  1909. XC16X_INSN_ANDBRM2, "andbrm2", "andb", 32,
  1910. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1911. },
  1912. /* andb $memgr8,$regbmem8 */
  1913. {
  1914. XC16X_INSN_ANDBRM3, "andbrm3", "andb", 32,
  1915. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1916. },
  1917. /* andb $regb8,$memory */
  1918. {
  1919. XC16X_INSN_ANDBRM, "andbrm", "andb", 32,
  1920. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1921. },
  1922. /* andb $memory,$regb8 */
  1923. {
  1924. XC16X_INSN_ANDBRM1, "andbrm1", "andb", 32,
  1925. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1926. },
  1927. /* orb $regbmem8,$memgr8 */
  1928. {
  1929. XC16X_INSN_ORBRM3, "orbrm3", "orb", 32,
  1930. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1931. },
  1932. /* orb $memgr8,$regbmem8 */
  1933. {
  1934. XC16X_INSN_ORBRM2, "orbrm2", "orb", 32,
  1935. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1936. },
  1937. /* orb $regb8,$memory */
  1938. {
  1939. XC16X_INSN_ORBRM1, "orbrm1", "orb", 32,
  1940. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1941. },
  1942. /* orb $memory,$regb8 */
  1943. {
  1944. XC16X_INSN_ORBRM, "orbrm", "orb", 32,
  1945. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1946. },
  1947. /* xorb $regbmem8,$memgr8 */
  1948. {
  1949. XC16X_INSN_XORBRM3, "xorbrm3", "xorb", 32,
  1950. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1951. },
  1952. /* xorb $memgr8,$regbmem8 */
  1953. {
  1954. XC16X_INSN_XORBRM2, "xorbrm2", "xorb", 32,
  1955. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1956. },
  1957. /* xorb $regb8,$memory */
  1958. {
  1959. XC16X_INSN_XORBRM1, "xorbrm1", "xorb", 32,
  1960. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1961. },
  1962. /* xorb $memory,$regb8 */
  1963. {
  1964. XC16X_INSN_XORBRM, "xorbrm", "xorb", 32,
  1965. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1966. },
  1967. /* mov $dr,$sr */
  1968. {
  1969. XC16X_INSN_MOVR, "movr", "mov", 16,
  1970. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1971. },
  1972. /* movb $drb,$srb */
  1973. {
  1974. XC16X_INSN_MOVRB, "movrb", "movb", 16,
  1975. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1976. },
  1977. /* mov $dri,$hash$u4 */
  1978. {
  1979. XC16X_INSN_MOVRI, "movri", "mov", 16,
  1980. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1981. },
  1982. /* movb $srb,$hash$u4 */
  1983. {
  1984. XC16X_INSN_MOVBRI, "movbri", "movb", 16,
  1985. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1986. },
  1987. /* mov $reg8,$hash$uimm16 */
  1988. {
  1989. XC16X_INSN_MOVI, "movi", "mov", 32,
  1990. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1991. },
  1992. /* movb $regb8,$hash$uimm8 */
  1993. {
  1994. XC16X_INSN_MOVBI, "movbi", "movb", 32,
  1995. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  1996. },
  1997. /* mov $dr,[$sr] */
  1998. {
  1999. XC16X_INSN_MOVR2, "movr2", "mov", 16,
  2000. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2001. },
  2002. /* movb $drb,[$sr] */
  2003. {
  2004. XC16X_INSN_MOVBR2, "movbr2", "movb", 16,
  2005. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2006. },
  2007. /* mov [$sr],$dr */
  2008. {
  2009. XC16X_INSN_MOVRI2, "movri2", "mov", 16,
  2010. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2011. },
  2012. /* movb [$sr],$drb */
  2013. {
  2014. XC16X_INSN_MOVBRI2, "movbri2", "movb", 16,
  2015. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2016. },
  2017. /* mov [-$sr],$dr */
  2018. {
  2019. XC16X_INSN_MOVRI3, "movri3", "mov", 16,
  2020. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2021. },
  2022. /* movb [-$sr],$drb */
  2023. {
  2024. XC16X_INSN_MOVBRI3, "movbri3", "movb", 16,
  2025. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2026. },
  2027. /* mov $dr,[$sr+] */
  2028. {
  2029. XC16X_INSN_MOV2I, "mov2i", "mov", 16,
  2030. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2031. },
  2032. /* movb $drb,[$sr+] */
  2033. {
  2034. XC16X_INSN_MOVB2I, "movb2i", "movb", 16,
  2035. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2036. },
  2037. /* mov [$dr],[$sr] */
  2038. {
  2039. XC16X_INSN_MOV6I, "mov6i", "mov", 16,
  2040. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2041. },
  2042. /* movb [$dr],[$sr] */
  2043. {
  2044. XC16X_INSN_MOVB6I, "movb6i", "movb", 16,
  2045. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2046. },
  2047. /* mov [$dr+],[$sr] */
  2048. {
  2049. XC16X_INSN_MOV7I, "mov7i", "mov", 16,
  2050. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2051. },
  2052. /* movb [$dr+],[$sr] */
  2053. {
  2054. XC16X_INSN_MOVB7I, "movb7i", "movb", 16,
  2055. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2056. },
  2057. /* mov [$dr],[$sr+] */
  2058. {
  2059. XC16X_INSN_MOV8I, "mov8i", "mov", 16,
  2060. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2061. },
  2062. /* movb [$dr],[$sr+] */
  2063. {
  2064. XC16X_INSN_MOVB8I, "movb8i", "movb", 16,
  2065. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2066. },
  2067. /* mov $dr,[$sr+$hash$uimm16] */
  2068. {
  2069. XC16X_INSN_MOV9I, "mov9i", "mov", 32,
  2070. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2071. },
  2072. /* movb $drb,[$sr+$hash$uimm16] */
  2073. {
  2074. XC16X_INSN_MOVB9I, "movb9i", "movb", 32,
  2075. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2076. },
  2077. /* mov [$sr+$hash$uimm16],$dr */
  2078. {
  2079. XC16X_INSN_MOV10I, "mov10i", "mov", 32,
  2080. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2081. },
  2082. /* movb [$sr+$hash$uimm16],$drb */
  2083. {
  2084. XC16X_INSN_MOVB10I, "movb10i", "movb", 32,
  2085. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2086. },
  2087. /* mov [$src2],$memory */
  2088. {
  2089. XC16X_INSN_MOVRI11, "movri11", "mov", 32,
  2090. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2091. },
  2092. /* movb [$src2],$memory */
  2093. {
  2094. XC16X_INSN_MOVBRI11, "movbri11", "movb", 32,
  2095. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2096. },
  2097. /* mov $memory,[$src2] */
  2098. {
  2099. XC16X_INSN_MOVRI12, "movri12", "mov", 32,
  2100. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2101. },
  2102. /* movb $memory,[$src2] */
  2103. {
  2104. XC16X_INSN_MOVBRI12, "movbri12", "movb", 32,
  2105. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2106. },
  2107. /* mov $regoff8,$hash$pof$upof16 */
  2108. {
  2109. XC16X_INSN_MOVEHM5, "movehm5", "mov", 32,
  2110. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2111. },
  2112. /* mov $regoff8,$hash$pag$upag16 */
  2113. {
  2114. XC16X_INSN_MOVEHM6, "movehm6", "mov", 32,
  2115. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2116. },
  2117. /* mov $regoff8,$hash$segm$useg16 */
  2118. {
  2119. XC16X_INSN_MOVEHM7, "movehm7", "mov", 32,
  2120. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2121. },
  2122. /* mov $regoff8,$hash$sof$usof16 */
  2123. {
  2124. XC16X_INSN_MOVEHM8, "movehm8", "mov", 32,
  2125. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2126. },
  2127. /* movb $regb8,$hash$pof$uimm8 */
  2128. {
  2129. XC16X_INSN_MOVEHM9, "movehm9", "movb", 32,
  2130. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2131. },
  2132. /* movb $regoff8,$hash$pag$uimm8 */
  2133. {
  2134. XC16X_INSN_MOVEHM10, "movehm10", "movb", 32,
  2135. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2136. },
  2137. /* mov $regoff8,$pof$upof16 */
  2138. {
  2139. XC16X_INSN_MOVRMP, "movrmp", "mov", 32,
  2140. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2141. },
  2142. /* movb $regb8,$pof$upof16 */
  2143. {
  2144. XC16X_INSN_MOVRMP1, "movrmp1", "movb", 32,
  2145. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2146. },
  2147. /* mov $regoff8,$pag$upag16 */
  2148. {
  2149. XC16X_INSN_MOVRMP2, "movrmp2", "mov", 32,
  2150. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2151. },
  2152. /* movb $regb8,$pag$upag16 */
  2153. {
  2154. XC16X_INSN_MOVRMP3, "movrmp3", "movb", 32,
  2155. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2156. },
  2157. /* mov $pof$upof16,$regoff8 */
  2158. {
  2159. XC16X_INSN_MOVRMP4, "movrmp4", "mov", 32,
  2160. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2161. },
  2162. /* movb $pof$upof16,$regb8 */
  2163. {
  2164. XC16X_INSN_MOVRMP5, "movrmp5", "movb", 32,
  2165. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2166. },
  2167. /* mov $dri,$hash$pof$u4 */
  2168. {
  2169. XC16X_INSN_MOVEHM1, "movehm1", "mov", 16,
  2170. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2171. },
  2172. /* movb $srb,$hash$pof$u4 */
  2173. {
  2174. XC16X_INSN_MOVEHM2, "movehm2", "movb", 16,
  2175. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2176. },
  2177. /* mov $dri,$hash$pag$u4 */
  2178. {
  2179. XC16X_INSN_MOVEHM3, "movehm3", "mov", 16,
  2180. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2181. },
  2182. /* movb $srb,$hash$pag$u4 */
  2183. {
  2184. XC16X_INSN_MOVEHM4, "movehm4", "movb", 16,
  2185. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2186. },
  2187. /* mov $regmem8,$memgr8 */
  2188. {
  2189. XC16X_INSN_MVE12, "mve12", "mov", 32,
  2190. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2191. },
  2192. /* mov $memgr8,$regmem8 */
  2193. {
  2194. XC16X_INSN_MVE13, "mve13", "mov", 32,
  2195. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2196. },
  2197. /* mov $reg8,$memory */
  2198. {
  2199. XC16X_INSN_MOVER12, "mover12", "mov", 32,
  2200. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2201. },
  2202. /* mov $memory,$reg8 */
  2203. {
  2204. XC16X_INSN_MVR13, "mvr13", "mov", 32,
  2205. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2206. },
  2207. /* movb $regbmem8,$memgr8 */
  2208. {
  2209. XC16X_INSN_MVER12, "mver12", "movb", 32,
  2210. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2211. },
  2212. /* movb $memgr8,$regbmem8 */
  2213. {
  2214. XC16X_INSN_MVER13, "mver13", "movb", 32,
  2215. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2216. },
  2217. /* movb $regb8,$memory */
  2218. {
  2219. XC16X_INSN_MOVR12, "movr12", "movb", 32,
  2220. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2221. },
  2222. /* movb $memory,$regb8 */
  2223. {
  2224. XC16X_INSN_MOVR13, "movr13", "movb", 32,
  2225. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2226. },
  2227. /* movbs $sr,$drb */
  2228. {
  2229. XC16X_INSN_MOVBSRR, "movbsrr", "movbs", 16,
  2230. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2231. },
  2232. /* movbz $sr,$drb */
  2233. {
  2234. XC16X_INSN_MOVBZRR, "movbzrr", "movbz", 16,
  2235. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2236. },
  2237. /* movbs $regmem8,$pof$upof16 */
  2238. {
  2239. XC16X_INSN_MOVBSRPOFM, "movbsrpofm", "movbs", 32,
  2240. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2241. },
  2242. /* movbs $pof$upof16,$regbmem8 */
  2243. {
  2244. XC16X_INSN_MOVBSPOFMR, "movbspofmr", "movbs", 32,
  2245. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2246. },
  2247. /* movbz $reg8,$pof$upof16 */
  2248. {
  2249. XC16X_INSN_MOVBZRPOFM, "movbzrpofm", "movbz", 32,
  2250. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2251. },
  2252. /* movbz $pof$upof16,$regb8 */
  2253. {
  2254. XC16X_INSN_MOVBZPOFMR, "movbzpofmr", "movbz", 32,
  2255. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2256. },
  2257. /* movbs $regmem8,$memgr8 */
  2258. {
  2259. XC16X_INSN_MOVEBS14, "movebs14", "movbs", 32,
  2260. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2261. },
  2262. /* movbs $memgr8,$regbmem8 */
  2263. {
  2264. XC16X_INSN_MOVEBS15, "movebs15", "movbs", 32,
  2265. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2266. },
  2267. /* movbs $reg8,$memory */
  2268. {
  2269. XC16X_INSN_MOVERBS14, "moverbs14", "movbs", 32,
  2270. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2271. },
  2272. /* movbs $memory,$regb8 */
  2273. {
  2274. XC16X_INSN_MOVRBS15, "movrbs15", "movbs", 32,
  2275. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2276. },
  2277. /* movbz $regmem8,$memgr8 */
  2278. {
  2279. XC16X_INSN_MOVEBZ14, "movebz14", "movbz", 32,
  2280. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2281. },
  2282. /* movbz $memgr8,$regbmem8 */
  2283. {
  2284. XC16X_INSN_MOVEBZ15, "movebz15", "movbz", 32,
  2285. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2286. },
  2287. /* movbz $reg8,$memory */
  2288. {
  2289. XC16X_INSN_MOVERBZ14, "moverbz14", "movbz", 32,
  2290. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2291. },
  2292. /* movbz $memory,$regb8 */
  2293. {
  2294. XC16X_INSN_MOVRBZ15, "movrbz15", "movbz", 32,
  2295. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2296. },
  2297. /* movbs $sr,$drb */
  2298. {
  2299. XC16X_INSN_MOVRBS, "movrbs", "movbs", 16,
  2300. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2301. },
  2302. /* movbz $sr,$drb */
  2303. {
  2304. XC16X_INSN_MOVRBZ, "movrbz", "movbz", 16,
  2305. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2306. },
  2307. /* jmpa+ $extcond,$caddr */
  2308. {
  2309. XC16X_INSN_JMPA0, "jmpa0", "jmpa+", 32,
  2310. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2311. },
  2312. /* jmpa $extcond,$caddr */
  2313. {
  2314. XC16X_INSN_JMPA1, "jmpa1", "jmpa", 32,
  2315. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2316. },
  2317. /* jmpa- $extcond,$caddr */
  2318. {
  2319. XC16X_INSN_JMPA_, "jmpa-", "jmpa-", 32,
  2320. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2321. },
  2322. /* jmpi $icond,[$sr] */
  2323. {
  2324. XC16X_INSN_JMPI, "jmpi", "jmpi", 16,
  2325. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2326. },
  2327. /* jmpr $cond,$rel */
  2328. {
  2329. XC16X_INSN_JMPR_NENZ, "jmpr_nenz", "jmpr", 16,
  2330. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2331. },
  2332. /* jmpr $cond,$rel */
  2333. {
  2334. XC16X_INSN_JMPR_SGT, "jmpr_sgt", "jmpr", 16,
  2335. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2336. },
  2337. /* jmpr $cond,$rel */
  2338. {
  2339. XC16X_INSN_JMPR_Z, "jmpr_z", "jmpr", 16,
  2340. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2341. },
  2342. /* jmpr $cond,$rel */
  2343. {
  2344. XC16X_INSN_JMPR_V, "jmpr_v", "jmpr", 16,
  2345. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2346. },
  2347. /* jmpr $cond,$rel */
  2348. {
  2349. XC16X_INSN_JMPR_NV, "jmpr_nv", "jmpr", 16,
  2350. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2351. },
  2352. /* jmpr $cond,$rel */
  2353. {
  2354. XC16X_INSN_JMPR_N, "jmpr_n", "jmpr", 16,
  2355. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2356. },
  2357. /* jmpr $cond,$rel */
  2358. {
  2359. XC16X_INSN_JMPR_NN, "jmpr_nn", "jmpr", 16,
  2360. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2361. },
  2362. /* jmpr $cond,$rel */
  2363. {
  2364. XC16X_INSN_JMPR_C, "jmpr_c", "jmpr", 16,
  2365. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2366. },
  2367. /* jmpr $cond,$rel */
  2368. {
  2369. XC16X_INSN_JMPR_NC, "jmpr_nc", "jmpr", 16,
  2370. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2371. },
  2372. /* jmpr $cond,$rel */
  2373. {
  2374. XC16X_INSN_JMPR_EQ, "jmpr_eq", "jmpr", 16,
  2375. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2376. },
  2377. /* jmpr $cond,$rel */
  2378. {
  2379. XC16X_INSN_JMPR_NE, "jmpr_ne", "jmpr", 16,
  2380. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2381. },
  2382. /* jmpr $cond,$rel */
  2383. {
  2384. XC16X_INSN_JMPR_ULT, "jmpr_ult", "jmpr", 16,
  2385. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2386. },
  2387. /* jmpr $cond,$rel */
  2388. {
  2389. XC16X_INSN_JMPR_ULE, "jmpr_ule", "jmpr", 16,
  2390. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2391. },
  2392. /* jmpr $cond,$rel */
  2393. {
  2394. XC16X_INSN_JMPR_UGE, "jmpr_uge", "jmpr", 16,
  2395. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2396. },
  2397. /* jmpr $cond,$rel */
  2398. {
  2399. XC16X_INSN_JMPR_UGT, "jmpr_ugt", "jmpr", 16,
  2400. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2401. },
  2402. /* jmpr $cond,$rel */
  2403. {
  2404. XC16X_INSN_JMPR_SLE, "jmpr_sle", "jmpr", 16,
  2405. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2406. },
  2407. /* jmpr $cond,$rel */
  2408. {
  2409. XC16X_INSN_JMPR_SGE, "jmpr_sge", "jmpr", 16,
  2410. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2411. },
  2412. /* jmpr $cond,$rel */
  2413. {
  2414. XC16X_INSN_JMPR_NET, "jmpr_net", "jmpr", 16,
  2415. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2416. },
  2417. /* jmpr $cond,$rel */
  2418. {
  2419. XC16X_INSN_JMPR_UC, "jmpr_uc", "jmpr", 16,
  2420. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2421. },
  2422. /* jmpr $cond,$rel */
  2423. {
  2424. XC16X_INSN_JMPR_SLT, "jmpr_slt", "jmpr", 16,
  2425. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2426. },
  2427. /* jmps $hash$segm$useg8,$hash$sof$usof16 */
  2428. {
  2429. XC16X_INSN_JMPSEG, "jmpseg", "jmps", 32,
  2430. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2431. },
  2432. /* jmps $seg,$caddr */
  2433. {
  2434. XC16X_INSN_JMPS, "jmps", "jmps", 32,
  2435. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2436. },
  2437. /* jb $genreg$dot$qlobit,$relhi */
  2438. {
  2439. XC16X_INSN_JB, "jb", "jb", 32,
  2440. { 0|A(UNCOND_CTI)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2441. },
  2442. /* jbc $genreg$dot$qlobit,$relhi */
  2443. {
  2444. XC16X_INSN_JBC, "jbc", "jbc", 32,
  2445. { 0|A(UNCOND_CTI)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2446. },
  2447. /* jnb $genreg$dot$qlobit,$relhi */
  2448. {
  2449. XC16X_INSN_JNB, "jnb", "jnb", 32,
  2450. { 0|A(UNCOND_CTI)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2451. },
  2452. /* jnbs $genreg$dot$qlobit,$relhi */
  2453. {
  2454. XC16X_INSN_JNBS, "jnbs", "jnbs", 32,
  2455. { 0|A(UNCOND_CTI)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2456. },
  2457. /* calla+ $extcond,$caddr */
  2458. {
  2459. XC16X_INSN_CALLA0, "calla0", "calla+", 32,
  2460. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2461. },
  2462. /* calla $extcond,$caddr */
  2463. {
  2464. XC16X_INSN_CALLA1, "calla1", "calla", 32,
  2465. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2466. },
  2467. /* calla- $extcond,$caddr */
  2468. {
  2469. XC16X_INSN_CALLA_, "calla-", "calla-", 32,
  2470. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2471. },
  2472. /* calli $icond,[$sr] */
  2473. {
  2474. XC16X_INSN_CALLI, "calli", "calli", 16,
  2475. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2476. },
  2477. /* callr $rel */
  2478. {
  2479. XC16X_INSN_CALLR, "callr", "callr", 16,
  2480. { 0|A(COND_CTI)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2481. },
  2482. /* calls $hash$segm$useg8,$hash$sof$usof16 */
  2483. {
  2484. XC16X_INSN_CALLSEG, "callseg", "calls", 32,
  2485. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2486. },
  2487. /* calls $seg,$caddr */
  2488. {
  2489. XC16X_INSN_CALLS, "calls", "calls", 32,
  2490. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2491. },
  2492. /* pcall $reg8,$caddr */
  2493. {
  2494. XC16X_INSN_PCALL, "pcall", "pcall", 32,
  2495. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2496. },
  2497. /* trap $hash$uimm7 */
  2498. {
  2499. XC16X_INSN_TRAP, "trap", "trap", 16,
  2500. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2501. },
  2502. /* ret */
  2503. {
  2504. XC16X_INSN_RET, "ret", "ret", 16,
  2505. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2506. },
  2507. /* rets */
  2508. {
  2509. XC16X_INSN_RETS, "rets", "rets", 16,
  2510. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2511. },
  2512. /* retp $reg8 */
  2513. {
  2514. XC16X_INSN_RETP, "retp", "retp", 16,
  2515. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2516. },
  2517. /* reti */
  2518. {
  2519. XC16X_INSN_RETI, "reti", "reti", 16,
  2520. { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2521. },
  2522. /* pop $reg8 */
  2523. {
  2524. XC16X_INSN_POP, "pop", "pop", 16,
  2525. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2526. },
  2527. /* push $reg8 */
  2528. {
  2529. XC16X_INSN_PUSH, "push", "push", 16,
  2530. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2531. },
  2532. /* scxt $reg8,$hash$uimm16 */
  2533. {
  2534. XC16X_INSN_SCXTI, "scxti", "scxt", 32,
  2535. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2536. },
  2537. /* scxt $reg8,$pof$upof16 */
  2538. {
  2539. XC16X_INSN_SCXTRPOFM, "scxtrpofm", "scxt", 32,
  2540. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2541. },
  2542. /* scxt $regmem8,$memgr8 */
  2543. {
  2544. XC16X_INSN_SCXTMG, "scxtmg", "scxt", 32,
  2545. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2546. },
  2547. /* scxt $reg8,$memory */
  2548. {
  2549. XC16X_INSN_SCXTM, "scxtm", "scxt", 32,
  2550. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2551. },
  2552. /* nop */
  2553. {
  2554. XC16X_INSN_NOP, "nop", "nop", 16,
  2555. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2556. },
  2557. /* srst */
  2558. {
  2559. XC16X_INSN_SRSTM, "srstm", "srst", 32,
  2560. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2561. },
  2562. /* idle */
  2563. {
  2564. XC16X_INSN_IDLEM, "idlem", "idle", 32,
  2565. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2566. },
  2567. /* pwrdn */
  2568. {
  2569. XC16X_INSN_PWRDNM, "pwrdnm", "pwrdn", 32,
  2570. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2571. },
  2572. /* diswdt */
  2573. {
  2574. XC16X_INSN_DISWDTM, "diswdtm", "diswdt", 32,
  2575. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2576. },
  2577. /* enwdt */
  2578. {
  2579. XC16X_INSN_ENWDTM, "enwdtm", "enwdt", 32,
  2580. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2581. },
  2582. /* einit */
  2583. {
  2584. XC16X_INSN_EINITM, "einitm", "einit", 32,
  2585. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2586. },
  2587. /* srvwdt */
  2588. {
  2589. XC16X_INSN_SRVWDTM, "srvwdtm", "srvwdt", 32,
  2590. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2591. },
  2592. /* sbrk */
  2593. {
  2594. XC16X_INSN_SBRK, "sbrk", "sbrk", 16,
  2595. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2596. },
  2597. /* atomic $hash$uimm2 */
  2598. {
  2599. XC16X_INSN_ATOMIC, "atomic", "atomic", 16,
  2600. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2601. },
  2602. /* extr $hash$uimm2 */
  2603. {
  2604. XC16X_INSN_EXTR, "extr", "extr", 16,
  2605. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2606. },
  2607. /* extp $sr,$hash$uimm2 */
  2608. {
  2609. XC16X_INSN_EXTP, "extp", "extp", 16,
  2610. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2611. },
  2612. /* extp $hash$pagenum,$hash$uimm2 */
  2613. {
  2614. XC16X_INSN_EXTP1, "extp1", "extp", 32,
  2615. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2616. },
  2617. /* extp $hash$pag$upag16,$hash$uimm2 */
  2618. {
  2619. XC16X_INSN_EXTPG1, "extpg1", "extp", 32,
  2620. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2621. },
  2622. /* extpr $sr,$hash$uimm2 */
  2623. {
  2624. XC16X_INSN_EXTPR, "extpr", "extpr", 16,
  2625. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2626. },
  2627. /* extpr $hash$pagenum,$hash$uimm2 */
  2628. {
  2629. XC16X_INSN_EXTPR1, "extpr1", "extpr", 32,
  2630. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2631. },
  2632. /* exts $sr,$hash$uimm2 */
  2633. {
  2634. XC16X_INSN_EXTS, "exts", "exts", 16,
  2635. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2636. },
  2637. /* exts $hash$seghi8,$hash$uimm2 */
  2638. {
  2639. XC16X_INSN_EXTS1, "exts1", "exts", 32,
  2640. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2641. },
  2642. /* extsr $sr,$hash$uimm2 */
  2643. {
  2644. XC16X_INSN_EXTSR, "extsr", "extsr", 16,
  2645. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2646. },
  2647. /* extsr $hash$seghi8,$hash$uimm2 */
  2648. {
  2649. XC16X_INSN_EXTSR1, "extsr1", "extsr", 32,
  2650. { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2651. },
  2652. /* prior $dr,$sr */
  2653. {
  2654. XC16X_INSN_PRIOR, "prior", "prior", 16,
  2655. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2656. },
  2657. /* bclr $RegNam */
  2658. {
  2659. XC16X_INSN_BCLR18, "bclr18", "bclr", 16,
  2660. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2661. },
  2662. /* bclr $reg8$dot$qbit */
  2663. {
  2664. XC16X_INSN_BCLR0, "bclr0", "bclr", 16,
  2665. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2666. },
  2667. /* bclr $reg8$dot$qbit */
  2668. {
  2669. XC16X_INSN_BCLR1, "bclr1", "bclr", 16,
  2670. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2671. },
  2672. /* bclr $reg8$dot$qbit */
  2673. {
  2674. XC16X_INSN_BCLR2, "bclr2", "bclr", 16,
  2675. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2676. },
  2677. /* bclr $reg8$dot$qbit */
  2678. {
  2679. XC16X_INSN_BCLR3, "bclr3", "bclr", 16,
  2680. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2681. },
  2682. /* bclr $reg8$dot$qbit */
  2683. {
  2684. XC16X_INSN_BCLR4, "bclr4", "bclr", 16,
  2685. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2686. },
  2687. /* bclr $reg8$dot$qbit */
  2688. {
  2689. XC16X_INSN_BCLR5, "bclr5", "bclr", 16,
  2690. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2691. },
  2692. /* bclr $reg8$dot$qbit */
  2693. {
  2694. XC16X_INSN_BCLR6, "bclr6", "bclr", 16,
  2695. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2696. },
  2697. /* bclr $reg8$dot$qbit */
  2698. {
  2699. XC16X_INSN_BCLR7, "bclr7", "bclr", 16,
  2700. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2701. },
  2702. /* bclr $reg8$dot$qbit */
  2703. {
  2704. XC16X_INSN_BCLR8, "bclr8", "bclr", 16,
  2705. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2706. },
  2707. /* bclr $reg8$dot$qbit */
  2708. {
  2709. XC16X_INSN_BCLR9, "bclr9", "bclr", 16,
  2710. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2711. },
  2712. /* bclr $reg8$dot$qbit */
  2713. {
  2714. XC16X_INSN_BCLR10, "bclr10", "bclr", 16,
  2715. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2716. },
  2717. /* bclr $reg8$dot$qbit */
  2718. {
  2719. XC16X_INSN_BCLR11, "bclr11", "bclr", 16,
  2720. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2721. },
  2722. /* bclr $reg8$dot$qbit */
  2723. {
  2724. XC16X_INSN_BCLR12, "bclr12", "bclr", 16,
  2725. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2726. },
  2727. /* bclr $reg8$dot$qbit */
  2728. {
  2729. XC16X_INSN_BCLR13, "bclr13", "bclr", 16,
  2730. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2731. },
  2732. /* bclr $reg8$dot$qbit */
  2733. {
  2734. XC16X_INSN_BCLR14, "bclr14", "bclr", 16,
  2735. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2736. },
  2737. /* bclr $reg8$dot$qbit */
  2738. {
  2739. XC16X_INSN_BCLR15, "bclr15", "bclr", 16,
  2740. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2741. },
  2742. /* bset $RegNam */
  2743. {
  2744. XC16X_INSN_BSET19, "bset19", "bset", 16,
  2745. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2746. },
  2747. /* bset $reg8$dot$qbit */
  2748. {
  2749. XC16X_INSN_BSET0, "bset0", "bset", 16,
  2750. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2751. },
  2752. /* bset $reg8$dot$qbit */
  2753. {
  2754. XC16X_INSN_BSET1, "bset1", "bset", 16,
  2755. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2756. },
  2757. /* bset $reg8$dot$qbit */
  2758. {
  2759. XC16X_INSN_BSET2, "bset2", "bset", 16,
  2760. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2761. },
  2762. /* bset $reg8$dot$qbit */
  2763. {
  2764. XC16X_INSN_BSET3, "bset3", "bset", 16,
  2765. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2766. },
  2767. /* bset $reg8$dot$qbit */
  2768. {
  2769. XC16X_INSN_BSET4, "bset4", "bset", 16,
  2770. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2771. },
  2772. /* bset $reg8$dot$qbit */
  2773. {
  2774. XC16X_INSN_BSET5, "bset5", "bset", 16,
  2775. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2776. },
  2777. /* bset $reg8$dot$qbit */
  2778. {
  2779. XC16X_INSN_BSET6, "bset6", "bset", 16,
  2780. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2781. },
  2782. /* bset $reg8$dot$qbit */
  2783. {
  2784. XC16X_INSN_BSET7, "bset7", "bset", 16,
  2785. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2786. },
  2787. /* bset $reg8$dot$qbit */
  2788. {
  2789. XC16X_INSN_BSET8, "bset8", "bset", 16,
  2790. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2791. },
  2792. /* bset $reg8$dot$qbit */
  2793. {
  2794. XC16X_INSN_BSET9, "bset9", "bset", 16,
  2795. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2796. },
  2797. /* bset $reg8$dot$qbit */
  2798. {
  2799. XC16X_INSN_BSET10, "bset10", "bset", 16,
  2800. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2801. },
  2802. /* bset $reg8$dot$qbit */
  2803. {
  2804. XC16X_INSN_BSET11, "bset11", "bset", 16,
  2805. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2806. },
  2807. /* bset $reg8$dot$qbit */
  2808. {
  2809. XC16X_INSN_BSET12, "bset12", "bset", 16,
  2810. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2811. },
  2812. /* bset $reg8$dot$qbit */
  2813. {
  2814. XC16X_INSN_BSET13, "bset13", "bset", 16,
  2815. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2816. },
  2817. /* bset $reg8$dot$qbit */
  2818. {
  2819. XC16X_INSN_BSET14, "bset14", "bset", 16,
  2820. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2821. },
  2822. /* bset $reg8$dot$qbit */
  2823. {
  2824. XC16X_INSN_BSET15, "bset15", "bset", 16,
  2825. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2826. },
  2827. /* bmov $reghi8$dot$qhibit,$reg8$dot$qlobit */
  2828. {
  2829. XC16X_INSN_BMOV, "bmov", "bmov", 32,
  2830. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2831. },
  2832. /* bmovn $reghi8$dot$qhibit,$reg8$dot$qlobit */
  2833. {
  2834. XC16X_INSN_BMOVN, "bmovn", "bmovn", 32,
  2835. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2836. },
  2837. /* band $reghi8$dot$qhibit,$reg8$dot$qlobit */
  2838. {
  2839. XC16X_INSN_BAND, "band", "band", 32,
  2840. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2841. },
  2842. /* bor $reghi8$dot$qhibit,$reg8$dot$qlobit */
  2843. {
  2844. XC16X_INSN_BOR, "bor", "bor", 32,
  2845. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2846. },
  2847. /* bxor $reghi8$dot$qhibit,$reg8$dot$qlobit */
  2848. {
  2849. XC16X_INSN_BXOR, "bxor", "bxor", 32,
  2850. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2851. },
  2852. /* bcmp $reghi8$dot$qhibit,$reg8$dot$qlobit */
  2853. {
  2854. XC16X_INSN_BCMP, "bcmp", "bcmp", 32,
  2855. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2856. },
  2857. /* bfldl $reg8,$hash$mask8,$hash$datahi8 */
  2858. {
  2859. XC16X_INSN_BFLDL, "bfldl", "bfldl", 32,
  2860. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2861. },
  2862. /* bfldh $reg8,$hash$masklo8,$hash$data8 */
  2863. {
  2864. XC16X_INSN_BFLDH, "bfldh", "bfldh", 32,
  2865. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2866. },
  2867. /* cmp $src1,$src2 */
  2868. {
  2869. XC16X_INSN_CMPR, "cmpr", "cmp", 16,
  2870. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2871. },
  2872. /* cmpb $drb,$srb */
  2873. {
  2874. XC16X_INSN_CMPBR, "cmpbr", "cmpb", 16,
  2875. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2876. },
  2877. /* cmp $src1,$hash$uimm3 */
  2878. {
  2879. XC16X_INSN_CMPRI, "cmpri", "cmp", 16,
  2880. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2881. },
  2882. /* cmpb $drb,$hash$uimm3 */
  2883. {
  2884. XC16X_INSN_CMPBRI, "cmpbri", "cmpb", 16,
  2885. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2886. },
  2887. /* cmp $reg8,$hash$uimm16 */
  2888. {
  2889. XC16X_INSN_CMPI, "cmpi", "cmp", 32,
  2890. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2891. },
  2892. /* cmpb $regb8,$hash$uimm8 */
  2893. {
  2894. XC16X_INSN_CMPBI, "cmpbi", "cmpb", 32,
  2895. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2896. },
  2897. /* cmp $dr,[$sr2] */
  2898. {
  2899. XC16X_INSN_CMPR2, "cmpr2", "cmp", 16,
  2900. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2901. },
  2902. /* cmpb $drb,[$sr2] */
  2903. {
  2904. XC16X_INSN_CMPBR2, "cmpbr2", "cmpb", 16,
  2905. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2906. },
  2907. /* cmp $dr,[$sr2+] */
  2908. {
  2909. XC16X_INSN_CMP2I, "cmp2i", "cmp", 16,
  2910. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2911. },
  2912. /* cmpb $drb,[$sr2+] */
  2913. {
  2914. XC16X_INSN_CMPB2I, "cmpb2i", "cmpb", 16,
  2915. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2916. },
  2917. /* cmp $reg8,$pof$upof16 */
  2918. {
  2919. XC16X_INSN_CMP04, "cmp04", "cmp", 32,
  2920. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2921. },
  2922. /* cmpb $regb8,$pof$upof16 */
  2923. {
  2924. XC16X_INSN_CMPB4, "cmpb4", "cmpb", 32,
  2925. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2926. },
  2927. /* cmp $regmem8,$memgr8 */
  2928. {
  2929. XC16X_INSN_CMP004, "cmp004", "cmp", 32,
  2930. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2931. },
  2932. /* cmp $reg8,$memory */
  2933. {
  2934. XC16X_INSN_CMP0004, "cmp0004", "cmp", 32,
  2935. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2936. },
  2937. /* cmpb $regbmem8,$memgr8 */
  2938. {
  2939. XC16X_INSN_CMPB04, "cmpb04", "cmpb", 32,
  2940. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2941. },
  2942. /* cmpb $regb8,$memory */
  2943. {
  2944. XC16X_INSN_CMPB004, "cmpb004", "cmpb", 32,
  2945. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2946. },
  2947. /* cmpd1 $sr,$hash$uimm4 */
  2948. {
  2949. XC16X_INSN_CMPD1RI, "cmpd1ri", "cmpd1", 16,
  2950. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2951. },
  2952. /* cmpd2 $sr,$hash$uimm4 */
  2953. {
  2954. XC16X_INSN_CMPD2RI, "cmpd2ri", "cmpd2", 16,
  2955. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2956. },
  2957. /* cmpi1 $sr,$hash$uimm4 */
  2958. {
  2959. XC16X_INSN_CMPI1RI, "cmpi1ri", "cmpi1", 16,
  2960. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2961. },
  2962. /* cmpi2 $sr,$hash$uimm4 */
  2963. {
  2964. XC16X_INSN_CMPI2RI, "cmpi2ri", "cmpi2", 16,
  2965. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2966. },
  2967. /* cmpd1 $reg8,$hash$uimm16 */
  2968. {
  2969. XC16X_INSN_CMPD1RIM, "cmpd1rim", "cmpd1", 32,
  2970. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2971. },
  2972. /* cmpd2 $reg8,$hash$uimm16 */
  2973. {
  2974. XC16X_INSN_CMPD2RIM, "cmpd2rim", "cmpd2", 32,
  2975. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2976. },
  2977. /* cmpi1 $reg8,$hash$uimm16 */
  2978. {
  2979. XC16X_INSN_CMPI1RIM, "cmpi1rim", "cmpi1", 32,
  2980. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2981. },
  2982. /* cmpi2 $reg8,$hash$uimm16 */
  2983. {
  2984. XC16X_INSN_CMPI2RIM, "cmpi2rim", "cmpi2", 32,
  2985. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2986. },
  2987. /* cmpd1 $reg8,$pof$upof16 */
  2988. {
  2989. XC16X_INSN_CMPD1RP, "cmpd1rp", "cmpd1", 32,
  2990. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2991. },
  2992. /* cmpd2 $reg8,$pof$upof16 */
  2993. {
  2994. XC16X_INSN_CMPD2RP, "cmpd2rp", "cmpd2", 32,
  2995. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  2996. },
  2997. /* cmpi1 $reg8,$pof$upof16 */
  2998. {
  2999. XC16X_INSN_CMPI1RP, "cmpi1rp", "cmpi1", 32,
  3000. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3001. },
  3002. /* cmpi2 $reg8,$pof$upof16 */
  3003. {
  3004. XC16X_INSN_CMPI2RP, "cmpi2rp", "cmpi2", 32,
  3005. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3006. },
  3007. /* cmpd1 $regmem8,$memgr8 */
  3008. {
  3009. XC16X_INSN_CMPD1RM, "cmpd1rm", "cmpd1", 32,
  3010. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3011. },
  3012. /* cmpd2 $regmem8,$memgr8 */
  3013. {
  3014. XC16X_INSN_CMPD2RM, "cmpd2rm", "cmpd2", 32,
  3015. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3016. },
  3017. /* cmpi1 $regmem8,$memgr8 */
  3018. {
  3019. XC16X_INSN_CMPI1RM, "cmpi1rm", "cmpi1", 32,
  3020. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3021. },
  3022. /* cmpi2 $regmem8,$memgr8 */
  3023. {
  3024. XC16X_INSN_CMPI2RM, "cmpi2rm", "cmpi2", 32,
  3025. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3026. },
  3027. /* cmpd1 $reg8,$memory */
  3028. {
  3029. XC16X_INSN_CMPD1RMI, "cmpd1rmi", "cmpd1", 32,
  3030. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3031. },
  3032. /* cmpd2 $reg8,$memory */
  3033. {
  3034. XC16X_INSN_CMPD2RMI, "cmpd2rmi", "cmpd2", 32,
  3035. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3036. },
  3037. /* cmpi1 $reg8,$memory */
  3038. {
  3039. XC16X_INSN_CMPI1RMI, "cmpi1rmi", "cmpi1", 32,
  3040. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3041. },
  3042. /* cmpi2 $reg8,$memory */
  3043. {
  3044. XC16X_INSN_CMPI2RMI, "cmpi2rmi", "cmpi2", 32,
  3045. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3046. },
  3047. /* shl $dr,$sr */
  3048. {
  3049. XC16X_INSN_SHLR, "shlr", "shl", 16,
  3050. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3051. },
  3052. /* shr $dr,$sr */
  3053. {
  3054. XC16X_INSN_SHRR, "shrr", "shr", 16,
  3055. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3056. },
  3057. /* rol $dr,$sr */
  3058. {
  3059. XC16X_INSN_ROLR, "rolr", "rol", 16,
  3060. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3061. },
  3062. /* ror $dr,$sr */
  3063. {
  3064. XC16X_INSN_RORR, "rorr", "ror", 16,
  3065. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3066. },
  3067. /* ashr $dr,$sr */
  3068. {
  3069. XC16X_INSN_ASHRR, "ashrr", "ashr", 16,
  3070. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3071. },
  3072. /* shl $sr,$hash$uimm4 */
  3073. {
  3074. XC16X_INSN_SHLRI, "shlri", "shl", 16,
  3075. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3076. },
  3077. /* shr $sr,$hash$uimm4 */
  3078. {
  3079. XC16X_INSN_SHRRI, "shrri", "shr", 16,
  3080. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3081. },
  3082. /* rol $sr,$hash$uimm4 */
  3083. {
  3084. XC16X_INSN_ROLRI, "rolri", "rol", 16,
  3085. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3086. },
  3087. /* ror $sr,$hash$uimm4 */
  3088. {
  3089. XC16X_INSN_RORRI, "rorri", "ror", 16,
  3090. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3091. },
  3092. /* ashr $sr,$hash$uimm4 */
  3093. {
  3094. XC16X_INSN_ASHRRI, "ashrri", "ashr", 16,
  3095. { 0, { { { (1<<MACH_BASE), 0 } }, { { PIPE_OS, 0 } } } }
  3096. },
  3097. };
  3098. #undef OP
  3099. #undef A
  3100. /* Initialize anything needed to be done once, before any cpu_open call. */
  3101. static void
  3102. init_tables (void)
  3103. {
  3104. }
  3105. #ifndef opcodes_error_handler
  3106. #define opcodes_error_handler(...) \
  3107. fprintf (stderr, __VA_ARGS__); fputc ('\n', stderr)
  3108. #endif
  3109. static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
  3110. static void build_hw_table (CGEN_CPU_TABLE *);
  3111. static void build_ifield_table (CGEN_CPU_TABLE *);
  3112. static void build_operand_table (CGEN_CPU_TABLE *);
  3113. static void build_insn_table (CGEN_CPU_TABLE *);
  3114. static void xc16x_cgen_rebuild_tables (CGEN_CPU_TABLE *);
  3115. /* Subroutine of xc16x_cgen_cpu_open to look up a mach via its bfd name. */
  3116. static const CGEN_MACH *
  3117. lookup_mach_via_bfd_name (const CGEN_MACH *table, const char *name)
  3118. {
  3119. while (table->name)
  3120. {
  3121. if (strcmp (name, table->bfd_name) == 0)
  3122. return table;
  3123. ++table;
  3124. }
  3125. return NULL;
  3126. }
  3127. /* Subroutine of xc16x_cgen_cpu_open to build the hardware table. */
  3128. static void
  3129. build_hw_table (CGEN_CPU_TABLE *cd)
  3130. {
  3131. int i;
  3132. int machs = cd->machs;
  3133. const CGEN_HW_ENTRY *init = & xc16x_cgen_hw_table[0];
  3134. /* MAX_HW is only an upper bound on the number of selected entries.
  3135. However each entry is indexed by it's enum so there can be holes in
  3136. the table. */
  3137. const CGEN_HW_ENTRY **selected =
  3138. (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *));
  3139. cd->hw_table.init_entries = init;
  3140. cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY);
  3141. memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *));
  3142. /* ??? For now we just use machs to determine which ones we want. */
  3143. for (i = 0; init[i].name != NULL; ++i)
  3144. if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH)
  3145. & machs)
  3146. selected[init[i].type] = &init[i];
  3147. cd->hw_table.entries = selected;
  3148. cd->hw_table.num_entries = MAX_HW;
  3149. }
  3150. /* Subroutine of xc16x_cgen_cpu_open to build the hardware table. */
  3151. static void
  3152. build_ifield_table (CGEN_CPU_TABLE *cd)
  3153. {
  3154. cd->ifld_table = & xc16x_cgen_ifld_table[0];
  3155. }
  3156. /* Subroutine of xc16x_cgen_cpu_open to build the hardware table. */
  3157. static void
  3158. build_operand_table (CGEN_CPU_TABLE *cd)
  3159. {
  3160. int i;
  3161. int machs = cd->machs;
  3162. const CGEN_OPERAND *init = & xc16x_cgen_operand_table[0];
  3163. /* MAX_OPERANDS is only an upper bound on the number of selected entries.
  3164. However each entry is indexed by it's enum so there can be holes in
  3165. the table. */
  3166. const CGEN_OPERAND **selected = xmalloc (MAX_OPERANDS * sizeof (* selected));
  3167. cd->operand_table.init_entries = init;
  3168. cd->operand_table.entry_size = sizeof (CGEN_OPERAND);
  3169. memset (selected, 0, MAX_OPERANDS * sizeof (CGEN_OPERAND *));
  3170. /* ??? For now we just use mach to determine which ones we want. */
  3171. for (i = 0; init[i].name != NULL; ++i)
  3172. if (CGEN_OPERAND_ATTR_VALUE (&init[i], CGEN_OPERAND_MACH)
  3173. & machs)
  3174. selected[init[i].type] = &init[i];
  3175. cd->operand_table.entries = selected;
  3176. cd->operand_table.num_entries = MAX_OPERANDS;
  3177. }
  3178. /* Subroutine of xc16x_cgen_cpu_open to build the hardware table.
  3179. ??? This could leave out insns not supported by the specified mach/isa,
  3180. but that would cause errors like "foo only supported by bar" to become
  3181. "unknown insn", so for now we include all insns and require the app to
  3182. do the checking later.
  3183. ??? On the other hand, parsing of such insns may require their hardware or
  3184. operand elements to be in the table [which they mightn't be]. */
  3185. static void
  3186. build_insn_table (CGEN_CPU_TABLE *cd)
  3187. {
  3188. int i;
  3189. const CGEN_IBASE *ib = & xc16x_cgen_insn_table[0];
  3190. CGEN_INSN *insns = xmalloc (MAX_INSNS * sizeof (CGEN_INSN));
  3191. memset (insns, 0, MAX_INSNS * sizeof (CGEN_INSN));
  3192. for (i = 0; i < MAX_INSNS; ++i)
  3193. insns[i].base = &ib[i];
  3194. cd->insn_table.init_entries = insns;
  3195. cd->insn_table.entry_size = sizeof (CGEN_IBASE);
  3196. cd->insn_table.num_init_entries = MAX_INSNS;
  3197. }
  3198. /* Subroutine of xc16x_cgen_cpu_open to rebuild the tables. */
  3199. static void
  3200. xc16x_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
  3201. {
  3202. int i;
  3203. CGEN_BITSET *isas = cd->isas;
  3204. unsigned int machs = cd->machs;
  3205. cd->int_insn_p = CGEN_INT_INSN_P;
  3206. /* Data derived from the isa spec. */
  3207. #define UNSET (CGEN_SIZE_UNKNOWN + 1)
  3208. cd->default_insn_bitsize = UNSET;
  3209. cd->base_insn_bitsize = UNSET;
  3210. cd->min_insn_bitsize = 65535; /* Some ridiculously big number. */
  3211. cd->max_insn_bitsize = 0;
  3212. for (i = 0; i < MAX_ISAS; ++i)
  3213. if (cgen_bitset_contains (isas, i))
  3214. {
  3215. const CGEN_ISA *isa = & xc16x_cgen_isa_table[i];
  3216. /* Default insn sizes of all selected isas must be
  3217. equal or we set the result to 0, meaning "unknown". */
  3218. if (cd->default_insn_bitsize == UNSET)
  3219. cd->default_insn_bitsize = isa->default_insn_bitsize;
  3220. else if (isa->default_insn_bitsize == cd->default_insn_bitsize)
  3221. ; /* This is ok. */
  3222. else
  3223. cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN;
  3224. /* Base insn sizes of all selected isas must be equal
  3225. or we set the result to 0, meaning "unknown". */
  3226. if (cd->base_insn_bitsize == UNSET)
  3227. cd->base_insn_bitsize = isa->base_insn_bitsize;
  3228. else if (isa->base_insn_bitsize == cd->base_insn_bitsize)
  3229. ; /* This is ok. */
  3230. else
  3231. cd->base_insn_bitsize = CGEN_SIZE_UNKNOWN;
  3232. /* Set min,max insn sizes. */
  3233. if (isa->min_insn_bitsize < cd->min_insn_bitsize)
  3234. cd->min_insn_bitsize = isa->min_insn_bitsize;
  3235. if (isa->max_insn_bitsize > cd->max_insn_bitsize)
  3236. cd->max_insn_bitsize = isa->max_insn_bitsize;
  3237. }
  3238. /* Data derived from the mach spec. */
  3239. for (i = 0; i < MAX_MACHS; ++i)
  3240. if (((1 << i) & machs) != 0)
  3241. {
  3242. const CGEN_MACH *mach = & xc16x_cgen_mach_table[i];
  3243. if (mach->insn_chunk_bitsize != 0)
  3244. {
  3245. if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
  3246. {
  3247. opcodes_error_handler
  3248. (/* xgettext:c-format */
  3249. _("internal error: xc16x_cgen_rebuild_tables: "
  3250. "conflicting insn-chunk-bitsize values: `%d' vs. `%d'"),
  3251. cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
  3252. abort ();
  3253. }
  3254. cd->insn_chunk_bitsize = mach->insn_chunk_bitsize;
  3255. }
  3256. }
  3257. /* Determine which hw elements are used by MACH. */
  3258. build_hw_table (cd);
  3259. /* Build the ifield table. */
  3260. build_ifield_table (cd);
  3261. /* Determine which operands are used by MACH/ISA. */
  3262. build_operand_table (cd);
  3263. /* Build the instruction table. */
  3264. build_insn_table (cd);
  3265. }
  3266. /* Initialize a cpu table and return a descriptor.
  3267. It's much like opening a file, and must be the first function called.
  3268. The arguments are a set of (type/value) pairs, terminated with
  3269. CGEN_CPU_OPEN_END.
  3270. Currently supported values:
  3271. CGEN_CPU_OPEN_ISAS: bitmap of values in enum isa_attr
  3272. CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr
  3273. CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name
  3274. CGEN_CPU_OPEN_ENDIAN: specify endian choice
  3275. CGEN_CPU_OPEN_INSN_ENDIAN: specify instruction endian choice
  3276. CGEN_CPU_OPEN_END: terminates arguments
  3277. ??? Simultaneous multiple isas might not make sense, but it's not (yet)
  3278. precluded. */
  3279. CGEN_CPU_DESC
  3280. xc16x_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
  3281. {
  3282. CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE));
  3283. static int init_p;
  3284. CGEN_BITSET *isas = 0; /* 0 = "unspecified" */
  3285. unsigned int machs = 0; /* 0 = "unspecified" */
  3286. enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN;
  3287. enum cgen_endian insn_endian = CGEN_ENDIAN_UNKNOWN;
  3288. va_list ap;
  3289. if (! init_p)
  3290. {
  3291. init_tables ();
  3292. init_p = 1;
  3293. }
  3294. memset (cd, 0, sizeof (*cd));
  3295. va_start (ap, arg_type);
  3296. while (arg_type != CGEN_CPU_OPEN_END)
  3297. {
  3298. switch (arg_type)
  3299. {
  3300. case CGEN_CPU_OPEN_ISAS :
  3301. isas = va_arg (ap, CGEN_BITSET *);
  3302. break;
  3303. case CGEN_CPU_OPEN_MACHS :
  3304. machs = va_arg (ap, unsigned int);
  3305. break;
  3306. case CGEN_CPU_OPEN_BFDMACH :
  3307. {
  3308. const char *name = va_arg (ap, const char *);
  3309. const CGEN_MACH *mach =
  3310. lookup_mach_via_bfd_name (xc16x_cgen_mach_table, name);
  3311. if (mach != NULL)
  3312. machs |= 1 << mach->num;
  3313. break;
  3314. }
  3315. case CGEN_CPU_OPEN_ENDIAN :
  3316. endian = va_arg (ap, enum cgen_endian);
  3317. break;
  3318. case CGEN_CPU_OPEN_INSN_ENDIAN :
  3319. insn_endian = va_arg (ap, enum cgen_endian);
  3320. break;
  3321. default :
  3322. opcodes_error_handler
  3323. (/* xgettext:c-format */
  3324. _("internal error: xc16x_cgen_cpu_open: "
  3325. "unsupported argument `%d'"),
  3326. arg_type);
  3327. abort (); /* ??? return NULL? */
  3328. }
  3329. arg_type = va_arg (ap, enum cgen_cpu_open_arg);
  3330. }
  3331. va_end (ap);
  3332. /* Mach unspecified means "all". */
  3333. if (machs == 0)
  3334. machs = (1 << MAX_MACHS) - 1;
  3335. /* Base mach is always selected. */
  3336. machs |= 1;
  3337. if (endian == CGEN_ENDIAN_UNKNOWN)
  3338. {
  3339. /* ??? If target has only one, could have a default. */
  3340. opcodes_error_handler
  3341. (/* xgettext:c-format */
  3342. _("internal error: xc16x_cgen_cpu_open: no endianness specified"));
  3343. abort ();
  3344. }
  3345. cd->isas = cgen_bitset_copy (isas);
  3346. cd->machs = machs;
  3347. cd->endian = endian;
  3348. cd->insn_endian
  3349. = (insn_endian == CGEN_ENDIAN_UNKNOWN ? endian : insn_endian);
  3350. /* Table (re)builder. */
  3351. cd->rebuild_tables = xc16x_cgen_rebuild_tables;
  3352. xc16x_cgen_rebuild_tables (cd);
  3353. /* Default to not allowing signed overflow. */
  3354. cd->signed_overflow_ok_p = 0;
  3355. return (CGEN_CPU_DESC) cd;
  3356. }
  3357. /* Cover fn to xc16x_cgen_cpu_open to handle the simple case of 1 isa, 1 mach.
  3358. MACH_NAME is the bfd name of the mach. */
  3359. CGEN_CPU_DESC
  3360. xc16x_cgen_cpu_open_1 (const char *mach_name, enum cgen_endian endian)
  3361. {
  3362. return xc16x_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name,
  3363. CGEN_CPU_OPEN_ENDIAN, endian,
  3364. CGEN_CPU_OPEN_END);
  3365. }
  3366. /* Close a cpu table.
  3367. ??? This can live in a machine independent file, but there's currently
  3368. no place to put this file (there's no libcgen). libopcodes is the wrong
  3369. place as some simulator ports use this but they don't use libopcodes. */
  3370. void
  3371. xc16x_cgen_cpu_close (CGEN_CPU_DESC cd)
  3372. {
  3373. unsigned int i;
  3374. const CGEN_INSN *insns;
  3375. if (cd->macro_insn_table.init_entries)
  3376. {
  3377. insns = cd->macro_insn_table.init_entries;
  3378. for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns)
  3379. if (CGEN_INSN_RX ((insns)))
  3380. regfree (CGEN_INSN_RX (insns));
  3381. }
  3382. if (cd->insn_table.init_entries)
  3383. {
  3384. insns = cd->insn_table.init_entries;
  3385. for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns)
  3386. if (CGEN_INSN_RX (insns))
  3387. regfree (CGEN_INSN_RX (insns));
  3388. }
  3389. free ((CGEN_INSN *) cd->macro_insn_table.init_entries);
  3390. free ((CGEN_INSN *) cd->insn_table.init_entries);
  3391. free ((CGEN_HW_ENTRY *) cd->hw_table.entries);
  3392. free ((CGEN_HW_ENTRY *) cd->operand_table.entries);
  3393. free (cd);
  3394. }