s390x.pm 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175
  1. #!/usr/bin/env perl
  2. # Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the OpenSSL license (the "License"). You may not use
  5. # this file except in compliance with the License. You can obtain a copy
  6. # in the file LICENSE in the source distribution or at
  7. # https://www.openssl.org/source/license.html
  8. # Copyright IBM Corp. 2018-2019
  9. # Author: Patrick Steuer <patrick.steuer@de.ibm.com>
  10. package perlasm::s390x;
  11. use strict;
  12. use warnings;
  13. use bigint;
  14. use Carp qw(confess);
  15. use Exporter qw(import);
  16. our @EXPORT=qw(PERLASM_BEGIN PERLASM_END);
  17. our @EXPORT_OK=qw(AUTOLOAD LABEL INCLUDE stfle stck);
  18. our %EXPORT_TAGS=(
  19. # store-clock-fast facility
  20. SCF => [qw(stckf)],
  21. # general-instruction-extension facility
  22. GE => [qw(risbg)],
  23. # extended-immediate facility
  24. EI => [qw(clfi clgfi lt)],
  25. # miscellaneous-instruction-extensions facility 1
  26. MI1 => [qw(risbgn)],
  27. # message-security assist
  28. MSA => [qw(kmac km kmc kimd klmd)],
  29. # message-security-assist extension 4
  30. MSA4 => [qw(kmf kmo pcc kmctr)],
  31. # message-security-assist extension 5
  32. MSA5 => [qw(ppno prno)],
  33. # message-security-assist extension 8
  34. MSA8 => [qw(kma)],
  35. # message-security-assist extension 9
  36. MSA9 => [qw(kdsa)],
  37. # vector facility
  38. VX => [qw(vgef vgeg vgbm vzero vone vgm vgmb vgmh vgmf vgmg
  39. vl vlr vlrep vlrepb vlreph vlrepf vlrepg vleb vleh vlef vleg vleib
  40. vleih vleif vleig vlgv vlgvb vlgvh vlgvf vlgvg vllez vllezb vllezh
  41. vllezf vllezg vlm vlbb vlvg vlvgb vlvgh vlvgf vlvgg vlvgp
  42. vll vmrh vmrhb vmrhh vmrhf vmrhg vmrl vmrlb vmrlh vmrlf vmrlg vpk
  43. vpkh vpkf vpkg vpks vpksh vpksf vpksg vpkshs vpksfs vpksgs vpkls
  44. vpklsh vpklsf vpklsg vpklshs vpklsfs vpklsgs vperm vpdi vrep vrepb
  45. vreph vrepf vrepg vrepi vrepib vrepih vrepif vrepig vscef vsceg
  46. vsel vseg vsegb vsegh vsegf vst vsteb vsteh vstef vsteg vstm vstl
  47. vuph vuphb vuphh vuphf vuplh vuplhb vuplhh vuplhf vupl vuplb vuplhw
  48. vuplf vupll vupllb vupllh vupllf va vab vah vaf vag vaq vacc vaccb
  49. vacch vaccf vaccg vaccq vac vacq vaccc vacccq vn vnc vavg vavgb
  50. vavgh vavgf vavgg vavgl vavglb vavglh vavglf vavglg vcksm vec_ vecb
  51. vech vecf vecg vecl veclb veclh veclf veclg vceq vceqb vceqh vceqf
  52. vceqg vceqbs vceqhs vceqfs vceqgs vch vchb vchh vchf vchg vchbs
  53. vchhs vchfs vchgs vchl vchlb vchlh vchlf vchlg vchlbs vchlhs vchlfs
  54. vchlgs vclz vclzb vclzh vclzf vclzg vctz vctzb vctzh vctzf vctzg
  55. vx vgfm vgfmb vgfmh vgfmf vgfmg vgfma vgfmab vgfmah vgfmaf vgfmag
  56. vlc vlcb vlch vlcf vlcg vlp vlpb vlph vlpf vlpg vmx vmxb vmxh vmxf
  57. vmxg vmxl vmxlb vmxlh vmxlf vmxlg vmn vmnb vmnh vmnf vmng vmnl
  58. vmnlb vmnlh vmnlf vmnlg vmal vmalb vmalhw vmalf vmah vmahb vmahh
  59. vmahf vmalh vmalhb vmalhh vmalhf vmae vmaeb vmaeh vmaef vmale
  60. vmaleb vmaleh vmalef vmao vmaob vmaoh vmaof vmalo vmalob vmaloh
  61. vmalof vmh vmhb vmhh vmhf vmlh vmlhb vmlhh vmlhf vml vmlb vmlhw
  62. vmlf vme vmeb vmeh vmef vmle vmleb vmleh vmlef vmo vmob vmoh vmof
  63. vmlo vmlob vmloh vmlof vno vnot vo vpopct verllv verllvb verllvh
  64. verllvf verllvg verll verllb verllh verllf verllg verim verimb
  65. verimh verimf verimg veslv veslvb veslvh veslvf veslvg vesl veslb
  66. veslh veslf veslg vesrav vesravb vesravh vesravf vesravg vesra
  67. vesrab vesrah vesraf vesrag vesrlv vesrlvb vesrlvh vesrlvf vesrlvg
  68. vesrl vesrlb vesrlh vesrlf vesrlg vsl vslb vsldb vsra vsrab vsrl
  69. vsrlb vs vsb vsh vsf vsg vsq vscbi vscbib vscbih vscbif vscbig
  70. vscbiq vsbi vsbiq vsbcbi vsbcbiq vsumg vsumgh vsumgf vsumq vsumqf
  71. vsumqg vsum vsumb vsumh vtm vfae vfaeb vfaeh vfaef vfaebs vfaehs
  72. vfaefs vfaezb vfaezh vfaezf vfaezbs vfaezhs vfaezfs vfee vfeeb
  73. vfeeh vfeef vfeebs vfeehs vfeefs vfeezb vfeezh vfeezf vfeezbs
  74. vfeezhs vfeezfs vfene vfeneb vfeneh vfenef vfenebs vfenehs vfenefs
  75. vfenezb vfenezh vfenezf vfenezbs vfenezhs vfenezfs vistr vistrb
  76. vistrh vistrf vistrbs vistrhs vistrfs vstrc vstrcb vstrch vstrcf
  77. vstrcbs vstrchs vstrcfs vstrczb vstrczh vstrczf vstrczbs vstrczhs
  78. vstrczfs vfa vfadb wfadb wfc wfcdb wfk wfkdb vfce vfcedb wfcedb
  79. vfcedbs wfcedbs vfch vfchdb wfchdb vfchdbs wfchdbs vfche vfchedb
  80. wfchedb vfchedbs wfchedbs vcdg vcdgb wcdgb vcdlg vcdlgb wcdlgb vcgd
  81. vcgdb wcgdb vclgd vclgdb wclgdb vfd vfddb wfddb vfi vfidb wfidb
  82. vlde vldeb wldeb vled vledb wledb vfm vfmdb wfmdb vfma vfmadb
  83. wfmadb vfms vfmsdb wfmsdb vfpso vfpsodb wfpsodb vflcdb wflcdb
  84. vflndb wflndb vflpdb wflpdb vfsq vfsqdb wfsqdb vfs vfsdb wfsdb
  85. vftci vftcidb wftcidb)],
  86. # vector-enhancements facility 1
  87. VXE => [qw(vbperm vllezlf vmsl vmslg vnx vnn voc vpopctb vpopcth
  88. vpopctf vpopctg vfasb wfasb wfaxb wfcsb wfcxb wfksb wfkxb vfcesb
  89. vfcesbs wfcesb wfcesbs wfcexb wfcexbs vfchsb vfchsbs wfchsb wfchsbs
  90. wfchxb wfchxbs vfchesb vfchesbs wfchesb wfchesbs wfchexb wfchexbs
  91. vfdsb wfdsb wfdxb vfisb wfisb wfixb vfll vflls wflls wflld vflr
  92. vflrd wflrd wflrx vfmax vfmaxsb vfmaxdb wfmaxsb wfmaxdb wfmaxxb
  93. vfmin vfminsb vfmindb wfminsb wfmindb wfminxb vfmsb wfmsb wfmxb
  94. vfnma vfnms vfmasb wfmasb wfmaxb vfmssb wfmssb wfmsxb vfnmasb
  95. vfnmadb wfnmasb wfnmadb wfnmaxb vfnmssb vfnmsdb wfnmssb wfnmsdb
  96. wfnmsxb vfpsosb wfpsosb vflcsb wflcsb vflnsb wflnsb vflpsb wflpsb
  97. vfpsoxb wfpsoxb vflcxb wflcxb vflnxb wflnxb vflpxb wflpxb vfsqsb
  98. wfsqsb wfsqxb vfssb wfssb wfsxb vftcisb wftcisb wftcixb)],
  99. # vector-packed-decimal facility
  100. VXD => [qw(vlrlr vlrl vstrlr vstrl vap vcp vcvb vcvbg vcvd vcvdg vdp
  101. vlip vmp vmsp vpkz vpsop vrp vsdp vsrp vsp vtp vupkz)],
  102. );
  103. Exporter::export_ok_tags(qw(SCF GE EI MI1 MSA MSA4 MSA5 MSA8 MSA9 VX VXE VXD));
  104. our $AUTOLOAD;
  105. my $GR='(?:%r)?([0-9]|1[0-5])';
  106. my $VR='(?:%v)?([0-9]|1[0-9]|2[0-9]|3[0-1])';
  107. my ($file,$out);
  108. sub PERLASM_BEGIN
  109. {
  110. ($file,$out)=(shift,"");
  111. }
  112. sub PERLASM_END
  113. {
  114. if (defined($file)) {
  115. open(my $fd,'>',$file)||die("can't open $file: $!");
  116. print({$fd}$out);
  117. close($fd);
  118. } else {
  119. print($out);
  120. }
  121. }
  122. sub AUTOLOAD {
  123. confess(err("PARSE")) if (grep(!defined($_),@_));
  124. my $token;
  125. for ($AUTOLOAD) {
  126. $token=lc(".$1") if (/^.*::([A-Z_]+)$/);# uppercase: directive
  127. $token="\t$1" if (/^.*::([a-z]+)$/); # lowercase: mnemonic
  128. confess(err("PARSE")) if (!defined($token));
  129. }
  130. $token.="\t" if ($#_>=0);
  131. $out.=$token.join(',',@_)."\n";
  132. }
  133. sub LABEL { # label directive
  134. confess(err("ARGNUM")) if ($#_!=0);
  135. my ($label)=@_;
  136. $out.="$label:\n";
  137. }
  138. sub INCLUDE {
  139. confess(err("ARGNUM")) if ($#_!=0);
  140. my ($file)=@_;
  141. $out.="#include \"$file\"\n";
  142. }
  143. #
  144. # Mnemonics
  145. #
  146. sub stfle {
  147. confess(err("ARGNUM")) if ($#_!=0);
  148. S(0xb2b0,@_);
  149. }
  150. sub stck {
  151. confess(err("ARGNUM")) if ($#_!=0);
  152. S(0xb205,@_);
  153. }
  154. # store-clock-fast facility
  155. sub stckf {
  156. confess(err("ARGNUM")) if ($#_!=0);
  157. S(0xb27c,@_);
  158. }
  159. # extended-immediate facility
  160. sub clfi {
  161. confess(err("ARGNUM")) if ($#_!=1);
  162. RILa(0xc2f,@_);
  163. }
  164. sub clgfi {
  165. confess(err("ARGNUM")) if ($#_!=1);
  166. RILa(0xc2e,@_);
  167. }
  168. sub lt {
  169. confess(err("ARGNUM")) if ($#_!=1);
  170. RXYa(0xe312,@_);
  171. }
  172. # general-instruction-extension facility
  173. sub risbg {
  174. confess(err("ARGNUM")) if ($#_<3||$#_>4);
  175. RIEf(0xec55,@_);
  176. }
  177. # miscellaneous-instruction-extensions facility 1
  178. sub risbgn {
  179. confess(err("ARGNUM")) if ($#_<3||$#_>4);
  180. RIEf(0xec59,@_);
  181. }
  182. # MSA
  183. sub kmac {
  184. confess(err("ARGNUM")) if ($#_!=1);
  185. RRE(0xb91e,@_);
  186. }
  187. sub km {
  188. confess(err("ARGNUM")) if ($#_!=1);
  189. RRE(0xb92e,@_);
  190. }
  191. sub kmc {
  192. confess(err("ARGNUM")) if ($#_!=1);
  193. RRE(0xb92f,@_);
  194. }
  195. sub kimd {
  196. confess(err("ARGNUM")) if ($#_!=1);
  197. RRE(0xb93e,@_);
  198. }
  199. sub klmd {
  200. confess(err("ARGNUM")) if ($#_!=1);
  201. RRE(0xb93f,@_);
  202. }
  203. # MSA4
  204. sub kmf {
  205. confess(err("ARGNUM")) if ($#_!=1);
  206. RRE(0xb92a,@_);
  207. }
  208. sub kmo {
  209. confess(err("ARGNUM")) if ($#_!=1);
  210. RRE(0xb92b,@_);
  211. }
  212. sub pcc {
  213. confess(err("ARGNUM")) if ($#_!=-1);
  214. RRE(0xb92c,@_);
  215. }
  216. sub kmctr {
  217. confess(err("ARGNUM")) if ($#_!=2);
  218. RRFb(0xb92d,@_);
  219. }
  220. # MSA5
  221. sub prno {
  222. ppno(@_);
  223. }
  224. sub ppno { # deprecated, use prno
  225. confess(err("ARGNUM")) if ($#_!=1);
  226. RRE(0xb93c,@_);
  227. }
  228. # MSA8
  229. sub kma {
  230. confess(err("ARGNUM")) if ($#_!=2);
  231. RRFb(0xb929,@_);
  232. }
  233. # MSA9
  234. sub kdsa {
  235. confess(err("ARGNUM")) if ($#_!=1);
  236. RRE(0xb93a,@_);
  237. }
  238. # VX - Support Instructions
  239. sub vgef {
  240. confess(err("ARGNUM")) if ($#_!=2);
  241. VRV(0xe713,@_);
  242. }
  243. sub vgeg {
  244. confess(err("ARGNUM")) if ($#_!=2);
  245. VRV(0xe712,@_);
  246. }
  247. sub vgbm {
  248. confess(err("ARGNUM")) if ($#_!=1);
  249. VRIa(0xe744,@_);
  250. }
  251. sub vzero {
  252. vgbm(@_,0);
  253. }
  254. sub vone {
  255. vgbm(@_,0xffff);
  256. }
  257. sub vgm {
  258. confess(err("ARGNUM")) if ($#_!=3);
  259. VRIb(0xe746,@_);
  260. }
  261. sub vgmb {
  262. vgm(@_,0);
  263. }
  264. sub vgmh {
  265. vgm(@_,1);
  266. }
  267. sub vgmf {
  268. vgm(@_,2);
  269. }
  270. sub vgmg {
  271. vgm(@_,3);
  272. }
  273. sub vl {
  274. confess(err("ARGNUM")) if ($#_<1||$#_>2);
  275. VRX(0xe706,@_);
  276. }
  277. sub vlr {
  278. confess(err("ARGNUM")) if ($#_!=1);
  279. VRRa(0xe756,@_);
  280. }
  281. sub vlrep {
  282. confess(err("ARGNUM")) if ($#_!=2);
  283. VRX(0xe705,@_);
  284. }
  285. sub vlrepb {
  286. vlrep(@_,0);
  287. }
  288. sub vlreph {
  289. vlrep(@_,1);
  290. }
  291. sub vlrepf {
  292. vlrep(@_,2);
  293. }
  294. sub vlrepg {
  295. vlrep(@_,3);
  296. }
  297. sub vleb {
  298. confess(err("ARGNUM")) if ($#_!=2);
  299. VRX(0xe700,@_);
  300. }
  301. sub vleh {
  302. confess(err("ARGNUM")) if ($#_!=2);
  303. VRX(0xe701,@_);
  304. }
  305. sub vlef {
  306. confess(err("ARGNUM")) if ($#_!=2);
  307. VRX(0xe703,@_);
  308. }
  309. sub vleg {
  310. confess(err("ARGNUM")) if ($#_!=2);
  311. VRX(0xe702,@_);
  312. }
  313. sub vleib {
  314. confess(err("ARGNUM")) if ($#_!=2);
  315. VRIa(0xe740,@_);
  316. }
  317. sub vleih {
  318. confess(err("ARGNUM")) if ($#_!=2);
  319. VRIa(0xe741,@_);
  320. }
  321. sub vleif {
  322. confess(err("ARGNUM")) if ($#_!=2);
  323. VRIa(0xe743,@_);
  324. }
  325. sub vleig {
  326. confess(err("ARGNUM")) if ($#_!=2);
  327. VRIa(0xe742,@_);
  328. }
  329. sub vlgv {
  330. confess(err("ARGNUM")) if ($#_!=3);
  331. VRSc(0xe721,@_);
  332. }
  333. sub vlgvb {
  334. vlgv(@_,0);
  335. }
  336. sub vlgvh {
  337. vlgv(@_,1);
  338. }
  339. sub vlgvf {
  340. vlgv(@_,2);
  341. }
  342. sub vlgvg {
  343. vlgv(@_,3);
  344. }
  345. sub vllez {
  346. confess(err("ARGNUM")) if ($#_!=2);
  347. VRX(0xe704,@_);
  348. }
  349. sub vllezb {
  350. vllez(@_,0);
  351. }
  352. sub vllezh {
  353. vllez(@_,1);
  354. }
  355. sub vllezf {
  356. vllez(@_,2);
  357. }
  358. sub vllezg {
  359. vllez(@_,3);
  360. }
  361. sub vlm {
  362. confess(err("ARGNUM")) if ($#_<2||$#_>3);
  363. VRSa(0xe736,@_);
  364. }
  365. sub vlbb {
  366. confess(err("ARGNUM")) if ($#_!=2);
  367. VRX(0xe707,@_);
  368. }
  369. sub vlvg {
  370. confess(err("ARGNUM")) if ($#_!=3);
  371. VRSb(0xe722,@_);
  372. }
  373. sub vlvgb {
  374. vlvg(@_,0);
  375. }
  376. sub vlvgh {
  377. vlvg(@_,1);
  378. }
  379. sub vlvgf {
  380. vlvg(@_,2);
  381. }
  382. sub vlvgg {
  383. vlvg(@_,3);
  384. }
  385. sub vlvgp {
  386. confess(err("ARGNUM")) if ($#_!=2);
  387. VRRf(0xe762,@_);
  388. }
  389. sub vll {
  390. confess(err("ARGNUM")) if ($#_!=2);
  391. VRSb(0xe737,@_);
  392. }
  393. sub vmrh {
  394. confess(err("ARGNUM")) if ($#_!=3);
  395. VRRc(0xe761,@_);
  396. }
  397. sub vmrhb {
  398. vmrh(@_,0);
  399. }
  400. sub vmrhh {
  401. vmrh(@_,1);
  402. }
  403. sub vmrhf {
  404. vmrh(@_,2);
  405. }
  406. sub vmrhg {
  407. vmrh(@_,3);
  408. }
  409. sub vmrl {
  410. confess(err("ARGNUM")) if ($#_!=3);
  411. VRRc(0xe760,@_);
  412. }
  413. sub vmrlb {
  414. vmrl(@_,0);
  415. }
  416. sub vmrlh {
  417. vmrl(@_,1);
  418. }
  419. sub vmrlf {
  420. vmrl(@_,2);
  421. }
  422. sub vmrlg {
  423. vmrl(@_,3);
  424. }
  425. sub vpk {
  426. confess(err("ARGNUM")) if ($#_!=3);
  427. VRRc(0xe794,@_);
  428. }
  429. sub vpkh {
  430. vpk(@_,1);
  431. }
  432. sub vpkf {
  433. vpk(@_,2);
  434. }
  435. sub vpkg {
  436. vpk(@_,3);
  437. }
  438. sub vpks {
  439. confess(err("ARGNUM")) if ($#_!=4);
  440. VRRb(0xe797,@_);
  441. }
  442. sub vpksh {
  443. vpks(@_,1,0);
  444. }
  445. sub vpksf {
  446. vpks(@_,2,0);
  447. }
  448. sub vpksg {
  449. vpks(@_,3,0);
  450. }
  451. sub vpkshs {
  452. vpks(@_,1,1);
  453. }
  454. sub vpksfs {
  455. vpks(@_,2,1);
  456. }
  457. sub vpksgs {
  458. vpks(@_,3,1);
  459. }
  460. sub vpkls {
  461. confess(err("ARGNUM")) if ($#_!=4);
  462. VRRb(0xe795,@_);
  463. }
  464. sub vpklsh {
  465. vpkls(@_,1,0);
  466. }
  467. sub vpklsf {
  468. vpkls(@_,2,0);
  469. }
  470. sub vpklsg {
  471. vpkls(@_,3,0);
  472. }
  473. sub vpklshs {
  474. vpkls(@_,1,1);
  475. }
  476. sub vpklsfs {
  477. vpkls(@_,2,1);
  478. }
  479. sub vpklsgs {
  480. vpkls(@_,3,1);
  481. }
  482. sub vperm {
  483. confess(err("ARGNUM")) if ($#_!=3);
  484. VRRe(0xe78c,@_);
  485. }
  486. sub vpdi {
  487. confess(err("ARGNUM")) if ($#_!=3);
  488. VRRc(0xe784,@_);
  489. }
  490. sub vrep {
  491. confess(err("ARGNUM")) if ($#_!=3);
  492. VRIc(0xe74d,@_);
  493. }
  494. sub vrepb {
  495. vrep(@_,0);
  496. }
  497. sub vreph {
  498. vrep(@_,1);
  499. }
  500. sub vrepf {
  501. vrep(@_,2);
  502. }
  503. sub vrepg {
  504. vrep(@_,3);
  505. }
  506. sub vrepi {
  507. confess(err("ARGNUM")) if ($#_!=2);
  508. VRIa(0xe745,@_);
  509. }
  510. sub vrepib {
  511. vrepi(@_,0);
  512. }
  513. sub vrepih {
  514. vrepi(@_,1);
  515. }
  516. sub vrepif {
  517. vrepi(@_,2);
  518. }
  519. sub vrepig {
  520. vrepi(@_,3);
  521. }
  522. sub vscef {
  523. confess(err("ARGNUM")) if ($#_!=2);
  524. VRV(0xe71b,@_);
  525. }
  526. sub vsceg {
  527. confess(err("ARGNUM")) if ($#_!=2);
  528. VRV(0xe71a,@_);
  529. }
  530. sub vsel {
  531. confess(err("ARGNUM")) if ($#_!=3);
  532. VRRe(0xe78d,@_);
  533. }
  534. sub vseg {
  535. confess(err("ARGNUM")) if ($#_!=2);
  536. VRRa(0xe75f,@_);
  537. }
  538. sub vsegb {
  539. vseg(@_,0);
  540. }
  541. sub vsegh {
  542. vseg(@_,1);
  543. }
  544. sub vsegf {
  545. vseg(@_,2);
  546. }
  547. sub vst {
  548. confess(err("ARGNUM")) if ($#_<1||$#_>2);
  549. VRX(0xe70e,@_);
  550. }
  551. sub vsteb {
  552. confess(err("ARGNUM")) if ($#_!=2);
  553. VRX(0xe708,@_);
  554. }
  555. sub vsteh {
  556. confess(err("ARGNUM")) if ($#_!=2);
  557. VRX(0xe709,@_);
  558. }
  559. sub vstef {
  560. confess(err("ARGNUM")) if ($#_!=2);
  561. VRX(0xe70b,@_);
  562. }
  563. sub vsteg {
  564. confess(err("ARGNUM")) if ($#_!=2);
  565. VRX(0xe70a,@_);
  566. }
  567. sub vstm {
  568. confess(err("ARGNUM")) if ($#_<2||$#_>3);
  569. VRSa(0xe73e,@_);
  570. }
  571. sub vstl {
  572. confess(err("ARGNUM")) if ($#_!=2);
  573. VRSb(0xe73f,@_);
  574. }
  575. sub vuph {
  576. confess(err("ARGNUM")) if ($#_!=2);
  577. VRRa(0xe7d7,@_);
  578. }
  579. sub vuphb {
  580. vuph(@_,0);
  581. }
  582. sub vuphh {
  583. vuph(@_,1);
  584. }
  585. sub vuphf {
  586. vuph(@_,2);
  587. }
  588. sub vuplh {
  589. confess(err("ARGNUM")) if ($#_!=2);
  590. VRRa(0xe7d5,@_);
  591. }
  592. sub vuplhb {
  593. vuplh(@_,0);
  594. }
  595. sub vuplhh {
  596. vuplh(@_,1);
  597. }
  598. sub vuplhf {
  599. vuplh(@_,2);
  600. }
  601. sub vupl {
  602. confess(err("ARGNUM")) if ($#_!=2);
  603. VRRa(0xe7d6,@_);
  604. }
  605. sub vuplb {
  606. vupl(@_,0);
  607. }
  608. sub vuplhw {
  609. vupl(@_,1);
  610. }
  611. sub vuplf {
  612. vupl(@_,2);
  613. }
  614. sub vupll {
  615. confess(err("ARGNUM")) if ($#_!=2);
  616. VRRa(0xe7d4,@_);
  617. }
  618. sub vupllb {
  619. vupll(@_,0);
  620. }
  621. sub vupllh {
  622. vupll(@_,1);
  623. }
  624. sub vupllf {
  625. vupll(@_,2);
  626. }
  627. # VX - Integer Instructions
  628. sub va {
  629. confess(err("ARGNUM")) if ($#_!=3);
  630. VRRc(0xe7f3,@_);
  631. }
  632. sub vab {
  633. va(@_,0);
  634. }
  635. sub vah {
  636. va(@_,1);
  637. }
  638. sub vaf {
  639. va(@_,2);
  640. }
  641. sub vag {
  642. va(@_,3);
  643. }
  644. sub vaq {
  645. va(@_,4);
  646. }
  647. sub vacc {
  648. confess(err("ARGNUM")) if ($#_!=3);
  649. VRRc(0xe7f1,@_);
  650. }
  651. sub vaccb {
  652. vacc(@_,0);
  653. }
  654. sub vacch {
  655. vacc(@_,1);
  656. }
  657. sub vaccf {
  658. vacc(@_,2);
  659. }
  660. sub vaccg {
  661. vacc(@_,3);
  662. }
  663. sub vaccq {
  664. vacc(@_,4);
  665. }
  666. sub vac {
  667. confess(err("ARGNUM")) if ($#_!=4);
  668. VRRd(0xe7bb,@_);
  669. }
  670. sub vacq {
  671. vac(@_,4);
  672. }
  673. sub vaccc {
  674. confess(err("ARGNUM")) if ($#_!=4);
  675. VRRd(0xe7b9,@_);
  676. }
  677. sub vacccq {
  678. vaccc(@_,4);
  679. }
  680. sub vn {
  681. confess(err("ARGNUM")) if ($#_!=2);
  682. VRRc(0xe768,@_);
  683. }
  684. sub vnc {
  685. confess(err("ARGNUM")) if ($#_!=2);
  686. VRRc(0xe769,@_);
  687. }
  688. sub vavg {
  689. confess(err("ARGNUM")) if ($#_!=3);
  690. VRRc(0xe7f2,@_);
  691. }
  692. sub vavgb {
  693. vavg(@_,0);
  694. }
  695. sub vavgh {
  696. vavg(@_,1);
  697. }
  698. sub vavgf {
  699. vavg(@_,2);
  700. }
  701. sub vavgg {
  702. vavg(@_,3);
  703. }
  704. sub vavgl {
  705. confess(err("ARGNUM")) if ($#_!=3);
  706. VRRc(0xe7f0,@_);
  707. }
  708. sub vavglb {
  709. vavgl(@_,0);
  710. }
  711. sub vavglh {
  712. vavgl(@_,1);
  713. }
  714. sub vavglf {
  715. vavgl(@_,2);
  716. }
  717. sub vavglg {
  718. vavgl(@_,3);
  719. }
  720. sub vcksm {
  721. confess(err("ARGNUM")) if ($#_!=2);
  722. VRRc(0xe766,@_);
  723. }
  724. sub vec_ {
  725. confess(err("ARGNUM")) if ($#_!=2);
  726. VRRa(0xe7db,@_);
  727. }
  728. sub vecb {
  729. vec_(@_,0);
  730. }
  731. sub vech {
  732. vec_(@_,1);
  733. }
  734. sub vecf {
  735. vec_(@_,2);
  736. }
  737. sub vecg {
  738. vec_(@_,3);
  739. }
  740. sub vecl {
  741. confess(err("ARGNUM")) if ($#_!=2);
  742. VRRa(0xe7d9,@_);
  743. }
  744. sub veclb {
  745. vecl(@_,0);
  746. }
  747. sub veclh {
  748. vecl(@_,1);
  749. }
  750. sub veclf {
  751. vecl(@_,2);
  752. }
  753. sub veclg {
  754. vecl(@_,3);
  755. }
  756. sub vceq {
  757. confess(err("ARGNUM")) if ($#_!=4);
  758. VRRb(0xe7f8,@_);
  759. }
  760. sub vceqb {
  761. vceq(@_,0,0);
  762. }
  763. sub vceqh {
  764. vceq(@_,1,0);
  765. }
  766. sub vceqf {
  767. vceq(@_,2,0);
  768. }
  769. sub vceqg {
  770. vceq(@_,3,0);
  771. }
  772. sub vceqbs {
  773. vceq(@_,0,1);
  774. }
  775. sub vceqhs {
  776. vceq(@_,1,1);
  777. }
  778. sub vceqfs {
  779. vceq(@_,2,1);
  780. }
  781. sub vceqgs {
  782. vceq(@_,3,1);
  783. }
  784. sub vch {
  785. confess(err("ARGNUM")) if ($#_!=4);
  786. VRRb(0xe7fb,@_);
  787. }
  788. sub vchb {
  789. vch(@_,0,0);
  790. }
  791. sub vchh {
  792. vch(@_,1,0);
  793. }
  794. sub vchf {
  795. vch(@_,2,0);
  796. }
  797. sub vchg {
  798. vch(@_,3,0);
  799. }
  800. sub vchbs {
  801. vch(@_,0,1);
  802. }
  803. sub vchhs {
  804. vch(@_,1,1);
  805. }
  806. sub vchfs {
  807. vch(@_,2,1);
  808. }
  809. sub vchgs {
  810. vch(@_,3,1);
  811. }
  812. sub vchl {
  813. confess(err("ARGNUM")) if ($#_!=4);
  814. VRRb(0xe7f9,@_);
  815. }
  816. sub vchlb {
  817. vchl(@_,0,0);
  818. }
  819. sub vchlh {
  820. vchl(@_,1,0);
  821. }
  822. sub vchlf {
  823. vchl(@_,2,0);
  824. }
  825. sub vchlg {
  826. vchl(@_,3,0);
  827. }
  828. sub vchlbs {
  829. vchl(@_,0,1);
  830. }
  831. sub vchlhs {
  832. vchl(@_,1,1);
  833. }
  834. sub vchlfs {
  835. vchl(@_,2,1);
  836. }
  837. sub vchlgs {
  838. vchl(@_,3,1);
  839. }
  840. sub vclz {
  841. confess(err("ARGNUM")) if ($#_!=2);
  842. VRRa(0xe753,@_);
  843. }
  844. sub vclzb {
  845. vclz(@_,0);
  846. }
  847. sub vclzh {
  848. vclz(@_,1);
  849. }
  850. sub vclzf {
  851. vclz(@_,2);
  852. }
  853. sub vclzg {
  854. vclz(@_,3);
  855. }
  856. sub vctz {
  857. confess(err("ARGNUM")) if ($#_!=2);
  858. VRRa(0xe752,@_);
  859. }
  860. sub vctzb {
  861. vctz(@_,0);
  862. }
  863. sub vctzh {
  864. vctz(@_,1);
  865. }
  866. sub vctzf {
  867. vctz(@_,2);
  868. }
  869. sub vctzg {
  870. vctz(@_,3);
  871. }
  872. sub vx {
  873. confess(err("ARGNUM")) if ($#_!=2);
  874. VRRc(0xe76d,@_);
  875. }
  876. sub vgfm {
  877. confess(err("ARGNUM")) if ($#_!=3);
  878. VRRc(0xe7b4,@_);
  879. }
  880. sub vgfmb {
  881. vgfm(@_,0);
  882. }
  883. sub vgfmh {
  884. vgfm(@_,1);
  885. }
  886. sub vgfmf {
  887. vgfm(@_,2);
  888. }
  889. sub vgfmg {
  890. vgfm(@_,3);
  891. }
  892. sub vgfma {
  893. confess(err("ARGNUM")) if ($#_!=4);
  894. VRRd(0xe7bc,@_);
  895. }
  896. sub vgfmab {
  897. vgfma(@_,0);
  898. }
  899. sub vgfmah {
  900. vgfma(@_,1);
  901. }
  902. sub vgfmaf {
  903. vgfma(@_,2);
  904. }
  905. sub vgfmag {
  906. vgfma(@_,3);
  907. }
  908. sub vlc {
  909. confess(err("ARGNUM")) if ($#_!=2);
  910. VRRa(0xe7de,@_);
  911. }
  912. sub vlcb {
  913. vlc(@_,0);
  914. }
  915. sub vlch {
  916. vlc(@_,1);
  917. }
  918. sub vlcf {
  919. vlc(@_,2);
  920. }
  921. sub vlcg {
  922. vlc(@_,3);
  923. }
  924. sub vlp {
  925. confess(err("ARGNUM")) if ($#_!=2);
  926. VRRa(0xe7df,@_);
  927. }
  928. sub vlpb {
  929. vlp(@_,0);
  930. }
  931. sub vlph {
  932. vlp(@_,1);
  933. }
  934. sub vlpf {
  935. vlp(@_,2);
  936. }
  937. sub vlpg {
  938. vlp(@_,3);
  939. }
  940. sub vmx {
  941. confess(err("ARGNUM")) if ($#_!=3);
  942. VRRc(0xe7ff,@_);
  943. }
  944. sub vmxb {
  945. vmx(@_,0);
  946. }
  947. sub vmxh {
  948. vmx(@_,1);
  949. }
  950. sub vmxf {
  951. vmx(@_,2);
  952. }
  953. sub vmxg {
  954. vmx(@_,3);
  955. }
  956. sub vmxl {
  957. confess(err("ARGNUM")) if ($#_!=3);
  958. VRRc(0xe7fd,@_);
  959. }
  960. sub vmxlb {
  961. vmxl(@_,0);
  962. }
  963. sub vmxlh {
  964. vmxl(@_,1);
  965. }
  966. sub vmxlf {
  967. vmxl(@_,2);
  968. }
  969. sub vmxlg {
  970. vmxl(@_,3);
  971. }
  972. sub vmn {
  973. confess(err("ARGNUM")) if ($#_!=3);
  974. VRRc(0xe7fe,@_);
  975. }
  976. sub vmnb {
  977. vmn(@_,0);
  978. }
  979. sub vmnh {
  980. vmn(@_,1);
  981. }
  982. sub vmnf {
  983. vmn(@_,2);
  984. }
  985. sub vmng {
  986. vmn(@_,3);
  987. }
  988. sub vmnl {
  989. confess(err("ARGNUM")) if ($#_!=3);
  990. VRRc(0xe7fc,@_);
  991. }
  992. sub vmnlb {
  993. vmnl(@_,0);
  994. }
  995. sub vmnlh {
  996. vmnl(@_,1);
  997. }
  998. sub vmnlf {
  999. vmnl(@_,2);
  1000. }
  1001. sub vmnlg {
  1002. vmnl(@_,3);
  1003. }
  1004. sub vmal {
  1005. confess(err("ARGNUM")) if ($#_!=4);
  1006. VRRd(0xe7aa,@_);
  1007. }
  1008. sub vmalb {
  1009. vmal(@_,0);
  1010. }
  1011. sub vmalhw {
  1012. vmal(@_,1);
  1013. }
  1014. sub vmalf {
  1015. vmal(@_,2);
  1016. }
  1017. sub vmah {
  1018. confess(err("ARGNUM")) if ($#_!=4);
  1019. VRRd(0xe7ab,@_);
  1020. }
  1021. sub vmahb {
  1022. vmah(@_,0);
  1023. }
  1024. sub vmahh {
  1025. vmah(@_,1);
  1026. }
  1027. sub vmahf {
  1028. vmah(@_,2);
  1029. }
  1030. sub vmalh {
  1031. confess(err("ARGNUM")) if ($#_!=4);
  1032. VRRd(0xe7a9,@_);
  1033. }
  1034. sub vmalhb {
  1035. vmalh(@_,0);
  1036. }
  1037. sub vmalhh {
  1038. vmalh(@_,1);
  1039. }
  1040. sub vmalhf {
  1041. vmalh(@_,2);
  1042. }
  1043. sub vmae {
  1044. confess(err("ARGNUM")) if ($#_!=4);
  1045. VRRd(0xe7ae,@_);
  1046. }
  1047. sub vmaeb {
  1048. vmae(@_,0);
  1049. }
  1050. sub vmaeh {
  1051. vmae(@_,1);
  1052. }
  1053. sub vmaef {
  1054. vmae(@_,2);
  1055. }
  1056. sub vmale {
  1057. confess(err("ARGNUM")) if ($#_!=4);
  1058. VRRd(0xe7ac,@_);
  1059. }
  1060. sub vmaleb {
  1061. vmale(@_,0);
  1062. }
  1063. sub vmaleh {
  1064. vmale(@_,1);
  1065. }
  1066. sub vmalef {
  1067. vmale(@_,2);
  1068. }
  1069. sub vmao {
  1070. confess(err("ARGNUM")) if ($#_!=4);
  1071. VRRd(0xe7af,@_);
  1072. }
  1073. sub vmaob {
  1074. vmao(@_,0);
  1075. }
  1076. sub vmaoh {
  1077. vmao(@_,1);
  1078. }
  1079. sub vmaof {
  1080. vmao(@_,2);
  1081. }
  1082. sub vmalo {
  1083. confess(err("ARGNUM")) if ($#_!=4);
  1084. VRRd(0xe7ad,@_);
  1085. }
  1086. sub vmalob {
  1087. vmalo(@_,0);
  1088. }
  1089. sub vmaloh {
  1090. vmalo(@_,1);
  1091. }
  1092. sub vmalof {
  1093. vmalo(@_,2);
  1094. }
  1095. sub vmh {
  1096. confess(err("ARGNUM")) if ($#_!=3);
  1097. VRRc(0xe7a3,@_);
  1098. }
  1099. sub vmhb {
  1100. vmh(@_,0);
  1101. }
  1102. sub vmhh {
  1103. vmh(@_,1);
  1104. }
  1105. sub vmhf {
  1106. vmh(@_,2);
  1107. }
  1108. sub vmlh {
  1109. confess(err("ARGNUM")) if ($#_!=3);
  1110. VRRc(0xe7a1,@_);
  1111. }
  1112. sub vmlhb {
  1113. vmlh(@_,0);
  1114. }
  1115. sub vmlhh {
  1116. vmlh(@_,1);
  1117. }
  1118. sub vmlhf {
  1119. vmlh(@_,2);
  1120. }
  1121. sub vml {
  1122. confess(err("ARGNUM")) if ($#_!=3);
  1123. VRRc(0xe7a2,@_);
  1124. }
  1125. sub vmlb {
  1126. vml(@_,0);
  1127. }
  1128. sub vmlhw {
  1129. vml(@_,1);
  1130. }
  1131. sub vmlf {
  1132. vml(@_,2);
  1133. }
  1134. sub vme {
  1135. confess(err("ARGNUM")) if ($#_!=3);
  1136. VRRc(0xe7a6,@_);
  1137. }
  1138. sub vmeb {
  1139. vme(@_,0);
  1140. }
  1141. sub vmeh {
  1142. vme(@_,1);
  1143. }
  1144. sub vmef {
  1145. vme(@_,2);
  1146. }
  1147. sub vmle {
  1148. confess(err("ARGNUM")) if ($#_!=3);
  1149. VRRc(0xe7a4,@_);
  1150. }
  1151. sub vmleb {
  1152. vmle(@_,0);
  1153. }
  1154. sub vmleh {
  1155. vmle(@_,1);
  1156. }
  1157. sub vmlef {
  1158. vmle(@_,2);
  1159. }
  1160. sub vmo {
  1161. confess(err("ARGNUM")) if ($#_!=3);
  1162. VRRc(0xe7a7,@_);
  1163. }
  1164. sub vmob {
  1165. vmo(@_,0);
  1166. }
  1167. sub vmoh {
  1168. vmo(@_,1);
  1169. }
  1170. sub vmof {
  1171. vmo(@_,2);
  1172. }
  1173. sub vmlo {
  1174. confess(err("ARGNUM")) if ($#_!=3);
  1175. VRRc(0xe7a5,@_);
  1176. }
  1177. sub vmlob {
  1178. vmlo(@_,0);
  1179. }
  1180. sub vmloh {
  1181. vmlo(@_,1);
  1182. }
  1183. sub vmlof {
  1184. vmlo(@_,2);
  1185. }
  1186. sub vno {
  1187. confess(err("ARGNUM")) if ($#_!=2);
  1188. VRRc(0xe76b,@_);
  1189. }
  1190. sub vnot {
  1191. vno(@_,$_[1]);
  1192. }
  1193. sub vo {
  1194. confess(err("ARGNUM")) if ($#_!=2);
  1195. VRRc(0xe76a,@_);
  1196. }
  1197. sub vpopct {
  1198. confess(err("ARGNUM")) if ($#_!=2);
  1199. VRRa(0xe750,@_);
  1200. }
  1201. sub verllv {
  1202. confess(err("ARGNUM")) if ($#_!=3);
  1203. VRRc(0xe773,@_);
  1204. }
  1205. sub verllvb {
  1206. verllv(@_,0);
  1207. }
  1208. sub verllvh {
  1209. verllv(@_,1);
  1210. }
  1211. sub verllvf {
  1212. verllv(@_,2);
  1213. }
  1214. sub verllvg {
  1215. verllv(@_,3);
  1216. }
  1217. sub verll {
  1218. confess(err("ARGNUM")) if ($#_!=3);
  1219. VRSa(0xe733,@_);
  1220. }
  1221. sub verllb {
  1222. verll(@_,0);
  1223. }
  1224. sub verllh {
  1225. verll(@_,1);
  1226. }
  1227. sub verllf {
  1228. verll(@_,2);
  1229. }
  1230. sub verllg {
  1231. verll(@_,3);
  1232. }
  1233. sub verim {
  1234. confess(err("ARGNUM")) if ($#_!=4);
  1235. VRId(0xe772,@_);
  1236. }
  1237. sub verimb {
  1238. verim(@_,0);
  1239. }
  1240. sub verimh {
  1241. verim(@_,1);
  1242. }
  1243. sub verimf {
  1244. verim(@_,2);
  1245. }
  1246. sub verimg {
  1247. verim(@_,3);
  1248. }
  1249. sub veslv {
  1250. confess(err("ARGNUM")) if ($#_!=3);
  1251. VRRc(0xe770,@_);
  1252. }
  1253. sub veslvb {
  1254. veslv(@_,0);
  1255. }
  1256. sub veslvh {
  1257. veslv(@_,1);
  1258. }
  1259. sub veslvf {
  1260. veslv(@_,2);
  1261. }
  1262. sub veslvg {
  1263. veslv(@_,3);
  1264. }
  1265. sub vesl {
  1266. confess(err("ARGNUM")) if ($#_!=3);
  1267. VRSa(0xe730,@_);
  1268. }
  1269. sub veslb {
  1270. vesl(@_,0);
  1271. }
  1272. sub veslh {
  1273. vesl(@_,1);
  1274. }
  1275. sub veslf {
  1276. vesl(@_,2);
  1277. }
  1278. sub veslg {
  1279. vesl(@_,3);
  1280. }
  1281. sub vesrav {
  1282. confess(err("ARGNUM")) if ($#_!=3);
  1283. VRRc(0xe77a,@_);
  1284. }
  1285. sub vesravb {
  1286. vesrav(@_,0);
  1287. }
  1288. sub vesravh {
  1289. vesrav(@_,1);
  1290. }
  1291. sub vesravf {
  1292. vesrav(@_,2);
  1293. }
  1294. sub vesravg {
  1295. vesrav(@_,3);
  1296. }
  1297. sub vesra {
  1298. confess(err("ARGNUM")) if ($#_!=3);
  1299. VRSa(0xe73a,@_);
  1300. }
  1301. sub vesrab {
  1302. vesra(@_,0);
  1303. }
  1304. sub vesrah {
  1305. vesra(@_,1);
  1306. }
  1307. sub vesraf {
  1308. vesra(@_,2);
  1309. }
  1310. sub vesrag {
  1311. vesra(@_,3);
  1312. }
  1313. sub vesrlv {
  1314. confess(err("ARGNUM")) if ($#_!=3);
  1315. VRRc(0xe778,@_);
  1316. }
  1317. sub vesrlvb {
  1318. vesrlv(@_,0);
  1319. }
  1320. sub vesrlvh {
  1321. vesrlv(@_,1);
  1322. }
  1323. sub vesrlvf {
  1324. vesrlv(@_,2);
  1325. }
  1326. sub vesrlvg {
  1327. vesrlv(@_,3);
  1328. }
  1329. sub vesrl {
  1330. confess(err("ARGNUM")) if ($#_!=3);
  1331. VRSa(0xe738,@_);
  1332. }
  1333. sub vesrlb {
  1334. vesrl(@_,0);
  1335. }
  1336. sub vesrlh {
  1337. vesrl(@_,1);
  1338. }
  1339. sub vesrlf {
  1340. vesrl(@_,2);
  1341. }
  1342. sub vesrlg {
  1343. vesrl(@_,3);
  1344. }
  1345. sub vsl {
  1346. confess(err("ARGNUM")) if ($#_!=2);
  1347. VRRc(0xe774,@_);
  1348. }
  1349. sub vslb {
  1350. confess(err("ARGNUM")) if ($#_!=2);
  1351. VRRc(0xe775,@_);
  1352. }
  1353. sub vsldb {
  1354. confess(err("ARGNUM")) if ($#_!=3);
  1355. VRId(0xe777,@_);
  1356. }
  1357. sub vsra {
  1358. confess(err("ARGNUM")) if ($#_!=2);
  1359. VRRc(0xe77e,@_);
  1360. }
  1361. sub vsrab {
  1362. confess(err("ARGNUM")) if ($#_!=2);
  1363. VRRc(0xe77f,@_);
  1364. }
  1365. sub vsrl {
  1366. confess(err("ARGNUM")) if ($#_!=2);
  1367. VRRc(0xe77c,@_);
  1368. }
  1369. sub vsrlb {
  1370. confess(err("ARGNUM")) if ($#_!=2);
  1371. VRRc(0xe77d,@_);
  1372. }
  1373. sub vs {
  1374. confess(err("ARGNUM")) if ($#_!=3);
  1375. VRRc(0xe7f7,@_);
  1376. }
  1377. sub vsb {
  1378. vs(@_,0);
  1379. }
  1380. sub vsh {
  1381. vs(@_,1);
  1382. }
  1383. sub vsf {
  1384. vs(@_,2);
  1385. }
  1386. sub vsg {
  1387. vs(@_,3);
  1388. }
  1389. sub vsq {
  1390. vs(@_,4);
  1391. }
  1392. sub vscbi {
  1393. confess(err("ARGNUM")) if ($#_!=3);
  1394. VRRc(0xe7f5,@_);
  1395. }
  1396. sub vscbib {
  1397. vscbi(@_,0);
  1398. }
  1399. sub vscbih {
  1400. vscbi(@_,1);
  1401. }
  1402. sub vscbif {
  1403. vscbi(@_,2);
  1404. }
  1405. sub vscbig {
  1406. vscbi(@_,3);
  1407. }
  1408. sub vscbiq {
  1409. vscbi(@_,4);
  1410. }
  1411. sub vsbi {
  1412. confess(err("ARGNUM")) if ($#_!=4);
  1413. VRRd(0xe7bf,@_);
  1414. }
  1415. sub vsbiq {
  1416. vsbi(@_,4);
  1417. }
  1418. sub vsbcbi {
  1419. confess(err("ARGNUM")) if ($#_!=4);
  1420. VRRd(0xe7bd,@_);
  1421. }
  1422. sub vsbcbiq {
  1423. vsbcbi(@_,4);
  1424. }
  1425. sub vsumg {
  1426. confess(err("ARGNUM")) if ($#_!=3);
  1427. VRRc(0xe765,@_);
  1428. }
  1429. sub vsumgh {
  1430. vsumg(@_,1);
  1431. }
  1432. sub vsumgf {
  1433. vsumg(@_,2);
  1434. }
  1435. sub vsumq {
  1436. confess(err("ARGNUM")) if ($#_!=3);
  1437. VRRc(0xe767,@_);
  1438. }
  1439. sub vsumqf {
  1440. vsumq(@_,2);
  1441. }
  1442. sub vsumqg {
  1443. vsumq(@_,3);
  1444. }
  1445. sub vsum {
  1446. confess(err("ARGNUM")) if ($#_!=3);
  1447. VRRc(0xe764,@_);
  1448. }
  1449. sub vsumb {
  1450. vsum(@_,0);
  1451. }
  1452. sub vsumh {
  1453. vsum(@_,1);
  1454. }
  1455. sub vtm {
  1456. confess(err("ARGNUM")) if ($#_!=1);
  1457. VRRa(0xe7d8,@_);
  1458. }
  1459. # VX - String Instructions
  1460. sub vfae {
  1461. confess(err("ARGNUM")) if ($#_<3||$#_>4);
  1462. VRRb(0xe782,@_);
  1463. }
  1464. sub vfaeb {
  1465. vfae(@_[0..2],0,$_[3]);
  1466. }
  1467. sub vfaeh {
  1468. vfae(@_[0..2],1,$_[3]);
  1469. }
  1470. sub vfaef {
  1471. vfae(@_[0..2],2,$_[3]);
  1472. }
  1473. sub vfaebs {
  1474. $_[3]=0 if (!defined($_[3]));
  1475. vfae(@_[0..2],0,0x1|$_[3]);
  1476. }
  1477. sub vfaehs {
  1478. $_[3]=0 if (!defined($_[3]));
  1479. vfae(@_[0..2],1,0x1|$_[3]);
  1480. }
  1481. sub vfaefs {
  1482. $_[3]=0 if (!defined($_[3]));
  1483. vfae(@_[0..2],2,0x1|$_[3]);
  1484. }
  1485. sub vfaezb {
  1486. $_[3]=0 if (!defined($_[3]));
  1487. vfae(@_[0..2],0,0x2|$_[3]);
  1488. }
  1489. sub vfaezh {
  1490. $_[3]=0 if (!defined($_[3]));
  1491. vfae(@_[0..2],1,0x2|$_[3]);
  1492. }
  1493. sub vfaezf {
  1494. $_[3]=0 if (!defined($_[3]));
  1495. vfae(@_[0..2],2,0x2|$_[3]);
  1496. }
  1497. sub vfaezbs {
  1498. $_[3]=0 if (!defined($_[3]));
  1499. vfae(@_[0..2],0,0x3|$_[3]);
  1500. }
  1501. sub vfaezhs {
  1502. $_[3]=0 if (!defined($_[3]));
  1503. vfae(@_[0..2],1,0x3|$_[3]);
  1504. }
  1505. sub vfaezfs {
  1506. $_[3]=0 if (!defined($_[3]));
  1507. vfae(@_[0..2],2,0x3|$_[3]);
  1508. }
  1509. sub vfee {
  1510. confess(err("ARGNUM")) if ($#_<3||$#_>4);
  1511. VRRb(0xe780,@_);
  1512. }
  1513. sub vfeeb {
  1514. vfee(@_[0..2],0,$_[3]);
  1515. }
  1516. sub vfeeh {
  1517. vfee(@_[0..2],1,$_[3]);
  1518. }
  1519. sub vfeef {
  1520. vfee(@_[0..2],2,$_[3]);
  1521. }
  1522. sub vfeebs {
  1523. vfee(@_,0,1);
  1524. }
  1525. sub vfeehs {
  1526. vfee(@_,1,1);
  1527. }
  1528. sub vfeefs {
  1529. vfee(@_,2,1);
  1530. }
  1531. sub vfeezb {
  1532. vfee(@_,0,2);
  1533. }
  1534. sub vfeezh {
  1535. vfee(@_,1,2);
  1536. }
  1537. sub vfeezf {
  1538. vfee(@_,2,2);
  1539. }
  1540. sub vfeezbs {
  1541. vfee(@_,0,3);
  1542. }
  1543. sub vfeezhs {
  1544. vfee(@_,1,3);
  1545. }
  1546. sub vfeezfs {
  1547. vfee(@_,2,3);
  1548. }
  1549. sub vfene {
  1550. confess(err("ARGNUM")) if ($#_<3||$#_>4);
  1551. VRRb(0xe781,@_);
  1552. }
  1553. sub vfeneb {
  1554. vfene(@_[0..2],0,$_[3]);
  1555. }
  1556. sub vfeneh {
  1557. vfene(@_[0..2],1,$_[3]);
  1558. }
  1559. sub vfenef {
  1560. vfene(@_[0..2],2,$_[3]);
  1561. }
  1562. sub vfenebs {
  1563. vfene(@_,0,1);
  1564. }
  1565. sub vfenehs {
  1566. vfene(@_,1,1);
  1567. }
  1568. sub vfenefs {
  1569. vfene(@_,2,1);
  1570. }
  1571. sub vfenezb {
  1572. vfene(@_,0,2);
  1573. }
  1574. sub vfenezh {
  1575. vfene(@_,1,2);
  1576. }
  1577. sub vfenezf {
  1578. vfene(@_,2,2);
  1579. }
  1580. sub vfenezbs {
  1581. vfene(@_,0,3);
  1582. }
  1583. sub vfenezhs {
  1584. vfene(@_,1,3);
  1585. }
  1586. sub vfenezfs {
  1587. vfene(@_,2,3);
  1588. }
  1589. sub vistr {
  1590. confess(err("ARGNUM")) if ($#_<2||$#_>3);
  1591. VRRa(0xe75c,@_[0..2],0,$_[3]);
  1592. }
  1593. sub vistrb {
  1594. vistr(@_[0..1],0,$_[2]);
  1595. }
  1596. sub vistrh {
  1597. vistr(@_[0..1],1,$_[2]);
  1598. }
  1599. sub vistrf {
  1600. vistr(@_[0..1],2,$_[2]);
  1601. }
  1602. sub vistrbs {
  1603. vistr(@_,0,1);
  1604. }
  1605. sub vistrhs {
  1606. vistr(@_,1,1);
  1607. }
  1608. sub vistrfs {
  1609. vistr(@_,2,1);
  1610. }
  1611. sub vstrc {
  1612. confess(err("ARGNUM")) if ($#_<4||$#_>5);
  1613. VRRd(0xe78a,@_);
  1614. }
  1615. sub vstrcb {
  1616. vstrc(@_[0..3],0,$_[4]);
  1617. }
  1618. sub vstrch {
  1619. vstrc(@_[0..3],1,$_[4]);
  1620. }
  1621. sub vstrcf {
  1622. vstrc(@_[0..3],2,$_[4]);
  1623. }
  1624. sub vstrcbs {
  1625. $_[4]=0 if (!defined($_[4]));
  1626. vstrc(@_[0..3],0,0x1|$_[4]);
  1627. }
  1628. sub vstrchs {
  1629. $_[4]=0 if (!defined($_[4]));
  1630. vstrc(@_[0..3],1,0x1|$_[4]);
  1631. }
  1632. sub vstrcfs {
  1633. $_[4]=0 if (!defined($_[4]));
  1634. vstrc(@_[0..3],2,0x1|$_[4]);
  1635. }
  1636. sub vstrczb {
  1637. $_[4]=0 if (!defined($_[4]));
  1638. vstrc(@_[0..3],0,0x2|$_[4]);
  1639. }
  1640. sub vstrczh {
  1641. $_[4]=0 if (!defined($_[4]));
  1642. vstrc(@_[0..3],1,0x2|$_[4]);
  1643. }
  1644. sub vstrczf {
  1645. $_[4]=0 if (!defined($_[4]));
  1646. vstrc(@_[0..3],2,0x2|$_[4]);
  1647. }
  1648. sub vstrczbs {
  1649. $_[4]=0 if (!defined($_[4]));
  1650. vstrc(@_[0..3],0,0x3|$_[4]);
  1651. }
  1652. sub vstrczhs {
  1653. $_[4]=0 if (!defined($_[4]));
  1654. vstrc(@_[0..3],1,0x3|$_[4]);
  1655. }
  1656. sub vstrczfs {
  1657. $_[4]=0 if (!defined($_[4]));
  1658. vstrc(@_[0..3],2,0x3|$_[4]);
  1659. }
  1660. # VX - Floating-point Instructions
  1661. sub vfa {
  1662. confess(err("ARGNUM")) if ($#_!=4);
  1663. VRRc(0xe7e3,@_);
  1664. }
  1665. sub vfadb {
  1666. vfa(@_,3,0);
  1667. }
  1668. sub wfadb {
  1669. vfa(@_,3,8);
  1670. }
  1671. sub wfc {
  1672. confess(err("ARGNUM")) if ($#_!=3);
  1673. VRRa(0xe7cb,@_);
  1674. }
  1675. sub wfcdb {
  1676. wfc(@_,3,0);
  1677. }
  1678. sub wfk {
  1679. confess(err("ARGNUM")) if ($#_!=3);
  1680. VRRa(0xe7ca,@_);
  1681. }
  1682. sub wfksb {
  1683. wfk(@_,2,0);
  1684. }
  1685. sub wfkdb {
  1686. wfk(@_,3,0);
  1687. }
  1688. sub wfkxb {
  1689. wfk(@_,4,0);
  1690. }
  1691. sub vfce {
  1692. confess(err("ARGNUM")) if ($#_!=5);
  1693. VRRc(0xe7e8,@_);
  1694. }
  1695. sub vfcedb {
  1696. vfce(@_,3,0,0);
  1697. }
  1698. sub vfcedbs {
  1699. vfce(@_,3,0,1);
  1700. }
  1701. sub wfcedb {
  1702. vfce(@_,3,8,0);
  1703. }
  1704. sub wfcedbs {
  1705. vfce(@_,3,8,1);
  1706. }
  1707. sub vfch {
  1708. confess(err("ARGNUM")) if ($#_!=5);
  1709. VRRc(0xe7eb,@_);
  1710. }
  1711. sub vfchdb {
  1712. vfch(@_,3,0,0);
  1713. }
  1714. sub vfchdbs {
  1715. vfch(@_,3,0,1);
  1716. }
  1717. sub wfchdb {
  1718. vfch(@_,3,8,0);
  1719. }
  1720. sub wfchdbs {
  1721. vfch(@_,3,8,1);
  1722. }
  1723. sub vfche {
  1724. confess(err("ARGNUM")) if ($#_!=5);
  1725. VRRc(0xe7ea,@_);
  1726. }
  1727. sub vfchedb {
  1728. vfche(@_,3,0,0);
  1729. }
  1730. sub vfchedbs {
  1731. vfche(@_,3,0,1);
  1732. }
  1733. sub wfchedb {
  1734. vfche(@_,3,8,0);
  1735. }
  1736. sub wfchedbs {
  1737. vfche(@_,3,8,1);
  1738. }
  1739. sub vcdg {
  1740. confess(err("ARGNUM")) if ($#_!=4);
  1741. VRRa(0xe7c3,@_);
  1742. }
  1743. sub vcdgb {
  1744. vcdg(@_[0..1],3,@_[2..3]);
  1745. }
  1746. sub wcdgb {
  1747. vcdg(@_[0..1],3,0x8|$_[2],$_[3]);
  1748. }
  1749. sub vcdlg {
  1750. confess(err("ARGNUM")) if ($#_!=4);
  1751. VRRa(0xe7c1,@_);
  1752. }
  1753. sub vcdlgb {
  1754. vcdlg(@_[0..1],3,@_[2..3]);
  1755. }
  1756. sub wcdlgb {
  1757. vcdlg(@_[0..1],3,0x8|$_[2],$_[3]);
  1758. }
  1759. sub vcgd {
  1760. confess(err("ARGNUM")) if ($#_!=4);
  1761. VRRa(0xe7c2,@_);
  1762. }
  1763. sub vcgdb {
  1764. vcgd(@_[0..1],3,@_[2..3]);
  1765. }
  1766. sub wcgdb {
  1767. vcgd(@_[0..1],3,0x8|$_[2],$_[3]);
  1768. }
  1769. sub vclgd {
  1770. confess(err("ARGNUM")) if ($#_!=4);
  1771. VRRa(0xe7c0,@_);
  1772. }
  1773. sub vclgdb {
  1774. vclgd(@_[0..1],3,@_[2..3]);
  1775. }
  1776. sub wclgdb {
  1777. vclgd(@_[0..1],3,0x8|$_[2],$_[3]);
  1778. }
  1779. sub vfd {
  1780. confess(err("ARGNUM")) if ($#_!=4);
  1781. VRRc(0xe7e5,@_);
  1782. }
  1783. sub vfddb {
  1784. vfd(@_,3,0);
  1785. }
  1786. sub wfddb {
  1787. vfd(@_,3,8);
  1788. }
  1789. sub vfi {
  1790. confess(err("ARGNUM")) if ($#_!=4);
  1791. VRRa(0xe7c7,@_);
  1792. }
  1793. sub vfidb {
  1794. vfi(@_[0..1],3,@_[2..3]);
  1795. }
  1796. sub wfidb {
  1797. vfi(@_[0..1],3,0x8|$_[2],$_[3]);
  1798. }
  1799. sub vlde { # deprecated, use vfll
  1800. confess(err("ARGNUM")) if ($#_!=3);
  1801. VRRa(0xe7c4,@_);
  1802. }
  1803. sub vldeb { # deprecated, use vflls
  1804. vlde(@_,2,0);
  1805. }
  1806. sub wldeb { # deprecated, use wflls
  1807. vlde(@_,2,8);
  1808. }
  1809. sub vled { # deprecated, use vflr
  1810. confess(err("ARGNUM")) if ($#_!=4);
  1811. VRRa(0xe7c5,@_);
  1812. }
  1813. sub vledb { # deprecated, use vflrd
  1814. vled(@_[0..1],3,@_[2..3]);
  1815. }
  1816. sub wledb { # deprecated, use wflrd
  1817. vled(@_[0..1],3,0x8|$_[2],$_[3]);
  1818. }
  1819. sub vfm {
  1820. confess(err("ARGNUM")) if ($#_!=4);
  1821. VRRc(0xe7e7,@_);
  1822. }
  1823. sub vfmdb {
  1824. vfm(@_,3,0);
  1825. }
  1826. sub wfmdb {
  1827. vfm(@_,3,8);
  1828. }
  1829. sub vfma {
  1830. confess(err("ARGNUM")) if ($#_!=5);
  1831. VRRe(0xe78f,@_);
  1832. }
  1833. sub vfmadb {
  1834. vfma(@_,0,3);
  1835. }
  1836. sub wfmadb {
  1837. vfma(@_,8,3);
  1838. }
  1839. sub vfms {
  1840. confess(err("ARGNUM")) if ($#_!=5);
  1841. VRRe(0xe78e,@_);
  1842. }
  1843. sub vfmsdb {
  1844. vfms(@_,0,3);
  1845. }
  1846. sub wfmsdb {
  1847. vfms(@_,8,3);
  1848. }
  1849. sub vfpso {
  1850. confess(err("ARGNUM")) if ($#_!=4);
  1851. VRRa(0xe7cc,@_);
  1852. }
  1853. sub vfpsodb {
  1854. vfpso(@_[0..1],3,0,$_[2]);
  1855. }
  1856. sub wfpsodb {
  1857. vfpso(@_[0..1],3,8,$_[2]);
  1858. }
  1859. sub vflcdb {
  1860. vfpso(@_,3,0,0);
  1861. }
  1862. sub wflcdb {
  1863. vfpso(@_,3,8,0);
  1864. }
  1865. sub vflndb {
  1866. vfpso(@_,3,0,1);
  1867. }
  1868. sub wflndb {
  1869. vfpso(@_,3,8,1);
  1870. }
  1871. sub vflpdb {
  1872. vfpso(@_,3,0,2);
  1873. }
  1874. sub wflpdb {
  1875. vfpso(@_,3,8,2);
  1876. }
  1877. sub vfsq {
  1878. confess(err("ARGNUM")) if ($#_!=3);
  1879. VRRa(0xe7ce,@_);
  1880. }
  1881. sub vfsqdb {
  1882. vfsq(@_,3,0);
  1883. }
  1884. sub wfsqdb {
  1885. vfsq(@_,3,8);
  1886. }
  1887. sub vfs {
  1888. confess(err("ARGNUM")) if ($#_!=4);
  1889. VRRc(0xe7e2,@_);
  1890. }
  1891. sub vfsdb {
  1892. vfs(@_,3,0);
  1893. }
  1894. sub wfsdb {
  1895. vfs(@_,3,8);
  1896. }
  1897. sub vftci {
  1898. confess(err("ARGNUM")) if ($#_!=4);
  1899. VRIe(0xe74a,@_);
  1900. }
  1901. sub vftcidb {
  1902. vftci(@_,3,0);
  1903. }
  1904. sub wftcidb {
  1905. vftci(@_,3,8);
  1906. }
  1907. # VXE - Support Instructions
  1908. sub vbperm {
  1909. confess(err("ARGNUM")) if ($#_!=2);
  1910. VRRc(0xe785,@_);
  1911. }
  1912. sub vllezlf {
  1913. vllez(@_,6);
  1914. }
  1915. # VXE - Integer Instructions
  1916. sub vmsl {
  1917. confess(err("ARGNUM")) if ($#_!=5);
  1918. VRRd(0xe7b8,@_);
  1919. }
  1920. sub vmslg {
  1921. vmsl(@_[0..3],3,$_[4]);
  1922. }
  1923. sub vnx {
  1924. confess(err("ARGNUM")) if ($#_!=2);
  1925. VRRc(0xe76c,@_);
  1926. }
  1927. sub vnn {
  1928. confess(err("ARGNUM")) if ($#_!=2);
  1929. VRRc(0xe76e,@_);
  1930. }
  1931. sub voc {
  1932. confess(err("ARGNUM")) if ($#_!=2);
  1933. VRRc(0xe76f,@_);
  1934. }
  1935. sub vpopctb {
  1936. vpopct(@_,0);
  1937. }
  1938. sub vpopcth {
  1939. vpopct(@_,1);
  1940. }
  1941. sub vpopctf {
  1942. vpopct(@_,2);
  1943. }
  1944. sub vpopctg {
  1945. vpopct(@_,3);
  1946. }
  1947. # VXE - Floating-Point Instructions
  1948. sub vfasb {
  1949. vfa(@_,2,0);
  1950. }
  1951. sub wfasb {
  1952. vfa(@_,2,8);
  1953. }
  1954. sub wfaxb {
  1955. vfa(@_,4,8);
  1956. }
  1957. sub wfcsb {
  1958. wfc(@_,2,0);
  1959. }
  1960. sub wfcxb {
  1961. wfc(@_,4,0);
  1962. }
  1963. sub vfcesb {
  1964. vfce(@_,2,0,0);
  1965. }
  1966. sub vfcesbs {
  1967. vfce(@_,2,0,1);
  1968. }
  1969. sub wfcesb {
  1970. vfce(@_,2,8,0);
  1971. }
  1972. sub wfcesbs {
  1973. vfce(@_,2,8,1);
  1974. }
  1975. sub wfcexb {
  1976. vfce(@_,4,8,0);
  1977. }
  1978. sub wfcexbs {
  1979. vfce(@_,4,8,1);
  1980. }
  1981. sub vfchsb {
  1982. vfch(@_,2,0,0);
  1983. }
  1984. sub vfchsbs {
  1985. vfch(@_,2,0,1);
  1986. }
  1987. sub wfchsb {
  1988. vfch(@_,2,8,0);
  1989. }
  1990. sub wfchsbs {
  1991. vfch(@_,2,8,1);
  1992. }
  1993. sub wfchxb {
  1994. vfch(@_,4,8,0);
  1995. }
  1996. sub wfchxbs {
  1997. vfch(@_,4,8,1);
  1998. }
  1999. sub vfchesb {
  2000. vfche(@_,2,0,0);
  2001. }
  2002. sub vfchesbs {
  2003. vfche(@_,2,0,1);
  2004. }
  2005. sub wfchesb {
  2006. vfche(@_,2,8,0);
  2007. }
  2008. sub wfchesbs {
  2009. vfche(@_,2,8,1);
  2010. }
  2011. sub wfchexb {
  2012. vfche(@_,4,8,0);
  2013. }
  2014. sub wfchexbs {
  2015. vfche(@_,4,8,1);
  2016. }
  2017. sub vfdsb {
  2018. vfd(@_,2,0);
  2019. }
  2020. sub wfdsb {
  2021. vfd(@_,2,8);
  2022. }
  2023. sub wfdxb {
  2024. vfd(@_,4,8);
  2025. }
  2026. sub vfisb {
  2027. vfi(@_[0..1],2,@_[2..3]);
  2028. }
  2029. sub wfisb {
  2030. vfi(@_[0..1],2,0x8|$_[2],$_[3]);
  2031. }
  2032. sub wfixb {
  2033. vfi(@_[0..1],4,0x8|$_[2],$_[3]);
  2034. }
  2035. sub vfll {
  2036. vlde(@_);
  2037. }
  2038. sub vflls {
  2039. vfll(@_,2,0);
  2040. }
  2041. sub wflls {
  2042. vfll(@_,2,8);
  2043. }
  2044. sub wflld {
  2045. vfll(@_,3,8);
  2046. }
  2047. sub vflr {
  2048. vled(@_);
  2049. }
  2050. sub vflrd {
  2051. vflr(@_[0..1],3,@_[2..3]);
  2052. }
  2053. sub wflrd {
  2054. vflr(@_[0..1],3,0x8|$_[2],$_[3]);
  2055. }
  2056. sub wflrx {
  2057. vflr(@_[0..1],4,0x8|$_[2],$_[3]);
  2058. }
  2059. sub vfmax {
  2060. confess(err("ARGNUM")) if ($#_!=5);
  2061. VRRc(0xe7ef,@_);
  2062. }
  2063. sub vfmaxsb {
  2064. vfmax(@_[0..2],2,0,$_[3]);
  2065. }
  2066. sub vfmaxdb {
  2067. vfmax(@_[0..2],3,0,$_[3]);
  2068. }
  2069. sub wfmaxsb {
  2070. vfmax(@_[0..2],2,8,$_[3]);
  2071. }
  2072. sub wfmaxdb {
  2073. vfmax(@_[0..2],3,8,$_[3]);
  2074. }
  2075. sub wfmaxxb {
  2076. vfmax(@_[0..2],4,8,$_[3]);
  2077. }
  2078. sub vfmin {
  2079. confess(err("ARGNUM")) if ($#_!=5);
  2080. VRRc(0xe7ee,@_);
  2081. }
  2082. sub vfminsb {
  2083. vfmin(@_[0..2],2,0,$_[5]);
  2084. }
  2085. sub vfmindb {
  2086. vfmin(@_[0..2],3,0,$_[5]);
  2087. }
  2088. sub wfminsb {
  2089. vfmin(@_[0..2],2,8,$_[5]);
  2090. }
  2091. sub wfmindb {
  2092. vfmin(@_[0..2],3,8,$_[5]);
  2093. }
  2094. sub wfminxb {
  2095. vfmin(@_[0..2],4,8,$_[5]);
  2096. }
  2097. sub vfmsb {
  2098. vfm(@_,2,0);
  2099. }
  2100. sub wfmsb {
  2101. vfm(@_,2,8);
  2102. }
  2103. sub wfmxb {
  2104. vfm(@_,4,8);
  2105. }
  2106. sub vfmasb {
  2107. vfma(@_,0,2);
  2108. }
  2109. sub wfmasb {
  2110. vfma(@_,8,2);
  2111. }
  2112. sub wfmaxb {
  2113. vfma(@_,8,4);
  2114. }
  2115. sub vfmssb {
  2116. vfms(@_,0,2);
  2117. }
  2118. sub wfmssb {
  2119. vfms(@_,8,2);
  2120. }
  2121. sub wfmsxb {
  2122. vfms(@_,8,4);
  2123. }
  2124. sub vfnma {
  2125. confess(err("ARGNUM")) if ($#_!=5);
  2126. VRRe(0xe79f,@_);
  2127. }
  2128. sub vfnmasb {
  2129. vfnma(@_,0,2);
  2130. }
  2131. sub vfnmadb {
  2132. vfnma(@_,0,3);
  2133. }
  2134. sub wfnmasb {
  2135. vfnma(@_,8,2);
  2136. }
  2137. sub wfnmadb {
  2138. vfnma(@_,8,3);
  2139. }
  2140. sub wfnmaxb {
  2141. vfnma(@_,8,4);
  2142. }
  2143. sub vfnms {
  2144. confess(err("ARGNUM")) if ($#_!=5);
  2145. VRRe(0xe79e,@_);
  2146. }
  2147. sub vfnmssb {
  2148. vfnms(@_,0,2);
  2149. }
  2150. sub vfnmsdb {
  2151. vfnms(@_,0,3);
  2152. }
  2153. sub wfnmssb {
  2154. vfnms(@_,8,2);
  2155. }
  2156. sub wfnmsdb {
  2157. vfnms(@_,8,3);
  2158. }
  2159. sub wfnmsxb {
  2160. vfnms(@_,8,4);
  2161. }
  2162. sub vfpsosb {
  2163. vfpso(@_[0..1],2,0,$_[2]);
  2164. }
  2165. sub wfpsosb {
  2166. vfpso(@_[0..1],2,8,$_[2]);
  2167. }
  2168. sub vflcsb {
  2169. vfpso(@_,2,0,0);
  2170. }
  2171. sub wflcsb {
  2172. vfpso(@_,2,8,0);
  2173. }
  2174. sub vflnsb {
  2175. vfpso(@_,2,0,1);
  2176. }
  2177. sub wflnsb {
  2178. vfpso(@_,2,8,1);
  2179. }
  2180. sub vflpsb {
  2181. vfpso(@_,2,0,2);
  2182. }
  2183. sub wflpsb {
  2184. vfpso(@_,2,8,2);
  2185. }
  2186. sub vfpsoxb {
  2187. vfpso(@_[0..1],4,0,$_[2]);
  2188. }
  2189. sub wfpsoxb {
  2190. vfpso(@_[0..1],4,8,$_[2]);
  2191. }
  2192. sub vflcxb {
  2193. vfpso(@_,4,0,0);
  2194. }
  2195. sub wflcxb {
  2196. vfpso(@_,4,8,0);
  2197. }
  2198. sub vflnxb {
  2199. vfpso(@_,4,0,1);
  2200. }
  2201. sub wflnxb {
  2202. vfpso(@_,4,8,1);
  2203. }
  2204. sub vflpxb {
  2205. vfpso(@_,4,0,2);
  2206. }
  2207. sub wflpxb {
  2208. vfpso(@_,4,8,2);
  2209. }
  2210. sub vfsqsb {
  2211. vfsq(@_,2,0);
  2212. }
  2213. sub wfsqsb {
  2214. vfsq(@_,2,8);
  2215. }
  2216. sub wfsqxb {
  2217. vfsq(@_,4,8);
  2218. }
  2219. sub vfssb {
  2220. vfs(@_,2,0);
  2221. }
  2222. sub wfssb {
  2223. vfs(@_,2,8);
  2224. }
  2225. sub wfsxb {
  2226. vfs(@_,4,8);
  2227. }
  2228. sub vftcisb {
  2229. vftci(@_,2,0);
  2230. }
  2231. sub wftcisb {
  2232. vftci(@_,2,8);
  2233. }
  2234. sub wftcixb {
  2235. vftci(@_,4,8);
  2236. }
  2237. # VXD - Support Instructions
  2238. sub vlrlr {
  2239. confess(err("ARGNUM")) if ($#_!=2);
  2240. VRSd(0xe637,@_);
  2241. }
  2242. sub vlrl {
  2243. confess(err("ARGNUM")) if ($#_!=2);
  2244. VSI(0xe635,@_);
  2245. }
  2246. sub vstrlr {
  2247. confess(err("ARGNUM")) if ($#_!=2);
  2248. VRSd(0xe63f,@_);
  2249. }
  2250. sub vstrl {
  2251. confess(err("ARGNUM")) if ($#_!=2);
  2252. VSI(0xe63d,@_);
  2253. }
  2254. sub vap {
  2255. confess(err("ARGNUM")) if ($#_!=4);
  2256. VRIf(0xe671,@_);
  2257. }
  2258. sub vcp {
  2259. confess(err("ARGNUM")) if ($#_!=2);
  2260. VRRh(0xe677,@_);
  2261. }
  2262. sub vcvb {
  2263. confess(err("ARGNUM")) if ($#_!=2);
  2264. VRRi(0xe650,@_);
  2265. }
  2266. sub vcvbg {
  2267. confess(err("ARGNUM")) if ($#_!=2);
  2268. VRRi(0xe652,@_);
  2269. }
  2270. sub vcvd {
  2271. confess(err("ARGNUM")) if ($#_!=3);
  2272. VRIi(0xe658,@_);
  2273. }
  2274. sub vcvdg {
  2275. confess(err("ARGNUM")) if ($#_!=3);
  2276. VRIi(0xe65a,@_);
  2277. }
  2278. sub vdp {
  2279. confess(err("ARGNUM")) if ($#_!=4);
  2280. VRIf(0xe67a,@_);
  2281. }
  2282. sub vlip {
  2283. confess(err("ARGNUM")) if ($#_!=2);
  2284. VRIh(0xe649,@_);
  2285. }
  2286. sub vmp {
  2287. confess(err("ARGNUM")) if ($#_!=4);
  2288. VRIf(0xe678,@_);
  2289. }
  2290. sub vmsp {
  2291. confess(err("ARGNUM")) if ($#_!=4);
  2292. VRIf(0xe679,@_);
  2293. }
  2294. sub vpkz {
  2295. confess(err("ARGNUM")) if ($#_!=2);
  2296. VSI(0xe634,@_);
  2297. }
  2298. sub vpsop {
  2299. confess(err("ARGNUM")) if ($#_!=4);
  2300. VRIg(0xe65b,@_);
  2301. }
  2302. sub vrp {
  2303. confess(err("ARGNUM")) if ($#_!=4);
  2304. VRIf(0xe67b,@_);
  2305. }
  2306. sub vsdp {
  2307. confess(err("ARGNUM")) if ($#_!=4);
  2308. VRIf(0xe67e,@_);
  2309. }
  2310. sub vsrp {
  2311. confess(err("ARGNUM")) if ($#_!=4);
  2312. VRIg(0xe659,@_);
  2313. }
  2314. sub vsp {
  2315. confess(err("ARGNUM")) if ($#_!=4);
  2316. VRIf(0xe673,@_);
  2317. }
  2318. sub vtp {
  2319. confess(err("ARGNUM")) if ($#_!=0);
  2320. VRRg(0xe65f,@_);
  2321. }
  2322. sub vupkz {
  2323. confess(err("ARGNUM")) if ($#_!=2);
  2324. VSI(0xe63c,@_);
  2325. }
  2326. #
  2327. # Instruction Formats
  2328. #
  2329. sub RIEf {
  2330. confess(err("ARGNUM")) if ($#_<4||5<$#_);
  2331. my $ops=join(',',@_[1..$#_]);
  2332. my $memn=(caller(1))[3];
  2333. $memn=~s/^.*:://;
  2334. my ($opcode,$r1,$r2,$i3,$i4,$i5)=(shift,get_R(shift),get_R(shift),
  2335. get_I(shift,8),get_I(shift,8),
  2336. get_I(shift,8));
  2337. $out.="\t.word\t";
  2338. $out.=sprintf("%#06x",(($opcode>>8)<<8|$r1<<4|$r2)).",";
  2339. $out.=sprintf("%#06x",($i3<<8)|$i4).",";
  2340. $out.=sprintf("%#06x",($i5<<8)|($opcode&0xff));
  2341. $out.="\t# $memn\t$ops\n";
  2342. }
  2343. sub RILa {
  2344. confess(err("ARGNUM")) if ($#_!=2);
  2345. my $ops=join(',',@_[1..$#_]);
  2346. my $memn=(caller(1))[3];
  2347. $memn=~s/^.*:://;
  2348. my ($opcode,$r1,$i2)=(shift,get_R(shift),get_I(shift,32));
  2349. $out.="\t.word\t";
  2350. $out.=sprintf("%#06x",(($opcode>>4)<<8|$r1<<4|($opcode&0xf))).",";
  2351. $out.=sprintf("%#06x",($i2>>16)).",";
  2352. $out.=sprintf("%#06x",($i2&0xffff));
  2353. $out.="\t# $memn\t$ops\n";
  2354. }
  2355. sub RRE {
  2356. confess(err("ARGNUM")) if ($#_<0||2<$#_);
  2357. my $ops=join(',',@_[1..$#_]);
  2358. my $memn=(caller(1))[3];
  2359. $memn=~s/^.*:://;
  2360. my ($opcode,$r1,$r2)=(shift,get_R(shift),get_R(shift));
  2361. $out.="\t.long\t".sprintf("%#010x",($opcode<<16|$r1<<4|$r2));
  2362. $out.="\t# $memn";
  2363. # RRE can have 0 ops e.g., pcc.
  2364. $out.="\t$ops" if ((defined($ops))&&($ops ne ''));
  2365. $out.="\n";
  2366. }
  2367. sub RRFb {
  2368. confess(err("ARGNUM")) if ($#_<3||4<$#_);
  2369. my $ops=join(',',@_[1..$#_]);
  2370. my $memn=(caller(1))[3];
  2371. $memn=~s/^.*:://;
  2372. my ($opcode,$r1,$r3,$r2,$m4)=(shift,get_R(shift),get_R(shift)
  2373. ,get_R(shift),get_M(shift));
  2374. $out.="\t.long\t"
  2375. .sprintf("%#010x",($opcode<<16|$r3<<12|$m4<<8|$r1<<4|$r2));
  2376. $out.="\t# $memn\t$ops\n";
  2377. }
  2378. sub RXYa {
  2379. confess(err("ARGNUM")) if ($#_!=2);
  2380. my $ops=join(',',@_[1..$#_]);
  2381. my $memn=(caller(1))[3];
  2382. $memn=~s/^.*:://;
  2383. my ($opcode,$r1,$d2,$x2,$b2)=(shift,get_R(shift),get_DXB(shift));
  2384. $out.="\t.word\t";
  2385. $out.=sprintf("%#06x",(($opcode>>8)<<8|$r1<<4|$x2)).",";
  2386. $out.=sprintf("%#06x",($b2<<12|($d2&0xfff))).",";
  2387. $out.=sprintf("%#06x",(($d2>>12)<<8|$opcode&0xff));
  2388. $out.="\t# $memn\t$ops\n";
  2389. }
  2390. sub S {
  2391. confess(err("ARGNUM")) if ($#_<0||1<$#_);
  2392. my $ops=join(',',@_[1..$#_]);
  2393. my $memn=(caller(1))[3];
  2394. $memn=~s/^.*:://;
  2395. my ($opcode,$d2,$b2)=(shift,get_DB(shift));
  2396. $out.="\t.long\t".sprintf("%#010x",($opcode<<16|$b2<<12|$d2));
  2397. $out.="\t# $memn\t$ops\n";
  2398. }
  2399. sub VRIa {
  2400. confess(err("ARGNUM")) if ($#_<2||3<$#_);
  2401. my $ops=join(',',@_[1..$#_]);
  2402. my $memn=(caller(1))[3];
  2403. $memn=~s/^.*:://;
  2404. my ($opcode,$v1,$i2,$m3)=(shift,get_V(shift),get_I(shift,16),
  2405. get_M(shift));
  2406. $out.="\t.word\t";
  2407. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4)).",";
  2408. $out.=sprintf("%#06x",$i2).",";
  2409. $out.=sprintf("%#06x",($m3<<12|RXB($v1)<<8|$opcode&0xff));
  2410. $out.="\t# $memn\t$ops\n";
  2411. }
  2412. sub VRIb {
  2413. confess(err("ARGNUM")) if ($#_!=4);
  2414. my $ops=join(',',@_[1..$#_]);
  2415. my $memn=(caller(1))[3];
  2416. $memn=~s/^.*:://;
  2417. my ($opcode,$v1,$i2,$i3,$m4)=(shift,get_V(shift),get_I(shift,8),
  2418. ,get_I(shift,8),get_M(shift));
  2419. $out.="\t.word\t";
  2420. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4)).",";
  2421. $out.=sprintf("%#06x",($i2<<8|$i3)).",";
  2422. $out.=sprintf("%#06x",($m4<<12|RXB($v1)<<8|$opcode&0xff));
  2423. $out.="\t# $memn\t$ops\n";
  2424. }
  2425. sub VRIc {
  2426. confess(err("ARGNUM")) if ($#_!=4);
  2427. my $ops=join(',',@_[1..$#_]);
  2428. my $memn=(caller(1))[3];
  2429. $memn=~s/^.*:://;
  2430. my ($opcode,$v1,$v3,$i2,$m4)=(shift,get_V(shift),get_V(shift),
  2431. ,get_I(shift,16),get_M(shift));
  2432. $out.="\t.word\t";
  2433. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4)|($v3&0xf)).",";
  2434. $out.=sprintf("%#06x",$i2).",";
  2435. $out.=sprintf("%#06x",($m4<<12|RXB($v1,$v3)<<8|$opcode&0xff));
  2436. $out.="\t# $memn\t$ops\n";
  2437. }
  2438. sub VRId {
  2439. confess(err("ARGNUM")) if ($#_<4||$#_>5);
  2440. my $ops=join(',',@_[1..$#_]);
  2441. my $memn=(caller(1))[3];
  2442. $memn=~s/^.*:://;
  2443. my ($opcode,$v1,$v2,$v3,$i4,$m5)=(shift,get_V(shift),get_V(shift),
  2444. ,get_V(shift),get_I(shift,8),get_M(shift));
  2445. $out.="\t.word\t";
  2446. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4)|($v2&0xf)).",";
  2447. $out.=sprintf("%#06x",(($v3&0xf)<<12|$i4)).",";
  2448. $out.=sprintf("%#06x",($m5<<12|RXB($v1,$v2,$v3)<<8|$opcode&0xff));
  2449. $out.="\t# $memn\t$ops\n";
  2450. }
  2451. sub VRIe {
  2452. confess(err("ARGNUM")) if ($#_!=5);
  2453. my $ops=join(',',@_[1..$#_]);
  2454. my $memn=(caller(1))[3];
  2455. $memn=~s/^.*:://;
  2456. my ($opcode,$v1,$v2,$i3,$m4,$m5)=(shift,get_V(shift),get_V(shift),
  2457. ,get_I(shift,12),get_M(shift),get_M(shift));
  2458. $out.="\t.word\t";
  2459. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4)|($v2&0xf)).",";
  2460. $out.=sprintf("%#06x",($i3<<4|$m5)).",";
  2461. $out.=sprintf("%#06x",($m4<<12|RXB($v1,$v2)<<8|$opcode&0xff));
  2462. $out.="\t# $memn\t$ops\n";
  2463. }
  2464. sub VRIf {
  2465. confess(err("ARGNUM")) if ($#_!=5);
  2466. my $ops=join(',',@_[1..$#_]);
  2467. my $memn=(caller(1))[3];
  2468. $memn=~s/^.*:://;
  2469. my ($opcode,$v1,$v2,$v3,$i4,$m5)=(shift,get_V(shift),get_V(shift),
  2470. ,get_V(shift),get_I(shift,8),get_M(shift));
  2471. $out.="\t.word\t";
  2472. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4)|($v2&0xf)).",";
  2473. $out.=sprintf("%#06x",(($v3&0xf)<<12|$m5<<4)|$i4>>4).",";
  2474. $out.=sprintf("%#06x",(($i4&0xf)<<12|RXB($v1,$v2,$v3)<<8|$opcode&0xff));
  2475. $out.="\t# $memn\t$ops\n";
  2476. }
  2477. sub VRIg {
  2478. confess(err("ARGNUM")) if ($#_!=5);
  2479. my $ops=join(',',@_[1..$#_]);
  2480. my $memn=(caller(1))[3];
  2481. $memn=~s/^.*:://;
  2482. my ($opcode,$v1,$v2,$i3,$i4,$m5)=(shift,get_V(shift),get_V(shift),
  2483. ,get_I(shift,8),get_I(shift,8),get_M(shift));
  2484. $out.="\t.word\t";
  2485. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4)|($v2&0xf)).",";
  2486. $out.=sprintf("%#06x",($i4<<8|$m5<<4|$i3>>4)).",";
  2487. $out.=sprintf("%#06x",(($i3&0xf)<<12|RXB($v1,$v2)<<8|$opcode&0xff));
  2488. $out.="\t# $memn\t$ops\n";
  2489. }
  2490. sub VRIh {
  2491. confess(err("ARGNUM")) if ($#_!=3);
  2492. my $ops=join(',',@_[1..$#_]);
  2493. my $memn=(caller(1))[3];
  2494. $memn=~s/^.*:://;
  2495. my ($opcode,$v1,$i2,$i3)=(shift,get_V(shift),get_I(shift,16),
  2496. get_I(shift,4));
  2497. $out.="\t.word\t";
  2498. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4)).",";
  2499. $out.=sprintf("%#06x",$i2).",";
  2500. $out.=sprintf("%#06x",($i3<<12|RXB($v1)<<8|$opcode&0xff));
  2501. $out.="\t# $memn\t$ops\n";
  2502. }
  2503. sub VRIi {
  2504. confess(err("ARGNUM")) if ($#_!=4);
  2505. my $ops=join(',',@_[1..$#_]);
  2506. my $memn=(caller(1))[3];
  2507. $memn=~s/^.*:://;
  2508. my ($opcode,$v1,$r2,$i3,$m4)=(shift,get_V(shift),get_R(shift),
  2509. ,get_I(shift,8),get_M(shift));
  2510. $out.="\t.word\t";
  2511. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4)|$r2).",";
  2512. $out.=sprintf("%#06x",($m4<<4|$i3>>4)).",";
  2513. $out.=sprintf("%#06x",(($i3&0xf)<<12|RXB($v1)<<8|$opcode&0xff));
  2514. $out.="\t# $memn\t$ops\n";
  2515. }
  2516. sub VRRa {
  2517. confess(err("ARGNUM")) if ($#_<2||5<$#_);
  2518. my $ops=join(',',@_[1..$#_]);
  2519. my $memn=(caller(1))[3];
  2520. $memn=~s/^.*:://;
  2521. my ($opcode,$v1,$v2,$m3,$m4,$m5)=(shift,get_V(shift),get_V(shift),
  2522. get_M(shift),get_M(shift),get_M(shift));
  2523. $out.="\t.word\t";
  2524. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|($v2&0xf))).",";
  2525. $out.=sprintf("%#06x",($m5<<4|$m4)).",";
  2526. $out.=sprintf("%#06x",($m3<<12|RXB($v1,$v2)<<8|$opcode&0xff));
  2527. $out.="\t# $memn\t$ops\n";
  2528. }
  2529. sub VRRb {
  2530. confess(err("ARGNUM")) if ($#_<3||5<$#_);
  2531. my $ops=join(',',@_[1..$#_]);
  2532. my $memn=(caller(1))[3];
  2533. $memn=~s/^.*:://;
  2534. my ($opcode,$v1,$v2,$v3,$m4,$m5)=(shift,get_V(shift),get_V(shift),
  2535. get_V(shift),get_M(shift),get_M(shift));
  2536. $out.="\t.word\t";
  2537. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|($v2&0xf))).",";
  2538. $out.=sprintf("%#06x",(($v3&0xf)<<12|$m5<<4)).",";
  2539. $out.=sprintf("%#06x",($m4<<12|RXB($v1,$v2,$v3)<<8|$opcode&0xff));
  2540. $out.="\t# $memn\t$ops\n";
  2541. }
  2542. sub VRRc {
  2543. confess(err("ARGNUM")) if ($#_<3||6<$#_);
  2544. my $ops=join(',',@_[1..$#_]);
  2545. my $memn=(caller(1))[3];
  2546. $memn=~s/^.*:://;
  2547. my ($opcode,$v1,$v2,$v3,$m4,$m5,$m6)=(shift,get_V(shift),get_V(shift),
  2548. get_V(shift),get_M(shift),get_M(shift),get_M(shift));
  2549. $out.="\t.word\t";
  2550. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|($v2&0xf))).",";
  2551. $out.=sprintf("%#06x",(($v3&0xf)<<12|$m6<<4|$m5)).",";
  2552. $out.=sprintf("%#06x",($m4<<12|RXB($v1,$v2,$v3)<<8|$opcode&0xff));
  2553. $out.="\t# $memn\t$ops\n";
  2554. }
  2555. sub VRRd {
  2556. confess(err("ARGNUM")) if ($#_<4||6<$#_);
  2557. my $ops=join(',',@_[1..$#_]);
  2558. my $memn=(caller(1))[3];
  2559. $memn=~s/^.*:://;
  2560. my ($opcode,$v1,$v2,$v3,$v4,$m5,$m6)=(shift,get_V(shift),get_V(shift),
  2561. get_V(shift),get_V(shift),get_M(shift),get_M(shift));
  2562. $out.="\t.word\t";
  2563. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|($v2&0xf))).",";
  2564. $out.=sprintf("%#06x",(($v3&0xf)<<12|$m5<<8|$m6<<4)).",";
  2565. $out.=sprintf("%#06x",(($v4&0xf)<<12|RXB($v1,$v2,$v3,$v4)<<8|$opcode&0xff));
  2566. $out.="\t# $memn\t$ops\n";
  2567. }
  2568. sub VRRe {
  2569. confess(err("ARGNUM")) if ($#_<4||6<$#_);
  2570. my $ops=join(',',@_[1..$#_]);
  2571. my $memn=(caller(1))[3];
  2572. $memn=~s/^.*:://;
  2573. my ($opcode,$v1,$v2,$v3,$v4,$m5,$m6)=(shift,get_V(shift),get_V(shift),
  2574. get_V(shift),get_V(shift),get_M(shift),get_M(shift));
  2575. $out.="\t.word\t";
  2576. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|($v2&0xf))).",";
  2577. $out.=sprintf("%#06x",(($v3&0xf)<<12|$m6<<8|$m5)).",";
  2578. $out.=sprintf("%#06x",(($v4&0xf)<<12|RXB($v1,$v2,$v3,$v4)<<8|$opcode&0xff));
  2579. $out.="\t# $memn\t$ops\n";
  2580. }
  2581. sub VRRf {
  2582. confess(err("ARGNUM")) if ($#_!=3);
  2583. my $ops=join(',',@_[1..$#_]);
  2584. my $memn=(caller(1))[3];
  2585. $memn=~s/^.*:://;
  2586. my ($opcode,$v1,$r2,$r3)=(shift,get_V(shift),get_R(shift),
  2587. get_R(shift));
  2588. $out.="\t.word\t";
  2589. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|$r2)).",";
  2590. $out.=sprintf("%#06x",($r3<<12)).",";
  2591. $out.=sprintf("%#06x",(RXB($v1)<<8|$opcode&0xff));
  2592. $out.="\t# $memn\t$ops\n";
  2593. }
  2594. sub VRRg {
  2595. confess(err("ARGNUM")) if ($#_!=1);
  2596. my $ops=join(',',@_[1..$#_]);
  2597. my $memn=(caller(1))[3];
  2598. $memn=~s/^.*:://;
  2599. my ($opcode,$v1)=(shift,get_V(shift));
  2600. $out.="\t.word\t";
  2601. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf))).",";
  2602. $out.=sprintf("%#06x",0x0000).",";
  2603. $out.=sprintf("%#06x",(RXB(0,$v1)<<8|$opcode&0xff));
  2604. $out.="\t# $memn\t$ops\n";
  2605. }
  2606. sub VRRh {
  2607. confess(err("ARGNUM")) if ($#_<2||$#_>3);
  2608. my $ops=join(',',@_[1..$#_]);
  2609. my $memn=(caller(1))[3];
  2610. $memn=~s/^.*:://;
  2611. my ($opcode,$v1,$v2,$m3)=(shift,get_V(shift),get_V(shift),
  2612. get_M(shift));
  2613. $out.="\t.word\t";
  2614. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf))).",";
  2615. $out.=sprintf("%#06x",(($v2&0xf)<<12|$m3<<4)).",";
  2616. $out.=sprintf("%#06x",(RXB(0,$v1,$v2)<<8|$opcode&0xff));
  2617. $out.="\t# $memn\t$ops\n";
  2618. }
  2619. sub VRRi {
  2620. confess(err("ARGNUM")) if ($#_!=3);
  2621. my $ops=join(',',@_[1..$#_]);
  2622. my $memn=(caller(1))[3];
  2623. $memn=~s/^.*:://;
  2624. my ($opcode,$r1,$v2,$m3)=(shift,get_R(shift),get_V(shift),
  2625. get_M(shift));
  2626. $out.="\t.word\t";
  2627. $out.=sprintf("%#06x",($opcode&0xff00|$r1<<4|($v2&0xf))).",";
  2628. $out.=sprintf("%#06x",($m3<<4))."\,";
  2629. $out.=sprintf("%#06x",(RXB(0,$v2)<<8|$opcode&0xff));
  2630. $out.="\t# $memn\t$ops\n";
  2631. }
  2632. sub VRSa {
  2633. confess(err("ARGNUM")) if ($#_<3||$#_>4);
  2634. my $ops=join(',',@_[1..$#_]);
  2635. my $memn=(caller(1))[3];
  2636. $memn=~s/^.*:://;
  2637. my ($opcode,$v1,$v3,$d2,$b2,$m4)=(shift,get_V(shift),get_V(shift),
  2638. get_DB(shift),get_M(shift));
  2639. $out.="\t.word\t";
  2640. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|($v3&0xf))).",";
  2641. $out.=sprintf("%#06x",($b2<<12|$d2)).",";
  2642. $out.=sprintf("%#06x",($m4<<12|RXB($v1,$v3)<<8|$opcode&0xff));
  2643. $out.="\t# $memn\t$ops\n";
  2644. }
  2645. sub VRSb {
  2646. confess(err("ARGNUM")) if ($#_<3||$#_>4);
  2647. my $ops=join(',',@_[1..$#_]);
  2648. my $memn=(caller(1))[3];
  2649. $memn=~s/^.*:://;
  2650. my ($opcode,$v1,$r3,$d2,$b2,$m4)=(shift,get_V(shift),get_R(shift),
  2651. get_DB(shift),get_M(shift));
  2652. $out.="\t.word\t";
  2653. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|$r3)).",";
  2654. $out.=sprintf("%#06x",($b2<<12|$d2)).",";
  2655. $out.=sprintf("%#06x",($m4<<12|RXB($v1)<<8|$opcode&0xff));
  2656. $out.="\t# $memn\t$ops\n";
  2657. }
  2658. sub VRSc {
  2659. confess(err("ARGNUM")) if ($#_!=4);
  2660. my $ops=join(',',@_[1..$#_]);
  2661. my $memn=(caller(1))[3];
  2662. $memn=~s/^.*:://;
  2663. my ($opcode,$r1,$v3,$d2,$b2,$m4)=(shift,get_R(shift),get_V(shift),
  2664. get_DB(shift),get_M(shift));
  2665. $out.="\t.word\t";
  2666. $out.=sprintf("%#06x",($opcode&0xff00|$r1<<4|($v3&0xf))).",";
  2667. $out.=sprintf("%#06x",($b2<<12|$d2)).",";
  2668. $out.=sprintf("%#06x",($m4<<12|RXB(0,$v3)<<8|$opcode&0xff));
  2669. $out.="\t# $memn\t$ops\n";
  2670. }
  2671. sub VRSd {
  2672. confess(err("ARGNUM")) if ($#_!=3);
  2673. my $ops=join(',',@_[1..$#_]);
  2674. my $memn=(caller(1))[3];
  2675. $memn=~s/^.*:://;
  2676. my ($opcode,$v1,$r3,$d2,$b2)=(shift,get_V(shift),get_R(shift),
  2677. get_DB(shift));
  2678. $out.="\t.word\t";
  2679. $out.=sprintf("%#06x",($opcode&0xff00|$r3)).",";
  2680. $out.=sprintf("%#06x",($b2<<12|$d2)).",";
  2681. $out.=sprintf("%#06x",(($v1&0xf)<<12|RXB(0,0,0,$v1)<<8|$opcode&0xff));
  2682. $out.="\t# $memn\t$ops\n";
  2683. }
  2684. sub VRV {
  2685. confess(err("ARGNUM")) if ($#_<2||$#_>3);
  2686. my $ops=join(',',@_[1..$#_]);
  2687. my $memn=(caller(1))[3];
  2688. $memn=~s/^.*:://;
  2689. my ($opcode,$v1,$d2,$v2,$b2,$m3)=(shift,get_V(shift),get_DVB(shift),
  2690. get_M(shift));
  2691. $out.="\t.word\t";
  2692. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|($v2&0xf))).",";
  2693. $out.=sprintf("%#06x",($b2<<12|$d2)).",";
  2694. $out.=sprintf("%#06x",($m3<<12|RXB($v1,$v2)<<8|$opcode&0xff));
  2695. $out.="\t# $memn\t$ops\n";
  2696. }
  2697. sub VRX {
  2698. confess(err("ARGNUM")) if ($#_<2||$#_>3);
  2699. my $ops=join(',',@_[1..$#_]);
  2700. my $memn=(caller(1))[3];
  2701. $memn=~s/^.*:://;
  2702. my ($opcode,$v1,$d2,$x2,$b2,$m3)=(shift,get_V(shift),get_DXB(shift),
  2703. get_M(shift));
  2704. $out.="\t.word\t";
  2705. $out.=sprintf("%#06x",($opcode&0xff00|($v1&0xf)<<4|($x2))).",";
  2706. $out.=sprintf("%#06x",($b2<<12|$d2)).",";
  2707. $out.=sprintf("%#06x",($m3<<12|RXB($v1)<<8|$opcode&0xff));
  2708. $out.="\t# $memn\t$ops\n";
  2709. }
  2710. sub VSI {
  2711. confess(err("ARGNUM")) if ($#_!=3);
  2712. my $ops=join(',',@_[1..$#_]);
  2713. my $memn=(caller(1))[3];
  2714. $memn=~s/^.*:://;
  2715. my ($opcode,$v1,$d2,$b2,$i3)=(shift,get_V(shift),get_DB(shift),
  2716. get_I(shift,8));
  2717. $out.="\t.word\t";
  2718. $out.=sprintf("%#06x",($opcode&0xff00|$i3)).",";
  2719. $out.=sprintf("%#06x",($b2<<12|$d2)).",";
  2720. $out.=sprintf("%#06x",(($v1&0xf)<<12|RXB(0,0,0,$v1)<<8|$opcode&0xff));
  2721. $out.="\t# $memn\t$ops\n";
  2722. }
  2723. #
  2724. # Internal
  2725. #
  2726. sub get_R {
  2727. confess(err("ARGNUM")) if ($#_!=0);
  2728. my $r;
  2729. for (shift) {
  2730. if (!defined) {
  2731. $r=0;
  2732. } elsif (/^$GR$/) {
  2733. $r=$1;
  2734. } else {
  2735. confess(err("PARSE"));
  2736. }
  2737. }
  2738. confess(err("ARGRANGE")) if ($r&~0xf);
  2739. return $r;
  2740. }
  2741. sub get_V {
  2742. confess(err("ARGNUM")) if ($#_!=0);
  2743. my $v;
  2744. for (shift) {
  2745. if (!defined) {
  2746. $v=0;
  2747. } elsif (/^$VR$/) {
  2748. $v=$1;
  2749. } else {
  2750. confess(err("PARSE"));
  2751. }
  2752. }
  2753. confess(err("ARGRANGE")) if ($v&~0x1f);
  2754. return $v;
  2755. }
  2756. sub get_I {
  2757. confess(err("ARGNUM")) if ($#_!=1);
  2758. my ($i,$bits)=(shift,shift);
  2759. $i=defined($i)?(eval($i)):(0);
  2760. confess(err("PARSE")) if (!defined($i));
  2761. confess(err("ARGRANGE")) if (abs($i)&~(2**$bits-1));
  2762. return $i&(2**$bits-1);
  2763. }
  2764. sub get_M {
  2765. confess(err("ARGNUM")) if ($#_!=0);
  2766. my $m=shift;
  2767. $m=defined($m)?(eval($m)):(0);
  2768. confess(err("PARSE")) if (!defined($m));
  2769. confess(err("ARGRANGE")) if ($m&~0xf);
  2770. return $m;
  2771. }
  2772. sub get_DB
  2773. {
  2774. confess(err("ARGNUM")) if ($#_!=0);
  2775. my ($d,$b);
  2776. for (shift) {
  2777. if (!defined) {
  2778. ($d,$b)=(0,0);
  2779. } elsif (/^(.+)\($GR\)$/) {
  2780. ($d,$b)=(eval($1),$2);
  2781. confess(err("PARSE")) if (!defined($d));
  2782. } elsif (/^(.+)$/) {
  2783. ($d,$b)=(eval($1),0);
  2784. confess(err("PARSE")) if (!defined($d));
  2785. } else {
  2786. confess(err("PARSE"));
  2787. }
  2788. }
  2789. confess(err("ARGRANGE")) if ($d&~0xfff||$b&~0xf);
  2790. return ($d,$b);
  2791. }
  2792. sub get_DVB
  2793. {
  2794. confess(err("ARGNUM")) if ($#_!=0);
  2795. my ($d,$v,$b);
  2796. for (shift) {
  2797. if (!defined) {
  2798. ($d,$v,$b)=(0,0,0);
  2799. } elsif (/^(.+)\($VR,$GR\)$/) {
  2800. ($d,$v,$b)=(eval($1),$2,$3);
  2801. confess(err("PARSE")) if (!defined($d));
  2802. } elsif (/^(.+)\($GR\)$/) {
  2803. ($d,$v,$b)=(eval($1),0,$2);
  2804. confess(err("PARSE")) if (!defined($d));
  2805. } elsif (/^(.+)$/) {
  2806. ($d,$v,$b)=(eval($1),0,0);
  2807. confess(err("PARSE")) if (!defined($d));
  2808. } else {
  2809. confess(err("PARSE"));
  2810. }
  2811. }
  2812. confess(err("ARGRANGE")) if ($d&~0xfff||$v&~0x1f||$b&~0xf);
  2813. return ($d,$v,$b);
  2814. }
  2815. sub get_DXB
  2816. {
  2817. confess(err("ARGNUM")) if ($#_!=0);
  2818. my ($d,$x,$b);
  2819. for (shift) {
  2820. if (!defined) {
  2821. ($d,$x,$b)=(0,0,0);
  2822. } elsif (/^(.+)\($GR,$GR\)$/) {
  2823. ($d,$x,$b)=(eval($1),$2,$3);
  2824. confess(err("PARSE")) if (!defined($d));
  2825. } elsif (/^(.+)\($GR\)$/) {
  2826. ($d,$x,$b)=(eval($1),0,$2);
  2827. confess(err("PARSE")) if (!defined($d));
  2828. } elsif (/^(.+)$/) {
  2829. ($d,$x,$b)=(eval($1),0,0);
  2830. confess(err("PARSE")) if (!defined($d));
  2831. } else {
  2832. confess(err("PARSE"));
  2833. }
  2834. }
  2835. confess(err("ARGRANGE")) if ($d&~0xfff||$x&~0xf||$b&~0xf);
  2836. return ($d,$x,$b);
  2837. }
  2838. sub RXB
  2839. {
  2840. confess(err("ARGNUM")) if ($#_<0||3<$#_);
  2841. my $rxb=0;
  2842. $rxb|=0x08 if (defined($_[0])&&($_[0]&0x10));
  2843. $rxb|=0x04 if (defined($_[1])&&($_[1]&0x10));
  2844. $rxb|=0x02 if (defined($_[2])&&($_[2]&0x10));
  2845. $rxb|=0x01 if (defined($_[3])&&($_[3]&0x10));
  2846. return $rxb;
  2847. }
  2848. sub err {
  2849. my %ERR =
  2850. (
  2851. ARGNUM => 'Wrong number of arguments',
  2852. ARGRANGE=> 'Argument out of range',
  2853. PARSE => 'Parse error',
  2854. );
  2855. confess($ERR{ARGNUM}) if ($#_!=0);
  2856. return $ERR{$_[0]};
  2857. }
  2858. 1;