vecintrin.h 328 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470
  1. /*===---- vecintrin.h - Vector intrinsics ----------------------------------===
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy
  4. * of this software and associated documentation files (the "Software"), to deal
  5. * in the Software without restriction, including without limitation the rights
  6. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. * copies of the Software, and to permit persons to whom the Software is
  8. * furnished to do so, subject to the following conditions:
  9. *
  10. * The above copyright notice and this permission notice shall be included in
  11. * all copies or substantial portions of the Software.
  12. *
  13. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. * THE SOFTWARE.
  20. *
  21. *===-----------------------------------------------------------------------===
  22. */
  23. #if defined(__s390x__) && defined(__VEC__)
  24. #define __ATTRS_ai __attribute__((__always_inline__))
  25. #define __ATTRS_o __attribute__((__overloadable__))
  26. #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
  27. #define __constant(PARM) \
  28. __attribute__((__enable_if__ ((PARM) == (PARM), \
  29. "argument must be a constant integer")))
  30. #define __constant_range(PARM, LOW, HIGH) \
  31. __attribute__((__enable_if__ ((PARM) >= (LOW) && (PARM) <= (HIGH), \
  32. "argument must be a constant integer from " #LOW " to " #HIGH)))
  33. #define __constant_pow2_range(PARM, LOW, HIGH) \
  34. __attribute__((__enable_if__ ((PARM) >= (LOW) && (PARM) <= (HIGH) && \
  35. ((PARM) & ((PARM) - 1)) == 0, \
  36. "argument must be a constant power of 2 from " #LOW " to " #HIGH)))
  37. /*-- __lcbb -----------------------------------------------------------------*/
  38. extern __ATTRS_o unsigned int
  39. __lcbb(const void *__ptr, unsigned short __len)
  40. __constant_pow2_range(__len, 64, 4096);
  41. #define __lcbb(X, Y) ((__typeof__((__lcbb)((X), (Y)))) \
  42. __builtin_s390_lcbb((X), __builtin_constant_p((Y))? \
  43. ((Y) == 64 ? 0 : \
  44. (Y) == 128 ? 1 : \
  45. (Y) == 256 ? 2 : \
  46. (Y) == 512 ? 3 : \
  47. (Y) == 1024 ? 4 : \
  48. (Y) == 2048 ? 5 : \
  49. (Y) == 4096 ? 6 : 0) : 0))
  50. /*-- vec_extract ------------------------------------------------------------*/
  51. static inline __ATTRS_o_ai signed char
  52. vec_extract(vector signed char __vec, int __index) {
  53. return __vec[__index & 15];
  54. }
  55. static inline __ATTRS_o_ai unsigned char
  56. vec_extract(vector bool char __vec, int __index) {
  57. return __vec[__index & 15];
  58. }
  59. static inline __ATTRS_o_ai unsigned char
  60. vec_extract(vector unsigned char __vec, int __index) {
  61. return __vec[__index & 15];
  62. }
  63. static inline __ATTRS_o_ai signed short
  64. vec_extract(vector signed short __vec, int __index) {
  65. return __vec[__index & 7];
  66. }
  67. static inline __ATTRS_o_ai unsigned short
  68. vec_extract(vector bool short __vec, int __index) {
  69. return __vec[__index & 7];
  70. }
  71. static inline __ATTRS_o_ai unsigned short
  72. vec_extract(vector unsigned short __vec, int __index) {
  73. return __vec[__index & 7];
  74. }
  75. static inline __ATTRS_o_ai signed int
  76. vec_extract(vector signed int __vec, int __index) {
  77. return __vec[__index & 3];
  78. }
  79. static inline __ATTRS_o_ai unsigned int
  80. vec_extract(vector bool int __vec, int __index) {
  81. return __vec[__index & 3];
  82. }
  83. static inline __ATTRS_o_ai unsigned int
  84. vec_extract(vector unsigned int __vec, int __index) {
  85. return __vec[__index & 3];
  86. }
  87. static inline __ATTRS_o_ai signed long long
  88. vec_extract(vector signed long long __vec, int __index) {
  89. return __vec[__index & 1];
  90. }
  91. static inline __ATTRS_o_ai unsigned long long
  92. vec_extract(vector bool long long __vec, int __index) {
  93. return __vec[__index & 1];
  94. }
  95. static inline __ATTRS_o_ai unsigned long long
  96. vec_extract(vector unsigned long long __vec, int __index) {
  97. return __vec[__index & 1];
  98. }
  99. #if __ARCH__ >= 12
  100. static inline __ATTRS_o_ai float
  101. vec_extract(vector float __vec, int __index) {
  102. return __vec[__index & 3];
  103. }
  104. #endif
  105. static inline __ATTRS_o_ai double
  106. vec_extract(vector double __vec, int __index) {
  107. return __vec[__index & 1];
  108. }
  109. /*-- vec_insert -------------------------------------------------------------*/
  110. static inline __ATTRS_o_ai vector signed char
  111. vec_insert(signed char __scalar, vector signed char __vec, int __index) {
  112. __vec[__index & 15] = __scalar;
  113. return __vec;
  114. }
  115. // This prototype is deprecated.
  116. static inline __ATTRS_o_ai vector unsigned char
  117. vec_insert(unsigned char __scalar, vector bool char __vec, int __index) {
  118. vector unsigned char __newvec = (vector unsigned char)__vec;
  119. __newvec[__index & 15] = (unsigned char)__scalar;
  120. return __newvec;
  121. }
  122. static inline __ATTRS_o_ai vector unsigned char
  123. vec_insert(unsigned char __scalar, vector unsigned char __vec, int __index) {
  124. __vec[__index & 15] = __scalar;
  125. return __vec;
  126. }
  127. static inline __ATTRS_o_ai vector signed short
  128. vec_insert(signed short __scalar, vector signed short __vec, int __index) {
  129. __vec[__index & 7] = __scalar;
  130. return __vec;
  131. }
  132. // This prototype is deprecated.
  133. static inline __ATTRS_o_ai vector unsigned short
  134. vec_insert(unsigned short __scalar, vector bool short __vec, int __index) {
  135. vector unsigned short __newvec = (vector unsigned short)__vec;
  136. __newvec[__index & 7] = (unsigned short)__scalar;
  137. return __newvec;
  138. }
  139. static inline __ATTRS_o_ai vector unsigned short
  140. vec_insert(unsigned short __scalar, vector unsigned short __vec, int __index) {
  141. __vec[__index & 7] = __scalar;
  142. return __vec;
  143. }
  144. static inline __ATTRS_o_ai vector signed int
  145. vec_insert(signed int __scalar, vector signed int __vec, int __index) {
  146. __vec[__index & 3] = __scalar;
  147. return __vec;
  148. }
  149. // This prototype is deprecated.
  150. static inline __ATTRS_o_ai vector unsigned int
  151. vec_insert(unsigned int __scalar, vector bool int __vec, int __index) {
  152. vector unsigned int __newvec = (vector unsigned int)__vec;
  153. __newvec[__index & 3] = __scalar;
  154. return __newvec;
  155. }
  156. static inline __ATTRS_o_ai vector unsigned int
  157. vec_insert(unsigned int __scalar, vector unsigned int __vec, int __index) {
  158. __vec[__index & 3] = __scalar;
  159. return __vec;
  160. }
  161. static inline __ATTRS_o_ai vector signed long long
  162. vec_insert(signed long long __scalar, vector signed long long __vec,
  163. int __index) {
  164. __vec[__index & 1] = __scalar;
  165. return __vec;
  166. }
  167. // This prototype is deprecated.
  168. static inline __ATTRS_o_ai vector unsigned long long
  169. vec_insert(unsigned long long __scalar, vector bool long long __vec,
  170. int __index) {
  171. vector unsigned long long __newvec = (vector unsigned long long)__vec;
  172. __newvec[__index & 1] = __scalar;
  173. return __newvec;
  174. }
  175. static inline __ATTRS_o_ai vector unsigned long long
  176. vec_insert(unsigned long long __scalar, vector unsigned long long __vec,
  177. int __index) {
  178. __vec[__index & 1] = __scalar;
  179. return __vec;
  180. }
  181. #if __ARCH__ >= 12
  182. static inline __ATTRS_o_ai vector float
  183. vec_insert(float __scalar, vector float __vec, int __index) {
  184. __vec[__index & 1] = __scalar;
  185. return __vec;
  186. }
  187. #endif
  188. static inline __ATTRS_o_ai vector double
  189. vec_insert(double __scalar, vector double __vec, int __index) {
  190. __vec[__index & 1] = __scalar;
  191. return __vec;
  192. }
  193. /*-- vec_promote ------------------------------------------------------------*/
  194. static inline __ATTRS_o_ai vector signed char
  195. vec_promote(signed char __scalar, int __index) {
  196. const vector signed char __zero = (vector signed char)0;
  197. vector signed char __vec = __builtin_shufflevector(__zero, __zero,
  198. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
  199. __vec[__index & 15] = __scalar;
  200. return __vec;
  201. }
  202. static inline __ATTRS_o_ai vector unsigned char
  203. vec_promote(unsigned char __scalar, int __index) {
  204. const vector unsigned char __zero = (vector unsigned char)0;
  205. vector unsigned char __vec = __builtin_shufflevector(__zero, __zero,
  206. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
  207. __vec[__index & 15] = __scalar;
  208. return __vec;
  209. }
  210. static inline __ATTRS_o_ai vector signed short
  211. vec_promote(signed short __scalar, int __index) {
  212. const vector signed short __zero = (vector signed short)0;
  213. vector signed short __vec = __builtin_shufflevector(__zero, __zero,
  214. -1, -1, -1, -1, -1, -1, -1, -1);
  215. __vec[__index & 7] = __scalar;
  216. return __vec;
  217. }
  218. static inline __ATTRS_o_ai vector unsigned short
  219. vec_promote(unsigned short __scalar, int __index) {
  220. const vector unsigned short __zero = (vector unsigned short)0;
  221. vector unsigned short __vec = __builtin_shufflevector(__zero, __zero,
  222. -1, -1, -1, -1, -1, -1, -1, -1);
  223. __vec[__index & 7] = __scalar;
  224. return __vec;
  225. }
  226. static inline __ATTRS_o_ai vector signed int
  227. vec_promote(signed int __scalar, int __index) {
  228. const vector signed int __zero = (vector signed int)0;
  229. vector signed int __vec = __builtin_shufflevector(__zero, __zero,
  230. -1, -1, -1, -1);
  231. __vec[__index & 3] = __scalar;
  232. return __vec;
  233. }
  234. static inline __ATTRS_o_ai vector unsigned int
  235. vec_promote(unsigned int __scalar, int __index) {
  236. const vector unsigned int __zero = (vector unsigned int)0;
  237. vector unsigned int __vec = __builtin_shufflevector(__zero, __zero,
  238. -1, -1, -1, -1);
  239. __vec[__index & 3] = __scalar;
  240. return __vec;
  241. }
  242. static inline __ATTRS_o_ai vector signed long long
  243. vec_promote(signed long long __scalar, int __index) {
  244. const vector signed long long __zero = (vector signed long long)0;
  245. vector signed long long __vec = __builtin_shufflevector(__zero, __zero,
  246. -1, -1);
  247. __vec[__index & 1] = __scalar;
  248. return __vec;
  249. }
  250. static inline __ATTRS_o_ai vector unsigned long long
  251. vec_promote(unsigned long long __scalar, int __index) {
  252. const vector unsigned long long __zero = (vector unsigned long long)0;
  253. vector unsigned long long __vec = __builtin_shufflevector(__zero, __zero,
  254. -1, -1);
  255. __vec[__index & 1] = __scalar;
  256. return __vec;
  257. }
  258. #if __ARCH__ >= 12
  259. static inline __ATTRS_o_ai vector float
  260. vec_promote(float __scalar, int __index) {
  261. const vector float __zero = (vector float)0;
  262. vector float __vec = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
  263. __vec[__index & 3] = __scalar;
  264. return __vec;
  265. }
  266. #endif
  267. static inline __ATTRS_o_ai vector double
  268. vec_promote(double __scalar, int __index) {
  269. const vector double __zero = (vector double)0;
  270. vector double __vec = __builtin_shufflevector(__zero, __zero, -1, -1);
  271. __vec[__index & 1] = __scalar;
  272. return __vec;
  273. }
  274. /*-- vec_insert_and_zero ----------------------------------------------------*/
  275. static inline __ATTRS_o_ai vector signed char
  276. vec_insert_and_zero(const signed char *__ptr) {
  277. vector signed char __vec = (vector signed char)0;
  278. __vec[7] = *__ptr;
  279. return __vec;
  280. }
  281. static inline __ATTRS_o_ai vector unsigned char
  282. vec_insert_and_zero(const unsigned char *__ptr) {
  283. vector unsigned char __vec = (vector unsigned char)0;
  284. __vec[7] = *__ptr;
  285. return __vec;
  286. }
  287. static inline __ATTRS_o_ai vector signed short
  288. vec_insert_and_zero(const signed short *__ptr) {
  289. vector signed short __vec = (vector signed short)0;
  290. __vec[3] = *__ptr;
  291. return __vec;
  292. }
  293. static inline __ATTRS_o_ai vector unsigned short
  294. vec_insert_and_zero(const unsigned short *__ptr) {
  295. vector unsigned short __vec = (vector unsigned short)0;
  296. __vec[3] = *__ptr;
  297. return __vec;
  298. }
  299. static inline __ATTRS_o_ai vector signed int
  300. vec_insert_and_zero(const signed int *__ptr) {
  301. vector signed int __vec = (vector signed int)0;
  302. __vec[1] = *__ptr;
  303. return __vec;
  304. }
  305. static inline __ATTRS_o_ai vector unsigned int
  306. vec_insert_and_zero(const unsigned int *__ptr) {
  307. vector unsigned int __vec = (vector unsigned int)0;
  308. __vec[1] = *__ptr;
  309. return __vec;
  310. }
  311. static inline __ATTRS_o_ai vector signed long long
  312. vec_insert_and_zero(const signed long long *__ptr) {
  313. vector signed long long __vec = (vector signed long long)0;
  314. __vec[0] = *__ptr;
  315. return __vec;
  316. }
  317. static inline __ATTRS_o_ai vector unsigned long long
  318. vec_insert_and_zero(const unsigned long long *__ptr) {
  319. vector unsigned long long __vec = (vector unsigned long long)0;
  320. __vec[0] = *__ptr;
  321. return __vec;
  322. }
  323. #if __ARCH__ >= 12
  324. static inline __ATTRS_o_ai vector float
  325. vec_insert_and_zero(const float *__ptr) {
  326. vector float __vec = (vector float)0;
  327. __vec[0] = *__ptr;
  328. return __vec;
  329. }
  330. #endif
  331. static inline __ATTRS_o_ai vector double
  332. vec_insert_and_zero(const double *__ptr) {
  333. vector double __vec = (vector double)0;
  334. __vec[0] = *__ptr;
  335. return __vec;
  336. }
  337. /*-- vec_perm ---------------------------------------------------------------*/
  338. static inline __ATTRS_o_ai vector signed char
  339. vec_perm(vector signed char __a, vector signed char __b,
  340. vector unsigned char __c) {
  341. return (vector signed char)__builtin_s390_vperm(
  342. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  343. }
  344. static inline __ATTRS_o_ai vector unsigned char
  345. vec_perm(vector unsigned char __a, vector unsigned char __b,
  346. vector unsigned char __c) {
  347. return (vector unsigned char)__builtin_s390_vperm(
  348. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  349. }
  350. static inline __ATTRS_o_ai vector bool char
  351. vec_perm(vector bool char __a, vector bool char __b,
  352. vector unsigned char __c) {
  353. return (vector bool char)__builtin_s390_vperm(
  354. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  355. }
  356. static inline __ATTRS_o_ai vector signed short
  357. vec_perm(vector signed short __a, vector signed short __b,
  358. vector unsigned char __c) {
  359. return (vector signed short)__builtin_s390_vperm(
  360. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  361. }
  362. static inline __ATTRS_o_ai vector unsigned short
  363. vec_perm(vector unsigned short __a, vector unsigned short __b,
  364. vector unsigned char __c) {
  365. return (vector unsigned short)__builtin_s390_vperm(
  366. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  367. }
  368. static inline __ATTRS_o_ai vector bool short
  369. vec_perm(vector bool short __a, vector bool short __b,
  370. vector unsigned char __c) {
  371. return (vector bool short)__builtin_s390_vperm(
  372. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  373. }
  374. static inline __ATTRS_o_ai vector signed int
  375. vec_perm(vector signed int __a, vector signed int __b,
  376. vector unsigned char __c) {
  377. return (vector signed int)__builtin_s390_vperm(
  378. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  379. }
  380. static inline __ATTRS_o_ai vector unsigned int
  381. vec_perm(vector unsigned int __a, vector unsigned int __b,
  382. vector unsigned char __c) {
  383. return (vector unsigned int)__builtin_s390_vperm(
  384. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  385. }
  386. static inline __ATTRS_o_ai vector bool int
  387. vec_perm(vector bool int __a, vector bool int __b,
  388. vector unsigned char __c) {
  389. return (vector bool int)__builtin_s390_vperm(
  390. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  391. }
  392. static inline __ATTRS_o_ai vector signed long long
  393. vec_perm(vector signed long long __a, vector signed long long __b,
  394. vector unsigned char __c) {
  395. return (vector signed long long)__builtin_s390_vperm(
  396. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  397. }
  398. static inline __ATTRS_o_ai vector unsigned long long
  399. vec_perm(vector unsigned long long __a, vector unsigned long long __b,
  400. vector unsigned char __c) {
  401. return (vector unsigned long long)__builtin_s390_vperm(
  402. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  403. }
  404. static inline __ATTRS_o_ai vector bool long long
  405. vec_perm(vector bool long long __a, vector bool long long __b,
  406. vector unsigned char __c) {
  407. return (vector bool long long)__builtin_s390_vperm(
  408. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  409. }
  410. #if __ARCH__ >= 12
  411. static inline __ATTRS_o_ai vector float
  412. vec_perm(vector float __a, vector float __b,
  413. vector unsigned char __c) {
  414. return (vector float)__builtin_s390_vperm(
  415. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  416. }
  417. #endif
  418. static inline __ATTRS_o_ai vector double
  419. vec_perm(vector double __a, vector double __b,
  420. vector unsigned char __c) {
  421. return (vector double)__builtin_s390_vperm(
  422. (vector unsigned char)__a, (vector unsigned char)__b, __c);
  423. }
  424. /*-- vec_permi --------------------------------------------------------------*/
  425. // This prototype is deprecated.
  426. extern __ATTRS_o vector signed long long
  427. vec_permi(vector signed long long __a, vector signed long long __b, int __c)
  428. __constant_range(__c, 0, 3);
  429. // This prototype is deprecated.
  430. extern __ATTRS_o vector unsigned long long
  431. vec_permi(vector unsigned long long __a, vector unsigned long long __b, int __c)
  432. __constant_range(__c, 0, 3);
  433. // This prototype is deprecated.
  434. extern __ATTRS_o vector bool long long
  435. vec_permi(vector bool long long __a, vector bool long long __b, int __c)
  436. __constant_range(__c, 0, 3);
  437. // This prototype is deprecated.
  438. extern __ATTRS_o vector double
  439. vec_permi(vector double __a, vector double __b, int __c)
  440. __constant_range(__c, 0, 3);
  441. #define vec_permi(X, Y, Z) ((__typeof__((vec_permi)((X), (Y), (Z)))) \
  442. __builtin_s390_vpdi((vector unsigned long long)(X), \
  443. (vector unsigned long long)(Y), \
  444. (((Z) & 2) << 1) | ((Z) & 1)))
  445. /*-- vec_bperm_u128 ---------------------------------------------------------*/
  446. #if __ARCH__ >= 12
  447. static inline __ATTRS_ai vector unsigned long long
  448. vec_bperm_u128(vector unsigned char __a, vector unsigned char __b) {
  449. return __builtin_s390_vbperm(__a, __b);
  450. }
  451. #endif
  452. /*-- vec_sel ----------------------------------------------------------------*/
  453. static inline __ATTRS_o_ai vector signed char
  454. vec_sel(vector signed char __a, vector signed char __b,
  455. vector unsigned char __c) {
  456. return ((vector signed char)__c & __b) | (~(vector signed char)__c & __a);
  457. }
  458. static inline __ATTRS_o_ai vector signed char
  459. vec_sel(vector signed char __a, vector signed char __b, vector bool char __c) {
  460. return ((vector signed char)__c & __b) | (~(vector signed char)__c & __a);
  461. }
  462. static inline __ATTRS_o_ai vector bool char
  463. vec_sel(vector bool char __a, vector bool char __b, vector unsigned char __c) {
  464. return ((vector bool char)__c & __b) | (~(vector bool char)__c & __a);
  465. }
  466. static inline __ATTRS_o_ai vector bool char
  467. vec_sel(vector bool char __a, vector bool char __b, vector bool char __c) {
  468. return (__c & __b) | (~__c & __a);
  469. }
  470. static inline __ATTRS_o_ai vector unsigned char
  471. vec_sel(vector unsigned char __a, vector unsigned char __b,
  472. vector unsigned char __c) {
  473. return (__c & __b) | (~__c & __a);
  474. }
  475. static inline __ATTRS_o_ai vector unsigned char
  476. vec_sel(vector unsigned char __a, vector unsigned char __b,
  477. vector bool char __c) {
  478. return ((vector unsigned char)__c & __b) | (~(vector unsigned char)__c & __a);
  479. }
  480. static inline __ATTRS_o_ai vector signed short
  481. vec_sel(vector signed short __a, vector signed short __b,
  482. vector unsigned short __c) {
  483. return ((vector signed short)__c & __b) | (~(vector signed short)__c & __a);
  484. }
  485. static inline __ATTRS_o_ai vector signed short
  486. vec_sel(vector signed short __a, vector signed short __b,
  487. vector bool short __c) {
  488. return ((vector signed short)__c & __b) | (~(vector signed short)__c & __a);
  489. }
  490. static inline __ATTRS_o_ai vector bool short
  491. vec_sel(vector bool short __a, vector bool short __b,
  492. vector unsigned short __c) {
  493. return ((vector bool short)__c & __b) | (~(vector bool short)__c & __a);
  494. }
  495. static inline __ATTRS_o_ai vector bool short
  496. vec_sel(vector bool short __a, vector bool short __b, vector bool short __c) {
  497. return (__c & __b) | (~__c & __a);
  498. }
  499. static inline __ATTRS_o_ai vector unsigned short
  500. vec_sel(vector unsigned short __a, vector unsigned short __b,
  501. vector unsigned short __c) {
  502. return (__c & __b) | (~__c & __a);
  503. }
  504. static inline __ATTRS_o_ai vector unsigned short
  505. vec_sel(vector unsigned short __a, vector unsigned short __b,
  506. vector bool short __c) {
  507. return (((vector unsigned short)__c & __b) |
  508. (~(vector unsigned short)__c & __a));
  509. }
  510. static inline __ATTRS_o_ai vector signed int
  511. vec_sel(vector signed int __a, vector signed int __b,
  512. vector unsigned int __c) {
  513. return ((vector signed int)__c & __b) | (~(vector signed int)__c & __a);
  514. }
  515. static inline __ATTRS_o_ai vector signed int
  516. vec_sel(vector signed int __a, vector signed int __b, vector bool int __c) {
  517. return ((vector signed int)__c & __b) | (~(vector signed int)__c & __a);
  518. }
  519. static inline __ATTRS_o_ai vector bool int
  520. vec_sel(vector bool int __a, vector bool int __b, vector unsigned int __c) {
  521. return ((vector bool int)__c & __b) | (~(vector bool int)__c & __a);
  522. }
  523. static inline __ATTRS_o_ai vector bool int
  524. vec_sel(vector bool int __a, vector bool int __b, vector bool int __c) {
  525. return (__c & __b) | (~__c & __a);
  526. }
  527. static inline __ATTRS_o_ai vector unsigned int
  528. vec_sel(vector unsigned int __a, vector unsigned int __b,
  529. vector unsigned int __c) {
  530. return (__c & __b) | (~__c & __a);
  531. }
  532. static inline __ATTRS_o_ai vector unsigned int
  533. vec_sel(vector unsigned int __a, vector unsigned int __b, vector bool int __c) {
  534. return ((vector unsigned int)__c & __b) | (~(vector unsigned int)__c & __a);
  535. }
  536. static inline __ATTRS_o_ai vector signed long long
  537. vec_sel(vector signed long long __a, vector signed long long __b,
  538. vector unsigned long long __c) {
  539. return (((vector signed long long)__c & __b) |
  540. (~(vector signed long long)__c & __a));
  541. }
  542. static inline __ATTRS_o_ai vector signed long long
  543. vec_sel(vector signed long long __a, vector signed long long __b,
  544. vector bool long long __c) {
  545. return (((vector signed long long)__c & __b) |
  546. (~(vector signed long long)__c & __a));
  547. }
  548. static inline __ATTRS_o_ai vector bool long long
  549. vec_sel(vector bool long long __a, vector bool long long __b,
  550. vector unsigned long long __c) {
  551. return (((vector bool long long)__c & __b) |
  552. (~(vector bool long long)__c & __a));
  553. }
  554. static inline __ATTRS_o_ai vector bool long long
  555. vec_sel(vector bool long long __a, vector bool long long __b,
  556. vector bool long long __c) {
  557. return (__c & __b) | (~__c & __a);
  558. }
  559. static inline __ATTRS_o_ai vector unsigned long long
  560. vec_sel(vector unsigned long long __a, vector unsigned long long __b,
  561. vector unsigned long long __c) {
  562. return (__c & __b) | (~__c & __a);
  563. }
  564. static inline __ATTRS_o_ai vector unsigned long long
  565. vec_sel(vector unsigned long long __a, vector unsigned long long __b,
  566. vector bool long long __c) {
  567. return (((vector unsigned long long)__c & __b) |
  568. (~(vector unsigned long long)__c & __a));
  569. }
  570. #if __ARCH__ >= 12
  571. static inline __ATTRS_o_ai vector float
  572. vec_sel(vector float __a, vector float __b, vector unsigned int __c) {
  573. return (vector float)((__c & (vector unsigned int)__b) |
  574. (~__c & (vector unsigned int)__a));
  575. }
  576. static inline __ATTRS_o_ai vector float
  577. vec_sel(vector float __a, vector float __b, vector bool int __c) {
  578. vector unsigned int __ac = (vector unsigned int)__a;
  579. vector unsigned int __bc = (vector unsigned int)__b;
  580. vector unsigned int __cc = (vector unsigned int)__c;
  581. return (vector float)((__cc & __bc) | (~__cc & __ac));
  582. }
  583. #endif
  584. static inline __ATTRS_o_ai vector double
  585. vec_sel(vector double __a, vector double __b, vector unsigned long long __c) {
  586. return (vector double)((__c & (vector unsigned long long)__b) |
  587. (~__c & (vector unsigned long long)__a));
  588. }
  589. static inline __ATTRS_o_ai vector double
  590. vec_sel(vector double __a, vector double __b, vector bool long long __c) {
  591. vector unsigned long long __ac = (vector unsigned long long)__a;
  592. vector unsigned long long __bc = (vector unsigned long long)__b;
  593. vector unsigned long long __cc = (vector unsigned long long)__c;
  594. return (vector double)((__cc & __bc) | (~__cc & __ac));
  595. }
  596. /*-- vec_gather_element -----------------------------------------------------*/
  597. static inline __ATTRS_o_ai vector signed int
  598. vec_gather_element(vector signed int __vec, vector unsigned int __offset,
  599. const signed int *__ptr, int __index)
  600. __constant_range(__index, 0, 3) {
  601. __vec[__index] = *(const signed int *)(
  602. (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
  603. return __vec;
  604. }
  605. static inline __ATTRS_o_ai vector bool int
  606. vec_gather_element(vector bool int __vec, vector unsigned int __offset,
  607. const unsigned int *__ptr, int __index)
  608. __constant_range(__index, 0, 3) {
  609. __vec[__index] = *(const unsigned int *)(
  610. (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
  611. return __vec;
  612. }
  613. static inline __ATTRS_o_ai vector unsigned int
  614. vec_gather_element(vector unsigned int __vec, vector unsigned int __offset,
  615. const unsigned int *__ptr, int __index)
  616. __constant_range(__index, 0, 3) {
  617. __vec[__index] = *(const unsigned int *)(
  618. (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
  619. return __vec;
  620. }
  621. static inline __ATTRS_o_ai vector signed long long
  622. vec_gather_element(vector signed long long __vec,
  623. vector unsigned long long __offset,
  624. const signed long long *__ptr, int __index)
  625. __constant_range(__index, 0, 1) {
  626. __vec[__index] = *(const signed long long *)(
  627. (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
  628. return __vec;
  629. }
  630. static inline __ATTRS_o_ai vector bool long long
  631. vec_gather_element(vector bool long long __vec,
  632. vector unsigned long long __offset,
  633. const unsigned long long *__ptr, int __index)
  634. __constant_range(__index, 0, 1) {
  635. __vec[__index] = *(const unsigned long long *)(
  636. (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
  637. return __vec;
  638. }
  639. static inline __ATTRS_o_ai vector unsigned long long
  640. vec_gather_element(vector unsigned long long __vec,
  641. vector unsigned long long __offset,
  642. const unsigned long long *__ptr, int __index)
  643. __constant_range(__index, 0, 1) {
  644. __vec[__index] = *(const unsigned long long *)(
  645. (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
  646. return __vec;
  647. }
  648. #if __ARCH__ >= 12
  649. static inline __ATTRS_o_ai vector float
  650. vec_gather_element(vector float __vec, vector unsigned int __offset,
  651. const float *__ptr, int __index)
  652. __constant_range(__index, 0, 3) {
  653. __vec[__index] = *(const float *)(
  654. (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
  655. return __vec;
  656. }
  657. #endif
  658. static inline __ATTRS_o_ai vector double
  659. vec_gather_element(vector double __vec, vector unsigned long long __offset,
  660. const double *__ptr, int __index)
  661. __constant_range(__index, 0, 1) {
  662. __vec[__index] = *(const double *)(
  663. (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
  664. return __vec;
  665. }
  666. /*-- vec_scatter_element ----------------------------------------------------*/
  667. static inline __ATTRS_o_ai void
  668. vec_scatter_element(vector signed int __vec, vector unsigned int __offset,
  669. signed int *__ptr, int __index)
  670. __constant_range(__index, 0, 3) {
  671. *(signed int *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
  672. __vec[__index];
  673. }
  674. static inline __ATTRS_o_ai void
  675. vec_scatter_element(vector bool int __vec, vector unsigned int __offset,
  676. unsigned int *__ptr, int __index)
  677. __constant_range(__index, 0, 3) {
  678. *(unsigned int *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
  679. __vec[__index];
  680. }
  681. static inline __ATTRS_o_ai void
  682. vec_scatter_element(vector unsigned int __vec, vector unsigned int __offset,
  683. unsigned int *__ptr, int __index)
  684. __constant_range(__index, 0, 3) {
  685. *(unsigned int *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
  686. __vec[__index];
  687. }
  688. static inline __ATTRS_o_ai void
  689. vec_scatter_element(vector signed long long __vec,
  690. vector unsigned long long __offset,
  691. signed long long *__ptr, int __index)
  692. __constant_range(__index, 0, 1) {
  693. *(signed long long *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
  694. __vec[__index];
  695. }
  696. static inline __ATTRS_o_ai void
  697. vec_scatter_element(vector bool long long __vec,
  698. vector unsigned long long __offset,
  699. unsigned long long *__ptr, int __index)
  700. __constant_range(__index, 0, 1) {
  701. *(unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
  702. __vec[__index];
  703. }
  704. static inline __ATTRS_o_ai void
  705. vec_scatter_element(vector unsigned long long __vec,
  706. vector unsigned long long __offset,
  707. unsigned long long *__ptr, int __index)
  708. __constant_range(__index, 0, 1) {
  709. *(unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
  710. __vec[__index];
  711. }
  712. #if __ARCH__ >= 12
  713. static inline __ATTRS_o_ai void
  714. vec_scatter_element(vector float __vec, vector unsigned int __offset,
  715. float *__ptr, int __index)
  716. __constant_range(__index, 0, 3) {
  717. *(float *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
  718. __vec[__index];
  719. }
  720. #endif
  721. static inline __ATTRS_o_ai void
  722. vec_scatter_element(vector double __vec, vector unsigned long long __offset,
  723. double *__ptr, int __index)
  724. __constant_range(__index, 0, 1) {
  725. *(double *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
  726. __vec[__index];
  727. }
  728. /*-- vec_xl -----------------------------------------------------------------*/
  729. static inline __ATTRS_o_ai vector signed char
  730. vec_xl(long __offset, const signed char *__ptr) {
  731. return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);
  732. }
  733. static inline __ATTRS_o_ai vector unsigned char
  734. vec_xl(long __offset, const unsigned char *__ptr) {
  735. return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);
  736. }
  737. static inline __ATTRS_o_ai vector signed short
  738. vec_xl(long __offset, const signed short *__ptr) {
  739. return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);
  740. }
  741. static inline __ATTRS_o_ai vector unsigned short
  742. vec_xl(long __offset, const unsigned short *__ptr) {
  743. return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);
  744. }
  745. static inline __ATTRS_o_ai vector signed int
  746. vec_xl(long __offset, const signed int *__ptr) {
  747. return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);
  748. }
  749. static inline __ATTRS_o_ai vector unsigned int
  750. vec_xl(long __offset, const unsigned int *__ptr) {
  751. return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);
  752. }
  753. static inline __ATTRS_o_ai vector signed long long
  754. vec_xl(long __offset, const signed long long *__ptr) {
  755. return *(const vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset);
  756. }
  757. static inline __ATTRS_o_ai vector unsigned long long
  758. vec_xl(long __offset, const unsigned long long *__ptr) {
  759. return *(const vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset);
  760. }
  761. #if __ARCH__ >= 12
  762. static inline __ATTRS_o_ai vector float
  763. vec_xl(long __offset, const float *__ptr) {
  764. return *(const vector float *)((__INTPTR_TYPE__)__ptr + __offset);
  765. }
  766. #endif
  767. static inline __ATTRS_o_ai vector double
  768. vec_xl(long __offset, const double *__ptr) {
  769. return *(const vector double *)((__INTPTR_TYPE__)__ptr + __offset);
  770. }
  771. /*-- vec_xld2 ---------------------------------------------------------------*/
  772. // This prototype is deprecated.
  773. static inline __ATTRS_o_ai vector signed char
  774. vec_xld2(long __offset, const signed char *__ptr) {
  775. return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);
  776. }
  777. // This prototype is deprecated.
  778. static inline __ATTRS_o_ai vector unsigned char
  779. vec_xld2(long __offset, const unsigned char *__ptr) {
  780. return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);
  781. }
  782. // This prototype is deprecated.
  783. static inline __ATTRS_o_ai vector signed short
  784. vec_xld2(long __offset, const signed short *__ptr) {
  785. return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);
  786. }
  787. // This prototype is deprecated.
  788. static inline __ATTRS_o_ai vector unsigned short
  789. vec_xld2(long __offset, const unsigned short *__ptr) {
  790. return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);
  791. }
  792. // This prototype is deprecated.
  793. static inline __ATTRS_o_ai vector signed int
  794. vec_xld2(long __offset, const signed int *__ptr) {
  795. return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);
  796. }
  797. // This prototype is deprecated.
  798. static inline __ATTRS_o_ai vector unsigned int
  799. vec_xld2(long __offset, const unsigned int *__ptr) {
  800. return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);
  801. }
  802. // This prototype is deprecated.
  803. static inline __ATTRS_o_ai vector signed long long
  804. vec_xld2(long __offset, const signed long long *__ptr) {
  805. return *(const vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset);
  806. }
  807. // This prototype is deprecated.
  808. static inline __ATTRS_o_ai vector unsigned long long
  809. vec_xld2(long __offset, const unsigned long long *__ptr) {
  810. return *(const vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset);
  811. }
  812. // This prototype is deprecated.
  813. static inline __ATTRS_o_ai vector double
  814. vec_xld2(long __offset, const double *__ptr) {
  815. return *(const vector double *)((__INTPTR_TYPE__)__ptr + __offset);
  816. }
  817. /*-- vec_xlw4 ---------------------------------------------------------------*/
  818. // This prototype is deprecated.
  819. static inline __ATTRS_o_ai vector signed char
  820. vec_xlw4(long __offset, const signed char *__ptr) {
  821. return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);
  822. }
  823. // This prototype is deprecated.
  824. static inline __ATTRS_o_ai vector unsigned char
  825. vec_xlw4(long __offset, const unsigned char *__ptr) {
  826. return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);
  827. }
  828. // This prototype is deprecated.
  829. static inline __ATTRS_o_ai vector signed short
  830. vec_xlw4(long __offset, const signed short *__ptr) {
  831. return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);
  832. }
  833. // This prototype is deprecated.
  834. static inline __ATTRS_o_ai vector unsigned short
  835. vec_xlw4(long __offset, const unsigned short *__ptr) {
  836. return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);
  837. }
  838. // This prototype is deprecated.
  839. static inline __ATTRS_o_ai vector signed int
  840. vec_xlw4(long __offset, const signed int *__ptr) {
  841. return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);
  842. }
  843. // This prototype is deprecated.
  844. static inline __ATTRS_o_ai vector unsigned int
  845. vec_xlw4(long __offset, const unsigned int *__ptr) {
  846. return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);
  847. }
  848. /*-- vec_xst ----------------------------------------------------------------*/
  849. static inline __ATTRS_o_ai void
  850. vec_xst(vector signed char __vec, long __offset, signed char *__ptr) {
  851. *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  852. }
  853. static inline __ATTRS_o_ai void
  854. vec_xst(vector unsigned char __vec, long __offset, unsigned char *__ptr) {
  855. *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  856. }
  857. static inline __ATTRS_o_ai void
  858. vec_xst(vector signed short __vec, long __offset, signed short *__ptr) {
  859. *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  860. }
  861. static inline __ATTRS_o_ai void
  862. vec_xst(vector unsigned short __vec, long __offset, unsigned short *__ptr) {
  863. *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  864. }
  865. static inline __ATTRS_o_ai void
  866. vec_xst(vector signed int __vec, long __offset, signed int *__ptr) {
  867. *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  868. }
  869. static inline __ATTRS_o_ai void
  870. vec_xst(vector unsigned int __vec, long __offset, unsigned int *__ptr) {
  871. *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  872. }
  873. static inline __ATTRS_o_ai void
  874. vec_xst(vector signed long long __vec, long __offset,
  875. signed long long *__ptr) {
  876. *(vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  877. }
  878. static inline __ATTRS_o_ai void
  879. vec_xst(vector unsigned long long __vec, long __offset,
  880. unsigned long long *__ptr) {
  881. *(vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset) =
  882. __vec;
  883. }
  884. #if __ARCH__ >= 12
  885. static inline __ATTRS_o_ai void
  886. vec_xst(vector float __vec, long __offset, float *__ptr) {
  887. *(vector float *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  888. }
  889. #endif
  890. static inline __ATTRS_o_ai void
  891. vec_xst(vector double __vec, long __offset, double *__ptr) {
  892. *(vector double *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  893. }
  894. /*-- vec_xstd2 --------------------------------------------------------------*/
  895. // This prototype is deprecated.
  896. static inline __ATTRS_o_ai void
  897. vec_xstd2(vector signed char __vec, long __offset, signed char *__ptr) {
  898. *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  899. }
  900. // This prototype is deprecated.
  901. static inline __ATTRS_o_ai void
  902. vec_xstd2(vector unsigned char __vec, long __offset, unsigned char *__ptr) {
  903. *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  904. }
  905. // This prototype is deprecated.
  906. static inline __ATTRS_o_ai void
  907. vec_xstd2(vector signed short __vec, long __offset, signed short *__ptr) {
  908. *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  909. }
  910. // This prototype is deprecated.
  911. static inline __ATTRS_o_ai void
  912. vec_xstd2(vector unsigned short __vec, long __offset, unsigned short *__ptr) {
  913. *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  914. }
  915. // This prototype is deprecated.
  916. static inline __ATTRS_o_ai void
  917. vec_xstd2(vector signed int __vec, long __offset, signed int *__ptr) {
  918. *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  919. }
  920. // This prototype is deprecated.
  921. static inline __ATTRS_o_ai void
  922. vec_xstd2(vector unsigned int __vec, long __offset, unsigned int *__ptr) {
  923. *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  924. }
  925. // This prototype is deprecated.
  926. static inline __ATTRS_o_ai void
  927. vec_xstd2(vector signed long long __vec, long __offset,
  928. signed long long *__ptr) {
  929. *(vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  930. }
  931. // This prototype is deprecated.
  932. static inline __ATTRS_o_ai void
  933. vec_xstd2(vector unsigned long long __vec, long __offset,
  934. unsigned long long *__ptr) {
  935. *(vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset) =
  936. __vec;
  937. }
  938. // This prototype is deprecated.
  939. static inline __ATTRS_o_ai void
  940. vec_xstd2(vector double __vec, long __offset, double *__ptr) {
  941. *(vector double *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  942. }
  943. /*-- vec_xstw4 --------------------------------------------------------------*/
  944. // This prototype is deprecated.
  945. static inline __ATTRS_o_ai void
  946. vec_xstw4(vector signed char __vec, long __offset, signed char *__ptr) {
  947. *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  948. }
  949. // This prototype is deprecated.
  950. static inline __ATTRS_o_ai void
  951. vec_xstw4(vector unsigned char __vec, long __offset, unsigned char *__ptr) {
  952. *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  953. }
  954. // This prototype is deprecated.
  955. static inline __ATTRS_o_ai void
  956. vec_xstw4(vector signed short __vec, long __offset, signed short *__ptr) {
  957. *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  958. }
  959. // This prototype is deprecated.
  960. static inline __ATTRS_o_ai void
  961. vec_xstw4(vector unsigned short __vec, long __offset, unsigned short *__ptr) {
  962. *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  963. }
  964. // This prototype is deprecated.
  965. static inline __ATTRS_o_ai void
  966. vec_xstw4(vector signed int __vec, long __offset, signed int *__ptr) {
  967. *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  968. }
  969. // This prototype is deprecated.
  970. static inline __ATTRS_o_ai void
  971. vec_xstw4(vector unsigned int __vec, long __offset, unsigned int *__ptr) {
  972. *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
  973. }
  974. /*-- vec_load_bndry ---------------------------------------------------------*/
  975. extern __ATTRS_o vector signed char
  976. vec_load_bndry(const signed char *__ptr, unsigned short __len)
  977. __constant_pow2_range(__len, 64, 4096);
  978. extern __ATTRS_o vector unsigned char
  979. vec_load_bndry(const unsigned char *__ptr, unsigned short __len)
  980. __constant_pow2_range(__len, 64, 4096);
  981. extern __ATTRS_o vector signed short
  982. vec_load_bndry(const signed short *__ptr, unsigned short __len)
  983. __constant_pow2_range(__len, 64, 4096);
  984. extern __ATTRS_o vector unsigned short
  985. vec_load_bndry(const unsigned short *__ptr, unsigned short __len)
  986. __constant_pow2_range(__len, 64, 4096);
  987. extern __ATTRS_o vector signed int
  988. vec_load_bndry(const signed int *__ptr, unsigned short __len)
  989. __constant_pow2_range(__len, 64, 4096);
  990. extern __ATTRS_o vector unsigned int
  991. vec_load_bndry(const unsigned int *__ptr, unsigned short __len)
  992. __constant_pow2_range(__len, 64, 4096);
  993. extern __ATTRS_o vector signed long long
  994. vec_load_bndry(const signed long long *__ptr, unsigned short __len)
  995. __constant_pow2_range(__len, 64, 4096);
  996. extern __ATTRS_o vector unsigned long long
  997. vec_load_bndry(const unsigned long long *__ptr, unsigned short __len)
  998. __constant_pow2_range(__len, 64, 4096);
  999. #if __ARCH__ >= 12
  1000. extern __ATTRS_o vector float
  1001. vec_load_bndry(const float *__ptr, unsigned short __len)
  1002. __constant_pow2_range(__len, 64, 4096);
  1003. #endif
  1004. extern __ATTRS_o vector double
  1005. vec_load_bndry(const double *__ptr, unsigned short __len)
  1006. __constant_pow2_range(__len, 64, 4096);
  1007. #define vec_load_bndry(X, Y) ((__typeof__((vec_load_bndry)((X), (Y)))) \
  1008. __builtin_s390_vlbb((X), ((Y) == 64 ? 0 : \
  1009. (Y) == 128 ? 1 : \
  1010. (Y) == 256 ? 2 : \
  1011. (Y) == 512 ? 3 : \
  1012. (Y) == 1024 ? 4 : \
  1013. (Y) == 2048 ? 5 : \
  1014. (Y) == 4096 ? 6 : -1)))
  1015. /*-- vec_load_len -----------------------------------------------------------*/
  1016. static inline __ATTRS_o_ai vector signed char
  1017. vec_load_len(const signed char *__ptr, unsigned int __len) {
  1018. return (vector signed char)__builtin_s390_vll(__len, __ptr);
  1019. }
  1020. static inline __ATTRS_o_ai vector unsigned char
  1021. vec_load_len(const unsigned char *__ptr, unsigned int __len) {
  1022. return (vector unsigned char)__builtin_s390_vll(__len, __ptr);
  1023. }
  1024. static inline __ATTRS_o_ai vector signed short
  1025. vec_load_len(const signed short *__ptr, unsigned int __len) {
  1026. return (vector signed short)__builtin_s390_vll(__len, __ptr);
  1027. }
  1028. static inline __ATTRS_o_ai vector unsigned short
  1029. vec_load_len(const unsigned short *__ptr, unsigned int __len) {
  1030. return (vector unsigned short)__builtin_s390_vll(__len, __ptr);
  1031. }
  1032. static inline __ATTRS_o_ai vector signed int
  1033. vec_load_len(const signed int *__ptr, unsigned int __len) {
  1034. return (vector signed int)__builtin_s390_vll(__len, __ptr);
  1035. }
  1036. static inline __ATTRS_o_ai vector unsigned int
  1037. vec_load_len(const unsigned int *__ptr, unsigned int __len) {
  1038. return (vector unsigned int)__builtin_s390_vll(__len, __ptr);
  1039. }
  1040. static inline __ATTRS_o_ai vector signed long long
  1041. vec_load_len(const signed long long *__ptr, unsigned int __len) {
  1042. return (vector signed long long)__builtin_s390_vll(__len, __ptr);
  1043. }
  1044. static inline __ATTRS_o_ai vector unsigned long long
  1045. vec_load_len(const unsigned long long *__ptr, unsigned int __len) {
  1046. return (vector unsigned long long)__builtin_s390_vll(__len, __ptr);
  1047. }
  1048. #if __ARCH__ >= 12
  1049. static inline __ATTRS_o_ai vector float
  1050. vec_load_len(const float *__ptr, unsigned int __len) {
  1051. return (vector float)__builtin_s390_vll(__len, __ptr);
  1052. }
  1053. #endif
  1054. static inline __ATTRS_o_ai vector double
  1055. vec_load_len(const double *__ptr, unsigned int __len) {
  1056. return (vector double)__builtin_s390_vll(__len, __ptr);
  1057. }
  1058. /*-- vec_load_len_r ---------------------------------------------------------*/
  1059. #if __ARCH__ >= 12
  1060. static inline __ATTRS_ai vector unsigned char
  1061. vec_load_len_r(const unsigned char *__ptr, unsigned int __len) {
  1062. return (vector unsigned char)__builtin_s390_vlrl(__len, __ptr);
  1063. }
  1064. #endif
  1065. /*-- vec_store_len ----------------------------------------------------------*/
  1066. static inline __ATTRS_o_ai void
  1067. vec_store_len(vector signed char __vec, signed char *__ptr,
  1068. unsigned int __len) {
  1069. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1070. }
  1071. static inline __ATTRS_o_ai void
  1072. vec_store_len(vector unsigned char __vec, unsigned char *__ptr,
  1073. unsigned int __len) {
  1074. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1075. }
  1076. static inline __ATTRS_o_ai void
  1077. vec_store_len(vector signed short __vec, signed short *__ptr,
  1078. unsigned int __len) {
  1079. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1080. }
  1081. static inline __ATTRS_o_ai void
  1082. vec_store_len(vector unsigned short __vec, unsigned short *__ptr,
  1083. unsigned int __len) {
  1084. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1085. }
  1086. static inline __ATTRS_o_ai void
  1087. vec_store_len(vector signed int __vec, signed int *__ptr,
  1088. unsigned int __len) {
  1089. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1090. }
  1091. static inline __ATTRS_o_ai void
  1092. vec_store_len(vector unsigned int __vec, unsigned int *__ptr,
  1093. unsigned int __len) {
  1094. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1095. }
  1096. static inline __ATTRS_o_ai void
  1097. vec_store_len(vector signed long long __vec, signed long long *__ptr,
  1098. unsigned int __len) {
  1099. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1100. }
  1101. static inline __ATTRS_o_ai void
  1102. vec_store_len(vector unsigned long long __vec, unsigned long long *__ptr,
  1103. unsigned int __len) {
  1104. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1105. }
  1106. #if __ARCH__ >= 12
  1107. static inline __ATTRS_o_ai void
  1108. vec_store_len(vector float __vec, float *__ptr,
  1109. unsigned int __len) {
  1110. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1111. }
  1112. #endif
  1113. static inline __ATTRS_o_ai void
  1114. vec_store_len(vector double __vec, double *__ptr,
  1115. unsigned int __len) {
  1116. __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
  1117. }
  1118. /*-- vec_store_len_r --------------------------------------------------------*/
  1119. #if __ARCH__ >= 12
  1120. static inline __ATTRS_ai void
  1121. vec_store_len_r(vector unsigned char __vec, unsigned char *__ptr,
  1122. unsigned int __len) {
  1123. __builtin_s390_vstrl((vector signed char)__vec, __len, __ptr);
  1124. }
  1125. #endif
  1126. /*-- vec_load_pair ----------------------------------------------------------*/
  1127. static inline __ATTRS_o_ai vector signed long long
  1128. vec_load_pair(signed long long __a, signed long long __b) {
  1129. return (vector signed long long)(__a, __b);
  1130. }
  1131. static inline __ATTRS_o_ai vector unsigned long long
  1132. vec_load_pair(unsigned long long __a, unsigned long long __b) {
  1133. return (vector unsigned long long)(__a, __b);
  1134. }
  1135. /*-- vec_genmask ------------------------------------------------------------*/
  1136. static inline __ATTRS_o_ai vector unsigned char
  1137. vec_genmask(unsigned short __mask)
  1138. __constant(__mask) {
  1139. return (vector unsigned char)(
  1140. __mask & 0x8000 ? 0xff : 0,
  1141. __mask & 0x4000 ? 0xff : 0,
  1142. __mask & 0x2000 ? 0xff : 0,
  1143. __mask & 0x1000 ? 0xff : 0,
  1144. __mask & 0x0800 ? 0xff : 0,
  1145. __mask & 0x0400 ? 0xff : 0,
  1146. __mask & 0x0200 ? 0xff : 0,
  1147. __mask & 0x0100 ? 0xff : 0,
  1148. __mask & 0x0080 ? 0xff : 0,
  1149. __mask & 0x0040 ? 0xff : 0,
  1150. __mask & 0x0020 ? 0xff : 0,
  1151. __mask & 0x0010 ? 0xff : 0,
  1152. __mask & 0x0008 ? 0xff : 0,
  1153. __mask & 0x0004 ? 0xff : 0,
  1154. __mask & 0x0002 ? 0xff : 0,
  1155. __mask & 0x0001 ? 0xff : 0);
  1156. }
  1157. /*-- vec_genmasks_* ---------------------------------------------------------*/
  1158. static inline __ATTRS_o_ai vector unsigned char
  1159. vec_genmasks_8(unsigned char __first, unsigned char __last)
  1160. __constant(__first) __constant(__last) {
  1161. unsigned char __bit1 = __first & 7;
  1162. unsigned char __bit2 = __last & 7;
  1163. unsigned char __mask1 = (unsigned char)(1U << (7 - __bit1) << 1) - 1;
  1164. unsigned char __mask2 = (unsigned char)(1U << (7 - __bit2)) - 1;
  1165. unsigned char __value = (__bit1 <= __bit2 ?
  1166. __mask1 & ~__mask2 :
  1167. __mask1 | ~__mask2);
  1168. return (vector unsigned char)__value;
  1169. }
  1170. static inline __ATTRS_o_ai vector unsigned short
  1171. vec_genmasks_16(unsigned char __first, unsigned char __last)
  1172. __constant(__first) __constant(__last) {
  1173. unsigned char __bit1 = __first & 15;
  1174. unsigned char __bit2 = __last & 15;
  1175. unsigned short __mask1 = (unsigned short)(1U << (15 - __bit1) << 1) - 1;
  1176. unsigned short __mask2 = (unsigned short)(1U << (15 - __bit2)) - 1;
  1177. unsigned short __value = (__bit1 <= __bit2 ?
  1178. __mask1 & ~__mask2 :
  1179. __mask1 | ~__mask2);
  1180. return (vector unsigned short)__value;
  1181. }
  1182. static inline __ATTRS_o_ai vector unsigned int
  1183. vec_genmasks_32(unsigned char __first, unsigned char __last)
  1184. __constant(__first) __constant(__last) {
  1185. unsigned char __bit1 = __first & 31;
  1186. unsigned char __bit2 = __last & 31;
  1187. unsigned int __mask1 = (1U << (31 - __bit1) << 1) - 1;
  1188. unsigned int __mask2 = (1U << (31 - __bit2)) - 1;
  1189. unsigned int __value = (__bit1 <= __bit2 ?
  1190. __mask1 & ~__mask2 :
  1191. __mask1 | ~__mask2);
  1192. return (vector unsigned int)__value;
  1193. }
  1194. static inline __ATTRS_o_ai vector unsigned long long
  1195. vec_genmasks_64(unsigned char __first, unsigned char __last)
  1196. __constant(__first) __constant(__last) {
  1197. unsigned char __bit1 = __first & 63;
  1198. unsigned char __bit2 = __last & 63;
  1199. unsigned long long __mask1 = (1ULL << (63 - __bit1) << 1) - 1;
  1200. unsigned long long __mask2 = (1ULL << (63 - __bit2)) - 1;
  1201. unsigned long long __value = (__bit1 <= __bit2 ?
  1202. __mask1 & ~__mask2 :
  1203. __mask1 | ~__mask2);
  1204. return (vector unsigned long long)__value;
  1205. }
  1206. /*-- vec_splat --------------------------------------------------------------*/
  1207. static inline __ATTRS_o_ai vector signed char
  1208. vec_splat(vector signed char __vec, int __index)
  1209. __constant_range(__index, 0, 15) {
  1210. return (vector signed char)__vec[__index];
  1211. }
  1212. static inline __ATTRS_o_ai vector bool char
  1213. vec_splat(vector bool char __vec, int __index)
  1214. __constant_range(__index, 0, 15) {
  1215. return (vector bool char)(vector unsigned char)__vec[__index];
  1216. }
  1217. static inline __ATTRS_o_ai vector unsigned char
  1218. vec_splat(vector unsigned char __vec, int __index)
  1219. __constant_range(__index, 0, 15) {
  1220. return (vector unsigned char)__vec[__index];
  1221. }
  1222. static inline __ATTRS_o_ai vector signed short
  1223. vec_splat(vector signed short __vec, int __index)
  1224. __constant_range(__index, 0, 7) {
  1225. return (vector signed short)__vec[__index];
  1226. }
  1227. static inline __ATTRS_o_ai vector bool short
  1228. vec_splat(vector bool short __vec, int __index)
  1229. __constant_range(__index, 0, 7) {
  1230. return (vector bool short)(vector unsigned short)__vec[__index];
  1231. }
  1232. static inline __ATTRS_o_ai vector unsigned short
  1233. vec_splat(vector unsigned short __vec, int __index)
  1234. __constant_range(__index, 0, 7) {
  1235. return (vector unsigned short)__vec[__index];
  1236. }
  1237. static inline __ATTRS_o_ai vector signed int
  1238. vec_splat(vector signed int __vec, int __index)
  1239. __constant_range(__index, 0, 3) {
  1240. return (vector signed int)__vec[__index];
  1241. }
  1242. static inline __ATTRS_o_ai vector bool int
  1243. vec_splat(vector bool int __vec, int __index)
  1244. __constant_range(__index, 0, 3) {
  1245. return (vector bool int)(vector unsigned int)__vec[__index];
  1246. }
  1247. static inline __ATTRS_o_ai vector unsigned int
  1248. vec_splat(vector unsigned int __vec, int __index)
  1249. __constant_range(__index, 0, 3) {
  1250. return (vector unsigned int)__vec[__index];
  1251. }
  1252. static inline __ATTRS_o_ai vector signed long long
  1253. vec_splat(vector signed long long __vec, int __index)
  1254. __constant_range(__index, 0, 1) {
  1255. return (vector signed long long)__vec[__index];
  1256. }
  1257. static inline __ATTRS_o_ai vector bool long long
  1258. vec_splat(vector bool long long __vec, int __index)
  1259. __constant_range(__index, 0, 1) {
  1260. return (vector bool long long)(vector unsigned long long)__vec[__index];
  1261. }
  1262. static inline __ATTRS_o_ai vector unsigned long long
  1263. vec_splat(vector unsigned long long __vec, int __index)
  1264. __constant_range(__index, 0, 1) {
  1265. return (vector unsigned long long)__vec[__index];
  1266. }
  1267. #if __ARCH__ >= 12
  1268. static inline __ATTRS_o_ai vector float
  1269. vec_splat(vector float __vec, int __index)
  1270. __constant_range(__index, 0, 3) {
  1271. return (vector float)__vec[__index];
  1272. }
  1273. #endif
  1274. static inline __ATTRS_o_ai vector double
  1275. vec_splat(vector double __vec, int __index)
  1276. __constant_range(__index, 0, 1) {
  1277. return (vector double)__vec[__index];
  1278. }
  1279. /*-- vec_splat_s* -----------------------------------------------------------*/
  1280. static inline __ATTRS_ai vector signed char
  1281. vec_splat_s8(signed char __scalar)
  1282. __constant(__scalar) {
  1283. return (vector signed char)__scalar;
  1284. }
  1285. static inline __ATTRS_ai vector signed short
  1286. vec_splat_s16(signed short __scalar)
  1287. __constant(__scalar) {
  1288. return (vector signed short)__scalar;
  1289. }
  1290. static inline __ATTRS_ai vector signed int
  1291. vec_splat_s32(signed short __scalar)
  1292. __constant(__scalar) {
  1293. return (vector signed int)(signed int)__scalar;
  1294. }
  1295. static inline __ATTRS_ai vector signed long long
  1296. vec_splat_s64(signed short __scalar)
  1297. __constant(__scalar) {
  1298. return (vector signed long long)(signed long)__scalar;
  1299. }
  1300. /*-- vec_splat_u* -----------------------------------------------------------*/
  1301. static inline __ATTRS_ai vector unsigned char
  1302. vec_splat_u8(unsigned char __scalar)
  1303. __constant(__scalar) {
  1304. return (vector unsigned char)__scalar;
  1305. }
  1306. static inline __ATTRS_ai vector unsigned short
  1307. vec_splat_u16(unsigned short __scalar)
  1308. __constant(__scalar) {
  1309. return (vector unsigned short)__scalar;
  1310. }
  1311. static inline __ATTRS_ai vector unsigned int
  1312. vec_splat_u32(signed short __scalar)
  1313. __constant(__scalar) {
  1314. return (vector unsigned int)(signed int)__scalar;
  1315. }
  1316. static inline __ATTRS_ai vector unsigned long long
  1317. vec_splat_u64(signed short __scalar)
  1318. __constant(__scalar) {
  1319. return (vector unsigned long long)(signed long long)__scalar;
  1320. }
  1321. /*-- vec_splats -------------------------------------------------------------*/
  1322. static inline __ATTRS_o_ai vector signed char
  1323. vec_splats(signed char __scalar) {
  1324. return (vector signed char)__scalar;
  1325. }
  1326. static inline __ATTRS_o_ai vector unsigned char
  1327. vec_splats(unsigned char __scalar) {
  1328. return (vector unsigned char)__scalar;
  1329. }
  1330. static inline __ATTRS_o_ai vector signed short
  1331. vec_splats(signed short __scalar) {
  1332. return (vector signed short)__scalar;
  1333. }
  1334. static inline __ATTRS_o_ai vector unsigned short
  1335. vec_splats(unsigned short __scalar) {
  1336. return (vector unsigned short)__scalar;
  1337. }
  1338. static inline __ATTRS_o_ai vector signed int
  1339. vec_splats(signed int __scalar) {
  1340. return (vector signed int)__scalar;
  1341. }
  1342. static inline __ATTRS_o_ai vector unsigned int
  1343. vec_splats(unsigned int __scalar) {
  1344. return (vector unsigned int)__scalar;
  1345. }
  1346. static inline __ATTRS_o_ai vector signed long long
  1347. vec_splats(signed long long __scalar) {
  1348. return (vector signed long long)__scalar;
  1349. }
  1350. static inline __ATTRS_o_ai vector unsigned long long
  1351. vec_splats(unsigned long long __scalar) {
  1352. return (vector unsigned long long)__scalar;
  1353. }
  1354. #if __ARCH__ >= 12
  1355. static inline __ATTRS_o_ai vector float
  1356. vec_splats(float __scalar) {
  1357. return (vector float)__scalar;
  1358. }
  1359. #endif
  1360. static inline __ATTRS_o_ai vector double
  1361. vec_splats(double __scalar) {
  1362. return (vector double)__scalar;
  1363. }
  1364. /*-- vec_extend_s64 ---------------------------------------------------------*/
  1365. static inline __ATTRS_o_ai vector signed long long
  1366. vec_extend_s64(vector signed char __a) {
  1367. return (vector signed long long)(__a[7], __a[15]);
  1368. }
  1369. static inline __ATTRS_o_ai vector signed long long
  1370. vec_extend_s64(vector signed short __a) {
  1371. return (vector signed long long)(__a[3], __a[7]);
  1372. }
  1373. static inline __ATTRS_o_ai vector signed long long
  1374. vec_extend_s64(vector signed int __a) {
  1375. return (vector signed long long)(__a[1], __a[3]);
  1376. }
  1377. /*-- vec_mergeh -------------------------------------------------------------*/
  1378. static inline __ATTRS_o_ai vector signed char
  1379. vec_mergeh(vector signed char __a, vector signed char __b) {
  1380. return (vector signed char)(
  1381. __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3],
  1382. __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
  1383. }
  1384. static inline __ATTRS_o_ai vector bool char
  1385. vec_mergeh(vector bool char __a, vector bool char __b) {
  1386. return (vector bool char)(
  1387. __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3],
  1388. __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
  1389. }
  1390. static inline __ATTRS_o_ai vector unsigned char
  1391. vec_mergeh(vector unsigned char __a, vector unsigned char __b) {
  1392. return (vector unsigned char)(
  1393. __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3],
  1394. __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
  1395. }
  1396. static inline __ATTRS_o_ai vector signed short
  1397. vec_mergeh(vector signed short __a, vector signed short __b) {
  1398. return (vector signed short)(
  1399. __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]);
  1400. }
  1401. static inline __ATTRS_o_ai vector bool short
  1402. vec_mergeh(vector bool short __a, vector bool short __b) {
  1403. return (vector bool short)(
  1404. __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]);
  1405. }
  1406. static inline __ATTRS_o_ai vector unsigned short
  1407. vec_mergeh(vector unsigned short __a, vector unsigned short __b) {
  1408. return (vector unsigned short)(
  1409. __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]);
  1410. }
  1411. static inline __ATTRS_o_ai vector signed int
  1412. vec_mergeh(vector signed int __a, vector signed int __b) {
  1413. return (vector signed int)(__a[0], __b[0], __a[1], __b[1]);
  1414. }
  1415. static inline __ATTRS_o_ai vector bool int
  1416. vec_mergeh(vector bool int __a, vector bool int __b) {
  1417. return (vector bool int)(__a[0], __b[0], __a[1], __b[1]);
  1418. }
  1419. static inline __ATTRS_o_ai vector unsigned int
  1420. vec_mergeh(vector unsigned int __a, vector unsigned int __b) {
  1421. return (vector unsigned int)(__a[0], __b[0], __a[1], __b[1]);
  1422. }
  1423. static inline __ATTRS_o_ai vector signed long long
  1424. vec_mergeh(vector signed long long __a, vector signed long long __b) {
  1425. return (vector signed long long)(__a[0], __b[0]);
  1426. }
  1427. static inline __ATTRS_o_ai vector bool long long
  1428. vec_mergeh(vector bool long long __a, vector bool long long __b) {
  1429. return (vector bool long long)(__a[0], __b[0]);
  1430. }
  1431. static inline __ATTRS_o_ai vector unsigned long long
  1432. vec_mergeh(vector unsigned long long __a, vector unsigned long long __b) {
  1433. return (vector unsigned long long)(__a[0], __b[0]);
  1434. }
  1435. #if __ARCH__ >= 12
  1436. static inline __ATTRS_o_ai vector float
  1437. vec_mergeh(vector float __a, vector float __b) {
  1438. return (vector float)(__a[0], __b[0], __a[1], __b[1]);
  1439. }
  1440. #endif
  1441. static inline __ATTRS_o_ai vector double
  1442. vec_mergeh(vector double __a, vector double __b) {
  1443. return (vector double)(__a[0], __b[0]);
  1444. }
  1445. /*-- vec_mergel -------------------------------------------------------------*/
  1446. static inline __ATTRS_o_ai vector signed char
  1447. vec_mergel(vector signed char __a, vector signed char __b) {
  1448. return (vector signed char)(
  1449. __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11],
  1450. __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]);
  1451. }
  1452. static inline __ATTRS_o_ai vector bool char
  1453. vec_mergel(vector bool char __a, vector bool char __b) {
  1454. return (vector bool char)(
  1455. __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11],
  1456. __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]);
  1457. }
  1458. static inline __ATTRS_o_ai vector unsigned char
  1459. vec_mergel(vector unsigned char __a, vector unsigned char __b) {
  1460. return (vector unsigned char)(
  1461. __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11],
  1462. __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]);
  1463. }
  1464. static inline __ATTRS_o_ai vector signed short
  1465. vec_mergel(vector signed short __a, vector signed short __b) {
  1466. return (vector signed short)(
  1467. __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
  1468. }
  1469. static inline __ATTRS_o_ai vector bool short
  1470. vec_mergel(vector bool short __a, vector bool short __b) {
  1471. return (vector bool short)(
  1472. __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
  1473. }
  1474. static inline __ATTRS_o_ai vector unsigned short
  1475. vec_mergel(vector unsigned short __a, vector unsigned short __b) {
  1476. return (vector unsigned short)(
  1477. __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
  1478. }
  1479. static inline __ATTRS_o_ai vector signed int
  1480. vec_mergel(vector signed int __a, vector signed int __b) {
  1481. return (vector signed int)(__a[2], __b[2], __a[3], __b[3]);
  1482. }
  1483. static inline __ATTRS_o_ai vector bool int
  1484. vec_mergel(vector bool int __a, vector bool int __b) {
  1485. return (vector bool int)(__a[2], __b[2], __a[3], __b[3]);
  1486. }
  1487. static inline __ATTRS_o_ai vector unsigned int
  1488. vec_mergel(vector unsigned int __a, vector unsigned int __b) {
  1489. return (vector unsigned int)(__a[2], __b[2], __a[3], __b[3]);
  1490. }
  1491. static inline __ATTRS_o_ai vector signed long long
  1492. vec_mergel(vector signed long long __a, vector signed long long __b) {
  1493. return (vector signed long long)(__a[1], __b[1]);
  1494. }
  1495. static inline __ATTRS_o_ai vector bool long long
  1496. vec_mergel(vector bool long long __a, vector bool long long __b) {
  1497. return (vector bool long long)(__a[1], __b[1]);
  1498. }
  1499. static inline __ATTRS_o_ai vector unsigned long long
  1500. vec_mergel(vector unsigned long long __a, vector unsigned long long __b) {
  1501. return (vector unsigned long long)(__a[1], __b[1]);
  1502. }
  1503. #if __ARCH__ >= 12
  1504. static inline __ATTRS_o_ai vector float
  1505. vec_mergel(vector float __a, vector float __b) {
  1506. return (vector float)(__a[2], __b[2], __a[3], __b[3]);
  1507. }
  1508. #endif
  1509. static inline __ATTRS_o_ai vector double
  1510. vec_mergel(vector double __a, vector double __b) {
  1511. return (vector double)(__a[1], __b[1]);
  1512. }
  1513. /*-- vec_pack ---------------------------------------------------------------*/
  1514. static inline __ATTRS_o_ai vector signed char
  1515. vec_pack(vector signed short __a, vector signed short __b) {
  1516. vector signed char __ac = (vector signed char)__a;
  1517. vector signed char __bc = (vector signed char)__b;
  1518. return (vector signed char)(
  1519. __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15],
  1520. __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]);
  1521. }
  1522. static inline __ATTRS_o_ai vector bool char
  1523. vec_pack(vector bool short __a, vector bool short __b) {
  1524. vector bool char __ac = (vector bool char)__a;
  1525. vector bool char __bc = (vector bool char)__b;
  1526. return (vector bool char)(
  1527. __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15],
  1528. __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]);
  1529. }
  1530. static inline __ATTRS_o_ai vector unsigned char
  1531. vec_pack(vector unsigned short __a, vector unsigned short __b) {
  1532. vector unsigned char __ac = (vector unsigned char)__a;
  1533. vector unsigned char __bc = (vector unsigned char)__b;
  1534. return (vector unsigned char)(
  1535. __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15],
  1536. __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]);
  1537. }
  1538. static inline __ATTRS_o_ai vector signed short
  1539. vec_pack(vector signed int __a, vector signed int __b) {
  1540. vector signed short __ac = (vector signed short)__a;
  1541. vector signed short __bc = (vector signed short)__b;
  1542. return (vector signed short)(
  1543. __ac[1], __ac[3], __ac[5], __ac[7],
  1544. __bc[1], __bc[3], __bc[5], __bc[7]);
  1545. }
  1546. static inline __ATTRS_o_ai vector bool short
  1547. vec_pack(vector bool int __a, vector bool int __b) {
  1548. vector bool short __ac = (vector bool short)__a;
  1549. vector bool short __bc = (vector bool short)__b;
  1550. return (vector bool short)(
  1551. __ac[1], __ac[3], __ac[5], __ac[7],
  1552. __bc[1], __bc[3], __bc[5], __bc[7]);
  1553. }
  1554. static inline __ATTRS_o_ai vector unsigned short
  1555. vec_pack(vector unsigned int __a, vector unsigned int __b) {
  1556. vector unsigned short __ac = (vector unsigned short)__a;
  1557. vector unsigned short __bc = (vector unsigned short)__b;
  1558. return (vector unsigned short)(
  1559. __ac[1], __ac[3], __ac[5], __ac[7],
  1560. __bc[1], __bc[3], __bc[5], __bc[7]);
  1561. }
  1562. static inline __ATTRS_o_ai vector signed int
  1563. vec_pack(vector signed long long __a, vector signed long long __b) {
  1564. vector signed int __ac = (vector signed int)__a;
  1565. vector signed int __bc = (vector signed int)__b;
  1566. return (vector signed int)(__ac[1], __ac[3], __bc[1], __bc[3]);
  1567. }
  1568. static inline __ATTRS_o_ai vector bool int
  1569. vec_pack(vector bool long long __a, vector bool long long __b) {
  1570. vector bool int __ac = (vector bool int)__a;
  1571. vector bool int __bc = (vector bool int)__b;
  1572. return (vector bool int)(__ac[1], __ac[3], __bc[1], __bc[3]);
  1573. }
  1574. static inline __ATTRS_o_ai vector unsigned int
  1575. vec_pack(vector unsigned long long __a, vector unsigned long long __b) {
  1576. vector unsigned int __ac = (vector unsigned int)__a;
  1577. vector unsigned int __bc = (vector unsigned int)__b;
  1578. return (vector unsigned int)(__ac[1], __ac[3], __bc[1], __bc[3]);
  1579. }
  1580. /*-- vec_packs --------------------------------------------------------------*/
  1581. static inline __ATTRS_o_ai vector signed char
  1582. vec_packs(vector signed short __a, vector signed short __b) {
  1583. return __builtin_s390_vpksh(__a, __b);
  1584. }
  1585. static inline __ATTRS_o_ai vector unsigned char
  1586. vec_packs(vector unsigned short __a, vector unsigned short __b) {
  1587. return __builtin_s390_vpklsh(__a, __b);
  1588. }
  1589. static inline __ATTRS_o_ai vector signed short
  1590. vec_packs(vector signed int __a, vector signed int __b) {
  1591. return __builtin_s390_vpksf(__a, __b);
  1592. }
  1593. static inline __ATTRS_o_ai vector unsigned short
  1594. vec_packs(vector unsigned int __a, vector unsigned int __b) {
  1595. return __builtin_s390_vpklsf(__a, __b);
  1596. }
  1597. static inline __ATTRS_o_ai vector signed int
  1598. vec_packs(vector signed long long __a, vector signed long long __b) {
  1599. return __builtin_s390_vpksg(__a, __b);
  1600. }
  1601. static inline __ATTRS_o_ai vector unsigned int
  1602. vec_packs(vector unsigned long long __a, vector unsigned long long __b) {
  1603. return __builtin_s390_vpklsg(__a, __b);
  1604. }
  1605. /*-- vec_packs_cc -----------------------------------------------------------*/
  1606. static inline __ATTRS_o_ai vector signed char
  1607. vec_packs_cc(vector signed short __a, vector signed short __b, int *__cc) {
  1608. return __builtin_s390_vpkshs(__a, __b, __cc);
  1609. }
  1610. static inline __ATTRS_o_ai vector unsigned char
  1611. vec_packs_cc(vector unsigned short __a, vector unsigned short __b, int *__cc) {
  1612. return __builtin_s390_vpklshs(__a, __b, __cc);
  1613. }
  1614. static inline __ATTRS_o_ai vector signed short
  1615. vec_packs_cc(vector signed int __a, vector signed int __b, int *__cc) {
  1616. return __builtin_s390_vpksfs(__a, __b, __cc);
  1617. }
  1618. static inline __ATTRS_o_ai vector unsigned short
  1619. vec_packs_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) {
  1620. return __builtin_s390_vpklsfs(__a, __b, __cc);
  1621. }
  1622. static inline __ATTRS_o_ai vector signed int
  1623. vec_packs_cc(vector signed long long __a, vector signed long long __b,
  1624. int *__cc) {
  1625. return __builtin_s390_vpksgs(__a, __b, __cc);
  1626. }
  1627. static inline __ATTRS_o_ai vector unsigned int
  1628. vec_packs_cc(vector unsigned long long __a, vector unsigned long long __b,
  1629. int *__cc) {
  1630. return __builtin_s390_vpklsgs(__a, __b, __cc);
  1631. }
  1632. /*-- vec_packsu -------------------------------------------------------------*/
  1633. static inline __ATTRS_o_ai vector unsigned char
  1634. vec_packsu(vector signed short __a, vector signed short __b) {
  1635. const vector signed short __zero = (vector signed short)0;
  1636. return __builtin_s390_vpklsh(
  1637. (vector unsigned short)(__a >= __zero) & (vector unsigned short)__a,
  1638. (vector unsigned short)(__b >= __zero) & (vector unsigned short)__b);
  1639. }
  1640. static inline __ATTRS_o_ai vector unsigned char
  1641. vec_packsu(vector unsigned short __a, vector unsigned short __b) {
  1642. return __builtin_s390_vpklsh(__a, __b);
  1643. }
  1644. static inline __ATTRS_o_ai vector unsigned short
  1645. vec_packsu(vector signed int __a, vector signed int __b) {
  1646. const vector signed int __zero = (vector signed int)0;
  1647. return __builtin_s390_vpklsf(
  1648. (vector unsigned int)(__a >= __zero) & (vector unsigned int)__a,
  1649. (vector unsigned int)(__b >= __zero) & (vector unsigned int)__b);
  1650. }
  1651. static inline __ATTRS_o_ai vector unsigned short
  1652. vec_packsu(vector unsigned int __a, vector unsigned int __b) {
  1653. return __builtin_s390_vpklsf(__a, __b);
  1654. }
  1655. static inline __ATTRS_o_ai vector unsigned int
  1656. vec_packsu(vector signed long long __a, vector signed long long __b) {
  1657. const vector signed long long __zero = (vector signed long long)0;
  1658. return __builtin_s390_vpklsg(
  1659. (vector unsigned long long)(__a >= __zero) &
  1660. (vector unsigned long long)__a,
  1661. (vector unsigned long long)(__b >= __zero) &
  1662. (vector unsigned long long)__b);
  1663. }
  1664. static inline __ATTRS_o_ai vector unsigned int
  1665. vec_packsu(vector unsigned long long __a, vector unsigned long long __b) {
  1666. return __builtin_s390_vpklsg(__a, __b);
  1667. }
  1668. /*-- vec_packsu_cc ----------------------------------------------------------*/
  1669. static inline __ATTRS_o_ai vector unsigned char
  1670. vec_packsu_cc(vector unsigned short __a, vector unsigned short __b, int *__cc) {
  1671. return __builtin_s390_vpklshs(__a, __b, __cc);
  1672. }
  1673. static inline __ATTRS_o_ai vector unsigned short
  1674. vec_packsu_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) {
  1675. return __builtin_s390_vpklsfs(__a, __b, __cc);
  1676. }
  1677. static inline __ATTRS_o_ai vector unsigned int
  1678. vec_packsu_cc(vector unsigned long long __a, vector unsigned long long __b,
  1679. int *__cc) {
  1680. return __builtin_s390_vpklsgs(__a, __b, __cc);
  1681. }
  1682. /*-- vec_unpackh ------------------------------------------------------------*/
  1683. static inline __ATTRS_o_ai vector signed short
  1684. vec_unpackh(vector signed char __a) {
  1685. return __builtin_s390_vuphb(__a);
  1686. }
  1687. static inline __ATTRS_o_ai vector bool short
  1688. vec_unpackh(vector bool char __a) {
  1689. return (vector bool short)__builtin_s390_vuphb((vector signed char)__a);
  1690. }
  1691. static inline __ATTRS_o_ai vector unsigned short
  1692. vec_unpackh(vector unsigned char __a) {
  1693. return __builtin_s390_vuplhb(__a);
  1694. }
  1695. static inline __ATTRS_o_ai vector signed int
  1696. vec_unpackh(vector signed short __a) {
  1697. return __builtin_s390_vuphh(__a);
  1698. }
  1699. static inline __ATTRS_o_ai vector bool int
  1700. vec_unpackh(vector bool short __a) {
  1701. return (vector bool int)__builtin_s390_vuphh((vector signed short)__a);
  1702. }
  1703. static inline __ATTRS_o_ai vector unsigned int
  1704. vec_unpackh(vector unsigned short __a) {
  1705. return __builtin_s390_vuplhh(__a);
  1706. }
  1707. static inline __ATTRS_o_ai vector signed long long
  1708. vec_unpackh(vector signed int __a) {
  1709. return __builtin_s390_vuphf(__a);
  1710. }
  1711. static inline __ATTRS_o_ai vector bool long long
  1712. vec_unpackh(vector bool int __a) {
  1713. return (vector bool long long)__builtin_s390_vuphf((vector signed int)__a);
  1714. }
  1715. static inline __ATTRS_o_ai vector unsigned long long
  1716. vec_unpackh(vector unsigned int __a) {
  1717. return __builtin_s390_vuplhf(__a);
  1718. }
  1719. /*-- vec_unpackl ------------------------------------------------------------*/
  1720. static inline __ATTRS_o_ai vector signed short
  1721. vec_unpackl(vector signed char __a) {
  1722. return __builtin_s390_vuplb(__a);
  1723. }
  1724. static inline __ATTRS_o_ai vector bool short
  1725. vec_unpackl(vector bool char __a) {
  1726. return (vector bool short)__builtin_s390_vuplb((vector signed char)__a);
  1727. }
  1728. static inline __ATTRS_o_ai vector unsigned short
  1729. vec_unpackl(vector unsigned char __a) {
  1730. return __builtin_s390_vupllb(__a);
  1731. }
  1732. static inline __ATTRS_o_ai vector signed int
  1733. vec_unpackl(vector signed short __a) {
  1734. return __builtin_s390_vuplhw(__a);
  1735. }
  1736. static inline __ATTRS_o_ai vector bool int
  1737. vec_unpackl(vector bool short __a) {
  1738. return (vector bool int)__builtin_s390_vuplhw((vector signed short)__a);
  1739. }
  1740. static inline __ATTRS_o_ai vector unsigned int
  1741. vec_unpackl(vector unsigned short __a) {
  1742. return __builtin_s390_vupllh(__a);
  1743. }
  1744. static inline __ATTRS_o_ai vector signed long long
  1745. vec_unpackl(vector signed int __a) {
  1746. return __builtin_s390_vuplf(__a);
  1747. }
  1748. static inline __ATTRS_o_ai vector bool long long
  1749. vec_unpackl(vector bool int __a) {
  1750. return (vector bool long long)__builtin_s390_vuplf((vector signed int)__a);
  1751. }
  1752. static inline __ATTRS_o_ai vector unsigned long long
  1753. vec_unpackl(vector unsigned int __a) {
  1754. return __builtin_s390_vupllf(__a);
  1755. }
  1756. /*-- vec_cmpeq --------------------------------------------------------------*/
  1757. static inline __ATTRS_o_ai vector bool char
  1758. vec_cmpeq(vector bool char __a, vector bool char __b) {
  1759. return (vector bool char)(__a == __b);
  1760. }
  1761. static inline __ATTRS_o_ai vector bool char
  1762. vec_cmpeq(vector signed char __a, vector signed char __b) {
  1763. return (vector bool char)(__a == __b);
  1764. }
  1765. static inline __ATTRS_o_ai vector bool char
  1766. vec_cmpeq(vector unsigned char __a, vector unsigned char __b) {
  1767. return (vector bool char)(__a == __b);
  1768. }
  1769. static inline __ATTRS_o_ai vector bool short
  1770. vec_cmpeq(vector bool short __a, vector bool short __b) {
  1771. return (vector bool short)(__a == __b);
  1772. }
  1773. static inline __ATTRS_o_ai vector bool short
  1774. vec_cmpeq(vector signed short __a, vector signed short __b) {
  1775. return (vector bool short)(__a == __b);
  1776. }
  1777. static inline __ATTRS_o_ai vector bool short
  1778. vec_cmpeq(vector unsigned short __a, vector unsigned short __b) {
  1779. return (vector bool short)(__a == __b);
  1780. }
  1781. static inline __ATTRS_o_ai vector bool int
  1782. vec_cmpeq(vector bool int __a, vector bool int __b) {
  1783. return (vector bool int)(__a == __b);
  1784. }
  1785. static inline __ATTRS_o_ai vector bool int
  1786. vec_cmpeq(vector signed int __a, vector signed int __b) {
  1787. return (vector bool int)(__a == __b);
  1788. }
  1789. static inline __ATTRS_o_ai vector bool int
  1790. vec_cmpeq(vector unsigned int __a, vector unsigned int __b) {
  1791. return (vector bool int)(__a == __b);
  1792. }
  1793. static inline __ATTRS_o_ai vector bool long long
  1794. vec_cmpeq(vector bool long long __a, vector bool long long __b) {
  1795. return (vector bool long long)(__a == __b);
  1796. }
  1797. static inline __ATTRS_o_ai vector bool long long
  1798. vec_cmpeq(vector signed long long __a, vector signed long long __b) {
  1799. return (vector bool long long)(__a == __b);
  1800. }
  1801. static inline __ATTRS_o_ai vector bool long long
  1802. vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {
  1803. return (vector bool long long)(__a == __b);
  1804. }
  1805. #if __ARCH__ >= 12
  1806. static inline __ATTRS_o_ai vector bool int
  1807. vec_cmpeq(vector float __a, vector float __b) {
  1808. return (vector bool int)(__a == __b);
  1809. }
  1810. #endif
  1811. static inline __ATTRS_o_ai vector bool long long
  1812. vec_cmpeq(vector double __a, vector double __b) {
  1813. return (vector bool long long)(__a == __b);
  1814. }
  1815. /*-- vec_cmpge --------------------------------------------------------------*/
  1816. static inline __ATTRS_o_ai vector bool char
  1817. vec_cmpge(vector signed char __a, vector signed char __b) {
  1818. return (vector bool char)(__a >= __b);
  1819. }
  1820. static inline __ATTRS_o_ai vector bool char
  1821. vec_cmpge(vector unsigned char __a, vector unsigned char __b) {
  1822. return (vector bool char)(__a >= __b);
  1823. }
  1824. static inline __ATTRS_o_ai vector bool short
  1825. vec_cmpge(vector signed short __a, vector signed short __b) {
  1826. return (vector bool short)(__a >= __b);
  1827. }
  1828. static inline __ATTRS_o_ai vector bool short
  1829. vec_cmpge(vector unsigned short __a, vector unsigned short __b) {
  1830. return (vector bool short)(__a >= __b);
  1831. }
  1832. static inline __ATTRS_o_ai vector bool int
  1833. vec_cmpge(vector signed int __a, vector signed int __b) {
  1834. return (vector bool int)(__a >= __b);
  1835. }
  1836. static inline __ATTRS_o_ai vector bool int
  1837. vec_cmpge(vector unsigned int __a, vector unsigned int __b) {
  1838. return (vector bool int)(__a >= __b);
  1839. }
  1840. static inline __ATTRS_o_ai vector bool long long
  1841. vec_cmpge(vector signed long long __a, vector signed long long __b) {
  1842. return (vector bool long long)(__a >= __b);
  1843. }
  1844. static inline __ATTRS_o_ai vector bool long long
  1845. vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) {
  1846. return (vector bool long long)(__a >= __b);
  1847. }
  1848. #if __ARCH__ >= 12
  1849. static inline __ATTRS_o_ai vector bool int
  1850. vec_cmpge(vector float __a, vector float __b) {
  1851. return (vector bool int)(__a >= __b);
  1852. }
  1853. #endif
  1854. static inline __ATTRS_o_ai vector bool long long
  1855. vec_cmpge(vector double __a, vector double __b) {
  1856. return (vector bool long long)(__a >= __b);
  1857. }
  1858. /*-- vec_cmpgt --------------------------------------------------------------*/
  1859. static inline __ATTRS_o_ai vector bool char
  1860. vec_cmpgt(vector signed char __a, vector signed char __b) {
  1861. return (vector bool char)(__a > __b);
  1862. }
  1863. static inline __ATTRS_o_ai vector bool char
  1864. vec_cmpgt(vector unsigned char __a, vector unsigned char __b) {
  1865. return (vector bool char)(__a > __b);
  1866. }
  1867. static inline __ATTRS_o_ai vector bool short
  1868. vec_cmpgt(vector signed short __a, vector signed short __b) {
  1869. return (vector bool short)(__a > __b);
  1870. }
  1871. static inline __ATTRS_o_ai vector bool short
  1872. vec_cmpgt(vector unsigned short __a, vector unsigned short __b) {
  1873. return (vector bool short)(__a > __b);
  1874. }
  1875. static inline __ATTRS_o_ai vector bool int
  1876. vec_cmpgt(vector signed int __a, vector signed int __b) {
  1877. return (vector bool int)(__a > __b);
  1878. }
  1879. static inline __ATTRS_o_ai vector bool int
  1880. vec_cmpgt(vector unsigned int __a, vector unsigned int __b) {
  1881. return (vector bool int)(__a > __b);
  1882. }
  1883. static inline __ATTRS_o_ai vector bool long long
  1884. vec_cmpgt(vector signed long long __a, vector signed long long __b) {
  1885. return (vector bool long long)(__a > __b);
  1886. }
  1887. static inline __ATTRS_o_ai vector bool long long
  1888. vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {
  1889. return (vector bool long long)(__a > __b);
  1890. }
  1891. #if __ARCH__ >= 12
  1892. static inline __ATTRS_o_ai vector bool int
  1893. vec_cmpgt(vector float __a, vector float __b) {
  1894. return (vector bool int)(__a > __b);
  1895. }
  1896. #endif
  1897. static inline __ATTRS_o_ai vector bool long long
  1898. vec_cmpgt(vector double __a, vector double __b) {
  1899. return (vector bool long long)(__a > __b);
  1900. }
  1901. /*-- vec_cmple --------------------------------------------------------------*/
  1902. static inline __ATTRS_o_ai vector bool char
  1903. vec_cmple(vector signed char __a, vector signed char __b) {
  1904. return (vector bool char)(__a <= __b);
  1905. }
  1906. static inline __ATTRS_o_ai vector bool char
  1907. vec_cmple(vector unsigned char __a, vector unsigned char __b) {
  1908. return (vector bool char)(__a <= __b);
  1909. }
  1910. static inline __ATTRS_o_ai vector bool short
  1911. vec_cmple(vector signed short __a, vector signed short __b) {
  1912. return (vector bool short)(__a <= __b);
  1913. }
  1914. static inline __ATTRS_o_ai vector bool short
  1915. vec_cmple(vector unsigned short __a, vector unsigned short __b) {
  1916. return (vector bool short)(__a <= __b);
  1917. }
  1918. static inline __ATTRS_o_ai vector bool int
  1919. vec_cmple(vector signed int __a, vector signed int __b) {
  1920. return (vector bool int)(__a <= __b);
  1921. }
  1922. static inline __ATTRS_o_ai vector bool int
  1923. vec_cmple(vector unsigned int __a, vector unsigned int __b) {
  1924. return (vector bool int)(__a <= __b);
  1925. }
  1926. static inline __ATTRS_o_ai vector bool long long
  1927. vec_cmple(vector signed long long __a, vector signed long long __b) {
  1928. return (vector bool long long)(__a <= __b);
  1929. }
  1930. static inline __ATTRS_o_ai vector bool long long
  1931. vec_cmple(vector unsigned long long __a, vector unsigned long long __b) {
  1932. return (vector bool long long)(__a <= __b);
  1933. }
  1934. #if __ARCH__ >= 12
  1935. static inline __ATTRS_o_ai vector bool int
  1936. vec_cmple(vector float __a, vector float __b) {
  1937. return (vector bool int)(__a <= __b);
  1938. }
  1939. #endif
  1940. static inline __ATTRS_o_ai vector bool long long
  1941. vec_cmple(vector double __a, vector double __b) {
  1942. return (vector bool long long)(__a <= __b);
  1943. }
  1944. /*-- vec_cmplt --------------------------------------------------------------*/
  1945. static inline __ATTRS_o_ai vector bool char
  1946. vec_cmplt(vector signed char __a, vector signed char __b) {
  1947. return (vector bool char)(__a < __b);
  1948. }
  1949. static inline __ATTRS_o_ai vector bool char
  1950. vec_cmplt(vector unsigned char __a, vector unsigned char __b) {
  1951. return (vector bool char)(__a < __b);
  1952. }
  1953. static inline __ATTRS_o_ai vector bool short
  1954. vec_cmplt(vector signed short __a, vector signed short __b) {
  1955. return (vector bool short)(__a < __b);
  1956. }
  1957. static inline __ATTRS_o_ai vector bool short
  1958. vec_cmplt(vector unsigned short __a, vector unsigned short __b) {
  1959. return (vector bool short)(__a < __b);
  1960. }
  1961. static inline __ATTRS_o_ai vector bool int
  1962. vec_cmplt(vector signed int __a, vector signed int __b) {
  1963. return (vector bool int)(__a < __b);
  1964. }
  1965. static inline __ATTRS_o_ai vector bool int
  1966. vec_cmplt(vector unsigned int __a, vector unsigned int __b) {
  1967. return (vector bool int)(__a < __b);
  1968. }
  1969. static inline __ATTRS_o_ai vector bool long long
  1970. vec_cmplt(vector signed long long __a, vector signed long long __b) {
  1971. return (vector bool long long)(__a < __b);
  1972. }
  1973. static inline __ATTRS_o_ai vector bool long long
  1974. vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {
  1975. return (vector bool long long)(__a < __b);
  1976. }
  1977. #if __ARCH__ >= 12
  1978. static inline __ATTRS_o_ai vector bool int
  1979. vec_cmplt(vector float __a, vector float __b) {
  1980. return (vector bool int)(__a < __b);
  1981. }
  1982. #endif
  1983. static inline __ATTRS_o_ai vector bool long long
  1984. vec_cmplt(vector double __a, vector double __b) {
  1985. return (vector bool long long)(__a < __b);
  1986. }
  1987. /*-- vec_all_eq -------------------------------------------------------------*/
  1988. static inline __ATTRS_o_ai int
  1989. vec_all_eq(vector signed char __a, vector signed char __b) {
  1990. int __cc;
  1991. __builtin_s390_vceqbs(__a, __b, &__cc);
  1992. return __cc == 0;
  1993. }
  1994. // This prototype is deprecated.
  1995. static inline __ATTRS_o_ai int
  1996. vec_all_eq(vector signed char __a, vector bool char __b) {
  1997. int __cc;
  1998. __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc);
  1999. return __cc == 0;
  2000. }
  2001. // This prototype is deprecated.
  2002. static inline __ATTRS_o_ai int
  2003. vec_all_eq(vector bool char __a, vector signed char __b) {
  2004. int __cc;
  2005. __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc);
  2006. return __cc == 0;
  2007. }
  2008. static inline __ATTRS_o_ai int
  2009. vec_all_eq(vector unsigned char __a, vector unsigned char __b) {
  2010. int __cc;
  2011. __builtin_s390_vceqbs((vector signed char)__a,
  2012. (vector signed char)__b, &__cc);
  2013. return __cc == 0;
  2014. }
  2015. // This prototype is deprecated.
  2016. static inline __ATTRS_o_ai int
  2017. vec_all_eq(vector unsigned char __a, vector bool char __b) {
  2018. int __cc;
  2019. __builtin_s390_vceqbs((vector signed char)__a,
  2020. (vector signed char)__b, &__cc);
  2021. return __cc == 0;
  2022. }
  2023. // This prototype is deprecated.
  2024. static inline __ATTRS_o_ai int
  2025. vec_all_eq(vector bool char __a, vector unsigned char __b) {
  2026. int __cc;
  2027. __builtin_s390_vceqbs((vector signed char)__a,
  2028. (vector signed char)__b, &__cc);
  2029. return __cc == 0;
  2030. }
  2031. static inline __ATTRS_o_ai int
  2032. vec_all_eq(vector bool char __a, vector bool char __b) {
  2033. int __cc;
  2034. __builtin_s390_vceqbs((vector signed char)__a,
  2035. (vector signed char)__b, &__cc);
  2036. return __cc == 0;
  2037. }
  2038. static inline __ATTRS_o_ai int
  2039. vec_all_eq(vector signed short __a, vector signed short __b) {
  2040. int __cc;
  2041. __builtin_s390_vceqhs(__a, __b, &__cc);
  2042. return __cc == 0;
  2043. }
  2044. // This prototype is deprecated.
  2045. static inline __ATTRS_o_ai int
  2046. vec_all_eq(vector signed short __a, vector bool short __b) {
  2047. int __cc;
  2048. __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc);
  2049. return __cc == 0;
  2050. }
  2051. // This prototype is deprecated.
  2052. static inline __ATTRS_o_ai int
  2053. vec_all_eq(vector bool short __a, vector signed short __b) {
  2054. int __cc;
  2055. __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc);
  2056. return __cc == 0;
  2057. }
  2058. static inline __ATTRS_o_ai int
  2059. vec_all_eq(vector unsigned short __a, vector unsigned short __b) {
  2060. int __cc;
  2061. __builtin_s390_vceqhs((vector signed short)__a,
  2062. (vector signed short)__b, &__cc);
  2063. return __cc == 0;
  2064. }
  2065. // This prototype is deprecated.
  2066. static inline __ATTRS_o_ai int
  2067. vec_all_eq(vector unsigned short __a, vector bool short __b) {
  2068. int __cc;
  2069. __builtin_s390_vceqhs((vector signed short)__a,
  2070. (vector signed short)__b, &__cc);
  2071. return __cc == 0;
  2072. }
  2073. // This prototype is deprecated.
  2074. static inline __ATTRS_o_ai int
  2075. vec_all_eq(vector bool short __a, vector unsigned short __b) {
  2076. int __cc;
  2077. __builtin_s390_vceqhs((vector signed short)__a,
  2078. (vector signed short)__b, &__cc);
  2079. return __cc == 0;
  2080. }
  2081. static inline __ATTRS_o_ai int
  2082. vec_all_eq(vector bool short __a, vector bool short __b) {
  2083. int __cc;
  2084. __builtin_s390_vceqhs((vector signed short)__a,
  2085. (vector signed short)__b, &__cc);
  2086. return __cc == 0;
  2087. }
  2088. static inline __ATTRS_o_ai int
  2089. vec_all_eq(vector signed int __a, vector signed int __b) {
  2090. int __cc;
  2091. __builtin_s390_vceqfs(__a, __b, &__cc);
  2092. return __cc == 0;
  2093. }
  2094. // This prototype is deprecated.
  2095. static inline __ATTRS_o_ai int
  2096. vec_all_eq(vector signed int __a, vector bool int __b) {
  2097. int __cc;
  2098. __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc);
  2099. return __cc == 0;
  2100. }
  2101. // This prototype is deprecated.
  2102. static inline __ATTRS_o_ai int
  2103. vec_all_eq(vector bool int __a, vector signed int __b) {
  2104. int __cc;
  2105. __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc);
  2106. return __cc == 0;
  2107. }
  2108. static inline __ATTRS_o_ai int
  2109. vec_all_eq(vector unsigned int __a, vector unsigned int __b) {
  2110. int __cc;
  2111. __builtin_s390_vceqfs((vector signed int)__a,
  2112. (vector signed int)__b, &__cc);
  2113. return __cc == 0;
  2114. }
  2115. // This prototype is deprecated.
  2116. static inline __ATTRS_o_ai int
  2117. vec_all_eq(vector unsigned int __a, vector bool int __b) {
  2118. int __cc;
  2119. __builtin_s390_vceqfs((vector signed int)__a,
  2120. (vector signed int)__b, &__cc);
  2121. return __cc == 0;
  2122. }
  2123. // This prototype is deprecated.
  2124. static inline __ATTRS_o_ai int
  2125. vec_all_eq(vector bool int __a, vector unsigned int __b) {
  2126. int __cc;
  2127. __builtin_s390_vceqfs((vector signed int)__a,
  2128. (vector signed int)__b, &__cc);
  2129. return __cc == 0;
  2130. }
  2131. static inline __ATTRS_o_ai int
  2132. vec_all_eq(vector bool int __a, vector bool int __b) {
  2133. int __cc;
  2134. __builtin_s390_vceqfs((vector signed int)__a,
  2135. (vector signed int)__b, &__cc);
  2136. return __cc == 0;
  2137. }
  2138. static inline __ATTRS_o_ai int
  2139. vec_all_eq(vector signed long long __a, vector signed long long __b) {
  2140. int __cc;
  2141. __builtin_s390_vceqgs(__a, __b, &__cc);
  2142. return __cc == 0;
  2143. }
  2144. // This prototype is deprecated.
  2145. static inline __ATTRS_o_ai int
  2146. vec_all_eq(vector signed long long __a, vector bool long long __b) {
  2147. int __cc;
  2148. __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc);
  2149. return __cc == 0;
  2150. }
  2151. // This prototype is deprecated.
  2152. static inline __ATTRS_o_ai int
  2153. vec_all_eq(vector bool long long __a, vector signed long long __b) {
  2154. int __cc;
  2155. __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc);
  2156. return __cc == 0;
  2157. }
  2158. static inline __ATTRS_o_ai int
  2159. vec_all_eq(vector unsigned long long __a, vector unsigned long long __b) {
  2160. int __cc;
  2161. __builtin_s390_vceqgs((vector signed long long)__a,
  2162. (vector signed long long)__b, &__cc);
  2163. return __cc == 0;
  2164. }
  2165. // This prototype is deprecated.
  2166. static inline __ATTRS_o_ai int
  2167. vec_all_eq(vector unsigned long long __a, vector bool long long __b) {
  2168. int __cc;
  2169. __builtin_s390_vceqgs((vector signed long long)__a,
  2170. (vector signed long long)__b, &__cc);
  2171. return __cc == 0;
  2172. }
  2173. // This prototype is deprecated.
  2174. static inline __ATTRS_o_ai int
  2175. vec_all_eq(vector bool long long __a, vector unsigned long long __b) {
  2176. int __cc;
  2177. __builtin_s390_vceqgs((vector signed long long)__a,
  2178. (vector signed long long)__b, &__cc);
  2179. return __cc == 0;
  2180. }
  2181. static inline __ATTRS_o_ai int
  2182. vec_all_eq(vector bool long long __a, vector bool long long __b) {
  2183. int __cc;
  2184. __builtin_s390_vceqgs((vector signed long long)__a,
  2185. (vector signed long long)__b, &__cc);
  2186. return __cc == 0;
  2187. }
  2188. #if __ARCH__ >= 12
  2189. static inline __ATTRS_o_ai int
  2190. vec_all_eq(vector float __a, vector float __b) {
  2191. int __cc;
  2192. __builtin_s390_vfcesbs(__a, __b, &__cc);
  2193. return __cc == 0;
  2194. }
  2195. #endif
  2196. static inline __ATTRS_o_ai int
  2197. vec_all_eq(vector double __a, vector double __b) {
  2198. int __cc;
  2199. __builtin_s390_vfcedbs(__a, __b, &__cc);
  2200. return __cc == 0;
  2201. }
  2202. /*-- vec_all_ne -------------------------------------------------------------*/
  2203. static inline __ATTRS_o_ai int
  2204. vec_all_ne(vector signed char __a, vector signed char __b) {
  2205. int __cc;
  2206. __builtin_s390_vceqbs(__a, __b, &__cc);
  2207. return __cc == 3;
  2208. }
  2209. // This prototype is deprecated.
  2210. static inline __ATTRS_o_ai int
  2211. vec_all_ne(vector signed char __a, vector bool char __b) {
  2212. int __cc;
  2213. __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc);
  2214. return __cc == 3;
  2215. }
  2216. // This prototype is deprecated.
  2217. static inline __ATTRS_o_ai int
  2218. vec_all_ne(vector bool char __a, vector signed char __b) {
  2219. int __cc;
  2220. __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc);
  2221. return __cc == 3;
  2222. }
  2223. static inline __ATTRS_o_ai int
  2224. vec_all_ne(vector unsigned char __a, vector unsigned char __b) {
  2225. int __cc;
  2226. __builtin_s390_vceqbs((vector signed char)__a,
  2227. (vector signed char)__b, &__cc);
  2228. return __cc == 3;
  2229. }
  2230. // This prototype is deprecated.
  2231. static inline __ATTRS_o_ai int
  2232. vec_all_ne(vector unsigned char __a, vector bool char __b) {
  2233. int __cc;
  2234. __builtin_s390_vceqbs((vector signed char)__a,
  2235. (vector signed char)__b, &__cc);
  2236. return __cc == 3;
  2237. }
  2238. // This prototype is deprecated.
  2239. static inline __ATTRS_o_ai int
  2240. vec_all_ne(vector bool char __a, vector unsigned char __b) {
  2241. int __cc;
  2242. __builtin_s390_vceqbs((vector signed char)__a,
  2243. (vector signed char)__b, &__cc);
  2244. return __cc == 3;
  2245. }
  2246. static inline __ATTRS_o_ai int
  2247. vec_all_ne(vector bool char __a, vector bool char __b) {
  2248. int __cc;
  2249. __builtin_s390_vceqbs((vector signed char)__a,
  2250. (vector signed char)__b, &__cc);
  2251. return __cc == 3;
  2252. }
  2253. static inline __ATTRS_o_ai int
  2254. vec_all_ne(vector signed short __a, vector signed short __b) {
  2255. int __cc;
  2256. __builtin_s390_vceqhs(__a, __b, &__cc);
  2257. return __cc == 3;
  2258. }
  2259. // This prototype is deprecated.
  2260. static inline __ATTRS_o_ai int
  2261. vec_all_ne(vector signed short __a, vector bool short __b) {
  2262. int __cc;
  2263. __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc);
  2264. return __cc == 3;
  2265. }
  2266. // This prototype is deprecated.
  2267. static inline __ATTRS_o_ai int
  2268. vec_all_ne(vector bool short __a, vector signed short __b) {
  2269. int __cc;
  2270. __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc);
  2271. return __cc == 3;
  2272. }
  2273. static inline __ATTRS_o_ai int
  2274. vec_all_ne(vector unsigned short __a, vector unsigned short __b) {
  2275. int __cc;
  2276. __builtin_s390_vceqhs((vector signed short)__a,
  2277. (vector signed short)__b, &__cc);
  2278. return __cc == 3;
  2279. }
  2280. // This prototype is deprecated.
  2281. static inline __ATTRS_o_ai int
  2282. vec_all_ne(vector unsigned short __a, vector bool short __b) {
  2283. int __cc;
  2284. __builtin_s390_vceqhs((vector signed short)__a,
  2285. (vector signed short)__b, &__cc);
  2286. return __cc == 3;
  2287. }
  2288. // This prototype is deprecated.
  2289. static inline __ATTRS_o_ai int
  2290. vec_all_ne(vector bool short __a, vector unsigned short __b) {
  2291. int __cc;
  2292. __builtin_s390_vceqhs((vector signed short)__a,
  2293. (vector signed short)__b, &__cc);
  2294. return __cc == 3;
  2295. }
  2296. static inline __ATTRS_o_ai int
  2297. vec_all_ne(vector bool short __a, vector bool short __b) {
  2298. int __cc;
  2299. __builtin_s390_vceqhs((vector signed short)__a,
  2300. (vector signed short)__b, &__cc);
  2301. return __cc == 3;
  2302. }
  2303. static inline __ATTRS_o_ai int
  2304. vec_all_ne(vector signed int __a, vector signed int __b) {
  2305. int __cc;
  2306. __builtin_s390_vceqfs(__a, __b, &__cc);
  2307. return __cc == 3;
  2308. }
  2309. // This prototype is deprecated.
  2310. static inline __ATTRS_o_ai int
  2311. vec_all_ne(vector signed int __a, vector bool int __b) {
  2312. int __cc;
  2313. __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc);
  2314. return __cc == 3;
  2315. }
  2316. // This prototype is deprecated.
  2317. static inline __ATTRS_o_ai int
  2318. vec_all_ne(vector bool int __a, vector signed int __b) {
  2319. int __cc;
  2320. __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc);
  2321. return __cc == 3;
  2322. }
  2323. static inline __ATTRS_o_ai int
  2324. vec_all_ne(vector unsigned int __a, vector unsigned int __b) {
  2325. int __cc;
  2326. __builtin_s390_vceqfs((vector signed int)__a,
  2327. (vector signed int)__b, &__cc);
  2328. return __cc == 3;
  2329. }
  2330. // This prototype is deprecated.
  2331. static inline __ATTRS_o_ai int
  2332. vec_all_ne(vector unsigned int __a, vector bool int __b) {
  2333. int __cc;
  2334. __builtin_s390_vceqfs((vector signed int)__a,
  2335. (vector signed int)__b, &__cc);
  2336. return __cc == 3;
  2337. }
  2338. // This prototype is deprecated.
  2339. static inline __ATTRS_o_ai int
  2340. vec_all_ne(vector bool int __a, vector unsigned int __b) {
  2341. int __cc;
  2342. __builtin_s390_vceqfs((vector signed int)__a,
  2343. (vector signed int)__b, &__cc);
  2344. return __cc == 3;
  2345. }
  2346. static inline __ATTRS_o_ai int
  2347. vec_all_ne(vector bool int __a, vector bool int __b) {
  2348. int __cc;
  2349. __builtin_s390_vceqfs((vector signed int)__a,
  2350. (vector signed int)__b, &__cc);
  2351. return __cc == 3;
  2352. }
  2353. static inline __ATTRS_o_ai int
  2354. vec_all_ne(vector signed long long __a, vector signed long long __b) {
  2355. int __cc;
  2356. __builtin_s390_vceqgs(__a, __b, &__cc);
  2357. return __cc == 3;
  2358. }
  2359. // This prototype is deprecated.
  2360. static inline __ATTRS_o_ai int
  2361. vec_all_ne(vector signed long long __a, vector bool long long __b) {
  2362. int __cc;
  2363. __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc);
  2364. return __cc == 3;
  2365. }
  2366. // This prototype is deprecated.
  2367. static inline __ATTRS_o_ai int
  2368. vec_all_ne(vector bool long long __a, vector signed long long __b) {
  2369. int __cc;
  2370. __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc);
  2371. return __cc == 3;
  2372. }
  2373. static inline __ATTRS_o_ai int
  2374. vec_all_ne(vector unsigned long long __a, vector unsigned long long __b) {
  2375. int __cc;
  2376. __builtin_s390_vceqgs((vector signed long long)__a,
  2377. (vector signed long long)__b, &__cc);
  2378. return __cc == 3;
  2379. }
  2380. // This prototype is deprecated.
  2381. static inline __ATTRS_o_ai int
  2382. vec_all_ne(vector unsigned long long __a, vector bool long long __b) {
  2383. int __cc;
  2384. __builtin_s390_vceqgs((vector signed long long)__a,
  2385. (vector signed long long)__b, &__cc);
  2386. return __cc == 3;
  2387. }
  2388. // This prototype is deprecated.
  2389. static inline __ATTRS_o_ai int
  2390. vec_all_ne(vector bool long long __a, vector unsigned long long __b) {
  2391. int __cc;
  2392. __builtin_s390_vceqgs((vector signed long long)__a,
  2393. (vector signed long long)__b, &__cc);
  2394. return __cc == 3;
  2395. }
  2396. static inline __ATTRS_o_ai int
  2397. vec_all_ne(vector bool long long __a, vector bool long long __b) {
  2398. int __cc;
  2399. __builtin_s390_vceqgs((vector signed long long)__a,
  2400. (vector signed long long)__b, &__cc);
  2401. return __cc == 3;
  2402. }
  2403. #if __ARCH__ >= 12
  2404. static inline __ATTRS_o_ai int
  2405. vec_all_ne(vector float __a, vector float __b) {
  2406. int __cc;
  2407. __builtin_s390_vfcesbs(__a, __b, &__cc);
  2408. return __cc == 3;
  2409. }
  2410. #endif
  2411. static inline __ATTRS_o_ai int
  2412. vec_all_ne(vector double __a, vector double __b) {
  2413. int __cc;
  2414. __builtin_s390_vfcedbs(__a, __b, &__cc);
  2415. return __cc == 3;
  2416. }
  2417. /*-- vec_all_ge -------------------------------------------------------------*/
  2418. static inline __ATTRS_o_ai int
  2419. vec_all_ge(vector signed char __a, vector signed char __b) {
  2420. int __cc;
  2421. __builtin_s390_vchbs(__b, __a, &__cc);
  2422. return __cc == 3;
  2423. }
  2424. // This prototype is deprecated.
  2425. static inline __ATTRS_o_ai int
  2426. vec_all_ge(vector signed char __a, vector bool char __b) {
  2427. int __cc;
  2428. __builtin_s390_vchbs((vector signed char)__b, __a, &__cc);
  2429. return __cc == 3;
  2430. }
  2431. // This prototype is deprecated.
  2432. static inline __ATTRS_o_ai int
  2433. vec_all_ge(vector bool char __a, vector signed char __b) {
  2434. int __cc;
  2435. __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc);
  2436. return __cc == 3;
  2437. }
  2438. static inline __ATTRS_o_ai int
  2439. vec_all_ge(vector unsigned char __a, vector unsigned char __b) {
  2440. int __cc;
  2441. __builtin_s390_vchlbs(__b, __a, &__cc);
  2442. return __cc == 3;
  2443. }
  2444. // This prototype is deprecated.
  2445. static inline __ATTRS_o_ai int
  2446. vec_all_ge(vector unsigned char __a, vector bool char __b) {
  2447. int __cc;
  2448. __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc);
  2449. return __cc == 3;
  2450. }
  2451. // This prototype is deprecated.
  2452. static inline __ATTRS_o_ai int
  2453. vec_all_ge(vector bool char __a, vector unsigned char __b) {
  2454. int __cc;
  2455. __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc);
  2456. return __cc == 3;
  2457. }
  2458. // This prototype is deprecated.
  2459. static inline __ATTRS_o_ai int
  2460. vec_all_ge(vector bool char __a, vector bool char __b) {
  2461. int __cc;
  2462. __builtin_s390_vchlbs((vector unsigned char)__b,
  2463. (vector unsigned char)__a, &__cc);
  2464. return __cc == 3;
  2465. }
  2466. static inline __ATTRS_o_ai int
  2467. vec_all_ge(vector signed short __a, vector signed short __b) {
  2468. int __cc;
  2469. __builtin_s390_vchhs(__b, __a, &__cc);
  2470. return __cc == 3;
  2471. }
  2472. // This prototype is deprecated.
  2473. static inline __ATTRS_o_ai int
  2474. vec_all_ge(vector signed short __a, vector bool short __b) {
  2475. int __cc;
  2476. __builtin_s390_vchhs((vector signed short)__b, __a, &__cc);
  2477. return __cc == 3;
  2478. }
  2479. // This prototype is deprecated.
  2480. static inline __ATTRS_o_ai int
  2481. vec_all_ge(vector bool short __a, vector signed short __b) {
  2482. int __cc;
  2483. __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc);
  2484. return __cc == 3;
  2485. }
  2486. static inline __ATTRS_o_ai int
  2487. vec_all_ge(vector unsigned short __a, vector unsigned short __b) {
  2488. int __cc;
  2489. __builtin_s390_vchlhs(__b, __a, &__cc);
  2490. return __cc == 3;
  2491. }
  2492. // This prototype is deprecated.
  2493. static inline __ATTRS_o_ai int
  2494. vec_all_ge(vector unsigned short __a, vector bool short __b) {
  2495. int __cc;
  2496. __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc);
  2497. return __cc == 3;
  2498. }
  2499. // This prototype is deprecated.
  2500. static inline __ATTRS_o_ai int
  2501. vec_all_ge(vector bool short __a, vector unsigned short __b) {
  2502. int __cc;
  2503. __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc);
  2504. return __cc == 3;
  2505. }
  2506. // This prototype is deprecated.
  2507. static inline __ATTRS_o_ai int
  2508. vec_all_ge(vector bool short __a, vector bool short __b) {
  2509. int __cc;
  2510. __builtin_s390_vchlhs((vector unsigned short)__b,
  2511. (vector unsigned short)__a, &__cc);
  2512. return __cc == 3;
  2513. }
  2514. static inline __ATTRS_o_ai int
  2515. vec_all_ge(vector signed int __a, vector signed int __b) {
  2516. int __cc;
  2517. __builtin_s390_vchfs(__b, __a, &__cc);
  2518. return __cc == 3;
  2519. }
  2520. // This prototype is deprecated.
  2521. static inline __ATTRS_o_ai int
  2522. vec_all_ge(vector signed int __a, vector bool int __b) {
  2523. int __cc;
  2524. __builtin_s390_vchfs((vector signed int)__b, __a, &__cc);
  2525. return __cc == 3;
  2526. }
  2527. // This prototype is deprecated.
  2528. static inline __ATTRS_o_ai int
  2529. vec_all_ge(vector bool int __a, vector signed int __b) {
  2530. int __cc;
  2531. __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc);
  2532. return __cc == 3;
  2533. }
  2534. static inline __ATTRS_o_ai int
  2535. vec_all_ge(vector unsigned int __a, vector unsigned int __b) {
  2536. int __cc;
  2537. __builtin_s390_vchlfs(__b, __a, &__cc);
  2538. return __cc == 3;
  2539. }
  2540. // This prototype is deprecated.
  2541. static inline __ATTRS_o_ai int
  2542. vec_all_ge(vector unsigned int __a, vector bool int __b) {
  2543. int __cc;
  2544. __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc);
  2545. return __cc == 3;
  2546. }
  2547. // This prototype is deprecated.
  2548. static inline __ATTRS_o_ai int
  2549. vec_all_ge(vector bool int __a, vector unsigned int __b) {
  2550. int __cc;
  2551. __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc);
  2552. return __cc == 3;
  2553. }
  2554. // This prototype is deprecated.
  2555. static inline __ATTRS_o_ai int
  2556. vec_all_ge(vector bool int __a, vector bool int __b) {
  2557. int __cc;
  2558. __builtin_s390_vchlfs((vector unsigned int)__b,
  2559. (vector unsigned int)__a, &__cc);
  2560. return __cc == 3;
  2561. }
  2562. static inline __ATTRS_o_ai int
  2563. vec_all_ge(vector signed long long __a, vector signed long long __b) {
  2564. int __cc;
  2565. __builtin_s390_vchgs(__b, __a, &__cc);
  2566. return __cc == 3;
  2567. }
  2568. // This prototype is deprecated.
  2569. static inline __ATTRS_o_ai int
  2570. vec_all_ge(vector signed long long __a, vector bool long long __b) {
  2571. int __cc;
  2572. __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc);
  2573. return __cc == 3;
  2574. }
  2575. // This prototype is deprecated.
  2576. static inline __ATTRS_o_ai int
  2577. vec_all_ge(vector bool long long __a, vector signed long long __b) {
  2578. int __cc;
  2579. __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc);
  2580. return __cc == 3;
  2581. }
  2582. static inline __ATTRS_o_ai int
  2583. vec_all_ge(vector unsigned long long __a, vector unsigned long long __b) {
  2584. int __cc;
  2585. __builtin_s390_vchlgs(__b, __a, &__cc);
  2586. return __cc == 3;
  2587. }
  2588. // This prototype is deprecated.
  2589. static inline __ATTRS_o_ai int
  2590. vec_all_ge(vector unsigned long long __a, vector bool long long __b) {
  2591. int __cc;
  2592. __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc);
  2593. return __cc == 3;
  2594. }
  2595. // This prototype is deprecated.
  2596. static inline __ATTRS_o_ai int
  2597. vec_all_ge(vector bool long long __a, vector unsigned long long __b) {
  2598. int __cc;
  2599. __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc);
  2600. return __cc == 3;
  2601. }
  2602. // This prototype is deprecated.
  2603. static inline __ATTRS_o_ai int
  2604. vec_all_ge(vector bool long long __a, vector bool long long __b) {
  2605. int __cc;
  2606. __builtin_s390_vchlgs((vector unsigned long long)__b,
  2607. (vector unsigned long long)__a, &__cc);
  2608. return __cc == 3;
  2609. }
  2610. #if __ARCH__ >= 12
  2611. static inline __ATTRS_o_ai int
  2612. vec_all_ge(vector float __a, vector float __b) {
  2613. int __cc;
  2614. __builtin_s390_vfchesbs(__a, __b, &__cc);
  2615. return __cc == 0;
  2616. }
  2617. #endif
  2618. static inline __ATTRS_o_ai int
  2619. vec_all_ge(vector double __a, vector double __b) {
  2620. int __cc;
  2621. __builtin_s390_vfchedbs(__a, __b, &__cc);
  2622. return __cc == 0;
  2623. }
  2624. /*-- vec_all_gt -------------------------------------------------------------*/
  2625. static inline __ATTRS_o_ai int
  2626. vec_all_gt(vector signed char __a, vector signed char __b) {
  2627. int __cc;
  2628. __builtin_s390_vchbs(__a, __b, &__cc);
  2629. return __cc == 0;
  2630. }
  2631. // This prototype is deprecated.
  2632. static inline __ATTRS_o_ai int
  2633. vec_all_gt(vector signed char __a, vector bool char __b) {
  2634. int __cc;
  2635. __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc);
  2636. return __cc == 0;
  2637. }
  2638. // This prototype is deprecated.
  2639. static inline __ATTRS_o_ai int
  2640. vec_all_gt(vector bool char __a, vector signed char __b) {
  2641. int __cc;
  2642. __builtin_s390_vchbs((vector signed char)__a, __b, &__cc);
  2643. return __cc == 0;
  2644. }
  2645. static inline __ATTRS_o_ai int
  2646. vec_all_gt(vector unsigned char __a, vector unsigned char __b) {
  2647. int __cc;
  2648. __builtin_s390_vchlbs(__a, __b, &__cc);
  2649. return __cc == 0;
  2650. }
  2651. // This prototype is deprecated.
  2652. static inline __ATTRS_o_ai int
  2653. vec_all_gt(vector unsigned char __a, vector bool char __b) {
  2654. int __cc;
  2655. __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc);
  2656. return __cc == 0;
  2657. }
  2658. // This prototype is deprecated.
  2659. static inline __ATTRS_o_ai int
  2660. vec_all_gt(vector bool char __a, vector unsigned char __b) {
  2661. int __cc;
  2662. __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc);
  2663. return __cc == 0;
  2664. }
  2665. // This prototype is deprecated.
  2666. static inline __ATTRS_o_ai int
  2667. vec_all_gt(vector bool char __a, vector bool char __b) {
  2668. int __cc;
  2669. __builtin_s390_vchlbs((vector unsigned char)__a,
  2670. (vector unsigned char)__b, &__cc);
  2671. return __cc == 0;
  2672. }
  2673. static inline __ATTRS_o_ai int
  2674. vec_all_gt(vector signed short __a, vector signed short __b) {
  2675. int __cc;
  2676. __builtin_s390_vchhs(__a, __b, &__cc);
  2677. return __cc == 0;
  2678. }
  2679. // This prototype is deprecated.
  2680. static inline __ATTRS_o_ai int
  2681. vec_all_gt(vector signed short __a, vector bool short __b) {
  2682. int __cc;
  2683. __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc);
  2684. return __cc == 0;
  2685. }
  2686. // This prototype is deprecated.
  2687. static inline __ATTRS_o_ai int
  2688. vec_all_gt(vector bool short __a, vector signed short __b) {
  2689. int __cc;
  2690. __builtin_s390_vchhs((vector signed short)__a, __b, &__cc);
  2691. return __cc == 0;
  2692. }
  2693. static inline __ATTRS_o_ai int
  2694. vec_all_gt(vector unsigned short __a, vector unsigned short __b) {
  2695. int __cc;
  2696. __builtin_s390_vchlhs(__a, __b, &__cc);
  2697. return __cc == 0;
  2698. }
  2699. // This prototype is deprecated.
  2700. static inline __ATTRS_o_ai int
  2701. vec_all_gt(vector unsigned short __a, vector bool short __b) {
  2702. int __cc;
  2703. __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc);
  2704. return __cc == 0;
  2705. }
  2706. // This prototype is deprecated.
  2707. static inline __ATTRS_o_ai int
  2708. vec_all_gt(vector bool short __a, vector unsigned short __b) {
  2709. int __cc;
  2710. __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc);
  2711. return __cc == 0;
  2712. }
  2713. // This prototype is deprecated.
  2714. static inline __ATTRS_o_ai int
  2715. vec_all_gt(vector bool short __a, vector bool short __b) {
  2716. int __cc;
  2717. __builtin_s390_vchlhs((vector unsigned short)__a,
  2718. (vector unsigned short)__b, &__cc);
  2719. return __cc == 0;
  2720. }
  2721. static inline __ATTRS_o_ai int
  2722. vec_all_gt(vector signed int __a, vector signed int __b) {
  2723. int __cc;
  2724. __builtin_s390_vchfs(__a, __b, &__cc);
  2725. return __cc == 0;
  2726. }
  2727. // This prototype is deprecated.
  2728. static inline __ATTRS_o_ai int
  2729. vec_all_gt(vector signed int __a, vector bool int __b) {
  2730. int __cc;
  2731. __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc);
  2732. return __cc == 0;
  2733. }
  2734. // This prototype is deprecated.
  2735. static inline __ATTRS_o_ai int
  2736. vec_all_gt(vector bool int __a, vector signed int __b) {
  2737. int __cc;
  2738. __builtin_s390_vchfs((vector signed int)__a, __b, &__cc);
  2739. return __cc == 0;
  2740. }
  2741. static inline __ATTRS_o_ai int
  2742. vec_all_gt(vector unsigned int __a, vector unsigned int __b) {
  2743. int __cc;
  2744. __builtin_s390_vchlfs(__a, __b, &__cc);
  2745. return __cc == 0;
  2746. }
  2747. // This prototype is deprecated.
  2748. static inline __ATTRS_o_ai int
  2749. vec_all_gt(vector unsigned int __a, vector bool int __b) {
  2750. int __cc;
  2751. __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc);
  2752. return __cc == 0;
  2753. }
  2754. // This prototype is deprecated.
  2755. static inline __ATTRS_o_ai int
  2756. vec_all_gt(vector bool int __a, vector unsigned int __b) {
  2757. int __cc;
  2758. __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc);
  2759. return __cc == 0;
  2760. }
  2761. // This prototype is deprecated.
  2762. static inline __ATTRS_o_ai int
  2763. vec_all_gt(vector bool int __a, vector bool int __b) {
  2764. int __cc;
  2765. __builtin_s390_vchlfs((vector unsigned int)__a,
  2766. (vector unsigned int)__b, &__cc);
  2767. return __cc == 0;
  2768. }
  2769. static inline __ATTRS_o_ai int
  2770. vec_all_gt(vector signed long long __a, vector signed long long __b) {
  2771. int __cc;
  2772. __builtin_s390_vchgs(__a, __b, &__cc);
  2773. return __cc == 0;
  2774. }
  2775. // This prototype is deprecated.
  2776. static inline __ATTRS_o_ai int
  2777. vec_all_gt(vector signed long long __a, vector bool long long __b) {
  2778. int __cc;
  2779. __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc);
  2780. return __cc == 0;
  2781. }
  2782. // This prototype is deprecated.
  2783. static inline __ATTRS_o_ai int
  2784. vec_all_gt(vector bool long long __a, vector signed long long __b) {
  2785. int __cc;
  2786. __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc);
  2787. return __cc == 0;
  2788. }
  2789. static inline __ATTRS_o_ai int
  2790. vec_all_gt(vector unsigned long long __a, vector unsigned long long __b) {
  2791. int __cc;
  2792. __builtin_s390_vchlgs(__a, __b, &__cc);
  2793. return __cc == 0;
  2794. }
  2795. // This prototype is deprecated.
  2796. static inline __ATTRS_o_ai int
  2797. vec_all_gt(vector unsigned long long __a, vector bool long long __b) {
  2798. int __cc;
  2799. __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc);
  2800. return __cc == 0;
  2801. }
  2802. // This prototype is deprecated.
  2803. static inline __ATTRS_o_ai int
  2804. vec_all_gt(vector bool long long __a, vector unsigned long long __b) {
  2805. int __cc;
  2806. __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc);
  2807. return __cc == 0;
  2808. }
  2809. // This prototype is deprecated.
  2810. static inline __ATTRS_o_ai int
  2811. vec_all_gt(vector bool long long __a, vector bool long long __b) {
  2812. int __cc;
  2813. __builtin_s390_vchlgs((vector unsigned long long)__a,
  2814. (vector unsigned long long)__b, &__cc);
  2815. return __cc == 0;
  2816. }
  2817. #if __ARCH__ >= 12
  2818. static inline __ATTRS_o_ai int
  2819. vec_all_gt(vector float __a, vector float __b) {
  2820. int __cc;
  2821. __builtin_s390_vfchsbs(__a, __b, &__cc);
  2822. return __cc == 0;
  2823. }
  2824. #endif
  2825. static inline __ATTRS_o_ai int
  2826. vec_all_gt(vector double __a, vector double __b) {
  2827. int __cc;
  2828. __builtin_s390_vfchdbs(__a, __b, &__cc);
  2829. return __cc == 0;
  2830. }
  2831. /*-- vec_all_le -------------------------------------------------------------*/
  2832. static inline __ATTRS_o_ai int
  2833. vec_all_le(vector signed char __a, vector signed char __b) {
  2834. int __cc;
  2835. __builtin_s390_vchbs(__a, __b, &__cc);
  2836. return __cc == 3;
  2837. }
  2838. // This prototype is deprecated.
  2839. static inline __ATTRS_o_ai int
  2840. vec_all_le(vector signed char __a, vector bool char __b) {
  2841. int __cc;
  2842. __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc);
  2843. return __cc == 3;
  2844. }
  2845. // This prototype is deprecated.
  2846. static inline __ATTRS_o_ai int
  2847. vec_all_le(vector bool char __a, vector signed char __b) {
  2848. int __cc;
  2849. __builtin_s390_vchbs((vector signed char)__a, __b, &__cc);
  2850. return __cc == 3;
  2851. }
  2852. static inline __ATTRS_o_ai int
  2853. vec_all_le(vector unsigned char __a, vector unsigned char __b) {
  2854. int __cc;
  2855. __builtin_s390_vchlbs(__a, __b, &__cc);
  2856. return __cc == 3;
  2857. }
  2858. // This prototype is deprecated.
  2859. static inline __ATTRS_o_ai int
  2860. vec_all_le(vector unsigned char __a, vector bool char __b) {
  2861. int __cc;
  2862. __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc);
  2863. return __cc == 3;
  2864. }
  2865. // This prototype is deprecated.
  2866. static inline __ATTRS_o_ai int
  2867. vec_all_le(vector bool char __a, vector unsigned char __b) {
  2868. int __cc;
  2869. __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc);
  2870. return __cc == 3;
  2871. }
  2872. // This prototype is deprecated.
  2873. static inline __ATTRS_o_ai int
  2874. vec_all_le(vector bool char __a, vector bool char __b) {
  2875. int __cc;
  2876. __builtin_s390_vchlbs((vector unsigned char)__a,
  2877. (vector unsigned char)__b, &__cc);
  2878. return __cc == 3;
  2879. }
  2880. static inline __ATTRS_o_ai int
  2881. vec_all_le(vector signed short __a, vector signed short __b) {
  2882. int __cc;
  2883. __builtin_s390_vchhs(__a, __b, &__cc);
  2884. return __cc == 3;
  2885. }
  2886. // This prototype is deprecated.
  2887. static inline __ATTRS_o_ai int
  2888. vec_all_le(vector signed short __a, vector bool short __b) {
  2889. int __cc;
  2890. __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc);
  2891. return __cc == 3;
  2892. }
  2893. // This prototype is deprecated.
  2894. static inline __ATTRS_o_ai int
  2895. vec_all_le(vector bool short __a, vector signed short __b) {
  2896. int __cc;
  2897. __builtin_s390_vchhs((vector signed short)__a, __b, &__cc);
  2898. return __cc == 3;
  2899. }
  2900. static inline __ATTRS_o_ai int
  2901. vec_all_le(vector unsigned short __a, vector unsigned short __b) {
  2902. int __cc;
  2903. __builtin_s390_vchlhs(__a, __b, &__cc);
  2904. return __cc == 3;
  2905. }
  2906. // This prototype is deprecated.
  2907. static inline __ATTRS_o_ai int
  2908. vec_all_le(vector unsigned short __a, vector bool short __b) {
  2909. int __cc;
  2910. __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc);
  2911. return __cc == 3;
  2912. }
  2913. // This prototype is deprecated.
  2914. static inline __ATTRS_o_ai int
  2915. vec_all_le(vector bool short __a, vector unsigned short __b) {
  2916. int __cc;
  2917. __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc);
  2918. return __cc == 3;
  2919. }
  2920. // This prototype is deprecated.
  2921. static inline __ATTRS_o_ai int
  2922. vec_all_le(vector bool short __a, vector bool short __b) {
  2923. int __cc;
  2924. __builtin_s390_vchlhs((vector unsigned short)__a,
  2925. (vector unsigned short)__b, &__cc);
  2926. return __cc == 3;
  2927. }
  2928. static inline __ATTRS_o_ai int
  2929. vec_all_le(vector signed int __a, vector signed int __b) {
  2930. int __cc;
  2931. __builtin_s390_vchfs(__a, __b, &__cc);
  2932. return __cc == 3;
  2933. }
  2934. // This prototype is deprecated.
  2935. static inline __ATTRS_o_ai int
  2936. vec_all_le(vector signed int __a, vector bool int __b) {
  2937. int __cc;
  2938. __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc);
  2939. return __cc == 3;
  2940. }
  2941. // This prototype is deprecated.
  2942. static inline __ATTRS_o_ai int
  2943. vec_all_le(vector bool int __a, vector signed int __b) {
  2944. int __cc;
  2945. __builtin_s390_vchfs((vector signed int)__a, __b, &__cc);
  2946. return __cc == 3;
  2947. }
  2948. static inline __ATTRS_o_ai int
  2949. vec_all_le(vector unsigned int __a, vector unsigned int __b) {
  2950. int __cc;
  2951. __builtin_s390_vchlfs(__a, __b, &__cc);
  2952. return __cc == 3;
  2953. }
  2954. // This prototype is deprecated.
  2955. static inline __ATTRS_o_ai int
  2956. vec_all_le(vector unsigned int __a, vector bool int __b) {
  2957. int __cc;
  2958. __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc);
  2959. return __cc == 3;
  2960. }
  2961. // This prototype is deprecated.
  2962. static inline __ATTRS_o_ai int
  2963. vec_all_le(vector bool int __a, vector unsigned int __b) {
  2964. int __cc;
  2965. __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc);
  2966. return __cc == 3;
  2967. }
  2968. // This prototype is deprecated.
  2969. static inline __ATTRS_o_ai int
  2970. vec_all_le(vector bool int __a, vector bool int __b) {
  2971. int __cc;
  2972. __builtin_s390_vchlfs((vector unsigned int)__a,
  2973. (vector unsigned int)__b, &__cc);
  2974. return __cc == 3;
  2975. }
  2976. static inline __ATTRS_o_ai int
  2977. vec_all_le(vector signed long long __a, vector signed long long __b) {
  2978. int __cc;
  2979. __builtin_s390_vchgs(__a, __b, &__cc);
  2980. return __cc == 3;
  2981. }
  2982. // This prototype is deprecated.
  2983. static inline __ATTRS_o_ai int
  2984. vec_all_le(vector signed long long __a, vector bool long long __b) {
  2985. int __cc;
  2986. __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc);
  2987. return __cc == 3;
  2988. }
  2989. // This prototype is deprecated.
  2990. static inline __ATTRS_o_ai int
  2991. vec_all_le(vector bool long long __a, vector signed long long __b) {
  2992. int __cc;
  2993. __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc);
  2994. return __cc == 3;
  2995. }
  2996. static inline __ATTRS_o_ai int
  2997. vec_all_le(vector unsigned long long __a, vector unsigned long long __b) {
  2998. int __cc;
  2999. __builtin_s390_vchlgs(__a, __b, &__cc);
  3000. return __cc == 3;
  3001. }
  3002. // This prototype is deprecated.
  3003. static inline __ATTRS_o_ai int
  3004. vec_all_le(vector unsigned long long __a, vector bool long long __b) {
  3005. int __cc;
  3006. __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc);
  3007. return __cc == 3;
  3008. }
  3009. // This prototype is deprecated.
  3010. static inline __ATTRS_o_ai int
  3011. vec_all_le(vector bool long long __a, vector unsigned long long __b) {
  3012. int __cc;
  3013. __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc);
  3014. return __cc == 3;
  3015. }
  3016. // This prototype is deprecated.
  3017. static inline __ATTRS_o_ai int
  3018. vec_all_le(vector bool long long __a, vector bool long long __b) {
  3019. int __cc;
  3020. __builtin_s390_vchlgs((vector unsigned long long)__a,
  3021. (vector unsigned long long)__b, &__cc);
  3022. return __cc == 3;
  3023. }
  3024. #if __ARCH__ >= 12
  3025. static inline __ATTRS_o_ai int
  3026. vec_all_le(vector float __a, vector float __b) {
  3027. int __cc;
  3028. __builtin_s390_vfchesbs(__b, __a, &__cc);
  3029. return __cc == 0;
  3030. }
  3031. #endif
  3032. static inline __ATTRS_o_ai int
  3033. vec_all_le(vector double __a, vector double __b) {
  3034. int __cc;
  3035. __builtin_s390_vfchedbs(__b, __a, &__cc);
  3036. return __cc == 0;
  3037. }
  3038. /*-- vec_all_lt -------------------------------------------------------------*/
  3039. static inline __ATTRS_o_ai int
  3040. vec_all_lt(vector signed char __a, vector signed char __b) {
  3041. int __cc;
  3042. __builtin_s390_vchbs(__b, __a, &__cc);
  3043. return __cc == 0;
  3044. }
  3045. // This prototype is deprecated.
  3046. static inline __ATTRS_o_ai int
  3047. vec_all_lt(vector signed char __a, vector bool char __b) {
  3048. int __cc;
  3049. __builtin_s390_vchbs((vector signed char)__b, __a, &__cc);
  3050. return __cc == 0;
  3051. }
  3052. // This prototype is deprecated.
  3053. static inline __ATTRS_o_ai int
  3054. vec_all_lt(vector bool char __a, vector signed char __b) {
  3055. int __cc;
  3056. __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc);
  3057. return __cc == 0;
  3058. }
  3059. static inline __ATTRS_o_ai int
  3060. vec_all_lt(vector unsigned char __a, vector unsigned char __b) {
  3061. int __cc;
  3062. __builtin_s390_vchlbs(__b, __a, &__cc);
  3063. return __cc == 0;
  3064. }
  3065. // This prototype is deprecated.
  3066. static inline __ATTRS_o_ai int
  3067. vec_all_lt(vector unsigned char __a, vector bool char __b) {
  3068. int __cc;
  3069. __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc);
  3070. return __cc == 0;
  3071. }
  3072. // This prototype is deprecated.
  3073. static inline __ATTRS_o_ai int
  3074. vec_all_lt(vector bool char __a, vector unsigned char __b) {
  3075. int __cc;
  3076. __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc);
  3077. return __cc == 0;
  3078. }
  3079. // This prototype is deprecated.
  3080. static inline __ATTRS_o_ai int
  3081. vec_all_lt(vector bool char __a, vector bool char __b) {
  3082. int __cc;
  3083. __builtin_s390_vchlbs((vector unsigned char)__b,
  3084. (vector unsigned char)__a, &__cc);
  3085. return __cc == 0;
  3086. }
  3087. static inline __ATTRS_o_ai int
  3088. vec_all_lt(vector signed short __a, vector signed short __b) {
  3089. int __cc;
  3090. __builtin_s390_vchhs(__b, __a, &__cc);
  3091. return __cc == 0;
  3092. }
  3093. // This prototype is deprecated.
  3094. static inline __ATTRS_o_ai int
  3095. vec_all_lt(vector signed short __a, vector bool short __b) {
  3096. int __cc;
  3097. __builtin_s390_vchhs((vector signed short)__b, __a, &__cc);
  3098. return __cc == 0;
  3099. }
  3100. // This prototype is deprecated.
  3101. static inline __ATTRS_o_ai int
  3102. vec_all_lt(vector bool short __a, vector signed short __b) {
  3103. int __cc;
  3104. __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc);
  3105. return __cc == 0;
  3106. }
  3107. static inline __ATTRS_o_ai int
  3108. vec_all_lt(vector unsigned short __a, vector unsigned short __b) {
  3109. int __cc;
  3110. __builtin_s390_vchlhs(__b, __a, &__cc);
  3111. return __cc == 0;
  3112. }
  3113. // This prototype is deprecated.
  3114. static inline __ATTRS_o_ai int
  3115. vec_all_lt(vector unsigned short __a, vector bool short __b) {
  3116. int __cc;
  3117. __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc);
  3118. return __cc == 0;
  3119. }
  3120. // This prototype is deprecated.
  3121. static inline __ATTRS_o_ai int
  3122. vec_all_lt(vector bool short __a, vector unsigned short __b) {
  3123. int __cc;
  3124. __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc);
  3125. return __cc == 0;
  3126. }
  3127. // This prototype is deprecated.
  3128. static inline __ATTRS_o_ai int
  3129. vec_all_lt(vector bool short __a, vector bool short __b) {
  3130. int __cc;
  3131. __builtin_s390_vchlhs((vector unsigned short)__b,
  3132. (vector unsigned short)__a, &__cc);
  3133. return __cc == 0;
  3134. }
  3135. static inline __ATTRS_o_ai int
  3136. vec_all_lt(vector signed int __a, vector signed int __b) {
  3137. int __cc;
  3138. __builtin_s390_vchfs(__b, __a, &__cc);
  3139. return __cc == 0;
  3140. }
  3141. // This prototype is deprecated.
  3142. static inline __ATTRS_o_ai int
  3143. vec_all_lt(vector signed int __a, vector bool int __b) {
  3144. int __cc;
  3145. __builtin_s390_vchfs((vector signed int)__b, __a, &__cc);
  3146. return __cc == 0;
  3147. }
  3148. // This prototype is deprecated.
  3149. static inline __ATTRS_o_ai int
  3150. vec_all_lt(vector bool int __a, vector signed int __b) {
  3151. int __cc;
  3152. __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc);
  3153. return __cc == 0;
  3154. }
  3155. static inline __ATTRS_o_ai int
  3156. vec_all_lt(vector unsigned int __a, vector unsigned int __b) {
  3157. int __cc;
  3158. __builtin_s390_vchlfs(__b, __a, &__cc);
  3159. return __cc == 0;
  3160. }
  3161. // This prototype is deprecated.
  3162. static inline __ATTRS_o_ai int
  3163. vec_all_lt(vector unsigned int __a, vector bool int __b) {
  3164. int __cc;
  3165. __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc);
  3166. return __cc == 0;
  3167. }
  3168. // This prototype is deprecated.
  3169. static inline __ATTRS_o_ai int
  3170. vec_all_lt(vector bool int __a, vector unsigned int __b) {
  3171. int __cc;
  3172. __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc);
  3173. return __cc == 0;
  3174. }
  3175. // This prototype is deprecated.
  3176. static inline __ATTRS_o_ai int
  3177. vec_all_lt(vector bool int __a, vector bool int __b) {
  3178. int __cc;
  3179. __builtin_s390_vchlfs((vector unsigned int)__b,
  3180. (vector unsigned int)__a, &__cc);
  3181. return __cc == 0;
  3182. }
  3183. static inline __ATTRS_o_ai int
  3184. vec_all_lt(vector signed long long __a, vector signed long long __b) {
  3185. int __cc;
  3186. __builtin_s390_vchgs(__b, __a, &__cc);
  3187. return __cc == 0;
  3188. }
  3189. // This prototype is deprecated.
  3190. static inline __ATTRS_o_ai int
  3191. vec_all_lt(vector signed long long __a, vector bool long long __b) {
  3192. int __cc;
  3193. __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc);
  3194. return __cc == 0;
  3195. }
  3196. // This prototype is deprecated.
  3197. static inline __ATTRS_o_ai int
  3198. vec_all_lt(vector bool long long __a, vector signed long long __b) {
  3199. int __cc;
  3200. __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc);
  3201. return __cc == 0;
  3202. }
  3203. static inline __ATTRS_o_ai int
  3204. vec_all_lt(vector unsigned long long __a, vector unsigned long long __b) {
  3205. int __cc;
  3206. __builtin_s390_vchlgs(__b, __a, &__cc);
  3207. return __cc == 0;
  3208. }
  3209. // This prototype is deprecated.
  3210. static inline __ATTRS_o_ai int
  3211. vec_all_lt(vector unsigned long long __a, vector bool long long __b) {
  3212. int __cc;
  3213. __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc);
  3214. return __cc == 0;
  3215. }
  3216. // This prototype is deprecated.
  3217. static inline __ATTRS_o_ai int
  3218. vec_all_lt(vector bool long long __a, vector unsigned long long __b) {
  3219. int __cc;
  3220. __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc);
  3221. return __cc == 0;
  3222. }
  3223. // This prototype is deprecated.
  3224. static inline __ATTRS_o_ai int
  3225. vec_all_lt(vector bool long long __a, vector bool long long __b) {
  3226. int __cc;
  3227. __builtin_s390_vchlgs((vector unsigned long long)__b,
  3228. (vector unsigned long long)__a, &__cc);
  3229. return __cc == 0;
  3230. }
  3231. #if __ARCH__ >= 12
  3232. static inline __ATTRS_o_ai int
  3233. vec_all_lt(vector float __a, vector float __b) {
  3234. int __cc;
  3235. __builtin_s390_vfchsbs(__b, __a, &__cc);
  3236. return __cc == 0;
  3237. }
  3238. #endif
  3239. static inline __ATTRS_o_ai int
  3240. vec_all_lt(vector double __a, vector double __b) {
  3241. int __cc;
  3242. __builtin_s390_vfchdbs(__b, __a, &__cc);
  3243. return __cc == 0;
  3244. }
  3245. /*-- vec_all_nge ------------------------------------------------------------*/
  3246. #if __ARCH__ >= 12
  3247. static inline __ATTRS_o_ai int
  3248. vec_all_nge(vector float __a, vector float __b) {
  3249. int __cc;
  3250. __builtin_s390_vfchesbs(__a, __b, &__cc);
  3251. return __cc == 3;
  3252. }
  3253. #endif
  3254. static inline __ATTRS_o_ai int
  3255. vec_all_nge(vector double __a, vector double __b) {
  3256. int __cc;
  3257. __builtin_s390_vfchedbs(__a, __b, &__cc);
  3258. return __cc == 3;
  3259. }
  3260. /*-- vec_all_ngt ------------------------------------------------------------*/
  3261. #if __ARCH__ >= 12
  3262. static inline __ATTRS_o_ai int
  3263. vec_all_ngt(vector float __a, vector float __b) {
  3264. int __cc;
  3265. __builtin_s390_vfchsbs(__a, __b, &__cc);
  3266. return __cc == 3;
  3267. }
  3268. #endif
  3269. static inline __ATTRS_o_ai int
  3270. vec_all_ngt(vector double __a, vector double __b) {
  3271. int __cc;
  3272. __builtin_s390_vfchdbs(__a, __b, &__cc);
  3273. return __cc == 3;
  3274. }
  3275. /*-- vec_all_nle ------------------------------------------------------------*/
  3276. #if __ARCH__ >= 12
  3277. static inline __ATTRS_o_ai int
  3278. vec_all_nle(vector float __a, vector float __b) {
  3279. int __cc;
  3280. __builtin_s390_vfchesbs(__b, __a, &__cc);
  3281. return __cc == 3;
  3282. }
  3283. #endif
  3284. static inline __ATTRS_o_ai int
  3285. vec_all_nle(vector double __a, vector double __b) {
  3286. int __cc;
  3287. __builtin_s390_vfchedbs(__b, __a, &__cc);
  3288. return __cc == 3;
  3289. }
  3290. /*-- vec_all_nlt ------------------------------------------------------------*/
  3291. #if __ARCH__ >= 12
  3292. static inline __ATTRS_o_ai int
  3293. vec_all_nlt(vector float __a, vector float __b) {
  3294. int __cc;
  3295. __builtin_s390_vfchsbs(__b, __a, &__cc);
  3296. return __cc == 3;
  3297. }
  3298. #endif
  3299. static inline __ATTRS_o_ai int
  3300. vec_all_nlt(vector double __a, vector double __b) {
  3301. int __cc;
  3302. __builtin_s390_vfchdbs(__b, __a, &__cc);
  3303. return __cc == 3;
  3304. }
  3305. /*-- vec_all_nan ------------------------------------------------------------*/
  3306. #if __ARCH__ >= 12
  3307. static inline __ATTRS_o_ai int
  3308. vec_all_nan(vector float __a) {
  3309. int __cc;
  3310. __builtin_s390_vftcisb(__a, 15, &__cc);
  3311. return __cc == 0;
  3312. }
  3313. #endif
  3314. static inline __ATTRS_o_ai int
  3315. vec_all_nan(vector double __a) {
  3316. int __cc;
  3317. __builtin_s390_vftcidb(__a, 15, &__cc);
  3318. return __cc == 0;
  3319. }
  3320. /*-- vec_all_numeric --------------------------------------------------------*/
  3321. #if __ARCH__ >= 12
  3322. static inline __ATTRS_o_ai int
  3323. vec_all_numeric(vector float __a) {
  3324. int __cc;
  3325. __builtin_s390_vftcisb(__a, 15, &__cc);
  3326. return __cc == 3;
  3327. }
  3328. #endif
  3329. static inline __ATTRS_o_ai int
  3330. vec_all_numeric(vector double __a) {
  3331. int __cc;
  3332. __builtin_s390_vftcidb(__a, 15, &__cc);
  3333. return __cc == 3;
  3334. }
  3335. /*-- vec_any_eq -------------------------------------------------------------*/
  3336. static inline __ATTRS_o_ai int
  3337. vec_any_eq(vector signed char __a, vector signed char __b) {
  3338. int __cc;
  3339. __builtin_s390_vceqbs(__a, __b, &__cc);
  3340. return __cc <= 1;
  3341. }
  3342. // This prototype is deprecated.
  3343. static inline __ATTRS_o_ai int
  3344. vec_any_eq(vector signed char __a, vector bool char __b) {
  3345. int __cc;
  3346. __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc);
  3347. return __cc <= 1;
  3348. }
  3349. // This prototype is deprecated.
  3350. static inline __ATTRS_o_ai int
  3351. vec_any_eq(vector bool char __a, vector signed char __b) {
  3352. int __cc;
  3353. __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc);
  3354. return __cc <= 1;
  3355. }
  3356. static inline __ATTRS_o_ai int
  3357. vec_any_eq(vector unsigned char __a, vector unsigned char __b) {
  3358. int __cc;
  3359. __builtin_s390_vceqbs((vector signed char)__a,
  3360. (vector signed char)__b, &__cc);
  3361. return __cc <= 1;
  3362. }
  3363. // This prototype is deprecated.
  3364. static inline __ATTRS_o_ai int
  3365. vec_any_eq(vector unsigned char __a, vector bool char __b) {
  3366. int __cc;
  3367. __builtin_s390_vceqbs((vector signed char)__a,
  3368. (vector signed char)__b, &__cc);
  3369. return __cc <= 1;
  3370. }
  3371. // This prototype is deprecated.
  3372. static inline __ATTRS_o_ai int
  3373. vec_any_eq(vector bool char __a, vector unsigned char __b) {
  3374. int __cc;
  3375. __builtin_s390_vceqbs((vector signed char)__a,
  3376. (vector signed char)__b, &__cc);
  3377. return __cc <= 1;
  3378. }
  3379. static inline __ATTRS_o_ai int
  3380. vec_any_eq(vector bool char __a, vector bool char __b) {
  3381. int __cc;
  3382. __builtin_s390_vceqbs((vector signed char)__a,
  3383. (vector signed char)__b, &__cc);
  3384. return __cc <= 1;
  3385. }
  3386. static inline __ATTRS_o_ai int
  3387. vec_any_eq(vector signed short __a, vector signed short __b) {
  3388. int __cc;
  3389. __builtin_s390_vceqhs(__a, __b, &__cc);
  3390. return __cc <= 1;
  3391. }
  3392. // This prototype is deprecated.
  3393. static inline __ATTRS_o_ai int
  3394. vec_any_eq(vector signed short __a, vector bool short __b) {
  3395. int __cc;
  3396. __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc);
  3397. return __cc <= 1;
  3398. }
  3399. // This prototype is deprecated.
  3400. static inline __ATTRS_o_ai int
  3401. vec_any_eq(vector bool short __a, vector signed short __b) {
  3402. int __cc;
  3403. __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc);
  3404. return __cc <= 1;
  3405. }
  3406. static inline __ATTRS_o_ai int
  3407. vec_any_eq(vector unsigned short __a, vector unsigned short __b) {
  3408. int __cc;
  3409. __builtin_s390_vceqhs((vector signed short)__a,
  3410. (vector signed short)__b, &__cc);
  3411. return __cc <= 1;
  3412. }
  3413. // This prototype is deprecated.
  3414. static inline __ATTRS_o_ai int
  3415. vec_any_eq(vector unsigned short __a, vector bool short __b) {
  3416. int __cc;
  3417. __builtin_s390_vceqhs((vector signed short)__a,
  3418. (vector signed short)__b, &__cc);
  3419. return __cc <= 1;
  3420. }
  3421. // This prototype is deprecated.
  3422. static inline __ATTRS_o_ai int
  3423. vec_any_eq(vector bool short __a, vector unsigned short __b) {
  3424. int __cc;
  3425. __builtin_s390_vceqhs((vector signed short)__a,
  3426. (vector signed short)__b, &__cc);
  3427. return __cc <= 1;
  3428. }
  3429. static inline __ATTRS_o_ai int
  3430. vec_any_eq(vector bool short __a, vector bool short __b) {
  3431. int __cc;
  3432. __builtin_s390_vceqhs((vector signed short)__a,
  3433. (vector signed short)__b, &__cc);
  3434. return __cc <= 1;
  3435. }
  3436. static inline __ATTRS_o_ai int
  3437. vec_any_eq(vector signed int __a, vector signed int __b) {
  3438. int __cc;
  3439. __builtin_s390_vceqfs(__a, __b, &__cc);
  3440. return __cc <= 1;
  3441. }
  3442. // This prototype is deprecated.
  3443. static inline __ATTRS_o_ai int
  3444. vec_any_eq(vector signed int __a, vector bool int __b) {
  3445. int __cc;
  3446. __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc);
  3447. return __cc <= 1;
  3448. }
  3449. // This prototype is deprecated.
  3450. static inline __ATTRS_o_ai int
  3451. vec_any_eq(vector bool int __a, vector signed int __b) {
  3452. int __cc;
  3453. __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc);
  3454. return __cc <= 1;
  3455. }
  3456. static inline __ATTRS_o_ai int
  3457. vec_any_eq(vector unsigned int __a, vector unsigned int __b) {
  3458. int __cc;
  3459. __builtin_s390_vceqfs((vector signed int)__a,
  3460. (vector signed int)__b, &__cc);
  3461. return __cc <= 1;
  3462. }
  3463. // This prototype is deprecated.
  3464. static inline __ATTRS_o_ai int
  3465. vec_any_eq(vector unsigned int __a, vector bool int __b) {
  3466. int __cc;
  3467. __builtin_s390_vceqfs((vector signed int)__a,
  3468. (vector signed int)__b, &__cc);
  3469. return __cc <= 1;
  3470. }
  3471. // This prototype is deprecated.
  3472. static inline __ATTRS_o_ai int
  3473. vec_any_eq(vector bool int __a, vector unsigned int __b) {
  3474. int __cc;
  3475. __builtin_s390_vceqfs((vector signed int)__a,
  3476. (vector signed int)__b, &__cc);
  3477. return __cc <= 1;
  3478. }
  3479. static inline __ATTRS_o_ai int
  3480. vec_any_eq(vector bool int __a, vector bool int __b) {
  3481. int __cc;
  3482. __builtin_s390_vceqfs((vector signed int)__a,
  3483. (vector signed int)__b, &__cc);
  3484. return __cc <= 1;
  3485. }
  3486. static inline __ATTRS_o_ai int
  3487. vec_any_eq(vector signed long long __a, vector signed long long __b) {
  3488. int __cc;
  3489. __builtin_s390_vceqgs(__a, __b, &__cc);
  3490. return __cc <= 1;
  3491. }
  3492. // This prototype is deprecated.
  3493. static inline __ATTRS_o_ai int
  3494. vec_any_eq(vector signed long long __a, vector bool long long __b) {
  3495. int __cc;
  3496. __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc);
  3497. return __cc <= 1;
  3498. }
  3499. // This prototype is deprecated.
  3500. static inline __ATTRS_o_ai int
  3501. vec_any_eq(vector bool long long __a, vector signed long long __b) {
  3502. int __cc;
  3503. __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc);
  3504. return __cc <= 1;
  3505. }
  3506. static inline __ATTRS_o_ai int
  3507. vec_any_eq(vector unsigned long long __a, vector unsigned long long __b) {
  3508. int __cc;
  3509. __builtin_s390_vceqgs((vector signed long long)__a,
  3510. (vector signed long long)__b, &__cc);
  3511. return __cc <= 1;
  3512. }
  3513. // This prototype is deprecated.
  3514. static inline __ATTRS_o_ai int
  3515. vec_any_eq(vector unsigned long long __a, vector bool long long __b) {
  3516. int __cc;
  3517. __builtin_s390_vceqgs((vector signed long long)__a,
  3518. (vector signed long long)__b, &__cc);
  3519. return __cc <= 1;
  3520. }
  3521. // This prototype is deprecated.
  3522. static inline __ATTRS_o_ai int
  3523. vec_any_eq(vector bool long long __a, vector unsigned long long __b) {
  3524. int __cc;
  3525. __builtin_s390_vceqgs((vector signed long long)__a,
  3526. (vector signed long long)__b, &__cc);
  3527. return __cc <= 1;
  3528. }
  3529. static inline __ATTRS_o_ai int
  3530. vec_any_eq(vector bool long long __a, vector bool long long __b) {
  3531. int __cc;
  3532. __builtin_s390_vceqgs((vector signed long long)__a,
  3533. (vector signed long long)__b, &__cc);
  3534. return __cc <= 1;
  3535. }
  3536. #if __ARCH__ >= 12
  3537. static inline __ATTRS_o_ai int
  3538. vec_any_eq(vector float __a, vector float __b) {
  3539. int __cc;
  3540. __builtin_s390_vfcesbs(__a, __b, &__cc);
  3541. return __cc <= 1;
  3542. }
  3543. #endif
  3544. static inline __ATTRS_o_ai int
  3545. vec_any_eq(vector double __a, vector double __b) {
  3546. int __cc;
  3547. __builtin_s390_vfcedbs(__a, __b, &__cc);
  3548. return __cc <= 1;
  3549. }
  3550. /*-- vec_any_ne -------------------------------------------------------------*/
  3551. static inline __ATTRS_o_ai int
  3552. vec_any_ne(vector signed char __a, vector signed char __b) {
  3553. int __cc;
  3554. __builtin_s390_vceqbs(__a, __b, &__cc);
  3555. return __cc != 0;
  3556. }
  3557. // This prototype is deprecated.
  3558. static inline __ATTRS_o_ai int
  3559. vec_any_ne(vector signed char __a, vector bool char __b) {
  3560. int __cc;
  3561. __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc);
  3562. return __cc != 0;
  3563. }
  3564. // This prototype is deprecated.
  3565. static inline __ATTRS_o_ai int
  3566. vec_any_ne(vector bool char __a, vector signed char __b) {
  3567. int __cc;
  3568. __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc);
  3569. return __cc != 0;
  3570. }
  3571. static inline __ATTRS_o_ai int
  3572. vec_any_ne(vector unsigned char __a, vector unsigned char __b) {
  3573. int __cc;
  3574. __builtin_s390_vceqbs((vector signed char)__a,
  3575. (vector signed char)__b, &__cc);
  3576. return __cc != 0;
  3577. }
  3578. // This prototype is deprecated.
  3579. static inline __ATTRS_o_ai int
  3580. vec_any_ne(vector unsigned char __a, vector bool char __b) {
  3581. int __cc;
  3582. __builtin_s390_vceqbs((vector signed char)__a,
  3583. (vector signed char)__b, &__cc);
  3584. return __cc != 0;
  3585. }
  3586. // This prototype is deprecated.
  3587. static inline __ATTRS_o_ai int
  3588. vec_any_ne(vector bool char __a, vector unsigned char __b) {
  3589. int __cc;
  3590. __builtin_s390_vceqbs((vector signed char)__a,
  3591. (vector signed char)__b, &__cc);
  3592. return __cc != 0;
  3593. }
  3594. static inline __ATTRS_o_ai int
  3595. vec_any_ne(vector bool char __a, vector bool char __b) {
  3596. int __cc;
  3597. __builtin_s390_vceqbs((vector signed char)__a,
  3598. (vector signed char)__b, &__cc);
  3599. return __cc != 0;
  3600. }
  3601. static inline __ATTRS_o_ai int
  3602. vec_any_ne(vector signed short __a, vector signed short __b) {
  3603. int __cc;
  3604. __builtin_s390_vceqhs(__a, __b, &__cc);
  3605. return __cc != 0;
  3606. }
  3607. // This prototype is deprecated.
  3608. static inline __ATTRS_o_ai int
  3609. vec_any_ne(vector signed short __a, vector bool short __b) {
  3610. int __cc;
  3611. __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc);
  3612. return __cc != 0;
  3613. }
  3614. // This prototype is deprecated.
  3615. static inline __ATTRS_o_ai int
  3616. vec_any_ne(vector bool short __a, vector signed short __b) {
  3617. int __cc;
  3618. __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc);
  3619. return __cc != 0;
  3620. }
  3621. static inline __ATTRS_o_ai int
  3622. vec_any_ne(vector unsigned short __a, vector unsigned short __b) {
  3623. int __cc;
  3624. __builtin_s390_vceqhs((vector signed short)__a,
  3625. (vector signed short)__b, &__cc);
  3626. return __cc != 0;
  3627. }
  3628. // This prototype is deprecated.
  3629. static inline __ATTRS_o_ai int
  3630. vec_any_ne(vector unsigned short __a, vector bool short __b) {
  3631. int __cc;
  3632. __builtin_s390_vceqhs((vector signed short)__a,
  3633. (vector signed short)__b, &__cc);
  3634. return __cc != 0;
  3635. }
  3636. // This prototype is deprecated.
  3637. static inline __ATTRS_o_ai int
  3638. vec_any_ne(vector bool short __a, vector unsigned short __b) {
  3639. int __cc;
  3640. __builtin_s390_vceqhs((vector signed short)__a,
  3641. (vector signed short)__b, &__cc);
  3642. return __cc != 0;
  3643. }
  3644. static inline __ATTRS_o_ai int
  3645. vec_any_ne(vector bool short __a, vector bool short __b) {
  3646. int __cc;
  3647. __builtin_s390_vceqhs((vector signed short)__a,
  3648. (vector signed short)__b, &__cc);
  3649. return __cc != 0;
  3650. }
  3651. static inline __ATTRS_o_ai int
  3652. vec_any_ne(vector signed int __a, vector signed int __b) {
  3653. int __cc;
  3654. __builtin_s390_vceqfs(__a, __b, &__cc);
  3655. return __cc != 0;
  3656. }
  3657. // This prototype is deprecated.
  3658. static inline __ATTRS_o_ai int
  3659. vec_any_ne(vector signed int __a, vector bool int __b) {
  3660. int __cc;
  3661. __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc);
  3662. return __cc != 0;
  3663. }
  3664. // This prototype is deprecated.
  3665. static inline __ATTRS_o_ai int
  3666. vec_any_ne(vector bool int __a, vector signed int __b) {
  3667. int __cc;
  3668. __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc);
  3669. return __cc != 0;
  3670. }
  3671. static inline __ATTRS_o_ai int
  3672. vec_any_ne(vector unsigned int __a, vector unsigned int __b) {
  3673. int __cc;
  3674. __builtin_s390_vceqfs((vector signed int)__a,
  3675. (vector signed int)__b, &__cc);
  3676. return __cc != 0;
  3677. }
  3678. // This prototype is deprecated.
  3679. static inline __ATTRS_o_ai int
  3680. vec_any_ne(vector unsigned int __a, vector bool int __b) {
  3681. int __cc;
  3682. __builtin_s390_vceqfs((vector signed int)__a,
  3683. (vector signed int)__b, &__cc);
  3684. return __cc != 0;
  3685. }
  3686. // This prototype is deprecated.
  3687. static inline __ATTRS_o_ai int
  3688. vec_any_ne(vector bool int __a, vector unsigned int __b) {
  3689. int __cc;
  3690. __builtin_s390_vceqfs((vector signed int)__a,
  3691. (vector signed int)__b, &__cc);
  3692. return __cc != 0;
  3693. }
  3694. static inline __ATTRS_o_ai int
  3695. vec_any_ne(vector bool int __a, vector bool int __b) {
  3696. int __cc;
  3697. __builtin_s390_vceqfs((vector signed int)__a,
  3698. (vector signed int)__b, &__cc);
  3699. return __cc != 0;
  3700. }
  3701. static inline __ATTRS_o_ai int
  3702. vec_any_ne(vector signed long long __a, vector signed long long __b) {
  3703. int __cc;
  3704. __builtin_s390_vceqgs(__a, __b, &__cc);
  3705. return __cc != 0;
  3706. }
  3707. // This prototype is deprecated.
  3708. static inline __ATTRS_o_ai int
  3709. vec_any_ne(vector signed long long __a, vector bool long long __b) {
  3710. int __cc;
  3711. __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc);
  3712. return __cc != 0;
  3713. }
  3714. // This prototype is deprecated.
  3715. static inline __ATTRS_o_ai int
  3716. vec_any_ne(vector bool long long __a, vector signed long long __b) {
  3717. int __cc;
  3718. __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc);
  3719. return __cc != 0;
  3720. }
  3721. static inline __ATTRS_o_ai int
  3722. vec_any_ne(vector unsigned long long __a, vector unsigned long long __b) {
  3723. int __cc;
  3724. __builtin_s390_vceqgs((vector signed long long)__a,
  3725. (vector signed long long)__b, &__cc);
  3726. return __cc != 0;
  3727. }
  3728. // This prototype is deprecated.
  3729. static inline __ATTRS_o_ai int
  3730. vec_any_ne(vector unsigned long long __a, vector bool long long __b) {
  3731. int __cc;
  3732. __builtin_s390_vceqgs((vector signed long long)__a,
  3733. (vector signed long long)__b, &__cc);
  3734. return __cc != 0;
  3735. }
  3736. // This prototype is deprecated.
  3737. static inline __ATTRS_o_ai int
  3738. vec_any_ne(vector bool long long __a, vector unsigned long long __b) {
  3739. int __cc;
  3740. __builtin_s390_vceqgs((vector signed long long)__a,
  3741. (vector signed long long)__b, &__cc);
  3742. return __cc != 0;
  3743. }
  3744. static inline __ATTRS_o_ai int
  3745. vec_any_ne(vector bool long long __a, vector bool long long __b) {
  3746. int __cc;
  3747. __builtin_s390_vceqgs((vector signed long long)__a,
  3748. (vector signed long long)__b, &__cc);
  3749. return __cc != 0;
  3750. }
  3751. #if __ARCH__ >= 12
  3752. static inline __ATTRS_o_ai int
  3753. vec_any_ne(vector float __a, vector float __b) {
  3754. int __cc;
  3755. __builtin_s390_vfcesbs(__a, __b, &__cc);
  3756. return __cc != 0;
  3757. }
  3758. #endif
  3759. static inline __ATTRS_o_ai int
  3760. vec_any_ne(vector double __a, vector double __b) {
  3761. int __cc;
  3762. __builtin_s390_vfcedbs(__a, __b, &__cc);
  3763. return __cc != 0;
  3764. }
  3765. /*-- vec_any_ge -------------------------------------------------------------*/
  3766. static inline __ATTRS_o_ai int
  3767. vec_any_ge(vector signed char __a, vector signed char __b) {
  3768. int __cc;
  3769. __builtin_s390_vchbs(__b, __a, &__cc);
  3770. return __cc != 0;
  3771. }
  3772. // This prototype is deprecated.
  3773. static inline __ATTRS_o_ai int
  3774. vec_any_ge(vector signed char __a, vector bool char __b) {
  3775. int __cc;
  3776. __builtin_s390_vchbs((vector signed char)__b, __a, &__cc);
  3777. return __cc != 0;
  3778. }
  3779. // This prototype is deprecated.
  3780. static inline __ATTRS_o_ai int
  3781. vec_any_ge(vector bool char __a, vector signed char __b) {
  3782. int __cc;
  3783. __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc);
  3784. return __cc != 0;
  3785. }
  3786. static inline __ATTRS_o_ai int
  3787. vec_any_ge(vector unsigned char __a, vector unsigned char __b) {
  3788. int __cc;
  3789. __builtin_s390_vchlbs(__b, __a, &__cc);
  3790. return __cc != 0;
  3791. }
  3792. // This prototype is deprecated.
  3793. static inline __ATTRS_o_ai int
  3794. vec_any_ge(vector unsigned char __a, vector bool char __b) {
  3795. int __cc;
  3796. __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc);
  3797. return __cc != 0;
  3798. }
  3799. // This prototype is deprecated.
  3800. static inline __ATTRS_o_ai int
  3801. vec_any_ge(vector bool char __a, vector unsigned char __b) {
  3802. int __cc;
  3803. __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc);
  3804. return __cc != 0;
  3805. }
  3806. // This prototype is deprecated.
  3807. static inline __ATTRS_o_ai int
  3808. vec_any_ge(vector bool char __a, vector bool char __b) {
  3809. int __cc;
  3810. __builtin_s390_vchlbs((vector unsigned char)__b,
  3811. (vector unsigned char)__a, &__cc);
  3812. return __cc != 0;
  3813. }
  3814. static inline __ATTRS_o_ai int
  3815. vec_any_ge(vector signed short __a, vector signed short __b) {
  3816. int __cc;
  3817. __builtin_s390_vchhs(__b, __a, &__cc);
  3818. return __cc != 0;
  3819. }
  3820. // This prototype is deprecated.
  3821. static inline __ATTRS_o_ai int
  3822. vec_any_ge(vector signed short __a, vector bool short __b) {
  3823. int __cc;
  3824. __builtin_s390_vchhs((vector signed short)__b, __a, &__cc);
  3825. return __cc != 0;
  3826. }
  3827. // This prototype is deprecated.
  3828. static inline __ATTRS_o_ai int
  3829. vec_any_ge(vector bool short __a, vector signed short __b) {
  3830. int __cc;
  3831. __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc);
  3832. return __cc != 0;
  3833. }
  3834. static inline __ATTRS_o_ai int
  3835. vec_any_ge(vector unsigned short __a, vector unsigned short __b) {
  3836. int __cc;
  3837. __builtin_s390_vchlhs(__b, __a, &__cc);
  3838. return __cc != 0;
  3839. }
  3840. // This prototype is deprecated.
  3841. static inline __ATTRS_o_ai int
  3842. vec_any_ge(vector unsigned short __a, vector bool short __b) {
  3843. int __cc;
  3844. __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc);
  3845. return __cc != 0;
  3846. }
  3847. // This prototype is deprecated.
  3848. static inline __ATTRS_o_ai int
  3849. vec_any_ge(vector bool short __a, vector unsigned short __b) {
  3850. int __cc;
  3851. __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc);
  3852. return __cc != 0;
  3853. }
  3854. // This prototype is deprecated.
  3855. static inline __ATTRS_o_ai int
  3856. vec_any_ge(vector bool short __a, vector bool short __b) {
  3857. int __cc;
  3858. __builtin_s390_vchlhs((vector unsigned short)__b,
  3859. (vector unsigned short)__a, &__cc);
  3860. return __cc != 0;
  3861. }
  3862. static inline __ATTRS_o_ai int
  3863. vec_any_ge(vector signed int __a, vector signed int __b) {
  3864. int __cc;
  3865. __builtin_s390_vchfs(__b, __a, &__cc);
  3866. return __cc != 0;
  3867. }
  3868. // This prototype is deprecated.
  3869. static inline __ATTRS_o_ai int
  3870. vec_any_ge(vector signed int __a, vector bool int __b) {
  3871. int __cc;
  3872. __builtin_s390_vchfs((vector signed int)__b, __a, &__cc);
  3873. return __cc != 0;
  3874. }
  3875. // This prototype is deprecated.
  3876. static inline __ATTRS_o_ai int
  3877. vec_any_ge(vector bool int __a, vector signed int __b) {
  3878. int __cc;
  3879. __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc);
  3880. return __cc != 0;
  3881. }
  3882. static inline __ATTRS_o_ai int
  3883. vec_any_ge(vector unsigned int __a, vector unsigned int __b) {
  3884. int __cc;
  3885. __builtin_s390_vchlfs(__b, __a, &__cc);
  3886. return __cc != 0;
  3887. }
  3888. // This prototype is deprecated.
  3889. static inline __ATTRS_o_ai int
  3890. vec_any_ge(vector unsigned int __a, vector bool int __b) {
  3891. int __cc;
  3892. __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc);
  3893. return __cc != 0;
  3894. }
  3895. // This prototype is deprecated.
  3896. static inline __ATTRS_o_ai int
  3897. vec_any_ge(vector bool int __a, vector unsigned int __b) {
  3898. int __cc;
  3899. __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc);
  3900. return __cc != 0;
  3901. }
  3902. // This prototype is deprecated.
  3903. static inline __ATTRS_o_ai int
  3904. vec_any_ge(vector bool int __a, vector bool int __b) {
  3905. int __cc;
  3906. __builtin_s390_vchlfs((vector unsigned int)__b,
  3907. (vector unsigned int)__a, &__cc);
  3908. return __cc != 0;
  3909. }
  3910. static inline __ATTRS_o_ai int
  3911. vec_any_ge(vector signed long long __a, vector signed long long __b) {
  3912. int __cc;
  3913. __builtin_s390_vchgs(__b, __a, &__cc);
  3914. return __cc != 0;
  3915. }
  3916. // This prototype is deprecated.
  3917. static inline __ATTRS_o_ai int
  3918. vec_any_ge(vector signed long long __a, vector bool long long __b) {
  3919. int __cc;
  3920. __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc);
  3921. return __cc != 0;
  3922. }
  3923. // This prototype is deprecated.
  3924. static inline __ATTRS_o_ai int
  3925. vec_any_ge(vector bool long long __a, vector signed long long __b) {
  3926. int __cc;
  3927. __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc);
  3928. return __cc != 0;
  3929. }
  3930. static inline __ATTRS_o_ai int
  3931. vec_any_ge(vector unsigned long long __a, vector unsigned long long __b) {
  3932. int __cc;
  3933. __builtin_s390_vchlgs(__b, __a, &__cc);
  3934. return __cc != 0;
  3935. }
  3936. // This prototype is deprecated.
  3937. static inline __ATTRS_o_ai int
  3938. vec_any_ge(vector unsigned long long __a, vector bool long long __b) {
  3939. int __cc;
  3940. __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc);
  3941. return __cc != 0;
  3942. }
  3943. // This prototype is deprecated.
  3944. static inline __ATTRS_o_ai int
  3945. vec_any_ge(vector bool long long __a, vector unsigned long long __b) {
  3946. int __cc;
  3947. __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc);
  3948. return __cc != 0;
  3949. }
  3950. // This prototype is deprecated.
  3951. static inline __ATTRS_o_ai int
  3952. vec_any_ge(vector bool long long __a, vector bool long long __b) {
  3953. int __cc;
  3954. __builtin_s390_vchlgs((vector unsigned long long)__b,
  3955. (vector unsigned long long)__a, &__cc);
  3956. return __cc != 0;
  3957. }
  3958. #if __ARCH__ >= 12
  3959. static inline __ATTRS_o_ai int
  3960. vec_any_ge(vector float __a, vector float __b) {
  3961. int __cc;
  3962. __builtin_s390_vfchesbs(__a, __b, &__cc);
  3963. return __cc <= 1;
  3964. }
  3965. #endif
  3966. static inline __ATTRS_o_ai int
  3967. vec_any_ge(vector double __a, vector double __b) {
  3968. int __cc;
  3969. __builtin_s390_vfchedbs(__a, __b, &__cc);
  3970. return __cc <= 1;
  3971. }
  3972. /*-- vec_any_gt -------------------------------------------------------------*/
  3973. static inline __ATTRS_o_ai int
  3974. vec_any_gt(vector signed char __a, vector signed char __b) {
  3975. int __cc;
  3976. __builtin_s390_vchbs(__a, __b, &__cc);
  3977. return __cc <= 1;
  3978. }
  3979. // This prototype is deprecated.
  3980. static inline __ATTRS_o_ai int
  3981. vec_any_gt(vector signed char __a, vector bool char __b) {
  3982. int __cc;
  3983. __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc);
  3984. return __cc <= 1;
  3985. }
  3986. // This prototype is deprecated.
  3987. static inline __ATTRS_o_ai int
  3988. vec_any_gt(vector bool char __a, vector signed char __b) {
  3989. int __cc;
  3990. __builtin_s390_vchbs((vector signed char)__a, __b, &__cc);
  3991. return __cc <= 1;
  3992. }
  3993. static inline __ATTRS_o_ai int
  3994. vec_any_gt(vector unsigned char __a, vector unsigned char __b) {
  3995. int __cc;
  3996. __builtin_s390_vchlbs(__a, __b, &__cc);
  3997. return __cc <= 1;
  3998. }
  3999. // This prototype is deprecated.
  4000. static inline __ATTRS_o_ai int
  4001. vec_any_gt(vector unsigned char __a, vector bool char __b) {
  4002. int __cc;
  4003. __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc);
  4004. return __cc <= 1;
  4005. }
  4006. // This prototype is deprecated.
  4007. static inline __ATTRS_o_ai int
  4008. vec_any_gt(vector bool char __a, vector unsigned char __b) {
  4009. int __cc;
  4010. __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc);
  4011. return __cc <= 1;
  4012. }
  4013. // This prototype is deprecated.
  4014. static inline __ATTRS_o_ai int
  4015. vec_any_gt(vector bool char __a, vector bool char __b) {
  4016. int __cc;
  4017. __builtin_s390_vchlbs((vector unsigned char)__a,
  4018. (vector unsigned char)__b, &__cc);
  4019. return __cc <= 1;
  4020. }
  4021. static inline __ATTRS_o_ai int
  4022. vec_any_gt(vector signed short __a, vector signed short __b) {
  4023. int __cc;
  4024. __builtin_s390_vchhs(__a, __b, &__cc);
  4025. return __cc <= 1;
  4026. }
  4027. // This prototype is deprecated.
  4028. static inline __ATTRS_o_ai int
  4029. vec_any_gt(vector signed short __a, vector bool short __b) {
  4030. int __cc;
  4031. __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc);
  4032. return __cc <= 1;
  4033. }
  4034. // This prototype is deprecated.
  4035. static inline __ATTRS_o_ai int
  4036. vec_any_gt(vector bool short __a, vector signed short __b) {
  4037. int __cc;
  4038. __builtin_s390_vchhs((vector signed short)__a, __b, &__cc);
  4039. return __cc <= 1;
  4040. }
  4041. static inline __ATTRS_o_ai int
  4042. vec_any_gt(vector unsigned short __a, vector unsigned short __b) {
  4043. int __cc;
  4044. __builtin_s390_vchlhs(__a, __b, &__cc);
  4045. return __cc <= 1;
  4046. }
  4047. // This prototype is deprecated.
  4048. static inline __ATTRS_o_ai int
  4049. vec_any_gt(vector unsigned short __a, vector bool short __b) {
  4050. int __cc;
  4051. __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc);
  4052. return __cc <= 1;
  4053. }
  4054. // This prototype is deprecated.
  4055. static inline __ATTRS_o_ai int
  4056. vec_any_gt(vector bool short __a, vector unsigned short __b) {
  4057. int __cc;
  4058. __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc);
  4059. return __cc <= 1;
  4060. }
  4061. // This prototype is deprecated.
  4062. static inline __ATTRS_o_ai int
  4063. vec_any_gt(vector bool short __a, vector bool short __b) {
  4064. int __cc;
  4065. __builtin_s390_vchlhs((vector unsigned short)__a,
  4066. (vector unsigned short)__b, &__cc);
  4067. return __cc <= 1;
  4068. }
  4069. static inline __ATTRS_o_ai int
  4070. vec_any_gt(vector signed int __a, vector signed int __b) {
  4071. int __cc;
  4072. __builtin_s390_vchfs(__a, __b, &__cc);
  4073. return __cc <= 1;
  4074. }
  4075. // This prototype is deprecated.
  4076. static inline __ATTRS_o_ai int
  4077. vec_any_gt(vector signed int __a, vector bool int __b) {
  4078. int __cc;
  4079. __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc);
  4080. return __cc <= 1;
  4081. }
  4082. // This prototype is deprecated.
  4083. static inline __ATTRS_o_ai int
  4084. vec_any_gt(vector bool int __a, vector signed int __b) {
  4085. int __cc;
  4086. __builtin_s390_vchfs((vector signed int)__a, __b, &__cc);
  4087. return __cc <= 1;
  4088. }
  4089. static inline __ATTRS_o_ai int
  4090. vec_any_gt(vector unsigned int __a, vector unsigned int __b) {
  4091. int __cc;
  4092. __builtin_s390_vchlfs(__a, __b, &__cc);
  4093. return __cc <= 1;
  4094. }
  4095. // This prototype is deprecated.
  4096. static inline __ATTRS_o_ai int
  4097. vec_any_gt(vector unsigned int __a, vector bool int __b) {
  4098. int __cc;
  4099. __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc);
  4100. return __cc <= 1;
  4101. }
  4102. // This prototype is deprecated.
  4103. static inline __ATTRS_o_ai int
  4104. vec_any_gt(vector bool int __a, vector unsigned int __b) {
  4105. int __cc;
  4106. __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc);
  4107. return __cc <= 1;
  4108. }
  4109. // This prototype is deprecated.
  4110. static inline __ATTRS_o_ai int
  4111. vec_any_gt(vector bool int __a, vector bool int __b) {
  4112. int __cc;
  4113. __builtin_s390_vchlfs((vector unsigned int)__a,
  4114. (vector unsigned int)__b, &__cc);
  4115. return __cc <= 1;
  4116. }
  4117. static inline __ATTRS_o_ai int
  4118. vec_any_gt(vector signed long long __a, vector signed long long __b) {
  4119. int __cc;
  4120. __builtin_s390_vchgs(__a, __b, &__cc);
  4121. return __cc <= 1;
  4122. }
  4123. // This prototype is deprecated.
  4124. static inline __ATTRS_o_ai int
  4125. vec_any_gt(vector signed long long __a, vector bool long long __b) {
  4126. int __cc;
  4127. __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc);
  4128. return __cc <= 1;
  4129. }
  4130. // This prototype is deprecated.
  4131. static inline __ATTRS_o_ai int
  4132. vec_any_gt(vector bool long long __a, vector signed long long __b) {
  4133. int __cc;
  4134. __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc);
  4135. return __cc <= 1;
  4136. }
  4137. static inline __ATTRS_o_ai int
  4138. vec_any_gt(vector unsigned long long __a, vector unsigned long long __b) {
  4139. int __cc;
  4140. __builtin_s390_vchlgs(__a, __b, &__cc);
  4141. return __cc <= 1;
  4142. }
  4143. // This prototype is deprecated.
  4144. static inline __ATTRS_o_ai int
  4145. vec_any_gt(vector unsigned long long __a, vector bool long long __b) {
  4146. int __cc;
  4147. __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc);
  4148. return __cc <= 1;
  4149. }
  4150. // This prototype is deprecated.
  4151. static inline __ATTRS_o_ai int
  4152. vec_any_gt(vector bool long long __a, vector unsigned long long __b) {
  4153. int __cc;
  4154. __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc);
  4155. return __cc <= 1;
  4156. }
  4157. // This prototype is deprecated.
  4158. static inline __ATTRS_o_ai int
  4159. vec_any_gt(vector bool long long __a, vector bool long long __b) {
  4160. int __cc;
  4161. __builtin_s390_vchlgs((vector unsigned long long)__a,
  4162. (vector unsigned long long)__b, &__cc);
  4163. return __cc <= 1;
  4164. }
  4165. #if __ARCH__ >= 12
  4166. static inline __ATTRS_o_ai int
  4167. vec_any_gt(vector float __a, vector float __b) {
  4168. int __cc;
  4169. __builtin_s390_vfchsbs(__a, __b, &__cc);
  4170. return __cc <= 1;
  4171. }
  4172. #endif
  4173. static inline __ATTRS_o_ai int
  4174. vec_any_gt(vector double __a, vector double __b) {
  4175. int __cc;
  4176. __builtin_s390_vfchdbs(__a, __b, &__cc);
  4177. return __cc <= 1;
  4178. }
  4179. /*-- vec_any_le -------------------------------------------------------------*/
  4180. static inline __ATTRS_o_ai int
  4181. vec_any_le(vector signed char __a, vector signed char __b) {
  4182. int __cc;
  4183. __builtin_s390_vchbs(__a, __b, &__cc);
  4184. return __cc != 0;
  4185. }
  4186. // This prototype is deprecated.
  4187. static inline __ATTRS_o_ai int
  4188. vec_any_le(vector signed char __a, vector bool char __b) {
  4189. int __cc;
  4190. __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc);
  4191. return __cc != 0;
  4192. }
  4193. // This prototype is deprecated.
  4194. static inline __ATTRS_o_ai int
  4195. vec_any_le(vector bool char __a, vector signed char __b) {
  4196. int __cc;
  4197. __builtin_s390_vchbs((vector signed char)__a, __b, &__cc);
  4198. return __cc != 0;
  4199. }
  4200. static inline __ATTRS_o_ai int
  4201. vec_any_le(vector unsigned char __a, vector unsigned char __b) {
  4202. int __cc;
  4203. __builtin_s390_vchlbs(__a, __b, &__cc);
  4204. return __cc != 0;
  4205. }
  4206. // This prototype is deprecated.
  4207. static inline __ATTRS_o_ai int
  4208. vec_any_le(vector unsigned char __a, vector bool char __b) {
  4209. int __cc;
  4210. __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc);
  4211. return __cc != 0;
  4212. }
  4213. // This prototype is deprecated.
  4214. static inline __ATTRS_o_ai int
  4215. vec_any_le(vector bool char __a, vector unsigned char __b) {
  4216. int __cc;
  4217. __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc);
  4218. return __cc != 0;
  4219. }
  4220. // This prototype is deprecated.
  4221. static inline __ATTRS_o_ai int
  4222. vec_any_le(vector bool char __a, vector bool char __b) {
  4223. int __cc;
  4224. __builtin_s390_vchlbs((vector unsigned char)__a,
  4225. (vector unsigned char)__b, &__cc);
  4226. return __cc != 0;
  4227. }
  4228. static inline __ATTRS_o_ai int
  4229. vec_any_le(vector signed short __a, vector signed short __b) {
  4230. int __cc;
  4231. __builtin_s390_vchhs(__a, __b, &__cc);
  4232. return __cc != 0;
  4233. }
  4234. // This prototype is deprecated.
  4235. static inline __ATTRS_o_ai int
  4236. vec_any_le(vector signed short __a, vector bool short __b) {
  4237. int __cc;
  4238. __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc);
  4239. return __cc != 0;
  4240. }
  4241. // This prototype is deprecated.
  4242. static inline __ATTRS_o_ai int
  4243. vec_any_le(vector bool short __a, vector signed short __b) {
  4244. int __cc;
  4245. __builtin_s390_vchhs((vector signed short)__a, __b, &__cc);
  4246. return __cc != 0;
  4247. }
  4248. static inline __ATTRS_o_ai int
  4249. vec_any_le(vector unsigned short __a, vector unsigned short __b) {
  4250. int __cc;
  4251. __builtin_s390_vchlhs(__a, __b, &__cc);
  4252. return __cc != 0;
  4253. }
  4254. // This prototype is deprecated.
  4255. static inline __ATTRS_o_ai int
  4256. vec_any_le(vector unsigned short __a, vector bool short __b) {
  4257. int __cc;
  4258. __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc);
  4259. return __cc != 0;
  4260. }
  4261. // This prototype is deprecated.
  4262. static inline __ATTRS_o_ai int
  4263. vec_any_le(vector bool short __a, vector unsigned short __b) {
  4264. int __cc;
  4265. __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc);
  4266. return __cc != 0;
  4267. }
  4268. // This prototype is deprecated.
  4269. static inline __ATTRS_o_ai int
  4270. vec_any_le(vector bool short __a, vector bool short __b) {
  4271. int __cc;
  4272. __builtin_s390_vchlhs((vector unsigned short)__a,
  4273. (vector unsigned short)__b, &__cc);
  4274. return __cc != 0;
  4275. }
  4276. static inline __ATTRS_o_ai int
  4277. vec_any_le(vector signed int __a, vector signed int __b) {
  4278. int __cc;
  4279. __builtin_s390_vchfs(__a, __b, &__cc);
  4280. return __cc != 0;
  4281. }
  4282. // This prototype is deprecated.
  4283. static inline __ATTRS_o_ai int
  4284. vec_any_le(vector signed int __a, vector bool int __b) {
  4285. int __cc;
  4286. __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc);
  4287. return __cc != 0;
  4288. }
  4289. // This prototype is deprecated.
  4290. static inline __ATTRS_o_ai int
  4291. vec_any_le(vector bool int __a, vector signed int __b) {
  4292. int __cc;
  4293. __builtin_s390_vchfs((vector signed int)__a, __b, &__cc);
  4294. return __cc != 0;
  4295. }
  4296. static inline __ATTRS_o_ai int
  4297. vec_any_le(vector unsigned int __a, vector unsigned int __b) {
  4298. int __cc;
  4299. __builtin_s390_vchlfs(__a, __b, &__cc);
  4300. return __cc != 0;
  4301. }
  4302. // This prototype is deprecated.
  4303. static inline __ATTRS_o_ai int
  4304. vec_any_le(vector unsigned int __a, vector bool int __b) {
  4305. int __cc;
  4306. __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc);
  4307. return __cc != 0;
  4308. }
  4309. // This prototype is deprecated.
  4310. static inline __ATTRS_o_ai int
  4311. vec_any_le(vector bool int __a, vector unsigned int __b) {
  4312. int __cc;
  4313. __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc);
  4314. return __cc != 0;
  4315. }
  4316. // This prototype is deprecated.
  4317. static inline __ATTRS_o_ai int
  4318. vec_any_le(vector bool int __a, vector bool int __b) {
  4319. int __cc;
  4320. __builtin_s390_vchlfs((vector unsigned int)__a,
  4321. (vector unsigned int)__b, &__cc);
  4322. return __cc != 0;
  4323. }
  4324. static inline __ATTRS_o_ai int
  4325. vec_any_le(vector signed long long __a, vector signed long long __b) {
  4326. int __cc;
  4327. __builtin_s390_vchgs(__a, __b, &__cc);
  4328. return __cc != 0;
  4329. }
  4330. // This prototype is deprecated.
  4331. static inline __ATTRS_o_ai int
  4332. vec_any_le(vector signed long long __a, vector bool long long __b) {
  4333. int __cc;
  4334. __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc);
  4335. return __cc != 0;
  4336. }
  4337. // This prototype is deprecated.
  4338. static inline __ATTRS_o_ai int
  4339. vec_any_le(vector bool long long __a, vector signed long long __b) {
  4340. int __cc;
  4341. __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc);
  4342. return __cc != 0;
  4343. }
  4344. static inline __ATTRS_o_ai int
  4345. vec_any_le(vector unsigned long long __a, vector unsigned long long __b) {
  4346. int __cc;
  4347. __builtin_s390_vchlgs(__a, __b, &__cc);
  4348. return __cc != 0;
  4349. }
  4350. // This prototype is deprecated.
  4351. static inline __ATTRS_o_ai int
  4352. vec_any_le(vector unsigned long long __a, vector bool long long __b) {
  4353. int __cc;
  4354. __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc);
  4355. return __cc != 0;
  4356. }
  4357. // This prototype is deprecated.
  4358. static inline __ATTRS_o_ai int
  4359. vec_any_le(vector bool long long __a, vector unsigned long long __b) {
  4360. int __cc;
  4361. __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc);
  4362. return __cc != 0;
  4363. }
  4364. // This prototype is deprecated.
  4365. static inline __ATTRS_o_ai int
  4366. vec_any_le(vector bool long long __a, vector bool long long __b) {
  4367. int __cc;
  4368. __builtin_s390_vchlgs((vector unsigned long long)__a,
  4369. (vector unsigned long long)__b, &__cc);
  4370. return __cc != 0;
  4371. }
  4372. #if __ARCH__ >= 12
  4373. static inline __ATTRS_o_ai int
  4374. vec_any_le(vector float __a, vector float __b) {
  4375. int __cc;
  4376. __builtin_s390_vfchesbs(__b, __a, &__cc);
  4377. return __cc <= 1;
  4378. }
  4379. #endif
  4380. static inline __ATTRS_o_ai int
  4381. vec_any_le(vector double __a, vector double __b) {
  4382. int __cc;
  4383. __builtin_s390_vfchedbs(__b, __a, &__cc);
  4384. return __cc <= 1;
  4385. }
  4386. /*-- vec_any_lt -------------------------------------------------------------*/
  4387. static inline __ATTRS_o_ai int
  4388. vec_any_lt(vector signed char __a, vector signed char __b) {
  4389. int __cc;
  4390. __builtin_s390_vchbs(__b, __a, &__cc);
  4391. return __cc <= 1;
  4392. }
  4393. // This prototype is deprecated.
  4394. static inline __ATTRS_o_ai int
  4395. vec_any_lt(vector signed char __a, vector bool char __b) {
  4396. int __cc;
  4397. __builtin_s390_vchbs((vector signed char)__b, __a, &__cc);
  4398. return __cc <= 1;
  4399. }
  4400. // This prototype is deprecated.
  4401. static inline __ATTRS_o_ai int
  4402. vec_any_lt(vector bool char __a, vector signed char __b) {
  4403. int __cc;
  4404. __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc);
  4405. return __cc <= 1;
  4406. }
  4407. static inline __ATTRS_o_ai int
  4408. vec_any_lt(vector unsigned char __a, vector unsigned char __b) {
  4409. int __cc;
  4410. __builtin_s390_vchlbs(__b, __a, &__cc);
  4411. return __cc <= 1;
  4412. }
  4413. // This prototype is deprecated.
  4414. static inline __ATTRS_o_ai int
  4415. vec_any_lt(vector unsigned char __a, vector bool char __b) {
  4416. int __cc;
  4417. __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc);
  4418. return __cc <= 1;
  4419. }
  4420. // This prototype is deprecated.
  4421. static inline __ATTRS_o_ai int
  4422. vec_any_lt(vector bool char __a, vector unsigned char __b) {
  4423. int __cc;
  4424. __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc);
  4425. return __cc <= 1;
  4426. }
  4427. // This prototype is deprecated.
  4428. static inline __ATTRS_o_ai int
  4429. vec_any_lt(vector bool char __a, vector bool char __b) {
  4430. int __cc;
  4431. __builtin_s390_vchlbs((vector unsigned char)__b,
  4432. (vector unsigned char)__a, &__cc);
  4433. return __cc <= 1;
  4434. }
  4435. static inline __ATTRS_o_ai int
  4436. vec_any_lt(vector signed short __a, vector signed short __b) {
  4437. int __cc;
  4438. __builtin_s390_vchhs(__b, __a, &__cc);
  4439. return __cc <= 1;
  4440. }
  4441. // This prototype is deprecated.
  4442. static inline __ATTRS_o_ai int
  4443. vec_any_lt(vector signed short __a, vector bool short __b) {
  4444. int __cc;
  4445. __builtin_s390_vchhs((vector signed short)__b, __a, &__cc);
  4446. return __cc <= 1;
  4447. }
  4448. // This prototype is deprecated.
  4449. static inline __ATTRS_o_ai int
  4450. vec_any_lt(vector bool short __a, vector signed short __b) {
  4451. int __cc;
  4452. __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc);
  4453. return __cc <= 1;
  4454. }
  4455. static inline __ATTRS_o_ai int
  4456. vec_any_lt(vector unsigned short __a, vector unsigned short __b) {
  4457. int __cc;
  4458. __builtin_s390_vchlhs(__b, __a, &__cc);
  4459. return __cc <= 1;
  4460. }
  4461. // This prototype is deprecated.
  4462. static inline __ATTRS_o_ai int
  4463. vec_any_lt(vector unsigned short __a, vector bool short __b) {
  4464. int __cc;
  4465. __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc);
  4466. return __cc <= 1;
  4467. }
  4468. // This prototype is deprecated.
  4469. static inline __ATTRS_o_ai int
  4470. vec_any_lt(vector bool short __a, vector unsigned short __b) {
  4471. int __cc;
  4472. __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc);
  4473. return __cc <= 1;
  4474. }
  4475. // This prototype is deprecated.
  4476. static inline __ATTRS_o_ai int
  4477. vec_any_lt(vector bool short __a, vector bool short __b) {
  4478. int __cc;
  4479. __builtin_s390_vchlhs((vector unsigned short)__b,
  4480. (vector unsigned short)__a, &__cc);
  4481. return __cc <= 1;
  4482. }
  4483. static inline __ATTRS_o_ai int
  4484. vec_any_lt(vector signed int __a, vector signed int __b) {
  4485. int __cc;
  4486. __builtin_s390_vchfs(__b, __a, &__cc);
  4487. return __cc <= 1;
  4488. }
  4489. // This prototype is deprecated.
  4490. static inline __ATTRS_o_ai int
  4491. vec_any_lt(vector signed int __a, vector bool int __b) {
  4492. int __cc;
  4493. __builtin_s390_vchfs((vector signed int)__b, __a, &__cc);
  4494. return __cc <= 1;
  4495. }
  4496. // This prototype is deprecated.
  4497. static inline __ATTRS_o_ai int
  4498. vec_any_lt(vector bool int __a, vector signed int __b) {
  4499. int __cc;
  4500. __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc);
  4501. return __cc <= 1;
  4502. }
  4503. static inline __ATTRS_o_ai int
  4504. vec_any_lt(vector unsigned int __a, vector unsigned int __b) {
  4505. int __cc;
  4506. __builtin_s390_vchlfs(__b, __a, &__cc);
  4507. return __cc <= 1;
  4508. }
  4509. // This prototype is deprecated.
  4510. static inline __ATTRS_o_ai int
  4511. vec_any_lt(vector unsigned int __a, vector bool int __b) {
  4512. int __cc;
  4513. __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc);
  4514. return __cc <= 1;
  4515. }
  4516. // This prototype is deprecated.
  4517. static inline __ATTRS_o_ai int
  4518. vec_any_lt(vector bool int __a, vector unsigned int __b) {
  4519. int __cc;
  4520. __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc);
  4521. return __cc <= 1;
  4522. }
  4523. // This prototype is deprecated.
  4524. static inline __ATTRS_o_ai int
  4525. vec_any_lt(vector bool int __a, vector bool int __b) {
  4526. int __cc;
  4527. __builtin_s390_vchlfs((vector unsigned int)__b,
  4528. (vector unsigned int)__a, &__cc);
  4529. return __cc <= 1;
  4530. }
  4531. static inline __ATTRS_o_ai int
  4532. vec_any_lt(vector signed long long __a, vector signed long long __b) {
  4533. int __cc;
  4534. __builtin_s390_vchgs(__b, __a, &__cc);
  4535. return __cc <= 1;
  4536. }
  4537. // This prototype is deprecated.
  4538. static inline __ATTRS_o_ai int
  4539. vec_any_lt(vector signed long long __a, vector bool long long __b) {
  4540. int __cc;
  4541. __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc);
  4542. return __cc <= 1;
  4543. }
  4544. // This prototype is deprecated.
  4545. static inline __ATTRS_o_ai int
  4546. vec_any_lt(vector bool long long __a, vector signed long long __b) {
  4547. int __cc;
  4548. __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc);
  4549. return __cc <= 1;
  4550. }
  4551. static inline __ATTRS_o_ai int
  4552. vec_any_lt(vector unsigned long long __a, vector unsigned long long __b) {
  4553. int __cc;
  4554. __builtin_s390_vchlgs(__b, __a, &__cc);
  4555. return __cc <= 1;
  4556. }
  4557. // This prototype is deprecated.
  4558. static inline __ATTRS_o_ai int
  4559. vec_any_lt(vector unsigned long long __a, vector bool long long __b) {
  4560. int __cc;
  4561. __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc);
  4562. return __cc <= 1;
  4563. }
  4564. // This prototype is deprecated.
  4565. static inline __ATTRS_o_ai int
  4566. vec_any_lt(vector bool long long __a, vector unsigned long long __b) {
  4567. int __cc;
  4568. __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc);
  4569. return __cc <= 1;
  4570. }
  4571. // This prototype is deprecated.
  4572. static inline __ATTRS_o_ai int
  4573. vec_any_lt(vector bool long long __a, vector bool long long __b) {
  4574. int __cc;
  4575. __builtin_s390_vchlgs((vector unsigned long long)__b,
  4576. (vector unsigned long long)__a, &__cc);
  4577. return __cc <= 1;
  4578. }
  4579. #if __ARCH__ >= 12
  4580. static inline __ATTRS_o_ai int
  4581. vec_any_lt(vector float __a, vector float __b) {
  4582. int __cc;
  4583. __builtin_s390_vfchsbs(__b, __a, &__cc);
  4584. return __cc <= 1;
  4585. }
  4586. #endif
  4587. static inline __ATTRS_o_ai int
  4588. vec_any_lt(vector double __a, vector double __b) {
  4589. int __cc;
  4590. __builtin_s390_vfchdbs(__b, __a, &__cc);
  4591. return __cc <= 1;
  4592. }
  4593. /*-- vec_any_nge ------------------------------------------------------------*/
  4594. #if __ARCH__ >= 12
  4595. static inline __ATTRS_o_ai int
  4596. vec_any_nge(vector float __a, vector float __b) {
  4597. int __cc;
  4598. __builtin_s390_vfchesbs(__a, __b, &__cc);
  4599. return __cc != 0;
  4600. }
  4601. #endif
  4602. static inline __ATTRS_o_ai int
  4603. vec_any_nge(vector double __a, vector double __b) {
  4604. int __cc;
  4605. __builtin_s390_vfchedbs(__a, __b, &__cc);
  4606. return __cc != 0;
  4607. }
  4608. /*-- vec_any_ngt ------------------------------------------------------------*/
  4609. #if __ARCH__ >= 12
  4610. static inline __ATTRS_o_ai int
  4611. vec_any_ngt(vector float __a, vector float __b) {
  4612. int __cc;
  4613. __builtin_s390_vfchsbs(__a, __b, &__cc);
  4614. return __cc != 0;
  4615. }
  4616. #endif
  4617. static inline __ATTRS_o_ai int
  4618. vec_any_ngt(vector double __a, vector double __b) {
  4619. int __cc;
  4620. __builtin_s390_vfchdbs(__a, __b, &__cc);
  4621. return __cc != 0;
  4622. }
  4623. /*-- vec_any_nle ------------------------------------------------------------*/
  4624. #if __ARCH__ >= 12
  4625. static inline __ATTRS_o_ai int
  4626. vec_any_nle(vector float __a, vector float __b) {
  4627. int __cc;
  4628. __builtin_s390_vfchesbs(__b, __a, &__cc);
  4629. return __cc != 0;
  4630. }
  4631. #endif
  4632. static inline __ATTRS_o_ai int
  4633. vec_any_nle(vector double __a, vector double __b) {
  4634. int __cc;
  4635. __builtin_s390_vfchedbs(__b, __a, &__cc);
  4636. return __cc != 0;
  4637. }
  4638. /*-- vec_any_nlt ------------------------------------------------------------*/
  4639. #if __ARCH__ >= 12
  4640. static inline __ATTRS_o_ai int
  4641. vec_any_nlt(vector float __a, vector float __b) {
  4642. int __cc;
  4643. __builtin_s390_vfchsbs(__b, __a, &__cc);
  4644. return __cc != 0;
  4645. }
  4646. #endif
  4647. static inline __ATTRS_o_ai int
  4648. vec_any_nlt(vector double __a, vector double __b) {
  4649. int __cc;
  4650. __builtin_s390_vfchdbs(__b, __a, &__cc);
  4651. return __cc != 0;
  4652. }
  4653. /*-- vec_any_nan ------------------------------------------------------------*/
  4654. #if __ARCH__ >= 12
  4655. static inline __ATTRS_o_ai int
  4656. vec_any_nan(vector float __a) {
  4657. int __cc;
  4658. __builtin_s390_vftcisb(__a, 15, &__cc);
  4659. return __cc != 3;
  4660. }
  4661. #endif
  4662. static inline __ATTRS_o_ai int
  4663. vec_any_nan(vector double __a) {
  4664. int __cc;
  4665. __builtin_s390_vftcidb(__a, 15, &__cc);
  4666. return __cc != 3;
  4667. }
  4668. /*-- vec_any_numeric --------------------------------------------------------*/
  4669. #if __ARCH__ >= 12
  4670. static inline __ATTRS_o_ai int
  4671. vec_any_numeric(vector float __a) {
  4672. int __cc;
  4673. __builtin_s390_vftcisb(__a, 15, &__cc);
  4674. return __cc != 0;
  4675. }
  4676. #endif
  4677. static inline __ATTRS_o_ai int
  4678. vec_any_numeric(vector double __a) {
  4679. int __cc;
  4680. __builtin_s390_vftcidb(__a, 15, &__cc);
  4681. return __cc != 0;
  4682. }
  4683. /*-- vec_andc ---------------------------------------------------------------*/
  4684. static inline __ATTRS_o_ai vector bool char
  4685. vec_andc(vector bool char __a, vector bool char __b) {
  4686. return __a & ~__b;
  4687. }
  4688. static inline __ATTRS_o_ai vector signed char
  4689. vec_andc(vector signed char __a, vector signed char __b) {
  4690. return __a & ~__b;
  4691. }
  4692. // This prototype is deprecated.
  4693. static inline __ATTRS_o_ai vector signed char
  4694. vec_andc(vector bool char __a, vector signed char __b) {
  4695. return __a & ~__b;
  4696. }
  4697. // This prototype is deprecated.
  4698. static inline __ATTRS_o_ai vector signed char
  4699. vec_andc(vector signed char __a, vector bool char __b) {
  4700. return __a & ~__b;
  4701. }
  4702. static inline __ATTRS_o_ai vector unsigned char
  4703. vec_andc(vector unsigned char __a, vector unsigned char __b) {
  4704. return __a & ~__b;
  4705. }
  4706. // This prototype is deprecated.
  4707. static inline __ATTRS_o_ai vector unsigned char
  4708. vec_andc(vector bool char __a, vector unsigned char __b) {
  4709. return __a & ~__b;
  4710. }
  4711. // This prototype is deprecated.
  4712. static inline __ATTRS_o_ai vector unsigned char
  4713. vec_andc(vector unsigned char __a, vector bool char __b) {
  4714. return __a & ~__b;
  4715. }
  4716. static inline __ATTRS_o_ai vector bool short
  4717. vec_andc(vector bool short __a, vector bool short __b) {
  4718. return __a & ~__b;
  4719. }
  4720. static inline __ATTRS_o_ai vector signed short
  4721. vec_andc(vector signed short __a, vector signed short __b) {
  4722. return __a & ~__b;
  4723. }
  4724. // This prototype is deprecated.
  4725. static inline __ATTRS_o_ai vector signed short
  4726. vec_andc(vector bool short __a, vector signed short __b) {
  4727. return __a & ~__b;
  4728. }
  4729. // This prototype is deprecated.
  4730. static inline __ATTRS_o_ai vector signed short
  4731. vec_andc(vector signed short __a, vector bool short __b) {
  4732. return __a & ~__b;
  4733. }
  4734. static inline __ATTRS_o_ai vector unsigned short
  4735. vec_andc(vector unsigned short __a, vector unsigned short __b) {
  4736. return __a & ~__b;
  4737. }
  4738. // This prototype is deprecated.
  4739. static inline __ATTRS_o_ai vector unsigned short
  4740. vec_andc(vector bool short __a, vector unsigned short __b) {
  4741. return __a & ~__b;
  4742. }
  4743. // This prototype is deprecated.
  4744. static inline __ATTRS_o_ai vector unsigned short
  4745. vec_andc(vector unsigned short __a, vector bool short __b) {
  4746. return __a & ~__b;
  4747. }
  4748. static inline __ATTRS_o_ai vector bool int
  4749. vec_andc(vector bool int __a, vector bool int __b) {
  4750. return __a & ~__b;
  4751. }
  4752. static inline __ATTRS_o_ai vector signed int
  4753. vec_andc(vector signed int __a, vector signed int __b) {
  4754. return __a & ~__b;
  4755. }
  4756. // This prototype is deprecated.
  4757. static inline __ATTRS_o_ai vector signed int
  4758. vec_andc(vector bool int __a, vector signed int __b) {
  4759. return __a & ~__b;
  4760. }
  4761. // This prototype is deprecated.
  4762. static inline __ATTRS_o_ai vector signed int
  4763. vec_andc(vector signed int __a, vector bool int __b) {
  4764. return __a & ~__b;
  4765. }
  4766. static inline __ATTRS_o_ai vector unsigned int
  4767. vec_andc(vector unsigned int __a, vector unsigned int __b) {
  4768. return __a & ~__b;
  4769. }
  4770. // This prototype is deprecated.
  4771. static inline __ATTRS_o_ai vector unsigned int
  4772. vec_andc(vector bool int __a, vector unsigned int __b) {
  4773. return __a & ~__b;
  4774. }
  4775. // This prototype is deprecated.
  4776. static inline __ATTRS_o_ai vector unsigned int
  4777. vec_andc(vector unsigned int __a, vector bool int __b) {
  4778. return __a & ~__b;
  4779. }
  4780. static inline __ATTRS_o_ai vector bool long long
  4781. vec_andc(vector bool long long __a, vector bool long long __b) {
  4782. return __a & ~__b;
  4783. }
  4784. static inline __ATTRS_o_ai vector signed long long
  4785. vec_andc(vector signed long long __a, vector signed long long __b) {
  4786. return __a & ~__b;
  4787. }
  4788. // This prototype is deprecated.
  4789. static inline __ATTRS_o_ai vector signed long long
  4790. vec_andc(vector bool long long __a, vector signed long long __b) {
  4791. return __a & ~__b;
  4792. }
  4793. // This prototype is deprecated.
  4794. static inline __ATTRS_o_ai vector signed long long
  4795. vec_andc(vector signed long long __a, vector bool long long __b) {
  4796. return __a & ~__b;
  4797. }
  4798. static inline __ATTRS_o_ai vector unsigned long long
  4799. vec_andc(vector unsigned long long __a, vector unsigned long long __b) {
  4800. return __a & ~__b;
  4801. }
  4802. // This prototype is deprecated.
  4803. static inline __ATTRS_o_ai vector unsigned long long
  4804. vec_andc(vector bool long long __a, vector unsigned long long __b) {
  4805. return __a & ~__b;
  4806. }
  4807. // This prototype is deprecated.
  4808. static inline __ATTRS_o_ai vector unsigned long long
  4809. vec_andc(vector unsigned long long __a, vector bool long long __b) {
  4810. return __a & ~__b;
  4811. }
  4812. #if __ARCH__ >= 12
  4813. static inline __ATTRS_o_ai vector float
  4814. vec_andc(vector float __a, vector float __b) {
  4815. return (vector float)((vector unsigned int)__a &
  4816. ~(vector unsigned int)__b);
  4817. }
  4818. #endif
  4819. static inline __ATTRS_o_ai vector double
  4820. vec_andc(vector double __a, vector double __b) {
  4821. return (vector double)((vector unsigned long long)__a &
  4822. ~(vector unsigned long long)__b);
  4823. }
  4824. // This prototype is deprecated.
  4825. static inline __ATTRS_o_ai vector double
  4826. vec_andc(vector bool long long __a, vector double __b) {
  4827. return (vector double)((vector unsigned long long)__a &
  4828. ~(vector unsigned long long)__b);
  4829. }
  4830. // This prototype is deprecated.
  4831. static inline __ATTRS_o_ai vector double
  4832. vec_andc(vector double __a, vector bool long long __b) {
  4833. return (vector double)((vector unsigned long long)__a &
  4834. ~(vector unsigned long long)__b);
  4835. }
  4836. /*-- vec_nor ----------------------------------------------------------------*/
  4837. static inline __ATTRS_o_ai vector bool char
  4838. vec_nor(vector bool char __a, vector bool char __b) {
  4839. return ~(__a | __b);
  4840. }
  4841. static inline __ATTRS_o_ai vector signed char
  4842. vec_nor(vector signed char __a, vector signed char __b) {
  4843. return ~(__a | __b);
  4844. }
  4845. // This prototype is deprecated.
  4846. static inline __ATTRS_o_ai vector signed char
  4847. vec_nor(vector bool char __a, vector signed char __b) {
  4848. return ~(__a | __b);
  4849. }
  4850. // This prototype is deprecated.
  4851. static inline __ATTRS_o_ai vector signed char
  4852. vec_nor(vector signed char __a, vector bool char __b) {
  4853. return ~(__a | __b);
  4854. }
  4855. static inline __ATTRS_o_ai vector unsigned char
  4856. vec_nor(vector unsigned char __a, vector unsigned char __b) {
  4857. return ~(__a | __b);
  4858. }
  4859. // This prototype is deprecated.
  4860. static inline __ATTRS_o_ai vector unsigned char
  4861. vec_nor(vector bool char __a, vector unsigned char __b) {
  4862. return ~(__a | __b);
  4863. }
  4864. // This prototype is deprecated.
  4865. static inline __ATTRS_o_ai vector unsigned char
  4866. vec_nor(vector unsigned char __a, vector bool char __b) {
  4867. return ~(__a | __b);
  4868. }
  4869. static inline __ATTRS_o_ai vector bool short
  4870. vec_nor(vector bool short __a, vector bool short __b) {
  4871. return ~(__a | __b);
  4872. }
  4873. static inline __ATTRS_o_ai vector signed short
  4874. vec_nor(vector signed short __a, vector signed short __b) {
  4875. return ~(__a | __b);
  4876. }
  4877. // This prototype is deprecated.
  4878. static inline __ATTRS_o_ai vector signed short
  4879. vec_nor(vector bool short __a, vector signed short __b) {
  4880. return ~(__a | __b);
  4881. }
  4882. // This prototype is deprecated.
  4883. static inline __ATTRS_o_ai vector signed short
  4884. vec_nor(vector signed short __a, vector bool short __b) {
  4885. return ~(__a | __b);
  4886. }
  4887. static inline __ATTRS_o_ai vector unsigned short
  4888. vec_nor(vector unsigned short __a, vector unsigned short __b) {
  4889. return ~(__a | __b);
  4890. }
  4891. // This prototype is deprecated.
  4892. static inline __ATTRS_o_ai vector unsigned short
  4893. vec_nor(vector bool short __a, vector unsigned short __b) {
  4894. return ~(__a | __b);
  4895. }
  4896. // This prototype is deprecated.
  4897. static inline __ATTRS_o_ai vector unsigned short
  4898. vec_nor(vector unsigned short __a, vector bool short __b) {
  4899. return ~(__a | __b);
  4900. }
  4901. static inline __ATTRS_o_ai vector bool int
  4902. vec_nor(vector bool int __a, vector bool int __b) {
  4903. return ~(__a | __b);
  4904. }
  4905. static inline __ATTRS_o_ai vector signed int
  4906. vec_nor(vector signed int __a, vector signed int __b) {
  4907. return ~(__a | __b);
  4908. }
  4909. // This prototype is deprecated.
  4910. static inline __ATTRS_o_ai vector signed int
  4911. vec_nor(vector bool int __a, vector signed int __b) {
  4912. return ~(__a | __b);
  4913. }
  4914. // This prototype is deprecated.
  4915. static inline __ATTRS_o_ai vector signed int
  4916. vec_nor(vector signed int __a, vector bool int __b) {
  4917. return ~(__a | __b);
  4918. }
  4919. static inline __ATTRS_o_ai vector unsigned int
  4920. vec_nor(vector unsigned int __a, vector unsigned int __b) {
  4921. return ~(__a | __b);
  4922. }
  4923. // This prototype is deprecated.
  4924. static inline __ATTRS_o_ai vector unsigned int
  4925. vec_nor(vector bool int __a, vector unsigned int __b) {
  4926. return ~(__a | __b);
  4927. }
  4928. // This prototype is deprecated.
  4929. static inline __ATTRS_o_ai vector unsigned int
  4930. vec_nor(vector unsigned int __a, vector bool int __b) {
  4931. return ~(__a | __b);
  4932. }
  4933. static inline __ATTRS_o_ai vector bool long long
  4934. vec_nor(vector bool long long __a, vector bool long long __b) {
  4935. return ~(__a | __b);
  4936. }
  4937. static inline __ATTRS_o_ai vector signed long long
  4938. vec_nor(vector signed long long __a, vector signed long long __b) {
  4939. return ~(__a | __b);
  4940. }
  4941. // This prototype is deprecated.
  4942. static inline __ATTRS_o_ai vector signed long long
  4943. vec_nor(vector bool long long __a, vector signed long long __b) {
  4944. return ~(__a | __b);
  4945. }
  4946. // This prototype is deprecated.
  4947. static inline __ATTRS_o_ai vector signed long long
  4948. vec_nor(vector signed long long __a, vector bool long long __b) {
  4949. return ~(__a | __b);
  4950. }
  4951. static inline __ATTRS_o_ai vector unsigned long long
  4952. vec_nor(vector unsigned long long __a, vector unsigned long long __b) {
  4953. return ~(__a | __b);
  4954. }
  4955. // This prototype is deprecated.
  4956. static inline __ATTRS_o_ai vector unsigned long long
  4957. vec_nor(vector bool long long __a, vector unsigned long long __b) {
  4958. return ~(__a | __b);
  4959. }
  4960. // This prototype is deprecated.
  4961. static inline __ATTRS_o_ai vector unsigned long long
  4962. vec_nor(vector unsigned long long __a, vector bool long long __b) {
  4963. return ~(__a | __b);
  4964. }
  4965. #if __ARCH__ >= 12
  4966. static inline __ATTRS_o_ai vector float
  4967. vec_nor(vector float __a, vector float __b) {
  4968. return (vector float)~((vector unsigned int)__a |
  4969. (vector unsigned int)__b);
  4970. }
  4971. #endif
  4972. static inline __ATTRS_o_ai vector double
  4973. vec_nor(vector double __a, vector double __b) {
  4974. return (vector double)~((vector unsigned long long)__a |
  4975. (vector unsigned long long)__b);
  4976. }
  4977. // This prototype is deprecated.
  4978. static inline __ATTRS_o_ai vector double
  4979. vec_nor(vector bool long long __a, vector double __b) {
  4980. return (vector double)~((vector unsigned long long)__a |
  4981. (vector unsigned long long)__b);
  4982. }
  4983. // This prototype is deprecated.
  4984. static inline __ATTRS_o_ai vector double
  4985. vec_nor(vector double __a, vector bool long long __b) {
  4986. return (vector double)~((vector unsigned long long)__a |
  4987. (vector unsigned long long)__b);
  4988. }
  4989. /*-- vec_orc ----------------------------------------------------------------*/
  4990. #if __ARCH__ >= 12
  4991. static inline __ATTRS_o_ai vector bool char
  4992. vec_orc(vector bool char __a, vector bool char __b) {
  4993. return __a | ~__b;
  4994. }
  4995. static inline __ATTRS_o_ai vector signed char
  4996. vec_orc(vector signed char __a, vector signed char __b) {
  4997. return __a | ~__b;
  4998. }
  4999. static inline __ATTRS_o_ai vector unsigned char
  5000. vec_orc(vector unsigned char __a, vector unsigned char __b) {
  5001. return __a | ~__b;
  5002. }
  5003. static inline __ATTRS_o_ai vector bool short
  5004. vec_orc(vector bool short __a, vector bool short __b) {
  5005. return __a | ~__b;
  5006. }
  5007. static inline __ATTRS_o_ai vector signed short
  5008. vec_orc(vector signed short __a, vector signed short __b) {
  5009. return __a | ~__b;
  5010. }
  5011. static inline __ATTRS_o_ai vector unsigned short
  5012. vec_orc(vector unsigned short __a, vector unsigned short __b) {
  5013. return __a | ~__b;
  5014. }
  5015. static inline __ATTRS_o_ai vector bool int
  5016. vec_orc(vector bool int __a, vector bool int __b) {
  5017. return __a | ~__b;
  5018. }
  5019. static inline __ATTRS_o_ai vector signed int
  5020. vec_orc(vector signed int __a, vector signed int __b) {
  5021. return __a | ~__b;
  5022. }
  5023. static inline __ATTRS_o_ai vector unsigned int
  5024. vec_orc(vector unsigned int __a, vector unsigned int __b) {
  5025. return __a | ~__b;
  5026. }
  5027. static inline __ATTRS_o_ai vector bool long long
  5028. vec_orc(vector bool long long __a, vector bool long long __b) {
  5029. return __a | ~__b;
  5030. }
  5031. static inline __ATTRS_o_ai vector signed long long
  5032. vec_orc(vector signed long long __a, vector signed long long __b) {
  5033. return __a | ~__b;
  5034. }
  5035. static inline __ATTRS_o_ai vector unsigned long long
  5036. vec_orc(vector unsigned long long __a, vector unsigned long long __b) {
  5037. return __a | ~__b;
  5038. }
  5039. static inline __ATTRS_o_ai vector float
  5040. vec_orc(vector float __a, vector float __b) {
  5041. return (vector float)((vector unsigned int)__a &
  5042. ~(vector unsigned int)__b);
  5043. }
  5044. static inline __ATTRS_o_ai vector double
  5045. vec_orc(vector double __a, vector double __b) {
  5046. return (vector double)((vector unsigned long long)__a &
  5047. ~(vector unsigned long long)__b);
  5048. }
  5049. #endif
  5050. /*-- vec_nand ---------------------------------------------------------------*/
  5051. #if __ARCH__ >= 12
  5052. static inline __ATTRS_o_ai vector bool char
  5053. vec_nand(vector bool char __a, vector bool char __b) {
  5054. return ~(__a & __b);
  5055. }
  5056. static inline __ATTRS_o_ai vector signed char
  5057. vec_nand(vector signed char __a, vector signed char __b) {
  5058. return ~(__a & __b);
  5059. }
  5060. static inline __ATTRS_o_ai vector unsigned char
  5061. vec_nand(vector unsigned char __a, vector unsigned char __b) {
  5062. return ~(__a & __b);
  5063. }
  5064. static inline __ATTRS_o_ai vector bool short
  5065. vec_nand(vector bool short __a, vector bool short __b) {
  5066. return ~(__a & __b);
  5067. }
  5068. static inline __ATTRS_o_ai vector signed short
  5069. vec_nand(vector signed short __a, vector signed short __b) {
  5070. return ~(__a & __b);
  5071. }
  5072. static inline __ATTRS_o_ai vector unsigned short
  5073. vec_nand(vector unsigned short __a, vector unsigned short __b) {
  5074. return ~(__a & __b);
  5075. }
  5076. static inline __ATTRS_o_ai vector bool int
  5077. vec_nand(vector bool int __a, vector bool int __b) {
  5078. return ~(__a & __b);
  5079. }
  5080. static inline __ATTRS_o_ai vector signed int
  5081. vec_nand(vector signed int __a, vector signed int __b) {
  5082. return ~(__a & __b);
  5083. }
  5084. static inline __ATTRS_o_ai vector unsigned int
  5085. vec_nand(vector unsigned int __a, vector unsigned int __b) {
  5086. return ~(__a & __b);
  5087. }
  5088. static inline __ATTRS_o_ai vector bool long long
  5089. vec_nand(vector bool long long __a, vector bool long long __b) {
  5090. return ~(__a & __b);
  5091. }
  5092. static inline __ATTRS_o_ai vector signed long long
  5093. vec_nand(vector signed long long __a, vector signed long long __b) {
  5094. return ~(__a & __b);
  5095. }
  5096. static inline __ATTRS_o_ai vector unsigned long long
  5097. vec_nand(vector unsigned long long __a, vector unsigned long long __b) {
  5098. return ~(__a & __b);
  5099. }
  5100. static inline __ATTRS_o_ai vector float
  5101. vec_nand(vector float __a, vector float __b) {
  5102. return (vector float)~((vector unsigned int)__a &
  5103. (vector unsigned int)__b);
  5104. }
  5105. static inline __ATTRS_o_ai vector double
  5106. vec_nand(vector double __a, vector double __b) {
  5107. return (vector double)~((vector unsigned long long)__a &
  5108. (vector unsigned long long)__b);
  5109. }
  5110. #endif
  5111. /*-- vec_eqv ----------------------------------------------------------------*/
  5112. #if __ARCH__ >= 12
  5113. static inline __ATTRS_o_ai vector bool char
  5114. vec_eqv(vector bool char __a, vector bool char __b) {
  5115. return ~(__a ^ __b);
  5116. }
  5117. static inline __ATTRS_o_ai vector signed char
  5118. vec_eqv(vector signed char __a, vector signed char __b) {
  5119. return ~(__a ^ __b);
  5120. }
  5121. static inline __ATTRS_o_ai vector unsigned char
  5122. vec_eqv(vector unsigned char __a, vector unsigned char __b) {
  5123. return ~(__a ^ __b);
  5124. }
  5125. static inline __ATTRS_o_ai vector bool short
  5126. vec_eqv(vector bool short __a, vector bool short __b) {
  5127. return ~(__a ^ __b);
  5128. }
  5129. static inline __ATTRS_o_ai vector signed short
  5130. vec_eqv(vector signed short __a, vector signed short __b) {
  5131. return ~(__a ^ __b);
  5132. }
  5133. static inline __ATTRS_o_ai vector unsigned short
  5134. vec_eqv(vector unsigned short __a, vector unsigned short __b) {
  5135. return ~(__a ^ __b);
  5136. }
  5137. static inline __ATTRS_o_ai vector bool int
  5138. vec_eqv(vector bool int __a, vector bool int __b) {
  5139. return ~(__a ^ __b);
  5140. }
  5141. static inline __ATTRS_o_ai vector signed int
  5142. vec_eqv(vector signed int __a, vector signed int __b) {
  5143. return ~(__a ^ __b);
  5144. }
  5145. static inline __ATTRS_o_ai vector unsigned int
  5146. vec_eqv(vector unsigned int __a, vector unsigned int __b) {
  5147. return ~(__a ^ __b);
  5148. }
  5149. static inline __ATTRS_o_ai vector bool long long
  5150. vec_eqv(vector bool long long __a, vector bool long long __b) {
  5151. return ~(__a ^ __b);
  5152. }
  5153. static inline __ATTRS_o_ai vector signed long long
  5154. vec_eqv(vector signed long long __a, vector signed long long __b) {
  5155. return ~(__a ^ __b);
  5156. }
  5157. static inline __ATTRS_o_ai vector unsigned long long
  5158. vec_eqv(vector unsigned long long __a, vector unsigned long long __b) {
  5159. return ~(__a ^ __b);
  5160. }
  5161. static inline __ATTRS_o_ai vector float
  5162. vec_eqv(vector float __a, vector float __b) {
  5163. return (vector float)~((vector unsigned int)__a ^
  5164. (vector unsigned int)__b);
  5165. }
  5166. static inline __ATTRS_o_ai vector double
  5167. vec_eqv(vector double __a, vector double __b) {
  5168. return (vector double)~((vector unsigned long long)__a ^
  5169. (vector unsigned long long)__b);
  5170. }
  5171. #endif
  5172. /*-- vec_cntlz --------------------------------------------------------------*/
  5173. static inline __ATTRS_o_ai vector unsigned char
  5174. vec_cntlz(vector signed char __a) {
  5175. return __builtin_s390_vclzb((vector unsigned char)__a);
  5176. }
  5177. static inline __ATTRS_o_ai vector unsigned char
  5178. vec_cntlz(vector unsigned char __a) {
  5179. return __builtin_s390_vclzb(__a);
  5180. }
  5181. static inline __ATTRS_o_ai vector unsigned short
  5182. vec_cntlz(vector signed short __a) {
  5183. return __builtin_s390_vclzh((vector unsigned short)__a);
  5184. }
  5185. static inline __ATTRS_o_ai vector unsigned short
  5186. vec_cntlz(vector unsigned short __a) {
  5187. return __builtin_s390_vclzh(__a);
  5188. }
  5189. static inline __ATTRS_o_ai vector unsigned int
  5190. vec_cntlz(vector signed int __a) {
  5191. return __builtin_s390_vclzf((vector unsigned int)__a);
  5192. }
  5193. static inline __ATTRS_o_ai vector unsigned int
  5194. vec_cntlz(vector unsigned int __a) {
  5195. return __builtin_s390_vclzf(__a);
  5196. }
  5197. static inline __ATTRS_o_ai vector unsigned long long
  5198. vec_cntlz(vector signed long long __a) {
  5199. return __builtin_s390_vclzg((vector unsigned long long)__a);
  5200. }
  5201. static inline __ATTRS_o_ai vector unsigned long long
  5202. vec_cntlz(vector unsigned long long __a) {
  5203. return __builtin_s390_vclzg(__a);
  5204. }
  5205. /*-- vec_cnttz --------------------------------------------------------------*/
  5206. static inline __ATTRS_o_ai vector unsigned char
  5207. vec_cnttz(vector signed char __a) {
  5208. return __builtin_s390_vctzb((vector unsigned char)__a);
  5209. }
  5210. static inline __ATTRS_o_ai vector unsigned char
  5211. vec_cnttz(vector unsigned char __a) {
  5212. return __builtin_s390_vctzb(__a);
  5213. }
  5214. static inline __ATTRS_o_ai vector unsigned short
  5215. vec_cnttz(vector signed short __a) {
  5216. return __builtin_s390_vctzh((vector unsigned short)__a);
  5217. }
  5218. static inline __ATTRS_o_ai vector unsigned short
  5219. vec_cnttz(vector unsigned short __a) {
  5220. return __builtin_s390_vctzh(__a);
  5221. }
  5222. static inline __ATTRS_o_ai vector unsigned int
  5223. vec_cnttz(vector signed int __a) {
  5224. return __builtin_s390_vctzf((vector unsigned int)__a);
  5225. }
  5226. static inline __ATTRS_o_ai vector unsigned int
  5227. vec_cnttz(vector unsigned int __a) {
  5228. return __builtin_s390_vctzf(__a);
  5229. }
  5230. static inline __ATTRS_o_ai vector unsigned long long
  5231. vec_cnttz(vector signed long long __a) {
  5232. return __builtin_s390_vctzg((vector unsigned long long)__a);
  5233. }
  5234. static inline __ATTRS_o_ai vector unsigned long long
  5235. vec_cnttz(vector unsigned long long __a) {
  5236. return __builtin_s390_vctzg(__a);
  5237. }
  5238. /*-- vec_popcnt -------------------------------------------------------------*/
  5239. static inline __ATTRS_o_ai vector unsigned char
  5240. vec_popcnt(vector signed char __a) {
  5241. return __builtin_s390_vpopctb((vector unsigned char)__a);
  5242. }
  5243. static inline __ATTRS_o_ai vector unsigned char
  5244. vec_popcnt(vector unsigned char __a) {
  5245. return __builtin_s390_vpopctb(__a);
  5246. }
  5247. static inline __ATTRS_o_ai vector unsigned short
  5248. vec_popcnt(vector signed short __a) {
  5249. return __builtin_s390_vpopcth((vector unsigned short)__a);
  5250. }
  5251. static inline __ATTRS_o_ai vector unsigned short
  5252. vec_popcnt(vector unsigned short __a) {
  5253. return __builtin_s390_vpopcth(__a);
  5254. }
  5255. static inline __ATTRS_o_ai vector unsigned int
  5256. vec_popcnt(vector signed int __a) {
  5257. return __builtin_s390_vpopctf((vector unsigned int)__a);
  5258. }
  5259. static inline __ATTRS_o_ai vector unsigned int
  5260. vec_popcnt(vector unsigned int __a) {
  5261. return __builtin_s390_vpopctf(__a);
  5262. }
  5263. static inline __ATTRS_o_ai vector unsigned long long
  5264. vec_popcnt(vector signed long long __a) {
  5265. return __builtin_s390_vpopctg((vector unsigned long long)__a);
  5266. }
  5267. static inline __ATTRS_o_ai vector unsigned long long
  5268. vec_popcnt(vector unsigned long long __a) {
  5269. return __builtin_s390_vpopctg(__a);
  5270. }
  5271. /*-- vec_rl -----------------------------------------------------------------*/
  5272. static inline __ATTRS_o_ai vector signed char
  5273. vec_rl(vector signed char __a, vector unsigned char __b) {
  5274. return (vector signed char)__builtin_s390_verllvb(
  5275. (vector unsigned char)__a, __b);
  5276. }
  5277. static inline __ATTRS_o_ai vector unsigned char
  5278. vec_rl(vector unsigned char __a, vector unsigned char __b) {
  5279. return __builtin_s390_verllvb(__a, __b);
  5280. }
  5281. static inline __ATTRS_o_ai vector signed short
  5282. vec_rl(vector signed short __a, vector unsigned short __b) {
  5283. return (vector signed short)__builtin_s390_verllvh(
  5284. (vector unsigned short)__a, __b);
  5285. }
  5286. static inline __ATTRS_o_ai vector unsigned short
  5287. vec_rl(vector unsigned short __a, vector unsigned short __b) {
  5288. return __builtin_s390_verllvh(__a, __b);
  5289. }
  5290. static inline __ATTRS_o_ai vector signed int
  5291. vec_rl(vector signed int __a, vector unsigned int __b) {
  5292. return (vector signed int)__builtin_s390_verllvf(
  5293. (vector unsigned int)__a, __b);
  5294. }
  5295. static inline __ATTRS_o_ai vector unsigned int
  5296. vec_rl(vector unsigned int __a, vector unsigned int __b) {
  5297. return __builtin_s390_verllvf(__a, __b);
  5298. }
  5299. static inline __ATTRS_o_ai vector signed long long
  5300. vec_rl(vector signed long long __a, vector unsigned long long __b) {
  5301. return (vector signed long long)__builtin_s390_verllvg(
  5302. (vector unsigned long long)__a, __b);
  5303. }
  5304. static inline __ATTRS_o_ai vector unsigned long long
  5305. vec_rl(vector unsigned long long __a, vector unsigned long long __b) {
  5306. return __builtin_s390_verllvg(__a, __b);
  5307. }
  5308. /*-- vec_rli ----------------------------------------------------------------*/
  5309. static inline __ATTRS_o_ai vector signed char
  5310. vec_rli(vector signed char __a, unsigned long __b) {
  5311. return (vector signed char)__builtin_s390_verllb(
  5312. (vector unsigned char)__a, (int)__b);
  5313. }
  5314. static inline __ATTRS_o_ai vector unsigned char
  5315. vec_rli(vector unsigned char __a, unsigned long __b) {
  5316. return __builtin_s390_verllb(__a, (int)__b);
  5317. }
  5318. static inline __ATTRS_o_ai vector signed short
  5319. vec_rli(vector signed short __a, unsigned long __b) {
  5320. return (vector signed short)__builtin_s390_verllh(
  5321. (vector unsigned short)__a, (int)__b);
  5322. }
  5323. static inline __ATTRS_o_ai vector unsigned short
  5324. vec_rli(vector unsigned short __a, unsigned long __b) {
  5325. return __builtin_s390_verllh(__a, (int)__b);
  5326. }
  5327. static inline __ATTRS_o_ai vector signed int
  5328. vec_rli(vector signed int __a, unsigned long __b) {
  5329. return (vector signed int)__builtin_s390_verllf(
  5330. (vector unsigned int)__a, (int)__b);
  5331. }
  5332. static inline __ATTRS_o_ai vector unsigned int
  5333. vec_rli(vector unsigned int __a, unsigned long __b) {
  5334. return __builtin_s390_verllf(__a, (int)__b);
  5335. }
  5336. static inline __ATTRS_o_ai vector signed long long
  5337. vec_rli(vector signed long long __a, unsigned long __b) {
  5338. return (vector signed long long)__builtin_s390_verllg(
  5339. (vector unsigned long long)__a, (int)__b);
  5340. }
  5341. static inline __ATTRS_o_ai vector unsigned long long
  5342. vec_rli(vector unsigned long long __a, unsigned long __b) {
  5343. return __builtin_s390_verllg(__a, (int)__b);
  5344. }
  5345. /*-- vec_rl_mask ------------------------------------------------------------*/
  5346. extern __ATTRS_o vector signed char
  5347. vec_rl_mask(vector signed char __a, vector unsigned char __b,
  5348. unsigned char __c) __constant(__c);
  5349. extern __ATTRS_o vector unsigned char
  5350. vec_rl_mask(vector unsigned char __a, vector unsigned char __b,
  5351. unsigned char __c) __constant(__c);
  5352. extern __ATTRS_o vector signed short
  5353. vec_rl_mask(vector signed short __a, vector unsigned short __b,
  5354. unsigned char __c) __constant(__c);
  5355. extern __ATTRS_o vector unsigned short
  5356. vec_rl_mask(vector unsigned short __a, vector unsigned short __b,
  5357. unsigned char __c) __constant(__c);
  5358. extern __ATTRS_o vector signed int
  5359. vec_rl_mask(vector signed int __a, vector unsigned int __b,
  5360. unsigned char __c) __constant(__c);
  5361. extern __ATTRS_o vector unsigned int
  5362. vec_rl_mask(vector unsigned int __a, vector unsigned int __b,
  5363. unsigned char __c) __constant(__c);
  5364. extern __ATTRS_o vector signed long long
  5365. vec_rl_mask(vector signed long long __a, vector unsigned long long __b,
  5366. unsigned char __c) __constant(__c);
  5367. extern __ATTRS_o vector unsigned long long
  5368. vec_rl_mask(vector unsigned long long __a, vector unsigned long long __b,
  5369. unsigned char __c) __constant(__c);
  5370. #define vec_rl_mask(X, Y, Z) ((__typeof__((vec_rl_mask)((X), (Y), (Z)))) \
  5371. __extension__ ({ \
  5372. vector unsigned char __res; \
  5373. vector unsigned char __x = (vector unsigned char)(X); \
  5374. vector unsigned char __y = (vector unsigned char)(Y); \
  5375. switch (sizeof ((X)[0])) { \
  5376. case 1: __res = (vector unsigned char) __builtin_s390_verimb( \
  5377. (vector unsigned char)__x, (vector unsigned char)__x, \
  5378. (vector unsigned char)__y, (Z)); break; \
  5379. case 2: __res = (vector unsigned char) __builtin_s390_verimh( \
  5380. (vector unsigned short)__x, (vector unsigned short)__x, \
  5381. (vector unsigned short)__y, (Z)); break; \
  5382. case 4: __res = (vector unsigned char) __builtin_s390_verimf( \
  5383. (vector unsigned int)__x, (vector unsigned int)__x, \
  5384. (vector unsigned int)__y, (Z)); break; \
  5385. default: __res = (vector unsigned char) __builtin_s390_verimg( \
  5386. (vector unsigned long long)__x, (vector unsigned long long)__x, \
  5387. (vector unsigned long long)__y, (Z)); break; \
  5388. } __res; }))
  5389. /*-- vec_sll ----------------------------------------------------------------*/
  5390. static inline __ATTRS_o_ai vector signed char
  5391. vec_sll(vector signed char __a, vector unsigned char __b) {
  5392. return (vector signed char)__builtin_s390_vsl(
  5393. (vector unsigned char)__a, __b);
  5394. }
  5395. // This prototype is deprecated.
  5396. static inline __ATTRS_o_ai vector signed char
  5397. vec_sll(vector signed char __a, vector unsigned short __b) {
  5398. return (vector signed char)__builtin_s390_vsl(
  5399. (vector unsigned char)__a, (vector unsigned char)__b);
  5400. }
  5401. // This prototype is deprecated.
  5402. static inline __ATTRS_o_ai vector signed char
  5403. vec_sll(vector signed char __a, vector unsigned int __b) {
  5404. return (vector signed char)__builtin_s390_vsl(
  5405. (vector unsigned char)__a, (vector unsigned char)__b);
  5406. }
  5407. // This prototype is deprecated.
  5408. static inline __ATTRS_o_ai vector bool char
  5409. vec_sll(vector bool char __a, vector unsigned char __b) {
  5410. return (vector bool char)__builtin_s390_vsl(
  5411. (vector unsigned char)__a, __b);
  5412. }
  5413. // This prototype is deprecated.
  5414. static inline __ATTRS_o_ai vector bool char
  5415. vec_sll(vector bool char __a, vector unsigned short __b) {
  5416. return (vector bool char)__builtin_s390_vsl(
  5417. (vector unsigned char)__a, (vector unsigned char)__b);
  5418. }
  5419. // This prototype is deprecated.
  5420. static inline __ATTRS_o_ai vector bool char
  5421. vec_sll(vector bool char __a, vector unsigned int __b) {
  5422. return (vector bool char)__builtin_s390_vsl(
  5423. (vector unsigned char)__a, (vector unsigned char)__b);
  5424. }
  5425. static inline __ATTRS_o_ai vector unsigned char
  5426. vec_sll(vector unsigned char __a, vector unsigned char __b) {
  5427. return __builtin_s390_vsl(__a, __b);
  5428. }
  5429. // This prototype is deprecated.
  5430. static inline __ATTRS_o_ai vector unsigned char
  5431. vec_sll(vector unsigned char __a, vector unsigned short __b) {
  5432. return __builtin_s390_vsl(__a, (vector unsigned char)__b);
  5433. }
  5434. // This prototype is deprecated.
  5435. static inline __ATTRS_o_ai vector unsigned char
  5436. vec_sll(vector unsigned char __a, vector unsigned int __b) {
  5437. return __builtin_s390_vsl(__a, (vector unsigned char)__b);
  5438. }
  5439. static inline __ATTRS_o_ai vector signed short
  5440. vec_sll(vector signed short __a, vector unsigned char __b) {
  5441. return (vector signed short)__builtin_s390_vsl(
  5442. (vector unsigned char)__a, __b);
  5443. }
  5444. // This prototype is deprecated.
  5445. static inline __ATTRS_o_ai vector signed short
  5446. vec_sll(vector signed short __a, vector unsigned short __b) {
  5447. return (vector signed short)__builtin_s390_vsl(
  5448. (vector unsigned char)__a, (vector unsigned char)__b);
  5449. }
  5450. // This prototype is deprecated.
  5451. static inline __ATTRS_o_ai vector signed short
  5452. vec_sll(vector signed short __a, vector unsigned int __b) {
  5453. return (vector signed short)__builtin_s390_vsl(
  5454. (vector unsigned char)__a, (vector unsigned char)__b);
  5455. }
  5456. // This prototype is deprecated.
  5457. static inline __ATTRS_o_ai vector bool short
  5458. vec_sll(vector bool short __a, vector unsigned char __b) {
  5459. return (vector bool short)__builtin_s390_vsl(
  5460. (vector unsigned char)__a, __b);
  5461. }
  5462. // This prototype is deprecated.
  5463. static inline __ATTRS_o_ai vector bool short
  5464. vec_sll(vector bool short __a, vector unsigned short __b) {
  5465. return (vector bool short)__builtin_s390_vsl(
  5466. (vector unsigned char)__a, (vector unsigned char)__b);
  5467. }
  5468. // This prototype is deprecated.
  5469. static inline __ATTRS_o_ai vector bool short
  5470. vec_sll(vector bool short __a, vector unsigned int __b) {
  5471. return (vector bool short)__builtin_s390_vsl(
  5472. (vector unsigned char)__a, (vector unsigned char)__b);
  5473. }
  5474. static inline __ATTRS_o_ai vector unsigned short
  5475. vec_sll(vector unsigned short __a, vector unsigned char __b) {
  5476. return (vector unsigned short)__builtin_s390_vsl(
  5477. (vector unsigned char)__a, __b);
  5478. }
  5479. // This prototype is deprecated.
  5480. static inline __ATTRS_o_ai vector unsigned short
  5481. vec_sll(vector unsigned short __a, vector unsigned short __b) {
  5482. return (vector unsigned short)__builtin_s390_vsl(
  5483. (vector unsigned char)__a, (vector unsigned char)__b);
  5484. }
  5485. // This prototype is deprecated.
  5486. static inline __ATTRS_o_ai vector unsigned short
  5487. vec_sll(vector unsigned short __a, vector unsigned int __b) {
  5488. return (vector unsigned short)__builtin_s390_vsl(
  5489. (vector unsigned char)__a, (vector unsigned char)__b);
  5490. }
  5491. static inline __ATTRS_o_ai vector signed int
  5492. vec_sll(vector signed int __a, vector unsigned char __b) {
  5493. return (vector signed int)__builtin_s390_vsl(
  5494. (vector unsigned char)__a, __b);
  5495. }
  5496. // This prototype is deprecated.
  5497. static inline __ATTRS_o_ai vector signed int
  5498. vec_sll(vector signed int __a, vector unsigned short __b) {
  5499. return (vector signed int)__builtin_s390_vsl(
  5500. (vector unsigned char)__a, (vector unsigned char)__b);
  5501. }
  5502. // This prototype is deprecated.
  5503. static inline __ATTRS_o_ai vector signed int
  5504. vec_sll(vector signed int __a, vector unsigned int __b) {
  5505. return (vector signed int)__builtin_s390_vsl(
  5506. (vector unsigned char)__a, (vector unsigned char)__b);
  5507. }
  5508. // This prototype is deprecated.
  5509. static inline __ATTRS_o_ai vector bool int
  5510. vec_sll(vector bool int __a, vector unsigned char __b) {
  5511. return (vector bool int)__builtin_s390_vsl(
  5512. (vector unsigned char)__a, __b);
  5513. }
  5514. // This prototype is deprecated.
  5515. static inline __ATTRS_o_ai vector bool int
  5516. vec_sll(vector bool int __a, vector unsigned short __b) {
  5517. return (vector bool int)__builtin_s390_vsl(
  5518. (vector unsigned char)__a, (vector unsigned char)__b);
  5519. }
  5520. // This prototype is deprecated.
  5521. static inline __ATTRS_o_ai vector bool int
  5522. vec_sll(vector bool int __a, vector unsigned int __b) {
  5523. return (vector bool int)__builtin_s390_vsl(
  5524. (vector unsigned char)__a, (vector unsigned char)__b);
  5525. }
  5526. static inline __ATTRS_o_ai vector unsigned int
  5527. vec_sll(vector unsigned int __a, vector unsigned char __b) {
  5528. return (vector unsigned int)__builtin_s390_vsl(
  5529. (vector unsigned char)__a, __b);
  5530. }
  5531. // This prototype is deprecated.
  5532. static inline __ATTRS_o_ai vector unsigned int
  5533. vec_sll(vector unsigned int __a, vector unsigned short __b) {
  5534. return (vector unsigned int)__builtin_s390_vsl(
  5535. (vector unsigned char)__a, (vector unsigned char)__b);
  5536. }
  5537. // This prototype is deprecated.
  5538. static inline __ATTRS_o_ai vector unsigned int
  5539. vec_sll(vector unsigned int __a, vector unsigned int __b) {
  5540. return (vector unsigned int)__builtin_s390_vsl(
  5541. (vector unsigned char)__a, (vector unsigned char)__b);
  5542. }
  5543. static inline __ATTRS_o_ai vector signed long long
  5544. vec_sll(vector signed long long __a, vector unsigned char __b) {
  5545. return (vector signed long long)__builtin_s390_vsl(
  5546. (vector unsigned char)__a, __b);
  5547. }
  5548. // This prototype is deprecated.
  5549. static inline __ATTRS_o_ai vector signed long long
  5550. vec_sll(vector signed long long __a, vector unsigned short __b) {
  5551. return (vector signed long long)__builtin_s390_vsl(
  5552. (vector unsigned char)__a, (vector unsigned char)__b);
  5553. }
  5554. // This prototype is deprecated.
  5555. static inline __ATTRS_o_ai vector signed long long
  5556. vec_sll(vector signed long long __a, vector unsigned int __b) {
  5557. return (vector signed long long)__builtin_s390_vsl(
  5558. (vector unsigned char)__a, (vector unsigned char)__b);
  5559. }
  5560. // This prototype is deprecated.
  5561. static inline __ATTRS_o_ai vector bool long long
  5562. vec_sll(vector bool long long __a, vector unsigned char __b) {
  5563. return (vector bool long long)__builtin_s390_vsl(
  5564. (vector unsigned char)__a, __b);
  5565. }
  5566. // This prototype is deprecated.
  5567. static inline __ATTRS_o_ai vector bool long long
  5568. vec_sll(vector bool long long __a, vector unsigned short __b) {
  5569. return (vector bool long long)__builtin_s390_vsl(
  5570. (vector unsigned char)__a, (vector unsigned char)__b);
  5571. }
  5572. // This prototype is deprecated.
  5573. static inline __ATTRS_o_ai vector bool long long
  5574. vec_sll(vector bool long long __a, vector unsigned int __b) {
  5575. return (vector bool long long)__builtin_s390_vsl(
  5576. (vector unsigned char)__a, (vector unsigned char)__b);
  5577. }
  5578. static inline __ATTRS_o_ai vector unsigned long long
  5579. vec_sll(vector unsigned long long __a, vector unsigned char __b) {
  5580. return (vector unsigned long long)__builtin_s390_vsl(
  5581. (vector unsigned char)__a, __b);
  5582. }
  5583. // This prototype is deprecated.
  5584. static inline __ATTRS_o_ai vector unsigned long long
  5585. vec_sll(vector unsigned long long __a, vector unsigned short __b) {
  5586. return (vector unsigned long long)__builtin_s390_vsl(
  5587. (vector unsigned char)__a, (vector unsigned char)__b);
  5588. }
  5589. // This prototype is deprecated.
  5590. static inline __ATTRS_o_ai vector unsigned long long
  5591. vec_sll(vector unsigned long long __a, vector unsigned int __b) {
  5592. return (vector unsigned long long)__builtin_s390_vsl(
  5593. (vector unsigned char)__a, (vector unsigned char)__b);
  5594. }
  5595. /*-- vec_slb ----------------------------------------------------------------*/
  5596. static inline __ATTRS_o_ai vector signed char
  5597. vec_slb(vector signed char __a, vector signed char __b) {
  5598. return (vector signed char)__builtin_s390_vslb(
  5599. (vector unsigned char)__a, (vector unsigned char)__b);
  5600. }
  5601. static inline __ATTRS_o_ai vector signed char
  5602. vec_slb(vector signed char __a, vector unsigned char __b) {
  5603. return (vector signed char)__builtin_s390_vslb(
  5604. (vector unsigned char)__a, __b);
  5605. }
  5606. static inline __ATTRS_o_ai vector unsigned char
  5607. vec_slb(vector unsigned char __a, vector signed char __b) {
  5608. return __builtin_s390_vslb(__a, (vector unsigned char)__b);
  5609. }
  5610. static inline __ATTRS_o_ai vector unsigned char
  5611. vec_slb(vector unsigned char __a, vector unsigned char __b) {
  5612. return __builtin_s390_vslb(__a, __b);
  5613. }
  5614. static inline __ATTRS_o_ai vector signed short
  5615. vec_slb(vector signed short __a, vector signed short __b) {
  5616. return (vector signed short)__builtin_s390_vslb(
  5617. (vector unsigned char)__a, (vector unsigned char)__b);
  5618. }
  5619. static inline __ATTRS_o_ai vector signed short
  5620. vec_slb(vector signed short __a, vector unsigned short __b) {
  5621. return (vector signed short)__builtin_s390_vslb(
  5622. (vector unsigned char)__a, (vector unsigned char)__b);
  5623. }
  5624. static inline __ATTRS_o_ai vector unsigned short
  5625. vec_slb(vector unsigned short __a, vector signed short __b) {
  5626. return (vector unsigned short)__builtin_s390_vslb(
  5627. (vector unsigned char)__a, (vector unsigned char)__b);
  5628. }
  5629. static inline __ATTRS_o_ai vector unsigned short
  5630. vec_slb(vector unsigned short __a, vector unsigned short __b) {
  5631. return (vector unsigned short)__builtin_s390_vslb(
  5632. (vector unsigned char)__a, (vector unsigned char)__b);
  5633. }
  5634. static inline __ATTRS_o_ai vector signed int
  5635. vec_slb(vector signed int __a, vector signed int __b) {
  5636. return (vector signed int)__builtin_s390_vslb(
  5637. (vector unsigned char)__a, (vector unsigned char)__b);
  5638. }
  5639. static inline __ATTRS_o_ai vector signed int
  5640. vec_slb(vector signed int __a, vector unsigned int __b) {
  5641. return (vector signed int)__builtin_s390_vslb(
  5642. (vector unsigned char)__a, (vector unsigned char)__b);
  5643. }
  5644. static inline __ATTRS_o_ai vector unsigned int
  5645. vec_slb(vector unsigned int __a, vector signed int __b) {
  5646. return (vector unsigned int)__builtin_s390_vslb(
  5647. (vector unsigned char)__a, (vector unsigned char)__b);
  5648. }
  5649. static inline __ATTRS_o_ai vector unsigned int
  5650. vec_slb(vector unsigned int __a, vector unsigned int __b) {
  5651. return (vector unsigned int)__builtin_s390_vslb(
  5652. (vector unsigned char)__a, (vector unsigned char)__b);
  5653. }
  5654. static inline __ATTRS_o_ai vector signed long long
  5655. vec_slb(vector signed long long __a, vector signed long long __b) {
  5656. return (vector signed long long)__builtin_s390_vslb(
  5657. (vector unsigned char)__a, (vector unsigned char)__b);
  5658. }
  5659. static inline __ATTRS_o_ai vector signed long long
  5660. vec_slb(vector signed long long __a, vector unsigned long long __b) {
  5661. return (vector signed long long)__builtin_s390_vslb(
  5662. (vector unsigned char)__a, (vector unsigned char)__b);
  5663. }
  5664. static inline __ATTRS_o_ai vector unsigned long long
  5665. vec_slb(vector unsigned long long __a, vector signed long long __b) {
  5666. return (vector unsigned long long)__builtin_s390_vslb(
  5667. (vector unsigned char)__a, (vector unsigned char)__b);
  5668. }
  5669. static inline __ATTRS_o_ai vector unsigned long long
  5670. vec_slb(vector unsigned long long __a, vector unsigned long long __b) {
  5671. return (vector unsigned long long)__builtin_s390_vslb(
  5672. (vector unsigned char)__a, (vector unsigned char)__b);
  5673. }
  5674. #if __ARCH__ >= 12
  5675. static inline __ATTRS_o_ai vector float
  5676. vec_slb(vector float __a, vector signed int __b) {
  5677. return (vector float)__builtin_s390_vslb(
  5678. (vector unsigned char)__a, (vector unsigned char)__b);
  5679. }
  5680. static inline __ATTRS_o_ai vector float
  5681. vec_slb(vector float __a, vector unsigned int __b) {
  5682. return (vector float)__builtin_s390_vslb(
  5683. (vector unsigned char)__a, (vector unsigned char)__b);
  5684. }
  5685. #endif
  5686. static inline __ATTRS_o_ai vector double
  5687. vec_slb(vector double __a, vector signed long long __b) {
  5688. return (vector double)__builtin_s390_vslb(
  5689. (vector unsigned char)__a, (vector unsigned char)__b);
  5690. }
  5691. static inline __ATTRS_o_ai vector double
  5692. vec_slb(vector double __a, vector unsigned long long __b) {
  5693. return (vector double)__builtin_s390_vslb(
  5694. (vector unsigned char)__a, (vector unsigned char)__b);
  5695. }
  5696. /*-- vec_sld ----------------------------------------------------------------*/
  5697. extern __ATTRS_o vector signed char
  5698. vec_sld(vector signed char __a, vector signed char __b, int __c)
  5699. __constant_range(__c, 0, 15);
  5700. extern __ATTRS_o vector bool char
  5701. vec_sld(vector bool char __a, vector bool char __b, int __c)
  5702. __constant_range(__c, 0, 15);
  5703. extern __ATTRS_o vector unsigned char
  5704. vec_sld(vector unsigned char __a, vector unsigned char __b, int __c)
  5705. __constant_range(__c, 0, 15);
  5706. extern __ATTRS_o vector signed short
  5707. vec_sld(vector signed short __a, vector signed short __b, int __c)
  5708. __constant_range(__c, 0, 15);
  5709. extern __ATTRS_o vector bool short
  5710. vec_sld(vector bool short __a, vector bool short __b, int __c)
  5711. __constant_range(__c, 0, 15);
  5712. extern __ATTRS_o vector unsigned short
  5713. vec_sld(vector unsigned short __a, vector unsigned short __b, int __c)
  5714. __constant_range(__c, 0, 15);
  5715. extern __ATTRS_o vector signed int
  5716. vec_sld(vector signed int __a, vector signed int __b, int __c)
  5717. __constant_range(__c, 0, 15);
  5718. extern __ATTRS_o vector bool int
  5719. vec_sld(vector bool int __a, vector bool int __b, int __c)
  5720. __constant_range(__c, 0, 15);
  5721. extern __ATTRS_o vector unsigned int
  5722. vec_sld(vector unsigned int __a, vector unsigned int __b, int __c)
  5723. __constant_range(__c, 0, 15);
  5724. extern __ATTRS_o vector signed long long
  5725. vec_sld(vector signed long long __a, vector signed long long __b, int __c)
  5726. __constant_range(__c, 0, 15);
  5727. extern __ATTRS_o vector bool long long
  5728. vec_sld(vector bool long long __a, vector bool long long __b, int __c)
  5729. __constant_range(__c, 0, 15);
  5730. extern __ATTRS_o vector unsigned long long
  5731. vec_sld(vector unsigned long long __a, vector unsigned long long __b, int __c)
  5732. __constant_range(__c, 0, 15);
  5733. #if __ARCH__ >= 12
  5734. extern __ATTRS_o vector float
  5735. vec_sld(vector float __a, vector float __b, int __c)
  5736. __constant_range(__c, 0, 15);
  5737. #endif
  5738. extern __ATTRS_o vector double
  5739. vec_sld(vector double __a, vector double __b, int __c)
  5740. __constant_range(__c, 0, 15);
  5741. #define vec_sld(X, Y, Z) ((__typeof__((vec_sld)((X), (Y), (Z)))) \
  5742. __builtin_s390_vsldb((vector unsigned char)(X), \
  5743. (vector unsigned char)(Y), (Z)))
  5744. /*-- vec_sldw ---------------------------------------------------------------*/
  5745. extern __ATTRS_o vector signed char
  5746. vec_sldw(vector signed char __a, vector signed char __b, int __c)
  5747. __constant_range(__c, 0, 3);
  5748. extern __ATTRS_o vector unsigned char
  5749. vec_sldw(vector unsigned char __a, vector unsigned char __b, int __c)
  5750. __constant_range(__c, 0, 3);
  5751. extern __ATTRS_o vector signed short
  5752. vec_sldw(vector signed short __a, vector signed short __b, int __c)
  5753. __constant_range(__c, 0, 3);
  5754. extern __ATTRS_o vector unsigned short
  5755. vec_sldw(vector unsigned short __a, vector unsigned short __b, int __c)
  5756. __constant_range(__c, 0, 3);
  5757. extern __ATTRS_o vector signed int
  5758. vec_sldw(vector signed int __a, vector signed int __b, int __c)
  5759. __constant_range(__c, 0, 3);
  5760. extern __ATTRS_o vector unsigned int
  5761. vec_sldw(vector unsigned int __a, vector unsigned int __b, int __c)
  5762. __constant_range(__c, 0, 3);
  5763. extern __ATTRS_o vector signed long long
  5764. vec_sldw(vector signed long long __a, vector signed long long __b, int __c)
  5765. __constant_range(__c, 0, 3);
  5766. extern __ATTRS_o vector unsigned long long
  5767. vec_sldw(vector unsigned long long __a, vector unsigned long long __b, int __c)
  5768. __constant_range(__c, 0, 3);
  5769. // This prototype is deprecated.
  5770. extern __ATTRS_o vector double
  5771. vec_sldw(vector double __a, vector double __b, int __c)
  5772. __constant_range(__c, 0, 3);
  5773. #define vec_sldw(X, Y, Z) ((__typeof__((vec_sldw)((X), (Y), (Z)))) \
  5774. __builtin_s390_vsldb((vector unsigned char)(X), \
  5775. (vector unsigned char)(Y), (Z) * 4))
  5776. /*-- vec_sral ---------------------------------------------------------------*/
  5777. static inline __ATTRS_o_ai vector signed char
  5778. vec_sral(vector signed char __a, vector unsigned char __b) {
  5779. return (vector signed char)__builtin_s390_vsra(
  5780. (vector unsigned char)__a, __b);
  5781. }
  5782. // This prototype is deprecated.
  5783. static inline __ATTRS_o_ai vector signed char
  5784. vec_sral(vector signed char __a, vector unsigned short __b) {
  5785. return (vector signed char)__builtin_s390_vsra(
  5786. (vector unsigned char)__a, (vector unsigned char)__b);
  5787. }
  5788. // This prototype is deprecated.
  5789. static inline __ATTRS_o_ai vector signed char
  5790. vec_sral(vector signed char __a, vector unsigned int __b) {
  5791. return (vector signed char)__builtin_s390_vsra(
  5792. (vector unsigned char)__a, (vector unsigned char)__b);
  5793. }
  5794. // This prototype is deprecated.
  5795. static inline __ATTRS_o_ai vector bool char
  5796. vec_sral(vector bool char __a, vector unsigned char __b) {
  5797. return (vector bool char)__builtin_s390_vsra(
  5798. (vector unsigned char)__a, __b);
  5799. }
  5800. // This prototype is deprecated.
  5801. static inline __ATTRS_o_ai vector bool char
  5802. vec_sral(vector bool char __a, vector unsigned short __b) {
  5803. return (vector bool char)__builtin_s390_vsra(
  5804. (vector unsigned char)__a, (vector unsigned char)__b);
  5805. }
  5806. // This prototype is deprecated.
  5807. static inline __ATTRS_o_ai vector bool char
  5808. vec_sral(vector bool char __a, vector unsigned int __b) {
  5809. return (vector bool char)__builtin_s390_vsra(
  5810. (vector unsigned char)__a, (vector unsigned char)__b);
  5811. }
  5812. static inline __ATTRS_o_ai vector unsigned char
  5813. vec_sral(vector unsigned char __a, vector unsigned char __b) {
  5814. return __builtin_s390_vsra(__a, __b);
  5815. }
  5816. // This prototype is deprecated.
  5817. static inline __ATTRS_o_ai vector unsigned char
  5818. vec_sral(vector unsigned char __a, vector unsigned short __b) {
  5819. return __builtin_s390_vsra(__a, (vector unsigned char)__b);
  5820. }
  5821. // This prototype is deprecated.
  5822. static inline __ATTRS_o_ai vector unsigned char
  5823. vec_sral(vector unsigned char __a, vector unsigned int __b) {
  5824. return __builtin_s390_vsra(__a, (vector unsigned char)__b);
  5825. }
  5826. static inline __ATTRS_o_ai vector signed short
  5827. vec_sral(vector signed short __a, vector unsigned char __b) {
  5828. return (vector signed short)__builtin_s390_vsra(
  5829. (vector unsigned char)__a, __b);
  5830. }
  5831. // This prototype is deprecated.
  5832. static inline __ATTRS_o_ai vector signed short
  5833. vec_sral(vector signed short __a, vector unsigned short __b) {
  5834. return (vector signed short)__builtin_s390_vsra(
  5835. (vector unsigned char)__a, (vector unsigned char)__b);
  5836. }
  5837. // This prototype is deprecated.
  5838. static inline __ATTRS_o_ai vector signed short
  5839. vec_sral(vector signed short __a, vector unsigned int __b) {
  5840. return (vector signed short)__builtin_s390_vsra(
  5841. (vector unsigned char)__a, (vector unsigned char)__b);
  5842. }
  5843. // This prototype is deprecated.
  5844. static inline __ATTRS_o_ai vector bool short
  5845. vec_sral(vector bool short __a, vector unsigned char __b) {
  5846. return (vector bool short)__builtin_s390_vsra(
  5847. (vector unsigned char)__a, __b);
  5848. }
  5849. // This prototype is deprecated.
  5850. static inline __ATTRS_o_ai vector bool short
  5851. vec_sral(vector bool short __a, vector unsigned short __b) {
  5852. return (vector bool short)__builtin_s390_vsra(
  5853. (vector unsigned char)__a, (vector unsigned char)__b);
  5854. }
  5855. // This prototype is deprecated.
  5856. static inline __ATTRS_o_ai vector bool short
  5857. vec_sral(vector bool short __a, vector unsigned int __b) {
  5858. return (vector bool short)__builtin_s390_vsra(
  5859. (vector unsigned char)__a, (vector unsigned char)__b);
  5860. }
  5861. static inline __ATTRS_o_ai vector unsigned short
  5862. vec_sral(vector unsigned short __a, vector unsigned char __b) {
  5863. return (vector unsigned short)__builtin_s390_vsra(
  5864. (vector unsigned char)__a, __b);
  5865. }
  5866. // This prototype is deprecated.
  5867. static inline __ATTRS_o_ai vector unsigned short
  5868. vec_sral(vector unsigned short __a, vector unsigned short __b) {
  5869. return (vector unsigned short)__builtin_s390_vsra(
  5870. (vector unsigned char)__a, (vector unsigned char)__b);
  5871. }
  5872. // This prototype is deprecated.
  5873. static inline __ATTRS_o_ai vector unsigned short
  5874. vec_sral(vector unsigned short __a, vector unsigned int __b) {
  5875. return (vector unsigned short)__builtin_s390_vsra(
  5876. (vector unsigned char)__a, (vector unsigned char)__b);
  5877. }
  5878. static inline __ATTRS_o_ai vector signed int
  5879. vec_sral(vector signed int __a, vector unsigned char __b) {
  5880. return (vector signed int)__builtin_s390_vsra(
  5881. (vector unsigned char)__a, __b);
  5882. }
  5883. // This prototype is deprecated.
  5884. static inline __ATTRS_o_ai vector signed int
  5885. vec_sral(vector signed int __a, vector unsigned short __b) {
  5886. return (vector signed int)__builtin_s390_vsra(
  5887. (vector unsigned char)__a, (vector unsigned char)__b);
  5888. }
  5889. // This prototype is deprecated.
  5890. static inline __ATTRS_o_ai vector signed int
  5891. vec_sral(vector signed int __a, vector unsigned int __b) {
  5892. return (vector signed int)__builtin_s390_vsra(
  5893. (vector unsigned char)__a, (vector unsigned char)__b);
  5894. }
  5895. // This prototype is deprecated.
  5896. static inline __ATTRS_o_ai vector bool int
  5897. vec_sral(vector bool int __a, vector unsigned char __b) {
  5898. return (vector bool int)__builtin_s390_vsra(
  5899. (vector unsigned char)__a, __b);
  5900. }
  5901. // This prototype is deprecated.
  5902. static inline __ATTRS_o_ai vector bool int
  5903. vec_sral(vector bool int __a, vector unsigned short __b) {
  5904. return (vector bool int)__builtin_s390_vsra(
  5905. (vector unsigned char)__a, (vector unsigned char)__b);
  5906. }
  5907. // This prototype is deprecated.
  5908. static inline __ATTRS_o_ai vector bool int
  5909. vec_sral(vector bool int __a, vector unsigned int __b) {
  5910. return (vector bool int)__builtin_s390_vsra(
  5911. (vector unsigned char)__a, (vector unsigned char)__b);
  5912. }
  5913. static inline __ATTRS_o_ai vector unsigned int
  5914. vec_sral(vector unsigned int __a, vector unsigned char __b) {
  5915. return (vector unsigned int)__builtin_s390_vsra(
  5916. (vector unsigned char)__a, __b);
  5917. }
  5918. // This prototype is deprecated.
  5919. static inline __ATTRS_o_ai vector unsigned int
  5920. vec_sral(vector unsigned int __a, vector unsigned short __b) {
  5921. return (vector unsigned int)__builtin_s390_vsra(
  5922. (vector unsigned char)__a, (vector unsigned char)__b);
  5923. }
  5924. // This prototype is deprecated.
  5925. static inline __ATTRS_o_ai vector unsigned int
  5926. vec_sral(vector unsigned int __a, vector unsigned int __b) {
  5927. return (vector unsigned int)__builtin_s390_vsra(
  5928. (vector unsigned char)__a, (vector unsigned char)__b);
  5929. }
  5930. static inline __ATTRS_o_ai vector signed long long
  5931. vec_sral(vector signed long long __a, vector unsigned char __b) {
  5932. return (vector signed long long)__builtin_s390_vsra(
  5933. (vector unsigned char)__a, __b);
  5934. }
  5935. // This prototype is deprecated.
  5936. static inline __ATTRS_o_ai vector signed long long
  5937. vec_sral(vector signed long long __a, vector unsigned short __b) {
  5938. return (vector signed long long)__builtin_s390_vsra(
  5939. (vector unsigned char)__a, (vector unsigned char)__b);
  5940. }
  5941. // This prototype is deprecated.
  5942. static inline __ATTRS_o_ai vector signed long long
  5943. vec_sral(vector signed long long __a, vector unsigned int __b) {
  5944. return (vector signed long long)__builtin_s390_vsra(
  5945. (vector unsigned char)__a, (vector unsigned char)__b);
  5946. }
  5947. // This prototype is deprecated.
  5948. static inline __ATTRS_o_ai vector bool long long
  5949. vec_sral(vector bool long long __a, vector unsigned char __b) {
  5950. return (vector bool long long)__builtin_s390_vsra(
  5951. (vector unsigned char)__a, __b);
  5952. }
  5953. // This prototype is deprecated.
  5954. static inline __ATTRS_o_ai vector bool long long
  5955. vec_sral(vector bool long long __a, vector unsigned short __b) {
  5956. return (vector bool long long)__builtin_s390_vsra(
  5957. (vector unsigned char)__a, (vector unsigned char)__b);
  5958. }
  5959. // This prototype is deprecated.
  5960. static inline __ATTRS_o_ai vector bool long long
  5961. vec_sral(vector bool long long __a, vector unsigned int __b) {
  5962. return (vector bool long long)__builtin_s390_vsra(
  5963. (vector unsigned char)__a, (vector unsigned char)__b);
  5964. }
  5965. static inline __ATTRS_o_ai vector unsigned long long
  5966. vec_sral(vector unsigned long long __a, vector unsigned char __b) {
  5967. return (vector unsigned long long)__builtin_s390_vsra(
  5968. (vector unsigned char)__a, __b);
  5969. }
  5970. // This prototype is deprecated.
  5971. static inline __ATTRS_o_ai vector unsigned long long
  5972. vec_sral(vector unsigned long long __a, vector unsigned short __b) {
  5973. return (vector unsigned long long)__builtin_s390_vsra(
  5974. (vector unsigned char)__a, (vector unsigned char)__b);
  5975. }
  5976. // This prototype is deprecated.
  5977. static inline __ATTRS_o_ai vector unsigned long long
  5978. vec_sral(vector unsigned long long __a, vector unsigned int __b) {
  5979. return (vector unsigned long long)__builtin_s390_vsra(
  5980. (vector unsigned char)__a, (vector unsigned char)__b);
  5981. }
  5982. /*-- vec_srab ---------------------------------------------------------------*/
  5983. static inline __ATTRS_o_ai vector signed char
  5984. vec_srab(vector signed char __a, vector signed char __b) {
  5985. return (vector signed char)__builtin_s390_vsrab(
  5986. (vector unsigned char)__a, (vector unsigned char)__b);
  5987. }
  5988. static inline __ATTRS_o_ai vector signed char
  5989. vec_srab(vector signed char __a, vector unsigned char __b) {
  5990. return (vector signed char)__builtin_s390_vsrab(
  5991. (vector unsigned char)__a, __b);
  5992. }
  5993. static inline __ATTRS_o_ai vector unsigned char
  5994. vec_srab(vector unsigned char __a, vector signed char __b) {
  5995. return __builtin_s390_vsrab(__a, (vector unsigned char)__b);
  5996. }
  5997. static inline __ATTRS_o_ai vector unsigned char
  5998. vec_srab(vector unsigned char __a, vector unsigned char __b) {
  5999. return __builtin_s390_vsrab(__a, __b);
  6000. }
  6001. static inline __ATTRS_o_ai vector signed short
  6002. vec_srab(vector signed short __a, vector signed short __b) {
  6003. return (vector signed short)__builtin_s390_vsrab(
  6004. (vector unsigned char)__a, (vector unsigned char)__b);
  6005. }
  6006. static inline __ATTRS_o_ai vector signed short
  6007. vec_srab(vector signed short __a, vector unsigned short __b) {
  6008. return (vector signed short)__builtin_s390_vsrab(
  6009. (vector unsigned char)__a, (vector unsigned char)__b);
  6010. }
  6011. static inline __ATTRS_o_ai vector unsigned short
  6012. vec_srab(vector unsigned short __a, vector signed short __b) {
  6013. return (vector unsigned short)__builtin_s390_vsrab(
  6014. (vector unsigned char)__a, (vector unsigned char)__b);
  6015. }
  6016. static inline __ATTRS_o_ai vector unsigned short
  6017. vec_srab(vector unsigned short __a, vector unsigned short __b) {
  6018. return (vector unsigned short)__builtin_s390_vsrab(
  6019. (vector unsigned char)__a, (vector unsigned char)__b);
  6020. }
  6021. static inline __ATTRS_o_ai vector signed int
  6022. vec_srab(vector signed int __a, vector signed int __b) {
  6023. return (vector signed int)__builtin_s390_vsrab(
  6024. (vector unsigned char)__a, (vector unsigned char)__b);
  6025. }
  6026. static inline __ATTRS_o_ai vector signed int
  6027. vec_srab(vector signed int __a, vector unsigned int __b) {
  6028. return (vector signed int)__builtin_s390_vsrab(
  6029. (vector unsigned char)__a, (vector unsigned char)__b);
  6030. }
  6031. static inline __ATTRS_o_ai vector unsigned int
  6032. vec_srab(vector unsigned int __a, vector signed int __b) {
  6033. return (vector unsigned int)__builtin_s390_vsrab(
  6034. (vector unsigned char)__a, (vector unsigned char)__b);
  6035. }
  6036. static inline __ATTRS_o_ai vector unsigned int
  6037. vec_srab(vector unsigned int __a, vector unsigned int __b) {
  6038. return (vector unsigned int)__builtin_s390_vsrab(
  6039. (vector unsigned char)__a, (vector unsigned char)__b);
  6040. }
  6041. static inline __ATTRS_o_ai vector signed long long
  6042. vec_srab(vector signed long long __a, vector signed long long __b) {
  6043. return (vector signed long long)__builtin_s390_vsrab(
  6044. (vector unsigned char)__a, (vector unsigned char)__b);
  6045. }
  6046. static inline __ATTRS_o_ai vector signed long long
  6047. vec_srab(vector signed long long __a, vector unsigned long long __b) {
  6048. return (vector signed long long)__builtin_s390_vsrab(
  6049. (vector unsigned char)__a, (vector unsigned char)__b);
  6050. }
  6051. static inline __ATTRS_o_ai vector unsigned long long
  6052. vec_srab(vector unsigned long long __a, vector signed long long __b) {
  6053. return (vector unsigned long long)__builtin_s390_vsrab(
  6054. (vector unsigned char)__a, (vector unsigned char)__b);
  6055. }
  6056. static inline __ATTRS_o_ai vector unsigned long long
  6057. vec_srab(vector unsigned long long __a, vector unsigned long long __b) {
  6058. return (vector unsigned long long)__builtin_s390_vsrab(
  6059. (vector unsigned char)__a, (vector unsigned char)__b);
  6060. }
  6061. #if __ARCH__ >= 12
  6062. static inline __ATTRS_o_ai vector float
  6063. vec_srab(vector float __a, vector signed int __b) {
  6064. return (vector float)__builtin_s390_vsrab(
  6065. (vector unsigned char)__a, (vector unsigned char)__b);
  6066. }
  6067. static inline __ATTRS_o_ai vector float
  6068. vec_srab(vector float __a, vector unsigned int __b) {
  6069. return (vector float)__builtin_s390_vsrab(
  6070. (vector unsigned char)__a, (vector unsigned char)__b);
  6071. }
  6072. #endif
  6073. static inline __ATTRS_o_ai vector double
  6074. vec_srab(vector double __a, vector signed long long __b) {
  6075. return (vector double)__builtin_s390_vsrab(
  6076. (vector unsigned char)__a, (vector unsigned char)__b);
  6077. }
  6078. static inline __ATTRS_o_ai vector double
  6079. vec_srab(vector double __a, vector unsigned long long __b) {
  6080. return (vector double)__builtin_s390_vsrab(
  6081. (vector unsigned char)__a, (vector unsigned char)__b);
  6082. }
  6083. /*-- vec_srl ----------------------------------------------------------------*/
  6084. static inline __ATTRS_o_ai vector signed char
  6085. vec_srl(vector signed char __a, vector unsigned char __b) {
  6086. return (vector signed char)__builtin_s390_vsrl(
  6087. (vector unsigned char)__a, __b);
  6088. }
  6089. // This prototype is deprecated.
  6090. static inline __ATTRS_o_ai vector signed char
  6091. vec_srl(vector signed char __a, vector unsigned short __b) {
  6092. return (vector signed char)__builtin_s390_vsrl(
  6093. (vector unsigned char)__a, (vector unsigned char)__b);
  6094. }
  6095. // This prototype is deprecated.
  6096. static inline __ATTRS_o_ai vector signed char
  6097. vec_srl(vector signed char __a, vector unsigned int __b) {
  6098. return (vector signed char)__builtin_s390_vsrl(
  6099. (vector unsigned char)__a, (vector unsigned char)__b);
  6100. }
  6101. // This prototype is deprecated.
  6102. static inline __ATTRS_o_ai vector bool char
  6103. vec_srl(vector bool char __a, vector unsigned char __b) {
  6104. return (vector bool char)__builtin_s390_vsrl(
  6105. (vector unsigned char)__a, __b);
  6106. }
  6107. // This prototype is deprecated.
  6108. static inline __ATTRS_o_ai vector bool char
  6109. vec_srl(vector bool char __a, vector unsigned short __b) {
  6110. return (vector bool char)__builtin_s390_vsrl(
  6111. (vector unsigned char)__a, (vector unsigned char)__b);
  6112. }
  6113. // This prototype is deprecated.
  6114. static inline __ATTRS_o_ai vector bool char
  6115. vec_srl(vector bool char __a, vector unsigned int __b) {
  6116. return (vector bool char)__builtin_s390_vsrl(
  6117. (vector unsigned char)__a, (vector unsigned char)__b);
  6118. }
  6119. static inline __ATTRS_o_ai vector unsigned char
  6120. vec_srl(vector unsigned char __a, vector unsigned char __b) {
  6121. return __builtin_s390_vsrl(__a, __b);
  6122. }
  6123. // This prototype is deprecated.
  6124. static inline __ATTRS_o_ai vector unsigned char
  6125. vec_srl(vector unsigned char __a, vector unsigned short __b) {
  6126. return __builtin_s390_vsrl(__a, (vector unsigned char)__b);
  6127. }
  6128. // This prototype is deprecated.
  6129. static inline __ATTRS_o_ai vector unsigned char
  6130. vec_srl(vector unsigned char __a, vector unsigned int __b) {
  6131. return __builtin_s390_vsrl(__a, (vector unsigned char)__b);
  6132. }
  6133. static inline __ATTRS_o_ai vector signed short
  6134. vec_srl(vector signed short __a, vector unsigned char __b) {
  6135. return (vector signed short)__builtin_s390_vsrl(
  6136. (vector unsigned char)__a, __b);
  6137. }
  6138. // This prototype is deprecated.
  6139. static inline __ATTRS_o_ai vector signed short
  6140. vec_srl(vector signed short __a, vector unsigned short __b) {
  6141. return (vector signed short)__builtin_s390_vsrl(
  6142. (vector unsigned char)__a, (vector unsigned char)__b);
  6143. }
  6144. // This prototype is deprecated.
  6145. static inline __ATTRS_o_ai vector signed short
  6146. vec_srl(vector signed short __a, vector unsigned int __b) {
  6147. return (vector signed short)__builtin_s390_vsrl(
  6148. (vector unsigned char)__a, (vector unsigned char)__b);
  6149. }
  6150. // This prototype is deprecated.
  6151. static inline __ATTRS_o_ai vector bool short
  6152. vec_srl(vector bool short __a, vector unsigned char __b) {
  6153. return (vector bool short)__builtin_s390_vsrl(
  6154. (vector unsigned char)__a, __b);
  6155. }
  6156. // This prototype is deprecated.
  6157. static inline __ATTRS_o_ai vector bool short
  6158. vec_srl(vector bool short __a, vector unsigned short __b) {
  6159. return (vector bool short)__builtin_s390_vsrl(
  6160. (vector unsigned char)__a, (vector unsigned char)__b);
  6161. }
  6162. // This prototype is deprecated.
  6163. static inline __ATTRS_o_ai vector bool short
  6164. vec_srl(vector bool short __a, vector unsigned int __b) {
  6165. return (vector bool short)__builtin_s390_vsrl(
  6166. (vector unsigned char)__a, (vector unsigned char)__b);
  6167. }
  6168. static inline __ATTRS_o_ai vector unsigned short
  6169. vec_srl(vector unsigned short __a, vector unsigned char __b) {
  6170. return (vector unsigned short)__builtin_s390_vsrl(
  6171. (vector unsigned char)__a, __b);
  6172. }
  6173. // This prototype is deprecated.
  6174. static inline __ATTRS_o_ai vector unsigned short
  6175. vec_srl(vector unsigned short __a, vector unsigned short __b) {
  6176. return (vector unsigned short)__builtin_s390_vsrl(
  6177. (vector unsigned char)__a, (vector unsigned char)__b);
  6178. }
  6179. // This prototype is deprecated.
  6180. static inline __ATTRS_o_ai vector unsigned short
  6181. vec_srl(vector unsigned short __a, vector unsigned int __b) {
  6182. return (vector unsigned short)__builtin_s390_vsrl(
  6183. (vector unsigned char)__a, (vector unsigned char)__b);
  6184. }
  6185. static inline __ATTRS_o_ai vector signed int
  6186. vec_srl(vector signed int __a, vector unsigned char __b) {
  6187. return (vector signed int)__builtin_s390_vsrl(
  6188. (vector unsigned char)__a, __b);
  6189. }
  6190. // This prototype is deprecated.
  6191. static inline __ATTRS_o_ai vector signed int
  6192. vec_srl(vector signed int __a, vector unsigned short __b) {
  6193. return (vector signed int)__builtin_s390_vsrl(
  6194. (vector unsigned char)__a, (vector unsigned char)__b);
  6195. }
  6196. // This prototype is deprecated.
  6197. static inline __ATTRS_o_ai vector signed int
  6198. vec_srl(vector signed int __a, vector unsigned int __b) {
  6199. return (vector signed int)__builtin_s390_vsrl(
  6200. (vector unsigned char)__a, (vector unsigned char)__b);
  6201. }
  6202. // This prototype is deprecated.
  6203. static inline __ATTRS_o_ai vector bool int
  6204. vec_srl(vector bool int __a, vector unsigned char __b) {
  6205. return (vector bool int)__builtin_s390_vsrl(
  6206. (vector unsigned char)__a, __b);
  6207. }
  6208. // This prototype is deprecated.
  6209. static inline __ATTRS_o_ai vector bool int
  6210. vec_srl(vector bool int __a, vector unsigned short __b) {
  6211. return (vector bool int)__builtin_s390_vsrl(
  6212. (vector unsigned char)__a, (vector unsigned char)__b);
  6213. }
  6214. // This prototype is deprecated.
  6215. static inline __ATTRS_o_ai vector bool int
  6216. vec_srl(vector bool int __a, vector unsigned int __b) {
  6217. return (vector bool int)__builtin_s390_vsrl(
  6218. (vector unsigned char)__a, (vector unsigned char)__b);
  6219. }
  6220. static inline __ATTRS_o_ai vector unsigned int
  6221. vec_srl(vector unsigned int __a, vector unsigned char __b) {
  6222. return (vector unsigned int)__builtin_s390_vsrl(
  6223. (vector unsigned char)__a, __b);
  6224. }
  6225. // This prototype is deprecated.
  6226. static inline __ATTRS_o_ai vector unsigned int
  6227. vec_srl(vector unsigned int __a, vector unsigned short __b) {
  6228. return (vector unsigned int)__builtin_s390_vsrl(
  6229. (vector unsigned char)__a, (vector unsigned char)__b);
  6230. }
  6231. // This prototype is deprecated.
  6232. static inline __ATTRS_o_ai vector unsigned int
  6233. vec_srl(vector unsigned int __a, vector unsigned int __b) {
  6234. return (vector unsigned int)__builtin_s390_vsrl(
  6235. (vector unsigned char)__a, (vector unsigned char)__b);
  6236. }
  6237. static inline __ATTRS_o_ai vector signed long long
  6238. vec_srl(vector signed long long __a, vector unsigned char __b) {
  6239. return (vector signed long long)__builtin_s390_vsrl(
  6240. (vector unsigned char)__a, __b);
  6241. }
  6242. // This prototype is deprecated.
  6243. static inline __ATTRS_o_ai vector signed long long
  6244. vec_srl(vector signed long long __a, vector unsigned short __b) {
  6245. return (vector signed long long)__builtin_s390_vsrl(
  6246. (vector unsigned char)__a, (vector unsigned char)__b);
  6247. }
  6248. // This prototype is deprecated.
  6249. static inline __ATTRS_o_ai vector signed long long
  6250. vec_srl(vector signed long long __a, vector unsigned int __b) {
  6251. return (vector signed long long)__builtin_s390_vsrl(
  6252. (vector unsigned char)__a, (vector unsigned char)__b);
  6253. }
  6254. // This prototype is deprecated.
  6255. static inline __ATTRS_o_ai vector bool long long
  6256. vec_srl(vector bool long long __a, vector unsigned char __b) {
  6257. return (vector bool long long)__builtin_s390_vsrl(
  6258. (vector unsigned char)__a, __b);
  6259. }
  6260. // This prototype is deprecated.
  6261. static inline __ATTRS_o_ai vector bool long long
  6262. vec_srl(vector bool long long __a, vector unsigned short __b) {
  6263. return (vector bool long long)__builtin_s390_vsrl(
  6264. (vector unsigned char)__a, (vector unsigned char)__b);
  6265. }
  6266. // This prototype is deprecated.
  6267. static inline __ATTRS_o_ai vector bool long long
  6268. vec_srl(vector bool long long __a, vector unsigned int __b) {
  6269. return (vector bool long long)__builtin_s390_vsrl(
  6270. (vector unsigned char)__a, (vector unsigned char)__b);
  6271. }
  6272. static inline __ATTRS_o_ai vector unsigned long long
  6273. vec_srl(vector unsigned long long __a, vector unsigned char __b) {
  6274. return (vector unsigned long long)__builtin_s390_vsrl(
  6275. (vector unsigned char)__a, __b);
  6276. }
  6277. // This prototype is deprecated.
  6278. static inline __ATTRS_o_ai vector unsigned long long
  6279. vec_srl(vector unsigned long long __a, vector unsigned short __b) {
  6280. return (vector unsigned long long)__builtin_s390_vsrl(
  6281. (vector unsigned char)__a, (vector unsigned char)__b);
  6282. }
  6283. // This prototype is deprecated.
  6284. static inline __ATTRS_o_ai vector unsigned long long
  6285. vec_srl(vector unsigned long long __a, vector unsigned int __b) {
  6286. return (vector unsigned long long)__builtin_s390_vsrl(
  6287. (vector unsigned char)__a, (vector unsigned char)__b);
  6288. }
  6289. /*-- vec_srb ----------------------------------------------------------------*/
  6290. static inline __ATTRS_o_ai vector signed char
  6291. vec_srb(vector signed char __a, vector signed char __b) {
  6292. return (vector signed char)__builtin_s390_vsrlb(
  6293. (vector unsigned char)__a, (vector unsigned char)__b);
  6294. }
  6295. static inline __ATTRS_o_ai vector signed char
  6296. vec_srb(vector signed char __a, vector unsigned char __b) {
  6297. return (vector signed char)__builtin_s390_vsrlb(
  6298. (vector unsigned char)__a, __b);
  6299. }
  6300. static inline __ATTRS_o_ai vector unsigned char
  6301. vec_srb(vector unsigned char __a, vector signed char __b) {
  6302. return __builtin_s390_vsrlb(__a, (vector unsigned char)__b);
  6303. }
  6304. static inline __ATTRS_o_ai vector unsigned char
  6305. vec_srb(vector unsigned char __a, vector unsigned char __b) {
  6306. return __builtin_s390_vsrlb(__a, __b);
  6307. }
  6308. static inline __ATTRS_o_ai vector signed short
  6309. vec_srb(vector signed short __a, vector signed short __b) {
  6310. return (vector signed short)__builtin_s390_vsrlb(
  6311. (vector unsigned char)__a, (vector unsigned char)__b);
  6312. }
  6313. static inline __ATTRS_o_ai vector signed short
  6314. vec_srb(vector signed short __a, vector unsigned short __b) {
  6315. return (vector signed short)__builtin_s390_vsrlb(
  6316. (vector unsigned char)__a, (vector unsigned char)__b);
  6317. }
  6318. static inline __ATTRS_o_ai vector unsigned short
  6319. vec_srb(vector unsigned short __a, vector signed short __b) {
  6320. return (vector unsigned short)__builtin_s390_vsrlb(
  6321. (vector unsigned char)__a, (vector unsigned char)__b);
  6322. }
  6323. static inline __ATTRS_o_ai vector unsigned short
  6324. vec_srb(vector unsigned short __a, vector unsigned short __b) {
  6325. return (vector unsigned short)__builtin_s390_vsrlb(
  6326. (vector unsigned char)__a, (vector unsigned char)__b);
  6327. }
  6328. static inline __ATTRS_o_ai vector signed int
  6329. vec_srb(vector signed int __a, vector signed int __b) {
  6330. return (vector signed int)__builtin_s390_vsrlb(
  6331. (vector unsigned char)__a, (vector unsigned char)__b);
  6332. }
  6333. static inline __ATTRS_o_ai vector signed int
  6334. vec_srb(vector signed int __a, vector unsigned int __b) {
  6335. return (vector signed int)__builtin_s390_vsrlb(
  6336. (vector unsigned char)__a, (vector unsigned char)__b);
  6337. }
  6338. static inline __ATTRS_o_ai vector unsigned int
  6339. vec_srb(vector unsigned int __a, vector signed int __b) {
  6340. return (vector unsigned int)__builtin_s390_vsrlb(
  6341. (vector unsigned char)__a, (vector unsigned char)__b);
  6342. }
  6343. static inline __ATTRS_o_ai vector unsigned int
  6344. vec_srb(vector unsigned int __a, vector unsigned int __b) {
  6345. return (vector unsigned int)__builtin_s390_vsrlb(
  6346. (vector unsigned char)__a, (vector unsigned char)__b);
  6347. }
  6348. static inline __ATTRS_o_ai vector signed long long
  6349. vec_srb(vector signed long long __a, vector signed long long __b) {
  6350. return (vector signed long long)__builtin_s390_vsrlb(
  6351. (vector unsigned char)__a, (vector unsigned char)__b);
  6352. }
  6353. static inline __ATTRS_o_ai vector signed long long
  6354. vec_srb(vector signed long long __a, vector unsigned long long __b) {
  6355. return (vector signed long long)__builtin_s390_vsrlb(
  6356. (vector unsigned char)__a, (vector unsigned char)__b);
  6357. }
  6358. static inline __ATTRS_o_ai vector unsigned long long
  6359. vec_srb(vector unsigned long long __a, vector signed long long __b) {
  6360. return (vector unsigned long long)__builtin_s390_vsrlb(
  6361. (vector unsigned char)__a, (vector unsigned char)__b);
  6362. }
  6363. static inline __ATTRS_o_ai vector unsigned long long
  6364. vec_srb(vector unsigned long long __a, vector unsigned long long __b) {
  6365. return (vector unsigned long long)__builtin_s390_vsrlb(
  6366. (vector unsigned char)__a, (vector unsigned char)__b);
  6367. }
  6368. #if __ARCH__ >= 12
  6369. static inline __ATTRS_o_ai vector float
  6370. vec_srb(vector float __a, vector signed int __b) {
  6371. return (vector float)__builtin_s390_vsrlb(
  6372. (vector unsigned char)__a, (vector unsigned char)__b);
  6373. }
  6374. static inline __ATTRS_o_ai vector float
  6375. vec_srb(vector float __a, vector unsigned int __b) {
  6376. return (vector float)__builtin_s390_vsrlb(
  6377. (vector unsigned char)__a, (vector unsigned char)__b);
  6378. }
  6379. #endif
  6380. static inline __ATTRS_o_ai vector double
  6381. vec_srb(vector double __a, vector signed long long __b) {
  6382. return (vector double)__builtin_s390_vsrlb(
  6383. (vector unsigned char)__a, (vector unsigned char)__b);
  6384. }
  6385. static inline __ATTRS_o_ai vector double
  6386. vec_srb(vector double __a, vector unsigned long long __b) {
  6387. return (vector double)__builtin_s390_vsrlb(
  6388. (vector unsigned char)__a, (vector unsigned char)__b);
  6389. }
  6390. /*-- vec_abs ----------------------------------------------------------------*/
  6391. static inline __ATTRS_o_ai vector signed char
  6392. vec_abs(vector signed char __a) {
  6393. return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed char)0));
  6394. }
  6395. static inline __ATTRS_o_ai vector signed short
  6396. vec_abs(vector signed short __a) {
  6397. return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed short)0));
  6398. }
  6399. static inline __ATTRS_o_ai vector signed int
  6400. vec_abs(vector signed int __a) {
  6401. return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed int)0));
  6402. }
  6403. static inline __ATTRS_o_ai vector signed long long
  6404. vec_abs(vector signed long long __a) {
  6405. return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed long long)0));
  6406. }
  6407. #if __ARCH__ >= 12
  6408. static inline __ATTRS_o_ai vector float
  6409. vec_abs(vector float __a) {
  6410. return __builtin_s390_vflpsb(__a);
  6411. }
  6412. #endif
  6413. static inline __ATTRS_o_ai vector double
  6414. vec_abs(vector double __a) {
  6415. return __builtin_s390_vflpdb(__a);
  6416. }
  6417. /*-- vec_nabs ---------------------------------------------------------------*/
  6418. #if __ARCH__ >= 12
  6419. static inline __ATTRS_o_ai vector float
  6420. vec_nabs(vector float __a) {
  6421. return __builtin_s390_vflnsb(__a);
  6422. }
  6423. #endif
  6424. static inline __ATTRS_o_ai vector double
  6425. vec_nabs(vector double __a) {
  6426. return __builtin_s390_vflndb(__a);
  6427. }
  6428. /*-- vec_max ----------------------------------------------------------------*/
  6429. static inline __ATTRS_o_ai vector signed char
  6430. vec_max(vector signed char __a, vector signed char __b) {
  6431. return vec_sel(__b, __a, vec_cmpgt(__a, __b));
  6432. }
  6433. // This prototype is deprecated.
  6434. static inline __ATTRS_o_ai vector signed char
  6435. vec_max(vector signed char __a, vector bool char __b) {
  6436. vector signed char __bc = (vector signed char)__b;
  6437. return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
  6438. }
  6439. // This prototype is deprecated.
  6440. static inline __ATTRS_o_ai vector signed char
  6441. vec_max(vector bool char __a, vector signed char __b) {
  6442. vector signed char __ac = (vector signed char)__a;
  6443. return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
  6444. }
  6445. static inline __ATTRS_o_ai vector unsigned char
  6446. vec_max(vector unsigned char __a, vector unsigned char __b) {
  6447. return vec_sel(__b, __a, vec_cmpgt(__a, __b));
  6448. }
  6449. // This prototype is deprecated.
  6450. static inline __ATTRS_o_ai vector unsigned char
  6451. vec_max(vector unsigned char __a, vector bool char __b) {
  6452. vector unsigned char __bc = (vector unsigned char)__b;
  6453. return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
  6454. }
  6455. // This prototype is deprecated.
  6456. static inline __ATTRS_o_ai vector unsigned char
  6457. vec_max(vector bool char __a, vector unsigned char __b) {
  6458. vector unsigned char __ac = (vector unsigned char)__a;
  6459. return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
  6460. }
  6461. static inline __ATTRS_o_ai vector signed short
  6462. vec_max(vector signed short __a, vector signed short __b) {
  6463. return vec_sel(__b, __a, vec_cmpgt(__a, __b));
  6464. }
  6465. // This prototype is deprecated.
  6466. static inline __ATTRS_o_ai vector signed short
  6467. vec_max(vector signed short __a, vector bool short __b) {
  6468. vector signed short __bc = (vector signed short)__b;
  6469. return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
  6470. }
  6471. // This prototype is deprecated.
  6472. static inline __ATTRS_o_ai vector signed short
  6473. vec_max(vector bool short __a, vector signed short __b) {
  6474. vector signed short __ac = (vector signed short)__a;
  6475. return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
  6476. }
  6477. static inline __ATTRS_o_ai vector unsigned short
  6478. vec_max(vector unsigned short __a, vector unsigned short __b) {
  6479. return vec_sel(__b, __a, vec_cmpgt(__a, __b));
  6480. }
  6481. // This prototype is deprecated.
  6482. static inline __ATTRS_o_ai vector unsigned short
  6483. vec_max(vector unsigned short __a, vector bool short __b) {
  6484. vector unsigned short __bc = (vector unsigned short)__b;
  6485. return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
  6486. }
  6487. // This prototype is deprecated.
  6488. static inline __ATTRS_o_ai vector unsigned short
  6489. vec_max(vector bool short __a, vector unsigned short __b) {
  6490. vector unsigned short __ac = (vector unsigned short)__a;
  6491. return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
  6492. }
  6493. static inline __ATTRS_o_ai vector signed int
  6494. vec_max(vector signed int __a, vector signed int __b) {
  6495. return vec_sel(__b, __a, vec_cmpgt(__a, __b));
  6496. }
  6497. // This prototype is deprecated.
  6498. static inline __ATTRS_o_ai vector signed int
  6499. vec_max(vector signed int __a, vector bool int __b) {
  6500. vector signed int __bc = (vector signed int)__b;
  6501. return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
  6502. }
  6503. // This prototype is deprecated.
  6504. static inline __ATTRS_o_ai vector signed int
  6505. vec_max(vector bool int __a, vector signed int __b) {
  6506. vector signed int __ac = (vector signed int)__a;
  6507. return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
  6508. }
  6509. static inline __ATTRS_o_ai vector unsigned int
  6510. vec_max(vector unsigned int __a, vector unsigned int __b) {
  6511. return vec_sel(__b, __a, vec_cmpgt(__a, __b));
  6512. }
  6513. // This prototype is deprecated.
  6514. static inline __ATTRS_o_ai vector unsigned int
  6515. vec_max(vector unsigned int __a, vector bool int __b) {
  6516. vector unsigned int __bc = (vector unsigned int)__b;
  6517. return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
  6518. }
  6519. // This prototype is deprecated.
  6520. static inline __ATTRS_o_ai vector unsigned int
  6521. vec_max(vector bool int __a, vector unsigned int __b) {
  6522. vector unsigned int __ac = (vector unsigned int)__a;
  6523. return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
  6524. }
  6525. static inline __ATTRS_o_ai vector signed long long
  6526. vec_max(vector signed long long __a, vector signed long long __b) {
  6527. return vec_sel(__b, __a, vec_cmpgt(__a, __b));
  6528. }
  6529. // This prototype is deprecated.
  6530. static inline __ATTRS_o_ai vector signed long long
  6531. vec_max(vector signed long long __a, vector bool long long __b) {
  6532. vector signed long long __bc = (vector signed long long)__b;
  6533. return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
  6534. }
  6535. // This prototype is deprecated.
  6536. static inline __ATTRS_o_ai vector signed long long
  6537. vec_max(vector bool long long __a, vector signed long long __b) {
  6538. vector signed long long __ac = (vector signed long long)__a;
  6539. return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
  6540. }
  6541. static inline __ATTRS_o_ai vector unsigned long long
  6542. vec_max(vector unsigned long long __a, vector unsigned long long __b) {
  6543. return vec_sel(__b, __a, vec_cmpgt(__a, __b));
  6544. }
  6545. // This prototype is deprecated.
  6546. static inline __ATTRS_o_ai vector unsigned long long
  6547. vec_max(vector unsigned long long __a, vector bool long long __b) {
  6548. vector unsigned long long __bc = (vector unsigned long long)__b;
  6549. return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
  6550. }
  6551. // This prototype is deprecated.
  6552. static inline __ATTRS_o_ai vector unsigned long long
  6553. vec_max(vector bool long long __a, vector unsigned long long __b) {
  6554. vector unsigned long long __ac = (vector unsigned long long)__a;
  6555. return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
  6556. }
  6557. #if __ARCH__ >= 12
  6558. static inline __ATTRS_o_ai vector float
  6559. vec_max(vector float __a, vector float __b) {
  6560. return __builtin_s390_vfmaxsb(__a, __b, 0);
  6561. }
  6562. #endif
  6563. static inline __ATTRS_o_ai vector double
  6564. vec_max(vector double __a, vector double __b) {
  6565. #if __ARCH__ >= 12
  6566. return __builtin_s390_vfmaxdb(__a, __b, 0);
  6567. #else
  6568. return vec_sel(__b, __a, vec_cmpgt(__a, __b));
  6569. #endif
  6570. }
  6571. /*-- vec_min ----------------------------------------------------------------*/
  6572. static inline __ATTRS_o_ai vector signed char
  6573. vec_min(vector signed char __a, vector signed char __b) {
  6574. return vec_sel(__a, __b, vec_cmpgt(__a, __b));
  6575. }
  6576. // This prototype is deprecated.
  6577. static inline __ATTRS_o_ai vector signed char
  6578. vec_min(vector signed char __a, vector bool char __b) {
  6579. vector signed char __bc = (vector signed char)__b;
  6580. return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
  6581. }
  6582. // This prototype is deprecated.
  6583. static inline __ATTRS_o_ai vector signed char
  6584. vec_min(vector bool char __a, vector signed char __b) {
  6585. vector signed char __ac = (vector signed char)__a;
  6586. return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
  6587. }
  6588. static inline __ATTRS_o_ai vector unsigned char
  6589. vec_min(vector unsigned char __a, vector unsigned char __b) {
  6590. return vec_sel(__a, __b, vec_cmpgt(__a, __b));
  6591. }
  6592. // This prototype is deprecated.
  6593. static inline __ATTRS_o_ai vector unsigned char
  6594. vec_min(vector unsigned char __a, vector bool char __b) {
  6595. vector unsigned char __bc = (vector unsigned char)__b;
  6596. return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
  6597. }
  6598. // This prototype is deprecated.
  6599. static inline __ATTRS_o_ai vector unsigned char
  6600. vec_min(vector bool char __a, vector unsigned char __b) {
  6601. vector unsigned char __ac = (vector unsigned char)__a;
  6602. return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
  6603. }
  6604. static inline __ATTRS_o_ai vector signed short
  6605. vec_min(vector signed short __a, vector signed short __b) {
  6606. return vec_sel(__a, __b, vec_cmpgt(__a, __b));
  6607. }
  6608. // This prototype is deprecated.
  6609. static inline __ATTRS_o_ai vector signed short
  6610. vec_min(vector signed short __a, vector bool short __b) {
  6611. vector signed short __bc = (vector signed short)__b;
  6612. return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
  6613. }
  6614. // This prototype is deprecated.
  6615. static inline __ATTRS_o_ai vector signed short
  6616. vec_min(vector bool short __a, vector signed short __b) {
  6617. vector signed short __ac = (vector signed short)__a;
  6618. return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
  6619. }
  6620. static inline __ATTRS_o_ai vector unsigned short
  6621. vec_min(vector unsigned short __a, vector unsigned short __b) {
  6622. return vec_sel(__a, __b, vec_cmpgt(__a, __b));
  6623. }
  6624. // This prototype is deprecated.
  6625. static inline __ATTRS_o_ai vector unsigned short
  6626. vec_min(vector unsigned short __a, vector bool short __b) {
  6627. vector unsigned short __bc = (vector unsigned short)__b;
  6628. return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
  6629. }
  6630. // This prototype is deprecated.
  6631. static inline __ATTRS_o_ai vector unsigned short
  6632. vec_min(vector bool short __a, vector unsigned short __b) {
  6633. vector unsigned short __ac = (vector unsigned short)__a;
  6634. return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
  6635. }
  6636. static inline __ATTRS_o_ai vector signed int
  6637. vec_min(vector signed int __a, vector signed int __b) {
  6638. return vec_sel(__a, __b, vec_cmpgt(__a, __b));
  6639. }
  6640. // This prototype is deprecated.
  6641. static inline __ATTRS_o_ai vector signed int
  6642. vec_min(vector signed int __a, vector bool int __b) {
  6643. vector signed int __bc = (vector signed int)__b;
  6644. return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
  6645. }
  6646. // This prototype is deprecated.
  6647. static inline __ATTRS_o_ai vector signed int
  6648. vec_min(vector bool int __a, vector signed int __b) {
  6649. vector signed int __ac = (vector signed int)__a;
  6650. return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
  6651. }
  6652. static inline __ATTRS_o_ai vector unsigned int
  6653. vec_min(vector unsigned int __a, vector unsigned int __b) {
  6654. return vec_sel(__a, __b, vec_cmpgt(__a, __b));
  6655. }
  6656. // This prototype is deprecated.
  6657. static inline __ATTRS_o_ai vector unsigned int
  6658. vec_min(vector unsigned int __a, vector bool int __b) {
  6659. vector unsigned int __bc = (vector unsigned int)__b;
  6660. return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
  6661. }
  6662. // This prototype is deprecated.
  6663. static inline __ATTRS_o_ai vector unsigned int
  6664. vec_min(vector bool int __a, vector unsigned int __b) {
  6665. vector unsigned int __ac = (vector unsigned int)__a;
  6666. return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
  6667. }
  6668. static inline __ATTRS_o_ai vector signed long long
  6669. vec_min(vector signed long long __a, vector signed long long __b) {
  6670. return vec_sel(__a, __b, vec_cmpgt(__a, __b));
  6671. }
  6672. // This prototype is deprecated.
  6673. static inline __ATTRS_o_ai vector signed long long
  6674. vec_min(vector signed long long __a, vector bool long long __b) {
  6675. vector signed long long __bc = (vector signed long long)__b;
  6676. return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
  6677. }
  6678. // This prototype is deprecated.
  6679. static inline __ATTRS_o_ai vector signed long long
  6680. vec_min(vector bool long long __a, vector signed long long __b) {
  6681. vector signed long long __ac = (vector signed long long)__a;
  6682. return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
  6683. }
  6684. static inline __ATTRS_o_ai vector unsigned long long
  6685. vec_min(vector unsigned long long __a, vector unsigned long long __b) {
  6686. return vec_sel(__a, __b, vec_cmpgt(__a, __b));
  6687. }
  6688. // This prototype is deprecated.
  6689. static inline __ATTRS_o_ai vector unsigned long long
  6690. vec_min(vector unsigned long long __a, vector bool long long __b) {
  6691. vector unsigned long long __bc = (vector unsigned long long)__b;
  6692. return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
  6693. }
  6694. // This prototype is deprecated.
  6695. static inline __ATTRS_o_ai vector unsigned long long
  6696. vec_min(vector bool long long __a, vector unsigned long long __b) {
  6697. vector unsigned long long __ac = (vector unsigned long long)__a;
  6698. return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
  6699. }
  6700. #if __ARCH__ >= 12
  6701. static inline __ATTRS_o_ai vector float
  6702. vec_min(vector float __a, vector float __b) {
  6703. return __builtin_s390_vfminsb(__a, __b, 0);
  6704. }
  6705. #endif
  6706. static inline __ATTRS_o_ai vector double
  6707. vec_min(vector double __a, vector double __b) {
  6708. #if __ARCH__ >= 12
  6709. return __builtin_s390_vfmindb(__a, __b, 0);
  6710. #else
  6711. return vec_sel(__a, __b, vec_cmpgt(__a, __b));
  6712. #endif
  6713. }
  6714. /*-- vec_add_u128 -----------------------------------------------------------*/
  6715. static inline __ATTRS_ai vector unsigned char
  6716. vec_add_u128(vector unsigned char __a, vector unsigned char __b) {
  6717. return __builtin_s390_vaq(__a, __b);
  6718. }
  6719. /*-- vec_addc ---------------------------------------------------------------*/
  6720. static inline __ATTRS_o_ai vector unsigned char
  6721. vec_addc(vector unsigned char __a, vector unsigned char __b) {
  6722. return __builtin_s390_vaccb(__a, __b);
  6723. }
  6724. static inline __ATTRS_o_ai vector unsigned short
  6725. vec_addc(vector unsigned short __a, vector unsigned short __b) {
  6726. return __builtin_s390_vacch(__a, __b);
  6727. }
  6728. static inline __ATTRS_o_ai vector unsigned int
  6729. vec_addc(vector unsigned int __a, vector unsigned int __b) {
  6730. return __builtin_s390_vaccf(__a, __b);
  6731. }
  6732. static inline __ATTRS_o_ai vector unsigned long long
  6733. vec_addc(vector unsigned long long __a, vector unsigned long long __b) {
  6734. return __builtin_s390_vaccg(__a, __b);
  6735. }
  6736. /*-- vec_addc_u128 ----------------------------------------------------------*/
  6737. static inline __ATTRS_ai vector unsigned char
  6738. vec_addc_u128(vector unsigned char __a, vector unsigned char __b) {
  6739. return __builtin_s390_vaccq(__a, __b);
  6740. }
  6741. /*-- vec_adde_u128 ----------------------------------------------------------*/
  6742. static inline __ATTRS_ai vector unsigned char
  6743. vec_adde_u128(vector unsigned char __a, vector unsigned char __b,
  6744. vector unsigned char __c) {
  6745. return __builtin_s390_vacq(__a, __b, __c);
  6746. }
  6747. /*-- vec_addec_u128 ---------------------------------------------------------*/
  6748. static inline __ATTRS_ai vector unsigned char
  6749. vec_addec_u128(vector unsigned char __a, vector unsigned char __b,
  6750. vector unsigned char __c) {
  6751. return __builtin_s390_vacccq(__a, __b, __c);
  6752. }
  6753. /*-- vec_avg ----------------------------------------------------------------*/
  6754. static inline __ATTRS_o_ai vector signed char
  6755. vec_avg(vector signed char __a, vector signed char __b) {
  6756. return __builtin_s390_vavgb(__a, __b);
  6757. }
  6758. static inline __ATTRS_o_ai vector signed short
  6759. vec_avg(vector signed short __a, vector signed short __b) {
  6760. return __builtin_s390_vavgh(__a, __b);
  6761. }
  6762. static inline __ATTRS_o_ai vector signed int
  6763. vec_avg(vector signed int __a, vector signed int __b) {
  6764. return __builtin_s390_vavgf(__a, __b);
  6765. }
  6766. static inline __ATTRS_o_ai vector signed long long
  6767. vec_avg(vector signed long long __a, vector signed long long __b) {
  6768. return __builtin_s390_vavgg(__a, __b);
  6769. }
  6770. static inline __ATTRS_o_ai vector unsigned char
  6771. vec_avg(vector unsigned char __a, vector unsigned char __b) {
  6772. return __builtin_s390_vavglb(__a, __b);
  6773. }
  6774. static inline __ATTRS_o_ai vector unsigned short
  6775. vec_avg(vector unsigned short __a, vector unsigned short __b) {
  6776. return __builtin_s390_vavglh(__a, __b);
  6777. }
  6778. static inline __ATTRS_o_ai vector unsigned int
  6779. vec_avg(vector unsigned int __a, vector unsigned int __b) {
  6780. return __builtin_s390_vavglf(__a, __b);
  6781. }
  6782. static inline __ATTRS_o_ai vector unsigned long long
  6783. vec_avg(vector unsigned long long __a, vector unsigned long long __b) {
  6784. return __builtin_s390_vavglg(__a, __b);
  6785. }
  6786. /*-- vec_checksum -----------------------------------------------------------*/
  6787. static inline __ATTRS_ai vector unsigned int
  6788. vec_checksum(vector unsigned int __a, vector unsigned int __b) {
  6789. return __builtin_s390_vcksm(__a, __b);
  6790. }
  6791. /*-- vec_gfmsum -------------------------------------------------------------*/
  6792. static inline __ATTRS_o_ai vector unsigned short
  6793. vec_gfmsum(vector unsigned char __a, vector unsigned char __b) {
  6794. return __builtin_s390_vgfmb(__a, __b);
  6795. }
  6796. static inline __ATTRS_o_ai vector unsigned int
  6797. vec_gfmsum(vector unsigned short __a, vector unsigned short __b) {
  6798. return __builtin_s390_vgfmh(__a, __b);
  6799. }
  6800. static inline __ATTRS_o_ai vector unsigned long long
  6801. vec_gfmsum(vector unsigned int __a, vector unsigned int __b) {
  6802. return __builtin_s390_vgfmf(__a, __b);
  6803. }
  6804. /*-- vec_gfmsum_128 ---------------------------------------------------------*/
  6805. static inline __ATTRS_o_ai vector unsigned char
  6806. vec_gfmsum_128(vector unsigned long long __a, vector unsigned long long __b) {
  6807. return __builtin_s390_vgfmg(__a, __b);
  6808. }
  6809. /*-- vec_gfmsum_accum -------------------------------------------------------*/
  6810. static inline __ATTRS_o_ai vector unsigned short
  6811. vec_gfmsum_accum(vector unsigned char __a, vector unsigned char __b,
  6812. vector unsigned short __c) {
  6813. return __builtin_s390_vgfmab(__a, __b, __c);
  6814. }
  6815. static inline __ATTRS_o_ai vector unsigned int
  6816. vec_gfmsum_accum(vector unsigned short __a, vector unsigned short __b,
  6817. vector unsigned int __c) {
  6818. return __builtin_s390_vgfmah(__a, __b, __c);
  6819. }
  6820. static inline __ATTRS_o_ai vector unsigned long long
  6821. vec_gfmsum_accum(vector unsigned int __a, vector unsigned int __b,
  6822. vector unsigned long long __c) {
  6823. return __builtin_s390_vgfmaf(__a, __b, __c);
  6824. }
  6825. /*-- vec_gfmsum_accum_128 ---------------------------------------------------*/
  6826. static inline __ATTRS_o_ai vector unsigned char
  6827. vec_gfmsum_accum_128(vector unsigned long long __a,
  6828. vector unsigned long long __b,
  6829. vector unsigned char __c) {
  6830. return __builtin_s390_vgfmag(__a, __b, __c);
  6831. }
  6832. /*-- vec_mladd --------------------------------------------------------------*/
  6833. static inline __ATTRS_o_ai vector signed char
  6834. vec_mladd(vector signed char __a, vector signed char __b,
  6835. vector signed char __c) {
  6836. return __a * __b + __c;
  6837. }
  6838. static inline __ATTRS_o_ai vector signed char
  6839. vec_mladd(vector unsigned char __a, vector signed char __b,
  6840. vector signed char __c) {
  6841. return (vector signed char)__a * __b + __c;
  6842. }
  6843. static inline __ATTRS_o_ai vector signed char
  6844. vec_mladd(vector signed char __a, vector unsigned char __b,
  6845. vector unsigned char __c) {
  6846. return __a * (vector signed char)__b + (vector signed char)__c;
  6847. }
  6848. static inline __ATTRS_o_ai vector unsigned char
  6849. vec_mladd(vector unsigned char __a, vector unsigned char __b,
  6850. vector unsigned char __c) {
  6851. return __a * __b + __c;
  6852. }
  6853. static inline __ATTRS_o_ai vector signed short
  6854. vec_mladd(vector signed short __a, vector signed short __b,
  6855. vector signed short __c) {
  6856. return __a * __b + __c;
  6857. }
  6858. static inline __ATTRS_o_ai vector signed short
  6859. vec_mladd(vector unsigned short __a, vector signed short __b,
  6860. vector signed short __c) {
  6861. return (vector signed short)__a * __b + __c;
  6862. }
  6863. static inline __ATTRS_o_ai vector signed short
  6864. vec_mladd(vector signed short __a, vector unsigned short __b,
  6865. vector unsigned short __c) {
  6866. return __a * (vector signed short)__b + (vector signed short)__c;
  6867. }
  6868. static inline __ATTRS_o_ai vector unsigned short
  6869. vec_mladd(vector unsigned short __a, vector unsigned short __b,
  6870. vector unsigned short __c) {
  6871. return __a * __b + __c;
  6872. }
  6873. static inline __ATTRS_o_ai vector signed int
  6874. vec_mladd(vector signed int __a, vector signed int __b,
  6875. vector signed int __c) {
  6876. return __a * __b + __c;
  6877. }
  6878. static inline __ATTRS_o_ai vector signed int
  6879. vec_mladd(vector unsigned int __a, vector signed int __b,
  6880. vector signed int __c) {
  6881. return (vector signed int)__a * __b + __c;
  6882. }
  6883. static inline __ATTRS_o_ai vector signed int
  6884. vec_mladd(vector signed int __a, vector unsigned int __b,
  6885. vector unsigned int __c) {
  6886. return __a * (vector signed int)__b + (vector signed int)__c;
  6887. }
  6888. static inline __ATTRS_o_ai vector unsigned int
  6889. vec_mladd(vector unsigned int __a, vector unsigned int __b,
  6890. vector unsigned int __c) {
  6891. return __a * __b + __c;
  6892. }
  6893. /*-- vec_mhadd --------------------------------------------------------------*/
  6894. static inline __ATTRS_o_ai vector signed char
  6895. vec_mhadd(vector signed char __a, vector signed char __b,
  6896. vector signed char __c) {
  6897. return __builtin_s390_vmahb(__a, __b, __c);
  6898. }
  6899. static inline __ATTRS_o_ai vector unsigned char
  6900. vec_mhadd(vector unsigned char __a, vector unsigned char __b,
  6901. vector unsigned char __c) {
  6902. return __builtin_s390_vmalhb(__a, __b, __c);
  6903. }
  6904. static inline __ATTRS_o_ai vector signed short
  6905. vec_mhadd(vector signed short __a, vector signed short __b,
  6906. vector signed short __c) {
  6907. return __builtin_s390_vmahh(__a, __b, __c);
  6908. }
  6909. static inline __ATTRS_o_ai vector unsigned short
  6910. vec_mhadd(vector unsigned short __a, vector unsigned short __b,
  6911. vector unsigned short __c) {
  6912. return __builtin_s390_vmalhh(__a, __b, __c);
  6913. }
  6914. static inline __ATTRS_o_ai vector signed int
  6915. vec_mhadd(vector signed int __a, vector signed int __b,
  6916. vector signed int __c) {
  6917. return __builtin_s390_vmahf(__a, __b, __c);
  6918. }
  6919. static inline __ATTRS_o_ai vector unsigned int
  6920. vec_mhadd(vector unsigned int __a, vector unsigned int __b,
  6921. vector unsigned int __c) {
  6922. return __builtin_s390_vmalhf(__a, __b, __c);
  6923. }
  6924. /*-- vec_meadd --------------------------------------------------------------*/
  6925. static inline __ATTRS_o_ai vector signed short
  6926. vec_meadd(vector signed char __a, vector signed char __b,
  6927. vector signed short __c) {
  6928. return __builtin_s390_vmaeb(__a, __b, __c);
  6929. }
  6930. static inline __ATTRS_o_ai vector unsigned short
  6931. vec_meadd(vector unsigned char __a, vector unsigned char __b,
  6932. vector unsigned short __c) {
  6933. return __builtin_s390_vmaleb(__a, __b, __c);
  6934. }
  6935. static inline __ATTRS_o_ai vector signed int
  6936. vec_meadd(vector signed short __a, vector signed short __b,
  6937. vector signed int __c) {
  6938. return __builtin_s390_vmaeh(__a, __b, __c);
  6939. }
  6940. static inline __ATTRS_o_ai vector unsigned int
  6941. vec_meadd(vector unsigned short __a, vector unsigned short __b,
  6942. vector unsigned int __c) {
  6943. return __builtin_s390_vmaleh(__a, __b, __c);
  6944. }
  6945. static inline __ATTRS_o_ai vector signed long long
  6946. vec_meadd(vector signed int __a, vector signed int __b,
  6947. vector signed long long __c) {
  6948. return __builtin_s390_vmaef(__a, __b, __c);
  6949. }
  6950. static inline __ATTRS_o_ai vector unsigned long long
  6951. vec_meadd(vector unsigned int __a, vector unsigned int __b,
  6952. vector unsigned long long __c) {
  6953. return __builtin_s390_vmalef(__a, __b, __c);
  6954. }
  6955. /*-- vec_moadd --------------------------------------------------------------*/
  6956. static inline __ATTRS_o_ai vector signed short
  6957. vec_moadd(vector signed char __a, vector signed char __b,
  6958. vector signed short __c) {
  6959. return __builtin_s390_vmaob(__a, __b, __c);
  6960. }
  6961. static inline __ATTRS_o_ai vector unsigned short
  6962. vec_moadd(vector unsigned char __a, vector unsigned char __b,
  6963. vector unsigned short __c) {
  6964. return __builtin_s390_vmalob(__a, __b, __c);
  6965. }
  6966. static inline __ATTRS_o_ai vector signed int
  6967. vec_moadd(vector signed short __a, vector signed short __b,
  6968. vector signed int __c) {
  6969. return __builtin_s390_vmaoh(__a, __b, __c);
  6970. }
  6971. static inline __ATTRS_o_ai vector unsigned int
  6972. vec_moadd(vector unsigned short __a, vector unsigned short __b,
  6973. vector unsigned int __c) {
  6974. return __builtin_s390_vmaloh(__a, __b, __c);
  6975. }
  6976. static inline __ATTRS_o_ai vector signed long long
  6977. vec_moadd(vector signed int __a, vector signed int __b,
  6978. vector signed long long __c) {
  6979. return __builtin_s390_vmaof(__a, __b, __c);
  6980. }
  6981. static inline __ATTRS_o_ai vector unsigned long long
  6982. vec_moadd(vector unsigned int __a, vector unsigned int __b,
  6983. vector unsigned long long __c) {
  6984. return __builtin_s390_vmalof(__a, __b, __c);
  6985. }
  6986. /*-- vec_mulh ---------------------------------------------------------------*/
  6987. static inline __ATTRS_o_ai vector signed char
  6988. vec_mulh(vector signed char __a, vector signed char __b) {
  6989. return __builtin_s390_vmhb(__a, __b);
  6990. }
  6991. static inline __ATTRS_o_ai vector unsigned char
  6992. vec_mulh(vector unsigned char __a, vector unsigned char __b) {
  6993. return __builtin_s390_vmlhb(__a, __b);
  6994. }
  6995. static inline __ATTRS_o_ai vector signed short
  6996. vec_mulh(vector signed short __a, vector signed short __b) {
  6997. return __builtin_s390_vmhh(__a, __b);
  6998. }
  6999. static inline __ATTRS_o_ai vector unsigned short
  7000. vec_mulh(vector unsigned short __a, vector unsigned short __b) {
  7001. return __builtin_s390_vmlhh(__a, __b);
  7002. }
  7003. static inline __ATTRS_o_ai vector signed int
  7004. vec_mulh(vector signed int __a, vector signed int __b) {
  7005. return __builtin_s390_vmhf(__a, __b);
  7006. }
  7007. static inline __ATTRS_o_ai vector unsigned int
  7008. vec_mulh(vector unsigned int __a, vector unsigned int __b) {
  7009. return __builtin_s390_vmlhf(__a, __b);
  7010. }
  7011. /*-- vec_mule ---------------------------------------------------------------*/
  7012. static inline __ATTRS_o_ai vector signed short
  7013. vec_mule(vector signed char __a, vector signed char __b) {
  7014. return __builtin_s390_vmeb(__a, __b);
  7015. }
  7016. static inline __ATTRS_o_ai vector unsigned short
  7017. vec_mule(vector unsigned char __a, vector unsigned char __b) {
  7018. return __builtin_s390_vmleb(__a, __b);
  7019. }
  7020. static inline __ATTRS_o_ai vector signed int
  7021. vec_mule(vector signed short __a, vector signed short __b) {
  7022. return __builtin_s390_vmeh(__a, __b);
  7023. }
  7024. static inline __ATTRS_o_ai vector unsigned int
  7025. vec_mule(vector unsigned short __a, vector unsigned short __b) {
  7026. return __builtin_s390_vmleh(__a, __b);
  7027. }
  7028. static inline __ATTRS_o_ai vector signed long long
  7029. vec_mule(vector signed int __a, vector signed int __b) {
  7030. return __builtin_s390_vmef(__a, __b);
  7031. }
  7032. static inline __ATTRS_o_ai vector unsigned long long
  7033. vec_mule(vector unsigned int __a, vector unsigned int __b) {
  7034. return __builtin_s390_vmlef(__a, __b);
  7035. }
  7036. /*-- vec_mulo ---------------------------------------------------------------*/
  7037. static inline __ATTRS_o_ai vector signed short
  7038. vec_mulo(vector signed char __a, vector signed char __b) {
  7039. return __builtin_s390_vmob(__a, __b);
  7040. }
  7041. static inline __ATTRS_o_ai vector unsigned short
  7042. vec_mulo(vector unsigned char __a, vector unsigned char __b) {
  7043. return __builtin_s390_vmlob(__a, __b);
  7044. }
  7045. static inline __ATTRS_o_ai vector signed int
  7046. vec_mulo(vector signed short __a, vector signed short __b) {
  7047. return __builtin_s390_vmoh(__a, __b);
  7048. }
  7049. static inline __ATTRS_o_ai vector unsigned int
  7050. vec_mulo(vector unsigned short __a, vector unsigned short __b) {
  7051. return __builtin_s390_vmloh(__a, __b);
  7052. }
  7053. static inline __ATTRS_o_ai vector signed long long
  7054. vec_mulo(vector signed int __a, vector signed int __b) {
  7055. return __builtin_s390_vmof(__a, __b);
  7056. }
  7057. static inline __ATTRS_o_ai vector unsigned long long
  7058. vec_mulo(vector unsigned int __a, vector unsigned int __b) {
  7059. return __builtin_s390_vmlof(__a, __b);
  7060. }
  7061. /*-- vec_msum_u128 ----------------------------------------------------------*/
  7062. #if __ARCH__ >= 12
  7063. #define vec_msum_u128(X, Y, Z, W) \
  7064. ((vector unsigned char)__builtin_s390_vmslg((X), (Y), (Z), (W)));
  7065. #endif
  7066. /*-- vec_sub_u128 -----------------------------------------------------------*/
  7067. static inline __ATTRS_ai vector unsigned char
  7068. vec_sub_u128(vector unsigned char __a, vector unsigned char __b) {
  7069. return __builtin_s390_vsq(__a, __b);
  7070. }
  7071. /*-- vec_subc ---------------------------------------------------------------*/
  7072. static inline __ATTRS_o_ai vector unsigned char
  7073. vec_subc(vector unsigned char __a, vector unsigned char __b) {
  7074. return __builtin_s390_vscbib(__a, __b);
  7075. }
  7076. static inline __ATTRS_o_ai vector unsigned short
  7077. vec_subc(vector unsigned short __a, vector unsigned short __b) {
  7078. return __builtin_s390_vscbih(__a, __b);
  7079. }
  7080. static inline __ATTRS_o_ai vector unsigned int
  7081. vec_subc(vector unsigned int __a, vector unsigned int __b) {
  7082. return __builtin_s390_vscbif(__a, __b);
  7083. }
  7084. static inline __ATTRS_o_ai vector unsigned long long
  7085. vec_subc(vector unsigned long long __a, vector unsigned long long __b) {
  7086. return __builtin_s390_vscbig(__a, __b);
  7087. }
  7088. /*-- vec_subc_u128 ----------------------------------------------------------*/
  7089. static inline __ATTRS_ai vector unsigned char
  7090. vec_subc_u128(vector unsigned char __a, vector unsigned char __b) {
  7091. return __builtin_s390_vscbiq(__a, __b);
  7092. }
  7093. /*-- vec_sube_u128 ----------------------------------------------------------*/
  7094. static inline __ATTRS_ai vector unsigned char
  7095. vec_sube_u128(vector unsigned char __a, vector unsigned char __b,
  7096. vector unsigned char __c) {
  7097. return __builtin_s390_vsbiq(__a, __b, __c);
  7098. }
  7099. /*-- vec_subec_u128 ---------------------------------------------------------*/
  7100. static inline __ATTRS_ai vector unsigned char
  7101. vec_subec_u128(vector unsigned char __a, vector unsigned char __b,
  7102. vector unsigned char __c) {
  7103. return __builtin_s390_vsbcbiq(__a, __b, __c);
  7104. }
  7105. /*-- vec_sum2 ---------------------------------------------------------------*/
  7106. static inline __ATTRS_o_ai vector unsigned long long
  7107. vec_sum2(vector unsigned short __a, vector unsigned short __b) {
  7108. return __builtin_s390_vsumgh(__a, __b);
  7109. }
  7110. static inline __ATTRS_o_ai vector unsigned long long
  7111. vec_sum2(vector unsigned int __a, vector unsigned int __b) {
  7112. return __builtin_s390_vsumgf(__a, __b);
  7113. }
  7114. /*-- vec_sum_u128 -----------------------------------------------------------*/
  7115. static inline __ATTRS_o_ai vector unsigned char
  7116. vec_sum_u128(vector unsigned int __a, vector unsigned int __b) {
  7117. return __builtin_s390_vsumqf(__a, __b);
  7118. }
  7119. static inline __ATTRS_o_ai vector unsigned char
  7120. vec_sum_u128(vector unsigned long long __a, vector unsigned long long __b) {
  7121. return __builtin_s390_vsumqg(__a, __b);
  7122. }
  7123. /*-- vec_sum4 ---------------------------------------------------------------*/
  7124. static inline __ATTRS_o_ai vector unsigned int
  7125. vec_sum4(vector unsigned char __a, vector unsigned char __b) {
  7126. return __builtin_s390_vsumb(__a, __b);
  7127. }
  7128. static inline __ATTRS_o_ai vector unsigned int
  7129. vec_sum4(vector unsigned short __a, vector unsigned short __b) {
  7130. return __builtin_s390_vsumh(__a, __b);
  7131. }
  7132. /*-- vec_test_mask ----------------------------------------------------------*/
  7133. static inline __ATTRS_o_ai int
  7134. vec_test_mask(vector signed char __a, vector unsigned char __b) {
  7135. return __builtin_s390_vtm((vector unsigned char)__a,
  7136. (vector unsigned char)__b);
  7137. }
  7138. static inline __ATTRS_o_ai int
  7139. vec_test_mask(vector unsigned char __a, vector unsigned char __b) {
  7140. return __builtin_s390_vtm(__a, __b);
  7141. }
  7142. static inline __ATTRS_o_ai int
  7143. vec_test_mask(vector signed short __a, vector unsigned short __b) {
  7144. return __builtin_s390_vtm((vector unsigned char)__a,
  7145. (vector unsigned char)__b);
  7146. }
  7147. static inline __ATTRS_o_ai int
  7148. vec_test_mask(vector unsigned short __a, vector unsigned short __b) {
  7149. return __builtin_s390_vtm((vector unsigned char)__a,
  7150. (vector unsigned char)__b);
  7151. }
  7152. static inline __ATTRS_o_ai int
  7153. vec_test_mask(vector signed int __a, vector unsigned int __b) {
  7154. return __builtin_s390_vtm((vector unsigned char)__a,
  7155. (vector unsigned char)__b);
  7156. }
  7157. static inline __ATTRS_o_ai int
  7158. vec_test_mask(vector unsigned int __a, vector unsigned int __b) {
  7159. return __builtin_s390_vtm((vector unsigned char)__a,
  7160. (vector unsigned char)__b);
  7161. }
  7162. static inline __ATTRS_o_ai int
  7163. vec_test_mask(vector signed long long __a, vector unsigned long long __b) {
  7164. return __builtin_s390_vtm((vector unsigned char)__a,
  7165. (vector unsigned char)__b);
  7166. }
  7167. static inline __ATTRS_o_ai int
  7168. vec_test_mask(vector unsigned long long __a, vector unsigned long long __b) {
  7169. return __builtin_s390_vtm((vector unsigned char)__a,
  7170. (vector unsigned char)__b);
  7171. }
  7172. #if __ARCH__ >= 12
  7173. static inline __ATTRS_o_ai int
  7174. vec_test_mask(vector float __a, vector unsigned int __b) {
  7175. return __builtin_s390_vtm((vector unsigned char)__a,
  7176. (vector unsigned char)__b);
  7177. }
  7178. #endif
  7179. static inline __ATTRS_o_ai int
  7180. vec_test_mask(vector double __a, vector unsigned long long __b) {
  7181. return __builtin_s390_vtm((vector unsigned char)__a,
  7182. (vector unsigned char)__b);
  7183. }
  7184. /*-- vec_madd ---------------------------------------------------------------*/
  7185. #if __ARCH__ >= 12
  7186. static inline __ATTRS_o_ai vector float
  7187. vec_madd(vector float __a, vector float __b, vector float __c) {
  7188. return __builtin_s390_vfmasb(__a, __b, __c);
  7189. }
  7190. #endif
  7191. static inline __ATTRS_o_ai vector double
  7192. vec_madd(vector double __a, vector double __b, vector double __c) {
  7193. return __builtin_s390_vfmadb(__a, __b, __c);
  7194. }
  7195. /*-- vec_msub ---------------------------------------------------------------*/
  7196. #if __ARCH__ >= 12
  7197. static inline __ATTRS_o_ai vector float
  7198. vec_msub(vector float __a, vector float __b, vector float __c) {
  7199. return __builtin_s390_vfmssb(__a, __b, __c);
  7200. }
  7201. #endif
  7202. static inline __ATTRS_o_ai vector double
  7203. vec_msub(vector double __a, vector double __b, vector double __c) {
  7204. return __builtin_s390_vfmsdb(__a, __b, __c);
  7205. }
  7206. /*-- vec_nmadd ---------------------------------------------------------------*/
  7207. #if __ARCH__ >= 12
  7208. static inline __ATTRS_o_ai vector float
  7209. vec_nmadd(vector float __a, vector float __b, vector float __c) {
  7210. return __builtin_s390_vfnmasb(__a, __b, __c);
  7211. }
  7212. static inline __ATTRS_o_ai vector double
  7213. vec_nmadd(vector double __a, vector double __b, vector double __c) {
  7214. return __builtin_s390_vfnmadb(__a, __b, __c);
  7215. }
  7216. #endif
  7217. /*-- vec_nmsub ---------------------------------------------------------------*/
  7218. #if __ARCH__ >= 12
  7219. static inline __ATTRS_o_ai vector float
  7220. vec_nmsub(vector float __a, vector float __b, vector float __c) {
  7221. return __builtin_s390_vfnmssb(__a, __b, __c);
  7222. }
  7223. static inline __ATTRS_o_ai vector double
  7224. vec_nmsub(vector double __a, vector double __b, vector double __c) {
  7225. return __builtin_s390_vfnmsdb(__a, __b, __c);
  7226. }
  7227. #endif
  7228. /*-- vec_sqrt ---------------------------------------------------------------*/
  7229. #if __ARCH__ >= 12
  7230. static inline __ATTRS_o_ai vector float
  7231. vec_sqrt(vector float __a) {
  7232. return __builtin_s390_vfsqsb(__a);
  7233. }
  7234. #endif
  7235. static inline __ATTRS_o_ai vector double
  7236. vec_sqrt(vector double __a) {
  7237. return __builtin_s390_vfsqdb(__a);
  7238. }
  7239. /*-- vec_ld2f ---------------------------------------------------------------*/
  7240. // This prototype is deprecated.
  7241. static inline __ATTRS_ai vector double
  7242. vec_ld2f(const float *__ptr) {
  7243. typedef float __v2f32 __attribute__((__vector_size__(8)));
  7244. return __builtin_convertvector(*(const __v2f32 *)__ptr, vector double);
  7245. }
  7246. /*-- vec_st2f ---------------------------------------------------------------*/
  7247. // This prototype is deprecated.
  7248. static inline __ATTRS_ai void
  7249. vec_st2f(vector double __a, float *__ptr) {
  7250. typedef float __v2f32 __attribute__((__vector_size__(8)));
  7251. *(__v2f32 *)__ptr = __builtin_convertvector(__a, __v2f32);
  7252. }
  7253. /*-- vec_ctd ----------------------------------------------------------------*/
  7254. // This prototype is deprecated.
  7255. static inline __ATTRS_o_ai vector double
  7256. vec_ctd(vector signed long long __a, int __b)
  7257. __constant_range(__b, 0, 31) {
  7258. vector double __conv = __builtin_convertvector(__a, vector double);
  7259. __conv *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52);
  7260. return __conv;
  7261. }
  7262. // This prototype is deprecated.
  7263. static inline __ATTRS_o_ai vector double
  7264. vec_ctd(vector unsigned long long __a, int __b)
  7265. __constant_range(__b, 0, 31) {
  7266. vector double __conv = __builtin_convertvector(__a, vector double);
  7267. __conv *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52);
  7268. return __conv;
  7269. }
  7270. /*-- vec_ctsl ---------------------------------------------------------------*/
  7271. // This prototype is deprecated.
  7272. static inline __ATTRS_o_ai vector signed long long
  7273. vec_ctsl(vector double __a, int __b)
  7274. __constant_range(__b, 0, 31) {
  7275. __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52);
  7276. return __builtin_convertvector(__a, vector signed long long);
  7277. }
  7278. /*-- vec_ctul ---------------------------------------------------------------*/
  7279. // This prototype is deprecated.
  7280. static inline __ATTRS_o_ai vector unsigned long long
  7281. vec_ctul(vector double __a, int __b)
  7282. __constant_range(__b, 0, 31) {
  7283. __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52);
  7284. return __builtin_convertvector(__a, vector unsigned long long);
  7285. }
  7286. /*-- vec_doublee ------------------------------------------------------------*/
  7287. #if __ARCH__ >= 12
  7288. static inline __ATTRS_ai vector double
  7289. vec_doublee(vector float __a) {
  7290. typedef float __v2f32 __attribute__((__vector_size__(8)));
  7291. __v2f32 __pack = __builtin_shufflevector(__a, __a, 0, 2);
  7292. return __builtin_convertvector(__pack, vector double);
  7293. }
  7294. #endif
  7295. /*-- vec_floate -------------------------------------------------------------*/
  7296. #if __ARCH__ >= 12
  7297. static inline __ATTRS_ai vector float
  7298. vec_floate(vector double __a) {
  7299. typedef float __v2f32 __attribute__((__vector_size__(8)));
  7300. __v2f32 __pack = __builtin_convertvector(__a, __v2f32);
  7301. return __builtin_shufflevector(__pack, __pack, 0, -1, 1, -1);
  7302. }
  7303. #endif
  7304. /*-- vec_double -------------------------------------------------------------*/
  7305. static inline __ATTRS_o_ai vector double
  7306. vec_double(vector signed long long __a) {
  7307. return __builtin_convertvector(__a, vector double);
  7308. }
  7309. static inline __ATTRS_o_ai vector double
  7310. vec_double(vector unsigned long long __a) {
  7311. return __builtin_convertvector(__a, vector double);
  7312. }
  7313. /*-- vec_signed -------------------------------------------------------------*/
  7314. static inline __ATTRS_o_ai vector signed long long
  7315. vec_signed(vector double __a) {
  7316. return __builtin_convertvector(__a, vector signed long long);
  7317. }
  7318. /*-- vec_unsigned -----------------------------------------------------------*/
  7319. static inline __ATTRS_o_ai vector unsigned long long
  7320. vec_unsigned(vector double __a) {
  7321. return __builtin_convertvector(__a, vector unsigned long long);
  7322. }
  7323. /*-- vec_roundp -------------------------------------------------------------*/
  7324. #if __ARCH__ >= 12
  7325. static inline __ATTRS_o_ai vector float
  7326. vec_roundp(vector float __a) {
  7327. return __builtin_s390_vfisb(__a, 4, 6);
  7328. }
  7329. #endif
  7330. static inline __ATTRS_o_ai vector double
  7331. vec_roundp(vector double __a) {
  7332. return __builtin_s390_vfidb(__a, 4, 6);
  7333. }
  7334. /*-- vec_ceil ---------------------------------------------------------------*/
  7335. #if __ARCH__ >= 12
  7336. static inline __ATTRS_o_ai vector float
  7337. vec_ceil(vector float __a) {
  7338. // On this platform, vec_ceil never triggers the IEEE-inexact exception.
  7339. return __builtin_s390_vfisb(__a, 4, 6);
  7340. }
  7341. #endif
  7342. static inline __ATTRS_o_ai vector double
  7343. vec_ceil(vector double __a) {
  7344. // On this platform, vec_ceil never triggers the IEEE-inexact exception.
  7345. return __builtin_s390_vfidb(__a, 4, 6);
  7346. }
  7347. /*-- vec_roundm -------------------------------------------------------------*/
  7348. #if __ARCH__ >= 12
  7349. static inline __ATTRS_o_ai vector float
  7350. vec_roundm(vector float __a) {
  7351. return __builtin_s390_vfisb(__a, 4, 7);
  7352. }
  7353. #endif
  7354. static inline __ATTRS_o_ai vector double
  7355. vec_roundm(vector double __a) {
  7356. return __builtin_s390_vfidb(__a, 4, 7);
  7357. }
  7358. /*-- vec_floor --------------------------------------------------------------*/
  7359. #if __ARCH__ >= 12
  7360. static inline __ATTRS_o_ai vector float
  7361. vec_floor(vector float __a) {
  7362. // On this platform, vec_floor never triggers the IEEE-inexact exception.
  7363. return __builtin_s390_vfisb(__a, 4, 7);
  7364. }
  7365. #endif
  7366. static inline __ATTRS_o_ai vector double
  7367. vec_floor(vector double __a) {
  7368. // On this platform, vec_floor never triggers the IEEE-inexact exception.
  7369. return __builtin_s390_vfidb(__a, 4, 7);
  7370. }
  7371. /*-- vec_roundz -------------------------------------------------------------*/
  7372. #if __ARCH__ >= 12
  7373. static inline __ATTRS_o_ai vector float
  7374. vec_roundz(vector float __a) {
  7375. return __builtin_s390_vfisb(__a, 4, 5);
  7376. }
  7377. #endif
  7378. static inline __ATTRS_o_ai vector double
  7379. vec_roundz(vector double __a) {
  7380. return __builtin_s390_vfidb(__a, 4, 5);
  7381. }
  7382. /*-- vec_trunc --------------------------------------------------------------*/
  7383. #if __ARCH__ >= 12
  7384. static inline __ATTRS_o_ai vector float
  7385. vec_trunc(vector float __a) {
  7386. // On this platform, vec_trunc never triggers the IEEE-inexact exception.
  7387. return __builtin_s390_vfisb(__a, 4, 5);
  7388. }
  7389. #endif
  7390. static inline __ATTRS_o_ai vector double
  7391. vec_trunc(vector double __a) {
  7392. // On this platform, vec_trunc never triggers the IEEE-inexact exception.
  7393. return __builtin_s390_vfidb(__a, 4, 5);
  7394. }
  7395. /*-- vec_roundc -------------------------------------------------------------*/
  7396. #if __ARCH__ >= 12
  7397. static inline __ATTRS_o_ai vector float
  7398. vec_roundc(vector float __a) {
  7399. return __builtin_s390_vfisb(__a, 4, 0);
  7400. }
  7401. #endif
  7402. static inline __ATTRS_o_ai vector double
  7403. vec_roundc(vector double __a) {
  7404. return __builtin_s390_vfidb(__a, 4, 0);
  7405. }
  7406. /*-- vec_rint ---------------------------------------------------------------*/
  7407. #if __ARCH__ >= 12
  7408. static inline __ATTRS_o_ai vector float
  7409. vec_rint(vector float __a) {
  7410. // vec_rint may trigger the IEEE-inexact exception.
  7411. return __builtin_s390_vfisb(__a, 0, 0);
  7412. }
  7413. #endif
  7414. static inline __ATTRS_o_ai vector double
  7415. vec_rint(vector double __a) {
  7416. // vec_rint may trigger the IEEE-inexact exception.
  7417. return __builtin_s390_vfidb(__a, 0, 0);
  7418. }
  7419. /*-- vec_round --------------------------------------------------------------*/
  7420. #if __ARCH__ >= 12
  7421. static inline __ATTRS_o_ai vector float
  7422. vec_round(vector float __a) {
  7423. return __builtin_s390_vfisb(__a, 4, 4);
  7424. }
  7425. #endif
  7426. static inline __ATTRS_o_ai vector double
  7427. vec_round(vector double __a) {
  7428. return __builtin_s390_vfidb(__a, 4, 4);
  7429. }
  7430. /*-- vec_fp_test_data_class -------------------------------------------------*/
  7431. #if __ARCH__ >= 12
  7432. extern __ATTRS_o vector bool int
  7433. vec_fp_test_data_class(vector float __a, int __b, int *__c)
  7434. __constant_range(__b, 0, 4095);
  7435. extern __ATTRS_o vector bool long long
  7436. vec_fp_test_data_class(vector double __a, int __b, int *__c)
  7437. __constant_range(__b, 0, 4095);
  7438. #define vec_fp_test_data_class(X, Y, Z) \
  7439. ((__typeof__((vec_fp_test_data_class)((X), (Y), (Z)))) \
  7440. __extension__ ({ \
  7441. vector unsigned char __res; \
  7442. vector unsigned char __x = (vector unsigned char)(X); \
  7443. int *__z = (Z); \
  7444. switch (sizeof ((X)[0])) { \
  7445. case 4: __res = (vector unsigned char) \
  7446. __builtin_s390_vftcisb((vector float)__x, (Y), __z); \
  7447. break; \
  7448. default: __res = (vector unsigned char) \
  7449. __builtin_s390_vftcidb((vector double)__x, (Y), __z); \
  7450. break; \
  7451. } __res; }))
  7452. #else
  7453. #define vec_fp_test_data_class(X, Y, Z) \
  7454. ((vector bool long long)__builtin_s390_vftcidb((X), (Y), (Z)))
  7455. #endif
  7456. #define __VEC_CLASS_FP_ZERO_P (1 << 11)
  7457. #define __VEC_CLASS_FP_ZERO_N (1 << 10)
  7458. #define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | __VEC_CLASS_FP_ZERO_N)
  7459. #define __VEC_CLASS_FP_NORMAL_P (1 << 9)
  7460. #define __VEC_CLASS_FP_NORMAL_N (1 << 8)
  7461. #define __VEC_CLASS_FP_NORMAL (__VEC_CLASS_FP_NORMAL_P | \
  7462. __VEC_CLASS_FP_NORMAL_N)
  7463. #define __VEC_CLASS_FP_SUBNORMAL_P (1 << 7)
  7464. #define __VEC_CLASS_FP_SUBNORMAL_N (1 << 6)
  7465. #define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
  7466. __VEC_CLASS_FP_SUBNORMAL_N)
  7467. #define __VEC_CLASS_FP_INFINITY_P (1 << 5)
  7468. #define __VEC_CLASS_FP_INFINITY_N (1 << 4)
  7469. #define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
  7470. __VEC_CLASS_FP_INFINITY_N)
  7471. #define __VEC_CLASS_FP_QNAN_P (1 << 3)
  7472. #define __VEC_CLASS_FP_QNAN_N (1 << 2)
  7473. #define __VEC_CLASS_FP_QNAN (__VEC_CLASS_FP_QNAN_P | __VEC_CLASS_FP_QNAN_N)
  7474. #define __VEC_CLASS_FP_SNAN_P (1 << 1)
  7475. #define __VEC_CLASS_FP_SNAN_N (1 << 0)
  7476. #define __VEC_CLASS_FP_SNAN (__VEC_CLASS_FP_SNAN_P | __VEC_CLASS_FP_SNAN_N)
  7477. #define __VEC_CLASS_FP_NAN (__VEC_CLASS_FP_QNAN | __VEC_CLASS_FP_SNAN)
  7478. #define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
  7479. __VEC_CLASS_FP_SUBNORMAL | \
  7480. __VEC_CLASS_FP_ZERO | \
  7481. __VEC_CLASS_FP_INFINITY)
  7482. /*-- vec_cp_until_zero ------------------------------------------------------*/
  7483. static inline __ATTRS_o_ai vector signed char
  7484. vec_cp_until_zero(vector signed char __a) {
  7485. return (vector signed char)__builtin_s390_vistrb((vector unsigned char)__a);
  7486. }
  7487. static inline __ATTRS_o_ai vector bool char
  7488. vec_cp_until_zero(vector bool char __a) {
  7489. return (vector bool char)__builtin_s390_vistrb((vector unsigned char)__a);
  7490. }
  7491. static inline __ATTRS_o_ai vector unsigned char
  7492. vec_cp_until_zero(vector unsigned char __a) {
  7493. return __builtin_s390_vistrb(__a);
  7494. }
  7495. static inline __ATTRS_o_ai vector signed short
  7496. vec_cp_until_zero(vector signed short __a) {
  7497. return (vector signed short)__builtin_s390_vistrh((vector unsigned short)__a);
  7498. }
  7499. static inline __ATTRS_o_ai vector bool short
  7500. vec_cp_until_zero(vector bool short __a) {
  7501. return (vector bool short)__builtin_s390_vistrh((vector unsigned short)__a);
  7502. }
  7503. static inline __ATTRS_o_ai vector unsigned short
  7504. vec_cp_until_zero(vector unsigned short __a) {
  7505. return __builtin_s390_vistrh(__a);
  7506. }
  7507. static inline __ATTRS_o_ai vector signed int
  7508. vec_cp_until_zero(vector signed int __a) {
  7509. return (vector signed int)__builtin_s390_vistrf((vector unsigned int)__a);
  7510. }
  7511. static inline __ATTRS_o_ai vector bool int
  7512. vec_cp_until_zero(vector bool int __a) {
  7513. return (vector bool int)__builtin_s390_vistrf((vector unsigned int)__a);
  7514. }
  7515. static inline __ATTRS_o_ai vector unsigned int
  7516. vec_cp_until_zero(vector unsigned int __a) {
  7517. return __builtin_s390_vistrf(__a);
  7518. }
  7519. /*-- vec_cp_until_zero_cc ---------------------------------------------------*/
  7520. static inline __ATTRS_o_ai vector signed char
  7521. vec_cp_until_zero_cc(vector signed char __a, int *__cc) {
  7522. return (vector signed char)
  7523. __builtin_s390_vistrbs((vector unsigned char)__a, __cc);
  7524. }
  7525. static inline __ATTRS_o_ai vector bool char
  7526. vec_cp_until_zero_cc(vector bool char __a, int *__cc) {
  7527. return (vector bool char)
  7528. __builtin_s390_vistrbs((vector unsigned char)__a, __cc);
  7529. }
  7530. static inline __ATTRS_o_ai vector unsigned char
  7531. vec_cp_until_zero_cc(vector unsigned char __a, int *__cc) {
  7532. return __builtin_s390_vistrbs(__a, __cc);
  7533. }
  7534. static inline __ATTRS_o_ai vector signed short
  7535. vec_cp_until_zero_cc(vector signed short __a, int *__cc) {
  7536. return (vector signed short)
  7537. __builtin_s390_vistrhs((vector unsigned short)__a, __cc);
  7538. }
  7539. static inline __ATTRS_o_ai vector bool short
  7540. vec_cp_until_zero_cc(vector bool short __a, int *__cc) {
  7541. return (vector bool short)
  7542. __builtin_s390_vistrhs((vector unsigned short)__a, __cc);
  7543. }
  7544. static inline __ATTRS_o_ai vector unsigned short
  7545. vec_cp_until_zero_cc(vector unsigned short __a, int *__cc) {
  7546. return __builtin_s390_vistrhs(__a, __cc);
  7547. }
  7548. static inline __ATTRS_o_ai vector signed int
  7549. vec_cp_until_zero_cc(vector signed int __a, int *__cc) {
  7550. return (vector signed int)
  7551. __builtin_s390_vistrfs((vector unsigned int)__a, __cc);
  7552. }
  7553. static inline __ATTRS_o_ai vector bool int
  7554. vec_cp_until_zero_cc(vector bool int __a, int *__cc) {
  7555. return (vector bool int)__builtin_s390_vistrfs((vector unsigned int)__a,
  7556. __cc);
  7557. }
  7558. static inline __ATTRS_o_ai vector unsigned int
  7559. vec_cp_until_zero_cc(vector unsigned int __a, int *__cc) {
  7560. return __builtin_s390_vistrfs(__a, __cc);
  7561. }
  7562. /*-- vec_cmpeq_idx ----------------------------------------------------------*/
  7563. static inline __ATTRS_o_ai vector signed char
  7564. vec_cmpeq_idx(vector signed char __a, vector signed char __b) {
  7565. return (vector signed char)
  7566. __builtin_s390_vfeeb((vector unsigned char)__a,
  7567. (vector unsigned char)__b);
  7568. }
  7569. static inline __ATTRS_o_ai vector unsigned char
  7570. vec_cmpeq_idx(vector bool char __a, vector bool char __b) {
  7571. return __builtin_s390_vfeeb((vector unsigned char)__a,
  7572. (vector unsigned char)__b);
  7573. }
  7574. static inline __ATTRS_o_ai vector unsigned char
  7575. vec_cmpeq_idx(vector unsigned char __a, vector unsigned char __b) {
  7576. return __builtin_s390_vfeeb(__a, __b);
  7577. }
  7578. static inline __ATTRS_o_ai vector signed short
  7579. vec_cmpeq_idx(vector signed short __a, vector signed short __b) {
  7580. return (vector signed short)
  7581. __builtin_s390_vfeeh((vector unsigned short)__a,
  7582. (vector unsigned short)__b);
  7583. }
  7584. static inline __ATTRS_o_ai vector unsigned short
  7585. vec_cmpeq_idx(vector bool short __a, vector bool short __b) {
  7586. return __builtin_s390_vfeeh((vector unsigned short)__a,
  7587. (vector unsigned short)__b);
  7588. }
  7589. static inline __ATTRS_o_ai vector unsigned short
  7590. vec_cmpeq_idx(vector unsigned short __a, vector unsigned short __b) {
  7591. return __builtin_s390_vfeeh(__a, __b);
  7592. }
  7593. static inline __ATTRS_o_ai vector signed int
  7594. vec_cmpeq_idx(vector signed int __a, vector signed int __b) {
  7595. return (vector signed int)
  7596. __builtin_s390_vfeef((vector unsigned int)__a,
  7597. (vector unsigned int)__b);
  7598. }
  7599. static inline __ATTRS_o_ai vector unsigned int
  7600. vec_cmpeq_idx(vector bool int __a, vector bool int __b) {
  7601. return __builtin_s390_vfeef((vector unsigned int)__a,
  7602. (vector unsigned int)__b);
  7603. }
  7604. static inline __ATTRS_o_ai vector unsigned int
  7605. vec_cmpeq_idx(vector unsigned int __a, vector unsigned int __b) {
  7606. return __builtin_s390_vfeef(__a, __b);
  7607. }
  7608. /*-- vec_cmpeq_idx_cc -------------------------------------------------------*/
  7609. static inline __ATTRS_o_ai vector signed char
  7610. vec_cmpeq_idx_cc(vector signed char __a, vector signed char __b, int *__cc) {
  7611. return (vector signed char)
  7612. __builtin_s390_vfeebs((vector unsigned char)__a,
  7613. (vector unsigned char)__b, __cc);
  7614. }
  7615. static inline __ATTRS_o_ai vector unsigned char
  7616. vec_cmpeq_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
  7617. return __builtin_s390_vfeebs((vector unsigned char)__a,
  7618. (vector unsigned char)__b, __cc);
  7619. }
  7620. static inline __ATTRS_o_ai vector unsigned char
  7621. vec_cmpeq_idx_cc(vector unsigned char __a, vector unsigned char __b,
  7622. int *__cc) {
  7623. return __builtin_s390_vfeebs(__a, __b, __cc);
  7624. }
  7625. static inline __ATTRS_o_ai vector signed short
  7626. vec_cmpeq_idx_cc(vector signed short __a, vector signed short __b, int *__cc) {
  7627. return (vector signed short)
  7628. __builtin_s390_vfeehs((vector unsigned short)__a,
  7629. (vector unsigned short)__b, __cc);
  7630. }
  7631. static inline __ATTRS_o_ai vector unsigned short
  7632. vec_cmpeq_idx_cc(vector bool short __a, vector bool short __b, int *__cc) {
  7633. return __builtin_s390_vfeehs((vector unsigned short)__a,
  7634. (vector unsigned short)__b, __cc);
  7635. }
  7636. static inline __ATTRS_o_ai vector unsigned short
  7637. vec_cmpeq_idx_cc(vector unsigned short __a, vector unsigned short __b,
  7638. int *__cc) {
  7639. return __builtin_s390_vfeehs(__a, __b, __cc);
  7640. }
  7641. static inline __ATTRS_o_ai vector signed int
  7642. vec_cmpeq_idx_cc(vector signed int __a, vector signed int __b, int *__cc) {
  7643. return (vector signed int)
  7644. __builtin_s390_vfeefs((vector unsigned int)__a,
  7645. (vector unsigned int)__b, __cc);
  7646. }
  7647. static inline __ATTRS_o_ai vector unsigned int
  7648. vec_cmpeq_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
  7649. return __builtin_s390_vfeefs((vector unsigned int)__a,
  7650. (vector unsigned int)__b, __cc);
  7651. }
  7652. static inline __ATTRS_o_ai vector unsigned int
  7653. vec_cmpeq_idx_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) {
  7654. return __builtin_s390_vfeefs(__a, __b, __cc);
  7655. }
  7656. /*-- vec_cmpeq_or_0_idx -----------------------------------------------------*/
  7657. static inline __ATTRS_o_ai vector signed char
  7658. vec_cmpeq_or_0_idx(vector signed char __a, vector signed char __b) {
  7659. return (vector signed char)
  7660. __builtin_s390_vfeezb((vector unsigned char)__a,
  7661. (vector unsigned char)__b);
  7662. }
  7663. static inline __ATTRS_o_ai vector unsigned char
  7664. vec_cmpeq_or_0_idx(vector bool char __a, vector bool char __b) {
  7665. return __builtin_s390_vfeezb((vector unsigned char)__a,
  7666. (vector unsigned char)__b);
  7667. }
  7668. static inline __ATTRS_o_ai vector unsigned char
  7669. vec_cmpeq_or_0_idx(vector unsigned char __a, vector unsigned char __b) {
  7670. return __builtin_s390_vfeezb(__a, __b);
  7671. }
  7672. static inline __ATTRS_o_ai vector signed short
  7673. vec_cmpeq_or_0_idx(vector signed short __a, vector signed short __b) {
  7674. return (vector signed short)
  7675. __builtin_s390_vfeezh((vector unsigned short)__a,
  7676. (vector unsigned short)__b);
  7677. }
  7678. static inline __ATTRS_o_ai vector unsigned short
  7679. vec_cmpeq_or_0_idx(vector bool short __a, vector bool short __b) {
  7680. return __builtin_s390_vfeezh((vector unsigned short)__a,
  7681. (vector unsigned short)__b);
  7682. }
  7683. static inline __ATTRS_o_ai vector unsigned short
  7684. vec_cmpeq_or_0_idx(vector unsigned short __a, vector unsigned short __b) {
  7685. return __builtin_s390_vfeezh(__a, __b);
  7686. }
  7687. static inline __ATTRS_o_ai vector signed int
  7688. vec_cmpeq_or_0_idx(vector signed int __a, vector signed int __b) {
  7689. return (vector signed int)
  7690. __builtin_s390_vfeezf((vector unsigned int)__a,
  7691. (vector unsigned int)__b);
  7692. }
  7693. static inline __ATTRS_o_ai vector unsigned int
  7694. vec_cmpeq_or_0_idx(vector bool int __a, vector bool int __b) {
  7695. return __builtin_s390_vfeezf((vector unsigned int)__a,
  7696. (vector unsigned int)__b);
  7697. }
  7698. static inline __ATTRS_o_ai vector unsigned int
  7699. vec_cmpeq_or_0_idx(vector unsigned int __a, vector unsigned int __b) {
  7700. return __builtin_s390_vfeezf(__a, __b);
  7701. }
  7702. /*-- vec_cmpeq_or_0_idx_cc --------------------------------------------------*/
  7703. static inline __ATTRS_o_ai vector signed char
  7704. vec_cmpeq_or_0_idx_cc(vector signed char __a, vector signed char __b,
  7705. int *__cc) {
  7706. return (vector signed char)
  7707. __builtin_s390_vfeezbs((vector unsigned char)__a,
  7708. (vector unsigned char)__b, __cc);
  7709. }
  7710. static inline __ATTRS_o_ai vector unsigned char
  7711. vec_cmpeq_or_0_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
  7712. return __builtin_s390_vfeezbs((vector unsigned char)__a,
  7713. (vector unsigned char)__b, __cc);
  7714. }
  7715. static inline __ATTRS_o_ai vector unsigned char
  7716. vec_cmpeq_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
  7717. int *__cc) {
  7718. return __builtin_s390_vfeezbs(__a, __b, __cc);
  7719. }
  7720. static inline __ATTRS_o_ai vector signed short
  7721. vec_cmpeq_or_0_idx_cc(vector signed short __a, vector signed short __b,
  7722. int *__cc) {
  7723. return (vector signed short)
  7724. __builtin_s390_vfeezhs((vector unsigned short)__a,
  7725. (vector unsigned short)__b, __cc);
  7726. }
  7727. static inline __ATTRS_o_ai vector unsigned short
  7728. vec_cmpeq_or_0_idx_cc(vector bool short __a, vector bool short __b, int *__cc) {
  7729. return __builtin_s390_vfeezhs((vector unsigned short)__a,
  7730. (vector unsigned short)__b, __cc);
  7731. }
  7732. static inline __ATTRS_o_ai vector unsigned short
  7733. vec_cmpeq_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b,
  7734. int *__cc) {
  7735. return __builtin_s390_vfeezhs(__a, __b, __cc);
  7736. }
  7737. static inline __ATTRS_o_ai vector signed int
  7738. vec_cmpeq_or_0_idx_cc(vector signed int __a, vector signed int __b, int *__cc) {
  7739. return (vector signed int)
  7740. __builtin_s390_vfeezfs((vector unsigned int)__a,
  7741. (vector unsigned int)__b, __cc);
  7742. }
  7743. static inline __ATTRS_o_ai vector unsigned int
  7744. vec_cmpeq_or_0_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
  7745. return __builtin_s390_vfeezfs((vector unsigned int)__a,
  7746. (vector unsigned int)__b, __cc);
  7747. }
  7748. static inline __ATTRS_o_ai vector unsigned int
  7749. vec_cmpeq_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
  7750. int *__cc) {
  7751. return __builtin_s390_vfeezfs(__a, __b, __cc);
  7752. }
  7753. /*-- vec_cmpne_idx ----------------------------------------------------------*/
  7754. static inline __ATTRS_o_ai vector signed char
  7755. vec_cmpne_idx(vector signed char __a, vector signed char __b) {
  7756. return (vector signed char)
  7757. __builtin_s390_vfeneb((vector unsigned char)__a,
  7758. (vector unsigned char)__b);
  7759. }
  7760. static inline __ATTRS_o_ai vector unsigned char
  7761. vec_cmpne_idx(vector bool char __a, vector bool char __b) {
  7762. return __builtin_s390_vfeneb((vector unsigned char)__a,
  7763. (vector unsigned char)__b);
  7764. }
  7765. static inline __ATTRS_o_ai vector unsigned char
  7766. vec_cmpne_idx(vector unsigned char __a, vector unsigned char __b) {
  7767. return __builtin_s390_vfeneb(__a, __b);
  7768. }
  7769. static inline __ATTRS_o_ai vector signed short
  7770. vec_cmpne_idx(vector signed short __a, vector signed short __b) {
  7771. return (vector signed short)
  7772. __builtin_s390_vfeneh((vector unsigned short)__a,
  7773. (vector unsigned short)__b);
  7774. }
  7775. static inline __ATTRS_o_ai vector unsigned short
  7776. vec_cmpne_idx(vector bool short __a, vector bool short __b) {
  7777. return __builtin_s390_vfeneh((vector unsigned short)__a,
  7778. (vector unsigned short)__b);
  7779. }
  7780. static inline __ATTRS_o_ai vector unsigned short
  7781. vec_cmpne_idx(vector unsigned short __a, vector unsigned short __b) {
  7782. return __builtin_s390_vfeneh(__a, __b);
  7783. }
  7784. static inline __ATTRS_o_ai vector signed int
  7785. vec_cmpne_idx(vector signed int __a, vector signed int __b) {
  7786. return (vector signed int)
  7787. __builtin_s390_vfenef((vector unsigned int)__a,
  7788. (vector unsigned int)__b);
  7789. }
  7790. static inline __ATTRS_o_ai vector unsigned int
  7791. vec_cmpne_idx(vector bool int __a, vector bool int __b) {
  7792. return __builtin_s390_vfenef((vector unsigned int)__a,
  7793. (vector unsigned int)__b);
  7794. }
  7795. static inline __ATTRS_o_ai vector unsigned int
  7796. vec_cmpne_idx(vector unsigned int __a, vector unsigned int __b) {
  7797. return __builtin_s390_vfenef(__a, __b);
  7798. }
  7799. /*-- vec_cmpne_idx_cc -------------------------------------------------------*/
  7800. static inline __ATTRS_o_ai vector signed char
  7801. vec_cmpne_idx_cc(vector signed char __a, vector signed char __b, int *__cc) {
  7802. return (vector signed char)
  7803. __builtin_s390_vfenebs((vector unsigned char)__a,
  7804. (vector unsigned char)__b, __cc);
  7805. }
  7806. static inline __ATTRS_o_ai vector unsigned char
  7807. vec_cmpne_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
  7808. return __builtin_s390_vfenebs((vector unsigned char)__a,
  7809. (vector unsigned char)__b, __cc);
  7810. }
  7811. static inline __ATTRS_o_ai vector unsigned char
  7812. vec_cmpne_idx_cc(vector unsigned char __a, vector unsigned char __b,
  7813. int *__cc) {
  7814. return __builtin_s390_vfenebs(__a, __b, __cc);
  7815. }
  7816. static inline __ATTRS_o_ai vector signed short
  7817. vec_cmpne_idx_cc(vector signed short __a, vector signed short __b, int *__cc) {
  7818. return (vector signed short)
  7819. __builtin_s390_vfenehs((vector unsigned short)__a,
  7820. (vector unsigned short)__b, __cc);
  7821. }
  7822. static inline __ATTRS_o_ai vector unsigned short
  7823. vec_cmpne_idx_cc(vector bool short __a, vector bool short __b, int *__cc) {
  7824. return __builtin_s390_vfenehs((vector unsigned short)__a,
  7825. (vector unsigned short)__b, __cc);
  7826. }
  7827. static inline __ATTRS_o_ai vector unsigned short
  7828. vec_cmpne_idx_cc(vector unsigned short __a, vector unsigned short __b,
  7829. int *__cc) {
  7830. return __builtin_s390_vfenehs(__a, __b, __cc);
  7831. }
  7832. static inline __ATTRS_o_ai vector signed int
  7833. vec_cmpne_idx_cc(vector signed int __a, vector signed int __b, int *__cc) {
  7834. return (vector signed int)
  7835. __builtin_s390_vfenefs((vector unsigned int)__a,
  7836. (vector unsigned int)__b, __cc);
  7837. }
  7838. static inline __ATTRS_o_ai vector unsigned int
  7839. vec_cmpne_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
  7840. return __builtin_s390_vfenefs((vector unsigned int)__a,
  7841. (vector unsigned int)__b, __cc);
  7842. }
  7843. static inline __ATTRS_o_ai vector unsigned int
  7844. vec_cmpne_idx_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) {
  7845. return __builtin_s390_vfenefs(__a, __b, __cc);
  7846. }
  7847. /*-- vec_cmpne_or_0_idx -----------------------------------------------------*/
  7848. static inline __ATTRS_o_ai vector signed char
  7849. vec_cmpne_or_0_idx(vector signed char __a, vector signed char __b) {
  7850. return (vector signed char)
  7851. __builtin_s390_vfenezb((vector unsigned char)__a,
  7852. (vector unsigned char)__b);
  7853. }
  7854. static inline __ATTRS_o_ai vector unsigned char
  7855. vec_cmpne_or_0_idx(vector bool char __a, vector bool char __b) {
  7856. return __builtin_s390_vfenezb((vector unsigned char)__a,
  7857. (vector unsigned char)__b);
  7858. }
  7859. static inline __ATTRS_o_ai vector unsigned char
  7860. vec_cmpne_or_0_idx(vector unsigned char __a, vector unsigned char __b) {
  7861. return __builtin_s390_vfenezb(__a, __b);
  7862. }
  7863. static inline __ATTRS_o_ai vector signed short
  7864. vec_cmpne_or_0_idx(vector signed short __a, vector signed short __b) {
  7865. return (vector signed short)
  7866. __builtin_s390_vfenezh((vector unsigned short)__a,
  7867. (vector unsigned short)__b);
  7868. }
  7869. static inline __ATTRS_o_ai vector unsigned short
  7870. vec_cmpne_or_0_idx(vector bool short __a, vector bool short __b) {
  7871. return __builtin_s390_vfenezh((vector unsigned short)__a,
  7872. (vector unsigned short)__b);
  7873. }
  7874. static inline __ATTRS_o_ai vector unsigned short
  7875. vec_cmpne_or_0_idx(vector unsigned short __a, vector unsigned short __b) {
  7876. return __builtin_s390_vfenezh(__a, __b);
  7877. }
  7878. static inline __ATTRS_o_ai vector signed int
  7879. vec_cmpne_or_0_idx(vector signed int __a, vector signed int __b) {
  7880. return (vector signed int)
  7881. __builtin_s390_vfenezf((vector unsigned int)__a,
  7882. (vector unsigned int)__b);
  7883. }
  7884. static inline __ATTRS_o_ai vector unsigned int
  7885. vec_cmpne_or_0_idx(vector bool int __a, vector bool int __b) {
  7886. return __builtin_s390_vfenezf((vector unsigned int)__a,
  7887. (vector unsigned int)__b);
  7888. }
  7889. static inline __ATTRS_o_ai vector unsigned int
  7890. vec_cmpne_or_0_idx(vector unsigned int __a, vector unsigned int __b) {
  7891. return __builtin_s390_vfenezf(__a, __b);
  7892. }
  7893. /*-- vec_cmpne_or_0_idx_cc --------------------------------------------------*/
  7894. static inline __ATTRS_o_ai vector signed char
  7895. vec_cmpne_or_0_idx_cc(vector signed char __a, vector signed char __b,
  7896. int *__cc) {
  7897. return (vector signed char)
  7898. __builtin_s390_vfenezbs((vector unsigned char)__a,
  7899. (vector unsigned char)__b, __cc);
  7900. }
  7901. static inline __ATTRS_o_ai vector unsigned char
  7902. vec_cmpne_or_0_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
  7903. return __builtin_s390_vfenezbs((vector unsigned char)__a,
  7904. (vector unsigned char)__b, __cc);
  7905. }
  7906. static inline __ATTRS_o_ai vector unsigned char
  7907. vec_cmpne_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
  7908. int *__cc) {
  7909. return __builtin_s390_vfenezbs(__a, __b, __cc);
  7910. }
  7911. static inline __ATTRS_o_ai vector signed short
  7912. vec_cmpne_or_0_idx_cc(vector signed short __a, vector signed short __b,
  7913. int *__cc) {
  7914. return (vector signed short)
  7915. __builtin_s390_vfenezhs((vector unsigned short)__a,
  7916. (vector unsigned short)__b, __cc);
  7917. }
  7918. static inline __ATTRS_o_ai vector unsigned short
  7919. vec_cmpne_or_0_idx_cc(vector bool short __a, vector bool short __b, int *__cc) {
  7920. return __builtin_s390_vfenezhs((vector unsigned short)__a,
  7921. (vector unsigned short)__b, __cc);
  7922. }
  7923. static inline __ATTRS_o_ai vector unsigned short
  7924. vec_cmpne_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b,
  7925. int *__cc) {
  7926. return __builtin_s390_vfenezhs(__a, __b, __cc);
  7927. }
  7928. static inline __ATTRS_o_ai vector signed int
  7929. vec_cmpne_or_0_idx_cc(vector signed int __a, vector signed int __b, int *__cc) {
  7930. return (vector signed int)
  7931. __builtin_s390_vfenezfs((vector unsigned int)__a,
  7932. (vector unsigned int)__b, __cc);
  7933. }
  7934. static inline __ATTRS_o_ai vector unsigned int
  7935. vec_cmpne_or_0_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
  7936. return __builtin_s390_vfenezfs((vector unsigned int)__a,
  7937. (vector unsigned int)__b, __cc);
  7938. }
  7939. static inline __ATTRS_o_ai vector unsigned int
  7940. vec_cmpne_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
  7941. int *__cc) {
  7942. return __builtin_s390_vfenezfs(__a, __b, __cc);
  7943. }
  7944. /*-- vec_cmprg --------------------------------------------------------------*/
  7945. static inline __ATTRS_o_ai vector bool char
  7946. vec_cmprg(vector unsigned char __a, vector unsigned char __b,
  7947. vector unsigned char __c) {
  7948. return (vector bool char)__builtin_s390_vstrcb(__a, __b, __c, 4);
  7949. }
  7950. static inline __ATTRS_o_ai vector bool short
  7951. vec_cmprg(vector unsigned short __a, vector unsigned short __b,
  7952. vector unsigned short __c) {
  7953. return (vector bool short)__builtin_s390_vstrch(__a, __b, __c, 4);
  7954. }
  7955. static inline __ATTRS_o_ai vector bool int
  7956. vec_cmprg(vector unsigned int __a, vector unsigned int __b,
  7957. vector unsigned int __c) {
  7958. return (vector bool int)__builtin_s390_vstrcf(__a, __b, __c, 4);
  7959. }
  7960. /*-- vec_cmprg_cc -----------------------------------------------------------*/
  7961. static inline __ATTRS_o_ai vector bool char
  7962. vec_cmprg_cc(vector unsigned char __a, vector unsigned char __b,
  7963. vector unsigned char __c, int *__cc) {
  7964. return (vector bool char)__builtin_s390_vstrcbs(__a, __b, __c, 4, __cc);
  7965. }
  7966. static inline __ATTRS_o_ai vector bool short
  7967. vec_cmprg_cc(vector unsigned short __a, vector unsigned short __b,
  7968. vector unsigned short __c, int *__cc) {
  7969. return (vector bool short)__builtin_s390_vstrchs(__a, __b, __c, 4, __cc);
  7970. }
  7971. static inline __ATTRS_o_ai vector bool int
  7972. vec_cmprg_cc(vector unsigned int __a, vector unsigned int __b,
  7973. vector unsigned int __c, int *__cc) {
  7974. return (vector bool int)__builtin_s390_vstrcfs(__a, __b, __c, 4, __cc);
  7975. }
  7976. /*-- vec_cmprg_idx ----------------------------------------------------------*/
  7977. static inline __ATTRS_o_ai vector unsigned char
  7978. vec_cmprg_idx(vector unsigned char __a, vector unsigned char __b,
  7979. vector unsigned char __c) {
  7980. return __builtin_s390_vstrcb(__a, __b, __c, 0);
  7981. }
  7982. static inline __ATTRS_o_ai vector unsigned short
  7983. vec_cmprg_idx(vector unsigned short __a, vector unsigned short __b,
  7984. vector unsigned short __c) {
  7985. return __builtin_s390_vstrch(__a, __b, __c, 0);
  7986. }
  7987. static inline __ATTRS_o_ai vector unsigned int
  7988. vec_cmprg_idx(vector unsigned int __a, vector unsigned int __b,
  7989. vector unsigned int __c) {
  7990. return __builtin_s390_vstrcf(__a, __b, __c, 0);
  7991. }
  7992. /*-- vec_cmprg_idx_cc -------------------------------------------------------*/
  7993. static inline __ATTRS_o_ai vector unsigned char
  7994. vec_cmprg_idx_cc(vector unsigned char __a, vector unsigned char __b,
  7995. vector unsigned char __c, int *__cc) {
  7996. return __builtin_s390_vstrcbs(__a, __b, __c, 0, __cc);
  7997. }
  7998. static inline __ATTRS_o_ai vector unsigned short
  7999. vec_cmprg_idx_cc(vector unsigned short __a, vector unsigned short __b,
  8000. vector unsigned short __c, int *__cc) {
  8001. return __builtin_s390_vstrchs(__a, __b, __c, 0, __cc);
  8002. }
  8003. static inline __ATTRS_o_ai vector unsigned int
  8004. vec_cmprg_idx_cc(vector unsigned int __a, vector unsigned int __b,
  8005. vector unsigned int __c, int *__cc) {
  8006. return __builtin_s390_vstrcfs(__a, __b, __c, 0, __cc);
  8007. }
  8008. /*-- vec_cmprg_or_0_idx -----------------------------------------------------*/
  8009. static inline __ATTRS_o_ai vector unsigned char
  8010. vec_cmprg_or_0_idx(vector unsigned char __a, vector unsigned char __b,
  8011. vector unsigned char __c) {
  8012. return __builtin_s390_vstrczb(__a, __b, __c, 0);
  8013. }
  8014. static inline __ATTRS_o_ai vector unsigned short
  8015. vec_cmprg_or_0_idx(vector unsigned short __a, vector unsigned short __b,
  8016. vector unsigned short __c) {
  8017. return __builtin_s390_vstrczh(__a, __b, __c, 0);
  8018. }
  8019. static inline __ATTRS_o_ai vector unsigned int
  8020. vec_cmprg_or_0_idx(vector unsigned int __a, vector unsigned int __b,
  8021. vector unsigned int __c) {
  8022. return __builtin_s390_vstrczf(__a, __b, __c, 0);
  8023. }
  8024. /*-- vec_cmprg_or_0_idx_cc --------------------------------------------------*/
  8025. static inline __ATTRS_o_ai vector unsigned char
  8026. vec_cmprg_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
  8027. vector unsigned char __c, int *__cc) {
  8028. return __builtin_s390_vstrczbs(__a, __b, __c, 0, __cc);
  8029. }
  8030. static inline __ATTRS_o_ai vector unsigned short
  8031. vec_cmprg_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b,
  8032. vector unsigned short __c, int *__cc) {
  8033. return __builtin_s390_vstrczhs(__a, __b, __c, 0, __cc);
  8034. }
  8035. static inline __ATTRS_o_ai vector unsigned int
  8036. vec_cmprg_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
  8037. vector unsigned int __c, int *__cc) {
  8038. return __builtin_s390_vstrczfs(__a, __b, __c, 0, __cc);
  8039. }
  8040. /*-- vec_cmpnrg -------------------------------------------------------------*/
  8041. static inline __ATTRS_o_ai vector bool char
  8042. vec_cmpnrg(vector unsigned char __a, vector unsigned char __b,
  8043. vector unsigned char __c) {
  8044. return (vector bool char)__builtin_s390_vstrcb(__a, __b, __c, 12);
  8045. }
  8046. static inline __ATTRS_o_ai vector bool short
  8047. vec_cmpnrg(vector unsigned short __a, vector unsigned short __b,
  8048. vector unsigned short __c) {
  8049. return (vector bool short)__builtin_s390_vstrch(__a, __b, __c, 12);
  8050. }
  8051. static inline __ATTRS_o_ai vector bool int
  8052. vec_cmpnrg(vector unsigned int __a, vector unsigned int __b,
  8053. vector unsigned int __c) {
  8054. return (vector bool int)__builtin_s390_vstrcf(__a, __b, __c, 12);
  8055. }
  8056. /*-- vec_cmpnrg_cc ----------------------------------------------------------*/
  8057. static inline __ATTRS_o_ai vector bool char
  8058. vec_cmpnrg_cc(vector unsigned char __a, vector unsigned char __b,
  8059. vector unsigned char __c, int *__cc) {
  8060. return (vector bool char)__builtin_s390_vstrcbs(__a, __b, __c, 12, __cc);
  8061. }
  8062. static inline __ATTRS_o_ai vector bool short
  8063. vec_cmpnrg_cc(vector unsigned short __a, vector unsigned short __b,
  8064. vector unsigned short __c, int *__cc) {
  8065. return (vector bool short)__builtin_s390_vstrchs(__a, __b, __c, 12, __cc);
  8066. }
  8067. static inline __ATTRS_o_ai vector bool int
  8068. vec_cmpnrg_cc(vector unsigned int __a, vector unsigned int __b,
  8069. vector unsigned int __c, int *__cc) {
  8070. return (vector bool int)__builtin_s390_vstrcfs(__a, __b, __c, 12, __cc);
  8071. }
  8072. /*-- vec_cmpnrg_idx ---------------------------------------------------------*/
  8073. static inline __ATTRS_o_ai vector unsigned char
  8074. vec_cmpnrg_idx(vector unsigned char __a, vector unsigned char __b,
  8075. vector unsigned char __c) {
  8076. return __builtin_s390_vstrcb(__a, __b, __c, 8);
  8077. }
  8078. static inline __ATTRS_o_ai vector unsigned short
  8079. vec_cmpnrg_idx(vector unsigned short __a, vector unsigned short __b,
  8080. vector unsigned short __c) {
  8081. return __builtin_s390_vstrch(__a, __b, __c, 8);
  8082. }
  8083. static inline __ATTRS_o_ai vector unsigned int
  8084. vec_cmpnrg_idx(vector unsigned int __a, vector unsigned int __b,
  8085. vector unsigned int __c) {
  8086. return __builtin_s390_vstrcf(__a, __b, __c, 8);
  8087. }
  8088. /*-- vec_cmpnrg_idx_cc ------------------------------------------------------*/
  8089. static inline __ATTRS_o_ai vector unsigned char
  8090. vec_cmpnrg_idx_cc(vector unsigned char __a, vector unsigned char __b,
  8091. vector unsigned char __c, int *__cc) {
  8092. return __builtin_s390_vstrcbs(__a, __b, __c, 8, __cc);
  8093. }
  8094. static inline __ATTRS_o_ai vector unsigned short
  8095. vec_cmpnrg_idx_cc(vector unsigned short __a, vector unsigned short __b,
  8096. vector unsigned short __c, int *__cc) {
  8097. return __builtin_s390_vstrchs(__a, __b, __c, 8, __cc);
  8098. }
  8099. static inline __ATTRS_o_ai vector unsigned int
  8100. vec_cmpnrg_idx_cc(vector unsigned int __a, vector unsigned int __b,
  8101. vector unsigned int __c, int *__cc) {
  8102. return __builtin_s390_vstrcfs(__a, __b, __c, 8, __cc);
  8103. }
  8104. /*-- vec_cmpnrg_or_0_idx ----------------------------------------------------*/
  8105. static inline __ATTRS_o_ai vector unsigned char
  8106. vec_cmpnrg_or_0_idx(vector unsigned char __a, vector unsigned char __b,
  8107. vector unsigned char __c) {
  8108. return __builtin_s390_vstrczb(__a, __b, __c, 8);
  8109. }
  8110. static inline __ATTRS_o_ai vector unsigned short
  8111. vec_cmpnrg_or_0_idx(vector unsigned short __a, vector unsigned short __b,
  8112. vector unsigned short __c) {
  8113. return __builtin_s390_vstrczh(__a, __b, __c, 8);
  8114. }
  8115. static inline __ATTRS_o_ai vector unsigned int
  8116. vec_cmpnrg_or_0_idx(vector unsigned int __a, vector unsigned int __b,
  8117. vector unsigned int __c) {
  8118. return __builtin_s390_vstrczf(__a, __b, __c, 8);
  8119. }
  8120. /*-- vec_cmpnrg_or_0_idx_cc -------------------------------------------------*/
  8121. static inline __ATTRS_o_ai vector unsigned char
  8122. vec_cmpnrg_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
  8123. vector unsigned char __c, int *__cc) {
  8124. return __builtin_s390_vstrczbs(__a, __b, __c, 8, __cc);
  8125. }
  8126. static inline __ATTRS_o_ai vector unsigned short
  8127. vec_cmpnrg_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b,
  8128. vector unsigned short __c, int *__cc) {
  8129. return __builtin_s390_vstrczhs(__a, __b, __c, 8, __cc);
  8130. }
  8131. static inline __ATTRS_o_ai vector unsigned int
  8132. vec_cmpnrg_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
  8133. vector unsigned int __c, int *__cc) {
  8134. return __builtin_s390_vstrczfs(__a, __b, __c, 8, __cc);
  8135. }
  8136. /*-- vec_find_any_eq --------------------------------------------------------*/
  8137. static inline __ATTRS_o_ai vector bool char
  8138. vec_find_any_eq(vector signed char __a, vector signed char __b) {
  8139. return (vector bool char)
  8140. __builtin_s390_vfaeb((vector unsigned char)__a,
  8141. (vector unsigned char)__b, 4);
  8142. }
  8143. static inline __ATTRS_o_ai vector bool char
  8144. vec_find_any_eq(vector bool char __a, vector bool char __b) {
  8145. return (vector bool char)
  8146. __builtin_s390_vfaeb((vector unsigned char)__a,
  8147. (vector unsigned char)__b, 4);
  8148. }
  8149. static inline __ATTRS_o_ai vector bool char
  8150. vec_find_any_eq(vector unsigned char __a, vector unsigned char __b) {
  8151. return (vector bool char)__builtin_s390_vfaeb(__a, __b, 4);
  8152. }
  8153. static inline __ATTRS_o_ai vector bool short
  8154. vec_find_any_eq(vector signed short __a, vector signed short __b) {
  8155. return (vector bool short)
  8156. __builtin_s390_vfaeh((vector unsigned short)__a,
  8157. (vector unsigned short)__b, 4);
  8158. }
  8159. static inline __ATTRS_o_ai vector bool short
  8160. vec_find_any_eq(vector bool short __a, vector bool short __b) {
  8161. return (vector bool short)
  8162. __builtin_s390_vfaeh((vector unsigned short)__a,
  8163. (vector unsigned short)__b, 4);
  8164. }
  8165. static inline __ATTRS_o_ai vector bool short
  8166. vec_find_any_eq(vector unsigned short __a, vector unsigned short __b) {
  8167. return (vector bool short)__builtin_s390_vfaeh(__a, __b, 4);
  8168. }
  8169. static inline __ATTRS_o_ai vector bool int
  8170. vec_find_any_eq(vector signed int __a, vector signed int __b) {
  8171. return (vector bool int)
  8172. __builtin_s390_vfaef((vector unsigned int)__a,
  8173. (vector unsigned int)__b, 4);
  8174. }
  8175. static inline __ATTRS_o_ai vector bool int
  8176. vec_find_any_eq(vector bool int __a, vector bool int __b) {
  8177. return (vector bool int)
  8178. __builtin_s390_vfaef((vector unsigned int)__a,
  8179. (vector unsigned int)__b, 4);
  8180. }
  8181. static inline __ATTRS_o_ai vector bool int
  8182. vec_find_any_eq(vector unsigned int __a, vector unsigned int __b) {
  8183. return (vector bool int)__builtin_s390_vfaef(__a, __b, 4);
  8184. }
  8185. /*-- vec_find_any_eq_cc -----------------------------------------------------*/
  8186. static inline __ATTRS_o_ai vector bool char
  8187. vec_find_any_eq_cc(vector signed char __a, vector signed char __b, int *__cc) {
  8188. return (vector bool char)
  8189. __builtin_s390_vfaebs((vector unsigned char)__a,
  8190. (vector unsigned char)__b, 4, __cc);
  8191. }
  8192. static inline __ATTRS_o_ai vector bool char
  8193. vec_find_any_eq_cc(vector bool char __a, vector bool char __b, int *__cc) {
  8194. return (vector bool char)
  8195. __builtin_s390_vfaebs((vector unsigned char)__a,
  8196. (vector unsigned char)__b, 4, __cc);
  8197. }
  8198. static inline __ATTRS_o_ai vector bool char
  8199. vec_find_any_eq_cc(vector unsigned char __a, vector unsigned char __b,
  8200. int *__cc) {
  8201. return (vector bool char)__builtin_s390_vfaebs(__a, __b, 4, __cc);
  8202. }
  8203. static inline __ATTRS_o_ai vector bool short
  8204. vec_find_any_eq_cc(vector signed short __a, vector signed short __b,
  8205. int *__cc) {
  8206. return (vector bool short)
  8207. __builtin_s390_vfaehs((vector unsigned short)__a,
  8208. (vector unsigned short)__b, 4, __cc);
  8209. }
  8210. static inline __ATTRS_o_ai vector bool short
  8211. vec_find_any_eq_cc(vector bool short __a, vector bool short __b, int *__cc) {
  8212. return (vector bool short)
  8213. __builtin_s390_vfaehs((vector unsigned short)__a,
  8214. (vector unsigned short)__b, 4, __cc);
  8215. }
  8216. static inline __ATTRS_o_ai vector bool short
  8217. vec_find_any_eq_cc(vector unsigned short __a, vector unsigned short __b,
  8218. int *__cc) {
  8219. return (vector bool short)__builtin_s390_vfaehs(__a, __b, 4, __cc);
  8220. }
  8221. static inline __ATTRS_o_ai vector bool int
  8222. vec_find_any_eq_cc(vector signed int __a, vector signed int __b, int *__cc) {
  8223. return (vector bool int)
  8224. __builtin_s390_vfaefs((vector unsigned int)__a,
  8225. (vector unsigned int)__b, 4, __cc);
  8226. }
  8227. static inline __ATTRS_o_ai vector bool int
  8228. vec_find_any_eq_cc(vector bool int __a, vector bool int __b, int *__cc) {
  8229. return (vector bool int)
  8230. __builtin_s390_vfaefs((vector unsigned int)__a,
  8231. (vector unsigned int)__b, 4, __cc);
  8232. }
  8233. static inline __ATTRS_o_ai vector bool int
  8234. vec_find_any_eq_cc(vector unsigned int __a, vector unsigned int __b,
  8235. int *__cc) {
  8236. return (vector bool int)__builtin_s390_vfaefs(__a, __b, 4, __cc);
  8237. }
  8238. /*-- vec_find_any_eq_idx ----------------------------------------------------*/
  8239. static inline __ATTRS_o_ai vector signed char
  8240. vec_find_any_eq_idx(vector signed char __a, vector signed char __b) {
  8241. return (vector signed char)
  8242. __builtin_s390_vfaeb((vector unsigned char)__a,
  8243. (vector unsigned char)__b, 0);
  8244. }
  8245. static inline __ATTRS_o_ai vector unsigned char
  8246. vec_find_any_eq_idx(vector bool char __a, vector bool char __b) {
  8247. return __builtin_s390_vfaeb((vector unsigned char)__a,
  8248. (vector unsigned char)__b, 0);
  8249. }
  8250. static inline __ATTRS_o_ai vector unsigned char
  8251. vec_find_any_eq_idx(vector unsigned char __a, vector unsigned char __b) {
  8252. return __builtin_s390_vfaeb(__a, __b, 0);
  8253. }
  8254. static inline __ATTRS_o_ai vector signed short
  8255. vec_find_any_eq_idx(vector signed short __a, vector signed short __b) {
  8256. return (vector signed short)
  8257. __builtin_s390_vfaeh((vector unsigned short)__a,
  8258. (vector unsigned short)__b, 0);
  8259. }
  8260. static inline __ATTRS_o_ai vector unsigned short
  8261. vec_find_any_eq_idx(vector bool short __a, vector bool short __b) {
  8262. return __builtin_s390_vfaeh((vector unsigned short)__a,
  8263. (vector unsigned short)__b, 0);
  8264. }
  8265. static inline __ATTRS_o_ai vector unsigned short
  8266. vec_find_any_eq_idx(vector unsigned short __a, vector unsigned short __b) {
  8267. return __builtin_s390_vfaeh(__a, __b, 0);
  8268. }
  8269. static inline __ATTRS_o_ai vector signed int
  8270. vec_find_any_eq_idx(vector signed int __a, vector signed int __b) {
  8271. return (vector signed int)
  8272. __builtin_s390_vfaef((vector unsigned int)__a,
  8273. (vector unsigned int)__b, 0);
  8274. }
  8275. static inline __ATTRS_o_ai vector unsigned int
  8276. vec_find_any_eq_idx(vector bool int __a, vector bool int __b) {
  8277. return __builtin_s390_vfaef((vector unsigned int)__a,
  8278. (vector unsigned int)__b, 0);
  8279. }
  8280. static inline __ATTRS_o_ai vector unsigned int
  8281. vec_find_any_eq_idx(vector unsigned int __a, vector unsigned int __b) {
  8282. return __builtin_s390_vfaef(__a, __b, 0);
  8283. }
  8284. /*-- vec_find_any_eq_idx_cc -------------------------------------------------*/
  8285. static inline __ATTRS_o_ai vector signed char
  8286. vec_find_any_eq_idx_cc(vector signed char __a, vector signed char __b,
  8287. int *__cc) {
  8288. return (vector signed char)
  8289. __builtin_s390_vfaebs((vector unsigned char)__a,
  8290. (vector unsigned char)__b, 0, __cc);
  8291. }
  8292. static inline __ATTRS_o_ai vector unsigned char
  8293. vec_find_any_eq_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
  8294. return __builtin_s390_vfaebs((vector unsigned char)__a,
  8295. (vector unsigned char)__b, 0, __cc);
  8296. }
  8297. static inline __ATTRS_o_ai vector unsigned char
  8298. vec_find_any_eq_idx_cc(vector unsigned char __a, vector unsigned char __b,
  8299. int *__cc) {
  8300. return __builtin_s390_vfaebs(__a, __b, 0, __cc);
  8301. }
  8302. static inline __ATTRS_o_ai vector signed short
  8303. vec_find_any_eq_idx_cc(vector signed short __a, vector signed short __b,
  8304. int *__cc) {
  8305. return (vector signed short)
  8306. __builtin_s390_vfaehs((vector unsigned short)__a,
  8307. (vector unsigned short)__b, 0, __cc);
  8308. }
  8309. static inline __ATTRS_o_ai vector unsigned short
  8310. vec_find_any_eq_idx_cc(vector bool short __a, vector bool short __b,
  8311. int *__cc) {
  8312. return __builtin_s390_vfaehs((vector unsigned short)__a,
  8313. (vector unsigned short)__b, 0, __cc);
  8314. }
  8315. static inline __ATTRS_o_ai vector unsigned short
  8316. vec_find_any_eq_idx_cc(vector unsigned short __a, vector unsigned short __b,
  8317. int *__cc) {
  8318. return __builtin_s390_vfaehs(__a, __b, 0, __cc);
  8319. }
  8320. static inline __ATTRS_o_ai vector signed int
  8321. vec_find_any_eq_idx_cc(vector signed int __a, vector signed int __b,
  8322. int *__cc) {
  8323. return (vector signed int)
  8324. __builtin_s390_vfaefs((vector unsigned int)__a,
  8325. (vector unsigned int)__b, 0, __cc);
  8326. }
  8327. static inline __ATTRS_o_ai vector unsigned int
  8328. vec_find_any_eq_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
  8329. return __builtin_s390_vfaefs((vector unsigned int)__a,
  8330. (vector unsigned int)__b, 0, __cc);
  8331. }
  8332. static inline __ATTRS_o_ai vector unsigned int
  8333. vec_find_any_eq_idx_cc(vector unsigned int __a, vector unsigned int __b,
  8334. int *__cc) {
  8335. return __builtin_s390_vfaefs(__a, __b, 0, __cc);
  8336. }
  8337. /*-- vec_find_any_eq_or_0_idx -----------------------------------------------*/
  8338. static inline __ATTRS_o_ai vector signed char
  8339. vec_find_any_eq_or_0_idx(vector signed char __a, vector signed char __b) {
  8340. return (vector signed char)
  8341. __builtin_s390_vfaezb((vector unsigned char)__a,
  8342. (vector unsigned char)__b, 0);
  8343. }
  8344. static inline __ATTRS_o_ai vector unsigned char
  8345. vec_find_any_eq_or_0_idx(vector bool char __a, vector bool char __b) {
  8346. return __builtin_s390_vfaezb((vector unsigned char)__a,
  8347. (vector unsigned char)__b, 0);
  8348. }
  8349. static inline __ATTRS_o_ai vector unsigned char
  8350. vec_find_any_eq_or_0_idx(vector unsigned char __a, vector unsigned char __b) {
  8351. return __builtin_s390_vfaezb(__a, __b, 0);
  8352. }
  8353. static inline __ATTRS_o_ai vector signed short
  8354. vec_find_any_eq_or_0_idx(vector signed short __a, vector signed short __b) {
  8355. return (vector signed short)
  8356. __builtin_s390_vfaezh((vector unsigned short)__a,
  8357. (vector unsigned short)__b, 0);
  8358. }
  8359. static inline __ATTRS_o_ai vector unsigned short
  8360. vec_find_any_eq_or_0_idx(vector bool short __a, vector bool short __b) {
  8361. return __builtin_s390_vfaezh((vector unsigned short)__a,
  8362. (vector unsigned short)__b, 0);
  8363. }
  8364. static inline __ATTRS_o_ai vector unsigned short
  8365. vec_find_any_eq_or_0_idx(vector unsigned short __a, vector unsigned short __b) {
  8366. return __builtin_s390_vfaezh(__a, __b, 0);
  8367. }
  8368. static inline __ATTRS_o_ai vector signed int
  8369. vec_find_any_eq_or_0_idx(vector signed int __a, vector signed int __b) {
  8370. return (vector signed int)
  8371. __builtin_s390_vfaezf((vector unsigned int)__a,
  8372. (vector unsigned int)__b, 0);
  8373. }
  8374. static inline __ATTRS_o_ai vector unsigned int
  8375. vec_find_any_eq_or_0_idx(vector bool int __a, vector bool int __b) {
  8376. return __builtin_s390_vfaezf((vector unsigned int)__a,
  8377. (vector unsigned int)__b, 0);
  8378. }
  8379. static inline __ATTRS_o_ai vector unsigned int
  8380. vec_find_any_eq_or_0_idx(vector unsigned int __a, vector unsigned int __b) {
  8381. return __builtin_s390_vfaezf(__a, __b, 0);
  8382. }
  8383. /*-- vec_find_any_eq_or_0_idx_cc --------------------------------------------*/
  8384. static inline __ATTRS_o_ai vector signed char
  8385. vec_find_any_eq_or_0_idx_cc(vector signed char __a, vector signed char __b,
  8386. int *__cc) {
  8387. return (vector signed char)
  8388. __builtin_s390_vfaezbs((vector unsigned char)__a,
  8389. (vector unsigned char)__b, 0, __cc);
  8390. }
  8391. static inline __ATTRS_o_ai vector unsigned char
  8392. vec_find_any_eq_or_0_idx_cc(vector bool char __a, vector bool char __b,
  8393. int *__cc) {
  8394. return __builtin_s390_vfaezbs((vector unsigned char)__a,
  8395. (vector unsigned char)__b, 0, __cc);
  8396. }
  8397. static inline __ATTRS_o_ai vector unsigned char
  8398. vec_find_any_eq_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
  8399. int *__cc) {
  8400. return __builtin_s390_vfaezbs(__a, __b, 0, __cc);
  8401. }
  8402. static inline __ATTRS_o_ai vector signed short
  8403. vec_find_any_eq_or_0_idx_cc(vector signed short __a, vector signed short __b,
  8404. int *__cc) {
  8405. return (vector signed short)
  8406. __builtin_s390_vfaezhs((vector unsigned short)__a,
  8407. (vector unsigned short)__b, 0, __cc);
  8408. }
  8409. static inline __ATTRS_o_ai vector unsigned short
  8410. vec_find_any_eq_or_0_idx_cc(vector bool short __a, vector bool short __b,
  8411. int *__cc) {
  8412. return __builtin_s390_vfaezhs((vector unsigned short)__a,
  8413. (vector unsigned short)__b, 0, __cc);
  8414. }
  8415. static inline __ATTRS_o_ai vector unsigned short
  8416. vec_find_any_eq_or_0_idx_cc(vector unsigned short __a,
  8417. vector unsigned short __b, int *__cc) {
  8418. return __builtin_s390_vfaezhs(__a, __b, 0, __cc);
  8419. }
  8420. static inline __ATTRS_o_ai vector signed int
  8421. vec_find_any_eq_or_0_idx_cc(vector signed int __a, vector signed int __b,
  8422. int *__cc) {
  8423. return (vector signed int)
  8424. __builtin_s390_vfaezfs((vector unsigned int)__a,
  8425. (vector unsigned int)__b, 0, __cc);
  8426. }
  8427. static inline __ATTRS_o_ai vector unsigned int
  8428. vec_find_any_eq_or_0_idx_cc(vector bool int __a, vector bool int __b,
  8429. int *__cc) {
  8430. return __builtin_s390_vfaezfs((vector unsigned int)__a,
  8431. (vector unsigned int)__b, 0, __cc);
  8432. }
  8433. static inline __ATTRS_o_ai vector unsigned int
  8434. vec_find_any_eq_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
  8435. int *__cc) {
  8436. return __builtin_s390_vfaezfs(__a, __b, 0, __cc);
  8437. }
  8438. /*-- vec_find_any_ne --------------------------------------------------------*/
  8439. static inline __ATTRS_o_ai vector bool char
  8440. vec_find_any_ne(vector signed char __a, vector signed char __b) {
  8441. return (vector bool char)
  8442. __builtin_s390_vfaeb((vector unsigned char)__a,
  8443. (vector unsigned char)__b, 12);
  8444. }
  8445. static inline __ATTRS_o_ai vector bool char
  8446. vec_find_any_ne(vector bool char __a, vector bool char __b) {
  8447. return (vector bool char)
  8448. __builtin_s390_vfaeb((vector unsigned char)__a,
  8449. (vector unsigned char)__b, 12);
  8450. }
  8451. static inline __ATTRS_o_ai vector bool char
  8452. vec_find_any_ne(vector unsigned char __a, vector unsigned char __b) {
  8453. return (vector bool char)__builtin_s390_vfaeb(__a, __b, 12);
  8454. }
  8455. static inline __ATTRS_o_ai vector bool short
  8456. vec_find_any_ne(vector signed short __a, vector signed short __b) {
  8457. return (vector bool short)
  8458. __builtin_s390_vfaeh((vector unsigned short)__a,
  8459. (vector unsigned short)__b, 12);
  8460. }
  8461. static inline __ATTRS_o_ai vector bool short
  8462. vec_find_any_ne(vector bool short __a, vector bool short __b) {
  8463. return (vector bool short)
  8464. __builtin_s390_vfaeh((vector unsigned short)__a,
  8465. (vector unsigned short)__b, 12);
  8466. }
  8467. static inline __ATTRS_o_ai vector bool short
  8468. vec_find_any_ne(vector unsigned short __a, vector unsigned short __b) {
  8469. return (vector bool short)__builtin_s390_vfaeh(__a, __b, 12);
  8470. }
  8471. static inline __ATTRS_o_ai vector bool int
  8472. vec_find_any_ne(vector signed int __a, vector signed int __b) {
  8473. return (vector bool int)
  8474. __builtin_s390_vfaef((vector unsigned int)__a,
  8475. (vector unsigned int)__b, 12);
  8476. }
  8477. static inline __ATTRS_o_ai vector bool int
  8478. vec_find_any_ne(vector bool int __a, vector bool int __b) {
  8479. return (vector bool int)
  8480. __builtin_s390_vfaef((vector unsigned int)__a,
  8481. (vector unsigned int)__b, 12);
  8482. }
  8483. static inline __ATTRS_o_ai vector bool int
  8484. vec_find_any_ne(vector unsigned int __a, vector unsigned int __b) {
  8485. return (vector bool int)__builtin_s390_vfaef(__a, __b, 12);
  8486. }
  8487. /*-- vec_find_any_ne_cc -----------------------------------------------------*/
  8488. static inline __ATTRS_o_ai vector bool char
  8489. vec_find_any_ne_cc(vector signed char __a, vector signed char __b, int *__cc) {
  8490. return (vector bool char)
  8491. __builtin_s390_vfaebs((vector unsigned char)__a,
  8492. (vector unsigned char)__b, 12, __cc);
  8493. }
  8494. static inline __ATTRS_o_ai vector bool char
  8495. vec_find_any_ne_cc(vector bool char __a, vector bool char __b, int *__cc) {
  8496. return (vector bool char)
  8497. __builtin_s390_vfaebs((vector unsigned char)__a,
  8498. (vector unsigned char)__b, 12, __cc);
  8499. }
  8500. static inline __ATTRS_o_ai vector bool char
  8501. vec_find_any_ne_cc(vector unsigned char __a, vector unsigned char __b,
  8502. int *__cc) {
  8503. return (vector bool char)__builtin_s390_vfaebs(__a, __b, 12, __cc);
  8504. }
  8505. static inline __ATTRS_o_ai vector bool short
  8506. vec_find_any_ne_cc(vector signed short __a, vector signed short __b,
  8507. int *__cc) {
  8508. return (vector bool short)
  8509. __builtin_s390_vfaehs((vector unsigned short)__a,
  8510. (vector unsigned short)__b, 12, __cc);
  8511. }
  8512. static inline __ATTRS_o_ai vector bool short
  8513. vec_find_any_ne_cc(vector bool short __a, vector bool short __b, int *__cc) {
  8514. return (vector bool short)
  8515. __builtin_s390_vfaehs((vector unsigned short)__a,
  8516. (vector unsigned short)__b, 12, __cc);
  8517. }
  8518. static inline __ATTRS_o_ai vector bool short
  8519. vec_find_any_ne_cc(vector unsigned short __a, vector unsigned short __b,
  8520. int *__cc) {
  8521. return (vector bool short)__builtin_s390_vfaehs(__a, __b, 12, __cc);
  8522. }
  8523. static inline __ATTRS_o_ai vector bool int
  8524. vec_find_any_ne_cc(vector signed int __a, vector signed int __b, int *__cc) {
  8525. return (vector bool int)
  8526. __builtin_s390_vfaefs((vector unsigned int)__a,
  8527. (vector unsigned int)__b, 12, __cc);
  8528. }
  8529. static inline __ATTRS_o_ai vector bool int
  8530. vec_find_any_ne_cc(vector bool int __a, vector bool int __b, int *__cc) {
  8531. return (vector bool int)
  8532. __builtin_s390_vfaefs((vector unsigned int)__a,
  8533. (vector unsigned int)__b, 12, __cc);
  8534. }
  8535. static inline __ATTRS_o_ai vector bool int
  8536. vec_find_any_ne_cc(vector unsigned int __a, vector unsigned int __b,
  8537. int *__cc) {
  8538. return (vector bool int)__builtin_s390_vfaefs(__a, __b, 12, __cc);
  8539. }
  8540. /*-- vec_find_any_ne_idx ----------------------------------------------------*/
  8541. static inline __ATTRS_o_ai vector signed char
  8542. vec_find_any_ne_idx(vector signed char __a, vector signed char __b) {
  8543. return (vector signed char)
  8544. __builtin_s390_vfaeb((vector unsigned char)__a,
  8545. (vector unsigned char)__b, 8);
  8546. }
  8547. static inline __ATTRS_o_ai vector unsigned char
  8548. vec_find_any_ne_idx(vector bool char __a, vector bool char __b) {
  8549. return __builtin_s390_vfaeb((vector unsigned char)__a,
  8550. (vector unsigned char)__b, 8);
  8551. }
  8552. static inline __ATTRS_o_ai vector unsigned char
  8553. vec_find_any_ne_idx(vector unsigned char __a, vector unsigned char __b) {
  8554. return __builtin_s390_vfaeb(__a, __b, 8);
  8555. }
  8556. static inline __ATTRS_o_ai vector signed short
  8557. vec_find_any_ne_idx(vector signed short __a, vector signed short __b) {
  8558. return (vector signed short)
  8559. __builtin_s390_vfaeh((vector unsigned short)__a,
  8560. (vector unsigned short)__b, 8);
  8561. }
  8562. static inline __ATTRS_o_ai vector unsigned short
  8563. vec_find_any_ne_idx(vector bool short __a, vector bool short __b) {
  8564. return __builtin_s390_vfaeh((vector unsigned short)__a,
  8565. (vector unsigned short)__b, 8);
  8566. }
  8567. static inline __ATTRS_o_ai vector unsigned short
  8568. vec_find_any_ne_idx(vector unsigned short __a, vector unsigned short __b) {
  8569. return __builtin_s390_vfaeh(__a, __b, 8);
  8570. }
  8571. static inline __ATTRS_o_ai vector signed int
  8572. vec_find_any_ne_idx(vector signed int __a, vector signed int __b) {
  8573. return (vector signed int)
  8574. __builtin_s390_vfaef((vector unsigned int)__a,
  8575. (vector unsigned int)__b, 8);
  8576. }
  8577. static inline __ATTRS_o_ai vector unsigned int
  8578. vec_find_any_ne_idx(vector bool int __a, vector bool int __b) {
  8579. return __builtin_s390_vfaef((vector unsigned int)__a,
  8580. (vector unsigned int)__b, 8);
  8581. }
  8582. static inline __ATTRS_o_ai vector unsigned int
  8583. vec_find_any_ne_idx(vector unsigned int __a, vector unsigned int __b) {
  8584. return __builtin_s390_vfaef(__a, __b, 8);
  8585. }
  8586. /*-- vec_find_any_ne_idx_cc -------------------------------------------------*/
  8587. static inline __ATTRS_o_ai vector signed char
  8588. vec_find_any_ne_idx_cc(vector signed char __a, vector signed char __b,
  8589. int *__cc) {
  8590. return (vector signed char)
  8591. __builtin_s390_vfaebs((vector unsigned char)__a,
  8592. (vector unsigned char)__b, 8, __cc);
  8593. }
  8594. static inline __ATTRS_o_ai vector unsigned char
  8595. vec_find_any_ne_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
  8596. return __builtin_s390_vfaebs((vector unsigned char)__a,
  8597. (vector unsigned char)__b, 8, __cc);
  8598. }
  8599. static inline __ATTRS_o_ai vector unsigned char
  8600. vec_find_any_ne_idx_cc(vector unsigned char __a, vector unsigned char __b,
  8601. int *__cc) {
  8602. return __builtin_s390_vfaebs(__a, __b, 8, __cc);
  8603. }
  8604. static inline __ATTRS_o_ai vector signed short
  8605. vec_find_any_ne_idx_cc(vector signed short __a, vector signed short __b,
  8606. int *__cc) {
  8607. return (vector signed short)
  8608. __builtin_s390_vfaehs((vector unsigned short)__a,
  8609. (vector unsigned short)__b, 8, __cc);
  8610. }
  8611. static inline __ATTRS_o_ai vector unsigned short
  8612. vec_find_any_ne_idx_cc(vector bool short __a, vector bool short __b,
  8613. int *__cc) {
  8614. return __builtin_s390_vfaehs((vector unsigned short)__a,
  8615. (vector unsigned short)__b, 8, __cc);
  8616. }
  8617. static inline __ATTRS_o_ai vector unsigned short
  8618. vec_find_any_ne_idx_cc(vector unsigned short __a, vector unsigned short __b,
  8619. int *__cc) {
  8620. return __builtin_s390_vfaehs(__a, __b, 8, __cc);
  8621. }
  8622. static inline __ATTRS_o_ai vector signed int
  8623. vec_find_any_ne_idx_cc(vector signed int __a, vector signed int __b,
  8624. int *__cc) {
  8625. return (vector signed int)
  8626. __builtin_s390_vfaefs((vector unsigned int)__a,
  8627. (vector unsigned int)__b, 8, __cc);
  8628. }
  8629. static inline __ATTRS_o_ai vector unsigned int
  8630. vec_find_any_ne_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
  8631. return __builtin_s390_vfaefs((vector unsigned int)__a,
  8632. (vector unsigned int)__b, 8, __cc);
  8633. }
  8634. static inline __ATTRS_o_ai vector unsigned int
  8635. vec_find_any_ne_idx_cc(vector unsigned int __a, vector unsigned int __b,
  8636. int *__cc) {
  8637. return __builtin_s390_vfaefs(__a, __b, 8, __cc);
  8638. }
  8639. /*-- vec_find_any_ne_or_0_idx -----------------------------------------------*/
  8640. static inline __ATTRS_o_ai vector signed char
  8641. vec_find_any_ne_or_0_idx(vector signed char __a, vector signed char __b) {
  8642. return (vector signed char)
  8643. __builtin_s390_vfaezb((vector unsigned char)__a,
  8644. (vector unsigned char)__b, 8);
  8645. }
  8646. static inline __ATTRS_o_ai vector unsigned char
  8647. vec_find_any_ne_or_0_idx(vector bool char __a, vector bool char __b) {
  8648. return __builtin_s390_vfaezb((vector unsigned char)__a,
  8649. (vector unsigned char)__b, 8);
  8650. }
  8651. static inline __ATTRS_o_ai vector unsigned char
  8652. vec_find_any_ne_or_0_idx(vector unsigned char __a, vector unsigned char __b) {
  8653. return __builtin_s390_vfaezb(__a, __b, 8);
  8654. }
  8655. static inline __ATTRS_o_ai vector signed short
  8656. vec_find_any_ne_or_0_idx(vector signed short __a, vector signed short __b) {
  8657. return (vector signed short)
  8658. __builtin_s390_vfaezh((vector unsigned short)__a,
  8659. (vector unsigned short)__b, 8);
  8660. }
  8661. static inline __ATTRS_o_ai vector unsigned short
  8662. vec_find_any_ne_or_0_idx(vector bool short __a, vector bool short __b) {
  8663. return __builtin_s390_vfaezh((vector unsigned short)__a,
  8664. (vector unsigned short)__b, 8);
  8665. }
  8666. static inline __ATTRS_o_ai vector unsigned short
  8667. vec_find_any_ne_or_0_idx(vector unsigned short __a, vector unsigned short __b) {
  8668. return __builtin_s390_vfaezh(__a, __b, 8);
  8669. }
  8670. static inline __ATTRS_o_ai vector signed int
  8671. vec_find_any_ne_or_0_idx(vector signed int __a, vector signed int __b) {
  8672. return (vector signed int)
  8673. __builtin_s390_vfaezf((vector unsigned int)__a,
  8674. (vector unsigned int)__b, 8);
  8675. }
  8676. static inline __ATTRS_o_ai vector unsigned int
  8677. vec_find_any_ne_or_0_idx(vector bool int __a, vector bool int __b) {
  8678. return __builtin_s390_vfaezf((vector unsigned int)__a,
  8679. (vector unsigned int)__b, 8);
  8680. }
  8681. static inline __ATTRS_o_ai vector unsigned int
  8682. vec_find_any_ne_or_0_idx(vector unsigned int __a, vector unsigned int __b) {
  8683. return __builtin_s390_vfaezf(__a, __b, 8);
  8684. }
  8685. /*-- vec_find_any_ne_or_0_idx_cc --------------------------------------------*/
  8686. static inline __ATTRS_o_ai vector signed char
  8687. vec_find_any_ne_or_0_idx_cc(vector signed char __a, vector signed char __b,
  8688. int *__cc) {
  8689. return (vector signed char)
  8690. __builtin_s390_vfaezbs((vector unsigned char)__a,
  8691. (vector unsigned char)__b, 8, __cc);
  8692. }
  8693. static inline __ATTRS_o_ai vector unsigned char
  8694. vec_find_any_ne_or_0_idx_cc(vector bool char __a, vector bool char __b,
  8695. int *__cc) {
  8696. return __builtin_s390_vfaezbs((vector unsigned char)__a,
  8697. (vector unsigned char)__b, 8, __cc);
  8698. }
  8699. static inline __ATTRS_o_ai vector unsigned char
  8700. vec_find_any_ne_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
  8701. int *__cc) {
  8702. return __builtin_s390_vfaezbs(__a, __b, 8, __cc);
  8703. }
  8704. static inline __ATTRS_o_ai vector signed short
  8705. vec_find_any_ne_or_0_idx_cc(vector signed short __a, vector signed short __b,
  8706. int *__cc) {
  8707. return (vector signed short)
  8708. __builtin_s390_vfaezhs((vector unsigned short)__a,
  8709. (vector unsigned short)__b, 8, __cc);
  8710. }
  8711. static inline __ATTRS_o_ai vector unsigned short
  8712. vec_find_any_ne_or_0_idx_cc(vector bool short __a, vector bool short __b,
  8713. int *__cc) {
  8714. return __builtin_s390_vfaezhs((vector unsigned short)__a,
  8715. (vector unsigned short)__b, 8, __cc);
  8716. }
  8717. static inline __ATTRS_o_ai vector unsigned short
  8718. vec_find_any_ne_or_0_idx_cc(vector unsigned short __a,
  8719. vector unsigned short __b, int *__cc) {
  8720. return __builtin_s390_vfaezhs(__a, __b, 8, __cc);
  8721. }
  8722. static inline __ATTRS_o_ai vector signed int
  8723. vec_find_any_ne_or_0_idx_cc(vector signed int __a, vector signed int __b,
  8724. int *__cc) {
  8725. return (vector signed int)
  8726. __builtin_s390_vfaezfs((vector unsigned int)__a,
  8727. (vector unsigned int)__b, 8, __cc);
  8728. }
  8729. static inline __ATTRS_o_ai vector unsigned int
  8730. vec_find_any_ne_or_0_idx_cc(vector bool int __a, vector bool int __b,
  8731. int *__cc) {
  8732. return __builtin_s390_vfaezfs((vector unsigned int)__a,
  8733. (vector unsigned int)__b, 8, __cc);
  8734. }
  8735. static inline __ATTRS_o_ai vector unsigned int
  8736. vec_find_any_ne_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
  8737. int *__cc) {
  8738. return __builtin_s390_vfaezfs(__a, __b, 8, __cc);
  8739. }
  8740. #undef __constant_pow2_range
  8741. #undef __constant_range
  8742. #undef __constant
  8743. #undef __ATTRS_o
  8744. #undef __ATTRS_o_ai
  8745. #undef __ATTRS_ai
  8746. #else
  8747. #error "Use -fzvector to enable vector extensions"
  8748. #endif