arm-dis.c 378 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390
  1. /* Instruction printing code for the ARM
  2. Copyright (C) 1994-2022 Free Software Foundation, Inc.
  3. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
  4. Modification by James G. Smith (jsmith@cygnus.co.uk)
  5. This file is part of libopcodes.
  6. This library 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 of the License, or
  9. (at your option) 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
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  17. MA 02110-1301, USA. */
  18. #include "sysdep.h"
  19. #include <assert.h>
  20. #include "disassemble.h"
  21. #include "opcode/arm.h"
  22. #include "opintl.h"
  23. #include "safe-ctype.h"
  24. #include "libiberty.h"
  25. #include "floatformat.h"
  26. /* FIXME: This shouldn't be done here. */
  27. #include "coff/internal.h"
  28. #include "libcoff.h"
  29. #include "bfd.h"
  30. #include "elf-bfd.h"
  31. #include "elf/internal.h"
  32. #include "elf/arm.h"
  33. #include "mach-o.h"
  34. /* Cached mapping symbol state. */
  35. enum map_type
  36. {
  37. MAP_ARM,
  38. MAP_THUMB,
  39. MAP_DATA
  40. };
  41. struct arm_private_data
  42. {
  43. /* The features to use when disassembling optional instructions. */
  44. arm_feature_set features;
  45. /* Track the last type (although this doesn't seem to be useful) */
  46. enum map_type last_type;
  47. /* Tracking symbol table information */
  48. int last_mapping_sym;
  49. /* The end range of the current range being disassembled. */
  50. bfd_vma last_stop_offset;
  51. bfd_vma last_mapping_addr;
  52. };
  53. enum mve_instructions
  54. {
  55. MVE_VPST,
  56. MVE_VPT_FP_T1,
  57. MVE_VPT_FP_T2,
  58. MVE_VPT_VEC_T1,
  59. MVE_VPT_VEC_T2,
  60. MVE_VPT_VEC_T3,
  61. MVE_VPT_VEC_T4,
  62. MVE_VPT_VEC_T5,
  63. MVE_VPT_VEC_T6,
  64. MVE_VCMP_FP_T1,
  65. MVE_VCMP_FP_T2,
  66. MVE_VCMP_VEC_T1,
  67. MVE_VCMP_VEC_T2,
  68. MVE_VCMP_VEC_T3,
  69. MVE_VCMP_VEC_T4,
  70. MVE_VCMP_VEC_T5,
  71. MVE_VCMP_VEC_T6,
  72. MVE_VDUP,
  73. MVE_VEOR,
  74. MVE_VFMAS_FP_SCALAR,
  75. MVE_VFMA_FP_SCALAR,
  76. MVE_VFMA_FP,
  77. MVE_VFMS_FP,
  78. MVE_VHADD_T1,
  79. MVE_VHADD_T2,
  80. MVE_VHSUB_T1,
  81. MVE_VHSUB_T2,
  82. MVE_VRHADD,
  83. MVE_VLD2,
  84. MVE_VLD4,
  85. MVE_VST2,
  86. MVE_VST4,
  87. MVE_VLDRB_T1,
  88. MVE_VLDRH_T2,
  89. MVE_VLDRB_T5,
  90. MVE_VLDRH_T6,
  91. MVE_VLDRW_T7,
  92. MVE_VSTRB_T1,
  93. MVE_VSTRH_T2,
  94. MVE_VSTRB_T5,
  95. MVE_VSTRH_T6,
  96. MVE_VSTRW_T7,
  97. MVE_VLDRB_GATHER_T1,
  98. MVE_VLDRH_GATHER_T2,
  99. MVE_VLDRW_GATHER_T3,
  100. MVE_VLDRD_GATHER_T4,
  101. MVE_VLDRW_GATHER_T5,
  102. MVE_VLDRD_GATHER_T6,
  103. MVE_VSTRB_SCATTER_T1,
  104. MVE_VSTRH_SCATTER_T2,
  105. MVE_VSTRW_SCATTER_T3,
  106. MVE_VSTRD_SCATTER_T4,
  107. MVE_VSTRW_SCATTER_T5,
  108. MVE_VSTRD_SCATTER_T6,
  109. MVE_VCVT_FP_FIX_VEC,
  110. MVE_VCVT_BETWEEN_FP_INT,
  111. MVE_VCVT_FP_HALF_FP,
  112. MVE_VCVT_FROM_FP_TO_INT,
  113. MVE_VRINT_FP,
  114. MVE_VMOV_HFP_TO_GP,
  115. MVE_VMOV_GP_TO_VEC_LANE,
  116. MVE_VMOV_IMM_TO_VEC,
  117. MVE_VMOV_VEC_TO_VEC,
  118. MVE_VMOV2_VEC_LANE_TO_GP,
  119. MVE_VMOV2_GP_TO_VEC_LANE,
  120. MVE_VMOV_VEC_LANE_TO_GP,
  121. MVE_VMVN_IMM,
  122. MVE_VMVN_REG,
  123. MVE_VORR_IMM,
  124. MVE_VORR_REG,
  125. MVE_VORN,
  126. MVE_VBIC_IMM,
  127. MVE_VBIC_REG,
  128. MVE_VMOVX,
  129. MVE_VMOVL,
  130. MVE_VMOVN,
  131. MVE_VMULL_INT,
  132. MVE_VMULL_POLY,
  133. MVE_VQDMULL_T1,
  134. MVE_VQDMULL_T2,
  135. MVE_VQMOVN,
  136. MVE_VQMOVUN,
  137. MVE_VADDV,
  138. MVE_VMLADAV_T1,
  139. MVE_VMLADAV_T2,
  140. MVE_VMLALDAV,
  141. MVE_VMLAS,
  142. MVE_VADDLV,
  143. MVE_VMLSDAV_T1,
  144. MVE_VMLSDAV_T2,
  145. MVE_VMLSLDAV,
  146. MVE_VRMLALDAVH,
  147. MVE_VRMLSLDAVH,
  148. MVE_VQDMLADH,
  149. MVE_VQRDMLADH,
  150. MVE_VQDMLAH,
  151. MVE_VQRDMLAH,
  152. MVE_VQDMLASH,
  153. MVE_VQRDMLASH,
  154. MVE_VQDMLSDH,
  155. MVE_VQRDMLSDH,
  156. MVE_VQDMULH_T1,
  157. MVE_VQRDMULH_T2,
  158. MVE_VQDMULH_T3,
  159. MVE_VQRDMULH_T4,
  160. MVE_VDDUP,
  161. MVE_VDWDUP,
  162. MVE_VIWDUP,
  163. MVE_VIDUP,
  164. MVE_VCADD_FP,
  165. MVE_VCADD_VEC,
  166. MVE_VHCADD,
  167. MVE_VCMLA_FP,
  168. MVE_VCMUL_FP,
  169. MVE_VQRSHL_T1,
  170. MVE_VQRSHL_T2,
  171. MVE_VQRSHRN,
  172. MVE_VQRSHRUN,
  173. MVE_VQSHL_T1,
  174. MVE_VQSHL_T2,
  175. MVE_VQSHLU_T3,
  176. MVE_VQSHL_T4,
  177. MVE_VQSHRN,
  178. MVE_VQSHRUN,
  179. MVE_VRSHL_T1,
  180. MVE_VRSHL_T2,
  181. MVE_VRSHR,
  182. MVE_VRSHRN,
  183. MVE_VSHL_T1,
  184. MVE_VSHL_T2,
  185. MVE_VSHL_T3,
  186. MVE_VSHLC,
  187. MVE_VSHLL_T1,
  188. MVE_VSHLL_T2,
  189. MVE_VSHR,
  190. MVE_VSHRN,
  191. MVE_VSLI,
  192. MVE_VSRI,
  193. MVE_VADC,
  194. MVE_VABAV,
  195. MVE_VABD_FP,
  196. MVE_VABD_VEC,
  197. MVE_VABS_FP,
  198. MVE_VABS_VEC,
  199. MVE_VADD_FP_T1,
  200. MVE_VADD_FP_T2,
  201. MVE_VADD_VEC_T1,
  202. MVE_VADD_VEC_T2,
  203. MVE_VSBC,
  204. MVE_VSUB_FP_T1,
  205. MVE_VSUB_FP_T2,
  206. MVE_VSUB_VEC_T1,
  207. MVE_VSUB_VEC_T2,
  208. MVE_VAND,
  209. MVE_VBRSR,
  210. MVE_VCLS,
  211. MVE_VCLZ,
  212. MVE_VCTP,
  213. MVE_VMAX,
  214. MVE_VMAXA,
  215. MVE_VMAXNM_FP,
  216. MVE_VMAXNMA_FP,
  217. MVE_VMAXNMV_FP,
  218. MVE_VMAXNMAV_FP,
  219. MVE_VMAXV,
  220. MVE_VMAXAV,
  221. MVE_VMIN,
  222. MVE_VMINA,
  223. MVE_VMINNM_FP,
  224. MVE_VMINNMA_FP,
  225. MVE_VMINNMV_FP,
  226. MVE_VMINNMAV_FP,
  227. MVE_VMINV,
  228. MVE_VMINAV,
  229. MVE_VMLA,
  230. MVE_VMUL_FP_T1,
  231. MVE_VMUL_FP_T2,
  232. MVE_VMUL_VEC_T1,
  233. MVE_VMUL_VEC_T2,
  234. MVE_VMULH,
  235. MVE_VRMULH,
  236. MVE_VNEG_FP,
  237. MVE_VNEG_VEC,
  238. MVE_VPNOT,
  239. MVE_VPSEL,
  240. MVE_VQABS,
  241. MVE_VQADD_T1,
  242. MVE_VQADD_T2,
  243. MVE_VQSUB_T1,
  244. MVE_VQSUB_T2,
  245. MVE_VQNEG,
  246. MVE_VREV16,
  247. MVE_VREV32,
  248. MVE_VREV64,
  249. MVE_LSLL,
  250. MVE_LSLLI,
  251. MVE_LSRL,
  252. MVE_ASRL,
  253. MVE_ASRLI,
  254. MVE_SQRSHRL,
  255. MVE_SQRSHR,
  256. MVE_UQRSHL,
  257. MVE_UQRSHLL,
  258. MVE_UQSHL,
  259. MVE_UQSHLL,
  260. MVE_URSHRL,
  261. MVE_URSHR,
  262. MVE_SRSHRL,
  263. MVE_SRSHR,
  264. MVE_SQSHLL,
  265. MVE_SQSHL,
  266. MVE_CINC,
  267. MVE_CINV,
  268. MVE_CNEG,
  269. MVE_CSINC,
  270. MVE_CSINV,
  271. MVE_CSET,
  272. MVE_CSETM,
  273. MVE_CSNEG,
  274. MVE_CSEL,
  275. MVE_NONE
  276. };
  277. enum mve_unpredictable
  278. {
  279. UNPRED_IT_BLOCK, /* Unpredictable because mve insn in it block.
  280. */
  281. UNPRED_FCA_0_FCB_1, /* Unpredictable because fcA = 0 and
  282. fcB = 1 (vpt). */
  283. UNPRED_R13, /* Unpredictable because r13 (sp) or
  284. r15 (sp) used. */
  285. UNPRED_R15, /* Unpredictable because r15 (pc) is used. */
  286. UNPRED_Q_GT_4, /* Unpredictable because
  287. vec reg start > 4 (vld4/st4). */
  288. UNPRED_Q_GT_6, /* Unpredictable because
  289. vec reg start > 6 (vld2/st2). */
  290. UNPRED_R13_AND_WB, /* Unpredictable becase gp reg = r13
  291. and WB bit = 1. */
  292. UNPRED_Q_REGS_EQUAL, /* Unpredictable because vector registers are
  293. equal. */
  294. UNPRED_OS, /* Unpredictable because offset scaled == 1. */
  295. UNPRED_GP_REGS_EQUAL, /* Unpredictable because gp registers are the
  296. same. */
  297. UNPRED_Q_REGS_EQ_AND_SIZE_1, /* Unpredictable because q regs equal and
  298. size = 1. */
  299. UNPRED_Q_REGS_EQ_AND_SIZE_2, /* Unpredictable because q regs equal and
  300. size = 2. */
  301. UNPRED_NONE /* No unpredictable behavior. */
  302. };
  303. enum mve_undefined
  304. {
  305. UNDEF_SIZE, /* undefined size. */
  306. UNDEF_SIZE_0, /* undefined because size == 0. */
  307. UNDEF_SIZE_2, /* undefined because size == 2. */
  308. UNDEF_SIZE_3, /* undefined because size == 3. */
  309. UNDEF_SIZE_LE_1, /* undefined because size <= 1. */
  310. UNDEF_SIZE_NOT_0, /* undefined because size != 0. */
  311. UNDEF_SIZE_NOT_2, /* undefined because size != 2. */
  312. UNDEF_SIZE_NOT_3, /* undefined because size != 3. */
  313. UNDEF_NOT_UNS_SIZE_0, /* undefined because U == 0 and
  314. size == 0. */
  315. UNDEF_NOT_UNS_SIZE_1, /* undefined because U == 0 and
  316. size == 1. */
  317. UNDEF_NOT_UNSIGNED, /* undefined because U == 0. */
  318. UNDEF_VCVT_IMM6, /* imm6 < 32. */
  319. UNDEF_VCVT_FSI_IMM6, /* fsi = 0 and 32 >= imm6 <= 47. */
  320. UNDEF_BAD_OP1_OP2, /* undefined with op2 = 2 and
  321. op1 == (0 or 1). */
  322. UNDEF_BAD_U_OP1_OP2, /* undefined with U = 1 and
  323. op2 == 0 and op1 == (0 or 1). */
  324. UNDEF_OP_0_BAD_CMODE, /* undefined because op == 0 and cmode
  325. in {0xx1, x0x1}. */
  326. UNDEF_XCHG_UNS, /* undefined because X == 1 and U == 1. */
  327. UNDEF_NONE /* no undefined behavior. */
  328. };
  329. struct opcode32
  330. {
  331. arm_feature_set arch; /* Architecture defining this insn. */
  332. unsigned long value; /* If arch is 0 then value is a sentinel. */
  333. unsigned long mask; /* Recognise insn if (op & mask) == value. */
  334. const char * assembler; /* How to disassemble this insn. */
  335. };
  336. struct cdeopcode32
  337. {
  338. arm_feature_set arch; /* Architecture defining this insn. */
  339. uint8_t coproc_shift; /* coproc is this far into op. */
  340. uint16_t coproc_mask; /* Length of coproc field in op. */
  341. unsigned long value; /* If arch is 0 then value is a sentinel. */
  342. unsigned long mask; /* Recognise insn if (op & mask) == value. */
  343. const char * assembler; /* How to disassemble this insn. */
  344. };
  345. /* MVE opcodes. */
  346. struct mopcode32
  347. {
  348. arm_feature_set arch; /* Architecture defining this insn. */
  349. enum mve_instructions mve_op; /* Specific mve instruction for faster
  350. decoding. */
  351. unsigned long value; /* If arch is 0 then value is a sentinel. */
  352. unsigned long mask; /* Recognise insn if (op & mask) == value. */
  353. const char * assembler; /* How to disassemble this insn. */
  354. };
  355. enum isa {
  356. ANY,
  357. T32,
  358. ARM
  359. };
  360. /* Shared (between Arm and Thumb mode) opcode. */
  361. struct sopcode32
  362. {
  363. enum isa isa; /* Execution mode instruction availability. */
  364. arm_feature_set arch; /* Architecture defining this insn. */
  365. unsigned long value; /* If arch is 0 then value is a sentinel. */
  366. unsigned long mask; /* Recognise insn if (op & mask) == value. */
  367. const char * assembler; /* How to disassemble this insn. */
  368. };
  369. struct opcode16
  370. {
  371. arm_feature_set arch; /* Architecture defining this insn. */
  372. unsigned short value, mask; /* Recognise insn if (op & mask) == value. */
  373. const char *assembler; /* How to disassemble this insn. */
  374. };
  375. /* print_insn_coprocessor recognizes the following format control codes:
  376. %% %
  377. %c print condition code (always bits 28-31 in ARM mode)
  378. %b print condition code allowing cp_num == 9
  379. %q print shifter argument
  380. %u print condition code (unconditional in ARM mode,
  381. UNPREDICTABLE if not AL in Thumb)
  382. %A print address for ldc/stc/ldf/stf instruction
  383. %B print vstm/vldm register list
  384. %C print vscclrm register list
  385. %I print cirrus signed shift immediate: bits 0..3|4..6
  386. %J print register for VLDR instruction
  387. %K print address for VLDR instruction
  388. %F print the COUNT field of a LFM/SFM instruction.
  389. %P print floating point precision in arithmetic insn
  390. %Q print floating point precision in ldf/stf insn
  391. %R print floating point rounding mode
  392. %<bitfield>c print as a condition code (for vsel)
  393. %<bitfield>r print as an ARM register
  394. %<bitfield>R as %<>r but r15 is UNPREDICTABLE
  395. %<bitfield>ru as %<>r but each u register must be unique.
  396. %<bitfield>d print the bitfield in decimal
  397. %<bitfield>k print immediate for VFPv3 conversion instruction
  398. %<bitfield>x print the bitfield in hex
  399. %<bitfield>X print the bitfield as 1 hex digit without leading "0x"
  400. %<bitfield>f print a floating point constant if >7 else a
  401. floating point register
  402. %<bitfield>w print as an iWMMXt width field - [bhwd]ss/us
  403. %<bitfield>g print as an iWMMXt 64-bit register
  404. %<bitfield>G print as an iWMMXt general purpose or control register
  405. %<bitfield>D print as a NEON D register
  406. %<bitfield>Q print as a NEON Q register
  407. %<bitfield>V print as a NEON D or Q register
  408. %<bitfield>E print a quarter-float immediate value
  409. %y<code> print a single precision VFP reg.
  410. Codes: 0=>Sm, 1=>Sd, 2=>Sn, 3=>multi-list, 4=>Sm pair
  411. %z<code> print a double precision VFP reg
  412. Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
  413. %<bitfield>'c print specified char iff bitfield is all ones
  414. %<bitfield>`c print specified char iff bitfield is all zeroes
  415. %<bitfield>?ab... select from array of values in big endian order
  416. %L print as an iWMMXt N/M width field.
  417. %Z print the Immediate of a WSHUFH instruction.
  418. %l like 'A' except use byte offsets for 'B' & 'H'
  419. versions.
  420. %i print 5-bit immediate in bits 8,3..0
  421. (print "32" when 0)
  422. %r print register offset address for wldt/wstr instruction. */
  423. enum opcode_sentinel_enum
  424. {
  425. SENTINEL_IWMMXT_START = 1,
  426. SENTINEL_IWMMXT_END,
  427. SENTINEL_GENERIC_START
  428. } opcode_sentinels;
  429. #define UNDEFINED_INSTRUCTION "\t\t; <UNDEFINED> instruction: %0-31x"
  430. #define UNKNOWN_INSTRUCTION_32BIT "\t\t; <UNDEFINED> instruction: %08x"
  431. #define UNKNOWN_INSTRUCTION_16BIT "\t\t; <UNDEFINED> instruction: %04x"
  432. #define UNPREDICTABLE_INSTRUCTION "\t; <UNPREDICTABLE>"
  433. /* Common coprocessor opcodes shared between Arm and Thumb-2. */
  434. /* print_insn_cde recognizes the following format control codes:
  435. %% %
  436. %a print 'a' iff bit 28 is 1
  437. %p print bits 8-10 as coprocessor
  438. %<bitfield>d print as decimal
  439. %<bitfield>r print as an ARM register
  440. %<bitfield>n print as an ARM register but r15 is APSR_nzcv
  441. %<bitfield>T print as an ARM register + 1
  442. %<bitfield>R as %r but r13 is UNPREDICTABLE
  443. %<bitfield>S as %r but rX where X > 10 is UNPREDICTABLE
  444. %j print immediate taken from bits (16..21,7,0..5)
  445. %k print immediate taken from bits (20..21,7,0..5).
  446. %l print immediate taken from bits (20..22,7,4..5). */
  447. /* At the moment there is only one valid position for the coprocessor number,
  448. and hence that's encoded in the macro below. */
  449. #define CDE_OPCODE(ARCH, VALUE, MASK, ASM) \
  450. { ARCH, 8, 7, VALUE, MASK, ASM }
  451. static const struct cdeopcode32 cde_opcodes[] =
  452. {
  453. /* Custom Datapath Extension instructions. */
  454. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  455. 0xee000000, 0xefc00840,
  456. "cx1%a\t%p, %12-15n, #%0-5,7,16-21d"),
  457. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  458. 0xee000040, 0xefc00840,
  459. "cx1d%a\t%p, %12-15S, %12-15T, #%0-5,7,16-21d"),
  460. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  461. 0xee400000, 0xefc00840,
  462. "cx2%a\t%p, %12-15n, %16-19n, #%0-5,7,20-21d"),
  463. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  464. 0xee400040, 0xefc00840,
  465. "cx2d%a\t%p, %12-15S, %12-15T, %16-19n, #%0-5,7,20-21d"),
  466. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  467. 0xee800000, 0xef800840,
  468. "cx3%a\t%p, %0-3n, %16-19n, %12-15n, #%4-5,7,20-22d"),
  469. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  470. 0xee800040, 0xef800840,
  471. "cx3d%a\t%p, %0-3S, %0-3T, %16-19n, %12-15n, #%4-5,7,20-22d"),
  472. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  473. 0xec200000, 0xeeb00840,
  474. "vcx1%a\t%p, %12-15,22V, #%0-5,7,16-19d"),
  475. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  476. 0xec200040, 0xeeb00840,
  477. "vcx1%a\t%p, %12-15,22V, #%0-5,7,16-19,24d"),
  478. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  479. 0xec300000, 0xeeb00840,
  480. "vcx2%a\t%p, %12-15,22V, %0-3,5V, #%4,7,16-19d"),
  481. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  482. 0xec300040, 0xeeb00840,
  483. "vcx2%a\t%p, %12-15,22V, %0-3,5V, #%4,7,16-19,24d"),
  484. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  485. 0xec800000, 0xee800840,
  486. "vcx3%a\t%p, %12-15,22V, %16-19,7V, %0-3,5V, #%4,20-21d"),
  487. CDE_OPCODE (ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE),
  488. 0xec800040, 0xee800840,
  489. "vcx3%a\t%p, %12-15,22V, %16-19,7V, %0-3,5V, #%4,20-21,24d"),
  490. CDE_OPCODE (ARM_FEATURE_CORE_LOW (0), 0, 0, 0)
  491. };
  492. static const struct sopcode32 coprocessor_opcodes[] =
  493. {
  494. /* XScale instructions. */
  495. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  496. 0x0e200010, 0x0fff0ff0,
  497. "mia%c\tacc0, %0-3r, %12-15r"},
  498. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  499. 0x0e280010, 0x0fff0ff0,
  500. "miaph%c\tacc0, %0-3r, %12-15r"},
  501. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  502. 0x0e2c0010, 0x0ffc0ff0, "mia%17'T%17`B%16'T%16`B%c\tacc0, %0-3r, %12-15r"},
  503. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  504. 0x0c400000, 0x0ff00fff, "mar%c\tacc0, %12-15r, %16-19r"},
  505. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  506. 0x0c500000, 0x0ff00fff, "mra%c\t%12-15r, %16-19r, acc0"},
  507. /* Intel Wireless MMX technology instructions. */
  508. {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_IWMMXT_START, 0, "" },
  509. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_IWMMXT),
  510. 0x0e130130, 0x0f3f0fff, "tandc%22-23w%c\t%12-15r"},
  511. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  512. 0x0e400010, 0x0ff00f3f, "tbcst%6-7w%c\t%16-19g, %12-15r"},
  513. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  514. 0x0e130170, 0x0f3f0ff8, "textrc%22-23w%c\t%12-15r, #%0-2d"},
  515. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  516. 0x0e100070, 0x0f300ff0, "textrm%3?su%22-23w%c\t%12-15r, %16-19g, #%0-2d"},
  517. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  518. 0x0e600010, 0x0ff00f38, "tinsr%6-7w%c\t%16-19g, %12-15r, #%0-2d"},
  519. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  520. 0x0e000110, 0x0ff00fff, "tmcr%c\t%16-19G, %12-15r"},
  521. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  522. 0x0c400000, 0x0ff00ff0, "tmcrr%c\t%0-3g, %12-15r, %16-19r"},
  523. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  524. 0x0e2c0010, 0x0ffc0e10, "tmia%17?tb%16?tb%c\t%5-8g, %0-3r, %12-15r"},
  525. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  526. 0x0e200010, 0x0fff0e10, "tmia%c\t%5-8g, %0-3r, %12-15r"},
  527. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  528. 0x0e280010, 0x0fff0e10, "tmiaph%c\t%5-8g, %0-3r, %12-15r"},
  529. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  530. 0x0e100030, 0x0f300fff, "tmovmsk%22-23w%c\t%12-15r, %16-19g"},
  531. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  532. 0x0e100110, 0x0ff00ff0, "tmrc%c\t%12-15r, %16-19G"},
  533. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  534. 0x0c500000, 0x0ff00ff0, "tmrrc%c\t%12-15r, %16-19r, %0-3g"},
  535. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  536. 0x0e130150, 0x0f3f0fff, "torc%22-23w%c\t%12-15r"},
  537. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  538. 0x0e120190, 0x0f3f0fff, "torvsc%22-23w%c\t%12-15r"},
  539. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  540. 0x0e2001c0, 0x0f300fff, "wabs%22-23w%c\t%12-15g, %16-19g"},
  541. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  542. 0x0e0001c0, 0x0f300fff, "wacc%22-23w%c\t%12-15g, %16-19g"},
  543. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  544. 0x0e000180, 0x0f000ff0, "wadd%20-23w%c\t%12-15g, %16-19g, %0-3g"},
  545. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  546. 0x0e2001a0, 0x0fb00ff0, "waddbhus%22?ml%c\t%12-15g, %16-19g, %0-3g"},
  547. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  548. 0x0ea001a0, 0x0ff00ff0, "waddsubhx%c\t%12-15g, %16-19g, %0-3g"},
  549. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  550. 0x0e000020, 0x0f800ff0, "waligni%c\t%12-15g, %16-19g, %0-3g, #%20-22d"},
  551. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  552. 0x0e800020, 0x0fc00ff0, "walignr%20-21d%c\t%12-15g, %16-19g, %0-3g"},
  553. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  554. 0x0e200000, 0x0fe00ff0, "wand%20'n%c\t%12-15g, %16-19g, %0-3g"},
  555. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  556. 0x0e800000, 0x0fa00ff0, "wavg2%22?hb%20'r%c\t%12-15g, %16-19g, %0-3g"},
  557. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  558. 0x0e400000, 0x0fe00ff0, "wavg4%20'r%c\t%12-15g, %16-19g, %0-3g"},
  559. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  560. 0x0e000060, 0x0f300ff0, "wcmpeq%22-23w%c\t%12-15g, %16-19g, %0-3g"},
  561. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  562. 0x0e100060, 0x0f100ff0, "wcmpgt%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
  563. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  564. 0xfc500100, 0xfe500f00, "wldrd\t%12-15g, %r"},
  565. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  566. 0xfc100100, 0xfe500f00, "wldrw\t%12-15G, %A"},
  567. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  568. 0x0c100000, 0x0e100e00, "wldr%L%c\t%12-15g, %l"},
  569. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  570. 0x0e400100, 0x0fc00ff0, "wmac%21?su%20'z%c\t%12-15g, %16-19g, %0-3g"},
  571. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  572. 0x0e800100, 0x0fc00ff0, "wmadd%21?su%20'x%c\t%12-15g, %16-19g, %0-3g"},
  573. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  574. 0x0ec00100, 0x0fd00ff0, "wmadd%21?sun%c\t%12-15g, %16-19g, %0-3g"},
  575. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  576. 0x0e000160, 0x0f100ff0, "wmax%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
  577. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  578. 0x0e000080, 0x0f100fe0, "wmerge%c\t%12-15g, %16-19g, %0-3g, #%21-23d"},
  579. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  580. 0x0e0000a0, 0x0f800ff0, "wmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
  581. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  582. 0x0e800120, 0x0f800ff0,
  583. "wmiaw%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
  584. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  585. 0x0e100160, 0x0f100ff0, "wmin%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
  586. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  587. 0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%23'r%c\t%12-15g, %16-19g, %0-3g"},
  588. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  589. 0x0ed00100, 0x0fd00ff0, "wmul%21?sumr%c\t%12-15g, %16-19g, %0-3g"},
  590. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  591. 0x0ee000c0, 0x0fe00ff0, "wmulwsm%20`r%c\t%12-15g, %16-19g, %0-3g"},
  592. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  593. 0x0ec000c0, 0x0fe00ff0, "wmulwum%20`r%c\t%12-15g, %16-19g, %0-3g"},
  594. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  595. 0x0eb000c0, 0x0ff00ff0, "wmulwl%c\t%12-15g, %16-19g, %0-3g"},
  596. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  597. 0x0e8000a0, 0x0f800ff0,
  598. "wqmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
  599. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  600. 0x0e100080, 0x0fd00ff0, "wqmulm%21'r%c\t%12-15g, %16-19g, %0-3g"},
  601. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  602. 0x0ec000e0, 0x0fd00ff0, "wqmulwm%21'r%c\t%12-15g, %16-19g, %0-3g"},
  603. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  604. 0x0e000000, 0x0ff00ff0, "wor%c\t%12-15g, %16-19g, %0-3g"},
  605. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  606. 0x0e000080, 0x0f000ff0, "wpack%20-23w%c\t%12-15g, %16-19g, %0-3g"},
  607. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  608. 0xfe300040, 0xff300ef0, "wror%22-23w\t%12-15g, %16-19g, #%i"},
  609. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  610. 0x0e300040, 0x0f300ff0, "wror%22-23w%c\t%12-15g, %16-19g, %0-3g"},
  611. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  612. 0x0e300140, 0x0f300ff0, "wror%22-23wg%c\t%12-15g, %16-19g, %0-3G"},
  613. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  614. 0x0e000120, 0x0fa00ff0, "wsad%22?hb%20'z%c\t%12-15g, %16-19g, %0-3g"},
  615. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  616. 0x0e0001e0, 0x0f000ff0, "wshufh%c\t%12-15g, %16-19g, #%Z"},
  617. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  618. 0xfe100040, 0xff300ef0, "wsll%22-23w\t%12-15g, %16-19g, #%i"},
  619. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  620. 0x0e100040, 0x0f300ff0, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
  621. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  622. 0x0e100148, 0x0f300ffc, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
  623. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  624. 0xfe000040, 0xff300ef0, "wsra%22-23w\t%12-15g, %16-19g, #%i"},
  625. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  626. 0x0e000040, 0x0f300ff0, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
  627. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  628. 0x0e000148, 0x0f300ffc, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
  629. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  630. 0xfe200040, 0xff300ef0, "wsrl%22-23w\t%12-15g, %16-19g, #%i"},
  631. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  632. 0x0e200040, 0x0f300ff0, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
  633. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  634. 0x0e200148, 0x0f300ffc, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
  635. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  636. 0xfc400100, 0xfe500f00, "wstrd\t%12-15g, %r"},
  637. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  638. 0xfc000100, 0xfe500f00, "wstrw\t%12-15G, %A"},
  639. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  640. 0x0c000000, 0x0e100e00, "wstr%L%c\t%12-15g, %l"},
  641. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  642. 0x0e0001a0, 0x0f000ff0, "wsub%20-23w%c\t%12-15g, %16-19g, %0-3g"},
  643. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  644. 0x0ed001c0, 0x0ff00ff0, "wsubaddhx%c\t%12-15g, %16-19g, %0-3g"},
  645. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  646. 0x0e1001c0, 0x0f300ff0, "wabsdiff%22-23w%c\t%12-15g, %16-19g, %0-3g"},
  647. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  648. 0x0e0000c0, 0x0fd00fff, "wunpckeh%21?sub%c\t%12-15g, %16-19g"},
  649. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  650. 0x0e4000c0, 0x0fd00fff, "wunpckeh%21?suh%c\t%12-15g, %16-19g"},
  651. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  652. 0x0e8000c0, 0x0fd00fff, "wunpckeh%21?suw%c\t%12-15g, %16-19g"},
  653. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  654. 0x0e0000e0, 0x0f100fff, "wunpckel%21?su%22-23w%c\t%12-15g, %16-19g"},
  655. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  656. 0x0e1000c0, 0x0f300ff0, "wunpckih%22-23w%c\t%12-15g, %16-19g, %0-3g"},
  657. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  658. 0x0e1000e0, 0x0f300ff0, "wunpckil%22-23w%c\t%12-15g, %16-19g, %0-3g"},
  659. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_XSCALE),
  660. 0x0e100000, 0x0ff00ff0, "wxor%c\t%12-15g, %16-19g, %0-3g"},
  661. {ANY, ARM_FEATURE_CORE_LOW (0),
  662. SENTINEL_IWMMXT_END, 0, "" },
  663. /* Floating point coprocessor (FPA) instructions. */
  664. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  665. 0x0e000100, 0x0ff08f10, "adf%c%P%R\t%12-14f, %16-18f, %0-3f"},
  666. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  667. 0x0e100100, 0x0ff08f10, "muf%c%P%R\t%12-14f, %16-18f, %0-3f"},
  668. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  669. 0x0e200100, 0x0ff08f10, "suf%c%P%R\t%12-14f, %16-18f, %0-3f"},
  670. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  671. 0x0e300100, 0x0ff08f10, "rsf%c%P%R\t%12-14f, %16-18f, %0-3f"},
  672. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  673. 0x0e400100, 0x0ff08f10, "dvf%c%P%R\t%12-14f, %16-18f, %0-3f"},
  674. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  675. 0x0e500100, 0x0ff08f10, "rdf%c%P%R\t%12-14f, %16-18f, %0-3f"},
  676. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  677. 0x0e600100, 0x0ff08f10, "pow%c%P%R\t%12-14f, %16-18f, %0-3f"},
  678. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  679. 0x0e700100, 0x0ff08f10, "rpw%c%P%R\t%12-14f, %16-18f, %0-3f"},
  680. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  681. 0x0e800100, 0x0ff08f10, "rmf%c%P%R\t%12-14f, %16-18f, %0-3f"},
  682. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  683. 0x0e900100, 0x0ff08f10, "fml%c%P%R\t%12-14f, %16-18f, %0-3f"},
  684. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  685. 0x0ea00100, 0x0ff08f10, "fdv%c%P%R\t%12-14f, %16-18f, %0-3f"},
  686. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  687. 0x0eb00100, 0x0ff08f10, "frd%c%P%R\t%12-14f, %16-18f, %0-3f"},
  688. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  689. 0x0ec00100, 0x0ff08f10, "pol%c%P%R\t%12-14f, %16-18f, %0-3f"},
  690. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  691. 0x0e008100, 0x0ff08f10, "mvf%c%P%R\t%12-14f, %0-3f"},
  692. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  693. 0x0e108100, 0x0ff08f10, "mnf%c%P%R\t%12-14f, %0-3f"},
  694. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  695. 0x0e208100, 0x0ff08f10, "abs%c%P%R\t%12-14f, %0-3f"},
  696. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  697. 0x0e308100, 0x0ff08f10, "rnd%c%P%R\t%12-14f, %0-3f"},
  698. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  699. 0x0e408100, 0x0ff08f10, "sqt%c%P%R\t%12-14f, %0-3f"},
  700. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  701. 0x0e508100, 0x0ff08f10, "log%c%P%R\t%12-14f, %0-3f"},
  702. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  703. 0x0e608100, 0x0ff08f10, "lgn%c%P%R\t%12-14f, %0-3f"},
  704. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  705. 0x0e708100, 0x0ff08f10, "exp%c%P%R\t%12-14f, %0-3f"},
  706. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  707. 0x0e808100, 0x0ff08f10, "sin%c%P%R\t%12-14f, %0-3f"},
  708. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  709. 0x0e908100, 0x0ff08f10, "cos%c%P%R\t%12-14f, %0-3f"},
  710. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  711. 0x0ea08100, 0x0ff08f10, "tan%c%P%R\t%12-14f, %0-3f"},
  712. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  713. 0x0eb08100, 0x0ff08f10, "asn%c%P%R\t%12-14f, %0-3f"},
  714. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  715. 0x0ec08100, 0x0ff08f10, "acs%c%P%R\t%12-14f, %0-3f"},
  716. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  717. 0x0ed08100, 0x0ff08f10, "atn%c%P%R\t%12-14f, %0-3f"},
  718. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  719. 0x0ee08100, 0x0ff08f10, "urd%c%P%R\t%12-14f, %0-3f"},
  720. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  721. 0x0ef08100, 0x0ff08f10, "nrm%c%P%R\t%12-14f, %0-3f"},
  722. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  723. 0x0e000110, 0x0ff00f1f, "flt%c%P%R\t%16-18f, %12-15r"},
  724. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  725. 0x0e100110, 0x0fff0f98, "fix%c%R\t%12-15r, %0-2f"},
  726. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  727. 0x0e200110, 0x0fff0fff, "wfs%c\t%12-15r"},
  728. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  729. 0x0e300110, 0x0fff0fff, "rfs%c\t%12-15r"},
  730. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  731. 0x0e400110, 0x0fff0fff, "wfc%c\t%12-15r"},
  732. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  733. 0x0e500110, 0x0fff0fff, "rfc%c\t%12-15r"},
  734. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  735. 0x0e90f110, 0x0ff8fff0, "cmf%c\t%16-18f, %0-3f"},
  736. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  737. 0x0eb0f110, 0x0ff8fff0, "cnf%c\t%16-18f, %0-3f"},
  738. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  739. 0x0ed0f110, 0x0ff8fff0, "cmfe%c\t%16-18f, %0-3f"},
  740. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  741. 0x0ef0f110, 0x0ff8fff0, "cnfe%c\t%16-18f, %0-3f"},
  742. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  743. 0x0c000100, 0x0e100f00, "stf%c%Q\t%12-14f, %A"},
  744. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V1),
  745. 0x0c100100, 0x0e100f00, "ldf%c%Q\t%12-14f, %A"},
  746. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V2),
  747. 0x0c000200, 0x0e100f00, "sfm%c\t%12-14f, %F, %A"},
  748. {ANY, ARM_FEATURE_COPROC (FPU_FPA_EXT_V2),
  749. 0x0c100200, 0x0e100f00, "lfm%c\t%12-14f, %F, %A"},
  750. /* Armv8.1-M Mainline instructions. */
  751. {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  752. 0xec9f0b00, 0xffbf0f01, "vscclrm%c\t%C"},
  753. {T32, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  754. 0xec9f0a00, 0xffbf0f00, "vscclrm%c\t%C"},
  755. /* ARMv8-M Mainline Security Extensions instructions. */
  756. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
  757. 0xec300a00, 0xfff0ffff, "vlldm\t%16-19r"},
  758. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M_MAIN),
  759. 0xec200a00, 0xfff0ffff, "vlstm\t%16-19r"},
  760. /* Register load/store. */
  761. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
  762. 0x0d2d0b00, 0x0fbf0f01, "vpush%c\t%B"},
  763. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
  764. 0x0d200b00, 0x0fb00f01, "vstmdb%c\t%16-19r!, %B"},
  765. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
  766. 0x0d300b00, 0x0fb00f01, "vldmdb%c\t%16-19r!, %B"},
  767. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
  768. 0x0c800b00, 0x0f900f01, "vstmia%c\t%16-19r%21'!, %B"},
  769. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
  770. 0x0cbd0b00, 0x0fbf0f01, "vpop%c\t%B"},
  771. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
  772. 0x0c900b00, 0x0f900f01, "vldmia%c\t%16-19r%21'!, %B"},
  773. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
  774. 0x0d000b00, 0x0f300f00, "vstr%c\t%12-15,22D, %A"},
  775. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD | FPU_NEON_EXT_V1),
  776. 0x0d100b00, 0x0f300f00, "vldr%c\t%12-15,22D, %A"},
  777. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  778. 0x0d2d0a00, 0x0fbf0f00, "vpush%c\t%y3"},
  779. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  780. 0x0d200a00, 0x0fb00f00, "vstmdb%c\t%16-19r!, %y3"},
  781. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  782. 0x0d300a00, 0x0fb00f00, "vldmdb%c\t%16-19r!, %y3"},
  783. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  784. 0x0c800a00, 0x0f900f00, "vstmia%c\t%16-19r%21'!, %y3"},
  785. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  786. 0x0cbd0a00, 0x0fbf0f00, "vpop%c\t%y3"},
  787. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  788. 0x0c900a00, 0x0f900f00, "vldmia%c\t%16-19r%21'!, %y3"},
  789. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  790. 0x0d000a00, 0x0f300f00, "vstr%c\t%y1, %A"},
  791. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  792. 0x0d100a00, 0x0f300f00, "vldr%c\t%y1, %A"},
  793. {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
  794. 0xec100f80, 0xfe101f80, "vldr%c\t%J, %K"},
  795. {ANY, ARM_FEATURE_COPROC (ARM_EXT2_V8_1M_MAIN),
  796. 0xec000f80, 0xfe101f80, "vstr%c\t%J, %K"},
  797. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  798. 0x0d200b01, 0x0fb00f01, "fstmdbx%c\t%16-19r!, %z3\t;@ Deprecated"},
  799. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  800. 0x0d300b01, 0x0fb00f01, "fldmdbx%c\t%16-19r!, %z3\t;@ Deprecated"},
  801. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  802. 0x0c800b01, 0x0f900f01, "fstmiax%c\t%16-19r%21'!, %z3\t;@ Deprecated"},
  803. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  804. 0x0c900b01, 0x0f900f01, "fldmiax%c\t%16-19r%21'!, %z3\t;@ Deprecated"},
  805. /* Data transfer between ARM and NEON registers. */
  806. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  807. 0x0c400b10, 0x0ff00fd0, "vmov%c\t%0-3,5D, %12-15r, %16-19r"},
  808. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  809. 0x0c500b10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %0-3,5D"},
  810. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  811. 0x0e000b10, 0x0fd00f70, "vmov%c.32\t%16-19,7D[%21d], %12-15r"},
  812. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  813. 0x0e100b10, 0x0f500f70, "vmov%c.32\t%12-15r, %16-19,7D[%21d]"},
  814. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  815. 0x0e000b30, 0x0fd00f30, "vmov%c.16\t%16-19,7D[%6,21d], %12-15r"},
  816. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  817. 0x0e100b30, 0x0f500f30, "vmov%c.%23?us16\t%12-15r, %16-19,7D[%6,21d]"},
  818. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  819. 0x0e400b10, 0x0fd00f10, "vmov%c.8\t%16-19,7D[%5,6,21d], %12-15r"},
  820. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  821. 0x0e500b10, 0x0f500f10, "vmov%c.%23?us8\t%12-15r, %16-19,7D[%5,6,21d]"},
  822. /* Half-precision conversion instructions. */
  823. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  824. 0x0eb20b40, 0x0fbf0f50, "vcvt%7?tb%c.f64.f16\t%z1, %y0"},
  825. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  826. 0x0eb30b40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f64\t%y1, %z0"},
  827. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
  828. 0x0eb20a40, 0x0fbf0f50, "vcvt%7?tb%c.f32.f16\t%y1, %y0"},
  829. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
  830. 0x0eb30a40, 0x0fbf0f50, "vcvt%7?tb%c.f16.f32\t%y1, %y0"},
  831. /* Floating point coprocessor (VFP) instructions. */
  832. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  833. 0x0ee00a10, 0x0fff0fff, "vmsr%c\tfpsid, %12-15r"},
  834. {ANY, ARM_FEATURE (0, ARM_EXT2_V8_1M_MAIN, FPU_VFP_EXT_V1xD),
  835. 0x0ee10a10, 0x0fff0fff, "vmsr%c\tfpscr, %12-15r"},
  836. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  837. 0x0ee20a10, 0x0fff0fff, "vmsr%c\tfpscr_nzcvqc, %12-15r"},
  838. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  839. 0x0ee60a10, 0x0fff0fff, "vmsr%c\tmvfr1, %12-15r"},
  840. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  841. 0x0ee70a10, 0x0fff0fff, "vmsr%c\tmvfr0, %12-15r"},
  842. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  843. 0x0ee50a10, 0x0fff0fff, "vmsr%c\tmvfr2, %12-15r"},
  844. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  845. 0x0ee80a10, 0x0fff0fff, "vmsr%c\tfpexc, %12-15r"},
  846. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  847. 0x0ee90a10, 0x0fff0fff, "vmsr%c\tfpinst, %12-15r\t@ Impl def"},
  848. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  849. 0x0eea0a10, 0x0fff0fff, "vmsr%c\tfpinst2, %12-15r\t@ Impl def"},
  850. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  851. 0x0eec0a10, 0x0fff0fff, "vmsr%c\tvpr, %12-15r"},
  852. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  853. 0x0eed0a10, 0x0fff0fff, "vmsr%c\tp0, %12-15r"},
  854. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  855. 0x0eee0a10, 0x0fff0fff, "vmsr%c\tfpcxt_ns, %12-15r"},
  856. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  857. 0x0eef0a10, 0x0fff0fff, "vmsr%c\tfpcxt_s, %12-15r"},
  858. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  859. 0x0ef00a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpsid"},
  860. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  861. 0x0ef1fa10, 0x0fffffff, "vmrs%c\tAPSR_nzcv, fpscr"},
  862. {ANY, ARM_FEATURE (0, ARM_EXT2_V8_1M_MAIN, FPU_VFP_EXT_V1xD),
  863. 0x0ef10a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpscr"},
  864. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  865. 0x0ef20a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpscr_nzcvqc"},
  866. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  867. 0x0ef50a10, 0x0fff0fff, "vmrs%c\t%12-15r, mvfr2"},
  868. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  869. 0x0ef60a10, 0x0fff0fff, "vmrs%c\t%12-15r, mvfr1"},
  870. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  871. 0x0ef70a10, 0x0fff0fff, "vmrs%c\t%12-15r, mvfr0"},
  872. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  873. 0x0ef80a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpexc"},
  874. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  875. 0x0ef90a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpinst\t@ Impl def"},
  876. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  877. 0x0efa0a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpinst2\t@ Impl def"},
  878. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  879. 0x0efc0a10, 0x0fff0fff, "vmrs%c\t%12-15r, vpr"},
  880. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  881. 0x0efd0a10, 0x0fff0fff, "vmrs%c\t%12-15r, p0"},
  882. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  883. 0x0efe0a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpcxt_ns"},
  884. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  885. 0x0eff0a10, 0x0fff0fff, "vmrs%c\t%12-15r, fpcxt_s"},
  886. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  887. 0x0e000b10, 0x0fd00fff, "vmov%c.32\t%z2[%21d], %12-15r"},
  888. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  889. 0x0e100b10, 0x0fd00fff, "vmov%c.32\t%12-15r, %z2[%21d]"},
  890. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  891. 0x0ee00a10, 0x0ff00fff, "vmsr%c\t<impl def %16-19x>, %12-15r"},
  892. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  893. 0x0ef00a10, 0x0ff00fff, "vmrs%c\t%12-15r, <impl def %16-19x>"},
  894. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  895. 0x0e000a10, 0x0ff00f7f, "vmov%c\t%y2, %12-15r"},
  896. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  897. 0x0e100a10, 0x0ff00f7f, "vmov%c\t%12-15r, %y2"},
  898. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  899. 0x0eb50a40, 0x0fbf0f70, "vcmp%7'e%c.f32\t%y1, #0.0"},
  900. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  901. 0x0eb50b40, 0x0fbf0f70, "vcmp%7'e%c.f64\t%z1, #0.0"},
  902. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  903. 0x0eb00a40, 0x0fbf0fd0, "vmov%c.f32\t%y1, %y0"},
  904. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  905. 0x0eb00ac0, 0x0fbf0fd0, "vabs%c.f32\t%y1, %y0"},
  906. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  907. 0x0eb00b40, 0x0fbf0fd0, "vmov%c.f64\t%z1, %z0"},
  908. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  909. 0x0eb00bc0, 0x0fbf0fd0, "vabs%c.f64\t%z1, %z0"},
  910. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  911. 0x0eb10a40, 0x0fbf0fd0, "vneg%c.f32\t%y1, %y0"},
  912. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  913. 0x0eb10ac0, 0x0fbf0fd0, "vsqrt%c.f32\t%y1, %y0"},
  914. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  915. 0x0eb10b40, 0x0fbf0fd0, "vneg%c.f64\t%z1, %z0"},
  916. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  917. 0x0eb10bc0, 0x0fbf0fd0, "vsqrt%c.f64\t%z1, %z0"},
  918. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  919. 0x0eb70ac0, 0x0fbf0fd0, "vcvt%c.f64.f32\t%z1, %y0"},
  920. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  921. 0x0eb70bc0, 0x0fbf0fd0, "vcvt%c.f32.f64\t%y1, %z0"},
  922. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  923. 0x0eb80a40, 0x0fbf0f50, "vcvt%c.f32.%7?su32\t%y1, %y0"},
  924. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  925. 0x0eb80b40, 0x0fbf0f50, "vcvt%c.f64.%7?su32\t%z1, %y0"},
  926. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  927. 0x0eb40a40, 0x0fbf0f50, "vcmp%7'e%c.f32\t%y1, %y0"},
  928. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  929. 0x0eb40b40, 0x0fbf0f50, "vcmp%7'e%c.f64\t%z1, %z0"},
  930. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
  931. 0x0eba0a40, 0x0fbe0f50, "vcvt%c.f32.%16?us%7?31%7?26\t%y1, %y1, #%5,0-3k"},
  932. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
  933. 0x0eba0b40, 0x0fbe0f50, "vcvt%c.f64.%16?us%7?31%7?26\t%z1, %z1, #%5,0-3k"},
  934. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  935. 0x0ebc0a40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f32\t%y1, %y0"},
  936. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  937. 0x0ebc0b40, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f64\t%y1, %z0"},
  938. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
  939. 0x0ebe0a40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f32\t%y1, %y1, #%5,0-3k"},
  940. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
  941. 0x0ebe0b40, 0x0fbe0f50, "vcvt%c.%16?us%7?31%7?26.f64\t%z1, %z1, #%5,0-3k"},
  942. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  943. 0x0c500b10, 0x0fb00ff0, "vmov%c\t%12-15r, %16-19r, %z0"},
  944. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3xD),
  945. 0x0eb00a00, 0x0fb00ff0, "vmov%c.f32\t%y1, #%0-3,16-19E"},
  946. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V3),
  947. 0x0eb00b00, 0x0fb00ff0, "vmov%c.f64\t%z1, #%0-3,16-19E"},
  948. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
  949. 0x0c400a10, 0x0ff00fd0, "vmov%c\t%y4, %12-15r, %16-19r"},
  950. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
  951. 0x0c400b10, 0x0ff00fd0, "vmov%c\t%z0, %12-15r, %16-19r"},
  952. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V2),
  953. 0x0c500a10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %y4"},
  954. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  955. 0x0e000a00, 0x0fb00f50, "vmla%c.f32\t%y1, %y2, %y0"},
  956. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  957. 0x0e000a40, 0x0fb00f50, "vmls%c.f32\t%y1, %y2, %y0"},
  958. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  959. 0x0e000b00, 0x0fb00f50, "vmla%c.f64\t%z1, %z2, %z0"},
  960. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  961. 0x0e000b40, 0x0fb00f50, "vmls%c.f64\t%z1, %z2, %z0"},
  962. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  963. 0x0e100a00, 0x0fb00f50, "vnmls%c.f32\t%y1, %y2, %y0"},
  964. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  965. 0x0e100a40, 0x0fb00f50, "vnmla%c.f32\t%y1, %y2, %y0"},
  966. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  967. 0x0e100b00, 0x0fb00f50, "vnmls%c.f64\t%z1, %z2, %z0"},
  968. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  969. 0x0e100b40, 0x0fb00f50, "vnmla%c.f64\t%z1, %z2, %z0"},
  970. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  971. 0x0e200a00, 0x0fb00f50, "vmul%c.f32\t%y1, %y2, %y0"},
  972. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  973. 0x0e200a40, 0x0fb00f50, "vnmul%c.f32\t%y1, %y2, %y0"},
  974. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  975. 0x0e200b00, 0x0fb00f50, "vmul%c.f64\t%z1, %z2, %z0"},
  976. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  977. 0x0e200b40, 0x0fb00f50, "vnmul%c.f64\t%z1, %z2, %z0"},
  978. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  979. 0x0e300a00, 0x0fb00f50, "vadd%c.f32\t%y1, %y2, %y0"},
  980. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  981. 0x0e300a40, 0x0fb00f50, "vsub%c.f32\t%y1, %y2, %y0"},
  982. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  983. 0x0e300b00, 0x0fb00f50, "vadd%c.f64\t%z1, %z2, %z0"},
  984. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  985. 0x0e300b40, 0x0fb00f50, "vsub%c.f64\t%z1, %z2, %z0"},
  986. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1xD),
  987. 0x0e800a00, 0x0fb00f50, "vdiv%c.f32\t%y1, %y2, %y0"},
  988. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_V1),
  989. 0x0e800b00, 0x0fb00f50, "vdiv%c.f64\t%z1, %z2, %z0"},
  990. /* Cirrus coprocessor instructions. */
  991. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  992. 0x0d100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
  993. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  994. 0x0c100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
  995. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  996. 0x0d500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
  997. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  998. 0x0c500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
  999. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1000. 0x0d100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
  1001. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1002. 0x0c100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
  1003. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1004. 0x0d500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
  1005. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1006. 0x0c500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
  1007. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1008. 0x0d000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
  1009. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1010. 0x0c000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
  1011. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1012. 0x0d400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
  1013. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1014. 0x0c400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
  1015. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1016. 0x0d000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
  1017. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1018. 0x0c000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
  1019. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1020. 0x0d400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
  1021. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1022. 0x0c400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
  1023. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1024. 0x0e000450, 0x0ff00ff0, "cfmvsr%c\tmvf%16-19d, %12-15r"},
  1025. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1026. 0x0e100450, 0x0ff00ff0, "cfmvrs%c\t%12-15r, mvf%16-19d"},
  1027. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1028. 0x0e000410, 0x0ff00ff0, "cfmvdlr%c\tmvd%16-19d, %12-15r"},
  1029. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1030. 0x0e100410, 0x0ff00ff0, "cfmvrdl%c\t%12-15r, mvd%16-19d"},
  1031. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1032. 0x0e000430, 0x0ff00ff0, "cfmvdhr%c\tmvd%16-19d, %12-15r"},
  1033. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1034. 0x0e100430, 0x0ff00fff, "cfmvrdh%c\t%12-15r, mvd%16-19d"},
  1035. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1036. 0x0e000510, 0x0ff00fff, "cfmv64lr%c\tmvdx%16-19d, %12-15r"},
  1037. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1038. 0x0e100510, 0x0ff00fff, "cfmvr64l%c\t%12-15r, mvdx%16-19d"},
  1039. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1040. 0x0e000530, 0x0ff00fff, "cfmv64hr%c\tmvdx%16-19d, %12-15r"},
  1041. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1042. 0x0e100530, 0x0ff00fff, "cfmvr64h%c\t%12-15r, mvdx%16-19d"},
  1043. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1044. 0x0e200440, 0x0ff00fff, "cfmval32%c\tmvax%12-15d, mvfx%16-19d"},
  1045. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1046. 0x0e100440, 0x0ff00fff, "cfmv32al%c\tmvfx%12-15d, mvax%16-19d"},
  1047. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1048. 0x0e200460, 0x0ff00fff, "cfmvam32%c\tmvax%12-15d, mvfx%16-19d"},
  1049. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1050. 0x0e100460, 0x0ff00fff, "cfmv32am%c\tmvfx%12-15d, mvax%16-19d"},
  1051. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1052. 0x0e200480, 0x0ff00fff, "cfmvah32%c\tmvax%12-15d, mvfx%16-19d"},
  1053. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1054. 0x0e100480, 0x0ff00fff, "cfmv32ah%c\tmvfx%12-15d, mvax%16-19d"},
  1055. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1056. 0x0e2004a0, 0x0ff00fff, "cfmva32%c\tmvax%12-15d, mvfx%16-19d"},
  1057. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1058. 0x0e1004a0, 0x0ff00fff, "cfmv32a%c\tmvfx%12-15d, mvax%16-19d"},
  1059. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1060. 0x0e2004c0, 0x0ff00fff, "cfmva64%c\tmvax%12-15d, mvdx%16-19d"},
  1061. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1062. 0x0e1004c0, 0x0ff00fff, "cfmv64a%c\tmvdx%12-15d, mvax%16-19d"},
  1063. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1064. 0x0e2004e0, 0x0fff0fff, "cfmvsc32%c\tdspsc, mvdx%12-15d"},
  1065. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1066. 0x0e1004e0, 0x0fff0fff, "cfmv32sc%c\tmvdx%12-15d, dspsc"},
  1067. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1068. 0x0e000400, 0x0ff00fff, "cfcpys%c\tmvf%12-15d, mvf%16-19d"},
  1069. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1070. 0x0e000420, 0x0ff00fff, "cfcpyd%c\tmvd%12-15d, mvd%16-19d"},
  1071. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1072. 0x0e000460, 0x0ff00fff, "cfcvtsd%c\tmvd%12-15d, mvf%16-19d"},
  1073. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1074. 0x0e000440, 0x0ff00fff, "cfcvtds%c\tmvf%12-15d, mvd%16-19d"},
  1075. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1076. 0x0e000480, 0x0ff00fff, "cfcvt32s%c\tmvf%12-15d, mvfx%16-19d"},
  1077. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1078. 0x0e0004a0, 0x0ff00fff, "cfcvt32d%c\tmvd%12-15d, mvfx%16-19d"},
  1079. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1080. 0x0e0004c0, 0x0ff00fff, "cfcvt64s%c\tmvf%12-15d, mvdx%16-19d"},
  1081. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1082. 0x0e0004e0, 0x0ff00fff, "cfcvt64d%c\tmvd%12-15d, mvdx%16-19d"},
  1083. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1084. 0x0e100580, 0x0ff00fff, "cfcvts32%c\tmvfx%12-15d, mvf%16-19d"},
  1085. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1086. 0x0e1005a0, 0x0ff00fff, "cfcvtd32%c\tmvfx%12-15d, mvd%16-19d"},
  1087. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1088. 0x0e1005c0, 0x0ff00fff, "cftruncs32%c\tmvfx%12-15d, mvf%16-19d"},
  1089. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1090. 0x0e1005e0, 0x0ff00fff, "cftruncd32%c\tmvfx%12-15d, mvd%16-19d"},
  1091. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1092. 0x0e000550, 0x0ff00ff0, "cfrshl32%c\tmvfx%16-19d, mvfx%0-3d, %12-15r"},
  1093. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1094. 0x0e000570, 0x0ff00ff0, "cfrshl64%c\tmvdx%16-19d, mvdx%0-3d, %12-15r"},
  1095. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1096. 0x0e000500, 0x0ff00f10, "cfsh32%c\tmvfx%12-15d, mvfx%16-19d, #%I"},
  1097. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1098. 0x0e200500, 0x0ff00f10, "cfsh64%c\tmvdx%12-15d, mvdx%16-19d, #%I"},
  1099. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1100. 0x0e100490, 0x0ff00ff0, "cfcmps%c\t%12-15r, mvf%16-19d, mvf%0-3d"},
  1101. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1102. 0x0e1004b0, 0x0ff00ff0, "cfcmpd%c\t%12-15r, mvd%16-19d, mvd%0-3d"},
  1103. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1104. 0x0e100590, 0x0ff00ff0, "cfcmp32%c\t%12-15r, mvfx%16-19d, mvfx%0-3d"},
  1105. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1106. 0x0e1005b0, 0x0ff00ff0, "cfcmp64%c\t%12-15r, mvdx%16-19d, mvdx%0-3d"},
  1107. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1108. 0x0e300400, 0x0ff00fff, "cfabss%c\tmvf%12-15d, mvf%16-19d"},
  1109. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1110. 0x0e300420, 0x0ff00fff, "cfabsd%c\tmvd%12-15d, mvd%16-19d"},
  1111. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1112. 0x0e300440, 0x0ff00fff, "cfnegs%c\tmvf%12-15d, mvf%16-19d"},
  1113. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1114. 0x0e300460, 0x0ff00fff, "cfnegd%c\tmvd%12-15d, mvd%16-19d"},
  1115. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1116. 0x0e300480, 0x0ff00ff0, "cfadds%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
  1117. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1118. 0x0e3004a0, 0x0ff00ff0, "cfaddd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
  1119. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1120. 0x0e3004c0, 0x0ff00ff0, "cfsubs%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
  1121. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1122. 0x0e3004e0, 0x0ff00ff0, "cfsubd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
  1123. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1124. 0x0e100400, 0x0ff00ff0, "cfmuls%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
  1125. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1126. 0x0e100420, 0x0ff00ff0, "cfmuld%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
  1127. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1128. 0x0e300500, 0x0ff00fff, "cfabs32%c\tmvfx%12-15d, mvfx%16-19d"},
  1129. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1130. 0x0e300520, 0x0ff00fff, "cfabs64%c\tmvdx%12-15d, mvdx%16-19d"},
  1131. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1132. 0x0e300540, 0x0ff00fff, "cfneg32%c\tmvfx%12-15d, mvfx%16-19d"},
  1133. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1134. 0x0e300560, 0x0ff00fff, "cfneg64%c\tmvdx%12-15d, mvdx%16-19d"},
  1135. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1136. 0x0e300580, 0x0ff00ff0, "cfadd32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
  1137. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1138. 0x0e3005a0, 0x0ff00ff0, "cfadd64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
  1139. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1140. 0x0e3005c0, 0x0ff00ff0, "cfsub32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
  1141. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1142. 0x0e3005e0, 0x0ff00ff0, "cfsub64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
  1143. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1144. 0x0e100500, 0x0ff00ff0, "cfmul32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
  1145. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1146. 0x0e100520, 0x0ff00ff0, "cfmul64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
  1147. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1148. 0x0e100540, 0x0ff00ff0, "cfmac32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
  1149. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1150. 0x0e100560, 0x0ff00ff0, "cfmsc32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
  1151. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1152. 0x0e000600, 0x0ff00f10,
  1153. "cfmadd32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
  1154. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1155. 0x0e100600, 0x0ff00f10,
  1156. "cfmsub32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
  1157. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1158. 0x0e200600, 0x0ff00f10,
  1159. "cfmadda32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
  1160. {ANY, ARM_FEATURE_COPROC (ARM_CEXT_MAVERICK),
  1161. 0x0e300600, 0x0ff00f10,
  1162. "cfmsuba32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
  1163. /* VFP Fused multiply add instructions. */
  1164. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
  1165. 0x0ea00a00, 0x0fb00f50, "vfma%c.f32\t%y1, %y2, %y0"},
  1166. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
  1167. 0x0ea00b00, 0x0fb00f50, "vfma%c.f64\t%z1, %z2, %z0"},
  1168. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
  1169. 0x0ea00a40, 0x0fb00f50, "vfms%c.f32\t%y1, %y2, %y0"},
  1170. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
  1171. 0x0ea00b40, 0x0fb00f50, "vfms%c.f64\t%z1, %z2, %z0"},
  1172. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
  1173. 0x0e900a40, 0x0fb00f50, "vfnma%c.f32\t%y1, %y2, %y0"},
  1174. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
  1175. 0x0e900b40, 0x0fb00f50, "vfnma%c.f64\t%z1, %z2, %z0"},
  1176. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
  1177. 0x0e900a00, 0x0fb00f50, "vfnms%c.f32\t%y1, %y2, %y0"},
  1178. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_FMA),
  1179. 0x0e900b00, 0x0fb00f50, "vfnms%c.f64\t%z1, %z2, %z0"},
  1180. /* FP v5. */
  1181. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1182. 0xfe000a00, 0xff800f50, "vsel%20-21c%u.f32\t%y1, %y2, %y0"},
  1183. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1184. 0xfe000b00, 0xff800f50, "vsel%20-21c%u.f64\t%z1, %z2, %z0"},
  1185. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1186. 0xfe800a00, 0xffb00f50, "vmaxnm%u.f32\t%y1, %y2, %y0"},
  1187. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1188. 0xfe800b00, 0xffb00f50, "vmaxnm%u.f64\t%z1, %z2, %z0"},
  1189. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1190. 0xfe800a40, 0xffb00f50, "vminnm%u.f32\t%y1, %y2, %y0"},
  1191. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1192. 0xfe800b40, 0xffb00f50, "vminnm%u.f64\t%z1, %z2, %z0"},
  1193. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1194. 0xfebc0a40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f32\t%y1, %y0"},
  1195. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1196. 0xfebc0b40, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f64\t%y1, %z0"},
  1197. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1198. 0x0eb60a40, 0x0fbe0f50, "vrint%7,16??xzr%c.f32\t%y1, %y0"},
  1199. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1200. 0x0eb60b40, 0x0fbe0f50, "vrint%7,16??xzr%c.f64\t%z1, %z0"},
  1201. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1202. 0xfeb80a40, 0xffbc0fd0, "vrint%16-17?mpna%u.f32\t%y1, %y0"},
  1203. {ANY, ARM_FEATURE_COPROC (FPU_VFP_EXT_ARMV8),
  1204. 0xfeb80b40, 0xffbc0fd0, "vrint%16-17?mpna%u.f64\t%z1, %z0"},
  1205. {ANY, ARM_FEATURE_CORE_LOW (0), SENTINEL_GENERIC_START, 0, "" },
  1206. /* ARMv8.3 AdvSIMD instructions in the space of coprocessor 8. */
  1207. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1208. 0xfc800800, 0xfeb00f10, "vcadd%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, #%24?29%24'70"},
  1209. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1210. 0xfc900800, 0xfeb00f10, "vcadd%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, #%24?29%24'70"},
  1211. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1212. 0xfc200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, #%23'90"},
  1213. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1214. 0xfd200800, 0xff300f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3,5V, #%23?21%23?780"},
  1215. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1216. 0xfc300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, #%23'90"},
  1217. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1218. 0xfd300800, 0xff300f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5V, #%23?21%23?780"},
  1219. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1220. 0xfe000800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3D[%5?10], #%20'90"},
  1221. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1222. 0xfe200800, 0xffa00f10, "vcmla%c.f16\t%12-15,22V, %16-19,7V, %0-3D[%5?10], #%20?21%20?780"},
  1223. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1224. 0xfe800800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5D[0], #%20'90"},
  1225. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1226. 0xfea00800, 0xffa00f10, "vcmla%c.f32\t%12-15,22V, %16-19,7V, %0-3,5D[0], #%20?21%20?780"},
  1227. /* BFloat16 instructions. */
  1228. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
  1229. 0x0eb30940, 0x0fbf0f50, "vcvt%7?tb%b.bf16.f32\t%y1, %y0"},
  1230. /* Dot Product instructions in the space of coprocessor 13. */
  1231. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
  1232. 0xfc200d00, 0xffb00f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %0-3,5V"},
  1233. {ANY, ARM_FEATURE_COPROC (FPU_NEON_EXT_DOTPROD),
  1234. 0xfe200d00, 0xff200f00, "v%4?usdot.%4?us8\t%12-15,22V, %16-19,7V, %0-3D[%5?10]"},
  1235. /* ARMv8.2 FMAC Long instructions in the space of coprocessor 8. */
  1236. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
  1237. 0xfc200810, 0xffb00f50, "vfmal.f16\t%12-15,22D, s%7,16-19d, s%5,0-3d"},
  1238. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
  1239. 0xfca00810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, s%7,16-19d, s%5,0-3d"},
  1240. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
  1241. 0xfc200850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, d%16-19,7d, d%0-3,5d"},
  1242. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
  1243. 0xfca00850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, d%16-19,7d, d%0-3,5d"},
  1244. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
  1245. 0xfe000810, 0xffb00f50, "vfmal.f16\t%12-15,22D, s%7,16-19d, s%5,0-2d[%3d]"},
  1246. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
  1247. 0xfe100810, 0xffb00f50, "vfmsl.f16\t%12-15,22D, s%7,16-19d, s%5,0-2d[%3d]"},
  1248. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
  1249. 0xfe000850, 0xffb00f50, "vfmal.f16\t%12-15,22Q, d%16-19,7d, d%0-2d[%3,5d]"},
  1250. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_V8_2A),
  1251. 0xfe100850, 0xffb00f50, "vfmsl.f16\t%12-15,22Q, d%16-19,7d, d%0-2d[%3,5d]"},
  1252. /* ARMv8.2 half-precision Floating point coprocessor 9 (VFP) instructions.
  1253. cp_num: bit <11:8> == 0b1001.
  1254. cond: bit <31:28> == 0b1110, otherwise, it's UNPREDICTABLE. */
  1255. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1256. 0x0eb009c0, 0x0fbf0fd0, "vabs%c.f16\t%y1, %y0"},
  1257. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1258. 0x0e300900, 0x0fb00f50, "vadd%c.f16\t%y1, %y2, %y0"},
  1259. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1260. 0x0eb40940, 0x0fbf0f50, "vcmp%7'e%c.f16\t%y1, %y0"},
  1261. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1262. 0x0eb50940, 0x0fbf0f70, "vcmp%7'e%c.f16\t%y1, #0.0"},
  1263. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1264. 0x0eba09c0, 0x0fbe0fd0, "vcvt%c.f16.%16?us%7?31%7?26\t%y1, %y1, #%5,0-3k"},
  1265. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1266. 0x0ebe09c0, 0x0fbe0fd0, "vcvt%c.%16?us%7?31%7?26.f16\t%y1, %y1, #%5,0-3k"},
  1267. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1268. 0x0ebc0940, 0x0fbe0f50, "vcvt%7`r%c.%16?su32.f16\t%y1, %y0"},
  1269. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1270. 0x0eb80940, 0x0fbf0f50, "vcvt%c.f16.%7?su32\t%y1, %y0"},
  1271. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1272. 0xfebc0940, 0xffbc0f50, "vcvt%16-17?mpna%u.%7?su32.f16\t%y1, %y0"},
  1273. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1274. 0x0e800900, 0x0fb00f50, "vdiv%c.f16\t%y1, %y2, %y0"},
  1275. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1276. 0x0ea00900, 0x0fb00f50, "vfma%c.f16\t%y1, %y2, %y0"},
  1277. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1278. 0x0ea00940, 0x0fb00f50, "vfms%c.f16\t%y1, %y2, %y0"},
  1279. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1280. 0x0e900940, 0x0fb00f50, "vfnma%c.f16\t%y1, %y2, %y0"},
  1281. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1282. 0x0e900900, 0x0fb00f50, "vfnms%c.f16\t%y1, %y2, %y0"},
  1283. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1284. 0xfeb00ac0, 0xffbf0fd0, "vins.f16\t%y1, %y0"},
  1285. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1286. 0xfeb00a40, 0xffbf0fd0, "vmovx%c.f16\t%y1, %y0"},
  1287. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1288. 0x0d100900, 0x0f300f00, "vldr%c.16\t%y1, %A"},
  1289. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1290. 0x0d000900, 0x0f300f00, "vstr%c.16\t%y1, %A"},
  1291. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1292. 0xfe800900, 0xffb00f50, "vmaxnm%c.f16\t%y1, %y2, %y0"},
  1293. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1294. 0xfe800940, 0xffb00f50, "vminnm%c.f16\t%y1, %y2, %y0"},
  1295. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1296. 0x0e000900, 0x0fb00f50, "vmla%c.f16\t%y1, %y2, %y0"},
  1297. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1298. 0x0e000940, 0x0fb00f50, "vmls%c.f16\t%y1, %y2, %y0"},
  1299. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1300. 0x0e100910, 0x0ff00f7f, "vmov%c.f16\t%12-15r, %y2"},
  1301. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1302. 0x0e000910, 0x0ff00f7f, "vmov%c.f16\t%y2, %12-15r"},
  1303. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1304. 0xeb00900, 0x0fb00ff0, "vmov%c.f16\t%y1, #%0-3,16-19E"},
  1305. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1306. 0x0e200900, 0x0fb00f50, "vmul%c.f16\t%y1, %y2, %y0"},
  1307. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1308. 0x0eb10940, 0x0fbf0fd0, "vneg%c.f16\t%y1, %y0"},
  1309. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1310. 0x0e100940, 0x0fb00f50, "vnmla%c.f16\t%y1, %y2, %y0"},
  1311. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1312. 0x0e100900, 0x0fb00f50, "vnmls%c.f16\t%y1, %y2, %y0"},
  1313. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1314. 0x0e200940, 0x0fb00f50, "vnmul%c.f16\t%y1, %y2, %y0"},
  1315. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1316. 0x0eb60940, 0x0fbe0f50, "vrint%7,16??xzr%c.f16\t%y1, %y0"},
  1317. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1318. 0xfeb80940, 0xffbc0fd0, "vrint%16-17?mpna%u.f16\t%y1, %y0"},
  1319. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1320. 0xfe000900, 0xff800f50, "vsel%20-21c%u.f16\t%y1, %y2, %y0"},
  1321. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1322. 0x0eb109c0, 0x0fbf0fd0, "vsqrt%c.f16\t%y1, %y0"},
  1323. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1324. 0x0e300940, 0x0fb00f50, "vsub%c.f16\t%y1, %y2, %y0"},
  1325. /* ARMv8.3 javascript conversion instruction. */
  1326. {ANY, ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_3A),
  1327. 0x0eb90bc0, 0x0fbf0fd0, "vjcvt%c.s32.f64\t%y1, %z0"},
  1328. {ANY, ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
  1329. };
  1330. /* Generic coprocessor instructions. These are only matched if a more specific
  1331. SIMD or co-processor instruction does not match first. */
  1332. static const struct sopcode32 generic_coprocessor_opcodes[] =
  1333. {
  1334. /* Generic coprocessor instructions. */
  1335. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
  1336. 0x0c400000, 0x0ff00000, "mcrr%c\t%8-11d, %4-7d, %12-15R, %16-19r, cr%0-3d"},
  1337. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
  1338. 0x0c500000, 0x0ff00000,
  1339. "mrrc%c\t%8-11d, %4-7d, %12-15Ru, %16-19Ru, cr%0-3d"},
  1340. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
  1341. 0x0e000000, 0x0f000010,
  1342. "cdp%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
  1343. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
  1344. 0x0e10f010, 0x0f10f010,
  1345. "mrc%c\t%8-11d, %21-23d, APSR_nzcv, cr%16-19d, cr%0-3d, {%5-7d}"},
  1346. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
  1347. 0x0e100010, 0x0f100010,
  1348. "mrc%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
  1349. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
  1350. 0x0e000010, 0x0f100010,
  1351. "mcr%c\t%8-11d, %21-23d, %12-15R, cr%16-19d, cr%0-3d, {%5-7d}"},
  1352. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
  1353. 0x0c000000, 0x0e100000, "stc%22'l%c\t%8-11d, cr%12-15d, %A"},
  1354. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
  1355. 0x0c100000, 0x0e100000, "ldc%22'l%c\t%8-11d, cr%12-15d, %A"},
  1356. /* V6 coprocessor instructions. */
  1357. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  1358. 0xfc500000, 0xfff00000,
  1359. "mrrc2%c\t%8-11d, %4-7d, %12-15Ru, %16-19Ru, cr%0-3d"},
  1360. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  1361. 0xfc400000, 0xfff00000,
  1362. "mcrr2%c\t%8-11d, %4-7d, %12-15R, %16-19R, cr%0-3d"},
  1363. /* V5 coprocessor instructions. */
  1364. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
  1365. 0xfc100000, 0xfe100000, "ldc2%22'l%c\t%8-11d, cr%12-15d, %A"},
  1366. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
  1367. 0xfc000000, 0xfe100000, "stc2%22'l%c\t%8-11d, cr%12-15d, %A"},
  1368. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
  1369. 0xfe000000, 0xff000010,
  1370. "cdp2%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
  1371. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
  1372. 0xfe000010, 0xff100010,
  1373. "mcr2%c\t%8-11d, %21-23d, %12-15R, cr%16-19d, cr%0-3d, {%5-7d}"},
  1374. {ANY, ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
  1375. 0xfe100010, 0xff100010,
  1376. "mrc2%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
  1377. {ANY, ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
  1378. };
  1379. /* Neon opcode table: This does not encode the top byte -- that is
  1380. checked by the print_insn_neon routine, as it depends on whether we are
  1381. doing thumb32 or arm32 disassembly. */
  1382. /* print_insn_neon recognizes the following format control codes:
  1383. %% %
  1384. %c print condition code
  1385. %u print condition code (unconditional in ARM mode,
  1386. UNPREDICTABLE if not AL in Thumb)
  1387. %A print v{st,ld}[1234] operands
  1388. %B print v{st,ld}[1234] any one operands
  1389. %C print v{st,ld}[1234] single->all operands
  1390. %D print scalar
  1391. %E print vmov, vmvn, vorr, vbic encoded constant
  1392. %F print vtbl,vtbx register list
  1393. %<bitfield>r print as an ARM register
  1394. %<bitfield>d print the bitfield in decimal
  1395. %<bitfield>e print the 2^N - bitfield in decimal
  1396. %<bitfield>D print as a NEON D register
  1397. %<bitfield>Q print as a NEON Q register
  1398. %<bitfield>R print as a NEON D or Q register
  1399. %<bitfield>Sn print byte scaled width limited by n
  1400. %<bitfield>Tn print short scaled width limited by n
  1401. %<bitfield>Un print long scaled width limited by n
  1402. %<bitfield>'c print specified char iff bitfield is all ones
  1403. %<bitfield>`c print specified char iff bitfield is all zeroes
  1404. %<bitfield>?ab... select from array of values in big endian order. */
  1405. static const struct opcode32 neon_opcodes[] =
  1406. {
  1407. /* Extract. */
  1408. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1409. 0xf2b00840, 0xffb00850,
  1410. "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, #%8-11d"},
  1411. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1412. 0xf2b00000, 0xffb00810,
  1413. "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, #%8-11d"},
  1414. /* Data transfer between ARM and NEON registers. */
  1415. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1416. 0x0e800b10, 0x0ff00f70, "vdup%c.32\t%16-19,7D, %12-15r"},
  1417. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1418. 0x0e800b30, 0x0ff00f70, "vdup%c.16\t%16-19,7D, %12-15r"},
  1419. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1420. 0x0ea00b10, 0x0ff00f70, "vdup%c.32\t%16-19,7Q, %12-15r"},
  1421. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1422. 0x0ea00b30, 0x0ff00f70, "vdup%c.16\t%16-19,7Q, %12-15r"},
  1423. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1424. 0x0ec00b10, 0x0ff00f70, "vdup%c.8\t%16-19,7D, %12-15r"},
  1425. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1426. 0x0ee00b10, 0x0ff00f70, "vdup%c.8\t%16-19,7Q, %12-15r"},
  1427. /* Move data element to all lanes. */
  1428. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1429. 0xf3b40c00, 0xffb70f90, "vdup%c.32\t%12-15,22R, %0-3,5D[%19d]"},
  1430. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1431. 0xf3b20c00, 0xffb30f90, "vdup%c.16\t%12-15,22R, %0-3,5D[%18-19d]"},
  1432. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1433. 0xf3b10c00, 0xffb10f90, "vdup%c.8\t%12-15,22R, %0-3,5D[%17-19d]"},
  1434. /* Table lookup. */
  1435. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1436. 0xf3b00800, 0xffb00c50, "vtbl%c.8\t%12-15,22D, %F, %0-3,5D"},
  1437. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1438. 0xf3b00840, 0xffb00c50, "vtbx%c.8\t%12-15,22D, %F, %0-3,5D"},
  1439. /* Half-precision conversions. */
  1440. {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
  1441. 0xf3b60600, 0xffbf0fd0, "vcvt%c.f16.f32\t%12-15,22D, %0-3,5Q"},
  1442. {ARM_FEATURE_COPROC (FPU_VFP_EXT_FP16),
  1443. 0xf3b60700, 0xffbf0fd0, "vcvt%c.f32.f16\t%12-15,22Q, %0-3,5D"},
  1444. /* NEON fused multiply add instructions. */
  1445. {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
  1446. 0xf2000c10, 0xffb00f10, "vfma%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1447. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1448. 0xf2100c10, 0xffb00f10, "vfma%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1449. {ARM_FEATURE_COPROC (FPU_NEON_EXT_FMA),
  1450. 0xf2200c10, 0xffb00f10, "vfms%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1451. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1452. 0xf2300c10, 0xffb00f10, "vfms%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1453. /* BFloat16 instructions. */
  1454. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
  1455. 0xfc000d00, 0xffb00f10, "vdot.bf16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1456. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
  1457. 0xfe000d00, 0xffb00f10, "vdot.bf16\t%12-15,22R, %16-19,7R, d%0-3d[%5d]"},
  1458. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
  1459. 0xfc000c40, 0xffb00f50, "vmmla.bf16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1460. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
  1461. 0xf3b60640, 0xffbf0fd0, "vcvt%c.bf16.f32\t%12-15,22D, %0-3,5Q"},
  1462. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
  1463. 0xfc300810, 0xffb00f10, "vfma%6?tb.bf16\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
  1464. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16),
  1465. 0xfe300810, 0xffb00f10, "vfma%6?tb.bf16\t%12-15,22Q, %16-19,7Q, %0-2D[%3,5d]"},
  1466. /* Matrix Multiply instructions. */
  1467. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
  1468. 0xfc200c40, 0xffb00f50, "vsmmla.s8\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1469. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
  1470. 0xfc200c50, 0xffb00f50, "vummla.u8\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1471. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
  1472. 0xfca00c40, 0xffb00f50, "vusmmla.s8\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1473. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
  1474. 0xfca00d00, 0xffb00f10, "vusdot.s8\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1475. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
  1476. 0xfe800d00, 0xffb00f10, "vusdot.s8\t%12-15,22R, %16-19,7R, d%0-3d[%5d]"},
  1477. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM),
  1478. 0xfe800d10, 0xffb00f10, "vsudot.u8\t%12-15,22R, %16-19,7R, d%0-3d[%5d]"},
  1479. /* Two registers, miscellaneous. */
  1480. {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
  1481. 0xf3ba0400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f32\t%12-15,22R, %0-3,5R"},
  1482. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1483. 0xf3b60400, 0xffbf0c10, "vrint%7-9?p?m?zaxn%u.f16\t%12-15,22R, %0-3,5R"},
  1484. {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
  1485. 0xf3bb0000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us32.f32\t%12-15,22R, %0-3,5R"},
  1486. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1487. 0xf3b70000, 0xffbf0c10, "vcvt%8-9?mpna%u.%7?us16.f16\t%12-15,22R, %0-3,5R"},
  1488. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1489. 0xf3b00300, 0xffbf0fd0, "aese%u.8\t%12-15,22Q, %0-3,5Q"},
  1490. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1491. 0xf3b00340, 0xffbf0fd0, "aesd%u.8\t%12-15,22Q, %0-3,5Q"},
  1492. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1493. 0xf3b00380, 0xffbf0fd0, "aesmc%u.8\t%12-15,22Q, %0-3,5Q"},
  1494. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1495. 0xf3b003c0, 0xffbf0fd0, "aesimc%u.8\t%12-15,22Q, %0-3,5Q"},
  1496. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1497. 0xf3b902c0, 0xffbf0fd0, "sha1h%u.32\t%12-15,22Q, %0-3,5Q"},
  1498. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1499. 0xf3ba0380, 0xffbf0fd0, "sha1su1%u.32\t%12-15,22Q, %0-3,5Q"},
  1500. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1501. 0xf3ba03c0, 0xffbf0fd0, "sha256su0%u.32\t%12-15,22Q, %0-3,5Q"},
  1502. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1503. 0xf2880a10, 0xfebf0fd0, "vmovl%c.%24?us8\t%12-15,22Q, %0-3,5D"},
  1504. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1505. 0xf2900a10, 0xfebf0fd0, "vmovl%c.%24?us16\t%12-15,22Q, %0-3,5D"},
  1506. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1507. 0xf2a00a10, 0xfebf0fd0, "vmovl%c.%24?us32\t%12-15,22Q, %0-3,5D"},
  1508. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1509. 0xf3b00500, 0xffbf0f90, "vcnt%c.8\t%12-15,22R, %0-3,5R"},
  1510. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1511. 0xf3b00580, 0xffbf0f90, "vmvn%c\t%12-15,22R, %0-3,5R"},
  1512. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1513. 0xf3b20000, 0xffbf0f90, "vswp%c\t%12-15,22R, %0-3,5R"},
  1514. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1515. 0xf3b20200, 0xffb30fd0, "vmovn%c.i%18-19T2\t%12-15,22D, %0-3,5Q"},
  1516. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1517. 0xf3b20240, 0xffb30fd0, "vqmovun%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
  1518. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1519. 0xf3b20280, 0xffb30fd0, "vqmovn%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
  1520. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1521. 0xf3b202c0, 0xffb30fd0, "vqmovn%c.u%18-19T2\t%12-15,22D, %0-3,5Q"},
  1522. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1523. 0xf3b20300, 0xffb30fd0,
  1524. "vshll%c.i%18-19S2\t%12-15,22Q, %0-3,5D, #%18-19S2"},
  1525. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1526. 0xf3bb0400, 0xffbf0e90, "vrecpe%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
  1527. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1528. 0xf3b70400, 0xffbf0e90, "vrecpe%c.%8?fu16\t%12-15,22R, %0-3,5R"},
  1529. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1530. 0xf3bb0480, 0xffbf0e90, "vrsqrte%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
  1531. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1532. 0xf3b70480, 0xffbf0e90, "vrsqrte%c.%8?fu16\t%12-15,22R, %0-3,5R"},
  1533. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1534. 0xf3b00000, 0xffb30f90, "vrev64%c.%18-19S2\t%12-15,22R, %0-3,5R"},
  1535. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1536. 0xf3b00080, 0xffb30f90, "vrev32%c.%18-19S2\t%12-15,22R, %0-3,5R"},
  1537. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1538. 0xf3b00100, 0xffb30f90, "vrev16%c.%18-19S2\t%12-15,22R, %0-3,5R"},
  1539. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1540. 0xf3b00400, 0xffb30f90, "vcls%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
  1541. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1542. 0xf3b00480, 0xffb30f90, "vclz%c.i%18-19S2\t%12-15,22R, %0-3,5R"},
  1543. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1544. 0xf3b00700, 0xffb30f90, "vqabs%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
  1545. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1546. 0xf3b00780, 0xffb30f90, "vqneg%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
  1547. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1548. 0xf3b20080, 0xffb30f90, "vtrn%c.%18-19S2\t%12-15,22R, %0-3,5R"},
  1549. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1550. 0xf3b20100, 0xffb30f90, "vuzp%c.%18-19S2\t%12-15,22R, %0-3,5R"},
  1551. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1552. 0xf3b20180, 0xffb30f90, "vzip%c.%18-19S2\t%12-15,22R, %0-3,5R"},
  1553. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1554. 0xf3b10000, 0xffb30b90, "vcgt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
  1555. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1556. 0xf3b10080, 0xffb30b90, "vcge%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
  1557. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1558. 0xf3b10100, 0xffb30b90, "vceq%c.%10?fi%18-19S2\t%12-15,22R, %0-3,5R, #0"},
  1559. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1560. 0xf3b10180, 0xffb30b90, "vcle%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
  1561. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1562. 0xf3b10200, 0xffb30b90, "vclt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
  1563. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1564. 0xf3b10300, 0xffb30b90, "vabs%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
  1565. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1566. 0xf3b10380, 0xffb30b90, "vneg%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
  1567. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1568. 0xf3b00200, 0xffb30f10, "vpaddl%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
  1569. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1570. 0xf3b00600, 0xffb30f10, "vpadal%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
  1571. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1572. 0xf3bb0600, 0xffbf0e10,
  1573. "vcvt%c.%7-8?usff%18-19Sa.%7-8?ffus%18-19Sa\t%12-15,22R, %0-3,5R"},
  1574. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1575. 0xf3b70600, 0xffbf0e10,
  1576. "vcvt%c.%7-8?usff16.%7-8?ffus16\t%12-15,22R, %0-3,5R"},
  1577. /* Three registers of the same length. */
  1578. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1579. 0xf2000c40, 0xffb00f50, "sha1c%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
  1580. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1581. 0xf2100c40, 0xffb00f50, "sha1p%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
  1582. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1583. 0xf2200c40, 0xffb00f50, "sha1m%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
  1584. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1585. 0xf2300c40, 0xffb00f50, "sha1su0%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
  1586. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1587. 0xf3000c40, 0xffb00f50, "sha256h%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
  1588. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1589. 0xf3100c40, 0xffb00f50, "sha256h2%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
  1590. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1591. 0xf3200c40, 0xffb00f50, "sha256su1%u.32\t%12-15,22Q, %16-19,7Q, %0-3,5Q"},
  1592. {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
  1593. 0xf3000f10, 0xffb00f10, "vmaxnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1594. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1595. 0xf3100f10, 0xffb00f10, "vmaxnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1596. {ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8),
  1597. 0xf3200f10, 0xffb00f10, "vminnm%u.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1598. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1599. 0xf3300f10, 0xffb00f10, "vminnm%u.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1600. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1601. 0xf2000110, 0xffb00f10, "vand%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1602. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1603. 0xf2100110, 0xffb00f10, "vbic%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1604. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1605. 0xf2200110, 0xffb00f10, "vorr%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1606. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1607. 0xf2300110, 0xffb00f10, "vorn%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1608. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1609. 0xf3000110, 0xffb00f10, "veor%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1610. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1611. 0xf3100110, 0xffb00f10, "vbsl%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1612. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1613. 0xf3200110, 0xffb00f10, "vbit%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1614. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1615. 0xf3300110, 0xffb00f10, "vbif%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1616. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1617. 0xf2000d00, 0xffb00f10, "vadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1618. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1619. 0xf2100d00, 0xffb00f10, "vadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1620. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1621. 0xf2000d10, 0xffb00f10, "vmla%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1622. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1623. 0xf2100d10, 0xffb00f10, "vmla%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1624. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1625. 0xf2000e00, 0xffb00f10, "vceq%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1626. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1627. 0xf2100e00, 0xffb00f10, "vceq%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1628. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1629. 0xf2000f00, 0xffb00f10, "vmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1630. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1631. 0xf2100f00, 0xffb00f10, "vmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1632. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1633. 0xf2000f10, 0xffb00f10, "vrecps%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1634. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1635. 0xf2100f10, 0xffb00f10, "vrecps%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1636. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1637. 0xf2200d00, 0xffb00f10, "vsub%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1638. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1639. 0xf2300d00, 0xffb00f10, "vsub%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1640. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1641. 0xf2200d10, 0xffb00f10, "vmls%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1642. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1643. 0xf2300d10, 0xffb00f10, "vmls%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1644. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1645. 0xf2200f00, 0xffb00f10, "vmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1646. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1647. 0xf2300f00, 0xffb00f10, "vmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1648. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1649. 0xf2200f10, 0xffb00f10, "vrsqrts%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1650. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1651. 0xf2300f10, 0xffb00f10, "vrsqrts%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1652. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1653. 0xf3000d00, 0xffb00f10, "vpadd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1654. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1655. 0xf3100d00, 0xffb00f10, "vpadd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1656. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1657. 0xf3000d10, 0xffb00f10, "vmul%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1658. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1659. 0xf3100d10, 0xffb00f10, "vmul%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1660. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1661. 0xf3000e00, 0xffb00f10, "vcge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1662. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1663. 0xf3100e00, 0xffb00f10, "vcge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1664. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1665. 0xf3000e10, 0xffb00f10, "vacge%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1666. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1667. 0xf3100e10, 0xffb00f10, "vacge%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1668. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1669. 0xf3000f00, 0xffb00f10, "vpmax%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1670. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1671. 0xf3100f00, 0xffb00f10, "vpmax%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1672. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1673. 0xf3200d00, 0xffb00f10, "vabd%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1674. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1675. 0xf3300d00, 0xffb00f10, "vabd%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1676. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1677. 0xf3200e00, 0xffb00f10, "vcgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1678. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1679. 0xf3300e00, 0xffb00f10, "vcgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1680. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1681. 0xf3200e10, 0xffb00f10, "vacgt%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1682. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1683. 0xf3300e10, 0xffb00f10, "vacgt%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1684. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1685. 0xf3200f00, 0xffb00f10, "vpmin%c.f32\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1686. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1687. 0xf3300f00, 0xffb00f10, "vpmin%c.f16\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1688. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1689. 0xf2000800, 0xff800f10, "vadd%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1690. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1691. 0xf2000810, 0xff800f10, "vtst%c.%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1692. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1693. 0xf2000900, 0xff800f10, "vmla%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1694. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1695. 0xf2000b00, 0xff800f10,
  1696. "vqdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1697. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1698. 0xf2000b10, 0xff800f10,
  1699. "vpadd%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1700. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1701. 0xf3000800, 0xff800f10, "vsub%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1702. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1703. 0xf3000810, 0xff800f10, "vceq%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1704. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1705. 0xf3000900, 0xff800f10, "vmls%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1706. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1707. 0xf3000b00, 0xff800f10,
  1708. "vqrdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1709. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1710. 0xf2000000, 0xfe800f10,
  1711. "vhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1712. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1713. 0xf2000010, 0xfe800f10,
  1714. "vqadd%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1715. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1716. 0xf2000100, 0xfe800f10,
  1717. "vrhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1718. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1719. 0xf2000200, 0xfe800f10,
  1720. "vhsub%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1721. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1722. 0xf2000210, 0xfe800f10,
  1723. "vqsub%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1724. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1725. 0xf2000300, 0xfe800f10,
  1726. "vcgt%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1727. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1728. 0xf2000310, 0xfe800f10,
  1729. "vcge%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1730. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1731. 0xf2000400, 0xfe800f10,
  1732. "vshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
  1733. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1734. 0xf2000410, 0xfe800f10,
  1735. "vqshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
  1736. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1737. 0xf2000500, 0xfe800f10,
  1738. "vrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
  1739. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1740. 0xf2000510, 0xfe800f10,
  1741. "vqrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
  1742. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1743. 0xf2000600, 0xfe800f10,
  1744. "vmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1745. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1746. 0xf2000610, 0xfe800f10,
  1747. "vmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1748. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1749. 0xf2000700, 0xfe800f10,
  1750. "vabd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1751. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1752. 0xf2000710, 0xfe800f10,
  1753. "vaba%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1754. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1755. 0xf2000910, 0xfe800f10,
  1756. "vmul%c.%24?pi%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1757. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1758. 0xf2000a00, 0xfe800f10,
  1759. "vpmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1760. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1761. 0xf2000a10, 0xfe800f10,
  1762. "vpmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1763. {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
  1764. 0xf3000b10, 0xff800f10,
  1765. "vqrdmlah%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1766. {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
  1767. 0xf3000c10, 0xff800f10,
  1768. "vqrdmlsh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
  1769. /* One register and an immediate value. */
  1770. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1771. 0xf2800e10, 0xfeb80fb0, "vmov%c.i8\t%12-15,22R, %E"},
  1772. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1773. 0xf2800e30, 0xfeb80fb0, "vmov%c.i64\t%12-15,22R, %E"},
  1774. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1775. 0xf2800f10, 0xfeb80fb0, "vmov%c.f32\t%12-15,22R, %E"},
  1776. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1777. 0xf2800810, 0xfeb80db0, "vmov%c.i16\t%12-15,22R, %E"},
  1778. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1779. 0xf2800830, 0xfeb80db0, "vmvn%c.i16\t%12-15,22R, %E"},
  1780. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1781. 0xf2800910, 0xfeb80db0, "vorr%c.i16\t%12-15,22R, %E"},
  1782. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1783. 0xf2800930, 0xfeb80db0, "vbic%c.i16\t%12-15,22R, %E"},
  1784. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1785. 0xf2800c10, 0xfeb80eb0, "vmov%c.i32\t%12-15,22R, %E"},
  1786. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1787. 0xf2800c30, 0xfeb80eb0, "vmvn%c.i32\t%12-15,22R, %E"},
  1788. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1789. 0xf2800110, 0xfeb809b0, "vorr%c.i32\t%12-15,22R, %E"},
  1790. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1791. 0xf2800130, 0xfeb809b0, "vbic%c.i32\t%12-15,22R, %E"},
  1792. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1793. 0xf2800010, 0xfeb808b0, "vmov%c.i32\t%12-15,22R, %E"},
  1794. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1795. 0xf2800030, 0xfeb808b0, "vmvn%c.i32\t%12-15,22R, %E"},
  1796. /* Two registers and a shift amount. */
  1797. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1798. 0xf2880810, 0xffb80fd0, "vshrn%c.i16\t%12-15,22D, %0-3,5Q, #%16-18e"},
  1799. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1800. 0xf2880850, 0xffb80fd0, "vrshrn%c.i16\t%12-15,22D, %0-3,5Q, #%16-18e"},
  1801. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1802. 0xf2880810, 0xfeb80fd0, "vqshrun%c.s16\t%12-15,22D, %0-3,5Q, #%16-18e"},
  1803. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1804. 0xf2880850, 0xfeb80fd0, "vqrshrun%c.s16\t%12-15,22D, %0-3,5Q, #%16-18e"},
  1805. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1806. 0xf2880910, 0xfeb80fd0, "vqshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, #%16-18e"},
  1807. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1808. 0xf2880950, 0xfeb80fd0,
  1809. "vqrshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, #%16-18e"},
  1810. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1811. 0xf2880a10, 0xfeb80fd0, "vshll%c.%24?us8\t%12-15,22Q, %0-3,5D, #%16-18d"},
  1812. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1813. 0xf2900810, 0xffb00fd0, "vshrn%c.i32\t%12-15,22D, %0-3,5Q, #%16-19e"},
  1814. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1815. 0xf2900850, 0xffb00fd0, "vrshrn%c.i32\t%12-15,22D, %0-3,5Q, #%16-19e"},
  1816. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1817. 0xf2880510, 0xffb80f90, "vshl%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18d"},
  1818. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1819. 0xf3880410, 0xffb80f90, "vsri%c.8\t%12-15,22R, %0-3,5R, #%16-18e"},
  1820. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1821. 0xf3880510, 0xffb80f90, "vsli%c.8\t%12-15,22R, %0-3,5R, #%16-18d"},
  1822. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1823. 0xf3880610, 0xffb80f90, "vqshlu%c.s8\t%12-15,22R, %0-3,5R, #%16-18d"},
  1824. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1825. 0xf2900810, 0xfeb00fd0, "vqshrun%c.s32\t%12-15,22D, %0-3,5Q, #%16-19e"},
  1826. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1827. 0xf2900850, 0xfeb00fd0, "vqrshrun%c.s32\t%12-15,22D, %0-3,5Q, #%16-19e"},
  1828. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1829. 0xf2900910, 0xfeb00fd0, "vqshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, #%16-19e"},
  1830. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1831. 0xf2900950, 0xfeb00fd0,
  1832. "vqrshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, #%16-19e"},
  1833. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1834. 0xf2900a10, 0xfeb00fd0, "vshll%c.%24?us16\t%12-15,22Q, %0-3,5D, #%16-19d"},
  1835. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1836. 0xf2880010, 0xfeb80f90, "vshr%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
  1837. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1838. 0xf2880110, 0xfeb80f90, "vsra%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
  1839. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1840. 0xf2880210, 0xfeb80f90, "vrshr%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
  1841. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1842. 0xf2880310, 0xfeb80f90, "vrsra%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
  1843. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1844. 0xf2880710, 0xfeb80f90, "vqshl%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18d"},
  1845. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1846. 0xf2a00810, 0xffa00fd0, "vshrn%c.i64\t%12-15,22D, %0-3,5Q, #%16-20e"},
  1847. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1848. 0xf2a00850, 0xffa00fd0, "vrshrn%c.i64\t%12-15,22D, %0-3,5Q, #%16-20e"},
  1849. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1850. 0xf2900510, 0xffb00f90, "vshl%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19d"},
  1851. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1852. 0xf3900410, 0xffb00f90, "vsri%c.16\t%12-15,22R, %0-3,5R, #%16-19e"},
  1853. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1854. 0xf3900510, 0xffb00f90, "vsli%c.16\t%12-15,22R, %0-3,5R, #%16-19d"},
  1855. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1856. 0xf3900610, 0xffb00f90, "vqshlu%c.s16\t%12-15,22R, %0-3,5R, #%16-19d"},
  1857. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1858. 0xf2a00a10, 0xfea00fd0, "vshll%c.%24?us32\t%12-15,22Q, %0-3,5D, #%16-20d"},
  1859. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1860. 0xf2900010, 0xfeb00f90, "vshr%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
  1861. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1862. 0xf2900110, 0xfeb00f90, "vsra%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
  1863. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1864. 0xf2900210, 0xfeb00f90, "vrshr%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
  1865. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1866. 0xf2900310, 0xfeb00f90, "vrsra%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
  1867. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1868. 0xf2900710, 0xfeb00f90, "vqshl%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19d"},
  1869. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1870. 0xf2a00810, 0xfea00fd0, "vqshrun%c.s64\t%12-15,22D, %0-3,5Q, #%16-20e"},
  1871. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1872. 0xf2a00850, 0xfea00fd0, "vqrshrun%c.s64\t%12-15,22D, %0-3,5Q, #%16-20e"},
  1873. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1874. 0xf2a00910, 0xfea00fd0, "vqshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, #%16-20e"},
  1875. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1876. 0xf2a00950, 0xfea00fd0,
  1877. "vqrshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, #%16-20e"},
  1878. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1879. 0xf2a00510, 0xffa00f90, "vshl%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20d"},
  1880. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1881. 0xf3a00410, 0xffa00f90, "vsri%c.32\t%12-15,22R, %0-3,5R, #%16-20e"},
  1882. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1883. 0xf3a00510, 0xffa00f90, "vsli%c.32\t%12-15,22R, %0-3,5R, #%16-20d"},
  1884. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1885. 0xf3a00610, 0xffa00f90, "vqshlu%c.s32\t%12-15,22R, %0-3,5R, #%16-20d"},
  1886. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1887. 0xf2a00010, 0xfea00f90, "vshr%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
  1888. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1889. 0xf2a00110, 0xfea00f90, "vsra%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
  1890. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1891. 0xf2a00210, 0xfea00f90, "vrshr%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
  1892. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1893. 0xf2a00310, 0xfea00f90, "vrsra%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
  1894. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1895. 0xf2a00710, 0xfea00f90, "vqshl%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20d"},
  1896. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1897. 0xf2800590, 0xff800f90, "vshl%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21d"},
  1898. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1899. 0xf3800490, 0xff800f90, "vsri%c.64\t%12-15,22R, %0-3,5R, #%16-21e"},
  1900. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1901. 0xf3800590, 0xff800f90, "vsli%c.64\t%12-15,22R, %0-3,5R, #%16-21d"},
  1902. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1903. 0xf3800690, 0xff800f90, "vqshlu%c.s64\t%12-15,22R, %0-3,5R, #%16-21d"},
  1904. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1905. 0xf2800090, 0xfe800f90, "vshr%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
  1906. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1907. 0xf2800190, 0xfe800f90, "vsra%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
  1908. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1909. 0xf2800290, 0xfe800f90, "vrshr%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
  1910. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1911. 0xf2800390, 0xfe800f90, "vrsra%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
  1912. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1913. 0xf2800790, 0xfe800f90, "vqshl%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21d"},
  1914. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1915. 0xf2a00e10, 0xfea00e90,
  1916. "vcvt%c.%24,8?usff32.%24,8?ffus32\t%12-15,22R, %0-3,5R, #%16-20e"},
  1917. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST),
  1918. 0xf2a00c10, 0xfea00e90,
  1919. "vcvt%c.%24,8?usff16.%24,8?ffus16\t%12-15,22R, %0-3,5R, #%16-20e"},
  1920. /* Three registers of different lengths. */
  1921. {ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8),
  1922. 0xf2a00e00, 0xfeb00f50, "vmull%c.p64\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1923. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1924. 0xf2800e00, 0xfea00f50, "vmull%c.p%20S0\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1925. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1926. 0xf2800400, 0xff800f50,
  1927. "vaddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
  1928. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1929. 0xf2800600, 0xff800f50,
  1930. "vsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
  1931. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1932. 0xf2800900, 0xff800f50,
  1933. "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1934. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1935. 0xf2800b00, 0xff800f50,
  1936. "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1937. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1938. 0xf2800d00, 0xff800f50,
  1939. "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1940. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1941. 0xf3800400, 0xff800f50,
  1942. "vraddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
  1943. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1944. 0xf3800600, 0xff800f50,
  1945. "vrsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
  1946. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1947. 0xf2800000, 0xfe800f50,
  1948. "vaddl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1949. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1950. 0xf2800100, 0xfe800f50,
  1951. "vaddw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
  1952. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1953. 0xf2800200, 0xfe800f50,
  1954. "vsubl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1955. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1956. 0xf2800300, 0xfe800f50,
  1957. "vsubw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
  1958. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1959. 0xf2800500, 0xfe800f50,
  1960. "vabal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1961. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1962. 0xf2800700, 0xfe800f50,
  1963. "vabdl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1964. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1965. 0xf2800800, 0xfe800f50,
  1966. "vmlal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1967. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1968. 0xf2800a00, 0xfe800f50,
  1969. "vmlsl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1970. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1971. 0xf2800c00, 0xfe800f50,
  1972. "vmull%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
  1973. /* Two registers and a scalar. */
  1974. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1975. 0xf2800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
  1976. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1977. 0xf2800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
  1978. {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
  1979. 0xf2900140, 0xffb00f50, "vmla%c.f16\t%12-15,22D, %16-19,7D, %D"},
  1980. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1981. 0xf2800340, 0xff800f50, "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
  1982. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1983. 0xf2800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
  1984. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1985. 0xf2800540, 0xff900f50, "vmls%c.f%20-21S6\t%12-15,22D, %16-19,7D, %D"},
  1986. {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
  1987. 0xf2900540, 0xffb00f50, "vmls%c.f16\t%12-15,22D, %16-19,7D, %D"},
  1988. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1989. 0xf2800740, 0xff800f50, "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
  1990. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1991. 0xf2800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
  1992. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1993. 0xf2800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
  1994. {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
  1995. 0xf2900940, 0xffb00f50, "vmul%c.f16\t%12-15,22D, %16-19,7D, %D"},
  1996. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1997. 0xf2800b40, 0xff800f50, "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
  1998. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  1999. 0xf2800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
  2000. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2001. 0xf2800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
  2002. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2003. 0xf3800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
  2004. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2005. 0xf3800140, 0xff900f50, "vmla%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
  2006. {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
  2007. 0xf3900140, 0xffb00f50, "vmla%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
  2008. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2009. 0xf3800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
  2010. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2011. 0xf3800540, 0xff900f50, "vmls%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
  2012. {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
  2013. 0xf3900540, 0xffb00f50, "vmls%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
  2014. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2015. 0xf3800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
  2016. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2017. 0xf3800940, 0xff900f50, "vmul%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
  2018. {ARM_FEATURE_COPROC (ARM_EXT2_FP16_INST),
  2019. 0xf3900940, 0xffb00f50, "vmul%c.f16\t%12-15,22Q, %16-19,7Q, %D"},
  2020. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2021. 0xf3800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
  2022. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2023. 0xf3800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
  2024. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2025. 0xf2800240, 0xfe800f50,
  2026. "vmlal%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
  2027. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2028. 0xf2800640, 0xfe800f50,
  2029. "vmlsl%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
  2030. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2031. 0xf2800a40, 0xfe800f50,
  2032. "vmull%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
  2033. {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
  2034. 0xf2800e40, 0xff800f50,
  2035. "vqrdmlah%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
  2036. {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
  2037. 0xf2800f40, 0xff800f50,
  2038. "vqrdmlsh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
  2039. {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
  2040. 0xf3800e40, 0xff800f50,
  2041. "vqrdmlah%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
  2042. {ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA),
  2043. 0xf3800f40, 0xff800f50,
  2044. "vqrdmlsh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"
  2045. },
  2046. /* Element and structure load/store. */
  2047. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2048. 0xf4a00fc0, 0xffb00fc0, "vld4%c.32\t%C"},
  2049. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2050. 0xf4a00c00, 0xffb00f00, "vld1%c.%6-7S2\t%C"},
  2051. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2052. 0xf4a00d00, 0xffb00f00, "vld2%c.%6-7S2\t%C"},
  2053. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2054. 0xf4a00e00, 0xffb00f00, "vld3%c.%6-7S2\t%C"},
  2055. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2056. 0xf4a00f00, 0xffb00f00, "vld4%c.%6-7S2\t%C"},
  2057. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2058. 0xf4000200, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
  2059. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2060. 0xf4000300, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
  2061. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2062. 0xf4000400, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
  2063. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2064. 0xf4000500, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
  2065. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2066. 0xf4000600, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
  2067. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2068. 0xf4000700, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
  2069. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2070. 0xf4000800, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
  2071. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2072. 0xf4000900, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
  2073. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2074. 0xf4000a00, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
  2075. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2076. 0xf4000000, 0xff900e00, "v%21?ls%21?dt4%c.%6-7S2\t%A"},
  2077. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2078. 0xf4800000, 0xff900300, "v%21?ls%21?dt1%c.%10-11S2\t%B"},
  2079. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2080. 0xf4800100, 0xff900300, "v%21?ls%21?dt2%c.%10-11S2\t%B"},
  2081. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2082. 0xf4800200, 0xff900300, "v%21?ls%21?dt3%c.%10-11S2\t%B"},
  2083. {ARM_FEATURE_COPROC (FPU_NEON_EXT_V1),
  2084. 0xf4800300, 0xff900300, "v%21?ls%21?dt4%c.%10-11S2\t%B"},
  2085. {ARM_FEATURE_CORE_LOW (0), 0 ,0, 0}
  2086. };
  2087. /* mve opcode table. */
  2088. /* print_insn_mve recognizes the following format control codes:
  2089. %% %
  2090. %a print '+' or '-' or imm offset in vldr[bhwd] and
  2091. vstr[bhwd]
  2092. %c print condition code
  2093. %d print addr mode of MVE vldr[bhw] and vstr[bhw]
  2094. %u print 'U' (unsigned) or 'S' for various mve instructions
  2095. %i print MVE predicate(s) for vpt and vpst
  2096. %j print a 5-bit immediate from hw2[14:12,7:6]
  2097. %k print 48 if the 7th position bit is set else print 64.
  2098. %m print rounding mode for vcvt and vrint
  2099. %n print vector comparison code for predicated instruction
  2100. %s print size for various vcvt instructions
  2101. %v print vector predicate for instruction in predicated
  2102. block
  2103. %o print offset scaled for vldr[hwd] and vstr[hwd]
  2104. %w print writeback mode for MVE v{st,ld}[24]
  2105. %B print v{st,ld}[24] any one operands
  2106. %E print vmov, vmvn, vorr, vbic encoded constant
  2107. %N print generic index for vmov
  2108. %T print bottom ('b') or top ('t') of source register
  2109. %X print exchange field in vmla* instructions
  2110. %<bitfield>r print as an ARM register
  2111. %<bitfield>d print the bitfield in decimal
  2112. %<bitfield>A print accumulate or not
  2113. %<bitfield>c print bitfield as a condition code
  2114. %<bitfield>C print bitfield as an inverted condition code
  2115. %<bitfield>Q print as a MVE Q register
  2116. %<bitfield>F print as a MVE S register
  2117. %<bitfield>Z as %<>r but r15 is ZR instead of PC and r13 is
  2118. UNPREDICTABLE
  2119. %<bitfield>S as %<>r but r15 or r13 is UNPREDICTABLE
  2120. %<bitfield>s print size for vector predicate & non VMOV instructions
  2121. %<bitfield>I print carry flag or not
  2122. %<bitfield>i print immediate for vstr/vldr reg +/- imm
  2123. %<bitfield>h print high half of 64-bit destination reg
  2124. %<bitfield>k print immediate for vector conversion instruction
  2125. %<bitfield>l print low half of 64-bit destination reg
  2126. %<bitfield>o print rotate value for vcmul
  2127. %<bitfield>u print immediate value for vddup/vdwdup
  2128. %<bitfield>x print the bitfield in hex.
  2129. */
  2130. static const struct mopcode32 mve_opcodes[] =
  2131. {
  2132. /* MVE. */
  2133. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2134. MVE_VPST,
  2135. 0xfe310f4d, 0xffbf1fff,
  2136. "vpst%i"
  2137. },
  2138. /* Floating point VPT T1. */
  2139. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2140. MVE_VPT_FP_T1,
  2141. 0xee310f00, 0xefb10f50,
  2142. "vpt%i.f%28s\t%n, %17-19Q, %1-3,5Q"},
  2143. /* Floating point VPT T2. */
  2144. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2145. MVE_VPT_FP_T2,
  2146. 0xee310f40, 0xefb10f50,
  2147. "vpt%i.f%28s\t%n, %17-19Q, %0-3Z"},
  2148. /* Vector VPT T1. */
  2149. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2150. MVE_VPT_VEC_T1,
  2151. 0xfe010f00, 0xff811f51,
  2152. "vpt%i.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
  2153. /* Vector VPT T2. */
  2154. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2155. MVE_VPT_VEC_T2,
  2156. 0xfe010f01, 0xff811f51,
  2157. "vpt%i.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
  2158. /* Vector VPT T3. */
  2159. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2160. MVE_VPT_VEC_T3,
  2161. 0xfe011f00, 0xff811f50,
  2162. "vpt%i.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
  2163. /* Vector VPT T4. */
  2164. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2165. MVE_VPT_VEC_T4,
  2166. 0xfe010f40, 0xff811f70,
  2167. "vpt%i.i%20-21s\t%n, %17-19Q, %0-3Z"},
  2168. /* Vector VPT T5. */
  2169. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2170. MVE_VPT_VEC_T5,
  2171. 0xfe010f60, 0xff811f70,
  2172. "vpt%i.u%20-21s\t%n, %17-19Q, %0-3Z"},
  2173. /* Vector VPT T6. */
  2174. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2175. MVE_VPT_VEC_T6,
  2176. 0xfe011f40, 0xff811f50,
  2177. "vpt%i.s%20-21s\t%n, %17-19Q, %0-3Z"},
  2178. /* Vector VBIC immediate. */
  2179. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2180. MVE_VBIC_IMM,
  2181. 0xef800070, 0xefb81070,
  2182. "vbic%v.i%8-11s\t%13-15,22Q, %E"},
  2183. /* Vector VBIC register. */
  2184. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2185. MVE_VBIC_REG,
  2186. 0xef100150, 0xffb11f51,
  2187. "vbic%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2188. /* Vector VABAV. */
  2189. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2190. MVE_VABAV,
  2191. 0xee800f01, 0xefc10f51,
  2192. "vabav%v.%u%20-21s\t%12-15r, %17-19,7Q, %1-3,5Q"},
  2193. /* Vector VABD floating point. */
  2194. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2195. MVE_VABD_FP,
  2196. 0xff200d40, 0xffa11f51,
  2197. "vabd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2198. /* Vector VABD. */
  2199. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2200. MVE_VABD_VEC,
  2201. 0xef000740, 0xef811f51,
  2202. "vabd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2203. /* Vector VABS floating point. */
  2204. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2205. MVE_VABS_FP,
  2206. 0xFFB10740, 0xFFB31FD1,
  2207. "vabs%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
  2208. /* Vector VABS. */
  2209. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2210. MVE_VABS_VEC,
  2211. 0xffb10340, 0xffb31fd1,
  2212. "vabs%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
  2213. /* Vector VADD floating point T1. */
  2214. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2215. MVE_VADD_FP_T1,
  2216. 0xef000d40, 0xffa11f51,
  2217. "vadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2218. /* Vector VADD floating point T2. */
  2219. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2220. MVE_VADD_FP_T2,
  2221. 0xee300f40, 0xefb11f70,
  2222. "vadd%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2223. /* Vector VADD T1. */
  2224. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2225. MVE_VADD_VEC_T1,
  2226. 0xef000840, 0xff811f51,
  2227. "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2228. /* Vector VADD T2. */
  2229. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2230. MVE_VADD_VEC_T2,
  2231. 0xee010f40, 0xff811f70,
  2232. "vadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2233. /* Vector VADDLV. */
  2234. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2235. MVE_VADDLV,
  2236. 0xee890f00, 0xef8f1fd1,
  2237. "vaddlv%5A%v.%u32\t%13-15l, %20-22h, %1-3Q"},
  2238. /* Vector VADDV. */
  2239. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2240. MVE_VADDV,
  2241. 0xeef10f00, 0xeff31fd1,
  2242. "vaddv%5A%v.%u%18-19s\t%13-15l, %1-3Q"},
  2243. /* Vector VADC. */
  2244. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2245. MVE_VADC,
  2246. 0xee300f00, 0xffb10f51,
  2247. "vadc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2248. /* Vector VAND. */
  2249. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2250. MVE_VAND,
  2251. 0xef000150, 0xffb11f51,
  2252. "vand%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2253. /* Vector VBRSR register. */
  2254. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2255. MVE_VBRSR,
  2256. 0xfe011e60, 0xff811f70,
  2257. "vbrsr%v.%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2258. /* Vector VCADD floating point. */
  2259. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2260. MVE_VCADD_FP,
  2261. 0xfc800840, 0xfea11f51,
  2262. "vcadd%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%24o"},
  2263. /* Vector VCADD. */
  2264. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2265. MVE_VCADD_VEC,
  2266. 0xfe000f00, 0xff810f51,
  2267. "vcadd%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%12o"},
  2268. /* Vector VCLS. */
  2269. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2270. MVE_VCLS,
  2271. 0xffb00440, 0xffb31fd1,
  2272. "vcls%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
  2273. /* Vector VCLZ. */
  2274. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2275. MVE_VCLZ,
  2276. 0xffb004c0, 0xffb31fd1,
  2277. "vclz%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
  2278. /* Vector VCMLA. */
  2279. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2280. MVE_VCMLA_FP,
  2281. 0xfc200840, 0xfe211f51,
  2282. "vcmla%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%23-24o"},
  2283. /* Vector VCMP floating point T1. */
  2284. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2285. MVE_VCMP_FP_T1,
  2286. 0xee310f00, 0xeff1ef50,
  2287. "vcmp%v.f%28s\t%n, %17-19Q, %1-3,5Q"},
  2288. /* Vector VCMP floating point T2. */
  2289. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2290. MVE_VCMP_FP_T2,
  2291. 0xee310f40, 0xeff1ef50,
  2292. "vcmp%v.f%28s\t%n, %17-19Q, %0-3Z"},
  2293. /* Vector VCMP T1. */
  2294. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2295. MVE_VCMP_VEC_T1,
  2296. 0xfe010f00, 0xffc1ff51,
  2297. "vcmp%v.i%20-21s\t%n, %17-19Q, %1-3,5Q"},
  2298. /* Vector VCMP T2. */
  2299. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2300. MVE_VCMP_VEC_T2,
  2301. 0xfe010f01, 0xffc1ff51,
  2302. "vcmp%v.u%20-21s\t%n, %17-19Q, %1-3,5Q"},
  2303. /* Vector VCMP T3. */
  2304. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2305. MVE_VCMP_VEC_T3,
  2306. 0xfe011f00, 0xffc1ff50,
  2307. "vcmp%v.s%20-21s\t%n, %17-19Q, %1-3,5Q"},
  2308. /* Vector VCMP T4. */
  2309. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2310. MVE_VCMP_VEC_T4,
  2311. 0xfe010f40, 0xffc1ff70,
  2312. "vcmp%v.i%20-21s\t%n, %17-19Q, %0-3Z"},
  2313. /* Vector VCMP T5. */
  2314. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2315. MVE_VCMP_VEC_T5,
  2316. 0xfe010f60, 0xffc1ff70,
  2317. "vcmp%v.u%20-21s\t%n, %17-19Q, %0-3Z"},
  2318. /* Vector VCMP T6. */
  2319. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2320. MVE_VCMP_VEC_T6,
  2321. 0xfe011f40, 0xffc1ff50,
  2322. "vcmp%v.s%20-21s\t%n, %17-19Q, %0-3Z"},
  2323. /* Vector VDUP. */
  2324. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2325. MVE_VDUP,
  2326. 0xeea00b10, 0xffb10f5f,
  2327. "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
  2328. /* Vector VEOR. */
  2329. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2330. MVE_VEOR,
  2331. 0xff000150, 0xffd11f51,
  2332. "veor%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2333. /* Vector VFMA, vector * scalar. */
  2334. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2335. MVE_VFMA_FP_SCALAR,
  2336. 0xee310e40, 0xefb11f70,
  2337. "vfma%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2338. /* Vector VFMA floating point. */
  2339. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2340. MVE_VFMA_FP,
  2341. 0xef000c50, 0xffa11f51,
  2342. "vfma%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2343. /* Vector VFMS floating point. */
  2344. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2345. MVE_VFMS_FP,
  2346. 0xef200c50, 0xffa11f51,
  2347. "vfms%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2348. /* Vector VFMAS, vector * scalar. */
  2349. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2350. MVE_VFMAS_FP_SCALAR,
  2351. 0xee311e40, 0xefb11f70,
  2352. "vfmas%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2353. /* Vector VHADD T1. */
  2354. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2355. MVE_VHADD_T1,
  2356. 0xef000040, 0xef811f51,
  2357. "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2358. /* Vector VHADD T2. */
  2359. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2360. MVE_VHADD_T2,
  2361. 0xee000f40, 0xef811f70,
  2362. "vhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2363. /* Vector VHSUB T1. */
  2364. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2365. MVE_VHSUB_T1,
  2366. 0xef000240, 0xef811f51,
  2367. "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2368. /* Vector VHSUB T2. */
  2369. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2370. MVE_VHSUB_T2,
  2371. 0xee001f40, 0xef811f70,
  2372. "vhsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2373. /* Vector VCMUL. */
  2374. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2375. MVE_VCMUL_FP,
  2376. 0xee300e00, 0xefb10f50,
  2377. "vcmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%0,12o"},
  2378. /* Vector VCTP. */
  2379. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2380. MVE_VCTP,
  2381. 0xf000e801, 0xffc0ffff,
  2382. "vctp%v.%20-21s\t%16-19r"},
  2383. /* Vector VDUP. */
  2384. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2385. MVE_VDUP,
  2386. 0xeea00b10, 0xffb10f5f,
  2387. "vdup%v.%5,22s\t%17-19,7Q, %12-15r"},
  2388. /* Vector VRHADD. */
  2389. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2390. MVE_VRHADD,
  2391. 0xef000140, 0xef811f51,
  2392. "vrhadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2393. /* Vector VCVT. */
  2394. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2395. MVE_VCVT_FP_FIX_VEC,
  2396. 0xef800c50, 0xef801cd1,
  2397. "vcvt%v.%s\t%13-15,22Q, %1-3,5Q, #%16-21k"},
  2398. /* Vector VCVT. */
  2399. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2400. MVE_VCVT_BETWEEN_FP_INT,
  2401. 0xffb30640, 0xffb31e51,
  2402. "vcvt%v.%s\t%13-15,22Q, %1-3,5Q"},
  2403. /* Vector VCVT between single and half-precision float, bottom half. */
  2404. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2405. MVE_VCVT_FP_HALF_FP,
  2406. 0xee3f0e01, 0xefbf1fd1,
  2407. "vcvtb%v.%s\t%13-15,22Q, %1-3,5Q"},
  2408. /* Vector VCVT between single and half-precision float, top half. */
  2409. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2410. MVE_VCVT_FP_HALF_FP,
  2411. 0xee3f1e01, 0xefbf1fd1,
  2412. "vcvtt%v.%s\t%13-15,22Q, %1-3,5Q"},
  2413. /* Vector VCVT. */
  2414. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2415. MVE_VCVT_FROM_FP_TO_INT,
  2416. 0xffb30040, 0xffb31c51,
  2417. "vcvt%m%v.%s\t%13-15,22Q, %1-3,5Q"},
  2418. /* Vector VDDUP. */
  2419. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2420. MVE_VDDUP,
  2421. 0xee011f6e, 0xff811f7e,
  2422. "vddup%v.u%20-21s\t%13-15,22Q, %17-19l, #%0,7u"},
  2423. /* Vector VDWDUP. */
  2424. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2425. MVE_VDWDUP,
  2426. 0xee011f60, 0xff811f70,
  2427. "vdwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, #%0,7u"},
  2428. /* Vector VHCADD. */
  2429. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2430. MVE_VHCADD,
  2431. 0xee000f00, 0xff810f51,
  2432. "vhcadd%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q, #%12o"},
  2433. /* Vector VIWDUP. */
  2434. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2435. MVE_VIWDUP,
  2436. 0xee010f60, 0xff811f70,
  2437. "viwdup%v.u%20-21s\t%13-15,22Q, %17-19l, %1-3h, #%0,7u"},
  2438. /* Vector VIDUP. */
  2439. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2440. MVE_VIDUP,
  2441. 0xee010f6e, 0xff811f7e,
  2442. "vidup%v.u%20-21s\t%13-15,22Q, %17-19l, #%0,7u"},
  2443. /* Vector VLD2. */
  2444. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2445. MVE_VLD2,
  2446. 0xfc901e00, 0xff901e5f,
  2447. "vld2%5d.%7-8s\t%B, [%16-19r]%w"},
  2448. /* Vector VLD4. */
  2449. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2450. MVE_VLD4,
  2451. 0xfc901e01, 0xff901e1f,
  2452. "vld4%5-6d.%7-8s\t%B, [%16-19r]%w"},
  2453. /* Vector VLDRB gather load. */
  2454. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2455. MVE_VLDRB_GATHER_T1,
  2456. 0xec900e00, 0xefb01e50,
  2457. "vldrb%v.%u%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
  2458. /* Vector VLDRH gather load. */
  2459. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2460. MVE_VLDRH_GATHER_T2,
  2461. 0xec900e10, 0xefb01e50,
  2462. "vldrh%v.%u%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
  2463. /* Vector VLDRW gather load. */
  2464. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2465. MVE_VLDRW_GATHER_T3,
  2466. 0xfc900f40, 0xffb01fd0,
  2467. "vldrw%v.u32\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
  2468. /* Vector VLDRD gather load. */
  2469. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2470. MVE_VLDRD_GATHER_T4,
  2471. 0xec900fd0, 0xefb01fd0,
  2472. "vldrd%v.u64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
  2473. /* Vector VLDRW gather load. */
  2474. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2475. MVE_VLDRW_GATHER_T5,
  2476. 0xfd101e00, 0xff111f00,
  2477. "vldrw%v.u32\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
  2478. /* Vector VLDRD gather load, variant T6. */
  2479. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2480. MVE_VLDRD_GATHER_T6,
  2481. 0xfd101f00, 0xff111f00,
  2482. "vldrd%v.u64\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
  2483. /* Vector VLDRB. */
  2484. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2485. MVE_VLDRB_T1,
  2486. 0xec100e00, 0xee581e00,
  2487. "vldrb%v.%u%7-8s\t%13-15Q, %d"},
  2488. /* Vector VLDRH. */
  2489. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2490. MVE_VLDRH_T2,
  2491. 0xec180e00, 0xee581e00,
  2492. "vldrh%v.%u%7-8s\t%13-15Q, %d"},
  2493. /* Vector VLDRB unsigned, variant T5. */
  2494. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2495. MVE_VLDRB_T5,
  2496. 0xec101e00, 0xfe101f80,
  2497. "vldrb%v.u8\t%13-15,22Q, %d"},
  2498. /* Vector VLDRH unsigned, variant T6. */
  2499. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2500. MVE_VLDRH_T6,
  2501. 0xec101e80, 0xfe101f80,
  2502. "vldrh%v.u16\t%13-15,22Q, %d"},
  2503. /* Vector VLDRW unsigned, variant T7. */
  2504. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2505. MVE_VLDRW_T7,
  2506. 0xec101f00, 0xfe101f80,
  2507. "vldrw%v.u32\t%13-15,22Q, %d"},
  2508. /* Vector VMAX. */
  2509. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2510. MVE_VMAX,
  2511. 0xef000640, 0xef811f51,
  2512. "vmax%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2513. /* Vector VMAXA. */
  2514. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2515. MVE_VMAXA,
  2516. 0xee330e81, 0xffb31fd1,
  2517. "vmaxa%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
  2518. /* Vector VMAXNM floating point. */
  2519. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2520. MVE_VMAXNM_FP,
  2521. 0xff000f50, 0xffa11f51,
  2522. "vmaxnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2523. /* Vector VMAXNMA floating point. */
  2524. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2525. MVE_VMAXNMA_FP,
  2526. 0xee3f0e81, 0xefbf1fd1,
  2527. "vmaxnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
  2528. /* Vector VMAXNMV floating point. */
  2529. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2530. MVE_VMAXNMV_FP,
  2531. 0xeeee0f00, 0xefff0fd1,
  2532. "vmaxnmv%v.f%28s\t%12-15r, %1-3,5Q"},
  2533. /* Vector VMAXNMAV floating point. */
  2534. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2535. MVE_VMAXNMAV_FP,
  2536. 0xeeec0f00, 0xefff0fd1,
  2537. "vmaxnmav%v.f%28s\t%12-15r, %1-3,5Q"},
  2538. /* Vector VMAXV. */
  2539. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2540. MVE_VMAXV,
  2541. 0xeee20f00, 0xeff30fd1,
  2542. "vmaxv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
  2543. /* Vector VMAXAV. */
  2544. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2545. MVE_VMAXAV,
  2546. 0xeee00f00, 0xfff30fd1,
  2547. "vmaxav%v.s%18-19s\t%12-15r, %1-3,5Q"},
  2548. /* Vector VMIN. */
  2549. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2550. MVE_VMIN,
  2551. 0xef000650, 0xef811f51,
  2552. "vmin%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2553. /* Vector VMINA. */
  2554. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2555. MVE_VMINA,
  2556. 0xee331e81, 0xffb31fd1,
  2557. "vmina%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
  2558. /* Vector VMINNM floating point. */
  2559. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2560. MVE_VMINNM_FP,
  2561. 0xff200f50, 0xffa11f51,
  2562. "vminnm%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2563. /* Vector VMINNMA floating point. */
  2564. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2565. MVE_VMINNMA_FP,
  2566. 0xee3f1e81, 0xefbf1fd1,
  2567. "vminnma%v.f%28s\t%13-15,22Q, %1-3,5Q"},
  2568. /* Vector VMINNMV floating point. */
  2569. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2570. MVE_VMINNMV_FP,
  2571. 0xeeee0f80, 0xefff0fd1,
  2572. "vminnmv%v.f%28s\t%12-15r, %1-3,5Q"},
  2573. /* Vector VMINNMAV floating point. */
  2574. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2575. MVE_VMINNMAV_FP,
  2576. 0xeeec0f80, 0xefff0fd1,
  2577. "vminnmav%v.f%28s\t%12-15r, %1-3,5Q"},
  2578. /* Vector VMINV. */
  2579. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2580. MVE_VMINV,
  2581. 0xeee20f80, 0xeff30fd1,
  2582. "vminv%v.%u%18-19s\t%12-15r, %1-3,5Q"},
  2583. /* Vector VMINAV. */
  2584. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2585. MVE_VMINAV,
  2586. 0xeee00f80, 0xfff30fd1,
  2587. "vminav%v.s%18-19s\t%12-15r, %1-3,5Q"},
  2588. /* Vector VMLA. */
  2589. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2590. MVE_VMLA,
  2591. 0xee010e40, 0xef811f70,
  2592. "vmla%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2593. /* Vector VMLALDAV. Note must appear before VMLADAV due to instruction
  2594. opcode aliasing. */
  2595. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2596. MVE_VMLALDAV,
  2597. 0xee801e00, 0xef801f51,
  2598. "vmlaldav%5Ax%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
  2599. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2600. MVE_VMLALDAV,
  2601. 0xee800e00, 0xef801f51,
  2602. "vmlalv%5A%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
  2603. /* Vector VMLAV T1 variant, same as VMLADAV but with X == 0. */
  2604. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2605. MVE_VMLADAV_T1,
  2606. 0xeef00e00, 0xeff01f51,
  2607. "vmlav%5A%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
  2608. /* Vector VMLAV T2 variant, same as VMLADAV but with X == 0. */
  2609. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2610. MVE_VMLADAV_T2,
  2611. 0xeef00f00, 0xeff11f51,
  2612. "vmlav%5A%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
  2613. /* Vector VMLADAV T1 variant. */
  2614. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2615. MVE_VMLADAV_T1,
  2616. 0xeef01e00, 0xeff01f51,
  2617. "vmladav%5Ax%v.%u%16s\t%13-15l, %17-19,7Q, %1-3Q"},
  2618. /* Vector VMLADAV T2 variant. */
  2619. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2620. MVE_VMLADAV_T2,
  2621. 0xeef01f00, 0xeff11f51,
  2622. "vmladav%5Ax%v.%u8\t%13-15l, %17-19,7Q, %1-3Q"},
  2623. /* Vector VMLAS. */
  2624. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2625. MVE_VMLAS,
  2626. 0xee011e40, 0xef811f70,
  2627. "vmlas%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2628. /* Vector VRMLSLDAVH. Note must appear before VMLSDAV due to instruction
  2629. opcode aliasing. */
  2630. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2631. MVE_VRMLSLDAVH,
  2632. 0xfe800e01, 0xff810f51,
  2633. "vrmlsldavh%5A%X%v.s32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
  2634. /* Vector VMLSLDAV. Note must appear before VMLSDAV due to instruction
  2635. opcdoe aliasing. */
  2636. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2637. MVE_VMLSLDAV,
  2638. 0xee800e01, 0xff800f51,
  2639. "vmlsldav%5A%X%v.%u%16s\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
  2640. /* Vector VMLSDAV T1 Variant. */
  2641. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2642. MVE_VMLSDAV_T1,
  2643. 0xeef00e01, 0xfff00f51,
  2644. "vmlsdav%5A%X%v.s%16s\t%13-15l, %17-19,7Q, %1-3Q"},
  2645. /* Vector VMLSDAV T2 Variant. */
  2646. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2647. MVE_VMLSDAV_T2,
  2648. 0xfef00e01, 0xfff10f51,
  2649. "vmlsdav%5A%X%v.s8\t%13-15l, %17-19,7Q, %1-3Q"},
  2650. /* Vector VMOV between gpr and half precision register, op == 0. */
  2651. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2652. MVE_VMOV_HFP_TO_GP,
  2653. 0xee000910, 0xfff00f7f,
  2654. "vmov.f16\t%7,16-19F, %12-15r"},
  2655. /* Vector VMOV between gpr and half precision register, op == 1. */
  2656. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2657. MVE_VMOV_HFP_TO_GP,
  2658. 0xee100910, 0xfff00f7f,
  2659. "vmov.f16\t%12-15r, %7,16-19F"},
  2660. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2661. MVE_VMOV_GP_TO_VEC_LANE,
  2662. 0xee000b10, 0xff900f1f,
  2663. "vmov%c.%5-6,21-22s\t%17-19,7Q[%N], %12-15r"},
  2664. /* Vector VORR immediate to vector.
  2665. NOTE: MVE_VORR_IMM must appear in the table
  2666. before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
  2667. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2668. MVE_VORR_IMM,
  2669. 0xef800050, 0xefb810f0,
  2670. "vorr%v.i%8-11s\t%13-15,22Q, %E"},
  2671. /* Vector VQSHL T2 Variant.
  2672. NOTE: MVE_VQSHL_T2 must appear in the table before
  2673. before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
  2674. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2675. MVE_VQSHL_T2,
  2676. 0xef800750, 0xef801fd1,
  2677. "vqshl%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2678. /* Vector VQSHLU T3 Variant
  2679. NOTE: MVE_VQSHL_T2 must appear in the table before
  2680. before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
  2681. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2682. MVE_VQSHLU_T3,
  2683. 0xff800650, 0xff801fd1,
  2684. "vqshlu%v.s%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2685. /* Vector VRSHR
  2686. NOTE: MVE_VRSHR must appear in the table before
  2687. before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
  2688. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2689. MVE_VRSHR,
  2690. 0xef800250, 0xef801fd1,
  2691. "vrshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2692. /* Vector VSHL.
  2693. NOTE: MVE_VSHL must appear in the table before
  2694. before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
  2695. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2696. MVE_VSHL_T1,
  2697. 0xef800550, 0xff801fd1,
  2698. "vshl%v.i%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2699. /* Vector VSHR
  2700. NOTE: MVE_VSHR must appear in the table before
  2701. before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
  2702. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2703. MVE_VSHR,
  2704. 0xef800050, 0xef801fd1,
  2705. "vshr%v.%u%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2706. /* Vector VSLI
  2707. NOTE: MVE_VSLI must appear in the table before
  2708. before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
  2709. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2710. MVE_VSLI,
  2711. 0xff800550, 0xff801fd1,
  2712. "vsli%v.%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2713. /* Vector VSRI
  2714. NOTE: MVE_VSRI must appear in the table before
  2715. before MVE_VMOV_IMM_TO_VEC due to opcode aliasing. */
  2716. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2717. MVE_VSRI,
  2718. 0xff800450, 0xff801fd1,
  2719. "vsri%v.%19-21s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2720. /* Vector VMOV immediate to vector,
  2721. undefinded for cmode == 1111 */
  2722. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2723. MVE_VMVN_IMM, 0xef800f70, 0xefb81ff0, UNDEFINED_INSTRUCTION},
  2724. /* Vector VMOV immediate to vector,
  2725. cmode == 1101 */
  2726. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2727. MVE_VMOV_IMM_TO_VEC, 0xef800d50, 0xefb81fd0,
  2728. "vmov%v.%5,8-11s\t%13-15,22Q, %E"},
  2729. /* Vector VMOV immediate to vector. */
  2730. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2731. MVE_VMOV_IMM_TO_VEC,
  2732. 0xef800050, 0xefb810d0,
  2733. "vmov%v.%5,8-11s\t%13-15,22Q, %E"},
  2734. /* Vector VMOV two 32-bit lanes to two gprs, idx = 0. */
  2735. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2736. MVE_VMOV2_VEC_LANE_TO_GP,
  2737. 0xec000f00, 0xffb01ff0,
  2738. "vmov%c\t%0-3r, %16-19r, %13-15,22Q[2], %13-15,22Q[0]"},
  2739. /* Vector VMOV two 32-bit lanes to two gprs, idx = 1. */
  2740. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2741. MVE_VMOV2_VEC_LANE_TO_GP,
  2742. 0xec000f10, 0xffb01ff0,
  2743. "vmov%c\t%0-3r, %16-19r, %13-15,22Q[3], %13-15,22Q[1]"},
  2744. /* Vector VMOV Two gprs to two 32-bit lanes, idx = 0. */
  2745. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2746. MVE_VMOV2_GP_TO_VEC_LANE,
  2747. 0xec100f00, 0xffb01ff0,
  2748. "vmov%c\t%13-15,22Q[2], %13-15,22Q[0], %0-3r, %16-19r"},
  2749. /* Vector VMOV Two gprs to two 32-bit lanes, idx = 1. */
  2750. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2751. MVE_VMOV2_GP_TO_VEC_LANE,
  2752. 0xec100f10, 0xffb01ff0,
  2753. "vmov%c\t%13-15,22Q[3], %13-15,22Q[1], %0-3r, %16-19r"},
  2754. /* Vector VMOV Vector lane to gpr. */
  2755. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2756. MVE_VMOV_VEC_LANE_TO_GP,
  2757. 0xee100b10, 0xff100f1f,
  2758. "vmov%c.%u%5-6,21-22s\t%12-15r, %17-19,7Q[%N]"},
  2759. /* Vector VSHLL T1 Variant. Note: VSHLL T1 must appear before MVE_VMOVL due
  2760. to instruction opcode aliasing. */
  2761. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2762. MVE_VSHLL_T1,
  2763. 0xeea00f40, 0xefa00fd1,
  2764. "vshll%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2765. /* Vector VMOVL long. */
  2766. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2767. MVE_VMOVL,
  2768. 0xeea00f40, 0xefa70fd1,
  2769. "vmovl%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q"},
  2770. /* Vector VMOV and narrow. */
  2771. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2772. MVE_VMOVN,
  2773. 0xfe310e81, 0xffb30fd1,
  2774. "vmovn%T%v.i%18-19s\t%13-15,22Q, %1-3,5Q"},
  2775. /* Floating point move extract. */
  2776. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2777. MVE_VMOVX,
  2778. 0xfeb00a40, 0xffbf0fd0,
  2779. "vmovx.f16\t%22,12-15F, %5,0-3F"},
  2780. /* Vector VMUL floating-point T1 variant. */
  2781. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2782. MVE_VMUL_FP_T1,
  2783. 0xff000d50, 0xffa11f51,
  2784. "vmul%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2785. /* Vector VMUL floating-point T2 variant. */
  2786. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2787. MVE_VMUL_FP_T2,
  2788. 0xee310e60, 0xefb11f70,
  2789. "vmul%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2790. /* Vector VMUL T1 variant. */
  2791. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2792. MVE_VMUL_VEC_T1,
  2793. 0xef000950, 0xff811f51,
  2794. "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2795. /* Vector VMUL T2 variant. */
  2796. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2797. MVE_VMUL_VEC_T2,
  2798. 0xee011e60, 0xff811f70,
  2799. "vmul%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2800. /* Vector VMULH. */
  2801. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2802. MVE_VMULH,
  2803. 0xee010e01, 0xef811f51,
  2804. "vmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2805. /* Vector VRMULH. */
  2806. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2807. MVE_VRMULH,
  2808. 0xee011e01, 0xef811f51,
  2809. "vrmulh%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2810. /* Vector VMULL integer. */
  2811. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2812. MVE_VMULL_INT,
  2813. 0xee010e00, 0xef810f51,
  2814. "vmull%T%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2815. /* Vector VMULL polynomial. */
  2816. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2817. MVE_VMULL_POLY,
  2818. 0xee310e00, 0xefb10f51,
  2819. "vmull%T%v.%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2820. /* Vector VMVN immediate to vector. */
  2821. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2822. MVE_VMVN_IMM,
  2823. 0xef800070, 0xefb810f0,
  2824. "vmvn%v.i%8-11s\t%13-15,22Q, %E"},
  2825. /* Vector VMVN register. */
  2826. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2827. MVE_VMVN_REG,
  2828. 0xffb005c0, 0xffbf1fd1,
  2829. "vmvn%v\t%13-15,22Q, %1-3,5Q"},
  2830. /* Vector VNEG floating point. */
  2831. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  2832. MVE_VNEG_FP,
  2833. 0xffb107c0, 0xffb31fd1,
  2834. "vneg%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
  2835. /* Vector VNEG. */
  2836. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2837. MVE_VNEG_VEC,
  2838. 0xffb103c0, 0xffb31fd1,
  2839. "vneg%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
  2840. /* Vector VORN, vector bitwise or not. */
  2841. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2842. MVE_VORN,
  2843. 0xef300150, 0xffb11f51,
  2844. "vorn%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2845. /* Vector VORR register. */
  2846. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2847. MVE_VORR_REG,
  2848. 0xef200150, 0xffb11f51,
  2849. "vorr%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2850. /* Vector VMOV, vector to vector move. While decoding MVE_VORR_REG if
  2851. "Qm==Qn", VORR should replaced by its alias VMOV. For that to happen
  2852. MVE_VMOV_VEC_TO_VEC need to placed after MVE_VORR_REG in this mve_opcodes
  2853. array. */
  2854. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2855. MVE_VMOV_VEC_TO_VEC,
  2856. 0xef200150, 0xffb11f51,
  2857. "vmov%v\t%13-15,22Q, %17-19,7Q"},
  2858. /* Vector VQDMULL T1 variant. */
  2859. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2860. MVE_VQDMULL_T1,
  2861. 0xee300f01, 0xefb10f51,
  2862. "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2863. /* Vector VPNOT. */
  2864. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2865. MVE_VPNOT,
  2866. 0xfe310f4d, 0xffffffff,
  2867. "vpnot%v"},
  2868. /* Vector VPSEL. */
  2869. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2870. MVE_VPSEL,
  2871. 0xfe310f01, 0xffb11f51,
  2872. "vpsel%v\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2873. /* Vector VQABS. */
  2874. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2875. MVE_VQABS,
  2876. 0xffb00740, 0xffb31fd1,
  2877. "vqabs%v.s%18-19s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2878. /* Vector VQADD T1 variant. */
  2879. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2880. MVE_VQADD_T1,
  2881. 0xef000050, 0xef811f51,
  2882. "vqadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2883. /* Vector VQADD T2 variant. */
  2884. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2885. MVE_VQADD_T2,
  2886. 0xee000f60, 0xef811f70,
  2887. "vqadd%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2888. /* Vector VQDMULL T2 variant. */
  2889. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2890. MVE_VQDMULL_T2,
  2891. 0xee300f60, 0xefb10f70,
  2892. "vqdmull%T%v.s%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2893. /* Vector VQMOVN. */
  2894. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2895. MVE_VQMOVN,
  2896. 0xee330e01, 0xefb30fd1,
  2897. "vqmovn%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q"},
  2898. /* Vector VQMOVUN. */
  2899. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2900. MVE_VQMOVUN,
  2901. 0xee310e81, 0xffb30fd1,
  2902. "vqmovun%T%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
  2903. /* Vector VQDMLADH. */
  2904. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2905. MVE_VQDMLADH,
  2906. 0xee000e00, 0xff810f51,
  2907. "vqdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2908. /* Vector VQRDMLADH. */
  2909. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2910. MVE_VQRDMLADH,
  2911. 0xee000e01, 0xff810f51,
  2912. "vqrdmladh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2913. /* Vector VQDMLAH. */
  2914. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2915. MVE_VQDMLAH,
  2916. 0xee000e60, 0xff811f70,
  2917. "vqdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2918. /* Vector VQRDMLAH. */
  2919. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2920. MVE_VQRDMLAH,
  2921. 0xee000e40, 0xff811f70,
  2922. "vqrdmlah%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2923. /* Vector VQDMLASH. */
  2924. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2925. MVE_VQDMLASH,
  2926. 0xee001e60, 0xff811f70,
  2927. "vqdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2928. /* Vector VQRDMLASH. */
  2929. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2930. MVE_VQRDMLASH,
  2931. 0xee001e40, 0xff811f70,
  2932. "vqrdmlash%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2933. /* Vector VQDMLSDH. */
  2934. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2935. MVE_VQDMLSDH,
  2936. 0xfe000e00, 0xff810f51,
  2937. "vqdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2938. /* Vector VQRDMLSDH. */
  2939. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2940. MVE_VQRDMLSDH,
  2941. 0xfe000e01, 0xff810f51,
  2942. "vqrdmlsdh%X%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2943. /* Vector VQDMULH T1 variant. */
  2944. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2945. MVE_VQDMULH_T1,
  2946. 0xef000b40, 0xff811f51,
  2947. "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2948. /* Vector VQRDMULH T2 variant. */
  2949. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2950. MVE_VQRDMULH_T2,
  2951. 0xff000b40, 0xff811f51,
  2952. "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  2953. /* Vector VQDMULH T3 variant. */
  2954. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2955. MVE_VQDMULH_T3,
  2956. 0xee010e60, 0xff811f70,
  2957. "vqdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2958. /* Vector VQRDMULH T4 variant. */
  2959. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2960. MVE_VQRDMULH_T4,
  2961. 0xfe010e60, 0xff811f70,
  2962. "vqrdmulh%v.s%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  2963. /* Vector VQNEG. */
  2964. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2965. MVE_VQNEG,
  2966. 0xffb007c0, 0xffb31fd1,
  2967. "vqneg%v.s%18-19s\t%13-15,22Q, %1-3,5Q"},
  2968. /* Vector VQRSHL T1 variant. */
  2969. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2970. MVE_VQRSHL_T1,
  2971. 0xef000550, 0xef811f51,
  2972. "vqrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
  2973. /* Vector VQRSHL T2 variant. */
  2974. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2975. MVE_VQRSHL_T2,
  2976. 0xee331ee0, 0xefb31ff0,
  2977. "vqrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
  2978. /* Vector VQRSHRN. */
  2979. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2980. MVE_VQRSHRN,
  2981. 0xee800f41, 0xefa00fd1,
  2982. "vqrshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2983. /* Vector VQRSHRUN. */
  2984. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2985. MVE_VQRSHRUN,
  2986. 0xfe800fc0, 0xffa00fd1,
  2987. "vqrshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  2988. /* Vector VQSHL T1 Variant. */
  2989. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2990. MVE_VQSHL_T1,
  2991. 0xee311ee0, 0xefb31ff0,
  2992. "vqshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
  2993. /* Vector VQSHL T4 Variant. */
  2994. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  2995. MVE_VQSHL_T4,
  2996. 0xef000450, 0xef811f51,
  2997. "vqshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
  2998. /* Vector VQSHRN. */
  2999. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3000. MVE_VQSHRN,
  3001. 0xee800f40, 0xefa00fd1,
  3002. "vqshrn%T%v.%u%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  3003. /* Vector VQSHRUN. */
  3004. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3005. MVE_VQSHRUN,
  3006. 0xee800fc0, 0xffa00fd1,
  3007. "vqshrun%T%v.s%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  3008. /* Vector VQSUB T1 Variant. */
  3009. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3010. MVE_VQSUB_T1,
  3011. 0xef000250, 0xef811f51,
  3012. "vqsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  3013. /* Vector VQSUB T2 Variant. */
  3014. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3015. MVE_VQSUB_T2,
  3016. 0xee001f60, 0xef811f70,
  3017. "vqsub%v.%u%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  3018. /* Vector VREV16. */
  3019. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3020. MVE_VREV16,
  3021. 0xffb00140, 0xffb31fd1,
  3022. "vrev16%v.8\t%13-15,22Q, %1-3,5Q"},
  3023. /* Vector VREV32. */
  3024. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3025. MVE_VREV32,
  3026. 0xffb000c0, 0xffb31fd1,
  3027. "vrev32%v.%18-19s\t%13-15,22Q, %1-3,5Q"},
  3028. /* Vector VREV64. */
  3029. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3030. MVE_VREV64,
  3031. 0xffb00040, 0xffb31fd1,
  3032. "vrev64%v.%18-19s\t%13-15,22Q, %1-3,5Q"},
  3033. /* Vector VRINT floating point. */
  3034. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  3035. MVE_VRINT_FP,
  3036. 0xffb20440, 0xffb31c51,
  3037. "vrint%m%v.f%18-19s\t%13-15,22Q, %1-3,5Q"},
  3038. /* Vector VRMLALDAVH. */
  3039. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3040. MVE_VRMLALDAVH,
  3041. 0xee800f00, 0xef811f51,
  3042. "vrmlalvh%5A%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
  3043. /* Vector VRMLALDAVH. */
  3044. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3045. MVE_VRMLALDAVH,
  3046. 0xee801f00, 0xef811f51,
  3047. "vrmlaldavh%5Ax%v.%u32\t%13-15l, %20-22h, %17-19,7Q, %1-3Q"},
  3048. /* Vector VRSHL T1 Variant. */
  3049. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3050. MVE_VRSHL_T1,
  3051. 0xef000540, 0xef811f51,
  3052. "vrshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
  3053. /* Vector VRSHL T2 Variant. */
  3054. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3055. MVE_VRSHL_T2,
  3056. 0xee331e60, 0xefb31ff0,
  3057. "vrshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
  3058. /* Vector VRSHRN. */
  3059. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3060. MVE_VRSHRN,
  3061. 0xfe800fc1, 0xffa00fd1,
  3062. "vrshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  3063. /* Vector VSBC. */
  3064. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3065. MVE_VSBC,
  3066. 0xfe300f00, 0xffb10f51,
  3067. "vsbc%12I%v.i32\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  3068. /* Vector VSHL T2 Variant. */
  3069. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3070. MVE_VSHL_T2,
  3071. 0xee311e60, 0xefb31ff0,
  3072. "vshl%v.%u%18-19s\t%13-15,22Q, %0-3r"},
  3073. /* Vector VSHL T3 Variant. */
  3074. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3075. MVE_VSHL_T3,
  3076. 0xef000440, 0xef811f51,
  3077. "vshl%v.%u%20-21s\t%13-15,22Q, %1-3,5Q, %17-19,7Q"},
  3078. /* Vector VSHLC. */
  3079. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3080. MVE_VSHLC,
  3081. 0xeea00fc0, 0xffa01ff0,
  3082. "vshlc%v\t%13-15,22Q, %0-3r, #%16-20d"},
  3083. /* Vector VSHLL T2 Variant. */
  3084. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3085. MVE_VSHLL_T2,
  3086. 0xee310e01, 0xefb30fd1,
  3087. "vshll%T%v.%u%18-19s\t%13-15,22Q, %1-3,5Q, #%18-19d"},
  3088. /* Vector VSHRN. */
  3089. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3090. MVE_VSHRN,
  3091. 0xee800fc1, 0xffa00fd1,
  3092. "vshrn%T%v.i%19-20s\t%13-15,22Q, %1-3,5Q, #%16-18d"},
  3093. /* Vector VST2 no writeback. */
  3094. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3095. MVE_VST2,
  3096. 0xfc801e00, 0xffb01e5f,
  3097. "vst2%5d.%7-8s\t%B, [%16-19r]"},
  3098. /* Vector VST2 writeback. */
  3099. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3100. MVE_VST2,
  3101. 0xfca01e00, 0xffb01e5f,
  3102. "vst2%5d.%7-8s\t%B, [%16-19r]!"},
  3103. /* Vector VST4 no writeback. */
  3104. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3105. MVE_VST4,
  3106. 0xfc801e01, 0xffb01e1f,
  3107. "vst4%5-6d.%7-8s\t%B, [%16-19r]"},
  3108. /* Vector VST4 writeback. */
  3109. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3110. MVE_VST4,
  3111. 0xfca01e01, 0xffb01e1f,
  3112. "vst4%5-6d.%7-8s\t%B, [%16-19r]!"},
  3113. /* Vector VSTRB scatter store, T1 variant. */
  3114. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3115. MVE_VSTRB_SCATTER_T1,
  3116. 0xec800e00, 0xffb01e50,
  3117. "vstrb%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q]"},
  3118. /* Vector VSTRH scatter store, T2 variant. */
  3119. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3120. MVE_VSTRH_SCATTER_T2,
  3121. 0xec800e10, 0xffb01e50,
  3122. "vstrh%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
  3123. /* Vector VSTRW scatter store, T3 variant. */
  3124. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3125. MVE_VSTRW_SCATTER_T3,
  3126. 0xec800e40, 0xffb01e50,
  3127. "vstrw%v.%7-8s\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
  3128. /* Vector VSTRD scatter store, T4 variant. */
  3129. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3130. MVE_VSTRD_SCATTER_T4,
  3131. 0xec800fd0, 0xffb01fd0,
  3132. "vstrd%v.64\t%13-15,22Q, [%16-19r, %1-3,5Q%o]"},
  3133. /* Vector VSTRW scatter store, T5 variant. */
  3134. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3135. MVE_VSTRW_SCATTER_T5,
  3136. 0xfd001e00, 0xff111f00,
  3137. "vstrw%v.32\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
  3138. /* Vector VSTRD scatter store, T6 variant. */
  3139. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3140. MVE_VSTRD_SCATTER_T6,
  3141. 0xfd001f00, 0xff111f00,
  3142. "vstrd%v.64\t%13-15,22Q, [%17-19,7Q, #%a%0-6i]%w"},
  3143. /* Vector VSTRB. */
  3144. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3145. MVE_VSTRB_T1,
  3146. 0xec000e00, 0xfe581e00,
  3147. "vstrb%v.%7-8s\t%13-15Q, %d"},
  3148. /* Vector VSTRH. */
  3149. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3150. MVE_VSTRH_T2,
  3151. 0xec080e00, 0xfe581e00,
  3152. "vstrh%v.%7-8s\t%13-15Q, %d"},
  3153. /* Vector VSTRB variant T5. */
  3154. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3155. MVE_VSTRB_T5,
  3156. 0xec001e00, 0xfe101f80,
  3157. "vstrb%v.8\t%13-15,22Q, %d"},
  3158. /* Vector VSTRH variant T6. */
  3159. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3160. MVE_VSTRH_T6,
  3161. 0xec001e80, 0xfe101f80,
  3162. "vstrh%v.16\t%13-15,22Q, %d"},
  3163. /* Vector VSTRW variant T7. */
  3164. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3165. MVE_VSTRW_T7,
  3166. 0xec001f00, 0xfe101f80,
  3167. "vstrw%v.32\t%13-15,22Q, %d"},
  3168. /* Vector VSUB floating point T1 variant. */
  3169. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  3170. MVE_VSUB_FP_T1,
  3171. 0xef200d40, 0xffa11f51,
  3172. "vsub%v.f%20s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  3173. /* Vector VSUB floating point T2 variant. */
  3174. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE_FP),
  3175. MVE_VSUB_FP_T2,
  3176. 0xee301f40, 0xefb11f70,
  3177. "vsub%v.f%28s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  3178. /* Vector VSUB T1 variant. */
  3179. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3180. MVE_VSUB_VEC_T1,
  3181. 0xff000840, 0xff811f51,
  3182. "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %1-3,5Q"},
  3183. /* Vector VSUB T2 variant. */
  3184. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3185. MVE_VSUB_VEC_T2,
  3186. 0xee011f40, 0xff811f70,
  3187. "vsub%v.i%20-21s\t%13-15,22Q, %17-19,7Q, %0-3r"},
  3188. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3189. MVE_ASRLI,
  3190. 0xea50012f, 0xfff1813f,
  3191. "asrl%c\t%17-19l, %9-11h, %j"},
  3192. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3193. MVE_ASRL,
  3194. 0xea50012d, 0xfff101ff,
  3195. "asrl%c\t%17-19l, %9-11h, %12-15S"},
  3196. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3197. MVE_LSLLI,
  3198. 0xea50010f, 0xfff1813f,
  3199. "lsll%c\t%17-19l, %9-11h, %j"},
  3200. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3201. MVE_LSLL,
  3202. 0xea50010d, 0xfff101ff,
  3203. "lsll%c\t%17-19l, %9-11h, %12-15S"},
  3204. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3205. MVE_LSRL,
  3206. 0xea50011f, 0xfff1813f,
  3207. "lsrl%c\t%17-19l, %9-11h, %j"},
  3208. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3209. MVE_SQRSHRL,
  3210. 0xea51012d, 0xfff1017f,
  3211. "sqrshrl%c\t%17-19l, %9-11h, %k, %12-15S"},
  3212. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3213. MVE_SQRSHR,
  3214. 0xea500f2d, 0xfff00fff,
  3215. "sqrshr%c\t%16-19S, %12-15S"},
  3216. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3217. MVE_SQSHLL,
  3218. 0xea51013f, 0xfff1813f,
  3219. "sqshll%c\t%17-19l, %9-11h, %j"},
  3220. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3221. MVE_SQSHL,
  3222. 0xea500f3f, 0xfff08f3f,
  3223. "sqshl%c\t%16-19S, %j"},
  3224. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3225. MVE_SRSHRL,
  3226. 0xea51012f, 0xfff1813f,
  3227. "srshrl%c\t%17-19l, %9-11h, %j"},
  3228. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3229. MVE_SRSHR,
  3230. 0xea500f2f, 0xfff08f3f,
  3231. "srshr%c\t%16-19S, %j"},
  3232. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3233. MVE_UQRSHLL,
  3234. 0xea51010d, 0xfff1017f,
  3235. "uqrshll%c\t%17-19l, %9-11h, %k, %12-15S"},
  3236. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3237. MVE_UQRSHL,
  3238. 0xea500f0d, 0xfff00fff,
  3239. "uqrshl%c\t%16-19S, %12-15S"},
  3240. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3241. MVE_UQSHLL,
  3242. 0xea51010f, 0xfff1813f,
  3243. "uqshll%c\t%17-19l, %9-11h, %j"},
  3244. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3245. MVE_UQSHL,
  3246. 0xea500f0f, 0xfff08f3f,
  3247. "uqshl%c\t%16-19S, %j"},
  3248. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3249. MVE_URSHRL,
  3250. 0xea51011f, 0xfff1813f,
  3251. "urshrl%c\t%17-19l, %9-11h, %j"},
  3252. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE),
  3253. MVE_URSHR,
  3254. 0xea500f1f, 0xfff08f3f,
  3255. "urshr%c\t%16-19S, %j"},
  3256. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  3257. MVE_CSINC,
  3258. 0xea509000, 0xfff0f000,
  3259. "csinc\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
  3260. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  3261. MVE_CSINV,
  3262. 0xea50a000, 0xfff0f000,
  3263. "csinv\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
  3264. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  3265. MVE_CSET,
  3266. 0xea5f900f, 0xfffff00f,
  3267. "cset\t%8-11S, %4-7C"},
  3268. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  3269. MVE_CSETM,
  3270. 0xea5fa00f, 0xfffff00f,
  3271. "csetm\t%8-11S, %4-7C"},
  3272. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  3273. MVE_CSEL,
  3274. 0xea508000, 0xfff0f000,
  3275. "csel\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
  3276. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  3277. MVE_CSNEG,
  3278. 0xea50b000, 0xfff0f000,
  3279. "csneg\t%8-11S, %16-19Z, %0-3Z, %4-7c"},
  3280. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  3281. MVE_CINC,
  3282. 0xea509000, 0xfff0f000,
  3283. "cinc\t%8-11S, %16-19Z, %4-7C"},
  3284. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  3285. MVE_CINV,
  3286. 0xea50a000, 0xfff0f000,
  3287. "cinv\t%8-11S, %16-19Z, %4-7C"},
  3288. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  3289. MVE_CNEG,
  3290. 0xea50b000, 0xfff0f000,
  3291. "cneg\t%8-11S, %16-19Z, %4-7C"},
  3292. {ARM_FEATURE_CORE_LOW (0),
  3293. MVE_NONE,
  3294. 0x00000000, 0x00000000, 0}
  3295. };
  3296. /* Opcode tables: ARM, 16-bit Thumb, 32-bit Thumb. All three are partially
  3297. ordered: they must be searched linearly from the top to obtain a correct
  3298. match. */
  3299. /* print_insn_arm recognizes the following format control codes:
  3300. %% %
  3301. %a print address for ldr/str instruction
  3302. %s print address for ldr/str halfword/signextend instruction
  3303. %S like %s but allow UNPREDICTABLE addressing
  3304. %b print branch destination
  3305. %c print condition code (always bits 28-31)
  3306. %m print register mask for ldm/stm instruction
  3307. %o print operand2 (immediate or register + shift)
  3308. %p print 'p' iff bits 12-15 are 15
  3309. %t print 't' iff bit 21 set and bit 24 clear
  3310. %B print arm BLX(1) destination
  3311. %C print the PSR sub type.
  3312. %U print barrier type.
  3313. %P print address for pli instruction.
  3314. %<bitfield>r print as an ARM register
  3315. %<bitfield>T print as an ARM register + 1
  3316. %<bitfield>R as %r but r15 is UNPREDICTABLE
  3317. %<bitfield>{r|R}u as %{r|R} but if matches the other %u field then is UNPREDICTABLE
  3318. %<bitfield>{r|R}U as %{r|R} but if matches the other %U field then is UNPREDICTABLE
  3319. %<bitfield>d print the bitfield in decimal
  3320. %<bitfield>W print the bitfield plus one in decimal
  3321. %<bitfield>x print the bitfield in hex
  3322. %<bitfield>X print the bitfield as 1 hex digit without leading "0x"
  3323. %<bitfield>'c print specified char iff bitfield is all ones
  3324. %<bitfield>`c print specified char iff bitfield is all zeroes
  3325. %<bitfield>?ab... select from array of values in big endian order
  3326. %e print arm SMI operand (bits 0..7,8..19).
  3327. %E print the LSB and WIDTH fields of a BFI or BFC instruction.
  3328. %V print the 16-bit immediate field of a MOVT or MOVW instruction.
  3329. %R print the SPSR/CPSR or banked register of an MRS. */
  3330. static const struct opcode32 arm_opcodes[] =
  3331. {
  3332. /* ARM instructions. */
  3333. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3334. 0xe1a00000, 0xffffffff, "nop\t\t\t; (mov r0, r0)"},
  3335. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3336. 0xe7f000f0, 0xfff000f0, "udf\t#%e"},
  3337. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T | ARM_EXT_V5),
  3338. 0x012FFF10, 0x0ffffff0, "bx%c\t%0-3r"},
  3339. {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
  3340. 0x00000090, 0x0fe000f0, "mul%20's%c\t%16-19R, %0-3R, %8-11R"},
  3341. {ARM_FEATURE_CORE_LOW (ARM_EXT_V2),
  3342. 0x00200090, 0x0fe000f0, "mla%20's%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3343. {ARM_FEATURE_CORE_LOW (ARM_EXT_V2S),
  3344. 0x01000090, 0x0fb00ff0, "swp%22'b%c\t%12-15RU, %0-3Ru, [%16-19RuU]"},
  3345. {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
  3346. 0x00800090, 0x0fa000f0,
  3347. "%22?sumull%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
  3348. {ARM_FEATURE_CORE_LOW (ARM_EXT_V3M),
  3349. 0x00a00090, 0x0fa000f0,
  3350. "%22?sumlal%20's%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
  3351. /* V8.2 RAS extension instructions. */
  3352. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
  3353. 0xe320f010, 0xffffffff, "esb"},
  3354. /* V8-R instructions. */
  3355. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8R),
  3356. 0xf57ff04c, 0xffffffff, "dfb"},
  3357. /* V8 instructions. */
  3358. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  3359. 0x0320f005, 0x0fffffff, "sevl"},
  3360. /* Defined in V8 but is in NOP space so available to all arch. */
  3361. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3362. 0xe1000070, 0xfff000f0, "hlt\t0x%16-19X%12-15X%8-11X%0-3X"},
  3363. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_ATOMICS),
  3364. 0x01800e90, 0x0ff00ff0, "stlex%c\t%12-15r, %0-3r, [%16-19R]"},
  3365. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3366. 0x01900e9f, 0x0ff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
  3367. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  3368. 0x01a00e90, 0x0ff00ff0, "stlexd%c\t%12-15r, %0-3r, %0-3T, [%16-19R]"},
  3369. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  3370. 0x01b00e9f, 0x0ff00fff, "ldaexd%c\t%12-15r, %12-15T, [%16-19R]"},
  3371. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3372. 0x01c00e90, 0x0ff00ff0, "stlexb%c\t%12-15r, %0-3r, [%16-19R]"},
  3373. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3374. 0x01d00e9f, 0x0ff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
  3375. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3376. 0x01e00e90, 0x0ff00ff0, "stlexh%c\t%12-15r, %0-3r, [%16-19R]"},
  3377. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3378. 0x01f00e9f, 0x0ff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
  3379. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3380. 0x0180fc90, 0x0ff0fff0, "stl%c\t%0-3r, [%16-19R]"},
  3381. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3382. 0x01900c9f, 0x0ff00fff, "lda%c\t%12-15r, [%16-19R]"},
  3383. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3384. 0x01c0fc90, 0x0ff0fff0, "stlb%c\t%0-3r, [%16-19R]"},
  3385. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3386. 0x01d00c9f, 0x0ff00fff, "ldab%c\t%12-15r, [%16-19R]"},
  3387. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3388. 0x01e0fc90, 0x0ff0fff0, "stlh%c\t%0-3r, [%16-19R]"},
  3389. {ARM_FEATURE_CORE_LOW (ARM_EXT2_ATOMICS),
  3390. 0x01f00c9f, 0x0ff00fff, "ldah%c\t%12-15r, [%16-19R]"},
  3391. /* CRC32 instructions. */
  3392. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  3393. 0xe1000040, 0xfff00ff0, "crc32b\t%12-15R, %16-19R, %0-3R"},
  3394. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  3395. 0xe1200040, 0xfff00ff0, "crc32h\t%12-15R, %16-19R, %0-3R"},
  3396. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  3397. 0xe1400040, 0xfff00ff0, "crc32w\t%12-15R, %16-19R, %0-3R"},
  3398. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  3399. 0xe1000240, 0xfff00ff0, "crc32cb\t%12-15R, %16-19R, %0-3R"},
  3400. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  3401. 0xe1200240, 0xfff00ff0, "crc32ch\t%12-15R, %16-19R, %0-3R"},
  3402. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  3403. 0xe1400240, 0xfff00ff0, "crc32cw\t%12-15R, %16-19R, %0-3R"},
  3404. /* Privileged Access Never extension instructions. */
  3405. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN),
  3406. 0xf1100000, 0xfffffdff, "setpan\t#%9-9d"},
  3407. /* Virtualization Extension instructions. */
  3408. {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x0160006e, 0x0fffffff, "eret%c"},
  3409. {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x01400070, 0x0ff000f0, "hvc%c\t%e"},
  3410. /* Integer Divide Extension instructions. */
  3411. {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
  3412. 0x0710f010, 0x0ff0f0f0, "sdiv%c\t%16-19r, %0-3r, %8-11r"},
  3413. {ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
  3414. 0x0730f010, 0x0ff0f0f0, "udiv%c\t%16-19r, %0-3r, %8-11r"},
  3415. /* MP Extension instructions. */
  3416. {ARM_FEATURE_CORE_LOW (ARM_EXT_MP), 0xf410f000, 0xfc70f000, "pldw\t%a"},
  3417. /* Speculation Barriers. */
  3418. {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xe320f014, 0xffffffff, "csdb"},
  3419. {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff040, 0xffffffff, "ssbb"},
  3420. {ARM_FEATURE_CORE_LOW (ARM_EXT_V3), 0xf57ff044, 0xffffffff, "pssbb"},
  3421. /* V7 instructions. */
  3422. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf450f000, 0xfd70f000, "pli\t%P"},
  3423. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0x0320f0f0, 0x0ffffff0, "dbg%c\t#%0-3d"},
  3424. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff051, 0xfffffff3, "dmb\t%U"},
  3425. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf57ff041, 0xfffffff3, "dsb\t%U"},
  3426. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff050, 0xfffffff0, "dmb\t%U"},
  3427. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff040, 0xfffffff0, "dsb\t%U"},
  3428. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf57ff060, 0xfffffff0, "isb\t%U"},
  3429. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
  3430. 0x0320f000, 0x0fffffff, "nop%c\t{%0-7d}"},
  3431. /* ARM V6T2 instructions. */
  3432. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  3433. 0x07c0001f, 0x0fe0007f, "bfc%c\t%12-15R, %E"},
  3434. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  3435. 0x07c00010, 0x0fe00070, "bfi%c\t%12-15R, %0-3r, %E"},
  3436. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  3437. 0x00600090, 0x0ff000f0, "mls%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3438. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  3439. 0x002000b0, 0x0f3000f0, "strht%c\t%12-15R, %S"},
  3440. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  3441. 0x00300090, 0x0f3000f0, UNDEFINED_INSTRUCTION },
  3442. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  3443. 0x00300090, 0x0f300090, "ldr%6's%5?hbt%c\t%12-15R, %S"},
  3444. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  3445. 0x03000000, 0x0ff00000, "movw%c\t%12-15R, %V"},
  3446. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  3447. 0x03400000, 0x0ff00000, "movt%c\t%12-15R, %V"},
  3448. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  3449. 0x06ff0f30, 0x0fff0ff0, "rbit%c\t%12-15R, %0-3R"},
  3450. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  3451. 0x07a00050, 0x0fa00070, "%22?usbfx%c\t%12-15r, %0-3r, #%7-11d, #%16-20W"},
  3452. /* ARM Security extension instructions. */
  3453. {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC),
  3454. 0x01600070, 0x0ff000f0, "smc%c\t%e"},
  3455. /* ARM V6K instructions. */
  3456. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3457. 0xf57ff01f, 0xffffffff, "clrex"},
  3458. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3459. 0x01d00f9f, 0x0ff00fff, "ldrexb%c\t%12-15R, [%16-19R]"},
  3460. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3461. 0x01b00f9f, 0x0ff00fff, "ldrexd%c\t%12-15r, [%16-19R]"},
  3462. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3463. 0x01f00f9f, 0x0ff00fff, "ldrexh%c\t%12-15R, [%16-19R]"},
  3464. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3465. 0x01c00f90, 0x0ff00ff0, "strexb%c\t%12-15R, %0-3R, [%16-19R]"},
  3466. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3467. 0x01a00f90, 0x0ff00ff0, "strexd%c\t%12-15R, %0-3r, [%16-19R]"},
  3468. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3469. 0x01e00f90, 0x0ff00ff0, "strexh%c\t%12-15R, %0-3R, [%16-19R]"},
  3470. /* ARMv8.5-A instructions. */
  3471. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf57ff070, 0xffffffff, "sb"},
  3472. /* ARM V6K NOP hints. */
  3473. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3474. 0x0320f001, 0x0fffffff, "yield%c"},
  3475. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3476. 0x0320f002, 0x0fffffff, "wfe%c"},
  3477. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3478. 0x0320f003, 0x0fffffff, "wfi%c"},
  3479. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3480. 0x0320f004, 0x0fffffff, "sev%c"},
  3481. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K),
  3482. 0x0320f000, 0x0fffff00, "nop%c\t{%0-7d}"},
  3483. /* ARM V6 instructions. */
  3484. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3485. 0xf1080000, 0xfffffe3f, "cpsie\t%8'a%7'i%6'f"},
  3486. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3487. 0xf10a0000, 0xfffffe20, "cpsie\t%8'a%7'i%6'f,#%0-4d"},
  3488. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3489. 0xf10C0000, 0xfffffe3f, "cpsid\t%8'a%7'i%6'f"},
  3490. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3491. 0xf10e0000, 0xfffffe20, "cpsid\t%8'a%7'i%6'f,#%0-4d"},
  3492. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3493. 0xf1000000, 0xfff1fe20, "cps\t#%0-4d"},
  3494. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3495. 0x06800010, 0x0ff00ff0, "pkhbt%c\t%12-15R, %16-19R, %0-3R"},
  3496. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3497. 0x06800010, 0x0ff00070, "pkhbt%c\t%12-15R, %16-19R, %0-3R, lsl #%7-11d"},
  3498. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3499. 0x06800050, 0x0ff00ff0, "pkhtb%c\t%12-15R, %16-19R, %0-3R, asr #32"},
  3500. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3501. 0x06800050, 0x0ff00070, "pkhtb%c\t%12-15R, %16-19R, %0-3R, asr #%7-11d"},
  3502. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3503. 0x01900f9f, 0x0ff00fff, "ldrex%c\tr%12-15d, [%16-19R]"},
  3504. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3505. 0x06200f10, 0x0ff00ff0, "qadd16%c\t%12-15R, %16-19R, %0-3R"},
  3506. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3507. 0x06200f90, 0x0ff00ff0, "qadd8%c\t%12-15R, %16-19R, %0-3R"},
  3508. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3509. 0x06200f30, 0x0ff00ff0, "qasx%c\t%12-15R, %16-19R, %0-3R"},
  3510. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3511. 0x06200f70, 0x0ff00ff0, "qsub16%c\t%12-15R, %16-19R, %0-3R"},
  3512. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3513. 0x06200ff0, 0x0ff00ff0, "qsub8%c\t%12-15R, %16-19R, %0-3R"},
  3514. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3515. 0x06200f50, 0x0ff00ff0, "qsax%c\t%12-15R, %16-19R, %0-3R"},
  3516. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3517. 0x06100f10, 0x0ff00ff0, "sadd16%c\t%12-15R, %16-19R, %0-3R"},
  3518. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3519. 0x06100f90, 0x0ff00ff0, "sadd8%c\t%12-15R, %16-19R, %0-3R"},
  3520. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3521. 0x06100f30, 0x0ff00ff0, "sasx%c\t%12-15R, %16-19R, %0-3R"},
  3522. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3523. 0x06300f10, 0x0ff00ff0, "shadd16%c\t%12-15R, %16-19R, %0-3R"},
  3524. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3525. 0x06300f90, 0x0ff00ff0, "shadd8%c\t%12-15R, %16-19R, %0-3R"},
  3526. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3527. 0x06300f30, 0x0ff00ff0, "shasx%c\t%12-15R, %16-19R, %0-3R"},
  3528. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3529. 0x06300f70, 0x0ff00ff0, "shsub16%c\t%12-15R, %16-19R, %0-3R"},
  3530. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3531. 0x06300ff0, 0x0ff00ff0, "shsub8%c\t%12-15R, %16-19R, %0-3R"},
  3532. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3533. 0x06300f50, 0x0ff00ff0, "shsax%c\t%12-15R, %16-19R, %0-3R"},
  3534. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3535. 0x06100f70, 0x0ff00ff0, "ssub16%c\t%12-15R, %16-19R, %0-3R"},
  3536. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3537. 0x06100ff0, 0x0ff00ff0, "ssub8%c\t%12-15R, %16-19R, %0-3R"},
  3538. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3539. 0x06100f50, 0x0ff00ff0, "ssax%c\t%12-15R, %16-19R, %0-3R"},
  3540. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3541. 0x06500f10, 0x0ff00ff0, "uadd16%c\t%12-15R, %16-19R, %0-3R"},
  3542. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3543. 0x06500f90, 0x0ff00ff0, "uadd8%c\t%12-15R, %16-19R, %0-3R"},
  3544. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3545. 0x06500f30, 0x0ff00ff0, "uasx%c\t%12-15R, %16-19R, %0-3R"},
  3546. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3547. 0x06700f10, 0x0ff00ff0, "uhadd16%c\t%12-15R, %16-19R, %0-3R"},
  3548. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3549. 0x06700f90, 0x0ff00ff0, "uhadd8%c\t%12-15R, %16-19R, %0-3R"},
  3550. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3551. 0x06700f30, 0x0ff00ff0, "uhasx%c\t%12-15R, %16-19R, %0-3R"},
  3552. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3553. 0x06700f70, 0x0ff00ff0, "uhsub16%c\t%12-15R, %16-19R, %0-3R"},
  3554. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3555. 0x06700ff0, 0x0ff00ff0, "uhsub8%c\t%12-15R, %16-19R, %0-3R"},
  3556. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3557. 0x06700f50, 0x0ff00ff0, "uhsax%c\t%12-15R, %16-19R, %0-3R"},
  3558. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3559. 0x06600f10, 0x0ff00ff0, "uqadd16%c\t%12-15R, %16-19R, %0-3R"},
  3560. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3561. 0x06600f90, 0x0ff00ff0, "uqadd8%c\t%12-15R, %16-19R, %0-3R"},
  3562. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3563. 0x06600f30, 0x0ff00ff0, "uqasx%c\t%12-15R, %16-19R, %0-3R"},
  3564. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3565. 0x06600f70, 0x0ff00ff0, "uqsub16%c\t%12-15R, %16-19R, %0-3R"},
  3566. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3567. 0x06600ff0, 0x0ff00ff0, "uqsub8%c\t%12-15R, %16-19R, %0-3R"},
  3568. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3569. 0x06600f50, 0x0ff00ff0, "uqsax%c\t%12-15R, %16-19R, %0-3R"},
  3570. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3571. 0x06500f70, 0x0ff00ff0, "usub16%c\t%12-15R, %16-19R, %0-3R"},
  3572. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3573. 0x06500ff0, 0x0ff00ff0, "usub8%c\t%12-15R, %16-19R, %0-3R"},
  3574. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3575. 0x06500f50, 0x0ff00ff0, "usax%c\t%12-15R, %16-19R, %0-3R"},
  3576. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3577. 0x06bf0f30, 0x0fff0ff0, "rev%c\t%12-15R, %0-3R"},
  3578. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3579. 0x06bf0fb0, 0x0fff0ff0, "rev16%c\t%12-15R, %0-3R"},
  3580. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3581. 0x06ff0fb0, 0x0fff0ff0, "revsh%c\t%12-15R, %0-3R"},
  3582. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3583. 0xf8100a00, 0xfe50ffff, "rfe%23?id%24?ba\t%16-19r%21'!"},
  3584. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3585. 0x06bf0070, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R"},
  3586. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3587. 0x06bf0470, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, ror #8"},
  3588. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3589. 0x06bf0870, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, ror #16"},
  3590. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3591. 0x06bf0c70, 0x0fff0ff0, "sxth%c\t%12-15R, %0-3R, ror #24"},
  3592. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3593. 0x068f0070, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R"},
  3594. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3595. 0x068f0470, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, ror #8"},
  3596. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3597. 0x068f0870, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, ror #16"},
  3598. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3599. 0x068f0c70, 0x0fff0ff0, "sxtb16%c\t%12-15R, %0-3R, ror #24"},
  3600. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3601. 0x06af0070, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R"},
  3602. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3603. 0x06af0470, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, ror #8"},
  3604. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3605. 0x06af0870, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, ror #16"},
  3606. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3607. 0x06af0c70, 0x0fff0ff0, "sxtb%c\t%12-15R, %0-3R, ror #24"},
  3608. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3609. 0x06ff0070, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R"},
  3610. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3611. 0x06ff0470, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, ror #8"},
  3612. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3613. 0x06ff0870, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, ror #16"},
  3614. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3615. 0x06ff0c70, 0x0fff0ff0, "uxth%c\t%12-15R, %0-3R, ror #24"},
  3616. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3617. 0x06cf0070, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R"},
  3618. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3619. 0x06cf0470, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, ror #8"},
  3620. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3621. 0x06cf0870, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, ror #16"},
  3622. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3623. 0x06cf0c70, 0x0fff0ff0, "uxtb16%c\t%12-15R, %0-3R, ror #24"},
  3624. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3625. 0x06ef0070, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R"},
  3626. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3627. 0x06ef0470, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, ror #8"},
  3628. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3629. 0x06ef0870, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, ror #16"},
  3630. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3631. 0x06ef0c70, 0x0fff0ff0, "uxtb%c\t%12-15R, %0-3R, ror #24"},
  3632. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3633. 0x06b00070, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R"},
  3634. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3635. 0x06b00470, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, ror #8"},
  3636. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3637. 0x06b00870, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, ror #16"},
  3638. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3639. 0x06b00c70, 0x0ff00ff0, "sxtah%c\t%12-15R, %16-19r, %0-3R, ror #24"},
  3640. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3641. 0x06800070, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R"},
  3642. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3643. 0x06800470, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, ror #8"},
  3644. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3645. 0x06800870, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, ror #16"},
  3646. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3647. 0x06800c70, 0x0ff00ff0, "sxtab16%c\t%12-15R, %16-19r, %0-3R, ror #24"},
  3648. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3649. 0x06a00070, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R"},
  3650. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3651. 0x06a00470, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, ror #8"},
  3652. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3653. 0x06a00870, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, ror #16"},
  3654. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3655. 0x06a00c70, 0x0ff00ff0, "sxtab%c\t%12-15R, %16-19r, %0-3R, ror #24"},
  3656. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3657. 0x06f00070, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R"},
  3658. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3659. 0x06f00470, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, ror #8"},
  3660. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3661. 0x06f00870, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, ror #16"},
  3662. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3663. 0x06f00c70, 0x0ff00ff0, "uxtah%c\t%12-15R, %16-19r, %0-3R, ror #24"},
  3664. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3665. 0x06c00070, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R"},
  3666. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3667. 0x06c00470, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ror #8"},
  3668. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3669. 0x06c00870, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ror #16"},
  3670. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3671. 0x06c00c70, 0x0ff00ff0, "uxtab16%c\t%12-15R, %16-19r, %0-3R, ROR #24"},
  3672. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3673. 0x06e00070, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R"},
  3674. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3675. 0x06e00470, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, ror #8"},
  3676. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3677. 0x06e00870, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, ror #16"},
  3678. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3679. 0x06e00c70, 0x0ff00ff0, "uxtab%c\t%12-15R, %16-19r, %0-3R, ror #24"},
  3680. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3681. 0x06800fb0, 0x0ff00ff0, "sel%c\t%12-15R, %16-19R, %0-3R"},
  3682. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3683. 0xf1010000, 0xfffffc00, "setend\t%9?ble"},
  3684. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3685. 0x0700f010, 0x0ff0f0d0, "smuad%5'x%c\t%16-19R, %0-3R, %8-11R"},
  3686. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3687. 0x0700f050, 0x0ff0f0d0, "smusd%5'x%c\t%16-19R, %0-3R, %8-11R"},
  3688. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3689. 0x07000010, 0x0ff000d0, "smlad%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3690. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3691. 0x07400010, 0x0ff000d0, "smlald%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
  3692. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3693. 0x07000050, 0x0ff000d0, "smlsd%5'x%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3694. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3695. 0x07400050, 0x0ff000d0, "smlsld%5'x%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
  3696. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3697. 0x0750f010, 0x0ff0f0d0, "smmul%5'r%c\t%16-19R, %0-3R, %8-11R"},
  3698. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3699. 0x07500010, 0x0ff000d0, "smmla%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3700. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3701. 0x075000d0, 0x0ff000d0, "smmls%5'r%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3702. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3703. 0xf84d0500, 0xfe5fffe0, "srs%23?id%24?ba\t%16-19r%21'!, #%0-4d"},
  3704. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3705. 0x06a00010, 0x0fe00ff0, "ssat%c\t%12-15R, #%16-20W, %0-3R"},
  3706. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3707. 0x06a00010, 0x0fe00070, "ssat%c\t%12-15R, #%16-20W, %0-3R, lsl #%7-11d"},
  3708. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3709. 0x06a00050, 0x0fe00070, "ssat%c\t%12-15R, #%16-20W, %0-3R, asr #%7-11d"},
  3710. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3711. 0x06a00f30, 0x0ff00ff0, "ssat16%c\t%12-15r, #%16-19W, %0-3r"},
  3712. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3713. 0x01800f90, 0x0ff00ff0, "strex%c\t%12-15R, %0-3R, [%16-19R]"},
  3714. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3715. 0x00400090, 0x0ff000f0, "umaal%c\t%12-15R, %16-19R, %0-3R, %8-11R"},
  3716. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3717. 0x0780f010, 0x0ff0f0f0, "usad8%c\t%16-19R, %0-3R, %8-11R"},
  3718. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3719. 0x07800010, 0x0ff000f0, "usada8%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3720. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3721. 0x06e00010, 0x0fe00ff0, "usat%c\t%12-15R, #%16-20d, %0-3R"},
  3722. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3723. 0x06e00010, 0x0fe00070, "usat%c\t%12-15R, #%16-20d, %0-3R, lsl #%7-11d"},
  3724. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3725. 0x06e00050, 0x0fe00070, "usat%c\t%12-15R, #%16-20d, %0-3R, asr #%7-11d"},
  3726. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6),
  3727. 0x06e00f30, 0x0ff00ff0, "usat16%c\t%12-15R, #%16-19d, %0-3R"},
  3728. /* V5J instruction. */
  3729. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5J),
  3730. 0x012fff20, 0x0ffffff0, "bxj%c\t%0-3R"},
  3731. /* V5 Instructions. */
  3732. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
  3733. 0xe1200070, 0xfff000f0,
  3734. "bkpt\t0x%16-19X%12-15X%8-11X%0-3X"},
  3735. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
  3736. 0xfa000000, 0xfe000000, "blx\t%B"},
  3737. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
  3738. 0x012fff30, 0x0ffffff0, "blx%c\t%0-3R"},
  3739. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5),
  3740. 0x016f0f10, 0x0fff0ff0, "clz%c\t%12-15R, %0-3R"},
  3741. /* V5E "El Segundo" Instructions. */
  3742. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
  3743. 0x000000d0, 0x0e1000f0, "ldrd%c\t%12-15r, %s"},
  3744. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
  3745. 0x000000f0, 0x0e1000f0, "strd%c\t%12-15r, %s"},
  3746. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5E),
  3747. 0xf450f000, 0xfc70f000, "pld\t%a"},
  3748. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3749. 0x01000080, 0x0ff000f0, "smlabb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3750. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3751. 0x010000a0, 0x0ff000f0, "smlatb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3752. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3753. 0x010000c0, 0x0ff000f0, "smlabt%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3754. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3755. 0x010000e0, 0x0ff000f0, "smlatt%c\t%16-19r, %0-3r, %8-11R, %12-15R"},
  3756. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3757. 0x01200080, 0x0ff000f0, "smlawb%c\t%16-19R, %0-3R, %8-11R, %12-15R"},
  3758. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3759. 0x012000c0, 0x0ff000f0, "smlawt%c\t%16-19R, %0-3r, %8-11R, %12-15R"},
  3760. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3761. 0x01400080, 0x0ff000f0, "smlalbb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
  3762. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3763. 0x014000a0, 0x0ff000f0, "smlaltb%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
  3764. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3765. 0x014000c0, 0x0ff000f0, "smlalbt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
  3766. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3767. 0x014000e0, 0x0ff000f0, "smlaltt%c\t%12-15Ru, %16-19Ru, %0-3R, %8-11R"},
  3768. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3769. 0x01600080, 0x0ff0f0f0, "smulbb%c\t%16-19R, %0-3R, %8-11R"},
  3770. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3771. 0x016000a0, 0x0ff0f0f0, "smultb%c\t%16-19R, %0-3R, %8-11R"},
  3772. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3773. 0x016000c0, 0x0ff0f0f0, "smulbt%c\t%16-19R, %0-3R, %8-11R"},
  3774. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3775. 0x016000e0, 0x0ff0f0f0, "smultt%c\t%16-19R, %0-3R, %8-11R"},
  3776. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3777. 0x012000a0, 0x0ff0f0f0, "smulwb%c\t%16-19R, %0-3R, %8-11R"},
  3778. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3779. 0x012000e0, 0x0ff0f0f0, "smulwt%c\t%16-19R, %0-3R, %8-11R"},
  3780. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3781. 0x01000050, 0x0ff00ff0, "qadd%c\t%12-15R, %0-3R, %16-19R"},
  3782. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3783. 0x01400050, 0x0ff00ff0, "qdadd%c\t%12-15R, %0-3R, %16-19R"},
  3784. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3785. 0x01200050, 0x0ff00ff0, "qsub%c\t%12-15R, %0-3R, %16-19R"},
  3786. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP),
  3787. 0x01600050, 0x0ff00ff0, "qdsub%c\t%12-15R, %0-3R, %16-19R"},
  3788. /* ARM Instructions. */
  3789. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3790. 0x052d0004, 0x0fff0fff, "push%c\t{%12-15r}\t\t; (str%c %12-15r, %a)"},
  3791. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3792. 0x04400000, 0x0e500000, "strb%t%c\t%12-15R, %a"},
  3793. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3794. 0x04000000, 0x0e500000, "str%t%c\t%12-15r, %a"},
  3795. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3796. 0x06400000, 0x0e500ff0, "strb%t%c\t%12-15R, %a"},
  3797. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3798. 0x06000000, 0x0e500ff0, "str%t%c\t%12-15r, %a"},
  3799. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3800. 0x04400000, 0x0c500010, "strb%t%c\t%12-15R, %a"},
  3801. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3802. 0x04000000, 0x0c500010, "str%t%c\t%12-15r, %a"},
  3803. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3804. 0x04400000, 0x0e500000, "strb%c\t%12-15R, %a"},
  3805. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3806. 0x06400000, 0x0e500010, "strb%c\t%12-15R, %a"},
  3807. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3808. 0x004000b0, 0x0e5000f0, "strh%c\t%12-15R, %s"},
  3809. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3810. 0x000000b0, 0x0e500ff0, "strh%c\t%12-15R, %s"},
  3811. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3812. 0x00500090, 0x0e5000f0, UNDEFINED_INSTRUCTION},
  3813. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3814. 0x00500090, 0x0e500090, "ldr%6's%5?hb%c\t%12-15R, %s"},
  3815. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3816. 0x00100090, 0x0e500ff0, UNDEFINED_INSTRUCTION},
  3817. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3818. 0x00100090, 0x0e500f90, "ldr%6's%5?hb%c\t%12-15R, %s"},
  3819. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3820. 0x02000000, 0x0fe00000, "and%20's%c\t%12-15r, %16-19r, %o"},
  3821. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3822. 0x00000000, 0x0fe00010, "and%20's%c\t%12-15r, %16-19r, %o"},
  3823. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3824. 0x00000010, 0x0fe00090, "and%20's%c\t%12-15R, %16-19R, %o"},
  3825. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3826. 0x02200000, 0x0fe00000, "eor%20's%c\t%12-15r, %16-19r, %o"},
  3827. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3828. 0x00200000, 0x0fe00010, "eor%20's%c\t%12-15r, %16-19r, %o"},
  3829. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3830. 0x00200010, 0x0fe00090, "eor%20's%c\t%12-15R, %16-19R, %o"},
  3831. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3832. 0x02400000, 0x0fe00000, "sub%20's%c\t%12-15r, %16-19r, %o"},
  3833. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3834. 0x00400000, 0x0fe00010, "sub%20's%c\t%12-15r, %16-19r, %o"},
  3835. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3836. 0x00400010, 0x0fe00090, "sub%20's%c\t%12-15R, %16-19R, %o"},
  3837. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3838. 0x02600000, 0x0fe00000, "rsb%20's%c\t%12-15r, %16-19r, %o"},
  3839. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3840. 0x00600000, 0x0fe00010, "rsb%20's%c\t%12-15r, %16-19r, %o"},
  3841. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3842. 0x00600010, 0x0fe00090, "rsb%20's%c\t%12-15R, %16-19R, %o"},
  3843. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3844. 0x02800000, 0x0fe00000, "add%20's%c\t%12-15r, %16-19r, %o"},
  3845. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3846. 0x00800000, 0x0fe00010, "add%20's%c\t%12-15r, %16-19r, %o"},
  3847. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3848. 0x00800010, 0x0fe00090, "add%20's%c\t%12-15R, %16-19R, %o"},
  3849. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3850. 0x02a00000, 0x0fe00000, "adc%20's%c\t%12-15r, %16-19r, %o"},
  3851. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3852. 0x00a00000, 0x0fe00010, "adc%20's%c\t%12-15r, %16-19r, %o"},
  3853. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3854. 0x00a00010, 0x0fe00090, "adc%20's%c\t%12-15R, %16-19R, %o"},
  3855. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3856. 0x02c00000, 0x0fe00000, "sbc%20's%c\t%12-15r, %16-19r, %o"},
  3857. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3858. 0x00c00000, 0x0fe00010, "sbc%20's%c\t%12-15r, %16-19r, %o"},
  3859. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3860. 0x00c00010, 0x0fe00090, "sbc%20's%c\t%12-15R, %16-19R, %o"},
  3861. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3862. 0x02e00000, 0x0fe00000, "rsc%20's%c\t%12-15r, %16-19r, %o"},
  3863. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3864. 0x00e00000, 0x0fe00010, "rsc%20's%c\t%12-15r, %16-19r, %o"},
  3865. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3866. 0x00e00010, 0x0fe00090, "rsc%20's%c\t%12-15R, %16-19R, %o"},
  3867. {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT),
  3868. 0x0120f200, 0x0fb0f200, "msr%c\t%C, %0-3r"},
  3869. {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
  3870. 0x0120f000, 0x0db0f000, "msr%c\t%C, %o"},
  3871. {ARM_FEATURE_CORE_LOW (ARM_EXT_V3),
  3872. 0x01000000, 0x0fb00cff, "mrs%c\t%12-15R, %R"},
  3873. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3874. 0x03000000, 0x0fe00000, "tst%p%c\t%16-19r, %o"},
  3875. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3876. 0x01000000, 0x0fe00010, "tst%p%c\t%16-19r, %o"},
  3877. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3878. 0x01000010, 0x0fe00090, "tst%p%c\t%16-19R, %o"},
  3879. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3880. 0x03300000, 0x0ff00000, "teq%p%c\t%16-19r, %o"},
  3881. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3882. 0x01300000, 0x0ff00010, "teq%p%c\t%16-19r, %o"},
  3883. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3884. 0x01300010, 0x0ff00010, "teq%p%c\t%16-19R, %o"},
  3885. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3886. 0x03400000, 0x0fe00000, "cmp%p%c\t%16-19r, %o"},
  3887. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3888. 0x01400000, 0x0fe00010, "cmp%p%c\t%16-19r, %o"},
  3889. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3890. 0x01400010, 0x0fe00090, "cmp%p%c\t%16-19R, %o"},
  3891. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3892. 0x03600000, 0x0fe00000, "cmn%p%c\t%16-19r, %o"},
  3893. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3894. 0x01600000, 0x0fe00010, "cmn%p%c\t%16-19r, %o"},
  3895. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3896. 0x01600010, 0x0fe00090, "cmn%p%c\t%16-19R, %o"},
  3897. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3898. 0x03800000, 0x0fe00000, "orr%20's%c\t%12-15r, %16-19r, %o"},
  3899. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3900. 0x01800000, 0x0fe00010, "orr%20's%c\t%12-15r, %16-19r, %o"},
  3901. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3902. 0x01800010, 0x0fe00090, "orr%20's%c\t%12-15R, %16-19R, %o"},
  3903. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3904. 0x03a00000, 0x0fef0000, "mov%20's%c\t%12-15r, %o"},
  3905. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3906. 0x01a00000, 0x0def0ff0, "mov%20's%c\t%12-15r, %0-3r"},
  3907. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3908. 0x01a00000, 0x0def0060, "lsl%20's%c\t%12-15R, %q"},
  3909. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3910. 0x01a00020, 0x0def0060, "lsr%20's%c\t%12-15R, %q"},
  3911. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3912. 0x01a00040, 0x0def0060, "asr%20's%c\t%12-15R, %q"},
  3913. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3914. 0x01a00060, 0x0def0ff0, "rrx%20's%c\t%12-15r, %0-3r"},
  3915. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3916. 0x01a00060, 0x0def0060, "ror%20's%c\t%12-15R, %q"},
  3917. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3918. 0x03c00000, 0x0fe00000, "bic%20's%c\t%12-15r, %16-19r, %o"},
  3919. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3920. 0x01c00000, 0x0fe00010, "bic%20's%c\t%12-15r, %16-19r, %o"},
  3921. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3922. 0x01c00010, 0x0fe00090, "bic%20's%c\t%12-15R, %16-19R, %o"},
  3923. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3924. 0x03e00000, 0x0fe00000, "mvn%20's%c\t%12-15r, %o"},
  3925. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3926. 0x01e00000, 0x0fe00010, "mvn%20's%c\t%12-15r, %o"},
  3927. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3928. 0x01e00010, 0x0fe00090, "mvn%20's%c\t%12-15R, %o"},
  3929. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3930. 0x06000010, 0x0e000010, UNDEFINED_INSTRUCTION},
  3931. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3932. 0x049d0004, 0x0fff0fff, "pop%c\t{%12-15r}\t\t; (ldr%c %12-15r, %a)"},
  3933. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3934. 0x04500000, 0x0c500000, "ldrb%t%c\t%12-15R, %a"},
  3935. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3936. 0x04300000, 0x0d700000, "ldrt%c\t%12-15R, %a"},
  3937. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3938. 0x04100000, 0x0c500000, "ldr%c\t%12-15r, %a"},
  3939. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3940. 0x092d0001, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3941. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3942. 0x092d0002, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3943. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3944. 0x092d0004, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3945. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3946. 0x092d0008, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3947. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3948. 0x092d0010, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3949. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3950. 0x092d0020, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3951. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3952. 0x092d0040, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3953. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3954. 0x092d0080, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3955. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3956. 0x092d0100, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3957. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3958. 0x092d0200, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3959. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3960. 0x092d0400, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3961. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3962. 0x092d0800, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3963. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3964. 0x092d1000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3965. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3966. 0x092d2000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3967. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3968. 0x092d4000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3969. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3970. 0x092d8000, 0x0fffffff, "stmfd%c\t%16-19R!, %m"},
  3971. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3972. 0x092d0000, 0x0fff0000, "push%c\t%m"},
  3973. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3974. 0x08800000, 0x0ff00000, "stm%c\t%16-19R%21'!, %m%22'^"},
  3975. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3976. 0x08000000, 0x0e100000, "stm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
  3977. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3978. 0x08bd0001, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3979. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3980. 0x08bd0002, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3981. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3982. 0x08bd0004, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3983. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3984. 0x08bd0008, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3985. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3986. 0x08bd0010, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3987. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3988. 0x08bd0020, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3989. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3990. 0x08bd0040, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3991. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3992. 0x08bd0080, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3993. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3994. 0x08bd0100, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3995. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3996. 0x08bd0200, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3997. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  3998. 0x08bd0400, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  3999. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4000. 0x08bd0800, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  4001. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4002. 0x08bd1000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  4003. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4004. 0x08bd2000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  4005. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4006. 0x08bd4000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  4007. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4008. 0x08bd8000, 0x0fffffff, "ldmfd%c\t%16-19R!, %m"},
  4009. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4010. 0x08bd0000, 0x0fff0000, "pop%c\t%m"},
  4011. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4012. 0x08900000, 0x0f900000, "ldm%c\t%16-19R%21'!, %m%22'^"},
  4013. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4014. 0x08100000, 0x0e100000, "ldm%23?id%24?ba%c\t%16-19R%21'!, %m%22'^"},
  4015. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4016. 0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
  4017. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4018. 0x0f000000, 0x0f000000, "svc%c\t%0-23x"},
  4019. /* The rest. */
  4020. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7),
  4021. 0x03200000, 0x0fff00ff, "nop%c\t{%0-7d}" UNPREDICTABLE_INSTRUCTION},
  4022. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4023. 0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
  4024. {ARM_FEATURE_CORE_LOW (0),
  4025. 0x00000000, 0x00000000, 0}
  4026. };
  4027. /* print_insn_thumb16 recognizes the following format control codes:
  4028. %S print Thumb register (bits 3..5 as high number if bit 6 set)
  4029. %D print Thumb register (bits 0..2 as high number if bit 7 set)
  4030. %<bitfield>I print bitfield as a signed decimal
  4031. (top bit of range being the sign bit)
  4032. %N print Thumb register mask (with LR)
  4033. %O print Thumb register mask (with PC)
  4034. %M print Thumb register mask
  4035. %b print CZB's 6-bit unsigned branch destination
  4036. %s print Thumb right-shift immediate (6..10; 0 == 32).
  4037. %c print the condition code
  4038. %C print the condition code, or "s" if not conditional
  4039. %x print warning if conditional an not at end of IT block"
  4040. %X print "\t; unpredictable <IT:code>" if conditional
  4041. %I print IT instruction suffix and operands
  4042. %W print Thumb Writeback indicator for LDMIA
  4043. %<bitfield>r print bitfield as an ARM register
  4044. %<bitfield>d print bitfield as a decimal
  4045. %<bitfield>H print (bitfield * 2) as a decimal
  4046. %<bitfield>W print (bitfield * 4) as a decimal
  4047. %<bitfield>a print (bitfield * 4) as a pc-rel offset + decoded symbol
  4048. %<bitfield>B print Thumb branch destination (signed displacement)
  4049. %<bitfield>c print bitfield as a condition code
  4050. %<bitnum>'c print specified char iff bit is one
  4051. %<bitnum>?ab print a if bit is one else print b. */
  4052. static const struct opcode16 thumb_opcodes[] =
  4053. {
  4054. /* Thumb instructions. */
  4055. /* ARMv8-M Security Extensions instructions. */
  4056. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4784, 0xff87, "blxns\t%3-6r"},
  4057. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0x4704, 0xff87, "bxns\t%3-6r"},
  4058. /* ARM V8 instructions. */
  4059. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xbf50, 0xffff, "sevl%c"},
  4060. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xba80, 0xffc0, "hlt\t%0-5x"},
  4061. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN), 0xb610, 0xfff7, "setpan\t#%3-3d"},
  4062. /* ARM V6K no-argument instructions. */
  4063. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xffff, "nop%c"},
  4064. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf10, 0xffff, "yield%c"},
  4065. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf20, 0xffff, "wfe%c"},
  4066. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf30, 0xffff, "wfi%c"},
  4067. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf40, 0xffff, "sev%c"},
  4068. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xff0f, "nop%c\t{%4-7d}"},
  4069. /* ARM V6T2 instructions. */
  4070. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4071. 0xb900, 0xfd00, "cbnz\t%0-2r, %b%X"},
  4072. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4073. 0xb100, 0xfd00, "cbz\t%0-2r, %b%X"},
  4074. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xbf00, 0xff00, "it%I%X"},
  4075. /* ARM V6. */
  4076. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb660, 0xfff8, "cpsie\t%2'a%1'i%0'f%X"},
  4077. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb670, 0xfff8, "cpsid\t%2'a%1'i%0'f%X"},
  4078. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0x4600, 0xffc0, "mov%c\t%0-2r, %3-5r"},
  4079. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba00, 0xffc0, "rev%c\t%0-2r, %3-5r"},
  4080. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xba40, 0xffc0, "rev16%c\t%0-2r, %3-5r"},
  4081. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xbac0, 0xffc0, "revsh%c\t%0-2r, %3-5r"},
  4082. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb650, 0xfff7, "setend\t%3?ble%X"},
  4083. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb200, 0xffc0, "sxth%c\t%0-2r, %3-5r"},
  4084. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb240, 0xffc0, "sxtb%c\t%0-2r, %3-5r"},
  4085. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb280, 0xffc0, "uxth%c\t%0-2r, %3-5r"},
  4086. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6), 0xb2c0, 0xffc0, "uxtb%c\t%0-2r, %3-5r"},
  4087. /* ARM V5 ISA extends Thumb. */
  4088. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
  4089. 0xbe00, 0xff00, "bkpt\t%0-7x"}, /* Is always unconditional. */
  4090. /* This is BLX(2). BLX(1) is a 32-bit instruction. */
  4091. {ARM_FEATURE_CORE_LOW (ARM_EXT_V5T),
  4092. 0x4780, 0xff87, "blx%c\t%3-6r%x"}, /* note: 4 bit register number. */
  4093. /* ARM V4T ISA (Thumb v1). */
  4094. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4095. 0x46C0, 0xFFFF, "nop%c\t\t\t; (mov r8, r8)"},
  4096. /* Format 4. */
  4097. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4000, 0xFFC0, "and%C\t%0-2r, %3-5r"},
  4098. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4040, 0xFFC0, "eor%C\t%0-2r, %3-5r"},
  4099. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4080, 0xFFC0, "lsl%C\t%0-2r, %3-5r"},
  4100. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x40C0, 0xFFC0, "lsr%C\t%0-2r, %3-5r"},
  4101. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4100, 0xFFC0, "asr%C\t%0-2r, %3-5r"},
  4102. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4140, 0xFFC0, "adc%C\t%0-2r, %3-5r"},
  4103. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4180, 0xFFC0, "sbc%C\t%0-2r, %3-5r"},
  4104. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x41C0, 0xFFC0, "ror%C\t%0-2r, %3-5r"},
  4105. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4200, 0xFFC0, "tst%c\t%0-2r, %3-5r"},
  4106. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4240, 0xFFC0, "neg%C\t%0-2r, %3-5r"},
  4107. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4280, 0xFFC0, "cmp%c\t%0-2r, %3-5r"},
  4108. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x42C0, 0xFFC0, "cmn%c\t%0-2r, %3-5r"},
  4109. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4300, 0xFFC0, "orr%C\t%0-2r, %3-5r"},
  4110. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4340, 0xFFC0, "mul%C\t%0-2r, %3-5r"},
  4111. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4380, 0xFFC0, "bic%C\t%0-2r, %3-5r"},
  4112. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x43C0, 0xFFC0, "mvn%C\t%0-2r, %3-5r"},
  4113. /* format 13 */
  4114. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB000, 0xFF80, "add%c\tsp, #%0-6W"},
  4115. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB080, 0xFF80, "sub%c\tsp, #%0-6W"},
  4116. /* format 5 */
  4117. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4700, 0xFF80, "bx%c\t%S%x"},
  4118. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4400, 0xFF00, "add%c\t%D, %S"},
  4119. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4500, 0xFF00, "cmp%c\t%D, %S"},
  4120. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x4600, 0xFF00, "mov%c\t%D, %S"},
  4121. /* format 14 */
  4122. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xB400, 0xFE00, "push%c\t%N"},
  4123. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xBC00, 0xFE00, "pop%c\t%O"},
  4124. /* format 2 */
  4125. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4126. 0x1800, 0xFE00, "add%C\t%0-2r, %3-5r, %6-8r"},
  4127. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4128. 0x1A00, 0xFE00, "sub%C\t%0-2r, %3-5r, %6-8r"},
  4129. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4130. 0x1C00, 0xFE00, "add%C\t%0-2r, %3-5r, #%6-8d"},
  4131. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4132. 0x1E00, 0xFE00, "sub%C\t%0-2r, %3-5r, #%6-8d"},
  4133. /* format 8 */
  4134. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4135. 0x5200, 0xFE00, "strh%c\t%0-2r, [%3-5r, %6-8r]"},
  4136. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4137. 0x5A00, 0xFE00, "ldrh%c\t%0-2r, [%3-5r, %6-8r]"},
  4138. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4139. 0x5600, 0xF600, "ldrs%11?hb%c\t%0-2r, [%3-5r, %6-8r]"},
  4140. /* format 7 */
  4141. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4142. 0x5000, 0xFA00, "str%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
  4143. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4144. 0x5800, 0xFA00, "ldr%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
  4145. /* format 1 */
  4146. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0000, 0xFFC0, "mov%C\t%0-2r, %3-5r"},
  4147. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4148. 0x0000, 0xF800, "lsl%C\t%0-2r, %3-5r, #%6-10d"},
  4149. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x0800, 0xF800, "lsr%C\t%0-2r, %3-5r, %s"},
  4150. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x1000, 0xF800, "asr%C\t%0-2r, %3-5r, %s"},
  4151. /* format 3 */
  4152. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2000, 0xF800, "mov%C\t%8-10r, #%0-7d"},
  4153. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x2800, 0xF800, "cmp%c\t%8-10r, #%0-7d"},
  4154. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3000, 0xF800, "add%C\t%8-10r, #%0-7d"},
  4155. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0x3800, 0xF800, "sub%C\t%8-10r, #%0-7d"},
  4156. /* format 6 */
  4157. /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
  4158. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4159. 0x4800, 0xF800,
  4160. "ldr%c\t%8-10r, [pc, #%0-7W]\t; (%0-7a)"},
  4161. /* format 9 */
  4162. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4163. 0x6000, 0xF800, "str%c\t%0-2r, [%3-5r, #%6-10W]"},
  4164. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4165. 0x6800, 0xF800, "ldr%c\t%0-2r, [%3-5r, #%6-10W]"},
  4166. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4167. 0x7000, 0xF800, "strb%c\t%0-2r, [%3-5r, #%6-10d]"},
  4168. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4169. 0x7800, 0xF800, "ldrb%c\t%0-2r, [%3-5r, #%6-10d]"},
  4170. /* format 10 */
  4171. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4172. 0x8000, 0xF800, "strh%c\t%0-2r, [%3-5r, #%6-10H]"},
  4173. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4174. 0x8800, 0xF800, "ldrh%c\t%0-2r, [%3-5r, #%6-10H]"},
  4175. /* format 11 */
  4176. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4177. 0x9000, 0xF800, "str%c\t%8-10r, [sp, #%0-7W]"},
  4178. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4179. 0x9800, 0xF800, "ldr%c\t%8-10r, [sp, #%0-7W]"},
  4180. /* format 12 */
  4181. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4182. 0xA000, 0xF800, "add%c\t%8-10r, pc, #%0-7W\t; (adr %8-10r, %0-7a)"},
  4183. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4184. 0xA800, 0xF800, "add%c\t%8-10r, sp, #%0-7W"},
  4185. /* format 15 */
  4186. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC000, 0xF800, "stmia%c\t%8-10r!, %M"},
  4187. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xC800, 0xF800, "ldmia%c\t%8-10r%W, %M"},
  4188. /* format 17 */
  4189. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDF00, 0xFF00, "svc%c\t%0-7d"},
  4190. /* format 16 */
  4191. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFF00, "udf%c\t#%0-7d"},
  4192. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xDE00, 0xFE00, UNDEFINED_INSTRUCTION},
  4193. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xD000, 0xF000, "b%8-11c.n\t%0-7B%X"},
  4194. /* format 18 */
  4195. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T), 0xE000, 0xF800, "b%c.n\t%0-10B%x"},
  4196. /* The E800 .. FFFF range is unconditionally redirected to the
  4197. 32-bit table, because even in pre-V6T2 ISAs, BL and BLX(1) pairs
  4198. are processed via that table. Thus, we can never encounter a
  4199. bare "second half of BL/BLX(1)" instruction here. */
  4200. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1), 0x0000, 0x0000, UNDEFINED_INSTRUCTION},
  4201. {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
  4202. };
  4203. /* Thumb32 opcodes use the same table structure as the ARM opcodes.
  4204. We adopt the convention that hw1 is the high 16 bits of .value and
  4205. .mask, hw2 the low 16 bits.
  4206. print_insn_thumb32 recognizes the following format control codes:
  4207. %% %
  4208. %I print a 12-bit immediate from hw1[10],hw2[14:12,7:0]
  4209. %M print a modified 12-bit immediate (same location)
  4210. %J print a 16-bit immediate from hw1[3:0,10],hw2[14:12,7:0]
  4211. %K print a 16-bit immediate from hw2[3:0],hw1[3:0],hw2[11:4]
  4212. %H print a 16-bit immediate from hw2[3:0],hw1[11:0]
  4213. %S print a possibly-shifted Rm
  4214. %L print address for a ldrd/strd instruction
  4215. %a print the address of a plain load/store
  4216. %w print the width and signedness of a core load/store
  4217. %m print register mask for ldm/stm
  4218. %n print register mask for clrm
  4219. %E print the lsb and width fields of a bfc/bfi instruction
  4220. %F print the lsb and width fields of a sbfx/ubfx instruction
  4221. %G print a fallback offset for Branch Future instructions
  4222. %W print an offset for BF instruction
  4223. %Y print an offset for BFL instruction
  4224. %Z print an offset for BFCSEL instruction
  4225. %Q print an offset for Low Overhead Loop instructions
  4226. %P print an offset for Low Overhead Loop end instructions
  4227. %b print a conditional branch offset
  4228. %B print an unconditional branch offset
  4229. %s print the shift field of an SSAT instruction
  4230. %R print the rotation field of an SXT instruction
  4231. %U print barrier type.
  4232. %P print address for pli instruction.
  4233. %c print the condition code
  4234. %x print warning if conditional an not at end of IT block"
  4235. %X print "\t; unpredictable <IT:code>" if conditional
  4236. %<bitfield>d print bitfield in decimal
  4237. %<bitfield>D print bitfield plus one in decimal
  4238. %<bitfield>W print bitfield*4 in decimal
  4239. %<bitfield>r print bitfield as an ARM register
  4240. %<bitfield>R as %<>r but r15 is UNPREDICTABLE
  4241. %<bitfield>S as %<>r but r13 and r15 is UNPREDICTABLE
  4242. %<bitfield>c print bitfield as a condition code
  4243. %<bitfield>'c print specified char iff bitfield is all ones
  4244. %<bitfield>`c print specified char iff bitfield is all zeroes
  4245. %<bitfield>?ab... select from array of values in big endian order
  4246. With one exception at the bottom (done because BL and BLX(1) need
  4247. to come dead last), this table was machine-sorted first in
  4248. decreasing order of number of bits set in the mask, then in
  4249. increasing numeric order of mask, then in increasing numeric order
  4250. of opcode. This order is not the clearest for a human reader, but
  4251. is guaranteed never to catch a special-case bit pattern with a more
  4252. general mask, which is important, because this instruction encoding
  4253. makes heavy use of special-case bit patterns. */
  4254. static const struct opcode32 thumb32_opcodes[] =
  4255. {
  4256. /* Arm v8.1-M Mainline Pointer Authentication and Branch Target
  4257. Identification Extension. */
  4258. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4259. 0xf3af802d, 0xffffffff, "aut\tr12, lr, sp"},
  4260. {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
  4261. 0xfb500f00, 0xfff00ff0, "autg%c\t%12-15r, %16-19r, %0-3r"},
  4262. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4263. 0xf3af800f, 0xffffffff, "bti"},
  4264. {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
  4265. 0xfb500f10, 0xfff00ff0, "bxaut%c\t%12-15r, %16-19r, %0-3r"},
  4266. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4267. 0xf3af801d, 0xffffffff, "pac\tr12, lr, sp"},
  4268. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4269. 0xf3af800d, 0xffffffff, "pacbti\tr12, lr, sp"},
  4270. {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
  4271. 0xfb60f000, 0xfff0f0f0, "pacg%c\t%8-11r, %16-19r, %0-3r"},
  4272. /* Armv8.1-M Mainline and Armv8.1-M Mainline Security Extensions
  4273. instructions. */
  4274. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4275. 0xf00fe001, 0xffffffff, "lctp%c"},
  4276. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4277. 0xf02fc001, 0xfffff001, "le\t%P"},
  4278. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4279. 0xf00fc001, 0xfffff001, "le\tlr, %P"},
  4280. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4281. 0xf01fc001, 0xfffff001, "letp\tlr, %P"},
  4282. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4283. 0xf040c001, 0xfff0f001, "wls\tlr, %16-19S, %Q"},
  4284. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4285. 0xf000c001, 0xffc0f001, "wlstp.%20-21s\tlr, %16-19S, %Q"},
  4286. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4287. 0xf040e001, 0xfff0ffff, "dls\tlr, %16-19S"},
  4288. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4289. 0xf000e001, 0xffc0ffff, "dlstp.%20-21s\tlr, %16-19S"},
  4290. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4291. 0xf040e001, 0xf860f001, "bf%c\t%G, %W"},
  4292. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4293. 0xf060e001, 0xf8f0f001, "bfx%c\t%G, %16-19S"},
  4294. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4295. 0xf000c001, 0xf800f001, "bfl%c\t%G, %Y"},
  4296. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4297. 0xf070e001, 0xf8f0f001, "bflx%c\t%G, %16-19S"},
  4298. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4299. 0xf000e001, 0xf840f001, "bfcsel\t%G, %Z, %18-21c"},
  4300. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
  4301. 0xe89f0000, 0xffff2000, "clrm%c\t%n"},
  4302. /* ARMv8-M and ARMv8-M Security Extensions instructions. */
  4303. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M), 0xe97fe97f, 0xffffffff, "sg"},
  4304. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
  4305. 0xe840f000, 0xfff0f0ff, "tt\t%8-11r, %16-19r"},
  4306. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
  4307. 0xe840f040, 0xfff0f0ff, "ttt\t%8-11r, %16-19r"},
  4308. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
  4309. 0xe840f080, 0xfff0f0ff, "tta\t%8-11r, %16-19r"},
  4310. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8M),
  4311. 0xe840f0c0, 0xfff0f0ff, "ttat\t%8-11r, %16-19r"},
  4312. /* ARM V8.2 RAS extension instructions. */
  4313. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_RAS),
  4314. 0xf3af8010, 0xffffffff, "esb"},
  4315. /* V8 instructions. */
  4316. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4317. 0xf3af8005, 0xffffffff, "sevl%c.w"},
  4318. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4319. 0xf78f8000, 0xfffffffc, "dcps%0-1d"},
  4320. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4321. 0xe8c00f8f, 0xfff00fff, "stlb%c\t%12-15r, [%16-19R]"},
  4322. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4323. 0xe8c00f9f, 0xfff00fff, "stlh%c\t%12-15r, [%16-19R]"},
  4324. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4325. 0xe8c00faf, 0xfff00fff, "stl%c\t%12-15r, [%16-19R]"},
  4326. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4327. 0xe8c00fc0, 0xfff00ff0, "stlexb%c\t%0-3r, %12-15r, [%16-19R]"},
  4328. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4329. 0xe8c00fd0, 0xfff00ff0, "stlexh%c\t%0-3r, %12-15r, [%16-19R]"},
  4330. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4331. 0xe8c00fe0, 0xfff00ff0, "stlex%c\t%0-3r, %12-15r, [%16-19R]"},
  4332. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4333. 0xe8c000f0, 0xfff000f0, "stlexd%c\t%0-3r, %12-15r, %8-11r, [%16-19R]"},
  4334. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4335. 0xe8d00f8f, 0xfff00fff, "ldab%c\t%12-15r, [%16-19R]"},
  4336. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4337. 0xe8d00f9f, 0xfff00fff, "ldah%c\t%12-15r, [%16-19R]"},
  4338. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4339. 0xe8d00faf, 0xfff00fff, "lda%c\t%12-15r, [%16-19R]"},
  4340. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4341. 0xe8d00fcf, 0xfff00fff, "ldaexb%c\t%12-15r, [%16-19R]"},
  4342. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4343. 0xe8d00fdf, 0xfff00fff, "ldaexh%c\t%12-15r, [%16-19R]"},
  4344. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4345. 0xe8d00fef, 0xfff00fff, "ldaex%c\t%12-15r, [%16-19R]"},
  4346. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8),
  4347. 0xe8d000ff, 0xfff000ff, "ldaexd%c\t%12-15r, %8-11r, [%16-19R]"},
  4348. /* V8-R instructions. */
  4349. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8R),
  4350. 0xf3bf8f4c, 0xffffffff, "dfb%c"},
  4351. /* CRC32 instructions. */
  4352. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  4353. 0xfac0f080, 0xfff0f0f0, "crc32b\t%8-11R, %16-19R, %0-3R"},
  4354. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  4355. 0xfac0f090, 0xfff0f0f0, "crc32h\t%9-11R, %16-19R, %0-3R"},
  4356. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  4357. 0xfac0f0a0, 0xfff0f0f0, "crc32w\t%8-11R, %16-19R, %0-3R"},
  4358. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  4359. 0xfad0f080, 0xfff0f0f0, "crc32cb\t%8-11R, %16-19R, %0-3R"},
  4360. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  4361. 0xfad0f090, 0xfff0f0f0, "crc32ch\t%8-11R, %16-19R, %0-3R"},
  4362. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC),
  4363. 0xfad0f0a0, 0xfff0f0f0, "crc32cw\t%8-11R, %16-19R, %0-3R"},
  4364. /* Speculation Barriers. */
  4365. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8014, 0xffffffff, "csdb"},
  4366. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f40, 0xffffffff, "ssbb"},
  4367. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3bf8f44, 0xffffffff, "pssbb"},
  4368. /* V7 instructions. */
  4369. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf910f000, 0xff70f000, "pli%c\t%a"},
  4370. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3af80f0, 0xfffffff0, "dbg%c\t#%0-3d"},
  4371. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f51, 0xfffffff3, "dmb%c\t%U"},
  4372. {ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xf3bf8f41, 0xfffffff3, "dsb%c\t%U"},
  4373. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f50, 0xfffffff0, "dmb%c\t%U"},
  4374. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f40, 0xfffffff0, "dsb%c\t%U"},
  4375. {ARM_FEATURE_CORE_LOW (ARM_EXT_V7), 0xf3bf8f60, 0xfffffff0, "isb%c\t%U"},
  4376. {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
  4377. 0xfb90f0f0, 0xfff0f0f0, "sdiv%c\t%8-11r, %16-19r, %0-3r"},
  4378. {ARM_FEATURE_CORE_LOW (ARM_EXT_DIV),
  4379. 0xfbb0f0f0, 0xfff0f0f0, "udiv%c\t%8-11r, %16-19r, %0-3r"},
  4380. /* Virtualization Extension instructions. */
  4381. {ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0xf7e08000, 0xfff0f000, "hvc%c\t%V"},
  4382. /* We skip ERET as that is SUBS pc, lr, #0. */
  4383. /* MP Extension instructions. */
  4384. {ARM_FEATURE_CORE_LOW (ARM_EXT_MP), 0xf830f000, 0xff70f000, "pldw%c\t%a"},
  4385. /* Security extension instructions. */
  4386. {ARM_FEATURE_CORE_LOW (ARM_EXT_SEC), 0xf7f08000, 0xfff0f000, "smc%c\t%K"},
  4387. /* ARMv8.5-A instructions. */
  4388. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_SB), 0xf3bf8f70, 0xffffffff, "sb"},
  4389. /* Instructions defined in the basic V6T2 set. */
  4390. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8000, 0xffffffff, "nop%c.w"},
  4391. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8001, 0xffffffff, "yield%c.w"},
  4392. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8002, 0xffffffff, "wfe%c.w"},
  4393. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8003, 0xffffffff, "wfi%c.w"},
  4394. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf3af8004, 0xffffffff, "sev%c.w"},
  4395. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4396. 0xf3af8000, 0xffffff00, "nop%c.w\t{%0-7d}"},
  4397. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2), 0xf7f0a000, 0xfff0f000, "udf%c.w\t%H"},
  4398. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4399. 0xf3bf8f2f, 0xffffffff, "clrex%c"},
  4400. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4401. 0xf3af8400, 0xffffff1f, "cpsie.w\t%7'a%6'i%5'f%X"},
  4402. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4403. 0xf3af8600, 0xffffff1f, "cpsid.w\t%7'a%6'i%5'f%X"},
  4404. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4405. 0xf3c08f00, 0xfff0ffff, "bxj%c\t%16-19r%x"},
  4406. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4407. 0xe810c000, 0xffd0ffff, "rfedb%c\t%16-19r%21'!"},
  4408. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4409. 0xe990c000, 0xffd0ffff, "rfeia%c\t%16-19r%21'!"},
  4410. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4411. 0xf3e08000, 0xffe0f000, "mrs%c\t%8-11r, %D"},
  4412. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4413. 0xf3af8100, 0xffffffe0, "cps\t#%0-4d%X"},
  4414. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4415. 0xe8d0f000, 0xfff0fff0, "tbb%c\t[%16-19r, %0-3r]%x"},
  4416. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4417. 0xe8d0f010, 0xfff0fff0, "tbh%c\t[%16-19r, %0-3r, lsl #1]%x"},
  4418. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4419. 0xf3af8500, 0xffffff00, "cpsie\t%7'a%6'i%5'f, #%0-4d%X"},
  4420. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4421. 0xf3af8700, 0xffffff00, "cpsid\t%7'a%6'i%5'f, #%0-4d%X"},
  4422. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4423. 0xf3de8f00, 0xffffff00, "subs%c\tpc, lr, #%0-7d"},
  4424. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4425. 0xf3808000, 0xffe0f000, "msr%c\t%C, %16-19r"},
  4426. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4427. 0xe8500f00, 0xfff00fff, "ldrex%c\t%12-15r, [%16-19r]"},
  4428. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4429. 0xe8d00f4f, 0xfff00fef, "ldrex%4?hb%c\t%12-15r, [%16-19r]"},
  4430. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4431. 0xe800c000, 0xffd0ffe0, "srsdb%c\t%16-19r%21'!, #%0-4d"},
  4432. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4433. 0xe980c000, 0xffd0ffe0, "srsia%c\t%16-19r%21'!, #%0-4d"},
  4434. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4435. 0xfa0ff080, 0xfffff0c0, "sxth%c.w\t%8-11r, %0-3r%R"},
  4436. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4437. 0xfa1ff080, 0xfffff0c0, "uxth%c.w\t%8-11r, %0-3r%R"},
  4438. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4439. 0xfa2ff080, 0xfffff0c0, "sxtb16%c\t%8-11r, %0-3r%R"},
  4440. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4441. 0xfa3ff080, 0xfffff0c0, "uxtb16%c\t%8-11r, %0-3r%R"},
  4442. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4443. 0xfa4ff080, 0xfffff0c0, "sxtb%c.w\t%8-11r, %0-3r%R"},
  4444. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4445. 0xfa5ff080, 0xfffff0c0, "uxtb%c.w\t%8-11r, %0-3r%R"},
  4446. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4447. 0xe8400000, 0xfff000ff, "strex%c\t%8-11r, %12-15r, [%16-19r]"},
  4448. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4449. 0xe8d0007f, 0xfff000ff, "ldrexd%c\t%12-15r, %8-11r, [%16-19r]"},
  4450. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4451. 0xfa80f000, 0xfff0f0f0, "sadd8%c\t%8-11r, %16-19r, %0-3r"},
  4452. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4453. 0xfa80f010, 0xfff0f0f0, "qadd8%c\t%8-11r, %16-19r, %0-3r"},
  4454. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4455. 0xfa80f020, 0xfff0f0f0, "shadd8%c\t%8-11r, %16-19r, %0-3r"},
  4456. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4457. 0xfa80f040, 0xfff0f0f0, "uadd8%c\t%8-11r, %16-19r, %0-3r"},
  4458. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4459. 0xfa80f050, 0xfff0f0f0, "uqadd8%c\t%8-11r, %16-19r, %0-3r"},
  4460. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4461. 0xfa80f060, 0xfff0f0f0, "uhadd8%c\t%8-11r, %16-19r, %0-3r"},
  4462. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4463. 0xfa80f080, 0xfff0f0f0, "qadd%c\t%8-11r, %0-3r, %16-19r"},
  4464. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4465. 0xfa80f090, 0xfff0f0f0, "qdadd%c\t%8-11r, %0-3r, %16-19r"},
  4466. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4467. 0xfa80f0a0, 0xfff0f0f0, "qsub%c\t%8-11r, %0-3r, %16-19r"},
  4468. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4469. 0xfa80f0b0, 0xfff0f0f0, "qdsub%c\t%8-11r, %0-3r, %16-19r"},
  4470. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4471. 0xfa90f000, 0xfff0f0f0, "sadd16%c\t%8-11r, %16-19r, %0-3r"},
  4472. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4473. 0xfa90f010, 0xfff0f0f0, "qadd16%c\t%8-11r, %16-19r, %0-3r"},
  4474. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4475. 0xfa90f020, 0xfff0f0f0, "shadd16%c\t%8-11r, %16-19r, %0-3r"},
  4476. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4477. 0xfa90f040, 0xfff0f0f0, "uadd16%c\t%8-11r, %16-19r, %0-3r"},
  4478. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4479. 0xfa90f050, 0xfff0f0f0, "uqadd16%c\t%8-11r, %16-19r, %0-3r"},
  4480. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4481. 0xfa90f060, 0xfff0f0f0, "uhadd16%c\t%8-11r, %16-19r, %0-3r"},
  4482. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4483. 0xfa90f080, 0xfff0f0f0, "rev%c.w\t%8-11r, %16-19r"},
  4484. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4485. 0xfa90f090, 0xfff0f0f0, "rev16%c.w\t%8-11r, %16-19r"},
  4486. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4487. 0xfa90f0a0, 0xfff0f0f0, "rbit%c\t%8-11r, %16-19r"},
  4488. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4489. 0xfa90f0b0, 0xfff0f0f0, "revsh%c.w\t%8-11r, %16-19r"},
  4490. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4491. 0xfaa0f000, 0xfff0f0f0, "sasx%c\t%8-11r, %16-19r, %0-3r"},
  4492. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4493. 0xfaa0f010, 0xfff0f0f0, "qasx%c\t%8-11r, %16-19r, %0-3r"},
  4494. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4495. 0xfaa0f020, 0xfff0f0f0, "shasx%c\t%8-11r, %16-19r, %0-3r"},
  4496. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4497. 0xfaa0f040, 0xfff0f0f0, "uasx%c\t%8-11r, %16-19r, %0-3r"},
  4498. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4499. 0xfaa0f050, 0xfff0f0f0, "uqasx%c\t%8-11r, %16-19r, %0-3r"},
  4500. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4501. 0xfaa0f060, 0xfff0f0f0, "uhasx%c\t%8-11r, %16-19r, %0-3r"},
  4502. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4503. 0xfaa0f080, 0xfff0f0f0, "sel%c\t%8-11r, %16-19r, %0-3r"},
  4504. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4505. 0xfab0f080, 0xfff0f0f0, "clz%c\t%8-11r, %16-19r"},
  4506. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4507. 0xfac0f000, 0xfff0f0f0, "ssub8%c\t%8-11r, %16-19r, %0-3r"},
  4508. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4509. 0xfac0f010, 0xfff0f0f0, "qsub8%c\t%8-11r, %16-19r, %0-3r"},
  4510. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4511. 0xfac0f020, 0xfff0f0f0, "shsub8%c\t%8-11r, %16-19r, %0-3r"},
  4512. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4513. 0xfac0f040, 0xfff0f0f0, "usub8%c\t%8-11r, %16-19r, %0-3r"},
  4514. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4515. 0xfac0f050, 0xfff0f0f0, "uqsub8%c\t%8-11r, %16-19r, %0-3r"},
  4516. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4517. 0xfac0f060, 0xfff0f0f0, "uhsub8%c\t%8-11r, %16-19r, %0-3r"},
  4518. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4519. 0xfad0f000, 0xfff0f0f0, "ssub16%c\t%8-11r, %16-19r, %0-3r"},
  4520. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4521. 0xfad0f010, 0xfff0f0f0, "qsub16%c\t%8-11r, %16-19r, %0-3r"},
  4522. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4523. 0xfad0f020, 0xfff0f0f0, "shsub16%c\t%8-11r, %16-19r, %0-3r"},
  4524. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4525. 0xfad0f040, 0xfff0f0f0, "usub16%c\t%8-11r, %16-19r, %0-3r"},
  4526. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4527. 0xfad0f050, 0xfff0f0f0, "uqsub16%c\t%8-11r, %16-19r, %0-3r"},
  4528. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4529. 0xfad0f060, 0xfff0f0f0, "uhsub16%c\t%8-11r, %16-19r, %0-3r"},
  4530. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4531. 0xfae0f000, 0xfff0f0f0, "ssax%c\t%8-11r, %16-19r, %0-3r"},
  4532. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4533. 0xfae0f010, 0xfff0f0f0, "qsax%c\t%8-11r, %16-19r, %0-3r"},
  4534. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4535. 0xfae0f020, 0xfff0f0f0, "shsax%c\t%8-11r, %16-19r, %0-3r"},
  4536. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4537. 0xfae0f040, 0xfff0f0f0, "usax%c\t%8-11r, %16-19r, %0-3r"},
  4538. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4539. 0xfae0f050, 0xfff0f0f0, "uqsax%c\t%8-11r, %16-19r, %0-3r"},
  4540. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4541. 0xfae0f060, 0xfff0f0f0, "uhsax%c\t%8-11r, %16-19r, %0-3r"},
  4542. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4543. 0xfb00f000, 0xfff0f0f0, "mul%c.w\t%8-11r, %16-19r, %0-3r"},
  4544. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4545. 0xfb70f000, 0xfff0f0f0, "usad8%c\t%8-11r, %16-19r, %0-3r"},
  4546. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4547. 0xfa00f000, 0xffe0f0f0, "lsl%20's%c.w\t%8-11R, %16-19R, %0-3R"},
  4548. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4549. 0xfa20f000, 0xffe0f0f0, "lsr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
  4550. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4551. 0xfa40f000, 0xffe0f0f0, "asr%20's%c.w\t%8-11R, %16-19R, %0-3R"},
  4552. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4553. 0xfa60f000, 0xffe0f0f0, "ror%20's%c.w\t%8-11r, %16-19r, %0-3r"},
  4554. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4555. 0xe8c00f40, 0xfff00fe0, "strex%4?hb%c\t%0-3r, %12-15r, [%16-19r]"},
  4556. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4557. 0xf3200000, 0xfff0f0e0, "ssat16%c\t%8-11r, #%0-4D, %16-19r"},
  4558. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4559. 0xf3a00000, 0xfff0f0e0, "usat16%c\t%8-11r, #%0-4d, %16-19r"},
  4560. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4561. 0xfb20f000, 0xfff0f0e0, "smuad%4'x%c\t%8-11r, %16-19r, %0-3r"},
  4562. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4563. 0xfb30f000, 0xfff0f0e0, "smulw%4?tb%c\t%8-11r, %16-19r, %0-3r"},
  4564. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4565. 0xfb40f000, 0xfff0f0e0, "smusd%4'x%c\t%8-11r, %16-19r, %0-3r"},
  4566. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4567. 0xfb50f000, 0xfff0f0e0, "smmul%4'r%c\t%8-11r, %16-19r, %0-3r"},
  4568. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4569. 0xfa00f080, 0xfff0f0c0, "sxtah%c\t%8-11r, %16-19r, %0-3r%R"},
  4570. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4571. 0xfa10f080, 0xfff0f0c0, "uxtah%c\t%8-11r, %16-19r, %0-3r%R"},
  4572. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4573. 0xfa20f080, 0xfff0f0c0, "sxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
  4574. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4575. 0xfa30f080, 0xfff0f0c0, "uxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
  4576. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4577. 0xfa40f080, 0xfff0f0c0, "sxtab%c\t%8-11r, %16-19r, %0-3r%R"},
  4578. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4579. 0xfa50f080, 0xfff0f0c0, "uxtab%c\t%8-11r, %16-19r, %0-3r%R"},
  4580. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4581. 0xfb10f000, 0xfff0f0c0, "smul%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r"},
  4582. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4583. 0xf36f0000, 0xffff8020, "bfc%c\t%8-11r, %E"},
  4584. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4585. 0xea100f00, 0xfff08f00, "tst%c.w\t%16-19r, %S"},
  4586. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4587. 0xea900f00, 0xfff08f00, "teq%c\t%16-19r, %S"},
  4588. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4589. 0xeb100f00, 0xfff08f00, "cmn%c.w\t%16-19r, %S"},
  4590. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4591. 0xebb00f00, 0xfff08f00, "cmp%c.w\t%16-19r, %S"},
  4592. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4593. 0xf0100f00, 0xfbf08f00, "tst%c.w\t%16-19r, %M"},
  4594. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4595. 0xf0900f00, 0xfbf08f00, "teq%c\t%16-19r, %M"},
  4596. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4597. 0xf1100f00, 0xfbf08f00, "cmn%c.w\t%16-19r, %M"},
  4598. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4599. 0xf1b00f00, 0xfbf08f00, "cmp%c.w\t%16-19r, %M"},
  4600. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4601. 0xea4f0000, 0xffef8000, "mov%20's%c.w\t%8-11r, %S"},
  4602. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4603. 0xea6f0000, 0xffef8000, "mvn%20's%c.w\t%8-11r, %S"},
  4604. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4605. 0xe8c00070, 0xfff000f0, "strexd%c\t%0-3r, %12-15r, %8-11r, [%16-19r]"},
  4606. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4607. 0xfb000000, 0xfff000f0, "mla%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
  4608. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4609. 0xfb000010, 0xfff000f0, "mls%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
  4610. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4611. 0xfb700000, 0xfff000f0, "usada8%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
  4612. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4613. 0xfb800000, 0xfff000f0, "smull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
  4614. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4615. 0xfba00000, 0xfff000f0, "umull%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
  4616. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4617. 0xfbc00000, 0xfff000f0, "smlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
  4618. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4619. 0xfbe00000, 0xfff000f0, "umlal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
  4620. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4621. 0xfbe00060, 0xfff000f0, "umaal%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
  4622. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4623. 0xe8500f00, 0xfff00f00, "ldrex%c\t%12-15r, [%16-19r, #%0-7W]"},
  4624. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4625. 0xf04f0000, 0xfbef8000, "mov%20's%c.w\t%8-11r, %M"},
  4626. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4627. 0xf06f0000, 0xfbef8000, "mvn%20's%c.w\t%8-11r, %M"},
  4628. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4629. 0xf810f000, 0xff70f000, "pld%c\t%a"},
  4630. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4631. 0xfb200000, 0xfff000e0, "smlad%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
  4632. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4633. 0xfb300000, 0xfff000e0, "smlaw%4?tb%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
  4634. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4635. 0xfb400000, 0xfff000e0, "smlsd%4'x%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
  4636. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4637. 0xfb500000, 0xfff000e0, "smmla%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
  4638. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4639. 0xfb600000, 0xfff000e0, "smmls%4'r%c\t%8-11R, %16-19R, %0-3R, %12-15R"},
  4640. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4641. 0xfbc000c0, 0xfff000e0, "smlald%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
  4642. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4643. 0xfbd000c0, 0xfff000e0, "smlsld%4'x%c\t%12-15R, %8-11R, %16-19R, %0-3R"},
  4644. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4645. 0xeac00000, 0xfff08030, "pkhbt%c\t%8-11r, %16-19r, %S"},
  4646. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4647. 0xeac00020, 0xfff08030, "pkhtb%c\t%8-11r, %16-19r, %S"},
  4648. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4649. 0xf3400000, 0xfff08020, "sbfx%c\t%8-11r, %16-19r, %F"},
  4650. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4651. 0xf3c00000, 0xfff08020, "ubfx%c\t%8-11r, %16-19r, %F"},
  4652. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4653. 0xf8000e00, 0xff900f00, "str%wt%c\t%12-15r, %a"},
  4654. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4655. 0xfb100000, 0xfff000c0,
  4656. "smla%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
  4657. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4658. 0xfbc00080, 0xfff000c0,
  4659. "smlal%5?tb%4?tb%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
  4660. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4661. 0xf3600000, 0xfff08020, "bfi%c\t%8-11r, %16-19r, %E"},
  4662. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4663. 0xf8100e00, 0xfe900f00, "ldr%wt%c\t%12-15r, %a"},
  4664. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4665. 0xf3000000, 0xffd08020, "ssat%c\t%8-11r, #%0-4D, %16-19r%s"},
  4666. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4667. 0xf3800000, 0xffd08020, "usat%c\t%8-11r, #%0-4d, %16-19r%s"},
  4668. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4669. 0xf2000000, 0xfbf08000, "addw%c\t%8-11r, %16-19r, %I"},
  4670. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4671. 0xf2400000, 0xfbf08000, "movw%c\t%8-11r, %J"},
  4672. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4673. 0xf2a00000, 0xfbf08000, "subw%c\t%8-11r, %16-19r, %I"},
  4674. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4675. 0xf2c00000, 0xfbf08000, "movt%c\t%8-11r, %J"},
  4676. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4677. 0xea000000, 0xffe08000, "and%20's%c.w\t%8-11r, %16-19r, %S"},
  4678. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4679. 0xea200000, 0xffe08000, "bic%20's%c.w\t%8-11r, %16-19r, %S"},
  4680. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4681. 0xea400000, 0xffe08000, "orr%20's%c.w\t%8-11r, %16-19r, %S"},
  4682. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4683. 0xea600000, 0xffe08000, "orn%20's%c\t%8-11r, %16-19r, %S"},
  4684. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4685. 0xea800000, 0xffe08000, "eor%20's%c.w\t%8-11r, %16-19r, %S"},
  4686. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4687. 0xeb000000, 0xffe08000, "add%20's%c.w\t%8-11r, %16-19r, %S"},
  4688. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4689. 0xeb400000, 0xffe08000, "adc%20's%c.w\t%8-11r, %16-19r, %S"},
  4690. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4691. 0xeb600000, 0xffe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %S"},
  4692. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4693. 0xeba00000, 0xffe08000, "sub%20's%c.w\t%8-11r, %16-19r, %S"},
  4694. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4695. 0xebc00000, 0xffe08000, "rsb%20's%c\t%8-11r, %16-19r, %S"},
  4696. {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V6T2_V8M),
  4697. 0xe8400000, 0xfff00000, "strex%c\t%8-11r, %12-15r, [%16-19r, #%0-7W]"},
  4698. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4699. 0xf0000000, 0xfbe08000, "and%20's%c.w\t%8-11r, %16-19r, %M"},
  4700. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4701. 0xf0200000, 0xfbe08000, "bic%20's%c.w\t%8-11r, %16-19r, %M"},
  4702. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4703. 0xf0400000, 0xfbe08000, "orr%20's%c.w\t%8-11r, %16-19r, %M"},
  4704. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4705. 0xf0600000, 0xfbe08000, "orn%20's%c\t%8-11r, %16-19r, %M"},
  4706. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4707. 0xf0800000, 0xfbe08000, "eor%20's%c.w\t%8-11r, %16-19r, %M"},
  4708. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4709. 0xf1000000, 0xfbe08000, "add%20's%c.w\t%8-11r, %16-19r, %M"},
  4710. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4711. 0xf1400000, 0xfbe08000, "adc%20's%c.w\t%8-11r, %16-19r, %M"},
  4712. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4713. 0xf1600000, 0xfbe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %M"},
  4714. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4715. 0xf1a00000, 0xfbe08000, "sub%20's%c.w\t%8-11r, %16-19r, %M"},
  4716. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4717. 0xf1c00000, 0xfbe08000, "rsb%20's%c\t%8-11r, %16-19r, %M"},
  4718. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4719. 0xe8800000, 0xffd00000, "stmia%c.w\t%16-19r%21'!, %m"},
  4720. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4721. 0xe8900000, 0xffd00000, "ldmia%c.w\t%16-19r%21'!, %m"},
  4722. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4723. 0xe9000000, 0xffd00000, "stmdb%c\t%16-19r%21'!, %m"},
  4724. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4725. 0xe9100000, 0xffd00000, "ldmdb%c\t%16-19r%21'!, %m"},
  4726. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4727. 0xe9c00000, 0xffd000ff, "strd%c\t%12-15r, %8-11r, [%16-19r]"},
  4728. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4729. 0xe9d00000, 0xffd000ff, "ldrd%c\t%12-15r, %8-11r, [%16-19r]"},
  4730. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4731. 0xe9400000, 0xff500000,
  4732. "strd%c\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]%21'!%L"},
  4733. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4734. 0xe9500000, 0xff500000,
  4735. "ldrd%c\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]%21'!%L"},
  4736. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4737. 0xe8600000, 0xff700000,
  4738. "strd%c\t%12-15r, %8-11r, [%16-19r], #%23`-%0-7W%L"},
  4739. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4740. 0xe8700000, 0xff700000,
  4741. "ldrd%c\t%12-15r, %8-11r, [%16-19r], #%23`-%0-7W%L"},
  4742. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4743. 0xf8000000, 0xff100000, "str%w%c.w\t%12-15r, %a"},
  4744. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4745. 0xf8100000, 0xfe100000, "ldr%w%c.w\t%12-15r, %a"},
  4746. /* Filter out Bcc with cond=E or F, which are used for other instructions. */
  4747. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4748. 0xf3c08000, 0xfbc0d000, "undefined (bcc, cond=0xF)"},
  4749. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4750. 0xf3808000, 0xfbc0d000, "undefined (bcc, cond=0xE)"},
  4751. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4752. 0xf0008000, 0xf800d000, "b%22-25c.w\t%b%X"},
  4753. {ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2),
  4754. 0xf0009000, 0xf800d000, "b%c.w\t%B%x"},
  4755. /* These have been 32-bit since the invention of Thumb. */
  4756. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4757. 0xf000c000, 0xf800d001, "blx%c\t%B%x"},
  4758. {ARM_FEATURE_CORE_LOW (ARM_EXT_V4T),
  4759. 0xf000d000, 0xf800d000, "bl%c\t%B%x"},
  4760. /* Fallback. */
  4761. {ARM_FEATURE_CORE_LOW (ARM_EXT_V1),
  4762. 0x00000000, 0x00000000, UNDEFINED_INSTRUCTION},
  4763. {ARM_FEATURE_CORE_LOW (0), 0, 0, 0}
  4764. };
  4765. static const char *const arm_conditional[] =
  4766. {"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
  4767. "hi", "ls", "ge", "lt", "gt", "le", "al", "<und>", ""};
  4768. static const char *const arm_fp_const[] =
  4769. {"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0"};
  4770. static const char *const arm_shift[] =
  4771. {"lsl", "lsr", "asr", "ror"};
  4772. typedef struct
  4773. {
  4774. const char *name;
  4775. const char *description;
  4776. const char *reg_names[16];
  4777. }
  4778. arm_regname;
  4779. static const arm_regname regnames[] =
  4780. {
  4781. { "reg-names-raw", N_("Select raw register names"),
  4782. { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}},
  4783. { "reg-names-gcc", N_("Select register names used by GCC"),
  4784. { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc" }},
  4785. { "reg-names-std", N_("Select register names used in ARM's ISA documentation"),
  4786. { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc" }},
  4787. { "force-thumb", N_("Assume all insns are Thumb insns"), {NULL} },
  4788. { "no-force-thumb", N_("Examine preceding label to determine an insn's type"), {NULL} },
  4789. { "reg-names-apcs", N_("Select register names used in the APCS"),
  4790. { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "sl", "fp", "ip", "sp", "lr", "pc" }},
  4791. { "reg-names-atpcs", N_("Select register names used in the ATPCS"),
  4792. { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "IP", "SP", "LR", "PC" }},
  4793. { "reg-names-special-atpcs", N_("Select special register names used in the ATPCS"),
  4794. { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "WR", "v5", "SB", "SL", "FP", "IP", "SP", "LR", "PC" }},
  4795. { "coproc<N>=(cde|generic)", N_("Enable CDE extensions for coprocessor N space"), { NULL } }
  4796. };
  4797. static const char *const iwmmxt_wwnames[] =
  4798. {"b", "h", "w", "d"};
  4799. static const char *const iwmmxt_wwssnames[] =
  4800. {"b", "bus", "bc", "bss",
  4801. "h", "hus", "hc", "hss",
  4802. "w", "wus", "wc", "wss",
  4803. "d", "dus", "dc", "dss"
  4804. };
  4805. static const char *const iwmmxt_regnames[] =
  4806. { "wr0", "wr1", "wr2", "wr3", "wr4", "wr5", "wr6", "wr7",
  4807. "wr8", "wr9", "wr10", "wr11", "wr12", "wr13", "wr14", "wr15"
  4808. };
  4809. static const char *const iwmmxt_cregnames[] =
  4810. { "wcid", "wcon", "wcssf", "wcasf", "reserved", "reserved", "reserved", "reserved",
  4811. "wcgr0", "wcgr1", "wcgr2", "wcgr3", "reserved", "reserved", "reserved", "reserved"
  4812. };
  4813. static const char *const vec_condnames[] =
  4814. { "eq", "ne", "cs", "hi", "ge", "lt", "gt", "le"
  4815. };
  4816. static const char *const mve_predicatenames[] =
  4817. { "", "ttt", "tt", "tte", "t", "tee", "te", "tet", "",
  4818. "eee", "ee", "eet", "e", "ett", "et", "ete"
  4819. };
  4820. /* Names for 2-bit size field for mve vector isntructions. */
  4821. static const char *const mve_vec_sizename[] =
  4822. { "8", "16", "32", "64"};
  4823. /* Indicates whether we are processing a then predicate,
  4824. else predicate or none at all. */
  4825. enum vpt_pred_state
  4826. {
  4827. PRED_NONE,
  4828. PRED_THEN,
  4829. PRED_ELSE
  4830. };
  4831. /* Information used to process a vpt block and subsequent instructions. */
  4832. struct vpt_block
  4833. {
  4834. /* Are we in a vpt block. */
  4835. bool in_vpt_block;
  4836. /* Next predicate state if in vpt block. */
  4837. enum vpt_pred_state next_pred_state;
  4838. /* Mask from vpt/vpst instruction. */
  4839. long predicate_mask;
  4840. /* Instruction number in vpt block. */
  4841. long current_insn_num;
  4842. /* Number of instructions in vpt block.. */
  4843. long num_pred_insn;
  4844. };
  4845. static struct vpt_block vpt_block_state =
  4846. {
  4847. false,
  4848. PRED_NONE,
  4849. 0,
  4850. 0,
  4851. 0
  4852. };
  4853. /* Default to GCC register name set. */
  4854. static unsigned int regname_selected = 1;
  4855. #define NUM_ARM_OPTIONS ARRAY_SIZE (regnames)
  4856. #define arm_regnames regnames[regname_selected].reg_names
  4857. static bool force_thumb = false;
  4858. static uint16_t cde_coprocs = 0;
  4859. /* Current IT instruction state. This contains the same state as the IT
  4860. bits in the CPSR. */
  4861. static unsigned int ifthen_state;
  4862. /* IT state for the next instruction. */
  4863. static unsigned int ifthen_next_state;
  4864. /* The address of the insn for which the IT state is valid. */
  4865. static bfd_vma ifthen_address;
  4866. #define IFTHEN_COND ((ifthen_state >> 4) & 0xf)
  4867. /* Indicates that the current Conditional state is unconditional or outside
  4868. an IT block. */
  4869. #define COND_UNCOND 16
  4870. /* Functions. */
  4871. /* Extract the predicate mask for a VPT or VPST instruction.
  4872. The mask is composed of bits 13-15 (Mkl) and bit 22 (Mkh). */
  4873. static long
  4874. mve_extract_pred_mask (long given)
  4875. {
  4876. return ((given & 0x00400000) >> 19) | ((given & 0xe000) >> 13);
  4877. }
  4878. /* Return the number of instructions in a MVE predicate block. */
  4879. static long
  4880. num_instructions_vpt_block (long given)
  4881. {
  4882. long mask = mve_extract_pred_mask (given);
  4883. if (mask == 0)
  4884. return 0;
  4885. if (mask == 8)
  4886. return 1;
  4887. if ((mask & 7) == 4)
  4888. return 2;
  4889. if ((mask & 3) == 2)
  4890. return 3;
  4891. if ((mask & 1) == 1)
  4892. return 4;
  4893. return 0;
  4894. }
  4895. static void
  4896. mark_outside_vpt_block (void)
  4897. {
  4898. vpt_block_state.in_vpt_block = false;
  4899. vpt_block_state.next_pred_state = PRED_NONE;
  4900. vpt_block_state.predicate_mask = 0;
  4901. vpt_block_state.current_insn_num = 0;
  4902. vpt_block_state.num_pred_insn = 0;
  4903. }
  4904. static void
  4905. mark_inside_vpt_block (long given)
  4906. {
  4907. vpt_block_state.in_vpt_block = true;
  4908. vpt_block_state.next_pred_state = PRED_THEN;
  4909. vpt_block_state.predicate_mask = mve_extract_pred_mask (given);
  4910. vpt_block_state.current_insn_num = 0;
  4911. vpt_block_state.num_pred_insn = num_instructions_vpt_block (given);
  4912. assert (vpt_block_state.num_pred_insn >= 1);
  4913. }
  4914. static enum vpt_pred_state
  4915. invert_next_predicate_state (enum vpt_pred_state astate)
  4916. {
  4917. if (astate == PRED_THEN)
  4918. return PRED_ELSE;
  4919. else if (astate == PRED_ELSE)
  4920. return PRED_THEN;
  4921. else
  4922. return PRED_NONE;
  4923. }
  4924. static enum vpt_pred_state
  4925. update_next_predicate_state (void)
  4926. {
  4927. long pred_mask = vpt_block_state.predicate_mask;
  4928. long mask_for_insn = 0;
  4929. switch (vpt_block_state.current_insn_num)
  4930. {
  4931. case 1:
  4932. mask_for_insn = 8;
  4933. break;
  4934. case 2:
  4935. mask_for_insn = 4;
  4936. break;
  4937. case 3:
  4938. mask_for_insn = 2;
  4939. break;
  4940. case 4:
  4941. return PRED_NONE;
  4942. }
  4943. if (pred_mask & mask_for_insn)
  4944. return invert_next_predicate_state (vpt_block_state.next_pred_state);
  4945. else
  4946. return vpt_block_state.next_pred_state;
  4947. }
  4948. static void
  4949. update_vpt_block_state (void)
  4950. {
  4951. vpt_block_state.current_insn_num++;
  4952. if (vpt_block_state.current_insn_num == vpt_block_state.num_pred_insn)
  4953. {
  4954. /* No more instructions to process in vpt block. */
  4955. mark_outside_vpt_block ();
  4956. return;
  4957. }
  4958. vpt_block_state.next_pred_state = update_next_predicate_state ();
  4959. }
  4960. /* Decode a bitfield of the form matching regexp (N(-N)?,)*N(-N)?.
  4961. Returns pointer to following character of the format string and
  4962. fills in *VALUEP and *WIDTHP with the extracted value and number of
  4963. bits extracted. WIDTHP can be NULL. */
  4964. static const char *
  4965. arm_decode_bitfield (const char *ptr,
  4966. unsigned long insn,
  4967. unsigned long *valuep,
  4968. int *widthp)
  4969. {
  4970. unsigned long value = 0;
  4971. int width = 0;
  4972. do
  4973. {
  4974. int start, end;
  4975. int bits;
  4976. for (start = 0; *ptr >= '0' && *ptr <= '9'; ptr++)
  4977. start = start * 10 + *ptr - '0';
  4978. if (*ptr == '-')
  4979. for (end = 0, ptr++; *ptr >= '0' && *ptr <= '9'; ptr++)
  4980. end = end * 10 + *ptr - '0';
  4981. else
  4982. end = start;
  4983. bits = end - start;
  4984. if (bits < 0)
  4985. abort ();
  4986. value |= ((insn >> start) & ((2ul << bits) - 1)) << width;
  4987. width += bits + 1;
  4988. }
  4989. while (*ptr++ == ',');
  4990. *valuep = value;
  4991. if (widthp)
  4992. *widthp = width;
  4993. return ptr - 1;
  4994. }
  4995. static void
  4996. arm_decode_shift (long given, fprintf_ftype func, void *stream,
  4997. bool print_shift)
  4998. {
  4999. func (stream, "%s", arm_regnames[given & 0xf]);
  5000. if ((given & 0xff0) != 0)
  5001. {
  5002. if ((given & 0x10) == 0)
  5003. {
  5004. int amount = (given & 0xf80) >> 7;
  5005. int shift = (given & 0x60) >> 5;
  5006. if (amount == 0)
  5007. {
  5008. if (shift == 3)
  5009. {
  5010. func (stream, ", rrx");
  5011. return;
  5012. }
  5013. amount = 32;
  5014. }
  5015. if (print_shift)
  5016. func (stream, ", %s #%d", arm_shift[shift], amount);
  5017. else
  5018. func (stream, ", #%d", amount);
  5019. }
  5020. else if ((given & 0x80) == 0x80)
  5021. func (stream, "\t; <illegal shifter operand>");
  5022. else if (print_shift)
  5023. func (stream, ", %s %s", arm_shift[(given & 0x60) >> 5],
  5024. arm_regnames[(given & 0xf00) >> 8]);
  5025. else
  5026. func (stream, ", %s", arm_regnames[(given & 0xf00) >> 8]);
  5027. }
  5028. }
  5029. /* Return TRUE if the MATCHED_INSN can be inside an IT block. */
  5030. static bool
  5031. is_mve_okay_in_it (enum mve_instructions matched_insn)
  5032. {
  5033. switch (matched_insn)
  5034. {
  5035. case MVE_VMOV_GP_TO_VEC_LANE:
  5036. case MVE_VMOV2_VEC_LANE_TO_GP:
  5037. case MVE_VMOV2_GP_TO_VEC_LANE:
  5038. case MVE_VMOV_VEC_LANE_TO_GP:
  5039. case MVE_LSLL:
  5040. case MVE_LSLLI:
  5041. case MVE_LSRL:
  5042. case MVE_ASRL:
  5043. case MVE_ASRLI:
  5044. case MVE_SQRSHRL:
  5045. case MVE_SQRSHR:
  5046. case MVE_UQRSHL:
  5047. case MVE_UQRSHLL:
  5048. case MVE_UQSHL:
  5049. case MVE_UQSHLL:
  5050. case MVE_URSHRL:
  5051. case MVE_URSHR:
  5052. case MVE_SRSHRL:
  5053. case MVE_SRSHR:
  5054. case MVE_SQSHLL:
  5055. case MVE_SQSHL:
  5056. return true;
  5057. default:
  5058. return false;
  5059. }
  5060. }
  5061. static bool
  5062. is_mve_architecture (struct disassemble_info *info)
  5063. {
  5064. struct arm_private_data *private_data = info->private_data;
  5065. arm_feature_set allowed_arches = private_data->features;
  5066. arm_feature_set arm_ext_v8_1m_main
  5067. = ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
  5068. if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
  5069. && !ARM_CPU_IS_ANY (allowed_arches))
  5070. return true;
  5071. else
  5072. return false;
  5073. }
  5074. static bool
  5075. is_vpt_instruction (long given)
  5076. {
  5077. /* If mkh:mkl is '0000' then its not a vpt/vpst instruction. */
  5078. if ((given & 0x0040e000) == 0)
  5079. return false;
  5080. /* VPT floating point T1 variant. */
  5081. if (((given & 0xefb10f50) == 0xee310f00 && ((given & 0x1001) != 0x1))
  5082. /* VPT floating point T2 variant. */
  5083. || ((given & 0xefb10f50) == 0xee310f40)
  5084. /* VPT vector T1 variant. */
  5085. || ((given & 0xff811f51) == 0xfe010f00)
  5086. /* VPT vector T2 variant. */
  5087. || ((given & 0xff811f51) == 0xfe010f01
  5088. && ((given & 0x300000) != 0x300000))
  5089. /* VPT vector T3 variant. */
  5090. || ((given & 0xff811f50) == 0xfe011f00)
  5091. /* VPT vector T4 variant. */
  5092. || ((given & 0xff811f70) == 0xfe010f40)
  5093. /* VPT vector T5 variant. */
  5094. || ((given & 0xff811f70) == 0xfe010f60)
  5095. /* VPT vector T6 variant. */
  5096. || ((given & 0xff811f50) == 0xfe011f40)
  5097. /* VPST vector T variant. */
  5098. || ((given & 0xffbf1fff) == 0xfe310f4d))
  5099. return true;
  5100. else
  5101. return false;
  5102. }
  5103. /* Decode a bitfield from opcode GIVEN, with starting bitfield = START
  5104. and ending bitfield = END. END must be greater than START. */
  5105. static unsigned long
  5106. arm_decode_field (unsigned long given, unsigned int start, unsigned int end)
  5107. {
  5108. int bits = end - start;
  5109. if (bits < 0)
  5110. abort ();
  5111. return ((given >> start) & ((2ul << bits) - 1));
  5112. }
  5113. /* Decode a bitfield from opcode GIVEN, with multiple bitfields:
  5114. START:END and START2:END2. END/END2 must be greater than
  5115. START/START2. */
  5116. static unsigned long
  5117. arm_decode_field_multiple (unsigned long given, unsigned int start,
  5118. unsigned int end, unsigned int start2,
  5119. unsigned int end2)
  5120. {
  5121. int bits = end - start;
  5122. int bits2 = end2 - start2;
  5123. unsigned long value = 0;
  5124. int width = 0;
  5125. if (bits2 < 0)
  5126. abort ();
  5127. value = arm_decode_field (given, start, end);
  5128. width += bits + 1;
  5129. value |= ((given >> start2) & ((2ul << bits2) - 1)) << width;
  5130. return value;
  5131. }
  5132. /* Return TRUE if the GIVEN encoding should not be decoded as MATCHED_INSN.
  5133. This helps us decode instructions that change mnemonic depending on specific
  5134. operand values/encodings. */
  5135. static bool
  5136. is_mve_encoding_conflict (unsigned long given,
  5137. enum mve_instructions matched_insn)
  5138. {
  5139. switch (matched_insn)
  5140. {
  5141. case MVE_VPST:
  5142. if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
  5143. return true;
  5144. else
  5145. return false;
  5146. case MVE_VPT_FP_T1:
  5147. if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
  5148. return true;
  5149. if ((arm_decode_field (given, 12, 12) == 0)
  5150. && (arm_decode_field (given, 0, 0) == 1))
  5151. return true;
  5152. return false;
  5153. case MVE_VPT_FP_T2:
  5154. if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
  5155. return true;
  5156. if (arm_decode_field (given, 0, 3) == 0xd)
  5157. return true;
  5158. return false;
  5159. case MVE_VPT_VEC_T1:
  5160. case MVE_VPT_VEC_T2:
  5161. case MVE_VPT_VEC_T3:
  5162. case MVE_VPT_VEC_T4:
  5163. case MVE_VPT_VEC_T5:
  5164. case MVE_VPT_VEC_T6:
  5165. if (arm_decode_field_multiple (given, 13, 15, 22, 22) == 0)
  5166. return true;
  5167. if (arm_decode_field (given, 20, 21) == 3)
  5168. return true;
  5169. return false;
  5170. case MVE_VCMP_FP_T1:
  5171. if ((arm_decode_field (given, 12, 12) == 0)
  5172. && (arm_decode_field (given, 0, 0) == 1))
  5173. return true;
  5174. else
  5175. return false;
  5176. case MVE_VCMP_FP_T2:
  5177. if (arm_decode_field (given, 0, 3) == 0xd)
  5178. return true;
  5179. else
  5180. return false;
  5181. case MVE_VQADD_T2:
  5182. case MVE_VQSUB_T2:
  5183. case MVE_VMUL_VEC_T2:
  5184. case MVE_VMULH:
  5185. case MVE_VRMULH:
  5186. case MVE_VMLA:
  5187. case MVE_VMAX:
  5188. case MVE_VMIN:
  5189. case MVE_VBRSR:
  5190. case MVE_VADD_VEC_T2:
  5191. case MVE_VSUB_VEC_T2:
  5192. case MVE_VABAV:
  5193. case MVE_VQRSHL_T1:
  5194. case MVE_VQSHL_T4:
  5195. case MVE_VRSHL_T1:
  5196. case MVE_VSHL_T3:
  5197. case MVE_VCADD_VEC:
  5198. case MVE_VHCADD:
  5199. case MVE_VDDUP:
  5200. case MVE_VIDUP:
  5201. case MVE_VQRDMLADH:
  5202. case MVE_VQDMLAH:
  5203. case MVE_VQRDMLAH:
  5204. case MVE_VQDMLASH:
  5205. case MVE_VQRDMLASH:
  5206. case MVE_VQDMLSDH:
  5207. case MVE_VQRDMLSDH:
  5208. case MVE_VQDMULH_T3:
  5209. case MVE_VQRDMULH_T4:
  5210. case MVE_VQDMLADH:
  5211. case MVE_VMLAS:
  5212. case MVE_VMULL_INT:
  5213. case MVE_VHADD_T2:
  5214. case MVE_VHSUB_T2:
  5215. case MVE_VCMP_VEC_T1:
  5216. case MVE_VCMP_VEC_T2:
  5217. case MVE_VCMP_VEC_T3:
  5218. case MVE_VCMP_VEC_T4:
  5219. case MVE_VCMP_VEC_T5:
  5220. case MVE_VCMP_VEC_T6:
  5221. if (arm_decode_field (given, 20, 21) == 3)
  5222. return true;
  5223. else
  5224. return false;
  5225. case MVE_VLD2:
  5226. case MVE_VLD4:
  5227. case MVE_VST2:
  5228. case MVE_VST4:
  5229. if (arm_decode_field (given, 7, 8) == 3)
  5230. return true;
  5231. else
  5232. return false;
  5233. case MVE_VSTRB_T1:
  5234. case MVE_VSTRH_T2:
  5235. if ((arm_decode_field (given, 24, 24) == 0)
  5236. && (arm_decode_field (given, 21, 21) == 0))
  5237. {
  5238. return true;
  5239. }
  5240. else if ((arm_decode_field (given, 7, 8) == 3))
  5241. return true;
  5242. else
  5243. return false;
  5244. case MVE_VLDRB_T1:
  5245. case MVE_VLDRH_T2:
  5246. case MVE_VLDRW_T7:
  5247. case MVE_VSTRB_T5:
  5248. case MVE_VSTRH_T6:
  5249. case MVE_VSTRW_T7:
  5250. if ((arm_decode_field (given, 24, 24) == 0)
  5251. && (arm_decode_field (given, 21, 21) == 0))
  5252. {
  5253. return true;
  5254. }
  5255. else
  5256. return false;
  5257. case MVE_VCVT_FP_FIX_VEC:
  5258. return (arm_decode_field (given, 16, 21) & 0x38) == 0;
  5259. case MVE_VBIC_IMM:
  5260. case MVE_VORR_IMM:
  5261. {
  5262. unsigned long cmode = arm_decode_field (given, 8, 11);
  5263. if ((cmode & 1) == 0)
  5264. return true;
  5265. else if ((cmode & 0xc) == 0xc)
  5266. return true;
  5267. else
  5268. return false;
  5269. }
  5270. case MVE_VMVN_IMM:
  5271. {
  5272. unsigned long cmode = arm_decode_field (given, 8, 11);
  5273. if (cmode == 0xe)
  5274. return true;
  5275. else if ((cmode & 0x9) == 1)
  5276. return true;
  5277. else if ((cmode & 0xd) == 9)
  5278. return true;
  5279. else
  5280. return false;
  5281. }
  5282. case MVE_VMOV_IMM_TO_VEC:
  5283. if ((arm_decode_field (given, 5, 5) == 1)
  5284. && (arm_decode_field (given, 8, 11) != 0xe))
  5285. return true;
  5286. else
  5287. return false;
  5288. case MVE_VMOVL:
  5289. {
  5290. unsigned long size = arm_decode_field (given, 19, 20);
  5291. if ((size == 0) || (size == 3))
  5292. return true;
  5293. else
  5294. return false;
  5295. }
  5296. case MVE_VMAXA:
  5297. case MVE_VMINA:
  5298. case MVE_VMAXV:
  5299. case MVE_VMAXAV:
  5300. case MVE_VMINV:
  5301. case MVE_VMINAV:
  5302. case MVE_VQRSHL_T2:
  5303. case MVE_VQSHL_T1:
  5304. case MVE_VRSHL_T2:
  5305. case MVE_VSHL_T2:
  5306. case MVE_VSHLL_T2:
  5307. case MVE_VADDV:
  5308. case MVE_VMOVN:
  5309. case MVE_VQMOVUN:
  5310. case MVE_VQMOVN:
  5311. if (arm_decode_field (given, 18, 19) == 3)
  5312. return true;
  5313. else
  5314. return false;
  5315. case MVE_VMLSLDAV:
  5316. case MVE_VRMLSLDAVH:
  5317. case MVE_VMLALDAV:
  5318. case MVE_VADDLV:
  5319. if (arm_decode_field (given, 20, 22) == 7)
  5320. return true;
  5321. else
  5322. return false;
  5323. case MVE_VRMLALDAVH:
  5324. if ((arm_decode_field (given, 20, 22) & 6) == 6)
  5325. return true;
  5326. else
  5327. return false;
  5328. case MVE_VDWDUP:
  5329. case MVE_VIWDUP:
  5330. if ((arm_decode_field (given, 20, 21) == 3)
  5331. || (arm_decode_field (given, 1, 3) == 7))
  5332. return true;
  5333. else
  5334. return false;
  5335. case MVE_VSHLL_T1:
  5336. if (arm_decode_field (given, 16, 18) == 0)
  5337. {
  5338. unsigned long sz = arm_decode_field (given, 19, 20);
  5339. if ((sz == 1) || (sz == 2))
  5340. return true;
  5341. else
  5342. return false;
  5343. }
  5344. else
  5345. return false;
  5346. case MVE_VQSHL_T2:
  5347. case MVE_VQSHLU_T3:
  5348. case MVE_VRSHR:
  5349. case MVE_VSHL_T1:
  5350. case MVE_VSHR:
  5351. case MVE_VSLI:
  5352. case MVE_VSRI:
  5353. if (arm_decode_field (given, 19, 21) == 0)
  5354. return true;
  5355. else
  5356. return false;
  5357. case MVE_VCTP:
  5358. if (arm_decode_field (given, 16, 19) == 0xf)
  5359. return true;
  5360. else
  5361. return false;
  5362. case MVE_ASRLI:
  5363. case MVE_ASRL:
  5364. case MVE_LSLLI:
  5365. case MVE_LSLL:
  5366. case MVE_LSRL:
  5367. case MVE_SQRSHRL:
  5368. case MVE_SQSHLL:
  5369. case MVE_SRSHRL:
  5370. case MVE_UQRSHLL:
  5371. case MVE_UQSHLL:
  5372. case MVE_URSHRL:
  5373. if (arm_decode_field (given, 9, 11) == 0x7)
  5374. return true;
  5375. else
  5376. return false;
  5377. case MVE_CSINC:
  5378. case MVE_CSINV:
  5379. {
  5380. unsigned long rm, rn;
  5381. rm = arm_decode_field (given, 0, 3);
  5382. rn = arm_decode_field (given, 16, 19);
  5383. /* CSET/CSETM. */
  5384. if (rm == 0xf && rn == 0xf)
  5385. return true;
  5386. /* CINC/CINV. */
  5387. else if (rn == rm && rn != 0xf)
  5388. return true;
  5389. }
  5390. /* Fall through. */
  5391. case MVE_CSEL:
  5392. case MVE_CSNEG:
  5393. if (arm_decode_field (given, 0, 3) == 0xd)
  5394. return true;
  5395. /* CNEG. */
  5396. else if (matched_insn == MVE_CSNEG)
  5397. if (arm_decode_field (given, 0, 3) == arm_decode_field (given, 16, 19))
  5398. return true;
  5399. return false;
  5400. default:
  5401. case MVE_VADD_FP_T1:
  5402. case MVE_VADD_FP_T2:
  5403. case MVE_VADD_VEC_T1:
  5404. return false;
  5405. }
  5406. }
  5407. static void
  5408. print_mve_vld_str_addr (struct disassemble_info *info,
  5409. unsigned long given,
  5410. enum mve_instructions matched_insn)
  5411. {
  5412. void *stream = info->stream;
  5413. fprintf_ftype func = info->fprintf_func;
  5414. unsigned long p, w, gpr, imm, add, mod_imm;
  5415. imm = arm_decode_field (given, 0, 6);
  5416. mod_imm = imm;
  5417. switch (matched_insn)
  5418. {
  5419. case MVE_VLDRB_T1:
  5420. case MVE_VSTRB_T1:
  5421. gpr = arm_decode_field (given, 16, 18);
  5422. break;
  5423. case MVE_VLDRH_T2:
  5424. case MVE_VSTRH_T2:
  5425. gpr = arm_decode_field (given, 16, 18);
  5426. mod_imm = imm << 1;
  5427. break;
  5428. case MVE_VLDRH_T6:
  5429. case MVE_VSTRH_T6:
  5430. gpr = arm_decode_field (given, 16, 19);
  5431. mod_imm = imm << 1;
  5432. break;
  5433. case MVE_VLDRW_T7:
  5434. case MVE_VSTRW_T7:
  5435. gpr = arm_decode_field (given, 16, 19);
  5436. mod_imm = imm << 2;
  5437. break;
  5438. case MVE_VLDRB_T5:
  5439. case MVE_VSTRB_T5:
  5440. gpr = arm_decode_field (given, 16, 19);
  5441. break;
  5442. default:
  5443. return;
  5444. }
  5445. p = arm_decode_field (given, 24, 24);
  5446. w = arm_decode_field (given, 21, 21);
  5447. add = arm_decode_field (given, 23, 23);
  5448. char * add_sub;
  5449. /* Don't print anything for '+' as it is implied. */
  5450. if (add == 1)
  5451. add_sub = "";
  5452. else
  5453. add_sub = "-";
  5454. if (p == 1)
  5455. {
  5456. /* Offset mode. */
  5457. if (w == 0)
  5458. func (stream, "[%s, #%s%lu]", arm_regnames[gpr], add_sub, mod_imm);
  5459. /* Pre-indexed mode. */
  5460. else
  5461. func (stream, "[%s, #%s%lu]!", arm_regnames[gpr], add_sub, mod_imm);
  5462. }
  5463. else if ((p == 0) && (w == 1))
  5464. /* Post-index mode. */
  5465. func (stream, "[%s], #%s%lu", arm_regnames[gpr], add_sub, mod_imm);
  5466. }
  5467. /* Return FALSE if GIVEN is not an undefined encoding for MATCHED_INSN.
  5468. Otherwise, return TRUE and set UNDEFINED_CODE to give a reason as to why
  5469. this encoding is undefined. */
  5470. static bool
  5471. is_mve_undefined (unsigned long given, enum mve_instructions matched_insn,
  5472. enum mve_undefined *undefined_code)
  5473. {
  5474. *undefined_code = UNDEF_NONE;
  5475. switch (matched_insn)
  5476. {
  5477. case MVE_VDUP:
  5478. if (arm_decode_field_multiple (given, 5, 5, 22, 22) == 3)
  5479. {
  5480. *undefined_code = UNDEF_SIZE_3;
  5481. return true;
  5482. }
  5483. else
  5484. return false;
  5485. case MVE_VQADD_T1:
  5486. case MVE_VQSUB_T1:
  5487. case MVE_VMUL_VEC_T1:
  5488. case MVE_VABD_VEC:
  5489. case MVE_VADD_VEC_T1:
  5490. case MVE_VSUB_VEC_T1:
  5491. case MVE_VQDMULH_T1:
  5492. case MVE_VQRDMULH_T2:
  5493. case MVE_VRHADD:
  5494. case MVE_VHADD_T1:
  5495. case MVE_VHSUB_T1:
  5496. if (arm_decode_field (given, 20, 21) == 3)
  5497. {
  5498. *undefined_code = UNDEF_SIZE_3;
  5499. return true;
  5500. }
  5501. else
  5502. return false;
  5503. case MVE_VLDRB_T1:
  5504. if (arm_decode_field (given, 7, 8) == 3)
  5505. {
  5506. *undefined_code = UNDEF_SIZE_3;
  5507. return true;
  5508. }
  5509. else
  5510. return false;
  5511. case MVE_VLDRH_T2:
  5512. if (arm_decode_field (given, 7, 8) <= 1)
  5513. {
  5514. *undefined_code = UNDEF_SIZE_LE_1;
  5515. return true;
  5516. }
  5517. else
  5518. return false;
  5519. case MVE_VSTRB_T1:
  5520. if ((arm_decode_field (given, 7, 8) == 0))
  5521. {
  5522. *undefined_code = UNDEF_SIZE_0;
  5523. return true;
  5524. }
  5525. else
  5526. return false;
  5527. case MVE_VSTRH_T2:
  5528. if ((arm_decode_field (given, 7, 8) <= 1))
  5529. {
  5530. *undefined_code = UNDEF_SIZE_LE_1;
  5531. return true;
  5532. }
  5533. else
  5534. return false;
  5535. case MVE_VLDRB_GATHER_T1:
  5536. if (arm_decode_field (given, 7, 8) == 3)
  5537. {
  5538. *undefined_code = UNDEF_SIZE_3;
  5539. return true;
  5540. }
  5541. else if ((arm_decode_field (given, 28, 28) == 0)
  5542. && (arm_decode_field (given, 7, 8) == 0))
  5543. {
  5544. *undefined_code = UNDEF_NOT_UNS_SIZE_0;
  5545. return true;
  5546. }
  5547. else
  5548. return false;
  5549. case MVE_VLDRH_GATHER_T2:
  5550. if (arm_decode_field (given, 7, 8) == 3)
  5551. {
  5552. *undefined_code = UNDEF_SIZE_3;
  5553. return true;
  5554. }
  5555. else if ((arm_decode_field (given, 28, 28) == 0)
  5556. && (arm_decode_field (given, 7, 8) == 1))
  5557. {
  5558. *undefined_code = UNDEF_NOT_UNS_SIZE_1;
  5559. return true;
  5560. }
  5561. else if (arm_decode_field (given, 7, 8) == 0)
  5562. {
  5563. *undefined_code = UNDEF_SIZE_0;
  5564. return true;
  5565. }
  5566. else
  5567. return false;
  5568. case MVE_VLDRW_GATHER_T3:
  5569. if (arm_decode_field (given, 7, 8) != 2)
  5570. {
  5571. *undefined_code = UNDEF_SIZE_NOT_2;
  5572. return true;
  5573. }
  5574. else if (arm_decode_field (given, 28, 28) == 0)
  5575. {
  5576. *undefined_code = UNDEF_NOT_UNSIGNED;
  5577. return true;
  5578. }
  5579. else
  5580. return false;
  5581. case MVE_VLDRD_GATHER_T4:
  5582. if (arm_decode_field (given, 7, 8) != 3)
  5583. {
  5584. *undefined_code = UNDEF_SIZE_NOT_3;
  5585. return true;
  5586. }
  5587. else if (arm_decode_field (given, 28, 28) == 0)
  5588. {
  5589. *undefined_code = UNDEF_NOT_UNSIGNED;
  5590. return true;
  5591. }
  5592. else
  5593. return false;
  5594. case MVE_VSTRB_SCATTER_T1:
  5595. if (arm_decode_field (given, 7, 8) == 3)
  5596. {
  5597. *undefined_code = UNDEF_SIZE_3;
  5598. return true;
  5599. }
  5600. else
  5601. return false;
  5602. case MVE_VSTRH_SCATTER_T2:
  5603. {
  5604. unsigned long size = arm_decode_field (given, 7, 8);
  5605. if (size == 3)
  5606. {
  5607. *undefined_code = UNDEF_SIZE_3;
  5608. return true;
  5609. }
  5610. else if (size == 0)
  5611. {
  5612. *undefined_code = UNDEF_SIZE_0;
  5613. return true;
  5614. }
  5615. else
  5616. return false;
  5617. }
  5618. case MVE_VSTRW_SCATTER_T3:
  5619. if (arm_decode_field (given, 7, 8) != 2)
  5620. {
  5621. *undefined_code = UNDEF_SIZE_NOT_2;
  5622. return true;
  5623. }
  5624. else
  5625. return false;
  5626. case MVE_VSTRD_SCATTER_T4:
  5627. if (arm_decode_field (given, 7, 8) != 3)
  5628. {
  5629. *undefined_code = UNDEF_SIZE_NOT_3;
  5630. return true;
  5631. }
  5632. else
  5633. return false;
  5634. case MVE_VCVT_FP_FIX_VEC:
  5635. {
  5636. unsigned long imm6 = arm_decode_field (given, 16, 21);
  5637. if ((imm6 & 0x20) == 0)
  5638. {
  5639. *undefined_code = UNDEF_VCVT_IMM6;
  5640. return true;
  5641. }
  5642. if ((arm_decode_field (given, 9, 9) == 0)
  5643. && ((imm6 & 0x30) == 0x20))
  5644. {
  5645. *undefined_code = UNDEF_VCVT_FSI_IMM6;
  5646. return true;
  5647. }
  5648. return false;
  5649. }
  5650. case MVE_VNEG_FP:
  5651. case MVE_VABS_FP:
  5652. case MVE_VCVT_BETWEEN_FP_INT:
  5653. case MVE_VCVT_FROM_FP_TO_INT:
  5654. {
  5655. unsigned long size = arm_decode_field (given, 18, 19);
  5656. if (size == 0)
  5657. {
  5658. *undefined_code = UNDEF_SIZE_0;
  5659. return true;
  5660. }
  5661. else if (size == 3)
  5662. {
  5663. *undefined_code = UNDEF_SIZE_3;
  5664. return true;
  5665. }
  5666. else
  5667. return false;
  5668. }
  5669. case MVE_VMOV_VEC_LANE_TO_GP:
  5670. {
  5671. unsigned long op1 = arm_decode_field (given, 21, 22);
  5672. unsigned long op2 = arm_decode_field (given, 5, 6);
  5673. unsigned long u = arm_decode_field (given, 23, 23);
  5674. if ((op2 == 0) && (u == 1))
  5675. {
  5676. if ((op1 == 0) || (op1 == 1))
  5677. {
  5678. *undefined_code = UNDEF_BAD_U_OP1_OP2;
  5679. return true;
  5680. }
  5681. else
  5682. return false;
  5683. }
  5684. else if (op2 == 2)
  5685. {
  5686. if ((op1 == 0) || (op1 == 1))
  5687. {
  5688. *undefined_code = UNDEF_BAD_OP1_OP2;
  5689. return true;
  5690. }
  5691. else
  5692. return false;
  5693. }
  5694. return false;
  5695. }
  5696. case MVE_VMOV_GP_TO_VEC_LANE:
  5697. if (arm_decode_field (given, 5, 6) == 2)
  5698. {
  5699. unsigned long op1 = arm_decode_field (given, 21, 22);
  5700. if ((op1 == 0) || (op1 == 1))
  5701. {
  5702. *undefined_code = UNDEF_BAD_OP1_OP2;
  5703. return true;
  5704. }
  5705. else
  5706. return false;
  5707. }
  5708. else
  5709. return false;
  5710. case MVE_VMOV_VEC_TO_VEC:
  5711. if ((arm_decode_field (given, 5, 5) == 1)
  5712. || (arm_decode_field (given, 22, 22) == 1))
  5713. return true;
  5714. return false;
  5715. case MVE_VMOV_IMM_TO_VEC:
  5716. if (arm_decode_field (given, 5, 5) == 0)
  5717. {
  5718. unsigned long cmode = arm_decode_field (given, 8, 11);
  5719. if (((cmode & 9) == 1) || ((cmode & 5) == 1))
  5720. {
  5721. *undefined_code = UNDEF_OP_0_BAD_CMODE;
  5722. return true;
  5723. }
  5724. else
  5725. return false;
  5726. }
  5727. else
  5728. return false;
  5729. case MVE_VSHLL_T2:
  5730. case MVE_VMOVN:
  5731. if (arm_decode_field (given, 18, 19) == 2)
  5732. {
  5733. *undefined_code = UNDEF_SIZE_2;
  5734. return true;
  5735. }
  5736. else
  5737. return false;
  5738. case MVE_VRMLALDAVH:
  5739. case MVE_VMLADAV_T1:
  5740. case MVE_VMLADAV_T2:
  5741. case MVE_VMLALDAV:
  5742. if ((arm_decode_field (given, 28, 28) == 1)
  5743. && (arm_decode_field (given, 12, 12) == 1))
  5744. {
  5745. *undefined_code = UNDEF_XCHG_UNS;
  5746. return true;
  5747. }
  5748. else
  5749. return false;
  5750. case MVE_VQSHRN:
  5751. case MVE_VQSHRUN:
  5752. case MVE_VSHLL_T1:
  5753. case MVE_VSHRN:
  5754. {
  5755. unsigned long sz = arm_decode_field (given, 19, 20);
  5756. if (sz == 1)
  5757. return false;
  5758. else if ((sz & 2) == 2)
  5759. return false;
  5760. else
  5761. {
  5762. *undefined_code = UNDEF_SIZE;
  5763. return true;
  5764. }
  5765. }
  5766. break;
  5767. case MVE_VQSHL_T2:
  5768. case MVE_VQSHLU_T3:
  5769. case MVE_VRSHR:
  5770. case MVE_VSHL_T1:
  5771. case MVE_VSHR:
  5772. case MVE_VSLI:
  5773. case MVE_VSRI:
  5774. {
  5775. unsigned long sz = arm_decode_field (given, 19, 21);
  5776. if ((sz & 7) == 1)
  5777. return false;
  5778. else if ((sz & 6) == 2)
  5779. return false;
  5780. else if ((sz & 4) == 4)
  5781. return false;
  5782. else
  5783. {
  5784. *undefined_code = UNDEF_SIZE;
  5785. return true;
  5786. }
  5787. }
  5788. case MVE_VQRSHRN:
  5789. case MVE_VQRSHRUN:
  5790. if (arm_decode_field (given, 19, 20) == 0)
  5791. {
  5792. *undefined_code = UNDEF_SIZE_0;
  5793. return true;
  5794. }
  5795. else
  5796. return false;
  5797. case MVE_VABS_VEC:
  5798. if (arm_decode_field (given, 18, 19) == 3)
  5799. {
  5800. *undefined_code = UNDEF_SIZE_3;
  5801. return true;
  5802. }
  5803. else
  5804. return false;
  5805. case MVE_VQNEG:
  5806. case MVE_VQABS:
  5807. case MVE_VNEG_VEC:
  5808. case MVE_VCLS:
  5809. case MVE_VCLZ:
  5810. if (arm_decode_field (given, 18, 19) == 3)
  5811. {
  5812. *undefined_code = UNDEF_SIZE_3;
  5813. return true;
  5814. }
  5815. else
  5816. return false;
  5817. case MVE_VREV16:
  5818. if (arm_decode_field (given, 18, 19) == 0)
  5819. return false;
  5820. else
  5821. {
  5822. *undefined_code = UNDEF_SIZE_NOT_0;
  5823. return true;
  5824. }
  5825. case MVE_VREV32:
  5826. {
  5827. unsigned long size = arm_decode_field (given, 18, 19);
  5828. if ((size & 2) == 2)
  5829. {
  5830. *undefined_code = UNDEF_SIZE_2;
  5831. return true;
  5832. }
  5833. else
  5834. return false;
  5835. }
  5836. case MVE_VREV64:
  5837. if (arm_decode_field (given, 18, 19) != 3)
  5838. return false;
  5839. else
  5840. {
  5841. *undefined_code = UNDEF_SIZE_3;
  5842. return true;
  5843. }
  5844. default:
  5845. return false;
  5846. }
  5847. }
  5848. /* Return FALSE if GIVEN is not an unpredictable encoding for MATCHED_INSN.
  5849. Otherwise, return TRUE and set UNPREDICTABLE_CODE to give a reason as to
  5850. why this encoding is unpredictable. */
  5851. static bool
  5852. is_mve_unpredictable (unsigned long given, enum mve_instructions matched_insn,
  5853. enum mve_unpredictable *unpredictable_code)
  5854. {
  5855. *unpredictable_code = UNPRED_NONE;
  5856. switch (matched_insn)
  5857. {
  5858. case MVE_VCMP_FP_T2:
  5859. case MVE_VPT_FP_T2:
  5860. if ((arm_decode_field (given, 12, 12) == 0)
  5861. && (arm_decode_field (given, 5, 5) == 1))
  5862. {
  5863. *unpredictable_code = UNPRED_FCA_0_FCB_1;
  5864. return true;
  5865. }
  5866. else
  5867. return false;
  5868. case MVE_VPT_VEC_T4:
  5869. case MVE_VPT_VEC_T5:
  5870. case MVE_VPT_VEC_T6:
  5871. case MVE_VCMP_VEC_T4:
  5872. case MVE_VCMP_VEC_T5:
  5873. case MVE_VCMP_VEC_T6:
  5874. if (arm_decode_field (given, 0, 3) == 0xd)
  5875. {
  5876. *unpredictable_code = UNPRED_R13;
  5877. return true;
  5878. }
  5879. else
  5880. return false;
  5881. case MVE_VDUP:
  5882. {
  5883. unsigned long gpr = arm_decode_field (given, 12, 15);
  5884. if (gpr == 0xd)
  5885. {
  5886. *unpredictable_code = UNPRED_R13;
  5887. return true;
  5888. }
  5889. else if (gpr == 0xf)
  5890. {
  5891. *unpredictable_code = UNPRED_R15;
  5892. return true;
  5893. }
  5894. return false;
  5895. }
  5896. case MVE_VQADD_T2:
  5897. case MVE_VQSUB_T2:
  5898. case MVE_VMUL_FP_T2:
  5899. case MVE_VMUL_VEC_T2:
  5900. case MVE_VMLA:
  5901. case MVE_VBRSR:
  5902. case MVE_VADD_FP_T2:
  5903. case MVE_VSUB_FP_T2:
  5904. case MVE_VADD_VEC_T2:
  5905. case MVE_VSUB_VEC_T2:
  5906. case MVE_VQRSHL_T2:
  5907. case MVE_VQSHL_T1:
  5908. case MVE_VRSHL_T2:
  5909. case MVE_VSHL_T2:
  5910. case MVE_VSHLC:
  5911. case MVE_VQDMLAH:
  5912. case MVE_VQRDMLAH:
  5913. case MVE_VQDMLASH:
  5914. case MVE_VQRDMLASH:
  5915. case MVE_VQDMULH_T3:
  5916. case MVE_VQRDMULH_T4:
  5917. case MVE_VMLAS:
  5918. case MVE_VFMA_FP_SCALAR:
  5919. case MVE_VFMAS_FP_SCALAR:
  5920. case MVE_VHADD_T2:
  5921. case MVE_VHSUB_T2:
  5922. {
  5923. unsigned long gpr = arm_decode_field (given, 0, 3);
  5924. if (gpr == 0xd)
  5925. {
  5926. *unpredictable_code = UNPRED_R13;
  5927. return true;
  5928. }
  5929. else if (gpr == 0xf)
  5930. {
  5931. *unpredictable_code = UNPRED_R15;
  5932. return true;
  5933. }
  5934. return false;
  5935. }
  5936. case MVE_VLD2:
  5937. case MVE_VST2:
  5938. {
  5939. unsigned long rn = arm_decode_field (given, 16, 19);
  5940. if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
  5941. {
  5942. *unpredictable_code = UNPRED_R13_AND_WB;
  5943. return true;
  5944. }
  5945. if (rn == 0xf)
  5946. {
  5947. *unpredictable_code = UNPRED_R15;
  5948. return true;
  5949. }
  5950. if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 6)
  5951. {
  5952. *unpredictable_code = UNPRED_Q_GT_6;
  5953. return true;
  5954. }
  5955. else
  5956. return false;
  5957. }
  5958. case MVE_VLD4:
  5959. case MVE_VST4:
  5960. {
  5961. unsigned long rn = arm_decode_field (given, 16, 19);
  5962. if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
  5963. {
  5964. *unpredictable_code = UNPRED_R13_AND_WB;
  5965. return true;
  5966. }
  5967. if (rn == 0xf)
  5968. {
  5969. *unpredictable_code = UNPRED_R15;
  5970. return true;
  5971. }
  5972. if (arm_decode_field_multiple (given, 13, 15, 22, 22) > 4)
  5973. {
  5974. *unpredictable_code = UNPRED_Q_GT_4;
  5975. return true;
  5976. }
  5977. else
  5978. return false;
  5979. }
  5980. case MVE_VLDRB_T5:
  5981. case MVE_VLDRH_T6:
  5982. case MVE_VLDRW_T7:
  5983. case MVE_VSTRB_T5:
  5984. case MVE_VSTRH_T6:
  5985. case MVE_VSTRW_T7:
  5986. {
  5987. unsigned long rn = arm_decode_field (given, 16, 19);
  5988. if ((rn == 0xd) && (arm_decode_field (given, 21, 21) == 1))
  5989. {
  5990. *unpredictable_code = UNPRED_R13_AND_WB;
  5991. return true;
  5992. }
  5993. else if (rn == 0xf)
  5994. {
  5995. *unpredictable_code = UNPRED_R15;
  5996. return true;
  5997. }
  5998. else
  5999. return false;
  6000. }
  6001. case MVE_VLDRB_GATHER_T1:
  6002. if (arm_decode_field (given, 0, 0) == 1)
  6003. {
  6004. *unpredictable_code = UNPRED_OS;
  6005. return true;
  6006. }
  6007. /* fall through. */
  6008. /* To handle common code with T2-T4 variants. */
  6009. case MVE_VLDRH_GATHER_T2:
  6010. case MVE_VLDRW_GATHER_T3:
  6011. case MVE_VLDRD_GATHER_T4:
  6012. {
  6013. unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
  6014. unsigned long qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
  6015. if (qd == qm)
  6016. {
  6017. *unpredictable_code = UNPRED_Q_REGS_EQUAL;
  6018. return true;
  6019. }
  6020. if (arm_decode_field (given, 16, 19) == 0xf)
  6021. {
  6022. *unpredictable_code = UNPRED_R15;
  6023. return true;
  6024. }
  6025. return false;
  6026. }
  6027. case MVE_VLDRW_GATHER_T5:
  6028. case MVE_VLDRD_GATHER_T6:
  6029. {
  6030. unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
  6031. unsigned long qm = arm_decode_field_multiple (given, 17, 19, 7, 7);
  6032. if (qd == qm)
  6033. {
  6034. *unpredictable_code = UNPRED_Q_REGS_EQUAL;
  6035. return true;
  6036. }
  6037. else
  6038. return false;
  6039. }
  6040. case MVE_VSTRB_SCATTER_T1:
  6041. if (arm_decode_field (given, 16, 19) == 0xf)
  6042. {
  6043. *unpredictable_code = UNPRED_R15;
  6044. return true;
  6045. }
  6046. else if (arm_decode_field (given, 0, 0) == 1)
  6047. {
  6048. *unpredictable_code = UNPRED_OS;
  6049. return true;
  6050. }
  6051. else
  6052. return false;
  6053. case MVE_VSTRH_SCATTER_T2:
  6054. case MVE_VSTRW_SCATTER_T3:
  6055. case MVE_VSTRD_SCATTER_T4:
  6056. if (arm_decode_field (given, 16, 19) == 0xf)
  6057. {
  6058. *unpredictable_code = UNPRED_R15;
  6059. return true;
  6060. }
  6061. else
  6062. return false;
  6063. case MVE_VMOV2_VEC_LANE_TO_GP:
  6064. case MVE_VMOV2_GP_TO_VEC_LANE:
  6065. case MVE_VCVT_BETWEEN_FP_INT:
  6066. case MVE_VCVT_FROM_FP_TO_INT:
  6067. {
  6068. unsigned long rt = arm_decode_field (given, 0, 3);
  6069. unsigned long rt2 = arm_decode_field (given, 16, 19);
  6070. if ((rt == 0xd) || (rt2 == 0xd))
  6071. {
  6072. *unpredictable_code = UNPRED_R13;
  6073. return true;
  6074. }
  6075. else if ((rt == 0xf) || (rt2 == 0xf))
  6076. {
  6077. *unpredictable_code = UNPRED_R15;
  6078. return true;
  6079. }
  6080. else if (rt == rt2 && matched_insn != MVE_VMOV2_GP_TO_VEC_LANE)
  6081. {
  6082. *unpredictable_code = UNPRED_GP_REGS_EQUAL;
  6083. return true;
  6084. }
  6085. return false;
  6086. }
  6087. case MVE_VMAXV:
  6088. case MVE_VMAXAV:
  6089. case MVE_VMAXNMV_FP:
  6090. case MVE_VMAXNMAV_FP:
  6091. case MVE_VMINNMV_FP:
  6092. case MVE_VMINNMAV_FP:
  6093. case MVE_VMINV:
  6094. case MVE_VMINAV:
  6095. case MVE_VABAV:
  6096. case MVE_VMOV_HFP_TO_GP:
  6097. case MVE_VMOV_GP_TO_VEC_LANE:
  6098. case MVE_VMOV_VEC_LANE_TO_GP:
  6099. {
  6100. unsigned long rda = arm_decode_field (given, 12, 15);
  6101. if (rda == 0xd)
  6102. {
  6103. *unpredictable_code = UNPRED_R13;
  6104. return true;
  6105. }
  6106. else if (rda == 0xf)
  6107. {
  6108. *unpredictable_code = UNPRED_R15;
  6109. return true;
  6110. }
  6111. return false;
  6112. }
  6113. case MVE_VMULL_INT:
  6114. {
  6115. unsigned long Qd;
  6116. unsigned long Qm;
  6117. unsigned long Qn;
  6118. if (arm_decode_field (given, 20, 21) == 2)
  6119. {
  6120. Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
  6121. Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
  6122. Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
  6123. if ((Qd == Qn) || (Qd == Qm))
  6124. {
  6125. *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
  6126. return true;
  6127. }
  6128. else
  6129. return false;
  6130. }
  6131. else
  6132. return false;
  6133. }
  6134. case MVE_VCMUL_FP:
  6135. case MVE_VQDMULL_T1:
  6136. {
  6137. unsigned long Qd;
  6138. unsigned long Qm;
  6139. unsigned long Qn;
  6140. if (arm_decode_field (given, 28, 28) == 1)
  6141. {
  6142. Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
  6143. Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
  6144. Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
  6145. if ((Qd == Qn) || (Qd == Qm))
  6146. {
  6147. *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
  6148. return true;
  6149. }
  6150. else
  6151. return false;
  6152. }
  6153. else
  6154. return false;
  6155. }
  6156. case MVE_VQDMULL_T2:
  6157. {
  6158. unsigned long gpr = arm_decode_field (given, 0, 3);
  6159. if (gpr == 0xd)
  6160. {
  6161. *unpredictable_code = UNPRED_R13;
  6162. return true;
  6163. }
  6164. else if (gpr == 0xf)
  6165. {
  6166. *unpredictable_code = UNPRED_R15;
  6167. return true;
  6168. }
  6169. if (arm_decode_field (given, 28, 28) == 1)
  6170. {
  6171. unsigned long Qd
  6172. = arm_decode_field_multiple (given, 13, 15, 22, 22);
  6173. unsigned long Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
  6174. if (Qd == Qn)
  6175. {
  6176. *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
  6177. return true;
  6178. }
  6179. else
  6180. return false;
  6181. }
  6182. return false;
  6183. }
  6184. case MVE_VMLSLDAV:
  6185. case MVE_VRMLSLDAVH:
  6186. case MVE_VMLALDAV:
  6187. case MVE_VADDLV:
  6188. if (arm_decode_field (given, 20, 22) == 6)
  6189. {
  6190. *unpredictable_code = UNPRED_R13;
  6191. return true;
  6192. }
  6193. else
  6194. return false;
  6195. case MVE_VDWDUP:
  6196. case MVE_VIWDUP:
  6197. if (arm_decode_field (given, 1, 3) == 6)
  6198. {
  6199. *unpredictable_code = UNPRED_R13;
  6200. return true;
  6201. }
  6202. else
  6203. return false;
  6204. case MVE_VCADD_VEC:
  6205. case MVE_VHCADD:
  6206. {
  6207. unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
  6208. unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
  6209. if ((Qd == Qm) && arm_decode_field (given, 20, 21) == 2)
  6210. {
  6211. *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_2;
  6212. return true;
  6213. }
  6214. else
  6215. return false;
  6216. }
  6217. case MVE_VCADD_FP:
  6218. {
  6219. unsigned long Qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
  6220. unsigned long Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
  6221. if ((Qd == Qm) && arm_decode_field (given, 20, 20) == 1)
  6222. {
  6223. *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
  6224. return true;
  6225. }
  6226. else
  6227. return false;
  6228. }
  6229. case MVE_VCMLA_FP:
  6230. {
  6231. unsigned long Qda;
  6232. unsigned long Qm;
  6233. unsigned long Qn;
  6234. if (arm_decode_field (given, 20, 20) == 1)
  6235. {
  6236. Qda = arm_decode_field_multiple (given, 13, 15, 22, 22);
  6237. Qm = arm_decode_field_multiple (given, 1, 3, 5, 5);
  6238. Qn = arm_decode_field_multiple (given, 17, 19, 7, 7);
  6239. if ((Qda == Qn) || (Qda == Qm))
  6240. {
  6241. *unpredictable_code = UNPRED_Q_REGS_EQ_AND_SIZE_1;
  6242. return true;
  6243. }
  6244. else
  6245. return false;
  6246. }
  6247. else
  6248. return false;
  6249. }
  6250. case MVE_VCTP:
  6251. if (arm_decode_field (given, 16, 19) == 0xd)
  6252. {
  6253. *unpredictable_code = UNPRED_R13;
  6254. return true;
  6255. }
  6256. else
  6257. return false;
  6258. case MVE_VREV64:
  6259. {
  6260. unsigned long qd = arm_decode_field_multiple (given, 13, 15, 22, 22);
  6261. unsigned long qm = arm_decode_field_multiple (given, 1, 3, 6, 6);
  6262. if (qd == qm)
  6263. {
  6264. *unpredictable_code = UNPRED_Q_REGS_EQUAL;
  6265. return true;
  6266. }
  6267. else
  6268. return false;
  6269. }
  6270. case MVE_LSLL:
  6271. case MVE_LSLLI:
  6272. case MVE_LSRL:
  6273. case MVE_ASRL:
  6274. case MVE_ASRLI:
  6275. case MVE_UQSHLL:
  6276. case MVE_UQRSHLL:
  6277. case MVE_URSHRL:
  6278. case MVE_SRSHRL:
  6279. case MVE_SQSHLL:
  6280. case MVE_SQRSHRL:
  6281. {
  6282. unsigned long gpr = arm_decode_field (given, 9, 11);
  6283. gpr = ((gpr << 1) | 1);
  6284. if (gpr == 0xd)
  6285. {
  6286. *unpredictable_code = UNPRED_R13;
  6287. return true;
  6288. }
  6289. else if (gpr == 0xf)
  6290. {
  6291. *unpredictable_code = UNPRED_R15;
  6292. return true;
  6293. }
  6294. return false;
  6295. }
  6296. default:
  6297. return false;
  6298. }
  6299. }
  6300. static void
  6301. print_mve_vmov_index (struct disassemble_info *info, unsigned long given)
  6302. {
  6303. unsigned long op1 = arm_decode_field (given, 21, 22);
  6304. unsigned long op2 = arm_decode_field (given, 5, 6);
  6305. unsigned long h = arm_decode_field (given, 16, 16);
  6306. unsigned long index_operand, esize, targetBeat, idx;
  6307. void *stream = info->stream;
  6308. fprintf_ftype func = info->fprintf_func;
  6309. if ((op1 & 0x2) == 0x2)
  6310. {
  6311. index_operand = op2;
  6312. esize = 8;
  6313. }
  6314. else if (((op1 & 0x2) == 0x0) && ((op2 & 0x1) == 0x1))
  6315. {
  6316. index_operand = op2 >> 1;
  6317. esize = 16;
  6318. }
  6319. else if (((op1 & 0x2) == 0) && ((op2 & 0x3) == 0))
  6320. {
  6321. index_operand = 0;
  6322. esize = 32;
  6323. }
  6324. else
  6325. {
  6326. func (stream, "<undefined index>");
  6327. return;
  6328. }
  6329. targetBeat = (op1 & 0x1) | (h << 1);
  6330. idx = index_operand + targetBeat * (32/esize);
  6331. func (stream, "%lu", idx);
  6332. }
  6333. /* Print neon and mve 8-bit immediate that can be a 8, 16, 32, or 64-bits
  6334. in length and integer of floating-point type. */
  6335. static void
  6336. print_simd_imm8 (struct disassemble_info *info, unsigned long given,
  6337. unsigned int ibit_loc, const struct mopcode32 *insn)
  6338. {
  6339. int bits = 0;
  6340. int cmode = (given >> 8) & 0xf;
  6341. int op = (given >> 5) & 0x1;
  6342. unsigned long value = 0, hival = 0;
  6343. unsigned shift;
  6344. int size = 0;
  6345. int isfloat = 0;
  6346. void *stream = info->stream;
  6347. fprintf_ftype func = info->fprintf_func;
  6348. /* On Neon the 'i' bit is at bit 24, on mve it is
  6349. at bit 28. */
  6350. bits |= ((given >> ibit_loc) & 1) << 7;
  6351. bits |= ((given >> 16) & 7) << 4;
  6352. bits |= ((given >> 0) & 15) << 0;
  6353. if (cmode < 8)
  6354. {
  6355. shift = (cmode >> 1) & 3;
  6356. value = (unsigned long) bits << (8 * shift);
  6357. size = 32;
  6358. }
  6359. else if (cmode < 12)
  6360. {
  6361. shift = (cmode >> 1) & 1;
  6362. value = (unsigned long) bits << (8 * shift);
  6363. size = 16;
  6364. }
  6365. else if (cmode < 14)
  6366. {
  6367. shift = (cmode & 1) + 1;
  6368. value = (unsigned long) bits << (8 * shift);
  6369. value |= (1ul << (8 * shift)) - 1;
  6370. size = 32;
  6371. }
  6372. else if (cmode == 14)
  6373. {
  6374. if (op)
  6375. {
  6376. /* Bit replication into bytes. */
  6377. int ix;
  6378. unsigned long mask;
  6379. value = 0;
  6380. hival = 0;
  6381. for (ix = 7; ix >= 0; ix--)
  6382. {
  6383. mask = ((bits >> ix) & 1) ? 0xff : 0;
  6384. if (ix <= 3)
  6385. value = (value << 8) | mask;
  6386. else
  6387. hival = (hival << 8) | mask;
  6388. }
  6389. size = 64;
  6390. }
  6391. else
  6392. {
  6393. /* Byte replication. */
  6394. value = (unsigned long) bits;
  6395. size = 8;
  6396. }
  6397. }
  6398. else if (!op)
  6399. {
  6400. /* Floating point encoding. */
  6401. int tmp;
  6402. value = (unsigned long) (bits & 0x7f) << 19;
  6403. value |= (unsigned long) (bits & 0x80) << 24;
  6404. tmp = bits & 0x40 ? 0x3c : 0x40;
  6405. value |= (unsigned long) tmp << 24;
  6406. size = 32;
  6407. isfloat = 1;
  6408. }
  6409. else
  6410. {
  6411. func (stream, "<illegal constant %.8x:%x:%x>",
  6412. bits, cmode, op);
  6413. size = 32;
  6414. return;
  6415. }
  6416. /* printU determines whether the immediate value should be printed as
  6417. unsigned. */
  6418. unsigned printU = 0;
  6419. switch (insn->mve_op)
  6420. {
  6421. default:
  6422. break;
  6423. /* We want this for instructions that don't have a 'signed' type. */
  6424. case MVE_VBIC_IMM:
  6425. case MVE_VORR_IMM:
  6426. case MVE_VMVN_IMM:
  6427. case MVE_VMOV_IMM_TO_VEC:
  6428. printU = 1;
  6429. break;
  6430. }
  6431. switch (size)
  6432. {
  6433. case 8:
  6434. func (stream, "#%ld\t; 0x%.2lx", value, value);
  6435. break;
  6436. case 16:
  6437. func (stream,
  6438. printU
  6439. ? "#%lu\t; 0x%.4lx"
  6440. : "#%ld\t; 0x%.4lx", value, value);
  6441. break;
  6442. case 32:
  6443. if (isfloat)
  6444. {
  6445. unsigned char valbytes[4];
  6446. double fvalue;
  6447. /* Do this a byte at a time so we don't have to
  6448. worry about the host's endianness. */
  6449. valbytes[0] = value & 0xff;
  6450. valbytes[1] = (value >> 8) & 0xff;
  6451. valbytes[2] = (value >> 16) & 0xff;
  6452. valbytes[3] = (value >> 24) & 0xff;
  6453. floatformat_to_double
  6454. (& floatformat_ieee_single_little, valbytes,
  6455. & fvalue);
  6456. func (stream, "#%.7g\t; 0x%.8lx", fvalue,
  6457. value);
  6458. }
  6459. else
  6460. func (stream,
  6461. printU
  6462. ? "#%lu\t; 0x%.8lx"
  6463. : "#%ld\t; 0x%.8lx",
  6464. (long) (((value & 0x80000000L) != 0)
  6465. && !printU
  6466. ? value | ~0xffffffffL : value),
  6467. value);
  6468. break;
  6469. case 64:
  6470. func (stream, "#0x%.8lx%.8lx", hival, value);
  6471. break;
  6472. default:
  6473. abort ();
  6474. }
  6475. }
  6476. static void
  6477. print_mve_undefined (struct disassemble_info *info,
  6478. enum mve_undefined undefined_code)
  6479. {
  6480. void *stream = info->stream;
  6481. fprintf_ftype func = info->fprintf_func;
  6482. func (stream, "\t\tundefined instruction: ");
  6483. switch (undefined_code)
  6484. {
  6485. case UNDEF_SIZE:
  6486. func (stream, "illegal size");
  6487. break;
  6488. case UNDEF_SIZE_0:
  6489. func (stream, "size equals zero");
  6490. break;
  6491. case UNDEF_SIZE_2:
  6492. func (stream, "size equals two");
  6493. break;
  6494. case UNDEF_SIZE_3:
  6495. func (stream, "size equals three");
  6496. break;
  6497. case UNDEF_SIZE_LE_1:
  6498. func (stream, "size <= 1");
  6499. break;
  6500. case UNDEF_SIZE_NOT_0:
  6501. func (stream, "size not equal to 0");
  6502. break;
  6503. case UNDEF_SIZE_NOT_2:
  6504. func (stream, "size not equal to 2");
  6505. break;
  6506. case UNDEF_SIZE_NOT_3:
  6507. func (stream, "size not equal to 3");
  6508. break;
  6509. case UNDEF_NOT_UNS_SIZE_0:
  6510. func (stream, "not unsigned and size = zero");
  6511. break;
  6512. case UNDEF_NOT_UNS_SIZE_1:
  6513. func (stream, "not unsigned and size = one");
  6514. break;
  6515. case UNDEF_NOT_UNSIGNED:
  6516. func (stream, "not unsigned");
  6517. break;
  6518. case UNDEF_VCVT_IMM6:
  6519. func (stream, "invalid imm6");
  6520. break;
  6521. case UNDEF_VCVT_FSI_IMM6:
  6522. func (stream, "fsi = 0 and invalid imm6");
  6523. break;
  6524. case UNDEF_BAD_OP1_OP2:
  6525. func (stream, "bad size with op2 = 2 and op1 = 0 or 1");
  6526. break;
  6527. case UNDEF_BAD_U_OP1_OP2:
  6528. func (stream, "unsigned with op2 = 0 and op1 = 0 or 1");
  6529. break;
  6530. case UNDEF_OP_0_BAD_CMODE:
  6531. func (stream, "op field equal 0 and bad cmode");
  6532. break;
  6533. case UNDEF_XCHG_UNS:
  6534. func (stream, "exchange and unsigned together");
  6535. break;
  6536. case UNDEF_NONE:
  6537. break;
  6538. }
  6539. }
  6540. static void
  6541. print_mve_unpredictable (struct disassemble_info *info,
  6542. enum mve_unpredictable unpredict_code)
  6543. {
  6544. void *stream = info->stream;
  6545. fprintf_ftype func = info->fprintf_func;
  6546. func (stream, "%s: ", UNPREDICTABLE_INSTRUCTION);
  6547. switch (unpredict_code)
  6548. {
  6549. case UNPRED_IT_BLOCK:
  6550. func (stream, "mve instruction in it block");
  6551. break;
  6552. case UNPRED_FCA_0_FCB_1:
  6553. func (stream, "condition bits, fca = 0 and fcb = 1");
  6554. break;
  6555. case UNPRED_R13:
  6556. func (stream, "use of r13 (sp)");
  6557. break;
  6558. case UNPRED_R15:
  6559. func (stream, "use of r15 (pc)");
  6560. break;
  6561. case UNPRED_Q_GT_4:
  6562. func (stream, "start register block > r4");
  6563. break;
  6564. case UNPRED_Q_GT_6:
  6565. func (stream, "start register block > r6");
  6566. break;
  6567. case UNPRED_R13_AND_WB:
  6568. func (stream, "use of r13 and write back");
  6569. break;
  6570. case UNPRED_Q_REGS_EQUAL:
  6571. func (stream,
  6572. "same vector register used for destination and other operand");
  6573. break;
  6574. case UNPRED_OS:
  6575. func (stream, "use of offset scaled");
  6576. break;
  6577. case UNPRED_GP_REGS_EQUAL:
  6578. func (stream, "same general-purpose register used for both operands");
  6579. break;
  6580. case UNPRED_Q_REGS_EQ_AND_SIZE_1:
  6581. func (stream, "use of identical q registers and size = 1");
  6582. break;
  6583. case UNPRED_Q_REGS_EQ_AND_SIZE_2:
  6584. func (stream, "use of identical q registers and size = 1");
  6585. break;
  6586. case UNPRED_NONE:
  6587. break;
  6588. }
  6589. }
  6590. /* Print register block operand for mve vld2/vld4/vst2/vld4. */
  6591. static void
  6592. print_mve_register_blocks (struct disassemble_info *info,
  6593. unsigned long given,
  6594. enum mve_instructions matched_insn)
  6595. {
  6596. void *stream = info->stream;
  6597. fprintf_ftype func = info->fprintf_func;
  6598. unsigned long q_reg_start = arm_decode_field_multiple (given,
  6599. 13, 15,
  6600. 22, 22);
  6601. switch (matched_insn)
  6602. {
  6603. case MVE_VLD2:
  6604. case MVE_VST2:
  6605. if (q_reg_start <= 6)
  6606. func (stream, "{q%ld, q%ld}", q_reg_start, q_reg_start + 1);
  6607. else
  6608. func (stream, "<illegal reg q%ld>", q_reg_start);
  6609. break;
  6610. case MVE_VLD4:
  6611. case MVE_VST4:
  6612. if (q_reg_start <= 4)
  6613. func (stream, "{q%ld, q%ld, q%ld, q%ld}", q_reg_start,
  6614. q_reg_start + 1, q_reg_start + 2,
  6615. q_reg_start + 3);
  6616. else
  6617. func (stream, "<illegal reg q%ld>", q_reg_start);
  6618. break;
  6619. default:
  6620. break;
  6621. }
  6622. }
  6623. static void
  6624. print_mve_rounding_mode (struct disassemble_info *info,
  6625. unsigned long given,
  6626. enum mve_instructions matched_insn)
  6627. {
  6628. void *stream = info->stream;
  6629. fprintf_ftype func = info->fprintf_func;
  6630. switch (matched_insn)
  6631. {
  6632. case MVE_VCVT_FROM_FP_TO_INT:
  6633. {
  6634. switch (arm_decode_field (given, 8, 9))
  6635. {
  6636. case 0:
  6637. func (stream, "a");
  6638. break;
  6639. case 1:
  6640. func (stream, "n");
  6641. break;
  6642. case 2:
  6643. func (stream, "p");
  6644. break;
  6645. case 3:
  6646. func (stream, "m");
  6647. break;
  6648. default:
  6649. break;
  6650. }
  6651. }
  6652. break;
  6653. case MVE_VRINT_FP:
  6654. {
  6655. switch (arm_decode_field (given, 7, 9))
  6656. {
  6657. case 0:
  6658. func (stream, "n");
  6659. break;
  6660. case 1:
  6661. func (stream, "x");
  6662. break;
  6663. case 2:
  6664. func (stream, "a");
  6665. break;
  6666. case 3:
  6667. func (stream, "z");
  6668. break;
  6669. case 5:
  6670. func (stream, "m");
  6671. break;
  6672. case 7:
  6673. func (stream, "p");
  6674. case 4:
  6675. case 6:
  6676. default:
  6677. break;
  6678. }
  6679. }
  6680. break;
  6681. default:
  6682. break;
  6683. }
  6684. }
  6685. static void
  6686. print_mve_vcvt_size (struct disassemble_info *info,
  6687. unsigned long given,
  6688. enum mve_instructions matched_insn)
  6689. {
  6690. unsigned long mode = 0;
  6691. void *stream = info->stream;
  6692. fprintf_ftype func = info->fprintf_func;
  6693. switch (matched_insn)
  6694. {
  6695. case MVE_VCVT_FP_FIX_VEC:
  6696. {
  6697. mode = (((given & 0x200) >> 7)
  6698. | ((given & 0x10000000) >> 27)
  6699. | ((given & 0x100) >> 8));
  6700. switch (mode)
  6701. {
  6702. case 0:
  6703. func (stream, "f16.s16");
  6704. break;
  6705. case 1:
  6706. func (stream, "s16.f16");
  6707. break;
  6708. case 2:
  6709. func (stream, "f16.u16");
  6710. break;
  6711. case 3:
  6712. func (stream, "u16.f16");
  6713. break;
  6714. case 4:
  6715. func (stream, "f32.s32");
  6716. break;
  6717. case 5:
  6718. func (stream, "s32.f32");
  6719. break;
  6720. case 6:
  6721. func (stream, "f32.u32");
  6722. break;
  6723. case 7:
  6724. func (stream, "u32.f32");
  6725. break;
  6726. default:
  6727. break;
  6728. }
  6729. break;
  6730. }
  6731. case MVE_VCVT_BETWEEN_FP_INT:
  6732. {
  6733. unsigned long size = arm_decode_field (given, 18, 19);
  6734. unsigned long op = arm_decode_field (given, 7, 8);
  6735. if (size == 1)
  6736. {
  6737. switch (op)
  6738. {
  6739. case 0:
  6740. func (stream, "f16.s16");
  6741. break;
  6742. case 1:
  6743. func (stream, "f16.u16");
  6744. break;
  6745. case 2:
  6746. func (stream, "s16.f16");
  6747. break;
  6748. case 3:
  6749. func (stream, "u16.f16");
  6750. break;
  6751. default:
  6752. break;
  6753. }
  6754. }
  6755. else if (size == 2)
  6756. {
  6757. switch (op)
  6758. {
  6759. case 0:
  6760. func (stream, "f32.s32");
  6761. break;
  6762. case 1:
  6763. func (stream, "f32.u32");
  6764. break;
  6765. case 2:
  6766. func (stream, "s32.f32");
  6767. break;
  6768. case 3:
  6769. func (stream, "u32.f32");
  6770. break;
  6771. }
  6772. }
  6773. }
  6774. break;
  6775. case MVE_VCVT_FP_HALF_FP:
  6776. {
  6777. unsigned long op = arm_decode_field (given, 28, 28);
  6778. if (op == 0)
  6779. func (stream, "f16.f32");
  6780. else if (op == 1)
  6781. func (stream, "f32.f16");
  6782. }
  6783. break;
  6784. case MVE_VCVT_FROM_FP_TO_INT:
  6785. {
  6786. unsigned long size = arm_decode_field_multiple (given, 7, 7, 18, 19);
  6787. switch (size)
  6788. {
  6789. case 2:
  6790. func (stream, "s16.f16");
  6791. break;
  6792. case 3:
  6793. func (stream, "u16.f16");
  6794. break;
  6795. case 4:
  6796. func (stream, "s32.f32");
  6797. break;
  6798. case 5:
  6799. func (stream, "u32.f32");
  6800. break;
  6801. default:
  6802. break;
  6803. }
  6804. }
  6805. break;
  6806. default:
  6807. break;
  6808. }
  6809. }
  6810. static void
  6811. print_mve_rotate (struct disassemble_info *info, unsigned long rot,
  6812. unsigned long rot_width)
  6813. {
  6814. void *stream = info->stream;
  6815. fprintf_ftype func = info->fprintf_func;
  6816. if (rot_width == 1)
  6817. {
  6818. switch (rot)
  6819. {
  6820. case 0:
  6821. func (stream, "90");
  6822. break;
  6823. case 1:
  6824. func (stream, "270");
  6825. break;
  6826. default:
  6827. break;
  6828. }
  6829. }
  6830. else if (rot_width == 2)
  6831. {
  6832. switch (rot)
  6833. {
  6834. case 0:
  6835. func (stream, "0");
  6836. break;
  6837. case 1:
  6838. func (stream, "90");
  6839. break;
  6840. case 2:
  6841. func (stream, "180");
  6842. break;
  6843. case 3:
  6844. func (stream, "270");
  6845. break;
  6846. default:
  6847. break;
  6848. }
  6849. }
  6850. }
  6851. static void
  6852. print_instruction_predicate (struct disassemble_info *info)
  6853. {
  6854. void *stream = info->stream;
  6855. fprintf_ftype func = info->fprintf_func;
  6856. if (vpt_block_state.next_pred_state == PRED_THEN)
  6857. func (stream, "t");
  6858. else if (vpt_block_state.next_pred_state == PRED_ELSE)
  6859. func (stream, "e");
  6860. }
  6861. static void
  6862. print_mve_size (struct disassemble_info *info,
  6863. unsigned long size,
  6864. enum mve_instructions matched_insn)
  6865. {
  6866. void *stream = info->stream;
  6867. fprintf_ftype func = info->fprintf_func;
  6868. switch (matched_insn)
  6869. {
  6870. case MVE_VABAV:
  6871. case MVE_VABD_VEC:
  6872. case MVE_VABS_FP:
  6873. case MVE_VABS_VEC:
  6874. case MVE_VADD_VEC_T1:
  6875. case MVE_VADD_VEC_T2:
  6876. case MVE_VADDV:
  6877. case MVE_VBRSR:
  6878. case MVE_VCADD_VEC:
  6879. case MVE_VCLS:
  6880. case MVE_VCLZ:
  6881. case MVE_VCMP_VEC_T1:
  6882. case MVE_VCMP_VEC_T2:
  6883. case MVE_VCMP_VEC_T3:
  6884. case MVE_VCMP_VEC_T4:
  6885. case MVE_VCMP_VEC_T5:
  6886. case MVE_VCMP_VEC_T6:
  6887. case MVE_VCTP:
  6888. case MVE_VDDUP:
  6889. case MVE_VDWDUP:
  6890. case MVE_VHADD_T1:
  6891. case MVE_VHADD_T2:
  6892. case MVE_VHCADD:
  6893. case MVE_VHSUB_T1:
  6894. case MVE_VHSUB_T2:
  6895. case MVE_VIDUP:
  6896. case MVE_VIWDUP:
  6897. case MVE_VLD2:
  6898. case MVE_VLD4:
  6899. case MVE_VLDRB_GATHER_T1:
  6900. case MVE_VLDRH_GATHER_T2:
  6901. case MVE_VLDRW_GATHER_T3:
  6902. case MVE_VLDRD_GATHER_T4:
  6903. case MVE_VLDRB_T1:
  6904. case MVE_VLDRH_T2:
  6905. case MVE_VMAX:
  6906. case MVE_VMAXA:
  6907. case MVE_VMAXV:
  6908. case MVE_VMAXAV:
  6909. case MVE_VMIN:
  6910. case MVE_VMINA:
  6911. case MVE_VMINV:
  6912. case MVE_VMINAV:
  6913. case MVE_VMLA:
  6914. case MVE_VMLAS:
  6915. case MVE_VMUL_VEC_T1:
  6916. case MVE_VMUL_VEC_T2:
  6917. case MVE_VMULH:
  6918. case MVE_VRMULH:
  6919. case MVE_VMULL_INT:
  6920. case MVE_VNEG_FP:
  6921. case MVE_VNEG_VEC:
  6922. case MVE_VPT_VEC_T1:
  6923. case MVE_VPT_VEC_T2:
  6924. case MVE_VPT_VEC_T3:
  6925. case MVE_VPT_VEC_T4:
  6926. case MVE_VPT_VEC_T5:
  6927. case MVE_VPT_VEC_T6:
  6928. case MVE_VQABS:
  6929. case MVE_VQADD_T1:
  6930. case MVE_VQADD_T2:
  6931. case MVE_VQDMLADH:
  6932. case MVE_VQRDMLADH:
  6933. case MVE_VQDMLAH:
  6934. case MVE_VQRDMLAH:
  6935. case MVE_VQDMLASH:
  6936. case MVE_VQRDMLASH:
  6937. case MVE_VQDMLSDH:
  6938. case MVE_VQRDMLSDH:
  6939. case MVE_VQDMULH_T1:
  6940. case MVE_VQRDMULH_T2:
  6941. case MVE_VQDMULH_T3:
  6942. case MVE_VQRDMULH_T4:
  6943. case MVE_VQNEG:
  6944. case MVE_VQRSHL_T1:
  6945. case MVE_VQRSHL_T2:
  6946. case MVE_VQSHL_T1:
  6947. case MVE_VQSHL_T4:
  6948. case MVE_VQSUB_T1:
  6949. case MVE_VQSUB_T2:
  6950. case MVE_VREV32:
  6951. case MVE_VREV64:
  6952. case MVE_VRHADD:
  6953. case MVE_VRINT_FP:
  6954. case MVE_VRSHL_T1:
  6955. case MVE_VRSHL_T2:
  6956. case MVE_VSHL_T2:
  6957. case MVE_VSHL_T3:
  6958. case MVE_VSHLL_T2:
  6959. case MVE_VST2:
  6960. case MVE_VST4:
  6961. case MVE_VSTRB_SCATTER_T1:
  6962. case MVE_VSTRH_SCATTER_T2:
  6963. case MVE_VSTRW_SCATTER_T3:
  6964. case MVE_VSTRB_T1:
  6965. case MVE_VSTRH_T2:
  6966. case MVE_VSUB_VEC_T1:
  6967. case MVE_VSUB_VEC_T2:
  6968. if (size <= 3)
  6969. func (stream, "%s", mve_vec_sizename[size]);
  6970. else
  6971. func (stream, "<undef size>");
  6972. break;
  6973. case MVE_VABD_FP:
  6974. case MVE_VADD_FP_T1:
  6975. case MVE_VADD_FP_T2:
  6976. case MVE_VSUB_FP_T1:
  6977. case MVE_VSUB_FP_T2:
  6978. case MVE_VCMP_FP_T1:
  6979. case MVE_VCMP_FP_T2:
  6980. case MVE_VFMA_FP_SCALAR:
  6981. case MVE_VFMA_FP:
  6982. case MVE_VFMS_FP:
  6983. case MVE_VFMAS_FP_SCALAR:
  6984. case MVE_VMAXNM_FP:
  6985. case MVE_VMAXNMA_FP:
  6986. case MVE_VMAXNMV_FP:
  6987. case MVE_VMAXNMAV_FP:
  6988. case MVE_VMINNM_FP:
  6989. case MVE_VMINNMA_FP:
  6990. case MVE_VMINNMV_FP:
  6991. case MVE_VMINNMAV_FP:
  6992. case MVE_VMUL_FP_T1:
  6993. case MVE_VMUL_FP_T2:
  6994. case MVE_VPT_FP_T1:
  6995. case MVE_VPT_FP_T2:
  6996. if (size == 0)
  6997. func (stream, "32");
  6998. else if (size == 1)
  6999. func (stream, "16");
  7000. break;
  7001. case MVE_VCADD_FP:
  7002. case MVE_VCMLA_FP:
  7003. case MVE_VCMUL_FP:
  7004. case MVE_VMLADAV_T1:
  7005. case MVE_VMLALDAV:
  7006. case MVE_VMLSDAV_T1:
  7007. case MVE_VMLSLDAV:
  7008. case MVE_VMOVN:
  7009. case MVE_VQDMULL_T1:
  7010. case MVE_VQDMULL_T2:
  7011. case MVE_VQMOVN:
  7012. case MVE_VQMOVUN:
  7013. if (size == 0)
  7014. func (stream, "16");
  7015. else if (size == 1)
  7016. func (stream, "32");
  7017. break;
  7018. case MVE_VMOVL:
  7019. if (size == 1)
  7020. func (stream, "8");
  7021. else if (size == 2)
  7022. func (stream, "16");
  7023. break;
  7024. case MVE_VDUP:
  7025. switch (size)
  7026. {
  7027. case 0:
  7028. func (stream, "32");
  7029. break;
  7030. case 1:
  7031. func (stream, "16");
  7032. break;
  7033. case 2:
  7034. func (stream, "8");
  7035. break;
  7036. default:
  7037. break;
  7038. }
  7039. break;
  7040. case MVE_VMOV_GP_TO_VEC_LANE:
  7041. case MVE_VMOV_VEC_LANE_TO_GP:
  7042. switch (size)
  7043. {
  7044. case 0: case 4:
  7045. func (stream, "32");
  7046. break;
  7047. case 1: case 3:
  7048. case 5: case 7:
  7049. func (stream, "16");
  7050. break;
  7051. case 8: case 9: case 10: case 11:
  7052. case 12: case 13: case 14: case 15:
  7053. func (stream, "8");
  7054. break;
  7055. default:
  7056. break;
  7057. }
  7058. break;
  7059. case MVE_VMOV_IMM_TO_VEC:
  7060. switch (size)
  7061. {
  7062. case 0: case 4: case 8:
  7063. case 12: case 24: case 26:
  7064. func (stream, "i32");
  7065. break;
  7066. case 16: case 20:
  7067. func (stream, "i16");
  7068. break;
  7069. case 28:
  7070. func (stream, "i8");
  7071. break;
  7072. case 29:
  7073. func (stream, "i64");
  7074. break;
  7075. case 30:
  7076. func (stream, "f32");
  7077. break;
  7078. default:
  7079. break;
  7080. }
  7081. break;
  7082. case MVE_VMULL_POLY:
  7083. if (size == 0)
  7084. func (stream, "p8");
  7085. else if (size == 1)
  7086. func (stream, "p16");
  7087. break;
  7088. case MVE_VMVN_IMM:
  7089. switch (size)
  7090. {
  7091. case 0: case 2: case 4:
  7092. case 6: case 12: case 13:
  7093. func (stream, "32");
  7094. break;
  7095. case 8: case 10:
  7096. func (stream, "16");
  7097. break;
  7098. default:
  7099. break;
  7100. }
  7101. break;
  7102. case MVE_VBIC_IMM:
  7103. case MVE_VORR_IMM:
  7104. switch (size)
  7105. {
  7106. case 1: case 3:
  7107. case 5: case 7:
  7108. func (stream, "32");
  7109. break;
  7110. case 9: case 11:
  7111. func (stream, "16");
  7112. break;
  7113. default:
  7114. break;
  7115. }
  7116. break;
  7117. case MVE_VQSHRN:
  7118. case MVE_VQSHRUN:
  7119. case MVE_VQRSHRN:
  7120. case MVE_VQRSHRUN:
  7121. case MVE_VRSHRN:
  7122. case MVE_VSHRN:
  7123. {
  7124. switch (size)
  7125. {
  7126. case 1:
  7127. func (stream, "16");
  7128. break;
  7129. case 2: case 3:
  7130. func (stream, "32");
  7131. break;
  7132. default:
  7133. break;
  7134. }
  7135. }
  7136. break;
  7137. case MVE_VQSHL_T2:
  7138. case MVE_VQSHLU_T3:
  7139. case MVE_VRSHR:
  7140. case MVE_VSHL_T1:
  7141. case MVE_VSHLL_T1:
  7142. case MVE_VSHR:
  7143. case MVE_VSLI:
  7144. case MVE_VSRI:
  7145. {
  7146. switch (size)
  7147. {
  7148. case 1:
  7149. func (stream, "8");
  7150. break;
  7151. case 2: case 3:
  7152. func (stream, "16");
  7153. break;
  7154. case 4: case 5: case 6: case 7:
  7155. func (stream, "32");
  7156. break;
  7157. default:
  7158. break;
  7159. }
  7160. }
  7161. break;
  7162. default:
  7163. break;
  7164. }
  7165. }
  7166. static void
  7167. print_mve_shift_n (struct disassemble_info *info, long given,
  7168. enum mve_instructions matched_insn)
  7169. {
  7170. void *stream = info->stream;
  7171. fprintf_ftype func = info->fprintf_func;
  7172. int startAt0
  7173. = matched_insn == MVE_VQSHL_T2
  7174. || matched_insn == MVE_VQSHLU_T3
  7175. || matched_insn == MVE_VSHL_T1
  7176. || matched_insn == MVE_VSHLL_T1
  7177. || matched_insn == MVE_VSLI;
  7178. unsigned imm6 = (given & 0x3f0000) >> 16;
  7179. if (matched_insn == MVE_VSHLL_T1)
  7180. imm6 &= 0x1f;
  7181. unsigned shiftAmount = 0;
  7182. if ((imm6 & 0x20) != 0)
  7183. shiftAmount = startAt0 ? imm6 - 32 : 64 - imm6;
  7184. else if ((imm6 & 0x10) != 0)
  7185. shiftAmount = startAt0 ? imm6 - 16 : 32 - imm6;
  7186. else if ((imm6 & 0x08) != 0)
  7187. shiftAmount = startAt0 ? imm6 - 8 : 16 - imm6;
  7188. else
  7189. print_mve_undefined (info, UNDEF_SIZE_0);
  7190. func (stream, "%u", shiftAmount);
  7191. }
  7192. static void
  7193. print_vec_condition (struct disassemble_info *info, long given,
  7194. enum mve_instructions matched_insn)
  7195. {
  7196. void *stream = info->stream;
  7197. fprintf_ftype func = info->fprintf_func;
  7198. long vec_cond = 0;
  7199. switch (matched_insn)
  7200. {
  7201. case MVE_VPT_FP_T1:
  7202. case MVE_VCMP_FP_T1:
  7203. vec_cond = (((given & 0x1000) >> 10)
  7204. | ((given & 1) << 1)
  7205. | ((given & 0x0080) >> 7));
  7206. func (stream, "%s",vec_condnames[vec_cond]);
  7207. break;
  7208. case MVE_VPT_FP_T2:
  7209. case MVE_VCMP_FP_T2:
  7210. vec_cond = (((given & 0x1000) >> 10)
  7211. | ((given & 0x0020) >> 4)
  7212. | ((given & 0x0080) >> 7));
  7213. func (stream, "%s",vec_condnames[vec_cond]);
  7214. break;
  7215. case MVE_VPT_VEC_T1:
  7216. case MVE_VCMP_VEC_T1:
  7217. vec_cond = (given & 0x0080) >> 7;
  7218. func (stream, "%s",vec_condnames[vec_cond]);
  7219. break;
  7220. case MVE_VPT_VEC_T2:
  7221. case MVE_VCMP_VEC_T2:
  7222. vec_cond = 2 | ((given & 0x0080) >> 7);
  7223. func (stream, "%s",vec_condnames[vec_cond]);
  7224. break;
  7225. case MVE_VPT_VEC_T3:
  7226. case MVE_VCMP_VEC_T3:
  7227. vec_cond = 4 | ((given & 1) << 1) | ((given & 0x0080) >> 7);
  7228. func (stream, "%s",vec_condnames[vec_cond]);
  7229. break;
  7230. case MVE_VPT_VEC_T4:
  7231. case MVE_VCMP_VEC_T4:
  7232. vec_cond = (given & 0x0080) >> 7;
  7233. func (stream, "%s",vec_condnames[vec_cond]);
  7234. break;
  7235. case MVE_VPT_VEC_T5:
  7236. case MVE_VCMP_VEC_T5:
  7237. vec_cond = 2 | ((given & 0x0080) >> 7);
  7238. func (stream, "%s",vec_condnames[vec_cond]);
  7239. break;
  7240. case MVE_VPT_VEC_T6:
  7241. case MVE_VCMP_VEC_T6:
  7242. vec_cond = 4 | ((given & 0x0020) >> 4) | ((given & 0x0080) >> 7);
  7243. func (stream, "%s",vec_condnames[vec_cond]);
  7244. break;
  7245. case MVE_NONE:
  7246. case MVE_VPST:
  7247. default:
  7248. break;
  7249. }
  7250. }
  7251. #define W_BIT 21
  7252. #define I_BIT 22
  7253. #define U_BIT 23
  7254. #define P_BIT 24
  7255. #define WRITEBACK_BIT_SET (given & (1 << W_BIT))
  7256. #define IMMEDIATE_BIT_SET (given & (1 << I_BIT))
  7257. #define NEGATIVE_BIT_SET ((given & (1 << U_BIT)) == 0)
  7258. #define PRE_BIT_SET (given & (1 << P_BIT))
  7259. /* Print one coprocessor instruction on INFO->STREAM.
  7260. Return TRUE if the instuction matched, FALSE if this is not a
  7261. recognised coprocessor instruction. */
  7262. static bool
  7263. print_insn_coprocessor_1 (const struct sopcode32 *opcodes,
  7264. bfd_vma pc,
  7265. struct disassemble_info *info,
  7266. long given,
  7267. bool thumb)
  7268. {
  7269. const struct sopcode32 *insn;
  7270. void *stream = info->stream;
  7271. fprintf_ftype func = info->fprintf_func;
  7272. unsigned long mask;
  7273. unsigned long value = 0;
  7274. int cond;
  7275. int cp_num;
  7276. struct arm_private_data *private_data = info->private_data;
  7277. arm_feature_set allowed_arches = ARM_ARCH_NONE;
  7278. arm_feature_set arm_ext_v8_1m_main =
  7279. ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN);
  7280. allowed_arches = private_data->features;
  7281. for (insn = opcodes; insn->assembler; insn++)
  7282. {
  7283. unsigned long u_reg = 16;
  7284. bool is_unpredictable = false;
  7285. signed long value_in_comment = 0;
  7286. const char *c;
  7287. if (ARM_FEATURE_ZERO (insn->arch))
  7288. switch (insn->value)
  7289. {
  7290. case SENTINEL_IWMMXT_START:
  7291. if (info->mach != bfd_mach_arm_XScale
  7292. && info->mach != bfd_mach_arm_iWMMXt
  7293. && info->mach != bfd_mach_arm_iWMMXt2)
  7294. do
  7295. insn++;
  7296. while ((! ARM_FEATURE_ZERO (insn->arch))
  7297. && insn->value != SENTINEL_IWMMXT_END);
  7298. continue;
  7299. case SENTINEL_IWMMXT_END:
  7300. continue;
  7301. case SENTINEL_GENERIC_START:
  7302. allowed_arches = private_data->features;
  7303. continue;
  7304. default:
  7305. abort ();
  7306. }
  7307. mask = insn->mask;
  7308. value = insn->value;
  7309. cp_num = (given >> 8) & 0xf;
  7310. if (thumb)
  7311. {
  7312. /* The high 4 bits are 0xe for Arm conditional instructions, and
  7313. 0xe for arm unconditional instructions. The rest of the
  7314. encoding is the same. */
  7315. mask |= 0xf0000000;
  7316. value |= 0xe0000000;
  7317. if (ifthen_state)
  7318. cond = IFTHEN_COND;
  7319. else
  7320. cond = COND_UNCOND;
  7321. }
  7322. else
  7323. {
  7324. /* Only match unconditional instuctions against unconditional
  7325. patterns. */
  7326. if ((given & 0xf0000000) == 0xf0000000)
  7327. {
  7328. mask |= 0xf0000000;
  7329. cond = COND_UNCOND;
  7330. }
  7331. else
  7332. {
  7333. cond = (given >> 28) & 0xf;
  7334. if (cond == 0xe)
  7335. cond = COND_UNCOND;
  7336. }
  7337. }
  7338. if ((insn->isa == T32 && !thumb)
  7339. || (insn->isa == ARM && thumb))
  7340. continue;
  7341. if ((given & mask) != value)
  7342. continue;
  7343. if (! ARM_CPU_HAS_FEATURE (insn->arch, allowed_arches))
  7344. continue;
  7345. if (insn->value == 0xfe000010 /* mcr2 */
  7346. || insn->value == 0xfe100010 /* mrc2 */
  7347. || insn->value == 0xfc100000 /* ldc2 */
  7348. || insn->value == 0xfc000000) /* stc2 */
  7349. {
  7350. if (cp_num == 9 || cp_num == 10 || cp_num == 11)
  7351. is_unpredictable = true;
  7352. /* Armv8.1-M Mainline FP & MVE instructions. */
  7353. if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
  7354. && !ARM_CPU_IS_ANY (allowed_arches)
  7355. && (cp_num == 8 || cp_num == 14 || cp_num == 15))
  7356. continue;
  7357. }
  7358. else if (insn->value == 0x0e000000 /* cdp */
  7359. || insn->value == 0xfe000000 /* cdp2 */
  7360. || insn->value == 0x0e000010 /* mcr */
  7361. || insn->value == 0x0e100010 /* mrc */
  7362. || insn->value == 0x0c100000 /* ldc */
  7363. || insn->value == 0x0c000000) /* stc */
  7364. {
  7365. /* Floating-point instructions. */
  7366. if (cp_num == 9 || cp_num == 10 || cp_num == 11)
  7367. continue;
  7368. /* Armv8.1-M Mainline FP & MVE instructions. */
  7369. if (ARM_CPU_HAS_FEATURE (arm_ext_v8_1m_main, allowed_arches)
  7370. && !ARM_CPU_IS_ANY (allowed_arches)
  7371. && (cp_num == 8 || cp_num == 14 || cp_num == 15))
  7372. continue;
  7373. }
  7374. else if ((insn->value == 0xec100f80 /* vldr (system register) */
  7375. || insn->value == 0xec000f80) /* vstr (system register) */
  7376. && arm_decode_field (given, 24, 24) == 0
  7377. && arm_decode_field (given, 21, 21) == 0)
  7378. /* If the P and W bits are both 0 then these encodings match the MVE
  7379. VLDR and VSTR instructions, these are in a different table, so we
  7380. don't let it match here. */
  7381. continue;
  7382. for (c = insn->assembler; *c; c++)
  7383. {
  7384. if (*c == '%')
  7385. {
  7386. const char mod = *++c;
  7387. switch (mod)
  7388. {
  7389. case '%':
  7390. func (stream, "%%");
  7391. break;
  7392. case 'A':
  7393. case 'K':
  7394. {
  7395. int rn = (given >> 16) & 0xf;
  7396. bfd_vma offset = given & 0xff;
  7397. if (mod == 'K')
  7398. offset = given & 0x7f;
  7399. func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
  7400. if (PRE_BIT_SET || WRITEBACK_BIT_SET)
  7401. {
  7402. /* Not unindexed. The offset is scaled. */
  7403. if (cp_num == 9)
  7404. /* vldr.16/vstr.16 will shift the address
  7405. left by 1 bit only. */
  7406. offset = offset * 2;
  7407. else
  7408. offset = offset * 4;
  7409. if (NEGATIVE_BIT_SET)
  7410. offset = - offset;
  7411. if (rn != 15)
  7412. value_in_comment = offset;
  7413. }
  7414. if (PRE_BIT_SET)
  7415. {
  7416. if (offset)
  7417. func (stream, ", #%d]%s",
  7418. (int) offset,
  7419. WRITEBACK_BIT_SET ? "!" : "");
  7420. else if (NEGATIVE_BIT_SET)
  7421. func (stream, ", #-0]");
  7422. else
  7423. func (stream, "]");
  7424. }
  7425. else
  7426. {
  7427. func (stream, "]");
  7428. if (WRITEBACK_BIT_SET)
  7429. {
  7430. if (offset)
  7431. func (stream, ", #%d", (int) offset);
  7432. else if (NEGATIVE_BIT_SET)
  7433. func (stream, ", #-0");
  7434. }
  7435. else
  7436. {
  7437. func (stream, ", {%s%d}",
  7438. (NEGATIVE_BIT_SET && !offset) ? "-" : "",
  7439. (int) offset);
  7440. value_in_comment = offset;
  7441. }
  7442. }
  7443. if (rn == 15 && (PRE_BIT_SET || WRITEBACK_BIT_SET))
  7444. {
  7445. func (stream, "\t; ");
  7446. /* For unaligned PCs, apply off-by-alignment
  7447. correction. */
  7448. info->print_address_func (offset + pc
  7449. + info->bytes_per_chunk * 2
  7450. - (pc & 3),
  7451. info);
  7452. }
  7453. }
  7454. break;
  7455. case 'B':
  7456. {
  7457. int regno = ((given >> 12) & 0xf) | ((given >> (22 - 4)) & 0x10);
  7458. int offset = (given >> 1) & 0x3f;
  7459. if (offset == 1)
  7460. func (stream, "{d%d}", regno);
  7461. else if (regno + offset > 32)
  7462. func (stream, "{d%d-<overflow reg d%d>}", regno, regno + offset - 1);
  7463. else
  7464. func (stream, "{d%d-d%d}", regno, regno + offset - 1);
  7465. }
  7466. break;
  7467. case 'C':
  7468. {
  7469. bool single = ((given >> 8) & 1) == 0;
  7470. char reg_prefix = single ? 's' : 'd';
  7471. int Dreg = (given >> 22) & 0x1;
  7472. int Vdreg = (given >> 12) & 0xf;
  7473. int reg = single ? ((Vdreg << 1) | Dreg)
  7474. : ((Dreg << 4) | Vdreg);
  7475. int num = (given >> (single ? 0 : 1)) & 0x7f;
  7476. int maxreg = single ? 31 : 15;
  7477. int topreg = reg + num - 1;
  7478. if (!num)
  7479. func (stream, "{VPR}");
  7480. else if (num == 1)
  7481. func (stream, "{%c%d, VPR}", reg_prefix, reg);
  7482. else if (topreg > maxreg)
  7483. func (stream, "{%c%d-<overflow reg d%d, VPR}",
  7484. reg_prefix, reg, single ? topreg >> 1 : topreg);
  7485. else
  7486. func (stream, "{%c%d-%c%d, VPR}", reg_prefix, reg,
  7487. reg_prefix, topreg);
  7488. }
  7489. break;
  7490. case 'u':
  7491. if (cond != COND_UNCOND)
  7492. is_unpredictable = true;
  7493. /* Fall through. */
  7494. case 'c':
  7495. if (cond != COND_UNCOND && cp_num == 9)
  7496. is_unpredictable = true;
  7497. /* Fall through. */
  7498. case 'b':
  7499. func (stream, "%s", arm_conditional[cond]);
  7500. break;
  7501. case 'I':
  7502. /* Print a Cirrus/DSP shift immediate. */
  7503. /* Immediates are 7bit signed ints with bits 0..3 in
  7504. bits 0..3 of opcode and bits 4..6 in bits 5..7
  7505. of opcode. */
  7506. {
  7507. int imm;
  7508. imm = (given & 0xf) | ((given & 0xe0) >> 1);
  7509. /* Is ``imm'' a negative number? */
  7510. if (imm & 0x40)
  7511. imm -= 0x80;
  7512. func (stream, "%d", imm);
  7513. }
  7514. break;
  7515. case 'J':
  7516. {
  7517. unsigned long regno
  7518. = arm_decode_field_multiple (given, 13, 15, 22, 22);
  7519. switch (regno)
  7520. {
  7521. case 0x1:
  7522. func (stream, "FPSCR");
  7523. break;
  7524. case 0x2:
  7525. func (stream, "FPSCR_nzcvqc");
  7526. break;
  7527. case 0xc:
  7528. func (stream, "VPR");
  7529. break;
  7530. case 0xd:
  7531. func (stream, "P0");
  7532. break;
  7533. case 0xe:
  7534. func (stream, "FPCXTNS");
  7535. break;
  7536. case 0xf:
  7537. func (stream, "FPCXTS");
  7538. break;
  7539. default:
  7540. func (stream, "<invalid reg %lu>", regno);
  7541. break;
  7542. }
  7543. }
  7544. break;
  7545. case 'F':
  7546. switch (given & 0x00408000)
  7547. {
  7548. case 0:
  7549. func (stream, "4");
  7550. break;
  7551. case 0x8000:
  7552. func (stream, "1");
  7553. break;
  7554. case 0x00400000:
  7555. func (stream, "2");
  7556. break;
  7557. default:
  7558. func (stream, "3");
  7559. }
  7560. break;
  7561. case 'P':
  7562. switch (given & 0x00080080)
  7563. {
  7564. case 0:
  7565. func (stream, "s");
  7566. break;
  7567. case 0x80:
  7568. func (stream, "d");
  7569. break;
  7570. case 0x00080000:
  7571. func (stream, "e");
  7572. break;
  7573. default:
  7574. func (stream, _("<illegal precision>"));
  7575. break;
  7576. }
  7577. break;
  7578. case 'Q':
  7579. switch (given & 0x00408000)
  7580. {
  7581. case 0:
  7582. func (stream, "s");
  7583. break;
  7584. case 0x8000:
  7585. func (stream, "d");
  7586. break;
  7587. case 0x00400000:
  7588. func (stream, "e");
  7589. break;
  7590. default:
  7591. func (stream, "p");
  7592. break;
  7593. }
  7594. break;
  7595. case 'R':
  7596. switch (given & 0x60)
  7597. {
  7598. case 0:
  7599. break;
  7600. case 0x20:
  7601. func (stream, "p");
  7602. break;
  7603. case 0x40:
  7604. func (stream, "m");
  7605. break;
  7606. default:
  7607. func (stream, "z");
  7608. break;
  7609. }
  7610. break;
  7611. case '0': case '1': case '2': case '3': case '4':
  7612. case '5': case '6': case '7': case '8': case '9':
  7613. {
  7614. int width;
  7615. c = arm_decode_bitfield (c, given, &value, &width);
  7616. switch (*c)
  7617. {
  7618. case 'R':
  7619. if (value == 15)
  7620. is_unpredictable = true;
  7621. /* Fall through. */
  7622. case 'r':
  7623. if (c[1] == 'u')
  7624. {
  7625. /* Eat the 'u' character. */
  7626. ++ c;
  7627. if (u_reg == value)
  7628. is_unpredictable = true;
  7629. u_reg = value;
  7630. }
  7631. func (stream, "%s", arm_regnames[value]);
  7632. break;
  7633. case 'V':
  7634. if (given & (1 << 6))
  7635. goto Q;
  7636. /* FALLTHROUGH */
  7637. case 'D':
  7638. func (stream, "d%ld", value);
  7639. break;
  7640. case 'Q':
  7641. Q:
  7642. if (value & 1)
  7643. func (stream, "<illegal reg q%ld.5>", value >> 1);
  7644. else
  7645. func (stream, "q%ld", value >> 1);
  7646. break;
  7647. case 'd':
  7648. func (stream, "%ld", value);
  7649. value_in_comment = value;
  7650. break;
  7651. case 'E':
  7652. {
  7653. /* Converts immediate 8 bit back to float value. */
  7654. unsigned floatVal = (value & 0x80) << 24
  7655. | (value & 0x3F) << 19
  7656. | ((value & 0x40) ? (0xF8 << 22) : (1 << 30));
  7657. /* Quarter float have a maximum value of 31.0.
  7658. Get floating point value multiplied by 1e7.
  7659. The maximum value stays in limit of a 32-bit int. */
  7660. unsigned decVal =
  7661. (78125 << (((floatVal >> 23) & 0xFF) - 124)) *
  7662. (16 + (value & 0xF));
  7663. if (!(decVal % 1000000))
  7664. func (stream, "%ld\t; 0x%08x %c%u.%01u", value,
  7665. floatVal, value & 0x80 ? '-' : ' ',
  7666. decVal / 10000000,
  7667. decVal % 10000000 / 1000000);
  7668. else if (!(decVal % 10000))
  7669. func (stream, "%ld\t; 0x%08x %c%u.%03u", value,
  7670. floatVal, value & 0x80 ? '-' : ' ',
  7671. decVal / 10000000,
  7672. decVal % 10000000 / 10000);
  7673. else
  7674. func (stream, "%ld\t; 0x%08x %c%u.%07u", value,
  7675. floatVal, value & 0x80 ? '-' : ' ',
  7676. decVal / 10000000, decVal % 10000000);
  7677. break;
  7678. }
  7679. case 'k':
  7680. {
  7681. int from = (given & (1 << 7)) ? 32 : 16;
  7682. func (stream, "%ld", from - value);
  7683. }
  7684. break;
  7685. case 'f':
  7686. if (value > 7)
  7687. func (stream, "#%s", arm_fp_const[value & 7]);
  7688. else
  7689. func (stream, "f%ld", value);
  7690. break;
  7691. case 'w':
  7692. if (width == 2)
  7693. func (stream, "%s", iwmmxt_wwnames[value]);
  7694. else
  7695. func (stream, "%s", iwmmxt_wwssnames[value]);
  7696. break;
  7697. case 'g':
  7698. func (stream, "%s", iwmmxt_regnames[value]);
  7699. break;
  7700. case 'G':
  7701. func (stream, "%s", iwmmxt_cregnames[value]);
  7702. break;
  7703. case 'x':
  7704. func (stream, "0x%lx", (value & 0xffffffffUL));
  7705. break;
  7706. case 'c':
  7707. switch (value)
  7708. {
  7709. case 0:
  7710. func (stream, "eq");
  7711. break;
  7712. case 1:
  7713. func (stream, "vs");
  7714. break;
  7715. case 2:
  7716. func (stream, "ge");
  7717. break;
  7718. case 3:
  7719. func (stream, "gt");
  7720. break;
  7721. default:
  7722. func (stream, "??");
  7723. break;
  7724. }
  7725. break;
  7726. case '`':
  7727. c++;
  7728. if (value == 0)
  7729. func (stream, "%c", *c);
  7730. break;
  7731. case '\'':
  7732. c++;
  7733. if (value == ((1ul << width) - 1))
  7734. func (stream, "%c", *c);
  7735. break;
  7736. case '?':
  7737. func (stream, "%c", c[(1 << width) - (int) value]);
  7738. c += 1 << width;
  7739. break;
  7740. default:
  7741. abort ();
  7742. }
  7743. }
  7744. break;
  7745. case 'y':
  7746. case 'z':
  7747. {
  7748. int single = *c++ == 'y';
  7749. int regno;
  7750. switch (*c)
  7751. {
  7752. case '4': /* Sm pair */
  7753. case '0': /* Sm, Dm */
  7754. regno = given & 0x0000000f;
  7755. if (single)
  7756. {
  7757. regno <<= 1;
  7758. regno += (given >> 5) & 1;
  7759. }
  7760. else
  7761. regno += ((given >> 5) & 1) << 4;
  7762. break;
  7763. case '1': /* Sd, Dd */
  7764. regno = (given >> 12) & 0x0000000f;
  7765. if (single)
  7766. {
  7767. regno <<= 1;
  7768. regno += (given >> 22) & 1;
  7769. }
  7770. else
  7771. regno += ((given >> 22) & 1) << 4;
  7772. break;
  7773. case '2': /* Sn, Dn */
  7774. regno = (given >> 16) & 0x0000000f;
  7775. if (single)
  7776. {
  7777. regno <<= 1;
  7778. regno += (given >> 7) & 1;
  7779. }
  7780. else
  7781. regno += ((given >> 7) & 1) << 4;
  7782. break;
  7783. case '3': /* List */
  7784. func (stream, "{");
  7785. regno = (given >> 12) & 0x0000000f;
  7786. if (single)
  7787. {
  7788. regno <<= 1;
  7789. regno += (given >> 22) & 1;
  7790. }
  7791. else
  7792. regno += ((given >> 22) & 1) << 4;
  7793. break;
  7794. default:
  7795. abort ();
  7796. }
  7797. func (stream, "%c%d", single ? 's' : 'd', regno);
  7798. if (*c == '3')
  7799. {
  7800. int count = given & 0xff;
  7801. if (single == 0)
  7802. count >>= 1;
  7803. if (--count)
  7804. {
  7805. func (stream, "-%c%d",
  7806. single ? 's' : 'd',
  7807. regno + count);
  7808. }
  7809. func (stream, "}");
  7810. }
  7811. else if (*c == '4')
  7812. func (stream, ", %c%d", single ? 's' : 'd',
  7813. regno + 1);
  7814. }
  7815. break;
  7816. case 'L':
  7817. switch (given & 0x00400100)
  7818. {
  7819. case 0x00000000: func (stream, "b"); break;
  7820. case 0x00400000: func (stream, "h"); break;
  7821. case 0x00000100: func (stream, "w"); break;
  7822. case 0x00400100: func (stream, "d"); break;
  7823. default:
  7824. break;
  7825. }
  7826. break;
  7827. case 'Z':
  7828. {
  7829. /* given (20, 23) | given (0, 3) */
  7830. value = ((given >> 16) & 0xf0) | (given & 0xf);
  7831. func (stream, "%d", (int) value);
  7832. }
  7833. break;
  7834. case 'l':
  7835. /* This is like the 'A' operator, except that if
  7836. the width field "M" is zero, then the offset is
  7837. *not* multiplied by four. */
  7838. {
  7839. int offset = given & 0xff;
  7840. int multiplier = (given & 0x00000100) ? 4 : 1;
  7841. func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
  7842. if (multiplier > 1)
  7843. {
  7844. value_in_comment = offset * multiplier;
  7845. if (NEGATIVE_BIT_SET)
  7846. value_in_comment = - value_in_comment;
  7847. }
  7848. if (offset)
  7849. {
  7850. if (PRE_BIT_SET)
  7851. func (stream, ", #%s%d]%s",
  7852. NEGATIVE_BIT_SET ? "-" : "",
  7853. offset * multiplier,
  7854. WRITEBACK_BIT_SET ? "!" : "");
  7855. else
  7856. func (stream, "], #%s%d",
  7857. NEGATIVE_BIT_SET ? "-" : "",
  7858. offset * multiplier);
  7859. }
  7860. else
  7861. func (stream, "]");
  7862. }
  7863. break;
  7864. case 'r':
  7865. {
  7866. int imm4 = (given >> 4) & 0xf;
  7867. int puw_bits = ((given >> 22) & 6) | ((given >> W_BIT) & 1);
  7868. int ubit = ! NEGATIVE_BIT_SET;
  7869. const char *rm = arm_regnames [given & 0xf];
  7870. const char *rn = arm_regnames [(given >> 16) & 0xf];
  7871. switch (puw_bits)
  7872. {
  7873. case 1:
  7874. case 3:
  7875. func (stream, "[%s], %c%s", rn, ubit ? '+' : '-', rm);
  7876. if (imm4)
  7877. func (stream, ", lsl #%d", imm4);
  7878. break;
  7879. case 4:
  7880. case 5:
  7881. case 6:
  7882. case 7:
  7883. func (stream, "[%s, %c%s", rn, ubit ? '+' : '-', rm);
  7884. if (imm4 > 0)
  7885. func (stream, ", lsl #%d", imm4);
  7886. func (stream, "]");
  7887. if (puw_bits == 5 || puw_bits == 7)
  7888. func (stream, "!");
  7889. break;
  7890. default:
  7891. func (stream, "INVALID");
  7892. }
  7893. }
  7894. break;
  7895. case 'i':
  7896. {
  7897. long imm5;
  7898. imm5 = ((given & 0x100) >> 4) | (given & 0xf);
  7899. func (stream, "%ld", (imm5 == 0) ? 32 : imm5);
  7900. }
  7901. break;
  7902. default:
  7903. abort ();
  7904. }
  7905. }
  7906. else
  7907. func (stream, "%c", *c);
  7908. }
  7909. if (value_in_comment > 32 || value_in_comment < -16)
  7910. func (stream, "\t; 0x%lx", (value_in_comment & 0xffffffffUL));
  7911. if (is_unpredictable)
  7912. func (stream, UNPREDICTABLE_INSTRUCTION);
  7913. return true;
  7914. }
  7915. return false;
  7916. }
  7917. static bool
  7918. print_insn_coprocessor (bfd_vma pc,
  7919. struct disassemble_info *info,
  7920. long given,
  7921. bool thumb)
  7922. {
  7923. return print_insn_coprocessor_1 (coprocessor_opcodes,
  7924. pc, info, given, thumb);
  7925. }
  7926. static bool
  7927. print_insn_generic_coprocessor (bfd_vma pc,
  7928. struct disassemble_info *info,
  7929. long given,
  7930. bool thumb)
  7931. {
  7932. return print_insn_coprocessor_1 (generic_coprocessor_opcodes,
  7933. pc, info, given, thumb);
  7934. }
  7935. /* Decodes and prints ARM addressing modes. Returns the offset
  7936. used in the address, if any, if it is worthwhile printing the
  7937. offset as a hexadecimal value in a comment at the end of the
  7938. line of disassembly. */
  7939. static signed long
  7940. print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
  7941. {
  7942. void *stream = info->stream;
  7943. fprintf_ftype func = info->fprintf_func;
  7944. bfd_vma offset = 0;
  7945. if (((given & 0x000f0000) == 0x000f0000)
  7946. && ((given & 0x02000000) == 0))
  7947. {
  7948. offset = given & 0xfff;
  7949. func (stream, "[pc");
  7950. if (PRE_BIT_SET)
  7951. {
  7952. /* Pre-indexed. Elide offset of positive zero when
  7953. non-writeback. */
  7954. if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
  7955. func (stream, ", #%s%d", NEGATIVE_BIT_SET ? "-" : "", (int) offset);
  7956. if (NEGATIVE_BIT_SET)
  7957. offset = -offset;
  7958. offset += pc + 8;
  7959. /* Cope with the possibility of write-back
  7960. being used. Probably a very dangerous thing
  7961. for the programmer to do, but who are we to
  7962. argue ? */
  7963. func (stream, "]%s", WRITEBACK_BIT_SET ? "!" : "");
  7964. }
  7965. else /* Post indexed. */
  7966. {
  7967. func (stream, "], #%s%d", NEGATIVE_BIT_SET ? "-" : "", (int) offset);
  7968. /* Ie ignore the offset. */
  7969. offset = pc + 8;
  7970. }
  7971. func (stream, "\t; ");
  7972. info->print_address_func (offset, info);
  7973. offset = 0;
  7974. }
  7975. else
  7976. {
  7977. func (stream, "[%s",
  7978. arm_regnames[(given >> 16) & 0xf]);
  7979. if (PRE_BIT_SET)
  7980. {
  7981. if ((given & 0x02000000) == 0)
  7982. {
  7983. /* Elide offset of positive zero when non-writeback. */
  7984. offset = given & 0xfff;
  7985. if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET || offset)
  7986. func (stream, ", #%s%d", NEGATIVE_BIT_SET ? "-" : "", (int) offset);
  7987. }
  7988. else
  7989. {
  7990. func (stream, ", %s", NEGATIVE_BIT_SET ? "-" : "");
  7991. arm_decode_shift (given, func, stream, true);
  7992. }
  7993. func (stream, "]%s",
  7994. WRITEBACK_BIT_SET ? "!" : "");
  7995. }
  7996. else
  7997. {
  7998. if ((given & 0x02000000) == 0)
  7999. {
  8000. /* Always show offset. */
  8001. offset = given & 0xfff;
  8002. func (stream, "], #%s%d",
  8003. NEGATIVE_BIT_SET ? "-" : "", (int) offset);
  8004. }
  8005. else
  8006. {
  8007. func (stream, "], %s",
  8008. NEGATIVE_BIT_SET ? "-" : "");
  8009. arm_decode_shift (given, func, stream, true);
  8010. }
  8011. }
  8012. if (NEGATIVE_BIT_SET)
  8013. offset = -offset;
  8014. }
  8015. return (signed long) offset;
  8016. }
  8017. /* Print one cde instruction on INFO->STREAM.
  8018. Return TRUE if the instuction matched, FALSE if this is not a
  8019. recognised cde instruction. */
  8020. static bool
  8021. print_insn_cde (struct disassemble_info *info, long given, bool thumb)
  8022. {
  8023. const struct cdeopcode32 *insn;
  8024. void *stream = info->stream;
  8025. fprintf_ftype func = info->fprintf_func;
  8026. if (thumb)
  8027. {
  8028. /* Manually extract the coprocessor code from a known point.
  8029. This position is the same across all CDE instructions. */
  8030. for (insn = cde_opcodes; insn->assembler; insn++)
  8031. {
  8032. uint16_t coproc = (given >> insn->coproc_shift) & insn->coproc_mask;
  8033. uint16_t coproc_mask = 1 << coproc;
  8034. if (! (coproc_mask & cde_coprocs))
  8035. continue;
  8036. if ((given & insn->mask) == insn->value)
  8037. {
  8038. bool is_unpredictable = false;
  8039. const char *c;
  8040. for (c = insn->assembler; *c; c++)
  8041. {
  8042. if (*c == '%')
  8043. {
  8044. switch (*++c)
  8045. {
  8046. case '%':
  8047. func (stream, "%%");
  8048. break;
  8049. case '0': case '1': case '2': case '3': case '4':
  8050. case '5': case '6': case '7': case '8': case '9':
  8051. {
  8052. int width;
  8053. unsigned long value;
  8054. c = arm_decode_bitfield (c, given, &value, &width);
  8055. switch (*c)
  8056. {
  8057. case 'S':
  8058. if (value > 10)
  8059. is_unpredictable = true;
  8060. /* Fall through. */
  8061. case 'R':
  8062. if (value == 13)
  8063. is_unpredictable = true;
  8064. /* Fall through. */
  8065. case 'r':
  8066. func (stream, "%s", arm_regnames[value]);
  8067. break;
  8068. case 'n':
  8069. if (value == 15)
  8070. func (stream, "%s", "APSR_nzcv");
  8071. else
  8072. func (stream, "%s", arm_regnames[value]);
  8073. break;
  8074. case 'T':
  8075. func (stream, "%s", arm_regnames[value + 1]);
  8076. break;
  8077. case 'd':
  8078. func (stream, "%ld", value);
  8079. break;
  8080. case 'V':
  8081. if (given & (1 << 6))
  8082. func (stream, "q%ld", value >> 1);
  8083. else if (given & (1 << 24))
  8084. func (stream, "d%ld", value);
  8085. else
  8086. {
  8087. /* Encoding for S register is different than for D and
  8088. Q registers. S registers are encoded using the top
  8089. single bit in position 22 as the lowest bit of the
  8090. register number, while for Q and D it represents the
  8091. highest bit of the register number. */
  8092. uint8_t top_bit = (value >> 4) & 1;
  8093. uint8_t tmp = (value << 1) & 0x1e;
  8094. uint8_t res = tmp | top_bit;
  8095. func (stream, "s%u", res);
  8096. }
  8097. break;
  8098. default:
  8099. abort ();
  8100. }
  8101. }
  8102. break;
  8103. case 'p':
  8104. {
  8105. uint8_t proc_number = (given >> 8) & 0x7;
  8106. func (stream, "p%u", proc_number);
  8107. break;
  8108. }
  8109. case 'a':
  8110. {
  8111. uint8_t a_offset = 28;
  8112. if (given & (1 << a_offset))
  8113. func (stream, "a");
  8114. break;
  8115. }
  8116. default:
  8117. abort ();
  8118. }
  8119. }
  8120. else
  8121. func (stream, "%c", *c);
  8122. }
  8123. if (is_unpredictable)
  8124. func (stream, UNPREDICTABLE_INSTRUCTION);
  8125. return true;
  8126. }
  8127. }
  8128. return false;
  8129. }
  8130. else
  8131. return false;
  8132. }
  8133. /* Print one neon instruction on INFO->STREAM.
  8134. Return TRUE if the instuction matched, FALSE if this is not a
  8135. recognised neon instruction. */
  8136. static bool
  8137. print_insn_neon (struct disassemble_info *info, long given, bool thumb)
  8138. {
  8139. const struct opcode32 *insn;
  8140. void *stream = info->stream;
  8141. fprintf_ftype func = info->fprintf_func;
  8142. if (thumb)
  8143. {
  8144. if ((given & 0xef000000) == 0xef000000)
  8145. {
  8146. /* Move bit 28 to bit 24 to translate Thumb2 to ARM encoding. */
  8147. unsigned long bit28 = given & (1 << 28);
  8148. given &= 0x00ffffff;
  8149. if (bit28)
  8150. given |= 0xf3000000;
  8151. else
  8152. given |= 0xf2000000;
  8153. }
  8154. else if ((given & 0xff000000) == 0xf9000000)
  8155. given ^= 0xf9000000 ^ 0xf4000000;
  8156. /* BFloat16 neon instructions without special top byte handling. */
  8157. else if ((given & 0xff000000) == 0xfe000000
  8158. || (given & 0xff000000) == 0xfc000000)
  8159. ;
  8160. /* vdup is also a valid neon instruction. */
  8161. else if ((given & 0xff900f5f) != 0xee800b10)
  8162. return false;
  8163. }
  8164. for (insn = neon_opcodes; insn->assembler; insn++)
  8165. {
  8166. unsigned long cond_mask = insn->mask;
  8167. unsigned long cond_value = insn->value;
  8168. int cond;
  8169. if (thumb)
  8170. {
  8171. if ((cond_mask & 0xf0000000) == 0) {
  8172. /* For the entries in neon_opcodes, an opcode mask/value with
  8173. the high 4 bits equal to 0 indicates a conditional
  8174. instruction. For thumb however, we need to include those
  8175. bits in the instruction matching. */
  8176. cond_mask |= 0xf0000000;
  8177. /* Furthermore, the thumb encoding of a conditional instruction
  8178. will have the high 4 bits equal to 0xe. */
  8179. cond_value |= 0xe0000000;
  8180. }
  8181. if (ifthen_state)
  8182. cond = IFTHEN_COND;
  8183. else
  8184. cond = COND_UNCOND;
  8185. }
  8186. else
  8187. {
  8188. if ((given & 0xf0000000) == 0xf0000000)
  8189. {
  8190. /* If the instruction is unconditional, update the mask to only
  8191. match against unconditional opcode values. */
  8192. cond_mask |= 0xf0000000;
  8193. cond = COND_UNCOND;
  8194. }
  8195. else
  8196. {
  8197. cond = (given >> 28) & 0xf;
  8198. if (cond == 0xe)
  8199. cond = COND_UNCOND;
  8200. }
  8201. }
  8202. if ((given & cond_mask) == cond_value)
  8203. {
  8204. signed long value_in_comment = 0;
  8205. bool is_unpredictable = false;
  8206. const char *c;
  8207. for (c = insn->assembler; *c; c++)
  8208. {
  8209. if (*c == '%')
  8210. {
  8211. switch (*++c)
  8212. {
  8213. case '%':
  8214. func (stream, "%%");
  8215. break;
  8216. case 'u':
  8217. if (thumb && ifthen_state)
  8218. is_unpredictable = true;
  8219. /* Fall through. */
  8220. case 'c':
  8221. func (stream, "%s", arm_conditional[cond]);
  8222. break;
  8223. case 'A':
  8224. {
  8225. static const unsigned char enc[16] =
  8226. {
  8227. 0x4, 0x14, /* st4 0,1 */
  8228. 0x4, /* st1 2 */
  8229. 0x4, /* st2 3 */
  8230. 0x3, /* st3 4 */
  8231. 0x13, /* st3 5 */
  8232. 0x3, /* st1 6 */
  8233. 0x1, /* st1 7 */
  8234. 0x2, /* st2 8 */
  8235. 0x12, /* st2 9 */
  8236. 0x2, /* st1 10 */
  8237. 0, 0, 0, 0, 0
  8238. };
  8239. int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
  8240. int rn = ((given >> 16) & 0xf);
  8241. int rm = ((given >> 0) & 0xf);
  8242. int align = ((given >> 4) & 0x3);
  8243. int type = ((given >> 8) & 0xf);
  8244. int n = enc[type] & 0xf;
  8245. int stride = (enc[type] >> 4) + 1;
  8246. int ix;
  8247. func (stream, "{");
  8248. if (stride > 1)
  8249. for (ix = 0; ix != n; ix++)
  8250. func (stream, "%sd%d", ix ? "," : "", rd + ix * stride);
  8251. else if (n == 1)
  8252. func (stream, "d%d", rd);
  8253. else
  8254. func (stream, "d%d-d%d", rd, rd + n - 1);
  8255. func (stream, "}, [%s", arm_regnames[rn]);
  8256. if (align)
  8257. func (stream, " :%d", 32 << align);
  8258. func (stream, "]");
  8259. if (rm == 0xd)
  8260. func (stream, "!");
  8261. else if (rm != 0xf)
  8262. func (stream, ", %s", arm_regnames[rm]);
  8263. }
  8264. break;
  8265. case 'B':
  8266. {
  8267. int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
  8268. int rn = ((given >> 16) & 0xf);
  8269. int rm = ((given >> 0) & 0xf);
  8270. int idx_align = ((given >> 4) & 0xf);
  8271. int align = 0;
  8272. int size = ((given >> 10) & 0x3);
  8273. int idx = idx_align >> (size + 1);
  8274. int length = ((given >> 8) & 3) + 1;
  8275. int stride = 1;
  8276. int i;
  8277. if (length > 1 && size > 0)
  8278. stride = (idx_align & (1 << size)) ? 2 : 1;
  8279. switch (length)
  8280. {
  8281. case 1:
  8282. {
  8283. int amask = (1 << size) - 1;
  8284. if ((idx_align & (1 << size)) != 0)
  8285. return false;
  8286. if (size > 0)
  8287. {
  8288. if ((idx_align & amask) == amask)
  8289. align = 8 << size;
  8290. else if ((idx_align & amask) != 0)
  8291. return false;
  8292. }
  8293. }
  8294. break;
  8295. case 2:
  8296. if (size == 2 && (idx_align & 2) != 0)
  8297. return false;
  8298. align = (idx_align & 1) ? 16 << size : 0;
  8299. break;
  8300. case 3:
  8301. if ((size == 2 && (idx_align & 3) != 0)
  8302. || (idx_align & 1) != 0)
  8303. return false;
  8304. break;
  8305. case 4:
  8306. if (size == 2)
  8307. {
  8308. if ((idx_align & 3) == 3)
  8309. return false;
  8310. align = (idx_align & 3) * 64;
  8311. }
  8312. else
  8313. align = (idx_align & 1) ? 32 << size : 0;
  8314. break;
  8315. default:
  8316. abort ();
  8317. }
  8318. func (stream, "{");
  8319. for (i = 0; i < length; i++)
  8320. func (stream, "%sd%d[%d]", (i == 0) ? "" : ",",
  8321. rd + i * stride, idx);
  8322. func (stream, "}, [%s", arm_regnames[rn]);
  8323. if (align)
  8324. func (stream, " :%d", align);
  8325. func (stream, "]");
  8326. if (rm == 0xd)
  8327. func (stream, "!");
  8328. else if (rm != 0xf)
  8329. func (stream, ", %s", arm_regnames[rm]);
  8330. }
  8331. break;
  8332. case 'C':
  8333. {
  8334. int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
  8335. int rn = ((given >> 16) & 0xf);
  8336. int rm = ((given >> 0) & 0xf);
  8337. int align = ((given >> 4) & 0x1);
  8338. int size = ((given >> 6) & 0x3);
  8339. int type = ((given >> 8) & 0x3);
  8340. int n = type + 1;
  8341. int stride = ((given >> 5) & 0x1);
  8342. int ix;
  8343. if (stride && (n == 1))
  8344. n++;
  8345. else
  8346. stride++;
  8347. func (stream, "{");
  8348. if (stride > 1)
  8349. for (ix = 0; ix != n; ix++)
  8350. func (stream, "%sd%d[]", ix ? "," : "", rd + ix * stride);
  8351. else if (n == 1)
  8352. func (stream, "d%d[]", rd);
  8353. else
  8354. func (stream, "d%d[]-d%d[]", rd, rd + n - 1);
  8355. func (stream, "}, [%s", arm_regnames[rn]);
  8356. if (align)
  8357. {
  8358. align = (8 * (type + 1)) << size;
  8359. if (type == 3)
  8360. align = (size > 1) ? align >> 1 : align;
  8361. if (type == 2 || (type == 0 && !size))
  8362. func (stream, " :<bad align %d>", align);
  8363. else
  8364. func (stream, " :%d", align);
  8365. }
  8366. func (stream, "]");
  8367. if (rm == 0xd)
  8368. func (stream, "!");
  8369. else if (rm != 0xf)
  8370. func (stream, ", %s", arm_regnames[rm]);
  8371. }
  8372. break;
  8373. case 'D':
  8374. {
  8375. int raw_reg = (given & 0xf) | ((given >> 1) & 0x10);
  8376. int size = (given >> 20) & 3;
  8377. int reg = raw_reg & ((4 << size) - 1);
  8378. int ix = raw_reg >> size >> 2;
  8379. func (stream, "d%d[%d]", reg, ix);
  8380. }
  8381. break;
  8382. case 'E':
  8383. /* Neon encoded constant for mov, mvn, vorr, vbic. */
  8384. {
  8385. int bits = 0;
  8386. int cmode = (given >> 8) & 0xf;
  8387. int op = (given >> 5) & 0x1;
  8388. unsigned long value = 0, hival = 0;
  8389. unsigned shift;
  8390. int size = 0;
  8391. int isfloat = 0;
  8392. bits |= ((given >> 24) & 1) << 7;
  8393. bits |= ((given >> 16) & 7) << 4;
  8394. bits |= ((given >> 0) & 15) << 0;
  8395. if (cmode < 8)
  8396. {
  8397. shift = (cmode >> 1) & 3;
  8398. value = (unsigned long) bits << (8 * shift);
  8399. size = 32;
  8400. }
  8401. else if (cmode < 12)
  8402. {
  8403. shift = (cmode >> 1) & 1;
  8404. value = (unsigned long) bits << (8 * shift);
  8405. size = 16;
  8406. }
  8407. else if (cmode < 14)
  8408. {
  8409. shift = (cmode & 1) + 1;
  8410. value = (unsigned long) bits << (8 * shift);
  8411. value |= (1ul << (8 * shift)) - 1;
  8412. size = 32;
  8413. }
  8414. else if (cmode == 14)
  8415. {
  8416. if (op)
  8417. {
  8418. /* Bit replication into bytes. */
  8419. int ix;
  8420. unsigned long mask;
  8421. value = 0;
  8422. hival = 0;
  8423. for (ix = 7; ix >= 0; ix--)
  8424. {
  8425. mask = ((bits >> ix) & 1) ? 0xff : 0;
  8426. if (ix <= 3)
  8427. value = (value << 8) | mask;
  8428. else
  8429. hival = (hival << 8) | mask;
  8430. }
  8431. size = 64;
  8432. }
  8433. else
  8434. {
  8435. /* Byte replication. */
  8436. value = (unsigned long) bits;
  8437. size = 8;
  8438. }
  8439. }
  8440. else if (!op)
  8441. {
  8442. /* Floating point encoding. */
  8443. int tmp;
  8444. value = (unsigned long) (bits & 0x7f) << 19;
  8445. value |= (unsigned long) (bits & 0x80) << 24;
  8446. tmp = bits & 0x40 ? 0x3c : 0x40;
  8447. value |= (unsigned long) tmp << 24;
  8448. size = 32;
  8449. isfloat = 1;
  8450. }
  8451. else
  8452. {
  8453. func (stream, "<illegal constant %.8x:%x:%x>",
  8454. bits, cmode, op);
  8455. size = 32;
  8456. break;
  8457. }
  8458. switch (size)
  8459. {
  8460. case 8:
  8461. func (stream, "#%ld\t; 0x%.2lx", value, value);
  8462. break;
  8463. case 16:
  8464. func (stream, "#%ld\t; 0x%.4lx", value, value);
  8465. break;
  8466. case 32:
  8467. if (isfloat)
  8468. {
  8469. unsigned char valbytes[4];
  8470. double fvalue;
  8471. /* Do this a byte at a time so we don't have to
  8472. worry about the host's endianness. */
  8473. valbytes[0] = value & 0xff;
  8474. valbytes[1] = (value >> 8) & 0xff;
  8475. valbytes[2] = (value >> 16) & 0xff;
  8476. valbytes[3] = (value >> 24) & 0xff;
  8477. floatformat_to_double
  8478. (& floatformat_ieee_single_little, valbytes,
  8479. & fvalue);
  8480. func (stream, "#%.7g\t; 0x%.8lx", fvalue,
  8481. value);
  8482. }
  8483. else
  8484. func (stream, "#%ld\t; 0x%.8lx",
  8485. (long) (((value & 0x80000000L) != 0)
  8486. ? value | ~0xffffffffL : value),
  8487. value);
  8488. break;
  8489. case 64:
  8490. func (stream, "#0x%.8lx%.8lx", hival, value);
  8491. break;
  8492. default:
  8493. abort ();
  8494. }
  8495. }
  8496. break;
  8497. case 'F':
  8498. {
  8499. int regno = ((given >> 16) & 0xf) | ((given >> (7 - 4)) & 0x10);
  8500. int num = (given >> 8) & 0x3;
  8501. if (!num)
  8502. func (stream, "{d%d}", regno);
  8503. else if (num + regno >= 32)
  8504. func (stream, "{d%d-<overflow reg d%d}", regno, regno + num);
  8505. else
  8506. func (stream, "{d%d-d%d}", regno, regno + num);
  8507. }
  8508. break;
  8509. case '0': case '1': case '2': case '3': case '4':
  8510. case '5': case '6': case '7': case '8': case '9':
  8511. {
  8512. int width;
  8513. unsigned long value;
  8514. c = arm_decode_bitfield (c, given, &value, &width);
  8515. switch (*c)
  8516. {
  8517. case 'r':
  8518. func (stream, "%s", arm_regnames[value]);
  8519. break;
  8520. case 'd':
  8521. func (stream, "%ld", value);
  8522. value_in_comment = value;
  8523. break;
  8524. case 'e':
  8525. func (stream, "%ld", (1ul << width) - value);
  8526. break;
  8527. case 'S':
  8528. case 'T':
  8529. case 'U':
  8530. /* Various width encodings. */
  8531. {
  8532. int base = 8 << (*c - 'S'); /* 8,16 or 32 */
  8533. int limit;
  8534. unsigned low, high;
  8535. c++;
  8536. if (*c >= '0' && *c <= '9')
  8537. limit = *c - '0';
  8538. else if (*c >= 'a' && *c <= 'f')
  8539. limit = *c - 'a' + 10;
  8540. else
  8541. abort ();
  8542. low = limit >> 2;
  8543. high = limit & 3;
  8544. if (value < low || value > high)
  8545. func (stream, "<illegal width %d>", base << value);
  8546. else
  8547. func (stream, "%d", base << value);
  8548. }
  8549. break;
  8550. case 'R':
  8551. if (given & (1 << 6))
  8552. goto Q;
  8553. /* FALLTHROUGH */
  8554. case 'D':
  8555. func (stream, "d%ld", value);
  8556. break;
  8557. case 'Q':
  8558. Q:
  8559. if (value & 1)
  8560. func (stream, "<illegal reg q%ld.5>", value >> 1);
  8561. else
  8562. func (stream, "q%ld", value >> 1);
  8563. break;
  8564. case '`':
  8565. c++;
  8566. if (value == 0)
  8567. func (stream, "%c", *c);
  8568. break;
  8569. case '\'':
  8570. c++;
  8571. if (value == ((1ul << width) - 1))
  8572. func (stream, "%c", *c);
  8573. break;
  8574. case '?':
  8575. func (stream, "%c", c[(1 << width) - (int) value]);
  8576. c += 1 << width;
  8577. break;
  8578. default:
  8579. abort ();
  8580. }
  8581. }
  8582. break;
  8583. default:
  8584. abort ();
  8585. }
  8586. }
  8587. else
  8588. func (stream, "%c", *c);
  8589. }
  8590. if (value_in_comment > 32 || value_in_comment < -16)
  8591. func (stream, "\t; 0x%lx", value_in_comment);
  8592. if (is_unpredictable)
  8593. func (stream, UNPREDICTABLE_INSTRUCTION);
  8594. return true;
  8595. }
  8596. }
  8597. return false;
  8598. }
  8599. /* Print one mve instruction on INFO->STREAM.
  8600. Return TRUE if the instuction matched, FALSE if this is not a
  8601. recognised mve instruction. */
  8602. static bool
  8603. print_insn_mve (struct disassemble_info *info, long given)
  8604. {
  8605. const struct mopcode32 *insn;
  8606. void *stream = info->stream;
  8607. fprintf_ftype func = info->fprintf_func;
  8608. for (insn = mve_opcodes; insn->assembler; insn++)
  8609. {
  8610. if (((given & insn->mask) == insn->value)
  8611. && !is_mve_encoding_conflict (given, insn->mve_op))
  8612. {
  8613. signed long value_in_comment = 0;
  8614. bool is_unpredictable = false;
  8615. bool is_undefined = false;
  8616. const char *c;
  8617. enum mve_unpredictable unpredictable_cond = UNPRED_NONE;
  8618. enum mve_undefined undefined_cond = UNDEF_NONE;
  8619. /* Most vector mve instruction are illegal in a it block.
  8620. There are a few exceptions; check for them. */
  8621. if (ifthen_state && !is_mve_okay_in_it (insn->mve_op))
  8622. {
  8623. is_unpredictable = true;
  8624. unpredictable_cond = UNPRED_IT_BLOCK;
  8625. }
  8626. else if (is_mve_unpredictable (given, insn->mve_op,
  8627. &unpredictable_cond))
  8628. is_unpredictable = true;
  8629. if (is_mve_undefined (given, insn->mve_op, &undefined_cond))
  8630. is_undefined = true;
  8631. /* In "VORR Qd, Qm, Qn", if Qm==Qn, VORR is nothing but VMOV,
  8632. i.e "VMOV Qd, Qm". */
  8633. if ((insn->mve_op == MVE_VORR_REG)
  8634. && (arm_decode_field (given, 1, 3)
  8635. == arm_decode_field (given, 17, 19)))
  8636. continue;
  8637. for (c = insn->assembler; *c; c++)
  8638. {
  8639. if (*c == '%')
  8640. {
  8641. switch (*++c)
  8642. {
  8643. case '%':
  8644. func (stream, "%%");
  8645. break;
  8646. case 'a':
  8647. /* Don't print anything for '+' as it is implied. */
  8648. if (arm_decode_field (given, 23, 23) == 0)
  8649. func (stream, "-");
  8650. break;
  8651. case 'c':
  8652. if (ifthen_state)
  8653. func (stream, "%s", arm_conditional[IFTHEN_COND]);
  8654. break;
  8655. case 'd':
  8656. print_mve_vld_str_addr (info, given, insn->mve_op);
  8657. break;
  8658. case 'i':
  8659. {
  8660. long mve_mask = mve_extract_pred_mask (given);
  8661. func (stream, "%s", mve_predicatenames[mve_mask]);
  8662. }
  8663. break;
  8664. case 'j':
  8665. {
  8666. unsigned int imm5 = 0;
  8667. imm5 |= arm_decode_field (given, 6, 7);
  8668. imm5 |= (arm_decode_field (given, 12, 14) << 2);
  8669. func (stream, "#%u", (imm5 == 0) ? 32 : imm5);
  8670. }
  8671. break;
  8672. case 'k':
  8673. func (stream, "#%u",
  8674. (arm_decode_field (given, 7, 7) == 0) ? 64 : 48);
  8675. break;
  8676. case 'n':
  8677. print_vec_condition (info, given, insn->mve_op);
  8678. break;
  8679. case 'o':
  8680. if (arm_decode_field (given, 0, 0) == 1)
  8681. {
  8682. unsigned long size
  8683. = arm_decode_field (given, 4, 4)
  8684. | (arm_decode_field (given, 6, 6) << 1);
  8685. func (stream, ", uxtw #%lu", size);
  8686. }
  8687. break;
  8688. case 'm':
  8689. print_mve_rounding_mode (info, given, insn->mve_op);
  8690. break;
  8691. case 's':
  8692. print_mve_vcvt_size (info, given, insn->mve_op);
  8693. break;
  8694. case 'u':
  8695. {
  8696. unsigned long op1 = arm_decode_field (given, 21, 22);
  8697. if ((insn->mve_op == MVE_VMOV_VEC_LANE_TO_GP))
  8698. {
  8699. /* Check for signed. */
  8700. if (arm_decode_field (given, 23, 23) == 0)
  8701. {
  8702. /* We don't print 's' for S32. */
  8703. if ((arm_decode_field (given, 5, 6) == 0)
  8704. && ((op1 == 0) || (op1 == 1)))
  8705. ;
  8706. else
  8707. func (stream, "s");
  8708. }
  8709. else
  8710. func (stream, "u");
  8711. }
  8712. else
  8713. {
  8714. if (arm_decode_field (given, 28, 28) == 0)
  8715. func (stream, "s");
  8716. else
  8717. func (stream, "u");
  8718. }
  8719. }
  8720. break;
  8721. case 'v':
  8722. print_instruction_predicate (info);
  8723. break;
  8724. case 'w':
  8725. if (arm_decode_field (given, 21, 21) == 1)
  8726. func (stream, "!");
  8727. break;
  8728. case 'B':
  8729. print_mve_register_blocks (info, given, insn->mve_op);
  8730. break;
  8731. case 'E':
  8732. /* SIMD encoded constant for mov, mvn, vorr, vbic. */
  8733. print_simd_imm8 (info, given, 28, insn);
  8734. break;
  8735. case 'N':
  8736. print_mve_vmov_index (info, given);
  8737. break;
  8738. case 'T':
  8739. if (arm_decode_field (given, 12, 12) == 0)
  8740. func (stream, "b");
  8741. else
  8742. func (stream, "t");
  8743. break;
  8744. case 'X':
  8745. if (arm_decode_field (given, 12, 12) == 1)
  8746. func (stream, "x");
  8747. break;
  8748. case '0': case '1': case '2': case '3': case '4':
  8749. case '5': case '6': case '7': case '8': case '9':
  8750. {
  8751. int width;
  8752. unsigned long value;
  8753. c = arm_decode_bitfield (c, given, &value, &width);
  8754. switch (*c)
  8755. {
  8756. case 'Z':
  8757. if (value == 13)
  8758. is_unpredictable = true;
  8759. else if (value == 15)
  8760. func (stream, "zr");
  8761. else
  8762. func (stream, "%s", arm_regnames[value]);
  8763. break;
  8764. case 'c':
  8765. func (stream, "%s", arm_conditional[value]);
  8766. break;
  8767. case 'C':
  8768. value ^= 1;
  8769. func (stream, "%s", arm_conditional[value]);
  8770. break;
  8771. case 'S':
  8772. if (value == 13 || value == 15)
  8773. is_unpredictable = true;
  8774. else
  8775. func (stream, "%s", arm_regnames[value]);
  8776. break;
  8777. case 's':
  8778. print_mve_size (info,
  8779. value,
  8780. insn->mve_op);
  8781. break;
  8782. case 'I':
  8783. if (value == 1)
  8784. func (stream, "i");
  8785. break;
  8786. case 'A':
  8787. if (value == 1)
  8788. func (stream, "a");
  8789. break;
  8790. case 'h':
  8791. {
  8792. unsigned int odd_reg = (value << 1) | 1;
  8793. func (stream, "%s", arm_regnames[odd_reg]);
  8794. }
  8795. break;
  8796. case 'i':
  8797. {
  8798. unsigned long imm
  8799. = arm_decode_field (given, 0, 6);
  8800. unsigned long mod_imm = imm;
  8801. switch (insn->mve_op)
  8802. {
  8803. case MVE_VLDRW_GATHER_T5:
  8804. case MVE_VSTRW_SCATTER_T5:
  8805. mod_imm = mod_imm << 2;
  8806. break;
  8807. case MVE_VSTRD_SCATTER_T6:
  8808. case MVE_VLDRD_GATHER_T6:
  8809. mod_imm = mod_imm << 3;
  8810. break;
  8811. default:
  8812. break;
  8813. }
  8814. func (stream, "%lu", mod_imm);
  8815. }
  8816. break;
  8817. case 'k':
  8818. func (stream, "%lu", 64 - value);
  8819. break;
  8820. case 'l':
  8821. {
  8822. unsigned int even_reg = value << 1;
  8823. func (stream, "%s", arm_regnames[even_reg]);
  8824. }
  8825. break;
  8826. case 'u':
  8827. switch (value)
  8828. {
  8829. case 0:
  8830. func (stream, "1");
  8831. break;
  8832. case 1:
  8833. func (stream, "2");
  8834. break;
  8835. case 2:
  8836. func (stream, "4");
  8837. break;
  8838. case 3:
  8839. func (stream, "8");
  8840. break;
  8841. default:
  8842. break;
  8843. }
  8844. break;
  8845. case 'o':
  8846. print_mve_rotate (info, value, width);
  8847. break;
  8848. case 'r':
  8849. func (stream, "%s", arm_regnames[value]);
  8850. break;
  8851. case 'd':
  8852. if (insn->mve_op == MVE_VQSHL_T2
  8853. || insn->mve_op == MVE_VQSHLU_T3
  8854. || insn->mve_op == MVE_VRSHR
  8855. || insn->mve_op == MVE_VRSHRN
  8856. || insn->mve_op == MVE_VSHL_T1
  8857. || insn->mve_op == MVE_VSHLL_T1
  8858. || insn->mve_op == MVE_VSHR
  8859. || insn->mve_op == MVE_VSHRN
  8860. || insn->mve_op == MVE_VSLI
  8861. || insn->mve_op == MVE_VSRI)
  8862. print_mve_shift_n (info, given, insn->mve_op);
  8863. else if (insn->mve_op == MVE_VSHLL_T2)
  8864. {
  8865. switch (value)
  8866. {
  8867. case 0x00:
  8868. func (stream, "8");
  8869. break;
  8870. case 0x01:
  8871. func (stream, "16");
  8872. break;
  8873. case 0x10:
  8874. print_mve_undefined (info, UNDEF_SIZE_0);
  8875. break;
  8876. default:
  8877. assert (0);
  8878. break;
  8879. }
  8880. }
  8881. else
  8882. {
  8883. if (insn->mve_op == MVE_VSHLC && value == 0)
  8884. value = 32;
  8885. func (stream, "%ld", value);
  8886. value_in_comment = value;
  8887. }
  8888. break;
  8889. case 'F':
  8890. func (stream, "s%ld", value);
  8891. break;
  8892. case 'Q':
  8893. if (value & 0x8)
  8894. func (stream, "<illegal reg q%ld.5>", value);
  8895. else
  8896. func (stream, "q%ld", value);
  8897. break;
  8898. case 'x':
  8899. func (stream, "0x%08lx", value);
  8900. break;
  8901. default:
  8902. abort ();
  8903. }
  8904. break;
  8905. default:
  8906. abort ();
  8907. }
  8908. }
  8909. }
  8910. else
  8911. func (stream, "%c", *c);
  8912. }
  8913. if (value_in_comment > 32 || value_in_comment < -16)
  8914. func (stream, "\t; 0x%lx", value_in_comment);
  8915. if (is_unpredictable)
  8916. print_mve_unpredictable (info, unpredictable_cond);
  8917. if (is_undefined)
  8918. print_mve_undefined (info, undefined_cond);
  8919. if (!vpt_block_state.in_vpt_block
  8920. && !ifthen_state
  8921. && is_vpt_instruction (given))
  8922. mark_inside_vpt_block (given);
  8923. else if (vpt_block_state.in_vpt_block)
  8924. update_vpt_block_state ();
  8925. return true;
  8926. }
  8927. }
  8928. return false;
  8929. }
  8930. /* Return the name of a v7A special register. */
  8931. static const char *
  8932. banked_regname (unsigned reg)
  8933. {
  8934. switch (reg)
  8935. {
  8936. case 15: return "CPSR";
  8937. case 32: return "R8_usr";
  8938. case 33: return "R9_usr";
  8939. case 34: return "R10_usr";
  8940. case 35: return "R11_usr";
  8941. case 36: return "R12_usr";
  8942. case 37: return "SP_usr";
  8943. case 38: return "LR_usr";
  8944. case 40: return "R8_fiq";
  8945. case 41: return "R9_fiq";
  8946. case 42: return "R10_fiq";
  8947. case 43: return "R11_fiq";
  8948. case 44: return "R12_fiq";
  8949. case 45: return "SP_fiq";
  8950. case 46: return "LR_fiq";
  8951. case 48: return "LR_irq";
  8952. case 49: return "SP_irq";
  8953. case 50: return "LR_svc";
  8954. case 51: return "SP_svc";
  8955. case 52: return "LR_abt";
  8956. case 53: return "SP_abt";
  8957. case 54: return "LR_und";
  8958. case 55: return "SP_und";
  8959. case 60: return "LR_mon";
  8960. case 61: return "SP_mon";
  8961. case 62: return "ELR_hyp";
  8962. case 63: return "SP_hyp";
  8963. case 79: return "SPSR";
  8964. case 110: return "SPSR_fiq";
  8965. case 112: return "SPSR_irq";
  8966. case 114: return "SPSR_svc";
  8967. case 116: return "SPSR_abt";
  8968. case 118: return "SPSR_und";
  8969. case 124: return "SPSR_mon";
  8970. case 126: return "SPSR_hyp";
  8971. default: return NULL;
  8972. }
  8973. }
  8974. /* Return the name of the DMB/DSB option. */
  8975. static const char *
  8976. data_barrier_option (unsigned option)
  8977. {
  8978. switch (option & 0xf)
  8979. {
  8980. case 0xf: return "sy";
  8981. case 0xe: return "st";
  8982. case 0xd: return "ld";
  8983. case 0xb: return "ish";
  8984. case 0xa: return "ishst";
  8985. case 0x9: return "ishld";
  8986. case 0x7: return "un";
  8987. case 0x6: return "unst";
  8988. case 0x5: return "nshld";
  8989. case 0x3: return "osh";
  8990. case 0x2: return "oshst";
  8991. case 0x1: return "oshld";
  8992. default: return NULL;
  8993. }
  8994. }
  8995. /* Print one ARM instruction from PC on INFO->STREAM. */
  8996. static void
  8997. print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
  8998. {
  8999. const struct opcode32 *insn;
  9000. void *stream = info->stream;
  9001. fprintf_ftype func = info->fprintf_func;
  9002. struct arm_private_data *private_data = info->private_data;
  9003. if (print_insn_coprocessor (pc, info, given, false))
  9004. return;
  9005. if (print_insn_neon (info, given, false))
  9006. return;
  9007. if (print_insn_generic_coprocessor (pc, info, given, false))
  9008. return;
  9009. for (insn = arm_opcodes; insn->assembler; insn++)
  9010. {
  9011. if ((given & insn->mask) != insn->value)
  9012. continue;
  9013. if (! ARM_CPU_HAS_FEATURE (insn->arch, private_data->features))
  9014. continue;
  9015. /* Special case: an instruction with all bits set in the condition field
  9016. (0xFnnn_nnnn) is only matched if all those bits are set in insn->mask,
  9017. or by the catchall at the end of the table. */
  9018. if ((given & 0xF0000000) != 0xF0000000
  9019. || (insn->mask & 0xF0000000) == 0xF0000000
  9020. || (insn->mask == 0 && insn->value == 0))
  9021. {
  9022. unsigned long u_reg = 16;
  9023. unsigned long U_reg = 16;
  9024. bool is_unpredictable = false;
  9025. signed long value_in_comment = 0;
  9026. const char *c;
  9027. for (c = insn->assembler; *c; c++)
  9028. {
  9029. if (*c == '%')
  9030. {
  9031. bool allow_unpredictable = false;
  9032. switch (*++c)
  9033. {
  9034. case '%':
  9035. func (stream, "%%");
  9036. break;
  9037. case 'a':
  9038. value_in_comment = print_arm_address (pc, info, given);
  9039. break;
  9040. case 'P':
  9041. /* Set P address bit and use normal address
  9042. printing routine. */
  9043. value_in_comment = print_arm_address (pc, info, given | (1 << P_BIT));
  9044. break;
  9045. case 'S':
  9046. allow_unpredictable = true;
  9047. /* Fall through. */
  9048. case 's':
  9049. if ((given & 0x004f0000) == 0x004f0000)
  9050. {
  9051. /* PC relative with immediate offset. */
  9052. bfd_vma offset = ((given & 0xf00) >> 4) | (given & 0xf);
  9053. if (PRE_BIT_SET)
  9054. {
  9055. /* Elide positive zero offset. */
  9056. if (offset || NEGATIVE_BIT_SET)
  9057. func (stream, "[pc, #%s%d]\t; ",
  9058. NEGATIVE_BIT_SET ? "-" : "", (int) offset);
  9059. else
  9060. func (stream, "[pc]\t; ");
  9061. if (NEGATIVE_BIT_SET)
  9062. offset = -offset;
  9063. info->print_address_func (offset + pc + 8, info);
  9064. }
  9065. else
  9066. {
  9067. /* Always show the offset. */
  9068. func (stream, "[pc], #%s%d",
  9069. NEGATIVE_BIT_SET ? "-" : "", (int) offset);
  9070. if (! allow_unpredictable)
  9071. is_unpredictable = true;
  9072. }
  9073. }
  9074. else
  9075. {
  9076. int offset = ((given & 0xf00) >> 4) | (given & 0xf);
  9077. func (stream, "[%s",
  9078. arm_regnames[(given >> 16) & 0xf]);
  9079. if (PRE_BIT_SET)
  9080. {
  9081. if (IMMEDIATE_BIT_SET)
  9082. {
  9083. /* Elide offset for non-writeback
  9084. positive zero. */
  9085. if (WRITEBACK_BIT_SET || NEGATIVE_BIT_SET
  9086. || offset)
  9087. func (stream, ", #%s%d",
  9088. NEGATIVE_BIT_SET ? "-" : "", offset);
  9089. if (NEGATIVE_BIT_SET)
  9090. offset = -offset;
  9091. value_in_comment = offset;
  9092. }
  9093. else
  9094. {
  9095. /* Register Offset or Register Pre-Indexed. */
  9096. func (stream, ", %s%s",
  9097. NEGATIVE_BIT_SET ? "-" : "",
  9098. arm_regnames[given & 0xf]);
  9099. /* Writing back to the register that is the source/
  9100. destination of the load/store is unpredictable. */
  9101. if (! allow_unpredictable
  9102. && WRITEBACK_BIT_SET
  9103. && ((given & 0xf) == ((given >> 12) & 0xf)))
  9104. is_unpredictable = true;
  9105. }
  9106. func (stream, "]%s",
  9107. WRITEBACK_BIT_SET ? "!" : "");
  9108. }
  9109. else
  9110. {
  9111. if (IMMEDIATE_BIT_SET)
  9112. {
  9113. /* Immediate Post-indexed. */
  9114. /* PR 10924: Offset must be printed, even if it is zero. */
  9115. func (stream, "], #%s%d",
  9116. NEGATIVE_BIT_SET ? "-" : "", offset);
  9117. if (NEGATIVE_BIT_SET)
  9118. offset = -offset;
  9119. value_in_comment = offset;
  9120. }
  9121. else
  9122. {
  9123. /* Register Post-indexed. */
  9124. func (stream, "], %s%s",
  9125. NEGATIVE_BIT_SET ? "-" : "",
  9126. arm_regnames[given & 0xf]);
  9127. /* Writing back to the register that is the source/
  9128. destination of the load/store is unpredictable. */
  9129. if (! allow_unpredictable
  9130. && (given & 0xf) == ((given >> 12) & 0xf))
  9131. is_unpredictable = true;
  9132. }
  9133. if (! allow_unpredictable)
  9134. {
  9135. /* Writeback is automatically implied by post- addressing.
  9136. Setting the W bit is unnecessary and ARM specify it as
  9137. being unpredictable. */
  9138. if (WRITEBACK_BIT_SET
  9139. /* Specifying the PC register as the post-indexed
  9140. registers is also unpredictable. */
  9141. || (! IMMEDIATE_BIT_SET && ((given & 0xf) == 0xf)))
  9142. is_unpredictable = true;
  9143. }
  9144. }
  9145. }
  9146. break;
  9147. case 'b':
  9148. {
  9149. bfd_vma disp = (((given & 0xffffff) ^ 0x800000) - 0x800000);
  9150. bfd_vma target = disp * 4 + pc + 8;
  9151. info->print_address_func (target, info);
  9152. /* Fill in instruction information. */
  9153. info->insn_info_valid = 1;
  9154. info->insn_type = dis_branch;
  9155. info->target = target;
  9156. }
  9157. break;
  9158. case 'c':
  9159. if (((given >> 28) & 0xf) != 0xe)
  9160. func (stream, "%s",
  9161. arm_conditional [(given >> 28) & 0xf]);
  9162. break;
  9163. case 'm':
  9164. {
  9165. int started = 0;
  9166. int reg;
  9167. func (stream, "{");
  9168. for (reg = 0; reg < 16; reg++)
  9169. if ((given & (1 << reg)) != 0)
  9170. {
  9171. if (started)
  9172. func (stream, ", ");
  9173. started = 1;
  9174. func (stream, "%s", arm_regnames[reg]);
  9175. }
  9176. func (stream, "}");
  9177. if (! started)
  9178. is_unpredictable = true;
  9179. }
  9180. break;
  9181. case 'q':
  9182. arm_decode_shift (given, func, stream, false);
  9183. break;
  9184. case 'o':
  9185. if ((given & 0x02000000) != 0)
  9186. {
  9187. unsigned int rotate = (given & 0xf00) >> 7;
  9188. unsigned int immed = (given & 0xff);
  9189. unsigned int a, i;
  9190. a = (immed << ((32 - rotate) & 31)
  9191. | immed >> rotate) & 0xffffffff;
  9192. /* If there is another encoding with smaller rotate,
  9193. the rotate should be specified directly. */
  9194. for (i = 0; i < 32; i += 2)
  9195. if ((a << i | a >> ((32 - i) & 31)) <= 0xff)
  9196. break;
  9197. if (i != rotate)
  9198. func (stream, "#%d, %d", immed, rotate);
  9199. else
  9200. func (stream, "#%d", a);
  9201. value_in_comment = a;
  9202. }
  9203. else
  9204. arm_decode_shift (given, func, stream, true);
  9205. break;
  9206. case 'p':
  9207. if ((given & 0x0000f000) == 0x0000f000)
  9208. {
  9209. arm_feature_set arm_ext_v6 =
  9210. ARM_FEATURE_CORE_LOW (ARM_EXT_V6);
  9211. /* The p-variants of tst/cmp/cmn/teq are the pre-V6
  9212. mechanism for setting PSR flag bits. They are
  9213. obsolete in V6 onwards. */
  9214. if (! ARM_CPU_HAS_FEATURE (private_data->features, \
  9215. arm_ext_v6))
  9216. func (stream, "p");
  9217. else
  9218. is_unpredictable = true;
  9219. }
  9220. break;
  9221. case 't':
  9222. if ((given & 0x01200000) == 0x00200000)
  9223. func (stream, "t");
  9224. break;
  9225. case 'A':
  9226. {
  9227. int offset = given & 0xff;
  9228. value_in_comment = offset * 4;
  9229. if (NEGATIVE_BIT_SET)
  9230. value_in_comment = - value_in_comment;
  9231. func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
  9232. if (PRE_BIT_SET)
  9233. {
  9234. if (offset)
  9235. func (stream, ", #%d]%s",
  9236. (int) value_in_comment,
  9237. WRITEBACK_BIT_SET ? "!" : "");
  9238. else
  9239. func (stream, "]");
  9240. }
  9241. else
  9242. {
  9243. func (stream, "]");
  9244. if (WRITEBACK_BIT_SET)
  9245. {
  9246. if (offset)
  9247. func (stream, ", #%d", (int) value_in_comment);
  9248. }
  9249. else
  9250. {
  9251. func (stream, ", {%d}", (int) offset);
  9252. value_in_comment = offset;
  9253. }
  9254. }
  9255. }
  9256. break;
  9257. case 'B':
  9258. /* Print ARM V5 BLX(1) address: pc+25 bits. */
  9259. {
  9260. bfd_vma address;
  9261. bfd_vma offset = 0;
  9262. if (! NEGATIVE_BIT_SET)
  9263. /* Is signed, hi bits should be ones. */
  9264. offset = (-1) ^ 0x00ffffff;
  9265. /* Offset is (SignExtend(offset field)<<2). */
  9266. offset += given & 0x00ffffff;
  9267. offset <<= 2;
  9268. address = offset + pc + 8;
  9269. if (given & 0x01000000)
  9270. /* H bit allows addressing to 2-byte boundaries. */
  9271. address += 2;
  9272. info->print_address_func (address, info);
  9273. /* Fill in instruction information. */
  9274. info->insn_info_valid = 1;
  9275. info->insn_type = dis_branch;
  9276. info->target = address;
  9277. }
  9278. break;
  9279. case 'C':
  9280. if ((given & 0x02000200) == 0x200)
  9281. {
  9282. const char * name;
  9283. unsigned sysm = (given & 0x004f0000) >> 16;
  9284. sysm |= (given & 0x300) >> 4;
  9285. name = banked_regname (sysm);
  9286. if (name != NULL)
  9287. func (stream, "%s", name);
  9288. else
  9289. func (stream, "(UNDEF: %lu)", (unsigned long) sysm);
  9290. }
  9291. else
  9292. {
  9293. func (stream, "%cPSR_",
  9294. (given & 0x00400000) ? 'S' : 'C');
  9295. if (given & 0x80000)
  9296. func (stream, "f");
  9297. if (given & 0x40000)
  9298. func (stream, "s");
  9299. if (given & 0x20000)
  9300. func (stream, "x");
  9301. if (given & 0x10000)
  9302. func (stream, "c");
  9303. }
  9304. break;
  9305. case 'U':
  9306. if ((given & 0xf0) == 0x60)
  9307. {
  9308. switch (given & 0xf)
  9309. {
  9310. case 0xf: func (stream, "sy"); break;
  9311. default:
  9312. func (stream, "#%d", (int) given & 0xf);
  9313. break;
  9314. }
  9315. }
  9316. else
  9317. {
  9318. const char * opt = data_barrier_option (given & 0xf);
  9319. if (opt != NULL)
  9320. func (stream, "%s", opt);
  9321. else
  9322. func (stream, "#%d", (int) given & 0xf);
  9323. }
  9324. break;
  9325. case '0': case '1': case '2': case '3': case '4':
  9326. case '5': case '6': case '7': case '8': case '9':
  9327. {
  9328. int width;
  9329. unsigned long value;
  9330. c = arm_decode_bitfield (c, given, &value, &width);
  9331. switch (*c)
  9332. {
  9333. case 'R':
  9334. if (value == 15)
  9335. is_unpredictable = true;
  9336. /* Fall through. */
  9337. case 'r':
  9338. case 'T':
  9339. /* We want register + 1 when decoding T. */
  9340. if (*c == 'T')
  9341. value = (value + 1) & 0xf;
  9342. if (c[1] == 'u')
  9343. {
  9344. /* Eat the 'u' character. */
  9345. ++ c;
  9346. if (u_reg == value)
  9347. is_unpredictable = true;
  9348. u_reg = value;
  9349. }
  9350. if (c[1] == 'U')
  9351. {
  9352. /* Eat the 'U' character. */
  9353. ++ c;
  9354. if (U_reg == value)
  9355. is_unpredictable = true;
  9356. U_reg = value;
  9357. }
  9358. func (stream, "%s", arm_regnames[value]);
  9359. break;
  9360. case 'd':
  9361. func (stream, "%ld", value);
  9362. value_in_comment = value;
  9363. break;
  9364. case 'b':
  9365. func (stream, "%ld", value * 8);
  9366. value_in_comment = value * 8;
  9367. break;
  9368. case 'W':
  9369. func (stream, "%ld", value + 1);
  9370. value_in_comment = value + 1;
  9371. break;
  9372. case 'x':
  9373. func (stream, "0x%08lx", value);
  9374. /* Some SWI instructions have special
  9375. meanings. */
  9376. if ((given & 0x0fffffff) == 0x0FF00000)
  9377. func (stream, "\t; IMB");
  9378. else if ((given & 0x0fffffff) == 0x0FF00001)
  9379. func (stream, "\t; IMBRange");
  9380. break;
  9381. case 'X':
  9382. func (stream, "%01lx", value & 0xf);
  9383. value_in_comment = value;
  9384. break;
  9385. case '`':
  9386. c++;
  9387. if (value == 0)
  9388. func (stream, "%c", *c);
  9389. break;
  9390. case '\'':
  9391. c++;
  9392. if (value == ((1ul << width) - 1))
  9393. func (stream, "%c", *c);
  9394. break;
  9395. case '?':
  9396. func (stream, "%c", c[(1 << width) - (int) value]);
  9397. c += 1 << width;
  9398. break;
  9399. default:
  9400. abort ();
  9401. }
  9402. }
  9403. break;
  9404. case 'e':
  9405. {
  9406. int imm;
  9407. imm = (given & 0xf) | ((given & 0xfff00) >> 4);
  9408. func (stream, "%d", imm);
  9409. value_in_comment = imm;
  9410. }
  9411. break;
  9412. case 'E':
  9413. /* LSB and WIDTH fields of BFI or BFC. The machine-
  9414. language instruction encodes LSB and MSB. */
  9415. {
  9416. long msb = (given & 0x001f0000) >> 16;
  9417. long lsb = (given & 0x00000f80) >> 7;
  9418. long w = msb - lsb + 1;
  9419. if (w > 0)
  9420. func (stream, "#%lu, #%lu", lsb, w);
  9421. else
  9422. func (stream, "(invalid: %lu:%lu)", lsb, msb);
  9423. }
  9424. break;
  9425. case 'R':
  9426. /* Get the PSR/banked register name. */
  9427. {
  9428. const char * name;
  9429. unsigned sysm = (given & 0x004f0000) >> 16;
  9430. sysm |= (given & 0x300) >> 4;
  9431. name = banked_regname (sysm);
  9432. if (name != NULL)
  9433. func (stream, "%s", name);
  9434. else
  9435. func (stream, "(UNDEF: %lu)", (unsigned long) sysm);
  9436. }
  9437. break;
  9438. case 'V':
  9439. /* 16-bit unsigned immediate from a MOVT or MOVW
  9440. instruction, encoded in bits 0:11 and 15:19. */
  9441. {
  9442. long hi = (given & 0x000f0000) >> 4;
  9443. long lo = (given & 0x00000fff);
  9444. long imm16 = hi | lo;
  9445. func (stream, "#%lu", imm16);
  9446. value_in_comment = imm16;
  9447. }
  9448. break;
  9449. default:
  9450. abort ();
  9451. }
  9452. }
  9453. else
  9454. func (stream, "%c", *c);
  9455. }
  9456. if (value_in_comment > 32 || value_in_comment < -16)
  9457. func (stream, "\t; 0x%lx", (value_in_comment & 0xffffffffUL));
  9458. if (is_unpredictable)
  9459. func (stream, UNPREDICTABLE_INSTRUCTION);
  9460. return;
  9461. }
  9462. }
  9463. func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
  9464. return;
  9465. }
  9466. /* Print one 16-bit Thumb instruction from PC on INFO->STREAM. */
  9467. static void
  9468. print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
  9469. {
  9470. const struct opcode16 *insn;
  9471. void *stream = info->stream;
  9472. fprintf_ftype func = info->fprintf_func;
  9473. for (insn = thumb_opcodes; insn->assembler; insn++)
  9474. if ((given & insn->mask) == insn->value)
  9475. {
  9476. signed long value_in_comment = 0;
  9477. const char *c = insn->assembler;
  9478. for (; *c; c++)
  9479. {
  9480. int domaskpc = 0;
  9481. int domasklr = 0;
  9482. if (*c != '%')
  9483. {
  9484. func (stream, "%c", *c);
  9485. continue;
  9486. }
  9487. switch (*++c)
  9488. {
  9489. case '%':
  9490. func (stream, "%%");
  9491. break;
  9492. case 'c':
  9493. if (ifthen_state)
  9494. func (stream, "%s", arm_conditional[IFTHEN_COND]);
  9495. break;
  9496. case 'C':
  9497. if (ifthen_state)
  9498. func (stream, "%s", arm_conditional[IFTHEN_COND]);
  9499. else
  9500. func (stream, "s");
  9501. break;
  9502. case 'I':
  9503. {
  9504. unsigned int tmp;
  9505. ifthen_next_state = given & 0xff;
  9506. for (tmp = given << 1; tmp & 0xf; tmp <<= 1)
  9507. func (stream, ((given ^ tmp) & 0x10) ? "e" : "t");
  9508. func (stream, "\t%s", arm_conditional[(given >> 4) & 0xf]);
  9509. }
  9510. break;
  9511. case 'x':
  9512. if (ifthen_next_state)
  9513. func (stream, "\t; unpredictable branch in IT block\n");
  9514. break;
  9515. case 'X':
  9516. if (ifthen_state)
  9517. func (stream, "\t; unpredictable <IT:%s>",
  9518. arm_conditional[IFTHEN_COND]);
  9519. break;
  9520. case 'S':
  9521. {
  9522. long reg;
  9523. reg = (given >> 3) & 0x7;
  9524. if (given & (1 << 6))
  9525. reg += 8;
  9526. func (stream, "%s", arm_regnames[reg]);
  9527. }
  9528. break;
  9529. case 'D':
  9530. {
  9531. long reg;
  9532. reg = given & 0x7;
  9533. if (given & (1 << 7))
  9534. reg += 8;
  9535. func (stream, "%s", arm_regnames[reg]);
  9536. }
  9537. break;
  9538. case 'N':
  9539. if (given & (1 << 8))
  9540. domasklr = 1;
  9541. /* Fall through. */
  9542. case 'O':
  9543. if (*c == 'O' && (given & (1 << 8)))
  9544. domaskpc = 1;
  9545. /* Fall through. */
  9546. case 'M':
  9547. {
  9548. int started = 0;
  9549. int reg;
  9550. func (stream, "{");
  9551. /* It would be nice if we could spot
  9552. ranges, and generate the rS-rE format: */
  9553. for (reg = 0; (reg < 8); reg++)
  9554. if ((given & (1 << reg)) != 0)
  9555. {
  9556. if (started)
  9557. func (stream, ", ");
  9558. started = 1;
  9559. func (stream, "%s", arm_regnames[reg]);
  9560. }
  9561. if (domasklr)
  9562. {
  9563. if (started)
  9564. func (stream, ", ");
  9565. started = 1;
  9566. func (stream, "%s", arm_regnames[14] /* "lr" */);
  9567. }
  9568. if (domaskpc)
  9569. {
  9570. if (started)
  9571. func (stream, ", ");
  9572. func (stream, "%s", arm_regnames[15] /* "pc" */);
  9573. }
  9574. func (stream, "}");
  9575. }
  9576. break;
  9577. case 'W':
  9578. /* Print writeback indicator for a LDMIA. We are doing a
  9579. writeback if the base register is not in the register
  9580. mask. */
  9581. if ((given & (1 << ((given & 0x0700) >> 8))) == 0)
  9582. func (stream, "!");
  9583. break;
  9584. case 'b':
  9585. /* Print ARM V6T2 CZB address: pc+4+6 bits. */
  9586. {
  9587. bfd_vma address = (pc + 4
  9588. + ((given & 0x00f8) >> 2)
  9589. + ((given & 0x0200) >> 3));
  9590. info->print_address_func (address, info);
  9591. /* Fill in instruction information. */
  9592. info->insn_info_valid = 1;
  9593. info->insn_type = dis_branch;
  9594. info->target = address;
  9595. }
  9596. break;
  9597. case 's':
  9598. /* Right shift immediate -- bits 6..10; 1-31 print
  9599. as themselves, 0 prints as 32. */
  9600. {
  9601. long imm = (given & 0x07c0) >> 6;
  9602. if (imm == 0)
  9603. imm = 32;
  9604. func (stream, "#%ld", imm);
  9605. }
  9606. break;
  9607. case '0': case '1': case '2': case '3': case '4':
  9608. case '5': case '6': case '7': case '8': case '9':
  9609. {
  9610. int bitstart = *c++ - '0';
  9611. int bitend = 0;
  9612. while (*c >= '0' && *c <= '9')
  9613. bitstart = (bitstart * 10) + *c++ - '0';
  9614. switch (*c)
  9615. {
  9616. case '-':
  9617. {
  9618. bfd_vma reg;
  9619. c++;
  9620. while (*c >= '0' && *c <= '9')
  9621. bitend = (bitend * 10) + *c++ - '0';
  9622. if (!bitend)
  9623. abort ();
  9624. reg = given >> bitstart;
  9625. reg &= ((bfd_vma) 2 << (bitend - bitstart)) - 1;
  9626. switch (*c)
  9627. {
  9628. case 'r':
  9629. func (stream, "%s", arm_regnames[reg]);
  9630. break;
  9631. case 'd':
  9632. func (stream, "%ld", (long) reg);
  9633. value_in_comment = reg;
  9634. break;
  9635. case 'H':
  9636. func (stream, "%ld", (long) (reg << 1));
  9637. value_in_comment = reg << 1;
  9638. break;
  9639. case 'W':
  9640. func (stream, "%ld", (long) (reg << 2));
  9641. value_in_comment = reg << 2;
  9642. break;
  9643. case 'a':
  9644. /* PC-relative address -- the bottom two
  9645. bits of the address are dropped
  9646. before the calculation. */
  9647. info->print_address_func
  9648. (((pc + 4) & ~3) + (reg << 2), info);
  9649. value_in_comment = 0;
  9650. break;
  9651. case 'x':
  9652. func (stream, "0x%04lx", (long) reg);
  9653. break;
  9654. case 'B':
  9655. reg = ((reg ^ (1 << bitend)) - (1 << bitend));
  9656. bfd_vma target = reg * 2 + pc + 4;
  9657. info->print_address_func (target, info);
  9658. value_in_comment = 0;
  9659. /* Fill in instruction information. */
  9660. info->insn_info_valid = 1;
  9661. info->insn_type = dis_branch;
  9662. info->target = target;
  9663. break;
  9664. case 'c':
  9665. func (stream, "%s", arm_conditional [reg]);
  9666. break;
  9667. default:
  9668. abort ();
  9669. }
  9670. }
  9671. break;
  9672. case '\'':
  9673. c++;
  9674. if ((given & (1 << bitstart)) != 0)
  9675. func (stream, "%c", *c);
  9676. break;
  9677. case '?':
  9678. ++c;
  9679. if ((given & (1 << bitstart)) != 0)
  9680. func (stream, "%c", *c++);
  9681. else
  9682. func (stream, "%c", *++c);
  9683. break;
  9684. default:
  9685. abort ();
  9686. }
  9687. }
  9688. break;
  9689. default:
  9690. abort ();
  9691. }
  9692. }
  9693. if (value_in_comment > 32 || value_in_comment < -16)
  9694. func (stream, "\t; 0x%lx", value_in_comment);
  9695. return;
  9696. }
  9697. /* No match. */
  9698. func (stream, UNKNOWN_INSTRUCTION_16BIT, (unsigned)given);
  9699. return;
  9700. }
  9701. /* Return the name of an V7M special register. */
  9702. static const char *
  9703. psr_name (int regno)
  9704. {
  9705. switch (regno)
  9706. {
  9707. case 0x0: return "APSR";
  9708. case 0x1: return "IAPSR";
  9709. case 0x2: return "EAPSR";
  9710. case 0x3: return "PSR";
  9711. case 0x5: return "IPSR";
  9712. case 0x6: return "EPSR";
  9713. case 0x7: return "IEPSR";
  9714. case 0x8: return "MSP";
  9715. case 0x9: return "PSP";
  9716. case 0xa: return "MSPLIM";
  9717. case 0xb: return "PSPLIM";
  9718. case 0x10: return "PRIMASK";
  9719. case 0x11: return "BASEPRI";
  9720. case 0x12: return "BASEPRI_MAX";
  9721. case 0x13: return "FAULTMASK";
  9722. case 0x14: return "CONTROL";
  9723. case 0x88: return "MSP_NS";
  9724. case 0x89: return "PSP_NS";
  9725. case 0x8a: return "MSPLIM_NS";
  9726. case 0x8b: return "PSPLIM_NS";
  9727. case 0x90: return "PRIMASK_NS";
  9728. case 0x91: return "BASEPRI_NS";
  9729. case 0x93: return "FAULTMASK_NS";
  9730. case 0x94: return "CONTROL_NS";
  9731. case 0x98: return "SP_NS";
  9732. default: return "<unknown>";
  9733. }
  9734. }
  9735. /* Print one 32-bit Thumb instruction from PC on INFO->STREAM. */
  9736. static void
  9737. print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
  9738. {
  9739. const struct opcode32 *insn;
  9740. void *stream = info->stream;
  9741. fprintf_ftype func = info->fprintf_func;
  9742. bool is_mve = is_mve_architecture (info);
  9743. if (print_insn_coprocessor (pc, info, given, true))
  9744. return;
  9745. if (!is_mve && print_insn_neon (info, given, true))
  9746. return;
  9747. if (is_mve && print_insn_mve (info, given))
  9748. return;
  9749. if (print_insn_cde (info, given, true))
  9750. return;
  9751. if (print_insn_generic_coprocessor (pc, info, given, true))
  9752. return;
  9753. for (insn = thumb32_opcodes; insn->assembler; insn++)
  9754. if ((given & insn->mask) == insn->value)
  9755. {
  9756. bool is_clrm = false;
  9757. bool is_unpredictable = false;
  9758. signed long value_in_comment = 0;
  9759. const char *c = insn->assembler;
  9760. for (; *c; c++)
  9761. {
  9762. if (*c != '%')
  9763. {
  9764. func (stream, "%c", *c);
  9765. continue;
  9766. }
  9767. switch (*++c)
  9768. {
  9769. case '%':
  9770. func (stream, "%%");
  9771. break;
  9772. case 'c':
  9773. if (ifthen_state)
  9774. func (stream, "%s", arm_conditional[IFTHEN_COND]);
  9775. break;
  9776. case 'x':
  9777. if (ifthen_next_state)
  9778. func (stream, "\t; unpredictable branch in IT block\n");
  9779. break;
  9780. case 'X':
  9781. if (ifthen_state)
  9782. func (stream, "\t; unpredictable <IT:%s>",
  9783. arm_conditional[IFTHEN_COND]);
  9784. break;
  9785. case 'I':
  9786. {
  9787. unsigned int imm12 = 0;
  9788. imm12 |= (given & 0x000000ffu);
  9789. imm12 |= (given & 0x00007000u) >> 4;
  9790. imm12 |= (given & 0x04000000u) >> 15;
  9791. func (stream, "#%u", imm12);
  9792. value_in_comment = imm12;
  9793. }
  9794. break;
  9795. case 'M':
  9796. {
  9797. unsigned int bits = 0, imm, imm8, mod;
  9798. bits |= (given & 0x000000ffu);
  9799. bits |= (given & 0x00007000u) >> 4;
  9800. bits |= (given & 0x04000000u) >> 15;
  9801. imm8 = (bits & 0x0ff);
  9802. mod = (bits & 0xf00) >> 8;
  9803. switch (mod)
  9804. {
  9805. case 0: imm = imm8; break;
  9806. case 1: imm = ((imm8 << 16) | imm8); break;
  9807. case 2: imm = ((imm8 << 24) | (imm8 << 8)); break;
  9808. case 3: imm = ((imm8 << 24) | (imm8 << 16) | (imm8 << 8) | imm8); break;
  9809. default:
  9810. mod = (bits & 0xf80) >> 7;
  9811. imm8 = (bits & 0x07f) | 0x80;
  9812. imm = (((imm8 << (32 - mod)) | (imm8 >> mod)) & 0xffffffff);
  9813. }
  9814. func (stream, "#%u", imm);
  9815. value_in_comment = imm;
  9816. }
  9817. break;
  9818. case 'J':
  9819. {
  9820. unsigned int imm = 0;
  9821. imm |= (given & 0x000000ffu);
  9822. imm |= (given & 0x00007000u) >> 4;
  9823. imm |= (given & 0x04000000u) >> 15;
  9824. imm |= (given & 0x000f0000u) >> 4;
  9825. func (stream, "#%u", imm);
  9826. value_in_comment = imm;
  9827. }
  9828. break;
  9829. case 'K':
  9830. {
  9831. unsigned int imm = 0;
  9832. imm |= (given & 0x000f0000u) >> 16;
  9833. imm |= (given & 0x00000ff0u) >> 0;
  9834. imm |= (given & 0x0000000fu) << 12;
  9835. func (stream, "#%u", imm);
  9836. value_in_comment = imm;
  9837. }
  9838. break;
  9839. case 'H':
  9840. {
  9841. unsigned int imm = 0;
  9842. imm |= (given & 0x000f0000u) >> 4;
  9843. imm |= (given & 0x00000fffu) >> 0;
  9844. func (stream, "#%u", imm);
  9845. value_in_comment = imm;
  9846. }
  9847. break;
  9848. case 'V':
  9849. {
  9850. unsigned int imm = 0;
  9851. imm |= (given & 0x00000fffu);
  9852. imm |= (given & 0x000f0000u) >> 4;
  9853. func (stream, "#%u", imm);
  9854. value_in_comment = imm;
  9855. }
  9856. break;
  9857. case 'S':
  9858. {
  9859. unsigned int reg = (given & 0x0000000fu);
  9860. unsigned int stp = (given & 0x00000030u) >> 4;
  9861. unsigned int imm = 0;
  9862. imm |= (given & 0x000000c0u) >> 6;
  9863. imm |= (given & 0x00007000u) >> 10;
  9864. func (stream, "%s", arm_regnames[reg]);
  9865. switch (stp)
  9866. {
  9867. case 0:
  9868. if (imm > 0)
  9869. func (stream, ", lsl #%u", imm);
  9870. break;
  9871. case 1:
  9872. if (imm == 0)
  9873. imm = 32;
  9874. func (stream, ", lsr #%u", imm);
  9875. break;
  9876. case 2:
  9877. if (imm == 0)
  9878. imm = 32;
  9879. func (stream, ", asr #%u", imm);
  9880. break;
  9881. case 3:
  9882. if (imm == 0)
  9883. func (stream, ", rrx");
  9884. else
  9885. func (stream, ", ror #%u", imm);
  9886. }
  9887. }
  9888. break;
  9889. case 'a':
  9890. {
  9891. unsigned int Rn = (given & 0x000f0000) >> 16;
  9892. unsigned int U = ! NEGATIVE_BIT_SET;
  9893. unsigned int op = (given & 0x00000f00) >> 8;
  9894. unsigned int i12 = (given & 0x00000fff);
  9895. unsigned int i8 = (given & 0x000000ff);
  9896. bool writeback = false, postind = false;
  9897. bfd_vma offset = 0;
  9898. func (stream, "[%s", arm_regnames[Rn]);
  9899. if (U) /* 12-bit positive immediate offset. */
  9900. {
  9901. offset = i12;
  9902. if (Rn != 15)
  9903. value_in_comment = offset;
  9904. }
  9905. else if (Rn == 15) /* 12-bit negative immediate offset. */
  9906. offset = - (int) i12;
  9907. else if (op == 0x0) /* Shifted register offset. */
  9908. {
  9909. unsigned int Rm = (i8 & 0x0f);
  9910. unsigned int sh = (i8 & 0x30) >> 4;
  9911. func (stream, ", %s", arm_regnames[Rm]);
  9912. if (sh)
  9913. func (stream, ", lsl #%u", sh);
  9914. func (stream, "]");
  9915. break;
  9916. }
  9917. else switch (op)
  9918. {
  9919. case 0xE: /* 8-bit positive immediate offset. */
  9920. offset = i8;
  9921. break;
  9922. case 0xC: /* 8-bit negative immediate offset. */
  9923. offset = -i8;
  9924. break;
  9925. case 0xF: /* 8-bit + preindex with wb. */
  9926. offset = i8;
  9927. writeback = true;
  9928. break;
  9929. case 0xD: /* 8-bit - preindex with wb. */
  9930. offset = -i8;
  9931. writeback = true;
  9932. break;
  9933. case 0xB: /* 8-bit + postindex. */
  9934. offset = i8;
  9935. postind = true;
  9936. break;
  9937. case 0x9: /* 8-bit - postindex. */
  9938. offset = -i8;
  9939. postind = true;
  9940. break;
  9941. default:
  9942. func (stream, ", <undefined>]");
  9943. goto skip;
  9944. }
  9945. if (postind)
  9946. func (stream, "], #%d", (int) offset);
  9947. else
  9948. {
  9949. if (offset)
  9950. func (stream, ", #%d", (int) offset);
  9951. func (stream, writeback ? "]!" : "]");
  9952. }
  9953. if (Rn == 15)
  9954. {
  9955. func (stream, "\t; ");
  9956. info->print_address_func (((pc + 4) & ~3) + offset, info);
  9957. }
  9958. }
  9959. skip:
  9960. break;
  9961. case 'A':
  9962. {
  9963. unsigned int U = ! NEGATIVE_BIT_SET;
  9964. unsigned int W = WRITEBACK_BIT_SET;
  9965. unsigned int Rn = (given & 0x000f0000) >> 16;
  9966. unsigned int off = (given & 0x000000ff);
  9967. func (stream, "[%s", arm_regnames[Rn]);
  9968. if (PRE_BIT_SET)
  9969. {
  9970. if (off || !U)
  9971. {
  9972. func (stream, ", #%c%u", U ? '+' : '-', off * 4);
  9973. value_in_comment = off * 4 * (U ? 1 : -1);
  9974. }
  9975. func (stream, "]");
  9976. if (W)
  9977. func (stream, "!");
  9978. }
  9979. else
  9980. {
  9981. func (stream, "], ");
  9982. if (W)
  9983. {
  9984. func (stream, "#%c%u", U ? '+' : '-', off * 4);
  9985. value_in_comment = off * 4 * (U ? 1 : -1);
  9986. }
  9987. else
  9988. {
  9989. func (stream, "{%u}", off);
  9990. value_in_comment = off;
  9991. }
  9992. }
  9993. }
  9994. break;
  9995. case 'w':
  9996. {
  9997. unsigned int Sbit = (given & 0x01000000) >> 24;
  9998. unsigned int type = (given & 0x00600000) >> 21;
  9999. switch (type)
  10000. {
  10001. case 0: func (stream, Sbit ? "sb" : "b"); break;
  10002. case 1: func (stream, Sbit ? "sh" : "h"); break;
  10003. case 2:
  10004. if (Sbit)
  10005. func (stream, "??");
  10006. break;
  10007. case 3:
  10008. func (stream, "??");
  10009. break;
  10010. }
  10011. }
  10012. break;
  10013. case 'n':
  10014. is_clrm = true;
  10015. /* Fall through. */
  10016. case 'm':
  10017. {
  10018. int started = 0;
  10019. int reg;
  10020. func (stream, "{");
  10021. for (reg = 0; reg < 16; reg++)
  10022. if ((given & (1 << reg)) != 0)
  10023. {
  10024. if (started)
  10025. func (stream, ", ");
  10026. started = 1;
  10027. if (is_clrm && reg == 13)
  10028. func (stream, "(invalid: %s)", arm_regnames[reg]);
  10029. else if (is_clrm && reg == 15)
  10030. func (stream, "%s", "APSR");
  10031. else
  10032. func (stream, "%s", arm_regnames[reg]);
  10033. }
  10034. func (stream, "}");
  10035. }
  10036. break;
  10037. case 'E':
  10038. {
  10039. unsigned int msb = (given & 0x0000001f);
  10040. unsigned int lsb = 0;
  10041. lsb |= (given & 0x000000c0u) >> 6;
  10042. lsb |= (given & 0x00007000u) >> 10;
  10043. func (stream, "#%u, #%u", lsb, msb - lsb + 1);
  10044. }
  10045. break;
  10046. case 'F':
  10047. {
  10048. unsigned int width = (given & 0x0000001f) + 1;
  10049. unsigned int lsb = 0;
  10050. lsb |= (given & 0x000000c0u) >> 6;
  10051. lsb |= (given & 0x00007000u) >> 10;
  10052. func (stream, "#%u, #%u", lsb, width);
  10053. }
  10054. break;
  10055. case 'G':
  10056. {
  10057. unsigned int boff = (((given & 0x07800000) >> 23) << 1);
  10058. func (stream, "%x", boff);
  10059. }
  10060. break;
  10061. case 'W':
  10062. {
  10063. unsigned int immA = (given & 0x001f0000u) >> 16;
  10064. unsigned int immB = (given & 0x000007feu) >> 1;
  10065. unsigned int immC = (given & 0x00000800u) >> 11;
  10066. bfd_vma offset = 0;
  10067. offset |= immA << 12;
  10068. offset |= immB << 2;
  10069. offset |= immC << 1;
  10070. /* Sign extend. */
  10071. offset = (offset & 0x10000) ? offset - (1 << 17) : offset;
  10072. info->print_address_func (pc + 4 + offset, info);
  10073. }
  10074. break;
  10075. case 'Y':
  10076. {
  10077. unsigned int immA = (given & 0x007f0000u) >> 16;
  10078. unsigned int immB = (given & 0x000007feu) >> 1;
  10079. unsigned int immC = (given & 0x00000800u) >> 11;
  10080. bfd_vma offset = 0;
  10081. offset |= immA << 12;
  10082. offset |= immB << 2;
  10083. offset |= immC << 1;
  10084. /* Sign extend. */
  10085. offset = (offset & 0x40000) ? offset - (1 << 19) : offset;
  10086. info->print_address_func (pc + 4 + offset, info);
  10087. }
  10088. break;
  10089. case 'Z':
  10090. {
  10091. unsigned int immA = (given & 0x00010000u) >> 16;
  10092. unsigned int immB = (given & 0x000007feu) >> 1;
  10093. unsigned int immC = (given & 0x00000800u) >> 11;
  10094. bfd_vma offset = 0;
  10095. offset |= immA << 12;
  10096. offset |= immB << 2;
  10097. offset |= immC << 1;
  10098. /* Sign extend. */
  10099. offset = (offset & 0x1000) ? offset - (1 << 13) : offset;
  10100. info->print_address_func (pc + 4 + offset, info);
  10101. unsigned int T = (given & 0x00020000u) >> 17;
  10102. unsigned int endoffset = (((given & 0x07800000) >> 23) << 1);
  10103. unsigned int boffset = (T == 1) ? 4 : 2;
  10104. func (stream, ", ");
  10105. func (stream, "%x", endoffset + boffset);
  10106. }
  10107. break;
  10108. case 'Q':
  10109. {
  10110. unsigned int immh = (given & 0x000007feu) >> 1;
  10111. unsigned int imml = (given & 0x00000800u) >> 11;
  10112. bfd_vma imm32 = 0;
  10113. imm32 |= immh << 2;
  10114. imm32 |= imml << 1;
  10115. info->print_address_func (pc + 4 + imm32, info);
  10116. }
  10117. break;
  10118. case 'P':
  10119. {
  10120. unsigned int immh = (given & 0x000007feu) >> 1;
  10121. unsigned int imml = (given & 0x00000800u) >> 11;
  10122. bfd_vma imm32 = 0;
  10123. imm32 |= immh << 2;
  10124. imm32 |= imml << 1;
  10125. info->print_address_func (pc + 4 - imm32, info);
  10126. }
  10127. break;
  10128. case 'b':
  10129. {
  10130. unsigned int S = (given & 0x04000000u) >> 26;
  10131. unsigned int J1 = (given & 0x00002000u) >> 13;
  10132. unsigned int J2 = (given & 0x00000800u) >> 11;
  10133. bfd_vma offset = 0;
  10134. offset |= !S << 20;
  10135. offset |= J2 << 19;
  10136. offset |= J1 << 18;
  10137. offset |= (given & 0x003f0000) >> 4;
  10138. offset |= (given & 0x000007ff) << 1;
  10139. offset -= (1 << 20);
  10140. bfd_vma target = pc + 4 + offset;
  10141. info->print_address_func (target, info);
  10142. /* Fill in instruction information. */
  10143. info->insn_info_valid = 1;
  10144. info->insn_type = dis_branch;
  10145. info->target = target;
  10146. }
  10147. break;
  10148. case 'B':
  10149. {
  10150. unsigned int S = (given & 0x04000000u) >> 26;
  10151. unsigned int I1 = (given & 0x00002000u) >> 13;
  10152. unsigned int I2 = (given & 0x00000800u) >> 11;
  10153. bfd_vma offset = 0;
  10154. offset |= !S << 24;
  10155. offset |= !(I1 ^ S) << 23;
  10156. offset |= !(I2 ^ S) << 22;
  10157. offset |= (given & 0x03ff0000u) >> 4;
  10158. offset |= (given & 0x000007ffu) << 1;
  10159. offset -= (1 << 24);
  10160. offset += pc + 4;
  10161. /* BLX target addresses are always word aligned. */
  10162. if ((given & 0x00001000u) == 0)
  10163. offset &= ~2u;
  10164. info->print_address_func (offset, info);
  10165. /* Fill in instruction information. */
  10166. info->insn_info_valid = 1;
  10167. info->insn_type = dis_branch;
  10168. info->target = offset;
  10169. }
  10170. break;
  10171. case 's':
  10172. {
  10173. unsigned int shift = 0;
  10174. shift |= (given & 0x000000c0u) >> 6;
  10175. shift |= (given & 0x00007000u) >> 10;
  10176. if (WRITEBACK_BIT_SET)
  10177. func (stream, ", asr #%u", shift);
  10178. else if (shift)
  10179. func (stream, ", lsl #%u", shift);
  10180. /* else print nothing - lsl #0 */
  10181. }
  10182. break;
  10183. case 'R':
  10184. {
  10185. unsigned int rot = (given & 0x00000030) >> 4;
  10186. if (rot)
  10187. func (stream, ", ror #%u", rot * 8);
  10188. }
  10189. break;
  10190. case 'U':
  10191. if ((given & 0xf0) == 0x60)
  10192. {
  10193. switch (given & 0xf)
  10194. {
  10195. case 0xf: func (stream, "sy"); break;
  10196. default:
  10197. func (stream, "#%d", (int) given & 0xf);
  10198. break;
  10199. }
  10200. }
  10201. else
  10202. {
  10203. const char * opt = data_barrier_option (given & 0xf);
  10204. if (opt != NULL)
  10205. func (stream, "%s", opt);
  10206. else
  10207. func (stream, "#%d", (int) given & 0xf);
  10208. }
  10209. break;
  10210. case 'C':
  10211. if ((given & 0xff) == 0)
  10212. {
  10213. func (stream, "%cPSR_", (given & 0x100000) ? 'S' : 'C');
  10214. if (given & 0x800)
  10215. func (stream, "f");
  10216. if (given & 0x400)
  10217. func (stream, "s");
  10218. if (given & 0x200)
  10219. func (stream, "x");
  10220. if (given & 0x100)
  10221. func (stream, "c");
  10222. }
  10223. else if ((given & 0x20) == 0x20)
  10224. {
  10225. char const* name;
  10226. unsigned sysm = (given & 0xf00) >> 8;
  10227. sysm |= (given & 0x30);
  10228. sysm |= (given & 0x00100000) >> 14;
  10229. name = banked_regname (sysm);
  10230. if (name != NULL)
  10231. func (stream, "%s", name);
  10232. else
  10233. func (stream, "(UNDEF: %lu)", (unsigned long) sysm);
  10234. }
  10235. else
  10236. {
  10237. func (stream, "%s", psr_name (given & 0xff));
  10238. }
  10239. break;
  10240. case 'D':
  10241. if (((given & 0xff) == 0)
  10242. || ((given & 0x20) == 0x20))
  10243. {
  10244. char const* name;
  10245. unsigned sm = (given & 0xf0000) >> 16;
  10246. sm |= (given & 0x30);
  10247. sm |= (given & 0x00100000) >> 14;
  10248. name = banked_regname (sm);
  10249. if (name != NULL)
  10250. func (stream, "%s", name);
  10251. else
  10252. func (stream, "(UNDEF: %lu)", (unsigned long) sm);
  10253. }
  10254. else
  10255. func (stream, "%s", psr_name (given & 0xff));
  10256. break;
  10257. case '0': case '1': case '2': case '3': case '4':
  10258. case '5': case '6': case '7': case '8': case '9':
  10259. {
  10260. int width;
  10261. unsigned long val;
  10262. c = arm_decode_bitfield (c, given, &val, &width);
  10263. switch (*c)
  10264. {
  10265. case 's':
  10266. if (val <= 3)
  10267. func (stream, "%s", mve_vec_sizename[val]);
  10268. else
  10269. func (stream, "<undef size>");
  10270. break;
  10271. case 'd':
  10272. func (stream, "%lu", val);
  10273. value_in_comment = val;
  10274. break;
  10275. case 'D':
  10276. func (stream, "%lu", val + 1);
  10277. value_in_comment = val + 1;
  10278. break;
  10279. case 'W':
  10280. func (stream, "%lu", val * 4);
  10281. value_in_comment = val * 4;
  10282. break;
  10283. case 'S':
  10284. if (val == 13)
  10285. is_unpredictable = true;
  10286. /* Fall through. */
  10287. case 'R':
  10288. if (val == 15)
  10289. is_unpredictable = true;
  10290. /* Fall through. */
  10291. case 'r':
  10292. func (stream, "%s", arm_regnames[val]);
  10293. break;
  10294. case 'c':
  10295. func (stream, "%s", arm_conditional[val]);
  10296. break;
  10297. case '\'':
  10298. c++;
  10299. if (val == ((1ul << width) - 1))
  10300. func (stream, "%c", *c);
  10301. break;
  10302. case '`':
  10303. c++;
  10304. if (val == 0)
  10305. func (stream, "%c", *c);
  10306. break;
  10307. case '?':
  10308. func (stream, "%c", c[(1 << width) - (int) val]);
  10309. c += 1 << width;
  10310. break;
  10311. case 'x':
  10312. func (stream, "0x%lx", val & 0xffffffffUL);
  10313. break;
  10314. default:
  10315. abort ();
  10316. }
  10317. }
  10318. break;
  10319. case 'L':
  10320. /* PR binutils/12534
  10321. If we have a PC relative offset in an LDRD or STRD
  10322. instructions then display the decoded address. */
  10323. if (((given >> 16) & 0xf) == 0xf)
  10324. {
  10325. bfd_vma offset = (given & 0xff) * 4;
  10326. if ((given & (1 << 23)) == 0)
  10327. offset = - offset;
  10328. func (stream, "\t; ");
  10329. info->print_address_func ((pc & ~3) + 4 + offset, info);
  10330. }
  10331. break;
  10332. default:
  10333. abort ();
  10334. }
  10335. }
  10336. if (value_in_comment > 32 || value_in_comment < -16)
  10337. func (stream, "\t; 0x%lx", value_in_comment);
  10338. if (is_unpredictable)
  10339. func (stream, UNPREDICTABLE_INSTRUCTION);
  10340. return;
  10341. }
  10342. /* No match. */
  10343. func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
  10344. return;
  10345. }
  10346. /* Print data bytes on INFO->STREAM. */
  10347. static void
  10348. print_insn_data (bfd_vma pc ATTRIBUTE_UNUSED,
  10349. struct disassemble_info *info,
  10350. long given)
  10351. {
  10352. switch (info->bytes_per_chunk)
  10353. {
  10354. case 1:
  10355. info->fprintf_func (info->stream, ".byte\t0x%02lx", given);
  10356. break;
  10357. case 2:
  10358. info->fprintf_func (info->stream, ".short\t0x%04lx", given);
  10359. break;
  10360. case 4:
  10361. info->fprintf_func (info->stream, ".word\t0x%08lx", given);
  10362. break;
  10363. default:
  10364. abort ();
  10365. }
  10366. }
  10367. /* Disallow mapping symbols ($a, $b, $d, $t etc) from
  10368. being displayed in symbol relative addresses.
  10369. Also disallow private symbol, with __tagsym$$ prefix,
  10370. from ARM RVCT toolchain being displayed. */
  10371. bool
  10372. arm_symbol_is_valid (asymbol * sym,
  10373. struct disassemble_info * info ATTRIBUTE_UNUSED)
  10374. {
  10375. const char * name;
  10376. if (sym == NULL)
  10377. return false;
  10378. name = bfd_asymbol_name (sym);
  10379. return (name && *name != '$' && strncmp (name, "__tagsym$$", 10));
  10380. }
  10381. /* Parse the string of disassembler options. */
  10382. static void
  10383. parse_arm_disassembler_options (const char *options)
  10384. {
  10385. const char *opt;
  10386. force_thumb = false;
  10387. FOR_EACH_DISASSEMBLER_OPTION (opt, options)
  10388. {
  10389. if (startswith (opt, "reg-names-"))
  10390. {
  10391. unsigned int i;
  10392. for (i = 0; i < NUM_ARM_OPTIONS; i++)
  10393. if (disassembler_options_cmp (opt, regnames[i].name) == 0)
  10394. {
  10395. regname_selected = i;
  10396. break;
  10397. }
  10398. if (i >= NUM_ARM_OPTIONS)
  10399. /* xgettext: c-format */
  10400. opcodes_error_handler (_("unrecognised register name set: %s"),
  10401. opt);
  10402. }
  10403. else if (startswith (opt, "force-thumb"))
  10404. force_thumb = 1;
  10405. else if (startswith (opt, "no-force-thumb"))
  10406. force_thumb = 0;
  10407. else if (startswith (opt, "coproc"))
  10408. {
  10409. const char *procptr = opt + sizeof ("coproc") - 1;
  10410. char *endptr;
  10411. uint8_t coproc_number = strtol (procptr, &endptr, 10);
  10412. if (endptr != procptr + 1 || coproc_number > 7)
  10413. {
  10414. opcodes_error_handler (_("cde coprocessor not between 0-7: %s"),
  10415. opt);
  10416. continue;
  10417. }
  10418. if (*endptr != '=')
  10419. {
  10420. opcodes_error_handler (_("coproc must have an argument: %s"),
  10421. opt);
  10422. continue;
  10423. }
  10424. endptr += 1;
  10425. if (startswith (endptr, "generic"))
  10426. cde_coprocs &= ~(1 << coproc_number);
  10427. else if (startswith (endptr, "cde")
  10428. || startswith (endptr, "CDE"))
  10429. cde_coprocs |= (1 << coproc_number);
  10430. else
  10431. {
  10432. opcodes_error_handler (
  10433. _("coprocN argument takes options \"generic\","
  10434. " \"cde\", or \"CDE\": %s"), opt);
  10435. }
  10436. }
  10437. else
  10438. /* xgettext: c-format */
  10439. opcodes_error_handler (_("unrecognised disassembler option: %s"), opt);
  10440. }
  10441. return;
  10442. }
  10443. static bool
  10444. mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
  10445. enum map_type *map_symbol);
  10446. /* Search back through the insn stream to determine if this instruction is
  10447. conditionally executed. */
  10448. static void
  10449. find_ifthen_state (bfd_vma pc,
  10450. struct disassemble_info *info,
  10451. bool little)
  10452. {
  10453. unsigned char b[2];
  10454. unsigned int insn;
  10455. int status;
  10456. /* COUNT is twice the number of instructions seen. It will be odd if we
  10457. just crossed an instruction boundary. */
  10458. int count;
  10459. int it_count;
  10460. unsigned int seen_it;
  10461. bfd_vma addr;
  10462. ifthen_address = pc;
  10463. ifthen_state = 0;
  10464. addr = pc;
  10465. count = 1;
  10466. it_count = 0;
  10467. seen_it = 0;
  10468. /* Scan backwards looking for IT instructions, keeping track of where
  10469. instruction boundaries are. We don't know if something is actually an
  10470. IT instruction until we find a definite instruction boundary. */
  10471. for (;;)
  10472. {
  10473. if (addr == 0 || info->symbol_at_address_func (addr, info))
  10474. {
  10475. /* A symbol must be on an instruction boundary, and will not
  10476. be within an IT block. */
  10477. if (seen_it && (count & 1))
  10478. break;
  10479. return;
  10480. }
  10481. addr -= 2;
  10482. status = info->read_memory_func (addr, (bfd_byte *) b, 2, info);
  10483. if (status)
  10484. return;
  10485. if (little)
  10486. insn = (b[0]) | (b[1] << 8);
  10487. else
  10488. insn = (b[1]) | (b[0] << 8);
  10489. if (seen_it)
  10490. {
  10491. if ((insn & 0xf800) < 0xe800)
  10492. {
  10493. /* Addr + 2 is an instruction boundary. See if this matches
  10494. the expected boundary based on the position of the last
  10495. IT candidate. */
  10496. if (count & 1)
  10497. break;
  10498. seen_it = 0;
  10499. }
  10500. }
  10501. if ((insn & 0xff00) == 0xbf00 && (insn & 0xf) != 0)
  10502. {
  10503. enum map_type type = MAP_ARM;
  10504. bool found = mapping_symbol_for_insn (addr, info, &type);
  10505. if (!found || (found && type == MAP_THUMB))
  10506. {
  10507. /* This could be an IT instruction. */
  10508. seen_it = insn;
  10509. it_count = count >> 1;
  10510. }
  10511. }
  10512. if ((insn & 0xf800) >= 0xe800)
  10513. count++;
  10514. else
  10515. count = (count + 2) | 1;
  10516. /* IT blocks contain at most 4 instructions. */
  10517. if (count >= 8 && !seen_it)
  10518. return;
  10519. }
  10520. /* We found an IT instruction. */
  10521. ifthen_state = (seen_it & 0xe0) | ((seen_it << it_count) & 0x1f);
  10522. if ((ifthen_state & 0xf) == 0)
  10523. ifthen_state = 0;
  10524. }
  10525. /* Returns nonzero and sets *MAP_TYPE if the N'th symbol is a
  10526. mapping symbol. */
  10527. static int
  10528. is_mapping_symbol (struct disassemble_info *info, int n,
  10529. enum map_type *map_type)
  10530. {
  10531. const char *name;
  10532. name = bfd_asymbol_name (info->symtab[n]);
  10533. if (name[0] == '$' && (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
  10534. && (name[2] == 0 || name[2] == '.'))
  10535. {
  10536. *map_type = ((name[1] == 'a') ? MAP_ARM
  10537. : (name[1] == 't') ? MAP_THUMB
  10538. : MAP_DATA);
  10539. return true;
  10540. }
  10541. return false;
  10542. }
  10543. /* Try to infer the code type (ARM or Thumb) from a mapping symbol.
  10544. Returns nonzero if *MAP_TYPE was set. */
  10545. static int
  10546. get_map_sym_type (struct disassemble_info *info,
  10547. int n,
  10548. enum map_type *map_type)
  10549. {
  10550. /* If the symbol is in a different section, ignore it. */
  10551. if (info->section != NULL && info->section != info->symtab[n]->section)
  10552. return false;
  10553. return is_mapping_symbol (info, n, map_type);
  10554. }
  10555. /* Try to infer the code type (ARM or Thumb) from a non-mapping symbol.
  10556. Returns nonzero if *MAP_TYPE was set. */
  10557. static int
  10558. get_sym_code_type (struct disassemble_info *info,
  10559. int n,
  10560. enum map_type *map_type)
  10561. {
  10562. elf_symbol_type *es;
  10563. unsigned int type;
  10564. /* If the symbol is in a different section, ignore it. */
  10565. if (info->section != NULL && info->section != info->symtab[n]->section)
  10566. return false;
  10567. es = *(elf_symbol_type **)(info->symtab + n);
  10568. type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
  10569. /* If the symbol has function type then use that. */
  10570. if (type == STT_FUNC || type == STT_GNU_IFUNC)
  10571. {
  10572. if (ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
  10573. == ST_BRANCH_TO_THUMB)
  10574. *map_type = MAP_THUMB;
  10575. else
  10576. *map_type = MAP_ARM;
  10577. return true;
  10578. }
  10579. return false;
  10580. }
  10581. /* Search the mapping symbol state for instruction at pc. This is only
  10582. applicable for elf target.
  10583. There is an assumption Here, info->private_data contains the correct AND
  10584. up-to-date information about current scan process. The information will be
  10585. used to speed this search process.
  10586. Return TRUE if the mapping state can be determined, and map_symbol
  10587. will be updated accordingly. Otherwise, return FALSE. */
  10588. static bool
  10589. mapping_symbol_for_insn (bfd_vma pc, struct disassemble_info *info,
  10590. enum map_type *map_symbol)
  10591. {
  10592. bfd_vma addr, section_vma = 0;
  10593. int n, last_sym = -1;
  10594. bool found = false;
  10595. bool can_use_search_opt_p = false;
  10596. /* Default to DATA. A text section is required by the ABI to contain an
  10597. INSN mapping symbol at the start. A data section has no such
  10598. requirement, hence if no mapping symbol is found the section must
  10599. contain only data. This however isn't very useful if the user has
  10600. fully stripped the binaries. If this is the case use the section
  10601. attributes to determine the default. If we have no section default to
  10602. INSN as well, as we may be disassembling some raw bytes on a baremetal
  10603. HEX file or similar. */
  10604. enum map_type type = MAP_DATA;
  10605. if ((info->section && info->section->flags & SEC_CODE) || !info->section)
  10606. type = MAP_ARM;
  10607. struct arm_private_data *private_data;
  10608. if (info->private_data == NULL
  10609. || bfd_asymbol_flavour (*info->symtab) != bfd_target_elf_flavour)
  10610. return false;
  10611. private_data = info->private_data;
  10612. /* First, look for mapping symbols. */
  10613. if (info->symtab_size != 0)
  10614. {
  10615. if (pc <= private_data->last_mapping_addr)
  10616. private_data->last_mapping_sym = -1;
  10617. /* Start scanning at the start of the function, or wherever
  10618. we finished last time. */
  10619. n = info->symtab_pos + 1;
  10620. /* If the last stop offset is different from the current one it means we
  10621. are disassembling a different glob of bytes. As such the optimization
  10622. would not be safe and we should start over. */
  10623. can_use_search_opt_p
  10624. = private_data->last_mapping_sym >= 0
  10625. && info->stop_offset == private_data->last_stop_offset;
  10626. if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
  10627. n = private_data->last_mapping_sym;
  10628. /* Look down while we haven't passed the location being disassembled.
  10629. The reason for this is that there's no defined order between a symbol
  10630. and an mapping symbol that may be at the same address. We may have to
  10631. look at least one position ahead. */
  10632. for (; n < info->symtab_size; n++)
  10633. {
  10634. addr = bfd_asymbol_value (info->symtab[n]);
  10635. if (addr > pc)
  10636. break;
  10637. if (get_map_sym_type (info, n, &type))
  10638. {
  10639. last_sym = n;
  10640. found = true;
  10641. }
  10642. }
  10643. if (!found)
  10644. {
  10645. n = info->symtab_pos;
  10646. if (n >= private_data->last_mapping_sym && can_use_search_opt_p)
  10647. n = private_data->last_mapping_sym;
  10648. /* No mapping symbol found at this address. Look backwards
  10649. for a preceeding one, but don't go pass the section start
  10650. otherwise a data section with no mapping symbol can pick up
  10651. a text mapping symbol of a preceeding section. The documentation
  10652. says section can be NULL, in which case we will seek up all the
  10653. way to the top. */
  10654. if (info->section)
  10655. section_vma = info->section->vma;
  10656. for (; n >= 0; n--)
  10657. {
  10658. addr = bfd_asymbol_value (info->symtab[n]);
  10659. if (addr < section_vma)
  10660. break;
  10661. if (get_map_sym_type (info, n, &type))
  10662. {
  10663. last_sym = n;
  10664. found = true;
  10665. break;
  10666. }
  10667. }
  10668. }
  10669. }
  10670. /* If no mapping symbol was found, try looking up without a mapping
  10671. symbol. This is done by walking up from the current PC to the nearest
  10672. symbol. We don't actually have to loop here since symtab_pos will
  10673. contain the nearest symbol already. */
  10674. if (!found)
  10675. {
  10676. n = info->symtab_pos;
  10677. if (n >= 0 && get_sym_code_type (info, n, &type))
  10678. {
  10679. last_sym = n;
  10680. found = true;
  10681. }
  10682. }
  10683. private_data->last_mapping_sym = last_sym;
  10684. private_data->last_type = type;
  10685. private_data->last_stop_offset = info->stop_offset;
  10686. *map_symbol = type;
  10687. return found;
  10688. }
  10689. /* Given a bfd_mach_arm_XXX value, this function fills in the fields
  10690. of the supplied arm_feature_set structure with bitmasks indicating
  10691. the supported base architectures and coprocessor extensions.
  10692. FIXME: This could more efficiently implemented as a constant array,
  10693. although it would also be less robust. */
  10694. static void
  10695. select_arm_features (unsigned long mach,
  10696. arm_feature_set * features)
  10697. {
  10698. arm_feature_set arch_fset;
  10699. const arm_feature_set fpu_any = FPU_ANY;
  10700. #undef ARM_SET_FEATURES
  10701. #define ARM_SET_FEATURES(FSET) \
  10702. { \
  10703. const arm_feature_set fset = FSET; \
  10704. arch_fset = fset; \
  10705. }
  10706. /* When several architecture versions share the same bfd_mach_arm_XXX value
  10707. the most featureful is chosen. */
  10708. switch (mach)
  10709. {
  10710. case bfd_mach_arm_2: ARM_SET_FEATURES (ARM_ARCH_V2); break;
  10711. case bfd_mach_arm_2a: ARM_SET_FEATURES (ARM_ARCH_V2S); break;
  10712. case bfd_mach_arm_3: ARM_SET_FEATURES (ARM_ARCH_V3); break;
  10713. case bfd_mach_arm_3M: ARM_SET_FEATURES (ARM_ARCH_V3M); break;
  10714. case bfd_mach_arm_4: ARM_SET_FEATURES (ARM_ARCH_V4); break;
  10715. case bfd_mach_arm_4T: ARM_SET_FEATURES (ARM_ARCH_V4T); break;
  10716. case bfd_mach_arm_5: ARM_SET_FEATURES (ARM_ARCH_V5); break;
  10717. case bfd_mach_arm_5T: ARM_SET_FEATURES (ARM_ARCH_V5T); break;
  10718. case bfd_mach_arm_5TE: ARM_SET_FEATURES (ARM_ARCH_V5TE); break;
  10719. case bfd_mach_arm_XScale: ARM_SET_FEATURES (ARM_ARCH_XSCALE); break;
  10720. case bfd_mach_arm_ep9312:
  10721. ARM_SET_FEATURES (ARM_FEATURE_LOW (ARM_AEXT_V4T,
  10722. ARM_CEXT_MAVERICK | FPU_MAVERICK));
  10723. break;
  10724. case bfd_mach_arm_iWMMXt: ARM_SET_FEATURES (ARM_ARCH_IWMMXT); break;
  10725. case bfd_mach_arm_iWMMXt2: ARM_SET_FEATURES (ARM_ARCH_IWMMXT2); break;
  10726. case bfd_mach_arm_5TEJ: ARM_SET_FEATURES (ARM_ARCH_V5TEJ); break;
  10727. case bfd_mach_arm_6: ARM_SET_FEATURES (ARM_ARCH_V6); break;
  10728. case bfd_mach_arm_6KZ: ARM_SET_FEATURES (ARM_ARCH_V6KZ); break;
  10729. case bfd_mach_arm_6T2: ARM_SET_FEATURES (ARM_ARCH_V6KZT2); break;
  10730. case bfd_mach_arm_6K: ARM_SET_FEATURES (ARM_ARCH_V6K); break;
  10731. case bfd_mach_arm_7: ARM_SET_FEATURES (ARM_ARCH_V7VE); break;
  10732. case bfd_mach_arm_6M: ARM_SET_FEATURES (ARM_ARCH_V6M); break;
  10733. case bfd_mach_arm_6SM: ARM_SET_FEATURES (ARM_ARCH_V6SM); break;
  10734. case bfd_mach_arm_7EM: ARM_SET_FEATURES (ARM_ARCH_V7EM); break;
  10735. case bfd_mach_arm_8:
  10736. {
  10737. /* Add bits for extensions that Armv8.6-A recognizes. */
  10738. arm_feature_set armv8_6_ext_fset
  10739. = ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST);
  10740. ARM_SET_FEATURES (ARM_ARCH_V8_6A);
  10741. ARM_MERGE_FEATURE_SETS (arch_fset, arch_fset, armv8_6_ext_fset);
  10742. break;
  10743. }
  10744. case bfd_mach_arm_8R: ARM_SET_FEATURES (ARM_ARCH_V8R); break;
  10745. case bfd_mach_arm_8M_BASE: ARM_SET_FEATURES (ARM_ARCH_V8M_BASE); break;
  10746. case bfd_mach_arm_8M_MAIN: ARM_SET_FEATURES (ARM_ARCH_V8M_MAIN); break;
  10747. case bfd_mach_arm_8_1M_MAIN:
  10748. ARM_SET_FEATURES (ARM_ARCH_V8_1M_MAIN);
  10749. arm_feature_set mve_all
  10750. = ARM_FEATURE_CORE_HIGH (ARM_EXT2_MVE | ARM_EXT2_MVE_FP);
  10751. ARM_MERGE_FEATURE_SETS (arch_fset, arch_fset, mve_all);
  10752. force_thumb = 1;
  10753. break;
  10754. case bfd_mach_arm_9: ARM_SET_FEATURES (ARM_ARCH_V9A); break;
  10755. /* If the machine type is unknown allow all architecture types and all
  10756. extensions, with the exception of MVE as that clashes with NEON. */
  10757. case bfd_mach_arm_unknown:
  10758. ARM_SET_FEATURES (ARM_ARCH_UNKNOWN);
  10759. break;
  10760. default:
  10761. abort ();
  10762. }
  10763. #undef ARM_SET_FEATURES
  10764. /* None of the feature bits related to -mfpu have an impact on Tag_CPU_arch
  10765. and thus on bfd_mach_arm_XXX value. Therefore for a given
  10766. bfd_mach_arm_XXX value all coprocessor feature bits should be allowed. */
  10767. ARM_MERGE_FEATURE_SETS (*features, arch_fset, fpu_any);
  10768. }
  10769. /* NOTE: There are no checks in these routines that
  10770. the relevant number of data bytes exist. */
  10771. static int
  10772. print_insn (bfd_vma pc, struct disassemble_info *info, bool little)
  10773. {
  10774. unsigned char b[4];
  10775. unsigned long given;
  10776. int status;
  10777. int is_thumb = false;
  10778. int is_data = false;
  10779. int little_code;
  10780. unsigned int size = 4;
  10781. void (*printer) (bfd_vma, struct disassemble_info *, long);
  10782. bool found = false;
  10783. struct arm_private_data *private_data;
  10784. /* Clear instruction information field. */
  10785. info->insn_info_valid = 0;
  10786. info->branch_delay_insns = 0;
  10787. info->data_size = 0;
  10788. info->insn_type = dis_noninsn;
  10789. info->target = 0;
  10790. info->target2 = 0;
  10791. if (info->disassembler_options)
  10792. {
  10793. parse_arm_disassembler_options (info->disassembler_options);
  10794. /* To avoid repeated parsing of these options, we remove them here. */
  10795. info->disassembler_options = NULL;
  10796. }
  10797. /* PR 10288: Control which instructions will be disassembled. */
  10798. if (info->private_data == NULL)
  10799. {
  10800. static struct arm_private_data private;
  10801. if ((info->flags & USER_SPECIFIED_MACHINE_TYPE) == 0)
  10802. /* If the user did not use the -m command line switch then default to
  10803. disassembling all types of ARM instruction.
  10804. The info->mach value has to be ignored as this will be based on
  10805. the default archictecture for the target and/or hints in the notes
  10806. section, but it will never be greater than the current largest arm
  10807. machine value (iWMMXt2), which is only equivalent to the V5TE
  10808. architecture. ARM architectures have advanced beyond the machine
  10809. value encoding, and these newer architectures would be ignored if
  10810. the machine value was used.
  10811. Ie the -m switch is used to restrict which instructions will be
  10812. disassembled. If it is necessary to use the -m switch to tell
  10813. objdump that an ARM binary is being disassembled, eg because the
  10814. input is a raw binary file, but it is also desired to disassemble
  10815. all ARM instructions then use "-marm". This will select the
  10816. "unknown" arm architecture which is compatible with any ARM
  10817. instruction. */
  10818. info->mach = bfd_mach_arm_unknown;
  10819. /* Compute the architecture bitmask from the machine number.
  10820. Note: This assumes that the machine number will not change
  10821. during disassembly.... */
  10822. select_arm_features (info->mach, & private.features);
  10823. private.last_mapping_sym = -1;
  10824. private.last_mapping_addr = 0;
  10825. private.last_stop_offset = 0;
  10826. info->private_data = & private;
  10827. }
  10828. private_data = info->private_data;
  10829. /* Decide if our code is going to be little-endian, despite what the
  10830. function argument might say. */
  10831. little_code = ((info->endian_code == BFD_ENDIAN_LITTLE) || little);
  10832. /* For ELF, consult the symbol table to determine what kind of code
  10833. or data we have. */
  10834. if (info->symtab_size != 0
  10835. && bfd_asymbol_flavour (*info->symtab) == bfd_target_elf_flavour)
  10836. {
  10837. bfd_vma addr;
  10838. int n;
  10839. int last_sym = -1;
  10840. enum map_type type = MAP_ARM;
  10841. found = mapping_symbol_for_insn (pc, info, &type);
  10842. last_sym = private_data->last_mapping_sym;
  10843. is_thumb = (private_data->last_type == MAP_THUMB);
  10844. is_data = (private_data->last_type == MAP_DATA);
  10845. /* Look a little bit ahead to see if we should print out
  10846. two or four bytes of data. If there's a symbol,
  10847. mapping or otherwise, after two bytes then don't
  10848. print more. */
  10849. if (is_data)
  10850. {
  10851. size = 4 - (pc & 3);
  10852. for (n = last_sym + 1; n < info->symtab_size; n++)
  10853. {
  10854. addr = bfd_asymbol_value (info->symtab[n]);
  10855. if (addr > pc
  10856. && (info->section == NULL
  10857. || info->section == info->symtab[n]->section))
  10858. {
  10859. if (addr - pc < size)
  10860. size = addr - pc;
  10861. break;
  10862. }
  10863. }
  10864. /* If the next symbol is after three bytes, we need to
  10865. print only part of the data, so that we can use either
  10866. .byte or .short. */
  10867. if (size == 3)
  10868. size = (pc & 1) ? 1 : 2;
  10869. }
  10870. }
  10871. if (info->symbols != NULL)
  10872. {
  10873. if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour)
  10874. {
  10875. coff_symbol_type * cs;
  10876. cs = coffsymbol (*info->symbols);
  10877. is_thumb = ( cs->native->u.syment.n_sclass == C_THUMBEXT
  10878. || cs->native->u.syment.n_sclass == C_THUMBSTAT
  10879. || cs->native->u.syment.n_sclass == C_THUMBLABEL
  10880. || cs->native->u.syment.n_sclass == C_THUMBEXTFUNC
  10881. || cs->native->u.syment.n_sclass == C_THUMBSTATFUNC);
  10882. }
  10883. else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour
  10884. && !found)
  10885. {
  10886. /* If no mapping symbol has been found then fall back to the type
  10887. of the function symbol. */
  10888. elf_symbol_type * es;
  10889. unsigned int type;
  10890. es = *(elf_symbol_type **)(info->symbols);
  10891. type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
  10892. is_thumb =
  10893. ((ARM_GET_SYM_BRANCH_TYPE (es->internal_elf_sym.st_target_internal)
  10894. == ST_BRANCH_TO_THUMB) || type == STT_ARM_16BIT);
  10895. }
  10896. else if (bfd_asymbol_flavour (*info->symbols)
  10897. == bfd_target_mach_o_flavour)
  10898. {
  10899. bfd_mach_o_asymbol *asym = (bfd_mach_o_asymbol *)*info->symbols;
  10900. is_thumb = (asym->n_desc & BFD_MACH_O_N_ARM_THUMB_DEF);
  10901. }
  10902. }
  10903. if (force_thumb)
  10904. is_thumb = true;
  10905. if (is_data)
  10906. info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
  10907. else
  10908. info->display_endian = little_code ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
  10909. info->bytes_per_line = 4;
  10910. /* PR 10263: Disassemble data if requested to do so by the user. */
  10911. if (is_data && ((info->flags & DISASSEMBLE_DATA) == 0))
  10912. {
  10913. int i;
  10914. /* Size was already set above. */
  10915. info->bytes_per_chunk = size;
  10916. printer = print_insn_data;
  10917. status = info->read_memory_func (pc, (bfd_byte *) b, size, info);
  10918. given = 0;
  10919. if (little)
  10920. for (i = size - 1; i >= 0; i--)
  10921. given = b[i] | (given << 8);
  10922. else
  10923. for (i = 0; i < (int) size; i++)
  10924. given = b[i] | (given << 8);
  10925. }
  10926. else if (!is_thumb)
  10927. {
  10928. /* In ARM mode endianness is a straightforward issue: the instruction
  10929. is four bytes long and is either ordered 0123 or 3210. */
  10930. printer = print_insn_arm;
  10931. info->bytes_per_chunk = 4;
  10932. size = 4;
  10933. status = info->read_memory_func (pc, (bfd_byte *) b, 4, info);
  10934. if (little_code)
  10935. given = (b[0]) | (b[1] << 8) | (b[2] << 16) | ((unsigned) b[3] << 24);
  10936. else
  10937. given = (b[3]) | (b[2] << 8) | (b[1] << 16) | ((unsigned) b[0] << 24);
  10938. }
  10939. else
  10940. {
  10941. /* In Thumb mode we have the additional wrinkle of two
  10942. instruction lengths. Fortunately, the bits that determine
  10943. the length of the current instruction are always to be found
  10944. in the first two bytes. */
  10945. printer = print_insn_thumb16;
  10946. info->bytes_per_chunk = 2;
  10947. size = 2;
  10948. status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
  10949. if (little_code)
  10950. given = (b[0]) | (b[1] << 8);
  10951. else
  10952. given = (b[1]) | (b[0] << 8);
  10953. if (!status)
  10954. {
  10955. /* These bit patterns signal a four-byte Thumb
  10956. instruction. */
  10957. if ((given & 0xF800) == 0xF800
  10958. || (given & 0xF800) == 0xF000
  10959. || (given & 0xF800) == 0xE800)
  10960. {
  10961. status = info->read_memory_func (pc + 2, (bfd_byte *) b, 2, info);
  10962. if (little_code)
  10963. given = (b[0]) | (b[1] << 8) | (given << 16);
  10964. else
  10965. given = (b[1]) | (b[0] << 8) | (given << 16);
  10966. printer = print_insn_thumb32;
  10967. size = 4;
  10968. }
  10969. }
  10970. if (ifthen_address != pc)
  10971. find_ifthen_state (pc, info, little_code);
  10972. if (ifthen_state)
  10973. {
  10974. if ((ifthen_state & 0xf) == 0x8)
  10975. ifthen_next_state = 0;
  10976. else
  10977. ifthen_next_state = (ifthen_state & 0xe0)
  10978. | ((ifthen_state & 0xf) << 1);
  10979. }
  10980. }
  10981. if (status)
  10982. {
  10983. info->memory_error_func (status, pc, info);
  10984. return -1;
  10985. }
  10986. if (info->flags & INSN_HAS_RELOC)
  10987. /* If the instruction has a reloc associated with it, then
  10988. the offset field in the instruction will actually be the
  10989. addend for the reloc. (We are using REL type relocs).
  10990. In such cases, we can ignore the pc when computing
  10991. addresses, since the addend is not currently pc-relative. */
  10992. pc = 0;
  10993. printer (pc, info, given);
  10994. if (is_thumb)
  10995. {
  10996. ifthen_state = ifthen_next_state;
  10997. ifthen_address += size;
  10998. }
  10999. return size;
  11000. }
  11001. int
  11002. print_insn_big_arm (bfd_vma pc, struct disassemble_info *info)
  11003. {
  11004. /* Detect BE8-ness and record it in the disassembler info. */
  11005. if (info->flavour == bfd_target_elf_flavour
  11006. && info->section != NULL
  11007. && (elf_elfheader (info->section->owner)->e_flags & EF_ARM_BE8))
  11008. info->endian_code = BFD_ENDIAN_LITTLE;
  11009. return print_insn (pc, info, false);
  11010. }
  11011. int
  11012. print_insn_little_arm (bfd_vma pc, struct disassemble_info *info)
  11013. {
  11014. return print_insn (pc, info, true);
  11015. }
  11016. const disasm_options_and_args_t *
  11017. disassembler_options_arm (void)
  11018. {
  11019. static disasm_options_and_args_t *opts_and_args;
  11020. if (opts_and_args == NULL)
  11021. {
  11022. disasm_options_t *opts;
  11023. unsigned int i;
  11024. opts_and_args = XNEW (disasm_options_and_args_t);
  11025. opts_and_args->args = NULL;
  11026. opts = &opts_and_args->options;
  11027. opts->name = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
  11028. opts->description = XNEWVEC (const char *, NUM_ARM_OPTIONS + 1);
  11029. opts->arg = NULL;
  11030. for (i = 0; i < NUM_ARM_OPTIONS; i++)
  11031. {
  11032. opts->name[i] = regnames[i].name;
  11033. if (regnames[i].description != NULL)
  11034. opts->description[i] = _(regnames[i].description);
  11035. else
  11036. opts->description[i] = NULL;
  11037. }
  11038. /* The array we return must be NULL terminated. */
  11039. opts->name[i] = NULL;
  11040. opts->description[i] = NULL;
  11041. }
  11042. return opts_and_args;
  11043. }
  11044. void
  11045. print_arm_disassembler_options (FILE *stream)
  11046. {
  11047. unsigned int i, max_len = 0;
  11048. fprintf (stream, _("\n\
  11049. The following ARM specific disassembler options are supported for use with\n\
  11050. the -M switch:\n"));
  11051. for (i = 0; i < NUM_ARM_OPTIONS; i++)
  11052. {
  11053. unsigned int len = strlen (regnames[i].name);
  11054. if (max_len < len)
  11055. max_len = len;
  11056. }
  11057. for (i = 0, max_len++; i < NUM_ARM_OPTIONS; i++)
  11058. fprintf (stream, " %s%*c %s\n",
  11059. regnames[i].name,
  11060. (int)(max_len - strlen (regnames[i].name)), ' ',
  11061. _(regnames[i].description));
  11062. }