12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330 |
- hello_world.elf: file format elf32-littlenios2
- hello_world.elf
- architecture: nios2:r1, flags 0x00000112:
- EXEC_P, HAS_SYMS, D_PAGED
- start address 0x00040230
- Program Header:
- LOAD off 0x00001000 vaddr 0x00040000 paddr 0x00040000 align 2**12
- filesz 0x00000020 memsz 0x00000020 flags r-x
- LOAD off 0x00001020 vaddr 0x00040020 paddr 0x00040020 align 2**12
- filesz 0x00005770 memsz 0x00005770 flags r-x
- LOAD off 0x00006790 vaddr 0x00045790 paddr 0x000471fc align 2**12
- filesz 0x00001a6c memsz 0x00001a6c flags rw-
- LOAD off 0x00008c68 vaddr 0x00048c68 paddr 0x00048c68 align 2**12
- filesz 0x00000000 memsz 0x00000154 flags rw-
- Sections:
- Idx Name Size VMA LMA File off Algn
- 0 .entry 00000020 00040000 00040000 00001000 2**5
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 1 .exceptions 00000210 00040020 00040020 00001020 2**2
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 2 .text 00005518 00040230 00040230 00001230 2**2
- CONTENTS, ALLOC, LOAD, READONLY, CODE
- 3 .rodata 00000048 00045748 00045748 00006748 2**2
- CONTENTS, ALLOC, LOAD, READONLY, DATA
- 4 .rwdata 00001a6c 00045790 000471fc 00006790 2**2
- CONTENTS, ALLOC, LOAD, DATA, SMALL_DATA
- 5 .bss 00000154 00048c68 00048c68 00008c68 2**2
- ALLOC, SMALL_DATA
- 6 .onchip_memory2 00000000 00048dbc 00048dbc 000081fc 2**0
- CONTENTS
- 7 .comment 00000023 00000000 00000000 000081fc 2**0
- CONTENTS, READONLY
- 8 .debug_aranges 00000a10 00000000 00000000 00008220 2**3
- CONTENTS, READONLY, DEBUGGING
- 9 .debug_info 000162ac 00000000 00000000 00008c30 2**0
- CONTENTS, READONLY, DEBUGGING
- 10 .debug_abbrev 00005eed 00000000 00000000 0001eedc 2**0
- CONTENTS, READONLY, DEBUGGING
- 11 .debug_line 00006881 00000000 00000000 00024dc9 2**0
- CONTENTS, READONLY, DEBUGGING
- 12 .debug_frame 00001534 00000000 00000000 0002b64c 2**2
- CONTENTS, READONLY, DEBUGGING
- 13 .debug_str 00002748 00000000 00000000 0002cb80 2**0
- CONTENTS, READONLY, DEBUGGING
- 14 .debug_loc 00004ada 00000000 00000000 0002f2c8 2**0
- CONTENTS, READONLY, DEBUGGING
- 15 .debug_alt_sim_info 00000010 00000000 00000000 00033da4 2**2
- CONTENTS, READONLY, DEBUGGING
- 16 .debug_ranges 00000680 00000000 00000000 00033db8 2**3
- CONTENTS, READONLY, DEBUGGING
- 17 .thread_model 00000003 00000000 00000000 0003689a 2**0
- CONTENTS, READONLY
- 18 .cpu 00000005 00000000 00000000 0003689d 2**0
- CONTENTS, READONLY
- 19 .qsys 00000001 00000000 00000000 000368a2 2**0
- CONTENTS, READONLY
- 20 .simulation_enabled 00000001 00000000 00000000 000368a3 2**0
- CONTENTS, READONLY
- 21 .stderr_dev 00000009 00000000 00000000 000368a4 2**0
- CONTENTS, READONLY
- 22 .stdin_dev 00000009 00000000 00000000 000368ad 2**0
- CONTENTS, READONLY
- 23 .stdout_dev 00000009 00000000 00000000 000368b6 2**0
- CONTENTS, READONLY
- 24 .sopc_system_name 00000008 00000000 00000000 000368bf 2**0
- CONTENTS, READONLY
- 25 .quartus_project_dir 00000036 00000000 00000000 000368c7 2**0
- CONTENTS, READONLY
- 26 .jdi 00004769 00000000 00000000 000368fd 2**0
- CONTENTS, READONLY
- 27 .sopcinfo 00033a1b 00000000 00000000 0003b066 2**0
- CONTENTS, READONLY
- SYMBOL TABLE:
- 00040000 l d .entry 00000000 .entry
- 00040020 l d .exceptions 00000000 .exceptions
- 00040230 l d .text 00000000 .text
- 00045748 l d .rodata 00000000 .rodata
- 00045790 l d .rwdata 00000000 .rwdata
- 00048c68 l d .bss 00000000 .bss
- 00048dbc l d .onchip_memory2 00000000 .onchip_memory2
- 00000000 l d .comment 00000000 .comment
- 00000000 l d .debug_aranges 00000000 .debug_aranges
- 00000000 l d .debug_info 00000000 .debug_info
- 00000000 l d .debug_abbrev 00000000 .debug_abbrev
- 00000000 l d .debug_line 00000000 .debug_line
- 00000000 l d .debug_frame 00000000 .debug_frame
- 00000000 l d .debug_str 00000000 .debug_str
- 00000000 l d .debug_loc 00000000 .debug_loc
- 00000000 l d .debug_alt_sim_info 00000000 .debug_alt_sim_info
- 00000000 l d .debug_ranges 00000000 .debug_ranges
- 00000000 l df *ABS* 00000000 ../hello_world_bsp//obj/HAL/src/crt0.o
- 00040268 l .text 00000000 alt_after_alt_main
- 00000000 l df *ABS* 00000000 alt_irq_handler.c
- 00000000 l df *ABS* 00000000 alt_instruction_exception_entry.c
- 00000000 l df *ABS* 00000000 hello_world.c
- 00000000 l df *ABS* 00000000 puts.c
- 00000000 l df *ABS* 00000000 strlen.c
- 00000000 l df *ABS* 00000000 findfp.c
- 00040414 l F .text 00000008 __fp_unlock
- 00040428 l F .text 0000019c __sinit.part.1
- 000405c4 l F .text 00000008 __fp_lock
- 00000000 l df *ABS* 00000000 fvwrite.c
- 00000000 l df *ABS* 00000000 fwalk.c
- 00000000 l df *ABS* 00000000 impure.c
- 00045790 l O .rwdata 00000424 impure_data
- 00000000 l df *ABS* 00000000 mallocr.c
- 00000000 l df *ABS* 00000000 memchr.c
- 00000000 l df *ABS* 00000000 memcpy.c
- 00000000 l df *ABS* 00000000 memmove.c
- 00000000 l df *ABS* 00000000 memset.c
- 00000000 l df *ABS* 00000000 mallocr.c
- 00000000 l df *ABS* 00000000 sbrkr.c
- 00000000 l df *ABS* 00000000 stdio.c
- 00000000 l df *ABS* 00000000 writer.c
- 00000000 l df *ABS* 00000000 wsetup.c
- 00000000 l df *ABS* 00000000 closer.c
- 00000000 l df *ABS* 00000000 fclose.c
- 00000000 l df *ABS* 00000000 fflush.c
- 00000000 l df *ABS* 00000000 mallocr.c
- 00000000 l df *ABS* 00000000 int_errno.c
- 00000000 l df *ABS* 00000000 lseekr.c
- 00000000 l df *ABS* 00000000 makebuf.c
- 00000000 l df *ABS* 00000000 readr.c
- 00000000 l df *ABS* 00000000 fstatr.c
- 00000000 l df *ABS* 00000000 isattyr.c
- 00000000 l df *ABS* 00000000 lib2-divmod.c
- 00000000 l df *ABS* 00000000 lib2-mul.c
- 00000000 l df *ABS* 00000000 alt_close.c
- 000430b4 l F .text 0000003c alt_get_errno
- 00000000 l df *ABS* 00000000 alt_dev.c
- 000431c8 l F .text 0000002c alt_dev_null_write
- 00000000 l df *ABS* 00000000 alt_errno.c
- 00000000 l df *ABS* 00000000 alt_fstat.c
- 000431f4 l F .text 0000003c alt_get_errno
- 00000000 l df *ABS* 00000000 alt_isatty.c
- 000432e8 l F .text 0000003c alt_get_errno
- 00000000 l df *ABS* 00000000 alt_load.c
- 000433d0 l F .text 00000068 alt_load_section
- 00000000 l df *ABS* 00000000 alt_lseek.c
- 000434bc l F .text 0000003c alt_get_errno
- 00000000 l df *ABS* 00000000 alt_main.c
- 00000000 l df *ABS* 00000000 alt_malloc_lock.c
- 00000000 l df *ABS* 00000000 alt_read.c
- 00043698 l F .text 0000003c alt_get_errno
- 00000000 l df *ABS* 00000000 alt_release_fd.c
- 00000000 l df *ABS* 00000000 alt_sbrk.c
- 000471ec l O .rwdata 00000004 heap_end
- 00000000 l df *ABS* 00000000 alt_write.c
- 0004390c l F .text 0000003c alt_get_errno
- 00000000 l df *ABS* 00000000 alt_sys_init.c
- 00043a48 l F .text 00000034 alt_dev_reg
- 00046164 l O .rwdata 00001060 jtag_uart
- 00000000 l df *ABS* 00000000 altera_avalon_jtag_uart_fd.c
- 00000000 l df *ABS* 00000000 altera_avalon_jtag_uart_init.c
- 00043d20 l F .text 0000020c altera_avalon_jtag_uart_irq
- 00043f2c l F .text 000000a0 altera_avalon_jtag_uart_timeout
- 00000000 l df *ABS* 00000000 altera_avalon_jtag_uart_ioctl.c
- 00000000 l df *ABS* 00000000 altera_avalon_jtag_uart_read.c
- 00000000 l df *ABS* 00000000 altera_avalon_jtag_uart_write.c
- 00000000 l df *ABS* 00000000 alt_alarm_start.c
- 00000000 l df *ABS* 00000000 alt_dcache_flush_all.c
- 00000000 l df *ABS* 00000000 alt_dev_llist_insert.c
- 000446b0 l F .text 0000003c alt_get_errno
- 00000000 l df *ABS* 00000000 alt_do_ctors.c
- 00000000 l df *ABS* 00000000 alt_do_dtors.c
- 00000000 l df *ABS* 00000000 alt_icache_flush_all.c
- 00000000 l df *ABS* 00000000 alt_iic.c
- 00000000 l df *ABS* 00000000 alt_iic_isr_register.c
- 00000000 l df *ABS* 00000000 alt_io_redirect.c
- 00044b10 l F .text 000000e4 alt_open_fd
- 00000000 l df *ABS* 00000000 alt_irq_vars.c
- 00000000 l df *ABS* 00000000 alt_open.c
- 00044c70 l F .text 0000003c alt_get_errno
- 00044cac l F .text 000000ec alt_file_locked
- 00000000 l df *ABS* 00000000 alt_tick.c
- 00000000 l df *ABS* 00000000 altera_nios2_gen2_irq.c
- 00000000 l df *ABS* 00000000 alt_find_dev.c
- 00000000 l df *ABS* 00000000 alt_find_file.c
- 00000000 l df *ABS* 00000000 alt_get_fd.c
- 00000000 l df *ABS* 00000000 atexit.c
- 00000000 l df *ABS* 00000000 exit.c
- 00000000 l df *ABS* 00000000 memcmp.c
- 00000000 l df *ABS* 00000000 __atexit.c
- 00000000 l df *ABS* 00000000 __call_atexit.c
- 00000000 l df *ABS* 00000000 alt_exit.c
- 00048c90 g O .bss 00000004 alt_instruction_exception_handler
- 00042e84 g F .text 00000054 _isatty_r
- 000435d4 g F .text 0000007c alt_main
- 000402a8 g F .text 000000c0 _puts_r
- 00048cbc g O .bss 00000100 alt_irq
- 00042bac g F .text 00000060 _lseek_r
- 000471fc g *ABS* 00000000 __flash_rwdata_start
- 00048dbc g *ABS* 00000000 __alt_heap_start
- 00042160 g F .text 0000005c __sseek
- 00040774 g F .text 00000010 __sinit
- 000405cc g F .text 00000078 __sfmoreglue
- 00043674 g F .text 00000024 __malloc_unlock
- 0004184c g F .text 0000015c memmove
- 0004075c g F .text 00000018 _cleanup
- 00045098 g F .text 00000024 altera_nios2_gen2_irq_init
- 00040000 g F .entry 0000000c __reset
- 00040020 g *ABS* 00000000 __flash_exceptions_start
- 00042e28 g F .text 0000005c _fstat_r
- 00048c74 g O .bss 00000004 errno
- 000420dc g F .text 00000008 __seofread
- 00048c7c g O .bss 00000004 alt_argv
- 0004f1c4 g *ABS* 00000000 _gp
- 00045fe4 g O .rwdata 00000180 alt_fd_list
- 000450bc g F .text 00000090 alt_find_dev
- 00041704 g F .text 00000148 memcpy
- 0004041c g F .text 0000000c _cleanup_r
- 00044bf4 g F .text 0000007c alt_io_redirect
- 00045748 g *ABS* 00000000 __DTOR_END__
- 00040368 g F .text 00000014 puts
- 00045318 g F .text 0000009c alt_exception_cause_generated_bad_addr
- 00044124 g F .text 0000021c altera_avalon_jtag_uart_read
- 00042fd0 g F .text 00000064 .hidden __udivsi3
- 00043324 g F .text 000000ac isatty
- 00048c70 g O .bss 00000004 __malloc_top_pad
- 000407c4 g F .text 000004c8 __sfvwrite_r
- 00042034 g F .text 00000054 _sbrk_r
- 00042dc8 g F .text 00000060 _read_r
- 000471e4 g O .rwdata 00000004 alt_max_fd
- 000423cc g F .text 000000f0 _fclose_r
- 00042748 g F .text 00000030 fflush
- 00048c6c g O .bss 00000004 __malloc_max_sbrked_mem
- 000434f8 g F .text 000000dc lseek
- 000471c4 g O .rwdata 00000004 _global_impure_ptr
- 00041ad0 g F .text 00000564 _realloc_r
- 00048dbc g *ABS* 00000000 __bss_end
- 00044a20 g F .text 000000f0 alt_iic_isr_register
- 00044f90 g F .text 00000108 alt_tick
- 00040794 g F .text 00000018 __fp_lock_all
- 000449d4 g F .text 0000004c alt_ic_irq_enabled
- 00044ef4 g F .text 0000009c alt_alarm_stop
- 00048c84 g O .bss 00000004 alt_irq_active
- 000400fc g F .exceptions 000000d4 alt_irq_handler
- 00045fbc g O .rwdata 00000028 alt_dev_null
- 00044690 g F .text 00000020 alt_dcache_flush_all
- 000471fc g *ABS* 00000000 __ram_rwdata_end
- 000471dc g O .rwdata 00000008 alt_dev_list
- 00043948 g F .text 00000100 write
- 00045790 g *ABS* 00000000 __ram_rodata_end
- 00043230 g F .text 000000b8 fstat
- 00043034 g F .text 00000058 .hidden __umodsi3
- 00048dbc g *ABS* 00000000 end
- 00043c60 g F .text 000000c0 altera_avalon_jtag_uart_init
- 000401d0 g F .exceptions 00000060 alt_instruction_exception_entry
- 00045748 g *ABS* 00000000 __CTOR_LIST__
- 00072000 g *ABS* 00000000 __alt_stack_pointer
- 00044340 g F .text 00000224 altera_avalon_jtag_uart_write
- 00040784 g F .text 00000004 __sfp_lock_acquire
- 00041620 g F .text 000000e4 memchr
- 0004289c g F .text 00000310 _free_r
- 00045594 g F .text 00000180 __call_exitprocs
- 000471cc g O .rwdata 00000004 __malloc_sbrk_base
- 00040230 g F .text 0000003c _start
- 00048c88 g O .bss 00000004 _alt_tick_rate
- 00048c8c g O .bss 00000004 _alt_nticks
- 000436d4 g F .text 00000104 read
- 00043ab4 g F .text 00000048 alt_sys_init
- 0004547c g F .text 00000118 __register_exitproc
- 00043fcc g F .text 00000068 altera_avalon_jtag_uart_close
- 0004308c g F .text 00000028 .hidden __mulsi3
- 00045790 g *ABS* 00000000 __ram_rwdata_start
- 00045748 g *ABS* 00000000 __ram_rodata_start
- 00048c94 g O .bss 00000028 __malloc_current_mallinfo
- 00043afc g F .text 00000060 altera_avalon_jtag_uart_read_fd
- 00045254 g F .text 000000c4 alt_get_fd
- 00042378 g F .text 00000054 _close_r
- 00045400 g F .text 0000007c memcmp
- 00043bbc g F .text 00000050 altera_avalon_jtag_uart_close_fd
- 00048dbc g *ABS* 00000000 __alt_stack_base
- 00043c0c g F .text 00000054 altera_avalon_jtag_uart_ioctl_fd
- 00042224 g F .text 00000154 __swsetup_r
- 00040644 g F .text 00000118 __sfp
- 00045bb4 g O .rwdata 00000408 __malloc_av_
- 00040790 g F .text 00000004 __sinit_lock_release
- 00042088 g F .text 00000054 __sread
- 0004514c g F .text 00000108 alt_find_file
- 000446ec g F .text 000000a4 alt_dev_llist_insert
- 00043650 g F .text 00000024 __malloc_lock
- 0004385c g F .text 000000b0 sbrk
- 000426ec g F .text 0000005c _fflush_r
- 00048c68 g *ABS* 00000000 __bss_start
- 000419a8 g F .text 00000128 memset
- 0004026c g F .text 0000003c main
- 00048c80 g O .bss 00000004 alt_envp
- 00048c68 g O .bss 00000004 __malloc_max_total_mem
- 00043b5c g F .text 00000060 altera_avalon_jtag_uart_write_fd
- 000421bc g F .text 00000008 __sclose
- 00072000 g *ABS* 00000000 __alt_heap_limit
- 000424bc g F .text 00000014 fclose
- 00040e14 g F .text 0000080c _malloc_r
- 000471e8 g O .rwdata 00000004 alt_errno
- 00040c8c g F .text 000000c4 _fwalk
- 00042ed8 g F .text 00000084 .hidden __divsi3
- 00042778 g F .text 00000124 _malloc_trim_r
- 00045748 g *ABS* 00000000 __CTOR_END__
- 00045748 g *ABS* 00000000 __flash_rodata_start
- 00045748 g *ABS* 00000000 __DTOR_LIST__
- 00043a7c g F .text 00000038 alt_irq_init
- 000437d8 g F .text 00000084 alt_release_fd
- 000453b4 g F .text 00000014 atexit
- 000421c4 g F .text 00000060 _write_r
- 000471c8 g O .rwdata 00000004 _impure_ptr
- 00048c78 g O .bss 00000004 alt_argc
- 000424d0 g F .text 0000021c __sflush_r
- 000447f0 g F .text 00000060 _do_dtors
- 00040020 g .exceptions 00000000 alt_irq_entry
- 000407ac g F .text 00000018 __fp_unlock_all
- 000471d4 g O .rwdata 00000008 alt_fs_list
- 00040020 g *ABS* 00000000 __ram_exceptions_start
- 00040000 g *ABS* 00000000 __alt_mem_onchip_memory2
- 00044870 g F .text 00000050 alt_ic_isr_register
- 000471fc g *ABS* 00000000 _edata
- 00048dbc g *ABS* 00000000 _end
- 00040230 g *ABS* 00000000 __ram_exceptions_end
- 00044034 g F .text 000000f0 altera_avalon_jtag_uart_ioctl
- 00044948 g F .text 0000008c alt_ic_irq_disable
- 000420e4 g F .text 0000007c __swrite
- 000471d0 g O .rwdata 00000004 __malloc_trim_threshold
- 000453c8 g F .text 00000038 exit
- 00040d50 g F .text 000000c4 _fwalk_reent
- 00042f5c g F .text 00000074 .hidden __modsi3
- 00072000 g *ABS* 00000000 __alt_data_end
- 00040020 g F .exceptions 00000000 alt_exception
- 00040788 g F .text 00000004 __sfp_lock_release
- 00045714 g F .text 00000034 _exit
- 00044564 g F .text 0000012c alt_alarm_start
- 00042c0c g F .text 000001bc __smakebuf_r
- 0004037c g F .text 00000098 strlen
- 00044d98 g F .text 0000015c open
- 00044850 g F .text 00000020 alt_icache_flush_all
- 000471f0 g O .rwdata 00000004 alt_priority_mask
- 000448c0 g F .text 00000088 alt_ic_irq_enable
- 000471f4 g O .rwdata 00000008 alt_alarm_list
- 00044790 g F .text 00000060 _do_ctors
- 000430f0 g F .text 000000d8 close
- 00043438 g F .text 00000084 alt_load
- 0004078c g F .text 00000004 __sinit_lock_acquire
- Disassembly of section .entry:
- 00040000 <__reset>:
- * Jump to the _start entry point in the .text section if reset code
- * is allowed or if optimizing for RTL simulation.
- */
- #if defined(ALT_ALLOW_CODE_AT_RESET) || defined(ALT_SIM_OPTIMIZE)
- /* Jump to the _start entry point in the .text section. */
- movhi r1, %hi(_start)
- 40000: 00400134 movhi at,4
- ori r1, r1, %lo(_start)
- 40004: 08408c14 ori at,at,560
- jmp r1
- 40008: 0800683a jmp at
- ...
- Disassembly of section .exceptions:
- 00040020 <alt_exception>:
- #else /* ALT_EXCEPTION_STACK disabled */
- /*
- * Reserve space on normal stack for registers about to be pushed.
- */
- addi sp, sp, -76
- 40020: deffed04 addi sp,sp,-76
- * documentation for details).
- *
- * Leave a gap in the stack frame at 4(sp) for the muldiv handler to
- * store zero into.
- */
- stw ra, 0(sp)
- 40024: dfc00015 stw ra,0(sp)
- stw r1, 8(sp)
- 40028: d8400215 stw at,8(sp)
- stw r2, 12(sp)
- 4002c: d8800315 stw r2,12(sp)
- stw r3, 16(sp)
- 40030: d8c00415 stw r3,16(sp)
- stw r4, 20(sp)
- 40034: d9000515 stw r4,20(sp)
- stw r5, 24(sp)
- 40038: d9400615 stw r5,24(sp)
- stw r6, 28(sp)
- 4003c: d9800715 stw r6,28(sp)
- stw r7, 32(sp)
- 40040: d9c00815 stw r7,32(sp)
- rdctl r5, estatus /* Read early to avoid usage stall */
- 40044: 000b307a rdctl r5,estatus
- stw r8, 36(sp)
- 40048: da000915 stw r8,36(sp)
- stw r9, 40(sp)
- 4004c: da400a15 stw r9,40(sp)
- stw r10, 44(sp)
- 40050: da800b15 stw r10,44(sp)
- stw r11, 48(sp)
- 40054: dac00c15 stw r11,48(sp)
- stw r12, 52(sp)
- 40058: db000d15 stw r12,52(sp)
- stw r13, 56(sp)
- 4005c: db400e15 stw r13,56(sp)
- stw r14, 60(sp)
- 40060: db800f15 stw r14,60(sp)
- stw r15, 64(sp)
- 40064: dbc01015 stw r15,64(sp)
- /*
- * ea-4 contains the address of the instruction being executed
- * when the exception occured. For interrupt exceptions, we will
- * will be re-issue the isntruction. Store it in 72(sp)
- */
- stw r5, 68(sp) /* estatus */
- 40068: d9401115 stw r5,68(sp)
- addi r15, ea, -4 /* instruction that caused exception */
- 4006c: ebffff04 addi r15,ea,-4
- stw r15, 72(sp)
- 40070: dbc01215 stw r15,72(sp)
- #else
- /*
- * Test to see if the exception was a software exception or caused
- * by an external interrupt, and vector accordingly.
- */
- rdctl r4, ipending
- 40074: 0009313a rdctl r4,ipending
- andi r2, r5, 1
- 40078: 2880004c andi r2,r5,1
- beq r2, zero, .Lnot_irq
- 4007c: 10000326 beq r2,zero,4008c <alt_exception+0x6c>
- beq r4, zero, .Lnot_irq
- 40080: 20000226 beq r4,zero,4008c <alt_exception+0x6c>
- /*
- * Now that all necessary registers have been preserved, call
- * alt_irq_handler() to process the interrupts.
- */
- call alt_irq_handler
- 40084: 00400fc0 call 400fc <alt_irq_handler>
- .section .exceptions.irqreturn, "xa"
- br .Lexception_exit
- 40088: 00000706 br 400a8 <alt_exception+0x88>
- * upon completion, so we write ea (address of instruction *after*
- * the one where the exception occured) into 72(sp). The actual
- * instruction that caused the exception is written in r2, which these
- * handlers will utilize.
- */
- stw ea, 72(sp) /* EA is PC+4 so will skip over instruction causing exception */
- 4008c: df401215 stw ea,72(sp)
- .Lunknown_16bit:
- addi.n r4, r4, 2 /* Need PC+2 to skip over instruction causing exception */
- stw r4, 72(sp)
- #else /* CDX is not Enabled and all instructions are 32bits */
- ldw r2, -4(ea) /* Instruction value that caused exception */
- 40090: e8bfff17 ldw r2,-4(ea)
- * debugger is present) or go into an infinite loop since the
- * handling behavior is undefined; in that case we will not return here.
- */
- /* Load exception-causing address as first argument (r4) */
- addi r4, ea, -4
- 40094: e93fff04 addi r4,ea,-4
- /* Call the instruction-exception entry */
- call alt_instruction_exception_entry
- 40098: 00401d00 call 401d0 <alt_instruction_exception_entry>
- * instruction
- *
- * Return code was 0: Skip. The instruction after the exception is
- * already stored in 72(sp).
- */
- bne r2, r0, .Lexception_exit
- 4009c: 1000021e bne r2,zero,400a8 <alt_exception+0x88>
- /*
- * Otherwise, modify 72(sp) to re-issue the instruction that caused the
- * exception.
- */
- addi r15, ea, -4 /* instruction that caused exception */
- 400a0: ebffff04 addi r15,ea,-4
- stw r15, 72(sp)
- 400a4: dbc01215 stw r15,72(sp)
- /*
- * Restore the saved registers, so that all general purpose registers
- * have been restored to their state at the time the interrupt occured.
- */
- ldw r5, 68(sp)
- 400a8: d9401117 ldw r5,68(sp)
- ldw ea, 72(sp) /* This becomes the PC once eret is executed */
- 400ac: df401217 ldw ea,72(sp)
- ldw ra, 0(sp)
- 400b0: dfc00017 ldw ra,0(sp)
- wrctl estatus, r5
- 400b4: 2801707a wrctl estatus,r5
- ldw r1, 8(sp)
- 400b8: d8400217 ldw at,8(sp)
- ldw r2, 12(sp)
- 400bc: d8800317 ldw r2,12(sp)
- ldw r3, 16(sp)
- 400c0: d8c00417 ldw r3,16(sp)
- ldw r4, 20(sp)
- 400c4: d9000517 ldw r4,20(sp)
- ldw r5, 24(sp)
- 400c8: d9400617 ldw r5,24(sp)
- ldw r6, 28(sp)
- 400cc: d9800717 ldw r6,28(sp)
- ldw r7, 32(sp)
- 400d0: d9c00817 ldw r7,32(sp)
- #if defined(ALT_EXCEPTION_STACK) && defined(ALT_STACK_CHECK)
- ldw et, %gprel(alt_exception_old_stack_limit)(gp)
- #endif
- ldw r8, 36(sp)
- 400d4: da000917 ldw r8,36(sp)
- ldw r9, 40(sp)
- 400d8: da400a17 ldw r9,40(sp)
- ldw r10, 44(sp)
- 400dc: da800b17 ldw r10,44(sp)
- ldw r11, 48(sp)
- 400e0: dac00c17 ldw r11,48(sp)
- ldw r12, 52(sp)
- 400e4: db000d17 ldw r12,52(sp)
- ldw r13, 56(sp)
- 400e8: db400e17 ldw r13,56(sp)
- ldw r14, 60(sp)
- 400ec: db800f17 ldw r14,60(sp)
- ldw r15, 64(sp)
- 400f0: dbc01017 ldw r15,64(sp)
- stw et, %gprel(alt_stack_limit_value)(gp)
- stw zero, %gprel(alt_exception_old_stack_limit)(gp)
- #endif /* ALT_STACK_CHECK */
- ldw sp, 76(sp)
- #else /* ALT_EXCEPTION_STACK disabled */
- addi sp, sp, 76
- 400f4: dec01304 addi sp,sp,76
- /*
- * Return to the interrupted instruction.
- */
- eret
- 400f8: ef80083a eret
- 000400fc <alt_irq_handler>:
- * instruction is present if the macro ALT_CI_INTERRUPT_VECTOR defined.
- */
- void alt_irq_handler (void) __attribute__ ((section (".exceptions")));
- void alt_irq_handler (void)
- {
- 400fc: defff904 addi sp,sp,-28
- 40100: dfc00615 stw ra,24(sp)
- 40104: df000515 stw fp,20(sp)
- 40108: df000504 addi fp,sp,20
-
- /*
- * Notify the operating system that we are at interrupt level.
- */
-
- ALT_OS_INT_ENTER();
- 4010c: 0001883a nop
- #ifndef NIOS2_EIC_PRESENT
- static ALT_INLINE alt_u32 ALT_ALWAYS_INLINE alt_irq_pending (void)
- {
- alt_u32 active;
- NIOS2_READ_IPENDING (active);
- 40110: 0005313a rdctl r2,ipending
- 40114: e0bffe15 stw r2,-8(fp)
- return active;
- 40118: e0bffe17 ldw r2,-8(fp)
- * Consider the case where the high priority interupt is asserted during
- * the interrupt entry sequence for a lower priority interrupt to see why
- * this is the case.
- */
- active = alt_irq_pending ();
- 4011c: e0bffb15 stw r2,-20(fp)
- do
- {
- i = 0;
- 40120: e03ffd15 stw zero,-12(fp)
- mask = 1;
- 40124: 00800044 movi r2,1
- 40128: e0bffc15 stw r2,-16(fp)
- * called to clear the interrupt condition.
- */
- do
- {
- if (active & mask)
- 4012c: e0fffb17 ldw r3,-20(fp)
- 40130: e0bffc17 ldw r2,-16(fp)
- 40134: 1884703a and r2,r3,r2
- 40138: 10001426 beq r2,zero,4018c <alt_irq_handler+0x90>
- {
- #ifdef ALT_ENHANCED_INTERRUPT_API_PRESENT
- alt_irq[i].handler(alt_irq[i].context);
- 4013c: 00800174 movhi r2,5
- 40140: 10a32f04 addi r2,r2,-29508
- 40144: e0fffd17 ldw r3,-12(fp)
- 40148: 180690fa slli r3,r3,3
- 4014c: 10c5883a add r2,r2,r3
- 40150: 10c00017 ldw r3,0(r2)
- 40154: 00800174 movhi r2,5
- 40158: 10a32f04 addi r2,r2,-29508
- 4015c: e13ffd17 ldw r4,-12(fp)
- 40160: 200890fa slli r4,r4,3
- 40164: 1105883a add r2,r2,r4
- 40168: 10800104 addi r2,r2,4
- 4016c: 10800017 ldw r2,0(r2)
- 40170: 1009883a mov r4,r2
- 40174: 183ee83a callr r3
- #else
- alt_irq[i].handler(alt_irq[i].context, i);
- #endif
- break;
- 40178: 0001883a nop
- #ifndef NIOS2_EIC_PRESENT
- static ALT_INLINE alt_u32 ALT_ALWAYS_INLINE alt_irq_pending (void)
- {
- alt_u32 active;
- NIOS2_READ_IPENDING (active);
- 4017c: 0005313a rdctl r2,ipending
- 40180: e0bfff15 stw r2,-4(fp)
- return active;
- 40184: e0bfff17 ldw r2,-4(fp)
- 40188: 00000706 br 401a8 <alt_irq_handler+0xac>
- }
- mask <<= 1;
- 4018c: e0bffc17 ldw r2,-16(fp)
- 40190: 1085883a add r2,r2,r2
- 40194: e0bffc15 stw r2,-16(fp)
- i++;
- 40198: e0bffd17 ldw r2,-12(fp)
- 4019c: 10800044 addi r2,r2,1
- 401a0: e0bffd15 stw r2,-12(fp)
- } while (1);
- 401a4: 003fe106 br 4012c <alt_irq_handler+0x30>
- active = alt_irq_pending ();
- 401a8: e0bffb15 stw r2,-20(fp)
-
- } while (active);
- 401ac: e0bffb17 ldw r2,-20(fp)
- 401b0: 103fdb1e bne r2,zero,40120 <alt_irq_handler+0x24>
- /*
- * Notify the operating system that interrupt processing is complete.
- */
- ALT_OS_INT_EXIT();
- 401b4: 0001883a nop
- }
- 401b8: 0001883a nop
- 401bc: e037883a mov sp,fp
- 401c0: dfc00117 ldw ra,4(sp)
- 401c4: df000017 ldw fp,0(sp)
- 401c8: dec00204 addi sp,sp,8
- 401cc: f800283a ret
- 000401d0 <alt_instruction_exception_entry>:
- * that handler if it has been registered. Absent a handler, it will
- * break break or hang as discussed below.
- */
- int
- alt_instruction_exception_entry (alt_u32 exception_pc)
- {
- 401d0: defffb04 addi sp,sp,-20
- 401d4: dfc00415 stw ra,16(sp)
- 401d8: df000315 stw fp,12(sp)
- 401dc: df000304 addi fp,sp,12
- 401e0: e13fff15 stw r4,-4(fp)
- cause = ( (cause & NIOS2_EXCEPTION_REG_CAUSE_MASK) >>
- NIOS2_EXCEPTION_REG_CAUSE_OFST );
- NIOS2_READ_BADADDR(badaddr);
- #else
- cause = NIOS2_EXCEPTION_CAUSE_NOT_PRESENT;
- 401e4: 00bfffc4 movi r2,-1
- 401e8: e0bffd15 stw r2,-12(fp)
- badaddr = 0;
- 401ec: e03ffe15 stw zero,-8(fp)
- #endif /* NIOS2_HAS_EXTRA_EXCEPTION_INFO */
- if(alt_instruction_exception_handler) {
- 401f0: d0a6b317 ldw r2,-25908(gp)
- 401f4: 10000726 beq r2,zero,40214 <alt_instruction_exception_entry+0x44>
- * Call handler. Its return value indicates whether the exception-causing
- * instruction should be re-issued. The code that called us,
- * alt_eceptions_entry.S, will look at this value and adjust the ea
- * register as necessary
- */
- return alt_instruction_exception_handler(cause, exception_pc, badaddr);
- 401f8: d0a6b317 ldw r2,-25908(gp)
- 401fc: e0fffd17 ldw r3,-12(fp)
- 40200: e1bffe17 ldw r6,-8(fp)
- 40204: e17fff17 ldw r5,-4(fp)
- 40208: 1809883a mov r4,r3
- 4020c: 103ee83a callr r2
- 40210: 00000206 br 4021c <alt_instruction_exception_entry+0x4c>
- * (a peripheral which negates its interrupt output before its
- * interrupt handler has been executed will cause spurious interrupts)
- */
- else {
- #ifdef NIOS2_HAS_DEBUG_STUB
- NIOS2_BREAK();
- 40214: 003da03a break 0
- ;
- #endif /* NIOS2_HAS_DEBUG_STUB */
- }
- /* We should not get here. Remove compiler warning. */
- return NIOS2_EXCEPTION_RETURN_REISSUE_INST;
- 40218: 0005883a mov r2,zero
- }
- 4021c: e037883a mov sp,fp
- 40220: dfc00117 ldw ra,4(sp)
- 40224: df000017 ldw fp,0(sp)
- 40228: dec00204 addi sp,sp,8
- 4022c: f800283a ret
- Disassembly of section .text:
- 00040230 <_start>:
- /*
- * Now that the caches are initialized, set up the stack pointer and global pointer.
- * The values provided by the linker are assumed to be correctly aligned.
- */
- movhi sp, %hi(__alt_stack_pointer)
- 40230: 06c001f4 movhi sp,7
- ori sp, sp, %lo(__alt_stack_pointer)
- 40234: dec80014 ori sp,sp,8192
- movhi gp, %hi(_gp)
- 40238: 06800134 movhi gp,4
- ori gp, gp, %lo(_gp)
- 4023c: d6bc7114 ori gp,gp,61892
- */
- #ifndef ALT_SIM_OPTIMIZE
- /* Log that the BSS is about to be cleared. */
- ALT_LOG_PUTS(alt_log_msg_bss)
- movhi r2, %hi(__bss_start)
- 40240: 00800134 movhi r2,4
- ori r2, r2, %lo(__bss_start)
- 40244: 10a31a14 ori r2,r2,35944
- movhi r3, %hi(__bss_end)
- 40248: 00c00134 movhi r3,4
- ori r3, r3, %lo(__bss_end)
- 4024c: 18e36f14 ori r3,r3,36284
- beq r2, r3, 1f
- 40250: 10c00326 beq r2,r3,40260 <_start+0x30>
- 0:
- stw zero, (r2)
- 40254: 10000015 stw zero,0(r2)
- addi r2, r2, 4
- 40258: 10800104 addi r2,r2,4
- bltu r2, r3, 0b
- 4025c: 10fffd36 bltu r2,r3,40254 <_start+0x24>
- * section aren't defined until alt_load() has been called).
- */
- mov et, zero
- #endif
- call alt_load
- 40260: 00434380 call 43438 <alt_load>
- /* Log that alt_main is about to be called. */
- ALT_LOG_PUTS(alt_log_msg_alt_main)
- /* Call the C entry point. It should never return. */
- call alt_main
- 40264: 00435d40 call 435d4 <alt_main>
- 00040268 <alt_after_alt_main>:
- /* Wait in infinite loop in case alt_main does return. */
- alt_after_alt_main:
- br alt_after_alt_main
- 40268: 003fff06 br 40268 <alt_after_alt_main>
- 0004026c <main>:
- #include <stdio.h>
- #include "altera_avalon_pio_regs.h"
- #include <system.h>
- int main()
- {
- 4026c: defffd04 addi sp,sp,-12
- 40270: dfc00215 stw ra,8(sp)
- 40274: df000115 stw fp,4(sp)
- 40278: df000104 addi fp,sp,4
- printf("Hello from Nios II!\n");
- 4027c: 01000134 movhi r4,4
- 40280: 2115d204 addi r4,r4,22344
- 40284: 00403680 call 40368 <puts>
- int count = 0;
- 40288: e03fff15 stw zero,-4(fp)
- while(1) {
- //printf("%d\n", count);
- IOWR_ALTERA_AVALON_PIO_DATA(PIO_LED_BASE, count++);
- 4028c: e0ffff17 ldw r3,-4(fp)
- 40290: 18800044 addi r2,r3,1
- 40294: e0bfff15 stw r2,-4(fp)
- 40298: 00800234 movhi r2,8
- 4029c: 10840404 addi r2,r2,4112
- 402a0: 10c00035 stwio r3,0(r2)
- //for(int i=0; i<100000; i++) {
- //}
- }
- 402a4: 003ff906 br 4028c <main+0x20>
- 000402a8 <_puts_r>:
- 402a8: defff604 addi sp,sp,-40
- 402ac: dc000715 stw r16,28(sp)
- 402b0: 2021883a mov r16,r4
- 402b4: 2809883a mov r4,r5
- 402b8: dc400815 stw r17,32(sp)
- 402bc: dfc00915 stw ra,36(sp)
- 402c0: 2823883a mov r17,r5
- 402c4: 004037c0 call 4037c <strlen>
- 402c8: 10c00044 addi r3,r2,1
- 402cc: d8800115 stw r2,4(sp)
- 402d0: 00800134 movhi r2,4
- 402d4: 1095d704 addi r2,r2,22364
- 402d8: d8800215 stw r2,8(sp)
- 402dc: 00800044 movi r2,1
- 402e0: d8800315 stw r2,12(sp)
- 402e4: 00800084 movi r2,2
- 402e8: dc400015 stw r17,0(sp)
- 402ec: d8c00615 stw r3,24(sp)
- 402f0: dec00415 stw sp,16(sp)
- 402f4: d8800515 stw r2,20(sp)
- 402f8: 80000226 beq r16,zero,40304 <_puts_r+0x5c>
- 402fc: 80800e17 ldw r2,56(r16)
- 40300: 10001426 beq r2,zero,40354 <_puts_r+0xac>
- 40304: 81400217 ldw r5,8(r16)
- 40308: 2880030b ldhu r2,12(r5)
- 4030c: 10c8000c andi r3,r2,8192
- 40310: 1800061e bne r3,zero,4032c <_puts_r+0x84>
- 40314: 29001917 ldw r4,100(r5)
- 40318: 00f7ffc4 movi r3,-8193
- 4031c: 10880014 ori r2,r2,8192
- 40320: 20c6703a and r3,r4,r3
- 40324: 2880030d sth r2,12(r5)
- 40328: 28c01915 stw r3,100(r5)
- 4032c: d9800404 addi r6,sp,16
- 40330: 8009883a mov r4,r16
- 40334: 00407c40 call 407c4 <__sfvwrite_r>
- 40338: 1000091e bne r2,zero,40360 <_puts_r+0xb8>
- 4033c: 00800284 movi r2,10
- 40340: dfc00917 ldw ra,36(sp)
- 40344: dc400817 ldw r17,32(sp)
- 40348: dc000717 ldw r16,28(sp)
- 4034c: dec00a04 addi sp,sp,40
- 40350: f800283a ret
- 40354: 8009883a mov r4,r16
- 40358: 00407740 call 40774 <__sinit>
- 4035c: 003fe906 br 40304 <_puts_r+0x5c>
- 40360: 00bfffc4 movi r2,-1
- 40364: 003ff606 br 40340 <_puts_r+0x98>
- 00040368 <puts>:
- 40368: 00800134 movhi r2,4
- 4036c: 109c7204 addi r2,r2,29128
- 40370: 200b883a mov r5,r4
- 40374: 11000017 ldw r4,0(r2)
- 40378: 00402a81 jmpi 402a8 <_puts_r>
- 0004037c <strlen>:
- 4037c: 208000cc andi r2,r4,3
- 40380: 10002026 beq r2,zero,40404 <strlen+0x88>
- 40384: 20800007 ldb r2,0(r4)
- 40388: 10002026 beq r2,zero,4040c <strlen+0x90>
- 4038c: 2005883a mov r2,r4
- 40390: 00000206 br 4039c <strlen+0x20>
- 40394: 10c00007 ldb r3,0(r2)
- 40398: 18001826 beq r3,zero,403fc <strlen+0x80>
- 4039c: 10800044 addi r2,r2,1
- 403a0: 10c000cc andi r3,r2,3
- 403a4: 183ffb1e bne r3,zero,40394 <strlen+0x18>
- 403a8: 10c00017 ldw r3,0(r2)
- 403ac: 01ffbff4 movhi r7,65279
- 403b0: 39ffbfc4 addi r7,r7,-257
- 403b4: 00ca303a nor r5,zero,r3
- 403b8: 01a02074 movhi r6,32897
- 403bc: 19c7883a add r3,r3,r7
- 403c0: 31a02004 addi r6,r6,-32640
- 403c4: 1946703a and r3,r3,r5
- 403c8: 1986703a and r3,r3,r6
- 403cc: 1800091e bne r3,zero,403f4 <strlen+0x78>
- 403d0: 10800104 addi r2,r2,4
- 403d4: 10c00017 ldw r3,0(r2)
- 403d8: 19cb883a add r5,r3,r7
- 403dc: 00c6303a nor r3,zero,r3
- 403e0: 28c6703a and r3,r5,r3
- 403e4: 1986703a and r3,r3,r6
- 403e8: 183ff926 beq r3,zero,403d0 <strlen+0x54>
- 403ec: 00000106 br 403f4 <strlen+0x78>
- 403f0: 10800044 addi r2,r2,1
- 403f4: 10c00007 ldb r3,0(r2)
- 403f8: 183ffd1e bne r3,zero,403f0 <strlen+0x74>
- 403fc: 1105c83a sub r2,r2,r4
- 40400: f800283a ret
- 40404: 2005883a mov r2,r4
- 40408: 003fe706 br 403a8 <strlen+0x2c>
- 4040c: 0005883a mov r2,zero
- 40410: f800283a ret
- 00040414 <__fp_unlock>:
- 40414: 0005883a mov r2,zero
- 40418: f800283a ret
- 0004041c <_cleanup_r>:
- 4041c: 01400134 movhi r5,4
- 40420: 2948f304 addi r5,r5,9164
- 40424: 0040d501 jmpi 40d50 <_fwalk_reent>
- 00040428 <__sinit.part.1>:
- 40428: defff704 addi sp,sp,-36
- 4042c: 00c00134 movhi r3,4
- 40430: dfc00815 stw ra,32(sp)
- 40434: ddc00715 stw r23,28(sp)
- 40438: dd800615 stw r22,24(sp)
- 4043c: dd400515 stw r21,20(sp)
- 40440: dd000415 stw r20,16(sp)
- 40444: dcc00315 stw r19,12(sp)
- 40448: dc800215 stw r18,8(sp)
- 4044c: dc400115 stw r17,4(sp)
- 40450: dc000015 stw r16,0(sp)
- 40454: 18c10704 addi r3,r3,1052
- 40458: 24000117 ldw r16,4(r4)
- 4045c: 20c00f15 stw r3,60(r4)
- 40460: 2080bb04 addi r2,r4,748
- 40464: 00c000c4 movi r3,3
- 40468: 20c0b915 stw r3,740(r4)
- 4046c: 2080ba15 stw r2,744(r4)
- 40470: 2000b815 stw zero,736(r4)
- 40474: 05c00204 movi r23,8
- 40478: 00800104 movi r2,4
- 4047c: 2025883a mov r18,r4
- 40480: b80d883a mov r6,r23
- 40484: 81001704 addi r4,r16,92
- 40488: 000b883a mov r5,zero
- 4048c: 80000015 stw zero,0(r16)
- 40490: 80000115 stw zero,4(r16)
- 40494: 80000215 stw zero,8(r16)
- 40498: 8080030d sth r2,12(r16)
- 4049c: 80001915 stw zero,100(r16)
- 404a0: 8000038d sth zero,14(r16)
- 404a4: 80000415 stw zero,16(r16)
- 404a8: 80000515 stw zero,20(r16)
- 404ac: 80000615 stw zero,24(r16)
- 404b0: 00419a80 call 419a8 <memset>
- 404b4: 05800134 movhi r22,4
- 404b8: 94400217 ldw r17,8(r18)
- 404bc: 05400134 movhi r21,4
- 404c0: 05000134 movhi r20,4
- 404c4: 04c00134 movhi r19,4
- 404c8: b5882204 addi r22,r22,8328
- 404cc: ad483904 addi r21,r21,8420
- 404d0: a5085804 addi r20,r20,8544
- 404d4: 9cc86f04 addi r19,r19,8636
- 404d8: 85800815 stw r22,32(r16)
- 404dc: 85400915 stw r21,36(r16)
- 404e0: 85000a15 stw r20,40(r16)
- 404e4: 84c00b15 stw r19,44(r16)
- 404e8: 84000715 stw r16,28(r16)
- 404ec: 00800284 movi r2,10
- 404f0: 8880030d sth r2,12(r17)
- 404f4: 00800044 movi r2,1
- 404f8: b80d883a mov r6,r23
- 404fc: 89001704 addi r4,r17,92
- 40500: 000b883a mov r5,zero
- 40504: 88000015 stw zero,0(r17)
- 40508: 88000115 stw zero,4(r17)
- 4050c: 88000215 stw zero,8(r17)
- 40510: 88001915 stw zero,100(r17)
- 40514: 8880038d sth r2,14(r17)
- 40518: 88000415 stw zero,16(r17)
- 4051c: 88000515 stw zero,20(r17)
- 40520: 88000615 stw zero,24(r17)
- 40524: 00419a80 call 419a8 <memset>
- 40528: 94000317 ldw r16,12(r18)
- 4052c: 00800484 movi r2,18
- 40530: 8c400715 stw r17,28(r17)
- 40534: 8d800815 stw r22,32(r17)
- 40538: 8d400915 stw r21,36(r17)
- 4053c: 8d000a15 stw r20,40(r17)
- 40540: 8cc00b15 stw r19,44(r17)
- 40544: 8080030d sth r2,12(r16)
- 40548: 00800084 movi r2,2
- 4054c: 80000015 stw zero,0(r16)
- 40550: 80000115 stw zero,4(r16)
- 40554: 80000215 stw zero,8(r16)
- 40558: 80001915 stw zero,100(r16)
- 4055c: 8080038d sth r2,14(r16)
- 40560: 80000415 stw zero,16(r16)
- 40564: 80000515 stw zero,20(r16)
- 40568: 80000615 stw zero,24(r16)
- 4056c: b80d883a mov r6,r23
- 40570: 000b883a mov r5,zero
- 40574: 81001704 addi r4,r16,92
- 40578: 00419a80 call 419a8 <memset>
- 4057c: 00800044 movi r2,1
- 40580: 84000715 stw r16,28(r16)
- 40584: 85800815 stw r22,32(r16)
- 40588: 85400915 stw r21,36(r16)
- 4058c: 85000a15 stw r20,40(r16)
- 40590: 84c00b15 stw r19,44(r16)
- 40594: 90800e15 stw r2,56(r18)
- 40598: dfc00817 ldw ra,32(sp)
- 4059c: ddc00717 ldw r23,28(sp)
- 405a0: dd800617 ldw r22,24(sp)
- 405a4: dd400517 ldw r21,20(sp)
- 405a8: dd000417 ldw r20,16(sp)
- 405ac: dcc00317 ldw r19,12(sp)
- 405b0: dc800217 ldw r18,8(sp)
- 405b4: dc400117 ldw r17,4(sp)
- 405b8: dc000017 ldw r16,0(sp)
- 405bc: dec00904 addi sp,sp,36
- 405c0: f800283a ret
- 000405c4 <__fp_lock>:
- 405c4: 0005883a mov r2,zero
- 405c8: f800283a ret
- 000405cc <__sfmoreglue>:
- 405cc: defffc04 addi sp,sp,-16
- 405d0: dc800215 stw r18,8(sp)
- 405d4: 2825883a mov r18,r5
- 405d8: dc000015 stw r16,0(sp)
- 405dc: 01401a04 movi r5,104
- 405e0: 2021883a mov r16,r4
- 405e4: 913fffc4 addi r4,r18,-1
- 405e8: dfc00315 stw ra,12(sp)
- 405ec: dc400115 stw r17,4(sp)
- 405f0: 004308c0 call 4308c <__mulsi3>
- 405f4: 8009883a mov r4,r16
- 405f8: 11401d04 addi r5,r2,116
- 405fc: 1023883a mov r17,r2
- 40600: 0040e140 call 40e14 <_malloc_r>
- 40604: 1021883a mov r16,r2
- 40608: 10000726 beq r2,zero,40628 <__sfmoreglue+0x5c>
- 4060c: 11000304 addi r4,r2,12
- 40610: 10000015 stw zero,0(r2)
- 40614: 14800115 stw r18,4(r2)
- 40618: 11000215 stw r4,8(r2)
- 4061c: 89801a04 addi r6,r17,104
- 40620: 000b883a mov r5,zero
- 40624: 00419a80 call 419a8 <memset>
- 40628: 8005883a mov r2,r16
- 4062c: dfc00317 ldw ra,12(sp)
- 40630: dc800217 ldw r18,8(sp)
- 40634: dc400117 ldw r17,4(sp)
- 40638: dc000017 ldw r16,0(sp)
- 4063c: dec00404 addi sp,sp,16
- 40640: f800283a ret
- 00040644 <__sfp>:
- 40644: defffb04 addi sp,sp,-20
- 40648: dc000015 stw r16,0(sp)
- 4064c: 04000134 movhi r16,4
- 40650: 841c7104 addi r16,r16,29124
- 40654: dcc00315 stw r19,12(sp)
- 40658: 2027883a mov r19,r4
- 4065c: 81000017 ldw r4,0(r16)
- 40660: dfc00415 stw ra,16(sp)
- 40664: dc800215 stw r18,8(sp)
- 40668: 20800e17 ldw r2,56(r4)
- 4066c: dc400115 stw r17,4(sp)
- 40670: 1000021e bne r2,zero,4067c <__sfp+0x38>
- 40674: 00404280 call 40428 <__sinit.part.1>
- 40678: 81000017 ldw r4,0(r16)
- 4067c: 2480b804 addi r18,r4,736
- 40680: 047fffc4 movi r17,-1
- 40684: 91000117 ldw r4,4(r18)
- 40688: 94000217 ldw r16,8(r18)
- 4068c: 213fffc4 addi r4,r4,-1
- 40690: 20000a16 blt r4,zero,406bc <__sfp+0x78>
- 40694: 8080030f ldh r2,12(r16)
- 40698: 10000c26 beq r2,zero,406cc <__sfp+0x88>
- 4069c: 80c01d04 addi r3,r16,116
- 406a0: 00000206 br 406ac <__sfp+0x68>
- 406a4: 18bfe60f ldh r2,-104(r3)
- 406a8: 10000826 beq r2,zero,406cc <__sfp+0x88>
- 406ac: 213fffc4 addi r4,r4,-1
- 406b0: 1c3ffd04 addi r16,r3,-12
- 406b4: 18c01a04 addi r3,r3,104
- 406b8: 247ffa1e bne r4,r17,406a4 <__sfp+0x60>
- 406bc: 90800017 ldw r2,0(r18)
- 406c0: 10001d26 beq r2,zero,40738 <__sfp+0xf4>
- 406c4: 1025883a mov r18,r2
- 406c8: 003fee06 br 40684 <__sfp+0x40>
- 406cc: 00bfffc4 movi r2,-1
- 406d0: 8080038d sth r2,14(r16)
- 406d4: 00800044 movi r2,1
- 406d8: 8080030d sth r2,12(r16)
- 406dc: 80001915 stw zero,100(r16)
- 406e0: 80000015 stw zero,0(r16)
- 406e4: 80000215 stw zero,8(r16)
- 406e8: 80000115 stw zero,4(r16)
- 406ec: 80000415 stw zero,16(r16)
- 406f0: 80000515 stw zero,20(r16)
- 406f4: 80000615 stw zero,24(r16)
- 406f8: 01800204 movi r6,8
- 406fc: 000b883a mov r5,zero
- 40700: 81001704 addi r4,r16,92
- 40704: 00419a80 call 419a8 <memset>
- 40708: 8005883a mov r2,r16
- 4070c: 80000c15 stw zero,48(r16)
- 40710: 80000d15 stw zero,52(r16)
- 40714: 80001115 stw zero,68(r16)
- 40718: 80001215 stw zero,72(r16)
- 4071c: dfc00417 ldw ra,16(sp)
- 40720: dcc00317 ldw r19,12(sp)
- 40724: dc800217 ldw r18,8(sp)
- 40728: dc400117 ldw r17,4(sp)
- 4072c: dc000017 ldw r16,0(sp)
- 40730: dec00504 addi sp,sp,20
- 40734: f800283a ret
- 40738: 01400104 movi r5,4
- 4073c: 9809883a mov r4,r19
- 40740: 00405cc0 call 405cc <__sfmoreglue>
- 40744: 90800015 stw r2,0(r18)
- 40748: 103fde1e bne r2,zero,406c4 <__sfp+0x80>
- 4074c: 00800304 movi r2,12
- 40750: 98800015 stw r2,0(r19)
- 40754: 0005883a mov r2,zero
- 40758: 003ff006 br 4071c <__sfp+0xd8>
- 0004075c <_cleanup>:
- 4075c: 00800134 movhi r2,4
- 40760: 109c7104 addi r2,r2,29124
- 40764: 11000017 ldw r4,0(r2)
- 40768: 01400134 movhi r5,4
- 4076c: 2948f304 addi r5,r5,9164
- 40770: 0040d501 jmpi 40d50 <_fwalk_reent>
- 00040774 <__sinit>:
- 40774: 20800e17 ldw r2,56(r4)
- 40778: 10000126 beq r2,zero,40780 <__sinit+0xc>
- 4077c: f800283a ret
- 40780: 00404281 jmpi 40428 <__sinit.part.1>
- 00040784 <__sfp_lock_acquire>:
- 40784: f800283a ret
- 00040788 <__sfp_lock_release>:
- 40788: f800283a ret
- 0004078c <__sinit_lock_acquire>:
- 4078c: f800283a ret
- 00040790 <__sinit_lock_release>:
- 40790: f800283a ret
- 00040794 <__fp_lock_all>:
- 40794: 00800134 movhi r2,4
- 40798: 109c7204 addi r2,r2,29128
- 4079c: 11000017 ldw r4,0(r2)
- 407a0: 01400134 movhi r5,4
- 407a4: 29417104 addi r5,r5,1476
- 407a8: 0040c8c1 jmpi 40c8c <_fwalk>
- 000407ac <__fp_unlock_all>:
- 407ac: 00800134 movhi r2,4
- 407b0: 109c7204 addi r2,r2,29128
- 407b4: 11000017 ldw r4,0(r2)
- 407b8: 01400134 movhi r5,4
- 407bc: 29410504 addi r5,r5,1044
- 407c0: 0040c8c1 jmpi 40c8c <_fwalk>
- 000407c4 <__sfvwrite_r>:
- 407c4: 30800217 ldw r2,8(r6)
- 407c8: 10006726 beq r2,zero,40968 <__sfvwrite_r+0x1a4>
- 407cc: 28c0030b ldhu r3,12(r5)
- 407d0: defff404 addi sp,sp,-48
- 407d4: dd400715 stw r21,28(sp)
- 407d8: dd000615 stw r20,24(sp)
- 407dc: dc000215 stw r16,8(sp)
- 407e0: dfc00b15 stw ra,44(sp)
- 407e4: df000a15 stw fp,40(sp)
- 407e8: ddc00915 stw r23,36(sp)
- 407ec: dd800815 stw r22,32(sp)
- 407f0: dcc00515 stw r19,20(sp)
- 407f4: dc800415 stw r18,16(sp)
- 407f8: dc400315 stw r17,12(sp)
- 407fc: 1880020c andi r2,r3,8
- 40800: 2821883a mov r16,r5
- 40804: 202b883a mov r21,r4
- 40808: 3029883a mov r20,r6
- 4080c: 10002726 beq r2,zero,408ac <__sfvwrite_r+0xe8>
- 40810: 28800417 ldw r2,16(r5)
- 40814: 10002526 beq r2,zero,408ac <__sfvwrite_r+0xe8>
- 40818: 1880008c andi r2,r3,2
- 4081c: a4400017 ldw r17,0(r20)
- 40820: 10002a26 beq r2,zero,408cc <__sfvwrite_r+0x108>
- 40824: 05a00034 movhi r22,32768
- 40828: 0027883a mov r19,zero
- 4082c: 0025883a mov r18,zero
- 40830: b5bf0004 addi r22,r22,-1024
- 40834: 980d883a mov r6,r19
- 40838: a809883a mov r4,r21
- 4083c: 90004626 beq r18,zero,40958 <__sfvwrite_r+0x194>
- 40840: 900f883a mov r7,r18
- 40844: b480022e bgeu r22,r18,40850 <__sfvwrite_r+0x8c>
- 40848: 01e00034 movhi r7,32768
- 4084c: 39ff0004 addi r7,r7,-1024
- 40850: 80800917 ldw r2,36(r16)
- 40854: 81400717 ldw r5,28(r16)
- 40858: 103ee83a callr r2
- 4085c: 00805a0e bge zero,r2,409c8 <__sfvwrite_r+0x204>
- 40860: a0c00217 ldw r3,8(r20)
- 40864: 98a7883a add r19,r19,r2
- 40868: 90a5c83a sub r18,r18,r2
- 4086c: 1885c83a sub r2,r3,r2
- 40870: a0800215 stw r2,8(r20)
- 40874: 103fef1e bne r2,zero,40834 <__sfvwrite_r+0x70>
- 40878: 0005883a mov r2,zero
- 4087c: dfc00b17 ldw ra,44(sp)
- 40880: df000a17 ldw fp,40(sp)
- 40884: ddc00917 ldw r23,36(sp)
- 40888: dd800817 ldw r22,32(sp)
- 4088c: dd400717 ldw r21,28(sp)
- 40890: dd000617 ldw r20,24(sp)
- 40894: dcc00517 ldw r19,20(sp)
- 40898: dc800417 ldw r18,16(sp)
- 4089c: dc400317 ldw r17,12(sp)
- 408a0: dc000217 ldw r16,8(sp)
- 408a4: dec00c04 addi sp,sp,48
- 408a8: f800283a ret
- 408ac: 800b883a mov r5,r16
- 408b0: a809883a mov r4,r21
- 408b4: 00422240 call 42224 <__swsetup_r>
- 408b8: 1000ee1e bne r2,zero,40c74 <__sfvwrite_r+0x4b0>
- 408bc: 80c0030b ldhu r3,12(r16)
- 408c0: a4400017 ldw r17,0(r20)
- 408c4: 1880008c andi r2,r3,2
- 408c8: 103fd61e bne r2,zero,40824 <__sfvwrite_r+0x60>
- 408cc: 1880004c andi r2,r3,1
- 408d0: 1000421e bne r2,zero,409dc <__sfvwrite_r+0x218>
- 408d4: 0039883a mov fp,zero
- 408d8: 0025883a mov r18,zero
- 408dc: 90001a26 beq r18,zero,40948 <__sfvwrite_r+0x184>
- 408e0: 1880800c andi r2,r3,512
- 408e4: 84c00217 ldw r19,8(r16)
- 408e8: 10002126 beq r2,zero,40970 <__sfvwrite_r+0x1ac>
- 408ec: 982f883a mov r23,r19
- 408f0: 94c09636 bltu r18,r19,40b4c <__sfvwrite_r+0x388>
- 408f4: 1881200c andi r2,r3,1152
- 408f8: 1000a11e bne r2,zero,40b80 <__sfvwrite_r+0x3bc>
- 408fc: 81000017 ldw r4,0(r16)
- 40900: b80d883a mov r6,r23
- 40904: e00b883a mov r5,fp
- 40908: 004184c0 call 4184c <memmove>
- 4090c: 80c00217 ldw r3,8(r16)
- 40910: 81000017 ldw r4,0(r16)
- 40914: 9005883a mov r2,r18
- 40918: 1ce7c83a sub r19,r3,r19
- 4091c: 25cf883a add r7,r4,r23
- 40920: 84c00215 stw r19,8(r16)
- 40924: 81c00015 stw r7,0(r16)
- 40928: a0c00217 ldw r3,8(r20)
- 4092c: e0b9883a add fp,fp,r2
- 40930: 90a5c83a sub r18,r18,r2
- 40934: 18a7c83a sub r19,r3,r2
- 40938: a4c00215 stw r19,8(r20)
- 4093c: 983fce26 beq r19,zero,40878 <__sfvwrite_r+0xb4>
- 40940: 80c0030b ldhu r3,12(r16)
- 40944: 903fe61e bne r18,zero,408e0 <__sfvwrite_r+0x11c>
- 40948: 8f000017 ldw fp,0(r17)
- 4094c: 8c800117 ldw r18,4(r17)
- 40950: 8c400204 addi r17,r17,8
- 40954: 003fe106 br 408dc <__sfvwrite_r+0x118>
- 40958: 8cc00017 ldw r19,0(r17)
- 4095c: 8c800117 ldw r18,4(r17)
- 40960: 8c400204 addi r17,r17,8
- 40964: 003fb306 br 40834 <__sfvwrite_r+0x70>
- 40968: 0005883a mov r2,zero
- 4096c: f800283a ret
- 40970: 81000017 ldw r4,0(r16)
- 40974: 80800417 ldw r2,16(r16)
- 40978: 11005a36 bltu r2,r4,40ae4 <__sfvwrite_r+0x320>
- 4097c: 85c00517 ldw r23,20(r16)
- 40980: 95c05836 bltu r18,r23,40ae4 <__sfvwrite_r+0x320>
- 40984: 00a00034 movhi r2,32768
- 40988: 10bfffc4 addi r2,r2,-1
- 4098c: 9009883a mov r4,r18
- 40990: 1480012e bgeu r2,r18,40998 <__sfvwrite_r+0x1d4>
- 40994: 1009883a mov r4,r2
- 40998: b80b883a mov r5,r23
- 4099c: 0042ed80 call 42ed8 <__divsi3>
- 409a0: b80b883a mov r5,r23
- 409a4: 1009883a mov r4,r2
- 409a8: 004308c0 call 4308c <__mulsi3>
- 409ac: 81400717 ldw r5,28(r16)
- 409b0: 80c00917 ldw r3,36(r16)
- 409b4: 100f883a mov r7,r2
- 409b8: e00d883a mov r6,fp
- 409bc: a809883a mov r4,r21
- 409c0: 183ee83a callr r3
- 409c4: 00bfd816 blt zero,r2,40928 <__sfvwrite_r+0x164>
- 409c8: 8080030b ldhu r2,12(r16)
- 409cc: 10801014 ori r2,r2,64
- 409d0: 8080030d sth r2,12(r16)
- 409d4: 00bfffc4 movi r2,-1
- 409d8: 003fa806 br 4087c <__sfvwrite_r+0xb8>
- 409dc: 0027883a mov r19,zero
- 409e0: 0011883a mov r8,zero
- 409e4: 0039883a mov fp,zero
- 409e8: 0025883a mov r18,zero
- 409ec: 90001f26 beq r18,zero,40a6c <__sfvwrite_r+0x2a8>
- 409f0: 40005a26 beq r8,zero,40b5c <__sfvwrite_r+0x398>
- 409f4: 982d883a mov r22,r19
- 409f8: 94c0012e bgeu r18,r19,40a00 <__sfvwrite_r+0x23c>
- 409fc: 902d883a mov r22,r18
- 40a00: 81000017 ldw r4,0(r16)
- 40a04: 80800417 ldw r2,16(r16)
- 40a08: b02f883a mov r23,r22
- 40a0c: 81c00517 ldw r7,20(r16)
- 40a10: 1100032e bgeu r2,r4,40a20 <__sfvwrite_r+0x25c>
- 40a14: 80c00217 ldw r3,8(r16)
- 40a18: 38c7883a add r3,r7,r3
- 40a1c: 1d801816 blt r3,r22,40a80 <__sfvwrite_r+0x2bc>
- 40a20: b1c03e16 blt r22,r7,40b1c <__sfvwrite_r+0x358>
- 40a24: 80800917 ldw r2,36(r16)
- 40a28: 81400717 ldw r5,28(r16)
- 40a2c: e00d883a mov r6,fp
- 40a30: da000115 stw r8,4(sp)
- 40a34: a809883a mov r4,r21
- 40a38: 103ee83a callr r2
- 40a3c: 102f883a mov r23,r2
- 40a40: da000117 ldw r8,4(sp)
- 40a44: 00bfe00e bge zero,r2,409c8 <__sfvwrite_r+0x204>
- 40a48: 9de7c83a sub r19,r19,r23
- 40a4c: 98001f26 beq r19,zero,40acc <__sfvwrite_r+0x308>
- 40a50: a0800217 ldw r2,8(r20)
- 40a54: e5f9883a add fp,fp,r23
- 40a58: 95e5c83a sub r18,r18,r23
- 40a5c: 15efc83a sub r23,r2,r23
- 40a60: a5c00215 stw r23,8(r20)
- 40a64: b83f8426 beq r23,zero,40878 <__sfvwrite_r+0xb4>
- 40a68: 903fe11e bne r18,zero,409f0 <__sfvwrite_r+0x22c>
- 40a6c: 8f000017 ldw fp,0(r17)
- 40a70: 8c800117 ldw r18,4(r17)
- 40a74: 0011883a mov r8,zero
- 40a78: 8c400204 addi r17,r17,8
- 40a7c: 003fdb06 br 409ec <__sfvwrite_r+0x228>
- 40a80: 180d883a mov r6,r3
- 40a84: e00b883a mov r5,fp
- 40a88: da000115 stw r8,4(sp)
- 40a8c: d8c00015 stw r3,0(sp)
- 40a90: 004184c0 call 4184c <memmove>
- 40a94: d8c00017 ldw r3,0(sp)
- 40a98: 80800017 ldw r2,0(r16)
- 40a9c: 800b883a mov r5,r16
- 40aa0: a809883a mov r4,r21
- 40aa4: 10c5883a add r2,r2,r3
- 40aa8: 80800015 stw r2,0(r16)
- 40aac: d8c00015 stw r3,0(sp)
- 40ab0: 00426ec0 call 426ec <_fflush_r>
- 40ab4: d8c00017 ldw r3,0(sp)
- 40ab8: da000117 ldw r8,4(sp)
- 40abc: 103fc21e bne r2,zero,409c8 <__sfvwrite_r+0x204>
- 40ac0: 182f883a mov r23,r3
- 40ac4: 9de7c83a sub r19,r19,r23
- 40ac8: 983fe11e bne r19,zero,40a50 <__sfvwrite_r+0x28c>
- 40acc: 800b883a mov r5,r16
- 40ad0: a809883a mov r4,r21
- 40ad4: 00426ec0 call 426ec <_fflush_r>
- 40ad8: 103fbb1e bne r2,zero,409c8 <__sfvwrite_r+0x204>
- 40adc: 0011883a mov r8,zero
- 40ae0: 003fdb06 br 40a50 <__sfvwrite_r+0x28c>
- 40ae4: 94c0012e bgeu r18,r19,40aec <__sfvwrite_r+0x328>
- 40ae8: 9027883a mov r19,r18
- 40aec: 980d883a mov r6,r19
- 40af0: e00b883a mov r5,fp
- 40af4: 004184c0 call 4184c <memmove>
- 40af8: 80800217 ldw r2,8(r16)
- 40afc: 80c00017 ldw r3,0(r16)
- 40b00: 14c5c83a sub r2,r2,r19
- 40b04: 1cc7883a add r3,r3,r19
- 40b08: 80800215 stw r2,8(r16)
- 40b0c: 80c00015 stw r3,0(r16)
- 40b10: 10004326 beq r2,zero,40c20 <__sfvwrite_r+0x45c>
- 40b14: 9805883a mov r2,r19
- 40b18: 003f8306 br 40928 <__sfvwrite_r+0x164>
- 40b1c: b00d883a mov r6,r22
- 40b20: e00b883a mov r5,fp
- 40b24: da000115 stw r8,4(sp)
- 40b28: 004184c0 call 4184c <memmove>
- 40b2c: 80800217 ldw r2,8(r16)
- 40b30: 80c00017 ldw r3,0(r16)
- 40b34: da000117 ldw r8,4(sp)
- 40b38: 1585c83a sub r2,r2,r22
- 40b3c: 1dad883a add r22,r3,r22
- 40b40: 80800215 stw r2,8(r16)
- 40b44: 85800015 stw r22,0(r16)
- 40b48: 003fbf06 br 40a48 <__sfvwrite_r+0x284>
- 40b4c: 81000017 ldw r4,0(r16)
- 40b50: 9027883a mov r19,r18
- 40b54: 902f883a mov r23,r18
- 40b58: 003f6906 br 40900 <__sfvwrite_r+0x13c>
- 40b5c: 900d883a mov r6,r18
- 40b60: 01400284 movi r5,10
- 40b64: e009883a mov r4,fp
- 40b68: 00416200 call 41620 <memchr>
- 40b6c: 10003e26 beq r2,zero,40c68 <__sfvwrite_r+0x4a4>
- 40b70: 10800044 addi r2,r2,1
- 40b74: 1727c83a sub r19,r2,fp
- 40b78: 02000044 movi r8,1
- 40b7c: 003f9d06 br 409f4 <__sfvwrite_r+0x230>
- 40b80: 80800517 ldw r2,20(r16)
- 40b84: 81400417 ldw r5,16(r16)
- 40b88: 81c00017 ldw r7,0(r16)
- 40b8c: 10a7883a add r19,r2,r2
- 40b90: 9885883a add r2,r19,r2
- 40b94: 1026d7fa srli r19,r2,31
- 40b98: 396dc83a sub r22,r7,r5
- 40b9c: b1000044 addi r4,r22,1
- 40ba0: 9885883a add r2,r19,r2
- 40ba4: 1027d07a srai r19,r2,1
- 40ba8: 2485883a add r2,r4,r18
- 40bac: 980d883a mov r6,r19
- 40bb0: 9880022e bgeu r19,r2,40bbc <__sfvwrite_r+0x3f8>
- 40bb4: 1027883a mov r19,r2
- 40bb8: 100d883a mov r6,r2
- 40bbc: 18c1000c andi r3,r3,1024
- 40bc0: 18001c26 beq r3,zero,40c34 <__sfvwrite_r+0x470>
- 40bc4: 300b883a mov r5,r6
- 40bc8: a809883a mov r4,r21
- 40bcc: 0040e140 call 40e14 <_malloc_r>
- 40bd0: 102f883a mov r23,r2
- 40bd4: 10002926 beq r2,zero,40c7c <__sfvwrite_r+0x4b8>
- 40bd8: 81400417 ldw r5,16(r16)
- 40bdc: b00d883a mov r6,r22
- 40be0: 1009883a mov r4,r2
- 40be4: 00417040 call 41704 <memcpy>
- 40be8: 8080030b ldhu r2,12(r16)
- 40bec: 00fedfc4 movi r3,-1153
- 40bf0: 10c4703a and r2,r2,r3
- 40bf4: 10802014 ori r2,r2,128
- 40bf8: 8080030d sth r2,12(r16)
- 40bfc: bd89883a add r4,r23,r22
- 40c00: 9d8fc83a sub r7,r19,r22
- 40c04: 85c00415 stw r23,16(r16)
- 40c08: 84c00515 stw r19,20(r16)
- 40c0c: 81000015 stw r4,0(r16)
- 40c10: 9027883a mov r19,r18
- 40c14: 81c00215 stw r7,8(r16)
- 40c18: 902f883a mov r23,r18
- 40c1c: 003f3806 br 40900 <__sfvwrite_r+0x13c>
- 40c20: 800b883a mov r5,r16
- 40c24: a809883a mov r4,r21
- 40c28: 00426ec0 call 426ec <_fflush_r>
- 40c2c: 103fb926 beq r2,zero,40b14 <__sfvwrite_r+0x350>
- 40c30: 003f6506 br 409c8 <__sfvwrite_r+0x204>
- 40c34: a809883a mov r4,r21
- 40c38: 0041ad00 call 41ad0 <_realloc_r>
- 40c3c: 102f883a mov r23,r2
- 40c40: 103fee1e bne r2,zero,40bfc <__sfvwrite_r+0x438>
- 40c44: 81400417 ldw r5,16(r16)
- 40c48: a809883a mov r4,r21
- 40c4c: 004289c0 call 4289c <_free_r>
- 40c50: 8080030b ldhu r2,12(r16)
- 40c54: 00ffdfc4 movi r3,-129
- 40c58: 1884703a and r2,r3,r2
- 40c5c: 00c00304 movi r3,12
- 40c60: a8c00015 stw r3,0(r21)
- 40c64: 003f5906 br 409cc <__sfvwrite_r+0x208>
- 40c68: 94c00044 addi r19,r18,1
- 40c6c: 02000044 movi r8,1
- 40c70: 003f6006 br 409f4 <__sfvwrite_r+0x230>
- 40c74: 00bfffc4 movi r2,-1
- 40c78: 003f0006 br 4087c <__sfvwrite_r+0xb8>
- 40c7c: 00800304 movi r2,12
- 40c80: a8800015 stw r2,0(r21)
- 40c84: 8080030b ldhu r2,12(r16)
- 40c88: 003f5006 br 409cc <__sfvwrite_r+0x208>
- 00040c8c <_fwalk>:
- 40c8c: defff704 addi sp,sp,-36
- 40c90: dd000415 stw r20,16(sp)
- 40c94: dfc00815 stw ra,32(sp)
- 40c98: ddc00715 stw r23,28(sp)
- 40c9c: dd800615 stw r22,24(sp)
- 40ca0: dd400515 stw r21,20(sp)
- 40ca4: dcc00315 stw r19,12(sp)
- 40ca8: dc800215 stw r18,8(sp)
- 40cac: dc400115 stw r17,4(sp)
- 40cb0: dc000015 stw r16,0(sp)
- 40cb4: 2500b804 addi r20,r4,736
- 40cb8: a0002326 beq r20,zero,40d48 <_fwalk+0xbc>
- 40cbc: 282b883a mov r21,r5
- 40cc0: 002f883a mov r23,zero
- 40cc4: 05800044 movi r22,1
- 40cc8: 04ffffc4 movi r19,-1
- 40ccc: a4400117 ldw r17,4(r20)
- 40cd0: a4800217 ldw r18,8(r20)
- 40cd4: 8c7fffc4 addi r17,r17,-1
- 40cd8: 88000d16 blt r17,zero,40d10 <_fwalk+0x84>
- 40cdc: 94000304 addi r16,r18,12
- 40ce0: 94800384 addi r18,r18,14
- 40ce4: 8080000b ldhu r2,0(r16)
- 40ce8: 8c7fffc4 addi r17,r17,-1
- 40cec: 813ffd04 addi r4,r16,-12
- 40cf0: b080042e bgeu r22,r2,40d04 <_fwalk+0x78>
- 40cf4: 9080000f ldh r2,0(r18)
- 40cf8: 14c00226 beq r2,r19,40d04 <_fwalk+0x78>
- 40cfc: a83ee83a callr r21
- 40d00: b8aeb03a or r23,r23,r2
- 40d04: 84001a04 addi r16,r16,104
- 40d08: 94801a04 addi r18,r18,104
- 40d0c: 8cfff51e bne r17,r19,40ce4 <_fwalk+0x58>
- 40d10: a5000017 ldw r20,0(r20)
- 40d14: a03fed1e bne r20,zero,40ccc <_fwalk+0x40>
- 40d18: b805883a mov r2,r23
- 40d1c: dfc00817 ldw ra,32(sp)
- 40d20: ddc00717 ldw r23,28(sp)
- 40d24: dd800617 ldw r22,24(sp)
- 40d28: dd400517 ldw r21,20(sp)
- 40d2c: dd000417 ldw r20,16(sp)
- 40d30: dcc00317 ldw r19,12(sp)
- 40d34: dc800217 ldw r18,8(sp)
- 40d38: dc400117 ldw r17,4(sp)
- 40d3c: dc000017 ldw r16,0(sp)
- 40d40: dec00904 addi sp,sp,36
- 40d44: f800283a ret
- 40d48: 002f883a mov r23,zero
- 40d4c: 003ff206 br 40d18 <_fwalk+0x8c>
- 00040d50 <_fwalk_reent>:
- 40d50: defff704 addi sp,sp,-36
- 40d54: dd000415 stw r20,16(sp)
- 40d58: dfc00815 stw ra,32(sp)
- 40d5c: ddc00715 stw r23,28(sp)
- 40d60: dd800615 stw r22,24(sp)
- 40d64: dd400515 stw r21,20(sp)
- 40d68: dcc00315 stw r19,12(sp)
- 40d6c: dc800215 stw r18,8(sp)
- 40d70: dc400115 stw r17,4(sp)
- 40d74: dc000015 stw r16,0(sp)
- 40d78: 2500b804 addi r20,r4,736
- 40d7c: a0002326 beq r20,zero,40e0c <_fwalk_reent+0xbc>
- 40d80: 282b883a mov r21,r5
- 40d84: 2027883a mov r19,r4
- 40d88: 002f883a mov r23,zero
- 40d8c: 05800044 movi r22,1
- 40d90: 04bfffc4 movi r18,-1
- 40d94: a4400117 ldw r17,4(r20)
- 40d98: a4000217 ldw r16,8(r20)
- 40d9c: 8c7fffc4 addi r17,r17,-1
- 40da0: 88000c16 blt r17,zero,40dd4 <_fwalk_reent+0x84>
- 40da4: 84000304 addi r16,r16,12
- 40da8: 8080000b ldhu r2,0(r16)
- 40dac: 8c7fffc4 addi r17,r17,-1
- 40db0: 817ffd04 addi r5,r16,-12
- 40db4: b080052e bgeu r22,r2,40dcc <_fwalk_reent+0x7c>
- 40db8: 8080008f ldh r2,2(r16)
- 40dbc: 9809883a mov r4,r19
- 40dc0: 14800226 beq r2,r18,40dcc <_fwalk_reent+0x7c>
- 40dc4: a83ee83a callr r21
- 40dc8: b8aeb03a or r23,r23,r2
- 40dcc: 84001a04 addi r16,r16,104
- 40dd0: 8cbff51e bne r17,r18,40da8 <_fwalk_reent+0x58>
- 40dd4: a5000017 ldw r20,0(r20)
- 40dd8: a03fee1e bne r20,zero,40d94 <_fwalk_reent+0x44>
- 40ddc: b805883a mov r2,r23
- 40de0: dfc00817 ldw ra,32(sp)
- 40de4: ddc00717 ldw r23,28(sp)
- 40de8: dd800617 ldw r22,24(sp)
- 40dec: dd400517 ldw r21,20(sp)
- 40df0: dd000417 ldw r20,16(sp)
- 40df4: dcc00317 ldw r19,12(sp)
- 40df8: dc800217 ldw r18,8(sp)
- 40dfc: dc400117 ldw r17,4(sp)
- 40e00: dc000017 ldw r16,0(sp)
- 40e04: dec00904 addi sp,sp,36
- 40e08: f800283a ret
- 40e0c: 002f883a mov r23,zero
- 40e10: 003ff206 br 40ddc <_fwalk_reent+0x8c>
- 00040e14 <_malloc_r>:
- 40e14: defff504 addi sp,sp,-44
- 40e18: dc800315 stw r18,12(sp)
- 40e1c: dfc00a15 stw ra,40(sp)
- 40e20: df000915 stw fp,36(sp)
- 40e24: ddc00815 stw r23,32(sp)
- 40e28: dd800715 stw r22,28(sp)
- 40e2c: dd400615 stw r21,24(sp)
- 40e30: dd000515 stw r20,20(sp)
- 40e34: dcc00415 stw r19,16(sp)
- 40e38: dc400215 stw r17,8(sp)
- 40e3c: dc000115 stw r16,4(sp)
- 40e40: 288002c4 addi r2,r5,11
- 40e44: 00c00584 movi r3,22
- 40e48: 2025883a mov r18,r4
- 40e4c: 18807f2e bgeu r3,r2,4104c <_malloc_r+0x238>
- 40e50: 047ffe04 movi r17,-8
- 40e54: 1462703a and r17,r2,r17
- 40e58: 8800a316 blt r17,zero,410e8 <_malloc_r+0x2d4>
- 40e5c: 8940a236 bltu r17,r5,410e8 <_malloc_r+0x2d4>
- 40e60: 00436500 call 43650 <__malloc_lock>
- 40e64: 00807dc4 movi r2,503
- 40e68: 1441e92e bgeu r2,r17,41610 <_malloc_r+0x7fc>
- 40e6c: 8804d27a srli r2,r17,9
- 40e70: 1000a126 beq r2,zero,410f8 <_malloc_r+0x2e4>
- 40e74: 00c00104 movi r3,4
- 40e78: 18811e36 bltu r3,r2,412f4 <_malloc_r+0x4e0>
- 40e7c: 8804d1ba srli r2,r17,6
- 40e80: 12000e44 addi r8,r2,57
- 40e84: 11c00e04 addi r7,r2,56
- 40e88: 4209883a add r4,r8,r8
- 40e8c: 04c00134 movhi r19,4
- 40e90: 2109883a add r4,r4,r4
- 40e94: 9cd6ed04 addi r19,r19,23476
- 40e98: 2109883a add r4,r4,r4
- 40e9c: 9909883a add r4,r19,r4
- 40ea0: 24000117 ldw r16,4(r4)
- 40ea4: 213ffe04 addi r4,r4,-8
- 40ea8: 24009726 beq r4,r16,41108 <_malloc_r+0x2f4>
- 40eac: 80800117 ldw r2,4(r16)
- 40eb0: 01bfff04 movi r6,-4
- 40eb4: 014003c4 movi r5,15
- 40eb8: 1184703a and r2,r2,r6
- 40ebc: 1447c83a sub r3,r2,r17
- 40ec0: 28c00716 blt r5,r3,40ee0 <_malloc_r+0xcc>
- 40ec4: 1800920e bge r3,zero,41110 <_malloc_r+0x2fc>
- 40ec8: 84000317 ldw r16,12(r16)
- 40ecc: 24008e26 beq r4,r16,41108 <_malloc_r+0x2f4>
- 40ed0: 80800117 ldw r2,4(r16)
- 40ed4: 1184703a and r2,r2,r6
- 40ed8: 1447c83a sub r3,r2,r17
- 40edc: 28fff90e bge r5,r3,40ec4 <_malloc_r+0xb0>
- 40ee0: 3809883a mov r4,r7
- 40ee4: 01800134 movhi r6,4
- 40ee8: 9c000417 ldw r16,16(r19)
- 40eec: 3196ed04 addi r6,r6,23476
- 40ef0: 32000204 addi r8,r6,8
- 40ef4: 82013426 beq r16,r8,413c8 <_malloc_r+0x5b4>
- 40ef8: 80c00117 ldw r3,4(r16)
- 40efc: 00bfff04 movi r2,-4
- 40f00: 188e703a and r7,r3,r2
- 40f04: 3c45c83a sub r2,r7,r17
- 40f08: 00c003c4 movi r3,15
- 40f0c: 18811f16 blt r3,r2,4138c <_malloc_r+0x578>
- 40f10: 32000515 stw r8,20(r6)
- 40f14: 32000415 stw r8,16(r6)
- 40f18: 10007f0e bge r2,zero,41118 <_malloc_r+0x304>
- 40f1c: 00807fc4 movi r2,511
- 40f20: 11c0fd36 bltu r2,r7,41318 <_malloc_r+0x504>
- 40f24: 3806d0fa srli r3,r7,3
- 40f28: 01c00044 movi r7,1
- 40f2c: 30800117 ldw r2,4(r6)
- 40f30: 19400044 addi r5,r3,1
- 40f34: 294b883a add r5,r5,r5
- 40f38: 1807d0ba srai r3,r3,2
- 40f3c: 294b883a add r5,r5,r5
- 40f40: 294b883a add r5,r5,r5
- 40f44: 298b883a add r5,r5,r6
- 40f48: 38c6983a sll r3,r7,r3
- 40f4c: 29c00017 ldw r7,0(r5)
- 40f50: 2a7ffe04 addi r9,r5,-8
- 40f54: 1886b03a or r3,r3,r2
- 40f58: 82400315 stw r9,12(r16)
- 40f5c: 81c00215 stw r7,8(r16)
- 40f60: 30c00115 stw r3,4(r6)
- 40f64: 2c000015 stw r16,0(r5)
- 40f68: 3c000315 stw r16,12(r7)
- 40f6c: 2005d0ba srai r2,r4,2
- 40f70: 01400044 movi r5,1
- 40f74: 288a983a sll r5,r5,r2
- 40f78: 19406f36 bltu r3,r5,41138 <_malloc_r+0x324>
- 40f7c: 28c4703a and r2,r5,r3
- 40f80: 10000a1e bne r2,zero,40fac <_malloc_r+0x198>
- 40f84: 00bfff04 movi r2,-4
- 40f88: 294b883a add r5,r5,r5
- 40f8c: 2088703a and r4,r4,r2
- 40f90: 28c4703a and r2,r5,r3
- 40f94: 21000104 addi r4,r4,4
- 40f98: 1000041e bne r2,zero,40fac <_malloc_r+0x198>
- 40f9c: 294b883a add r5,r5,r5
- 40fa0: 28c4703a and r2,r5,r3
- 40fa4: 21000104 addi r4,r4,4
- 40fa8: 103ffc26 beq r2,zero,40f9c <_malloc_r+0x188>
- 40fac: 02bfff04 movi r10,-4
- 40fb0: 024003c4 movi r9,15
- 40fb4: 21800044 addi r6,r4,1
- 40fb8: 318d883a add r6,r6,r6
- 40fbc: 318d883a add r6,r6,r6
- 40fc0: 318d883a add r6,r6,r6
- 40fc4: 998d883a add r6,r19,r6
- 40fc8: 333ffe04 addi r12,r6,-8
- 40fcc: 2017883a mov r11,r4
- 40fd0: 31800104 addi r6,r6,4
- 40fd4: 34000017 ldw r16,0(r6)
- 40fd8: 31fffd04 addi r7,r6,-12
- 40fdc: 81c0041e bne r16,r7,40ff0 <_malloc_r+0x1dc>
- 40fe0: 0000fb06 br 413d0 <_malloc_r+0x5bc>
- 40fe4: 1801030e bge r3,zero,413f4 <_malloc_r+0x5e0>
- 40fe8: 84000317 ldw r16,12(r16)
- 40fec: 81c0f826 beq r16,r7,413d0 <_malloc_r+0x5bc>
- 40ff0: 80800117 ldw r2,4(r16)
- 40ff4: 1284703a and r2,r2,r10
- 40ff8: 1447c83a sub r3,r2,r17
- 40ffc: 48fff90e bge r9,r3,40fe4 <_malloc_r+0x1d0>
- 41000: 80800317 ldw r2,12(r16)
- 41004: 81000217 ldw r4,8(r16)
- 41008: 89400054 ori r5,r17,1
- 4100c: 81400115 stw r5,4(r16)
- 41010: 20800315 stw r2,12(r4)
- 41014: 11000215 stw r4,8(r2)
- 41018: 8463883a add r17,r16,r17
- 4101c: 9c400515 stw r17,20(r19)
- 41020: 9c400415 stw r17,16(r19)
- 41024: 18800054 ori r2,r3,1
- 41028: 88800115 stw r2,4(r17)
- 4102c: 8a000315 stw r8,12(r17)
- 41030: 8a000215 stw r8,8(r17)
- 41034: 88e3883a add r17,r17,r3
- 41038: 88c00015 stw r3,0(r17)
- 4103c: 9009883a mov r4,r18
- 41040: 00436740 call 43674 <__malloc_unlock>
- 41044: 80800204 addi r2,r16,8
- 41048: 00001b06 br 410b8 <_malloc_r+0x2a4>
- 4104c: 04400404 movi r17,16
- 41050: 89402536 bltu r17,r5,410e8 <_malloc_r+0x2d4>
- 41054: 00436500 call 43650 <__malloc_lock>
- 41058: 00800184 movi r2,6
- 4105c: 01000084 movi r4,2
- 41060: 04c00134 movhi r19,4
- 41064: 1085883a add r2,r2,r2
- 41068: 9cd6ed04 addi r19,r19,23476
- 4106c: 1085883a add r2,r2,r2
- 41070: 9885883a add r2,r19,r2
- 41074: 14000117 ldw r16,4(r2)
- 41078: 10fffe04 addi r3,r2,-8
- 4107c: 80c0d926 beq r16,r3,413e4 <_malloc_r+0x5d0>
- 41080: 80c00117 ldw r3,4(r16)
- 41084: 81000317 ldw r4,12(r16)
- 41088: 00bfff04 movi r2,-4
- 4108c: 1884703a and r2,r3,r2
- 41090: 81400217 ldw r5,8(r16)
- 41094: 8085883a add r2,r16,r2
- 41098: 10c00117 ldw r3,4(r2)
- 4109c: 29000315 stw r4,12(r5)
- 410a0: 21400215 stw r5,8(r4)
- 410a4: 18c00054 ori r3,r3,1
- 410a8: 10c00115 stw r3,4(r2)
- 410ac: 9009883a mov r4,r18
- 410b0: 00436740 call 43674 <__malloc_unlock>
- 410b4: 80800204 addi r2,r16,8
- 410b8: dfc00a17 ldw ra,40(sp)
- 410bc: df000917 ldw fp,36(sp)
- 410c0: ddc00817 ldw r23,32(sp)
- 410c4: dd800717 ldw r22,28(sp)
- 410c8: dd400617 ldw r21,24(sp)
- 410cc: dd000517 ldw r20,20(sp)
- 410d0: dcc00417 ldw r19,16(sp)
- 410d4: dc800317 ldw r18,12(sp)
- 410d8: dc400217 ldw r17,8(sp)
- 410dc: dc000117 ldw r16,4(sp)
- 410e0: dec00b04 addi sp,sp,44
- 410e4: f800283a ret
- 410e8: 00800304 movi r2,12
- 410ec: 90800015 stw r2,0(r18)
- 410f0: 0005883a mov r2,zero
- 410f4: 003ff006 br 410b8 <_malloc_r+0x2a4>
- 410f8: 01002004 movi r4,128
- 410fc: 02001004 movi r8,64
- 41100: 01c00fc4 movi r7,63
- 41104: 003f6106 br 40e8c <_malloc_r+0x78>
- 41108: 4009883a mov r4,r8
- 4110c: 003f7506 br 40ee4 <_malloc_r+0xd0>
- 41110: 81000317 ldw r4,12(r16)
- 41114: 003fde06 br 41090 <_malloc_r+0x27c>
- 41118: 81c5883a add r2,r16,r7
- 4111c: 11400117 ldw r5,4(r2)
- 41120: 9009883a mov r4,r18
- 41124: 29400054 ori r5,r5,1
- 41128: 11400115 stw r5,4(r2)
- 4112c: 00436740 call 43674 <__malloc_unlock>
- 41130: 80800204 addi r2,r16,8
- 41134: 003fe006 br 410b8 <_malloc_r+0x2a4>
- 41138: 9c000217 ldw r16,8(r19)
- 4113c: 00bfff04 movi r2,-4
- 41140: 85800117 ldw r22,4(r16)
- 41144: b0ac703a and r22,r22,r2
- 41148: b4400336 bltu r22,r17,41158 <_malloc_r+0x344>
- 4114c: b445c83a sub r2,r22,r17
- 41150: 00c003c4 movi r3,15
- 41154: 18805d16 blt r3,r2,412cc <_malloc_r+0x4b8>
- 41158: 05c00134 movhi r23,4
- 4115c: 00800174 movhi r2,5
- 41160: 10a31c04 addi r2,r2,-29584
- 41164: bddc7304 addi r23,r23,29132
- 41168: 15400017 ldw r21,0(r2)
- 4116c: b8c00017 ldw r3,0(r23)
- 41170: 00bfffc4 movi r2,-1
- 41174: 858d883a add r6,r16,r22
- 41178: 8d6b883a add r21,r17,r21
- 4117c: 1880ea26 beq r3,r2,41528 <_malloc_r+0x714>
- 41180: ad4403c4 addi r21,r21,4111
- 41184: 00bc0004 movi r2,-4096
- 41188: a8aa703a and r21,r21,r2
- 4118c: a80b883a mov r5,r21
- 41190: 9009883a mov r4,r18
- 41194: d9800015 stw r6,0(sp)
- 41198: 00420340 call 42034 <_sbrk_r>
- 4119c: 1029883a mov r20,r2
- 411a0: 00bfffc4 movi r2,-1
- 411a4: d9800017 ldw r6,0(sp)
- 411a8: a080e826 beq r20,r2,4154c <_malloc_r+0x738>
- 411ac: a180a636 bltu r20,r6,41448 <_malloc_r+0x634>
- 411b0: 07000174 movhi fp,5
- 411b4: e7232504 addi fp,fp,-29548
- 411b8: e0800017 ldw r2,0(fp)
- 411bc: a887883a add r3,r21,r2
- 411c0: e0c00015 stw r3,0(fp)
- 411c4: 3500e626 beq r6,r20,41560 <_malloc_r+0x74c>
- 411c8: b9000017 ldw r4,0(r23)
- 411cc: 00bfffc4 movi r2,-1
- 411d0: 2080ee26 beq r4,r2,4158c <_malloc_r+0x778>
- 411d4: a185c83a sub r2,r20,r6
- 411d8: 10c5883a add r2,r2,r3
- 411dc: e0800015 stw r2,0(fp)
- 411e0: a0c001cc andi r3,r20,7
- 411e4: 1800bc26 beq r3,zero,414d8 <_malloc_r+0x6c4>
- 411e8: a0e9c83a sub r20,r20,r3
- 411ec: 00840204 movi r2,4104
- 411f0: a5000204 addi r20,r20,8
- 411f4: 10c7c83a sub r3,r2,r3
- 411f8: a545883a add r2,r20,r21
- 411fc: 1083ffcc andi r2,r2,4095
- 41200: 18abc83a sub r21,r3,r2
- 41204: a80b883a mov r5,r21
- 41208: 9009883a mov r4,r18
- 4120c: 00420340 call 42034 <_sbrk_r>
- 41210: 00ffffc4 movi r3,-1
- 41214: 10c0e126 beq r2,r3,4159c <_malloc_r+0x788>
- 41218: 1505c83a sub r2,r2,r20
- 4121c: 1545883a add r2,r2,r21
- 41220: 10800054 ori r2,r2,1
- 41224: e0c00017 ldw r3,0(fp)
- 41228: 9d000215 stw r20,8(r19)
- 4122c: a0800115 stw r2,4(r20)
- 41230: a8c7883a add r3,r21,r3
- 41234: e0c00015 stw r3,0(fp)
- 41238: 84c00e26 beq r16,r19,41274 <_malloc_r+0x460>
- 4123c: 018003c4 movi r6,15
- 41240: 3580a72e bgeu r6,r22,414e0 <_malloc_r+0x6cc>
- 41244: 81400117 ldw r5,4(r16)
- 41248: 013ffe04 movi r4,-8
- 4124c: b0bffd04 addi r2,r22,-12
- 41250: 1104703a and r2,r2,r4
- 41254: 2900004c andi r4,r5,1
- 41258: 2088b03a or r4,r4,r2
- 4125c: 81000115 stw r4,4(r16)
- 41260: 01400144 movi r5,5
- 41264: 8089883a add r4,r16,r2
- 41268: 21400115 stw r5,4(r4)
- 4126c: 21400215 stw r5,8(r4)
- 41270: 3080cd36 bltu r6,r2,415a8 <_malloc_r+0x794>
- 41274: 00800174 movhi r2,5
- 41278: 10a31b04 addi r2,r2,-29588
- 4127c: 11000017 ldw r4,0(r2)
- 41280: 20c0012e bgeu r4,r3,41288 <_malloc_r+0x474>
- 41284: 10c00015 stw r3,0(r2)
- 41288: 00800174 movhi r2,5
- 4128c: 10a31a04 addi r2,r2,-29592
- 41290: 11000017 ldw r4,0(r2)
- 41294: 9c000217 ldw r16,8(r19)
- 41298: 20c0012e bgeu r4,r3,412a0 <_malloc_r+0x48c>
- 4129c: 10c00015 stw r3,0(r2)
- 412a0: 80c00117 ldw r3,4(r16)
- 412a4: 00bfff04 movi r2,-4
- 412a8: 1886703a and r3,r3,r2
- 412ac: 1c45c83a sub r2,r3,r17
- 412b0: 1c400236 bltu r3,r17,412bc <_malloc_r+0x4a8>
- 412b4: 00c003c4 movi r3,15
- 412b8: 18800416 blt r3,r2,412cc <_malloc_r+0x4b8>
- 412bc: 9009883a mov r4,r18
- 412c0: 00436740 call 43674 <__malloc_unlock>
- 412c4: 0005883a mov r2,zero
- 412c8: 003f7b06 br 410b8 <_malloc_r+0x2a4>
- 412cc: 88c00054 ori r3,r17,1
- 412d0: 80c00115 stw r3,4(r16)
- 412d4: 8463883a add r17,r16,r17
- 412d8: 10800054 ori r2,r2,1
- 412dc: 9c400215 stw r17,8(r19)
- 412e0: 88800115 stw r2,4(r17)
- 412e4: 9009883a mov r4,r18
- 412e8: 00436740 call 43674 <__malloc_unlock>
- 412ec: 80800204 addi r2,r16,8
- 412f0: 003f7106 br 410b8 <_malloc_r+0x2a4>
- 412f4: 00c00504 movi r3,20
- 412f8: 18804a2e bgeu r3,r2,41424 <_malloc_r+0x610>
- 412fc: 00c01504 movi r3,84
- 41300: 18806e36 bltu r3,r2,414bc <_malloc_r+0x6a8>
- 41304: 8804d33a srli r2,r17,12
- 41308: 12001bc4 addi r8,r2,111
- 4130c: 11c01b84 addi r7,r2,110
- 41310: 4209883a add r4,r8,r8
- 41314: 003edd06 br 40e8c <_malloc_r+0x78>
- 41318: 3804d27a srli r2,r7,9
- 4131c: 00c00104 movi r3,4
- 41320: 1880442e bgeu r3,r2,41434 <_malloc_r+0x620>
- 41324: 00c00504 movi r3,20
- 41328: 18808136 bltu r3,r2,41530 <_malloc_r+0x71c>
- 4132c: 11401704 addi r5,r2,92
- 41330: 10c016c4 addi r3,r2,91
- 41334: 294b883a add r5,r5,r5
- 41338: 294b883a add r5,r5,r5
- 4133c: 294b883a add r5,r5,r5
- 41340: 994b883a add r5,r19,r5
- 41344: 28800017 ldw r2,0(r5)
- 41348: 01800134 movhi r6,4
- 4134c: 297ffe04 addi r5,r5,-8
- 41350: 3196ed04 addi r6,r6,23476
- 41354: 28806526 beq r5,r2,414ec <_malloc_r+0x6d8>
- 41358: 01bfff04 movi r6,-4
- 4135c: 10c00117 ldw r3,4(r2)
- 41360: 1986703a and r3,r3,r6
- 41364: 38c0022e bgeu r7,r3,41370 <_malloc_r+0x55c>
- 41368: 10800217 ldw r2,8(r2)
- 4136c: 28bffb1e bne r5,r2,4135c <_malloc_r+0x548>
- 41370: 11400317 ldw r5,12(r2)
- 41374: 98c00117 ldw r3,4(r19)
- 41378: 81400315 stw r5,12(r16)
- 4137c: 80800215 stw r2,8(r16)
- 41380: 2c000215 stw r16,8(r5)
- 41384: 14000315 stw r16,12(r2)
- 41388: 003ef806 br 40f6c <_malloc_r+0x158>
- 4138c: 88c00054 ori r3,r17,1
- 41390: 80c00115 stw r3,4(r16)
- 41394: 8463883a add r17,r16,r17
- 41398: 34400515 stw r17,20(r6)
- 4139c: 34400415 stw r17,16(r6)
- 413a0: 10c00054 ori r3,r2,1
- 413a4: 8a000315 stw r8,12(r17)
- 413a8: 8a000215 stw r8,8(r17)
- 413ac: 88c00115 stw r3,4(r17)
- 413b0: 88a3883a add r17,r17,r2
- 413b4: 88800015 stw r2,0(r17)
- 413b8: 9009883a mov r4,r18
- 413bc: 00436740 call 43674 <__malloc_unlock>
- 413c0: 80800204 addi r2,r16,8
- 413c4: 003f3c06 br 410b8 <_malloc_r+0x2a4>
- 413c8: 30c00117 ldw r3,4(r6)
- 413cc: 003ee706 br 40f6c <_malloc_r+0x158>
- 413d0: 5ac00044 addi r11,r11,1
- 413d4: 588000cc andi r2,r11,3
- 413d8: 31800204 addi r6,r6,8
- 413dc: 103efd1e bne r2,zero,40fd4 <_malloc_r+0x1c0>
- 413e0: 00002406 br 41474 <_malloc_r+0x660>
- 413e4: 14000317 ldw r16,12(r2)
- 413e8: 143f251e bne r2,r16,41080 <_malloc_r+0x26c>
- 413ec: 21000084 addi r4,r4,2
- 413f0: 003ebc06 br 40ee4 <_malloc_r+0xd0>
- 413f4: 8085883a add r2,r16,r2
- 413f8: 10c00117 ldw r3,4(r2)
- 413fc: 81000317 ldw r4,12(r16)
- 41400: 81400217 ldw r5,8(r16)
- 41404: 18c00054 ori r3,r3,1
- 41408: 10c00115 stw r3,4(r2)
- 4140c: 29000315 stw r4,12(r5)
- 41410: 21400215 stw r5,8(r4)
- 41414: 9009883a mov r4,r18
- 41418: 00436740 call 43674 <__malloc_unlock>
- 4141c: 80800204 addi r2,r16,8
- 41420: 003f2506 br 410b8 <_malloc_r+0x2a4>
- 41424: 12001704 addi r8,r2,92
- 41428: 11c016c4 addi r7,r2,91
- 4142c: 4209883a add r4,r8,r8
- 41430: 003e9606 br 40e8c <_malloc_r+0x78>
- 41434: 3804d1ba srli r2,r7,6
- 41438: 11400e44 addi r5,r2,57
- 4143c: 10c00e04 addi r3,r2,56
- 41440: 294b883a add r5,r5,r5
- 41444: 003fbc06 br 41338 <_malloc_r+0x524>
- 41448: 84ff5926 beq r16,r19,411b0 <_malloc_r+0x39c>
- 4144c: 00800134 movhi r2,4
- 41450: 1096ed04 addi r2,r2,23476
- 41454: 14000217 ldw r16,8(r2)
- 41458: 00bfff04 movi r2,-4
- 4145c: 80c00117 ldw r3,4(r16)
- 41460: 1886703a and r3,r3,r2
- 41464: 003f9106 br 412ac <_malloc_r+0x498>
- 41468: 60800217 ldw r2,8(r12)
- 4146c: 213fffc4 addi r4,r4,-1
- 41470: 1300651e bne r2,r12,41608 <_malloc_r+0x7f4>
- 41474: 208000cc andi r2,r4,3
- 41478: 633ffe04 addi r12,r12,-8
- 4147c: 103ffa1e bne r2,zero,41468 <_malloc_r+0x654>
- 41480: 98800117 ldw r2,4(r19)
- 41484: 0146303a nor r3,zero,r5
- 41488: 1884703a and r2,r3,r2
- 4148c: 98800115 stw r2,4(r19)
- 41490: 294b883a add r5,r5,r5
- 41494: 117f2836 bltu r2,r5,41138 <_malloc_r+0x324>
- 41498: 283f2726 beq r5,zero,41138 <_malloc_r+0x324>
- 4149c: 2886703a and r3,r5,r2
- 414a0: 5809883a mov r4,r11
- 414a4: 183ec31e bne r3,zero,40fb4 <_malloc_r+0x1a0>
- 414a8: 294b883a add r5,r5,r5
- 414ac: 2886703a and r3,r5,r2
- 414b0: 21000104 addi r4,r4,4
- 414b4: 183ffc26 beq r3,zero,414a8 <_malloc_r+0x694>
- 414b8: 003ebe06 br 40fb4 <_malloc_r+0x1a0>
- 414bc: 00c05504 movi r3,340
- 414c0: 18801236 bltu r3,r2,4150c <_malloc_r+0x6f8>
- 414c4: 8804d3fa srli r2,r17,15
- 414c8: 12001e04 addi r8,r2,120
- 414cc: 11c01dc4 addi r7,r2,119
- 414d0: 4209883a add r4,r8,r8
- 414d4: 003e6d06 br 40e8c <_malloc_r+0x78>
- 414d8: 00c40004 movi r3,4096
- 414dc: 003f4606 br 411f8 <_malloc_r+0x3e4>
- 414e0: 00800044 movi r2,1
- 414e4: a0800115 stw r2,4(r20)
- 414e8: 003f7406 br 412bc <_malloc_r+0x4a8>
- 414ec: 1805d0ba srai r2,r3,2
- 414f0: 01c00044 movi r7,1
- 414f4: 30c00117 ldw r3,4(r6)
- 414f8: 388e983a sll r7,r7,r2
- 414fc: 2805883a mov r2,r5
- 41500: 38c6b03a or r3,r7,r3
- 41504: 30c00115 stw r3,4(r6)
- 41508: 003f9b06 br 41378 <_malloc_r+0x564>
- 4150c: 00c15504 movi r3,1364
- 41510: 18801a36 bltu r3,r2,4157c <_malloc_r+0x768>
- 41514: 8804d4ba srli r2,r17,18
- 41518: 12001f44 addi r8,r2,125
- 4151c: 11c01f04 addi r7,r2,124
- 41520: 4209883a add r4,r8,r8
- 41524: 003e5906 br 40e8c <_malloc_r+0x78>
- 41528: ad400404 addi r21,r21,16
- 4152c: 003f1706 br 4118c <_malloc_r+0x378>
- 41530: 00c01504 movi r3,84
- 41534: 18802336 bltu r3,r2,415c4 <_malloc_r+0x7b0>
- 41538: 3804d33a srli r2,r7,12
- 4153c: 11401bc4 addi r5,r2,111
- 41540: 10c01b84 addi r3,r2,110
- 41544: 294b883a add r5,r5,r5
- 41548: 003f7b06 br 41338 <_malloc_r+0x524>
- 4154c: 9c000217 ldw r16,8(r19)
- 41550: 00bfff04 movi r2,-4
- 41554: 80c00117 ldw r3,4(r16)
- 41558: 1886703a and r3,r3,r2
- 4155c: 003f5306 br 412ac <_malloc_r+0x498>
- 41560: 3083ffcc andi r2,r6,4095
- 41564: 103f181e bne r2,zero,411c8 <_malloc_r+0x3b4>
- 41568: 99000217 ldw r4,8(r19)
- 4156c: b545883a add r2,r22,r21
- 41570: 10800054 ori r2,r2,1
- 41574: 20800115 stw r2,4(r4)
- 41578: 003f3e06 br 41274 <_malloc_r+0x460>
- 4157c: 01003f84 movi r4,254
- 41580: 02001fc4 movi r8,127
- 41584: 01c01f84 movi r7,126
- 41588: 003e4006 br 40e8c <_malloc_r+0x78>
- 4158c: 00800134 movhi r2,4
- 41590: 109c7304 addi r2,r2,29132
- 41594: 15000015 stw r20,0(r2)
- 41598: 003f1106 br 411e0 <_malloc_r+0x3cc>
- 4159c: 00800044 movi r2,1
- 415a0: 002b883a mov r21,zero
- 415a4: 003f1f06 br 41224 <_malloc_r+0x410>
- 415a8: 81400204 addi r5,r16,8
- 415ac: 9009883a mov r4,r18
- 415b0: 004289c0 call 4289c <_free_r>
- 415b4: 00800174 movhi r2,5
- 415b8: 10a32504 addi r2,r2,-29548
- 415bc: 10c00017 ldw r3,0(r2)
- 415c0: 003f2c06 br 41274 <_malloc_r+0x460>
- 415c4: 00c05504 movi r3,340
- 415c8: 18800536 bltu r3,r2,415e0 <_malloc_r+0x7cc>
- 415cc: 3804d3fa srli r2,r7,15
- 415d0: 11401e04 addi r5,r2,120
- 415d4: 10c01dc4 addi r3,r2,119
- 415d8: 294b883a add r5,r5,r5
- 415dc: 003f5606 br 41338 <_malloc_r+0x524>
- 415e0: 00c15504 movi r3,1364
- 415e4: 18800536 bltu r3,r2,415fc <_malloc_r+0x7e8>
- 415e8: 3804d4ba srli r2,r7,18
- 415ec: 11401f44 addi r5,r2,125
- 415f0: 10c01f04 addi r3,r2,124
- 415f4: 294b883a add r5,r5,r5
- 415f8: 003f4f06 br 41338 <_malloc_r+0x524>
- 415fc: 01403f84 movi r5,254
- 41600: 00c01f84 movi r3,126
- 41604: 003f4c06 br 41338 <_malloc_r+0x524>
- 41608: 98800117 ldw r2,4(r19)
- 4160c: 003fa006 br 41490 <_malloc_r+0x67c>
- 41610: 8808d0fa srli r4,r17,3
- 41614: 20800044 addi r2,r4,1
- 41618: 1085883a add r2,r2,r2
- 4161c: 003e9006 br 41060 <_malloc_r+0x24c>
- 00041620 <memchr>:
- 41620: 208000cc andi r2,r4,3
- 41624: 280f883a mov r7,r5
- 41628: 10003426 beq r2,zero,416fc <memchr+0xdc>
- 4162c: 30bfffc4 addi r2,r6,-1
- 41630: 30001a26 beq r6,zero,4169c <memchr+0x7c>
- 41634: 20c00003 ldbu r3,0(r4)
- 41638: 29803fcc andi r6,r5,255
- 4163c: 30c0051e bne r6,r3,41654 <memchr+0x34>
- 41640: 00001806 br 416a4 <memchr+0x84>
- 41644: 10001526 beq r2,zero,4169c <memchr+0x7c>
- 41648: 20c00003 ldbu r3,0(r4)
- 4164c: 10bfffc4 addi r2,r2,-1
- 41650: 30c01426 beq r6,r3,416a4 <memchr+0x84>
- 41654: 21000044 addi r4,r4,1
- 41658: 20c000cc andi r3,r4,3
- 4165c: 183ff91e bne r3,zero,41644 <memchr+0x24>
- 41660: 020000c4 movi r8,3
- 41664: 40801136 bltu r8,r2,416ac <memchr+0x8c>
- 41668: 10000c26 beq r2,zero,4169c <memchr+0x7c>
- 4166c: 20c00003 ldbu r3,0(r4)
- 41670: 29403fcc andi r5,r5,255
- 41674: 28c00b26 beq r5,r3,416a4 <memchr+0x84>
- 41678: 20c00044 addi r3,r4,1
- 4167c: 39803fcc andi r6,r7,255
- 41680: 2089883a add r4,r4,r2
- 41684: 00000306 br 41694 <memchr+0x74>
- 41688: 18c00044 addi r3,r3,1
- 4168c: 197fffc3 ldbu r5,-1(r3)
- 41690: 31400526 beq r6,r5,416a8 <memchr+0x88>
- 41694: 1805883a mov r2,r3
- 41698: 20fffb1e bne r4,r3,41688 <memchr+0x68>
- 4169c: 0005883a mov r2,zero
- 416a0: f800283a ret
- 416a4: 2005883a mov r2,r4
- 416a8: f800283a ret
- 416ac: 28c03fcc andi r3,r5,255
- 416b0: 1812923a slli r9,r3,8
- 416b4: 02ffbff4 movhi r11,65279
- 416b8: 02a02074 movhi r10,32897
- 416bc: 48d2b03a or r9,r9,r3
- 416c0: 4806943a slli r3,r9,16
- 416c4: 5affbfc4 addi r11,r11,-257
- 416c8: 52a02004 addi r10,r10,-32640
- 416cc: 48d2b03a or r9,r9,r3
- 416d0: 20c00017 ldw r3,0(r4)
- 416d4: 48c6f03a xor r3,r9,r3
- 416d8: 1acd883a add r6,r3,r11
- 416dc: 00c6303a nor r3,zero,r3
- 416e0: 30c6703a and r3,r6,r3
- 416e4: 1a86703a and r3,r3,r10
- 416e8: 183fe01e bne r3,zero,4166c <memchr+0x4c>
- 416ec: 10bfff04 addi r2,r2,-4
- 416f0: 21000104 addi r4,r4,4
- 416f4: 40bff636 bltu r8,r2,416d0 <memchr+0xb0>
- 416f8: 003fdb06 br 41668 <memchr+0x48>
- 416fc: 3005883a mov r2,r6
- 41700: 003fd706 br 41660 <memchr+0x40>
- 00041704 <memcpy>:
- 41704: defffd04 addi sp,sp,-12
- 41708: dfc00215 stw ra,8(sp)
- 4170c: dc400115 stw r17,4(sp)
- 41710: dc000015 stw r16,0(sp)
- 41714: 00c003c4 movi r3,15
- 41718: 2005883a mov r2,r4
- 4171c: 1980452e bgeu r3,r6,41834 <memcpy+0x130>
- 41720: 2906b03a or r3,r5,r4
- 41724: 18c000cc andi r3,r3,3
- 41728: 1800441e bne r3,zero,4183c <memcpy+0x138>
- 4172c: 347ffc04 addi r17,r6,-16
- 41730: 8822d13a srli r17,r17,4
- 41734: 28c00104 addi r3,r5,4
- 41738: 23400104 addi r13,r4,4
- 4173c: 8820913a slli r16,r17,4
- 41740: 2b000204 addi r12,r5,8
- 41744: 22c00204 addi r11,r4,8
- 41748: 84000504 addi r16,r16,20
- 4174c: 2a800304 addi r10,r5,12
- 41750: 22400304 addi r9,r4,12
- 41754: 2c21883a add r16,r5,r16
- 41758: 2811883a mov r8,r5
- 4175c: 200f883a mov r7,r4
- 41760: 41000017 ldw r4,0(r8)
- 41764: 1fc00017 ldw ra,0(r3)
- 41768: 63c00017 ldw r15,0(r12)
- 4176c: 39000015 stw r4,0(r7)
- 41770: 53800017 ldw r14,0(r10)
- 41774: 6fc00015 stw ra,0(r13)
- 41778: 5bc00015 stw r15,0(r11)
- 4177c: 4b800015 stw r14,0(r9)
- 41780: 18c00404 addi r3,r3,16
- 41784: 39c00404 addi r7,r7,16
- 41788: 42000404 addi r8,r8,16
- 4178c: 6b400404 addi r13,r13,16
- 41790: 63000404 addi r12,r12,16
- 41794: 5ac00404 addi r11,r11,16
- 41798: 52800404 addi r10,r10,16
- 4179c: 4a400404 addi r9,r9,16
- 417a0: 1c3fef1e bne r3,r16,41760 <memcpy+0x5c>
- 417a4: 89c00044 addi r7,r17,1
- 417a8: 380e913a slli r7,r7,4
- 417ac: 310003cc andi r4,r6,15
- 417b0: 02c000c4 movi r11,3
- 417b4: 11c7883a add r3,r2,r7
- 417b8: 29cb883a add r5,r5,r7
- 417bc: 5900212e bgeu r11,r4,41844 <memcpy+0x140>
- 417c0: 1813883a mov r9,r3
- 417c4: 2811883a mov r8,r5
- 417c8: 200f883a mov r7,r4
- 417cc: 42800017 ldw r10,0(r8)
- 417d0: 4a400104 addi r9,r9,4
- 417d4: 39ffff04 addi r7,r7,-4
- 417d8: 4abfff15 stw r10,-4(r9)
- 417dc: 42000104 addi r8,r8,4
- 417e0: 59fffa36 bltu r11,r7,417cc <memcpy+0xc8>
- 417e4: 213fff04 addi r4,r4,-4
- 417e8: 2008d0ba srli r4,r4,2
- 417ec: 318000cc andi r6,r6,3
- 417f0: 21000044 addi r4,r4,1
- 417f4: 2109883a add r4,r4,r4
- 417f8: 2109883a add r4,r4,r4
- 417fc: 1907883a add r3,r3,r4
- 41800: 290b883a add r5,r5,r4
- 41804: 30000626 beq r6,zero,41820 <memcpy+0x11c>
- 41808: 198d883a add r6,r3,r6
- 4180c: 29c00003 ldbu r7,0(r5)
- 41810: 18c00044 addi r3,r3,1
- 41814: 29400044 addi r5,r5,1
- 41818: 19ffffc5 stb r7,-1(r3)
- 4181c: 19bffb1e bne r3,r6,4180c <memcpy+0x108>
- 41820: dfc00217 ldw ra,8(sp)
- 41824: dc400117 ldw r17,4(sp)
- 41828: dc000017 ldw r16,0(sp)
- 4182c: dec00304 addi sp,sp,12
- 41830: f800283a ret
- 41834: 2007883a mov r3,r4
- 41838: 003ff206 br 41804 <memcpy+0x100>
- 4183c: 2007883a mov r3,r4
- 41840: 003ff106 br 41808 <memcpy+0x104>
- 41844: 200d883a mov r6,r4
- 41848: 003fee06 br 41804 <memcpy+0x100>
- 0004184c <memmove>:
- 4184c: 2005883a mov r2,r4
- 41850: 29000b2e bgeu r5,r4,41880 <memmove+0x34>
- 41854: 298f883a add r7,r5,r6
- 41858: 21c0092e bgeu r4,r7,41880 <memmove+0x34>
- 4185c: 2187883a add r3,r4,r6
- 41860: 198bc83a sub r5,r3,r6
- 41864: 30004826 beq r6,zero,41988 <memmove+0x13c>
- 41868: 39ffffc4 addi r7,r7,-1
- 4186c: 39000003 ldbu r4,0(r7)
- 41870: 18ffffc4 addi r3,r3,-1
- 41874: 19000005 stb r4,0(r3)
- 41878: 28fffb1e bne r5,r3,41868 <memmove+0x1c>
- 4187c: f800283a ret
- 41880: 00c003c4 movi r3,15
- 41884: 1980412e bgeu r3,r6,4198c <memmove+0x140>
- 41888: 2886b03a or r3,r5,r2
- 4188c: 18c000cc andi r3,r3,3
- 41890: 1800401e bne r3,zero,41994 <memmove+0x148>
- 41894: 33fffc04 addi r15,r6,-16
- 41898: 781ed13a srli r15,r15,4
- 4189c: 28c00104 addi r3,r5,4
- 418a0: 13400104 addi r13,r2,4
- 418a4: 781c913a slli r14,r15,4
- 418a8: 2b000204 addi r12,r5,8
- 418ac: 12c00204 addi r11,r2,8
- 418b0: 73800504 addi r14,r14,20
- 418b4: 2a800304 addi r10,r5,12
- 418b8: 12400304 addi r9,r2,12
- 418bc: 2b9d883a add r14,r5,r14
- 418c0: 2811883a mov r8,r5
- 418c4: 100f883a mov r7,r2
- 418c8: 41000017 ldw r4,0(r8)
- 418cc: 39c00404 addi r7,r7,16
- 418d0: 18c00404 addi r3,r3,16
- 418d4: 393ffc15 stw r4,-16(r7)
- 418d8: 193ffc17 ldw r4,-16(r3)
- 418dc: 6b400404 addi r13,r13,16
- 418e0: 5ac00404 addi r11,r11,16
- 418e4: 693ffc15 stw r4,-16(r13)
- 418e8: 61000017 ldw r4,0(r12)
- 418ec: 4a400404 addi r9,r9,16
- 418f0: 42000404 addi r8,r8,16
- 418f4: 593ffc15 stw r4,-16(r11)
- 418f8: 51000017 ldw r4,0(r10)
- 418fc: 63000404 addi r12,r12,16
- 41900: 52800404 addi r10,r10,16
- 41904: 493ffc15 stw r4,-16(r9)
- 41908: 1bbfef1e bne r3,r14,418c8 <memmove+0x7c>
- 4190c: 79000044 addi r4,r15,1
- 41910: 2008913a slli r4,r4,4
- 41914: 328003cc andi r10,r6,15
- 41918: 02c000c4 movi r11,3
- 4191c: 1107883a add r3,r2,r4
- 41920: 290b883a add r5,r5,r4
- 41924: 5a801e2e bgeu r11,r10,419a0 <memmove+0x154>
- 41928: 1813883a mov r9,r3
- 4192c: 2811883a mov r8,r5
- 41930: 500f883a mov r7,r10
- 41934: 41000017 ldw r4,0(r8)
- 41938: 4a400104 addi r9,r9,4
- 4193c: 39ffff04 addi r7,r7,-4
- 41940: 493fff15 stw r4,-4(r9)
- 41944: 42000104 addi r8,r8,4
- 41948: 59fffa36 bltu r11,r7,41934 <memmove+0xe8>
- 4194c: 513fff04 addi r4,r10,-4
- 41950: 2008d0ba srli r4,r4,2
- 41954: 318000cc andi r6,r6,3
- 41958: 21000044 addi r4,r4,1
- 4195c: 2109883a add r4,r4,r4
- 41960: 2109883a add r4,r4,r4
- 41964: 1907883a add r3,r3,r4
- 41968: 290b883a add r5,r5,r4
- 4196c: 30000b26 beq r6,zero,4199c <memmove+0x150>
- 41970: 198d883a add r6,r3,r6
- 41974: 29c00003 ldbu r7,0(r5)
- 41978: 18c00044 addi r3,r3,1
- 4197c: 29400044 addi r5,r5,1
- 41980: 19ffffc5 stb r7,-1(r3)
- 41984: 19bffb1e bne r3,r6,41974 <memmove+0x128>
- 41988: f800283a ret
- 4198c: 1007883a mov r3,r2
- 41990: 003ff606 br 4196c <memmove+0x120>
- 41994: 1007883a mov r3,r2
- 41998: 003ff506 br 41970 <memmove+0x124>
- 4199c: f800283a ret
- 419a0: 500d883a mov r6,r10
- 419a4: 003ff106 br 4196c <memmove+0x120>
- 000419a8 <memset>:
- 419a8: 20c000cc andi r3,r4,3
- 419ac: 2005883a mov r2,r4
- 419b0: 18004426 beq r3,zero,41ac4 <memset+0x11c>
- 419b4: 31ffffc4 addi r7,r6,-1
- 419b8: 30004026 beq r6,zero,41abc <memset+0x114>
- 419bc: 2813883a mov r9,r5
- 419c0: 200d883a mov r6,r4
- 419c4: 2007883a mov r3,r4
- 419c8: 00000406 br 419dc <memset+0x34>
- 419cc: 3a3fffc4 addi r8,r7,-1
- 419d0: 31800044 addi r6,r6,1
- 419d4: 38003926 beq r7,zero,41abc <memset+0x114>
- 419d8: 400f883a mov r7,r8
- 419dc: 18c00044 addi r3,r3,1
- 419e0: 32400005 stb r9,0(r6)
- 419e4: 1a0000cc andi r8,r3,3
- 419e8: 403ff81e bne r8,zero,419cc <memset+0x24>
- 419ec: 010000c4 movi r4,3
- 419f0: 21c02d2e bgeu r4,r7,41aa8 <memset+0x100>
- 419f4: 29003fcc andi r4,r5,255
- 419f8: 200c923a slli r6,r4,8
- 419fc: 3108b03a or r4,r6,r4
- 41a00: 200c943a slli r6,r4,16
- 41a04: 218cb03a or r6,r4,r6
- 41a08: 010003c4 movi r4,15
- 41a0c: 21c0182e bgeu r4,r7,41a70 <memset+0xc8>
- 41a10: 3b3ffc04 addi r12,r7,-16
- 41a14: 6018d13a srli r12,r12,4
- 41a18: 1a000104 addi r8,r3,4
- 41a1c: 1ac00204 addi r11,r3,8
- 41a20: 6008913a slli r4,r12,4
- 41a24: 1a800304 addi r10,r3,12
- 41a28: 1813883a mov r9,r3
- 41a2c: 21000504 addi r4,r4,20
- 41a30: 1909883a add r4,r3,r4
- 41a34: 49800015 stw r6,0(r9)
- 41a38: 41800015 stw r6,0(r8)
- 41a3c: 59800015 stw r6,0(r11)
- 41a40: 51800015 stw r6,0(r10)
- 41a44: 42000404 addi r8,r8,16
- 41a48: 4a400404 addi r9,r9,16
- 41a4c: 5ac00404 addi r11,r11,16
- 41a50: 52800404 addi r10,r10,16
- 41a54: 413ff71e bne r8,r4,41a34 <memset+0x8c>
- 41a58: 63000044 addi r12,r12,1
- 41a5c: 6018913a slli r12,r12,4
- 41a60: 39c003cc andi r7,r7,15
- 41a64: 010000c4 movi r4,3
- 41a68: 1b07883a add r3,r3,r12
- 41a6c: 21c00e2e bgeu r4,r7,41aa8 <memset+0x100>
- 41a70: 1813883a mov r9,r3
- 41a74: 3811883a mov r8,r7
- 41a78: 010000c4 movi r4,3
- 41a7c: 49800015 stw r6,0(r9)
- 41a80: 423fff04 addi r8,r8,-4
- 41a84: 4a400104 addi r9,r9,4
- 41a88: 223ffc36 bltu r4,r8,41a7c <memset+0xd4>
- 41a8c: 393fff04 addi r4,r7,-4
- 41a90: 2008d0ba srli r4,r4,2
- 41a94: 39c000cc andi r7,r7,3
- 41a98: 21000044 addi r4,r4,1
- 41a9c: 2109883a add r4,r4,r4
- 41aa0: 2109883a add r4,r4,r4
- 41aa4: 1907883a add r3,r3,r4
- 41aa8: 38000526 beq r7,zero,41ac0 <memset+0x118>
- 41aac: 19cf883a add r7,r3,r7
- 41ab0: 19400005 stb r5,0(r3)
- 41ab4: 18c00044 addi r3,r3,1
- 41ab8: 38fffd1e bne r7,r3,41ab0 <memset+0x108>
- 41abc: f800283a ret
- 41ac0: f800283a ret
- 41ac4: 2007883a mov r3,r4
- 41ac8: 300f883a mov r7,r6
- 41acc: 003fc706 br 419ec <memset+0x44>
- 00041ad0 <_realloc_r>:
- 41ad0: defff604 addi sp,sp,-40
- 41ad4: dc800215 stw r18,8(sp)
- 41ad8: dfc00915 stw ra,36(sp)
- 41adc: df000815 stw fp,32(sp)
- 41ae0: ddc00715 stw r23,28(sp)
- 41ae4: dd800615 stw r22,24(sp)
- 41ae8: dd400515 stw r21,20(sp)
- 41aec: dd000415 stw r20,16(sp)
- 41af0: dcc00315 stw r19,12(sp)
- 41af4: dc400115 stw r17,4(sp)
- 41af8: dc000015 stw r16,0(sp)
- 41afc: 3025883a mov r18,r6
- 41b00: 2800b726 beq r5,zero,41de0 <_realloc_r+0x310>
- 41b04: 282b883a mov r21,r5
- 41b08: 2029883a mov r20,r4
- 41b0c: 00436500 call 43650 <__malloc_lock>
- 41b10: a8bfff17 ldw r2,-4(r21)
- 41b14: 043fff04 movi r16,-4
- 41b18: 90c002c4 addi r3,r18,11
- 41b1c: 01000584 movi r4,22
- 41b20: acfffe04 addi r19,r21,-8
- 41b24: 1420703a and r16,r2,r16
- 41b28: 20c0332e bgeu r4,r3,41bf8 <_realloc_r+0x128>
- 41b2c: 047ffe04 movi r17,-8
- 41b30: 1c62703a and r17,r3,r17
- 41b34: 8807883a mov r3,r17
- 41b38: 88005816 blt r17,zero,41c9c <_realloc_r+0x1cc>
- 41b3c: 8c805736 bltu r17,r18,41c9c <_realloc_r+0x1cc>
- 41b40: 80c0300e bge r16,r3,41c04 <_realloc_r+0x134>
- 41b44: 07000134 movhi fp,4
- 41b48: e716ed04 addi fp,fp,23476
- 41b4c: e1c00217 ldw r7,8(fp)
- 41b50: 9c09883a add r4,r19,r16
- 41b54: 22000117 ldw r8,4(r4)
- 41b58: 21c06326 beq r4,r7,41ce8 <_realloc_r+0x218>
- 41b5c: 017fff84 movi r5,-2
- 41b60: 414a703a and r5,r8,r5
- 41b64: 214b883a add r5,r4,r5
- 41b68: 29800117 ldw r6,4(r5)
- 41b6c: 3180004c andi r6,r6,1
- 41b70: 30003f26 beq r6,zero,41c70 <_realloc_r+0x1a0>
- 41b74: 1080004c andi r2,r2,1
- 41b78: 10008326 beq r2,zero,41d88 <_realloc_r+0x2b8>
- 41b7c: 900b883a mov r5,r18
- 41b80: a009883a mov r4,r20
- 41b84: 0040e140 call 40e14 <_malloc_r>
- 41b88: 1025883a mov r18,r2
- 41b8c: 10011e26 beq r2,zero,42008 <_realloc_r+0x538>
- 41b90: a93fff17 ldw r4,-4(r21)
- 41b94: 10fffe04 addi r3,r2,-8
- 41b98: 00bfff84 movi r2,-2
- 41b9c: 2084703a and r2,r4,r2
- 41ba0: 9885883a add r2,r19,r2
- 41ba4: 1880ee26 beq r3,r2,41f60 <_realloc_r+0x490>
- 41ba8: 81bfff04 addi r6,r16,-4
- 41bac: 00800904 movi r2,36
- 41bb0: 1180b836 bltu r2,r6,41e94 <_realloc_r+0x3c4>
- 41bb4: 00c004c4 movi r3,19
- 41bb8: 19809636 bltu r3,r6,41e14 <_realloc_r+0x344>
- 41bbc: 9005883a mov r2,r18
- 41bc0: a807883a mov r3,r21
- 41bc4: 19000017 ldw r4,0(r3)
- 41bc8: 11000015 stw r4,0(r2)
- 41bcc: 19000117 ldw r4,4(r3)
- 41bd0: 11000115 stw r4,4(r2)
- 41bd4: 18c00217 ldw r3,8(r3)
- 41bd8: 10c00215 stw r3,8(r2)
- 41bdc: a80b883a mov r5,r21
- 41be0: a009883a mov r4,r20
- 41be4: 004289c0 call 4289c <_free_r>
- 41be8: a009883a mov r4,r20
- 41bec: 00436740 call 43674 <__malloc_unlock>
- 41bf0: 9005883a mov r2,r18
- 41bf4: 00001206 br 41c40 <_realloc_r+0x170>
- 41bf8: 00c00404 movi r3,16
- 41bfc: 1823883a mov r17,r3
- 41c00: 003fce06 br 41b3c <_realloc_r+0x6c>
- 41c04: a825883a mov r18,r21
- 41c08: 8445c83a sub r2,r16,r17
- 41c0c: 00c003c4 movi r3,15
- 41c10: 18802636 bltu r3,r2,41cac <_realloc_r+0x1dc>
- 41c14: 99800117 ldw r6,4(r19)
- 41c18: 9c07883a add r3,r19,r16
- 41c1c: 3180004c andi r6,r6,1
- 41c20: 3420b03a or r16,r6,r16
- 41c24: 9c000115 stw r16,4(r19)
- 41c28: 18800117 ldw r2,4(r3)
- 41c2c: 10800054 ori r2,r2,1
- 41c30: 18800115 stw r2,4(r3)
- 41c34: a009883a mov r4,r20
- 41c38: 00436740 call 43674 <__malloc_unlock>
- 41c3c: 9005883a mov r2,r18
- 41c40: dfc00917 ldw ra,36(sp)
- 41c44: df000817 ldw fp,32(sp)
- 41c48: ddc00717 ldw r23,28(sp)
- 41c4c: dd800617 ldw r22,24(sp)
- 41c50: dd400517 ldw r21,20(sp)
- 41c54: dd000417 ldw r20,16(sp)
- 41c58: dcc00317 ldw r19,12(sp)
- 41c5c: dc800217 ldw r18,8(sp)
- 41c60: dc400117 ldw r17,4(sp)
- 41c64: dc000017 ldw r16,0(sp)
- 41c68: dec00a04 addi sp,sp,40
- 41c6c: f800283a ret
- 41c70: 017fff04 movi r5,-4
- 41c74: 414a703a and r5,r8,r5
- 41c78: 814d883a add r6,r16,r5
- 41c7c: 30c01f16 blt r6,r3,41cfc <_realloc_r+0x22c>
- 41c80: 20800317 ldw r2,12(r4)
- 41c84: 20c00217 ldw r3,8(r4)
- 41c88: a825883a mov r18,r21
- 41c8c: 3021883a mov r16,r6
- 41c90: 18800315 stw r2,12(r3)
- 41c94: 10c00215 stw r3,8(r2)
- 41c98: 003fdb06 br 41c08 <_realloc_r+0x138>
- 41c9c: 00800304 movi r2,12
- 41ca0: a0800015 stw r2,0(r20)
- 41ca4: 0005883a mov r2,zero
- 41ca8: 003fe506 br 41c40 <_realloc_r+0x170>
- 41cac: 98c00117 ldw r3,4(r19)
- 41cb0: 9c4b883a add r5,r19,r17
- 41cb4: 11000054 ori r4,r2,1
- 41cb8: 18c0004c andi r3,r3,1
- 41cbc: 1c62b03a or r17,r3,r17
- 41cc0: 9c400115 stw r17,4(r19)
- 41cc4: 29000115 stw r4,4(r5)
- 41cc8: 2885883a add r2,r5,r2
- 41ccc: 10c00117 ldw r3,4(r2)
- 41cd0: 29400204 addi r5,r5,8
- 41cd4: a009883a mov r4,r20
- 41cd8: 18c00054 ori r3,r3,1
- 41cdc: 10c00115 stw r3,4(r2)
- 41ce0: 004289c0 call 4289c <_free_r>
- 41ce4: 003fd306 br 41c34 <_realloc_r+0x164>
- 41ce8: 017fff04 movi r5,-4
- 41cec: 414a703a and r5,r8,r5
- 41cf0: 89800404 addi r6,r17,16
- 41cf4: 8151883a add r8,r16,r5
- 41cf8: 4180590e bge r8,r6,41e60 <_realloc_r+0x390>
- 41cfc: 1080004c andi r2,r2,1
- 41d00: 103f9e1e bne r2,zero,41b7c <_realloc_r+0xac>
- 41d04: adbffe17 ldw r22,-8(r21)
- 41d08: 00bfff04 movi r2,-4
- 41d0c: 9dadc83a sub r22,r19,r22
- 41d10: b1800117 ldw r6,4(r22)
- 41d14: 3084703a and r2,r6,r2
- 41d18: 20002026 beq r4,zero,41d9c <_realloc_r+0x2cc>
- 41d1c: 80af883a add r23,r16,r2
- 41d20: b96f883a add r23,r23,r5
- 41d24: 21c05f26 beq r4,r7,41ea4 <_realloc_r+0x3d4>
- 41d28: b8c01c16 blt r23,r3,41d9c <_realloc_r+0x2cc>
- 41d2c: 20800317 ldw r2,12(r4)
- 41d30: 20c00217 ldw r3,8(r4)
- 41d34: 81bfff04 addi r6,r16,-4
- 41d38: 01000904 movi r4,36
- 41d3c: 18800315 stw r2,12(r3)
- 41d40: 10c00215 stw r3,8(r2)
- 41d44: b0c00217 ldw r3,8(r22)
- 41d48: b0800317 ldw r2,12(r22)
- 41d4c: b4800204 addi r18,r22,8
- 41d50: 18800315 stw r2,12(r3)
- 41d54: 10c00215 stw r3,8(r2)
- 41d58: 21801b36 bltu r4,r6,41dc8 <_realloc_r+0x2f8>
- 41d5c: 008004c4 movi r2,19
- 41d60: 1180352e bgeu r2,r6,41e38 <_realloc_r+0x368>
- 41d64: a8800017 ldw r2,0(r21)
- 41d68: b0800215 stw r2,8(r22)
- 41d6c: a8800117 ldw r2,4(r21)
- 41d70: b0800315 stw r2,12(r22)
- 41d74: 008006c4 movi r2,27
- 41d78: 11807f36 bltu r2,r6,41f78 <_realloc_r+0x4a8>
- 41d7c: b0800404 addi r2,r22,16
- 41d80: ad400204 addi r21,r21,8
- 41d84: 00002d06 br 41e3c <_realloc_r+0x36c>
- 41d88: adbffe17 ldw r22,-8(r21)
- 41d8c: 00bfff04 movi r2,-4
- 41d90: 9dadc83a sub r22,r19,r22
- 41d94: b1000117 ldw r4,4(r22)
- 41d98: 2084703a and r2,r4,r2
- 41d9c: b03f7726 beq r22,zero,41b7c <_realloc_r+0xac>
- 41da0: 80af883a add r23,r16,r2
- 41da4: b8ff7516 blt r23,r3,41b7c <_realloc_r+0xac>
- 41da8: b0800317 ldw r2,12(r22)
- 41dac: b0c00217 ldw r3,8(r22)
- 41db0: 81bfff04 addi r6,r16,-4
- 41db4: 01000904 movi r4,36
- 41db8: 18800315 stw r2,12(r3)
- 41dbc: 10c00215 stw r3,8(r2)
- 41dc0: b4800204 addi r18,r22,8
- 41dc4: 21bfe52e bgeu r4,r6,41d5c <_realloc_r+0x28c>
- 41dc8: a80b883a mov r5,r21
- 41dcc: 9009883a mov r4,r18
- 41dd0: 004184c0 call 4184c <memmove>
- 41dd4: b821883a mov r16,r23
- 41dd8: b027883a mov r19,r22
- 41ddc: 003f8a06 br 41c08 <_realloc_r+0x138>
- 41de0: 300b883a mov r5,r6
- 41de4: dfc00917 ldw ra,36(sp)
- 41de8: df000817 ldw fp,32(sp)
- 41dec: ddc00717 ldw r23,28(sp)
- 41df0: dd800617 ldw r22,24(sp)
- 41df4: dd400517 ldw r21,20(sp)
- 41df8: dd000417 ldw r20,16(sp)
- 41dfc: dcc00317 ldw r19,12(sp)
- 41e00: dc800217 ldw r18,8(sp)
- 41e04: dc400117 ldw r17,4(sp)
- 41e08: dc000017 ldw r16,0(sp)
- 41e0c: dec00a04 addi sp,sp,40
- 41e10: 0040e141 jmpi 40e14 <_malloc_r>
- 41e14: a8c00017 ldw r3,0(r21)
- 41e18: 90c00015 stw r3,0(r18)
- 41e1c: a8c00117 ldw r3,4(r21)
- 41e20: 90c00115 stw r3,4(r18)
- 41e24: 00c006c4 movi r3,27
- 41e28: 19804536 bltu r3,r6,41f40 <_realloc_r+0x470>
- 41e2c: 90800204 addi r2,r18,8
- 41e30: a8c00204 addi r3,r21,8
- 41e34: 003f6306 br 41bc4 <_realloc_r+0xf4>
- 41e38: 9005883a mov r2,r18
- 41e3c: a8c00017 ldw r3,0(r21)
- 41e40: b821883a mov r16,r23
- 41e44: b027883a mov r19,r22
- 41e48: 10c00015 stw r3,0(r2)
- 41e4c: a8c00117 ldw r3,4(r21)
- 41e50: 10c00115 stw r3,4(r2)
- 41e54: a8c00217 ldw r3,8(r21)
- 41e58: 10c00215 stw r3,8(r2)
- 41e5c: 003f6a06 br 41c08 <_realloc_r+0x138>
- 41e60: 9c67883a add r19,r19,r17
- 41e64: 4445c83a sub r2,r8,r17
- 41e68: e4c00215 stw r19,8(fp)
- 41e6c: 10800054 ori r2,r2,1
- 41e70: 98800115 stw r2,4(r19)
- 41e74: a8bfff17 ldw r2,-4(r21)
- 41e78: a009883a mov r4,r20
- 41e7c: 1080004c andi r2,r2,1
- 41e80: 1462b03a or r17,r2,r17
- 41e84: ac7fff15 stw r17,-4(r21)
- 41e88: 00436740 call 43674 <__malloc_unlock>
- 41e8c: a805883a mov r2,r21
- 41e90: 003f6b06 br 41c40 <_realloc_r+0x170>
- 41e94: a80b883a mov r5,r21
- 41e98: 9009883a mov r4,r18
- 41e9c: 004184c0 call 4184c <memmove>
- 41ea0: 003f4e06 br 41bdc <_realloc_r+0x10c>
- 41ea4: 89000404 addi r4,r17,16
- 41ea8: b93fbc16 blt r23,r4,41d9c <_realloc_r+0x2cc>
- 41eac: b0800317 ldw r2,12(r22)
- 41eb0: b0c00217 ldw r3,8(r22)
- 41eb4: 81bfff04 addi r6,r16,-4
- 41eb8: 01000904 movi r4,36
- 41ebc: 18800315 stw r2,12(r3)
- 41ec0: 10c00215 stw r3,8(r2)
- 41ec4: b4800204 addi r18,r22,8
- 41ec8: 21804336 bltu r4,r6,41fd8 <_realloc_r+0x508>
- 41ecc: 008004c4 movi r2,19
- 41ed0: 11803f2e bgeu r2,r6,41fd0 <_realloc_r+0x500>
- 41ed4: a8800017 ldw r2,0(r21)
- 41ed8: b0800215 stw r2,8(r22)
- 41edc: a8800117 ldw r2,4(r21)
- 41ee0: b0800315 stw r2,12(r22)
- 41ee4: 008006c4 movi r2,27
- 41ee8: 11803f36 bltu r2,r6,41fe8 <_realloc_r+0x518>
- 41eec: b0800404 addi r2,r22,16
- 41ef0: ad400204 addi r21,r21,8
- 41ef4: a8c00017 ldw r3,0(r21)
- 41ef8: 10c00015 stw r3,0(r2)
- 41efc: a8c00117 ldw r3,4(r21)
- 41f00: 10c00115 stw r3,4(r2)
- 41f04: a8c00217 ldw r3,8(r21)
- 41f08: 10c00215 stw r3,8(r2)
- 41f0c: b447883a add r3,r22,r17
- 41f10: bc45c83a sub r2,r23,r17
- 41f14: e0c00215 stw r3,8(fp)
- 41f18: 10800054 ori r2,r2,1
- 41f1c: 18800115 stw r2,4(r3)
- 41f20: b0800117 ldw r2,4(r22)
- 41f24: a009883a mov r4,r20
- 41f28: 1080004c andi r2,r2,1
- 41f2c: 1462b03a or r17,r2,r17
- 41f30: b4400115 stw r17,4(r22)
- 41f34: 00436740 call 43674 <__malloc_unlock>
- 41f38: 9005883a mov r2,r18
- 41f3c: 003f4006 br 41c40 <_realloc_r+0x170>
- 41f40: a8c00217 ldw r3,8(r21)
- 41f44: 90c00215 stw r3,8(r18)
- 41f48: a8c00317 ldw r3,12(r21)
- 41f4c: 90c00315 stw r3,12(r18)
- 41f50: 30801126 beq r6,r2,41f98 <_realloc_r+0x4c8>
- 41f54: 90800404 addi r2,r18,16
- 41f58: a8c00404 addi r3,r21,16
- 41f5c: 003f1906 br 41bc4 <_realloc_r+0xf4>
- 41f60: 90ffff17 ldw r3,-4(r18)
- 41f64: 00bfff04 movi r2,-4
- 41f68: a825883a mov r18,r21
- 41f6c: 1884703a and r2,r3,r2
- 41f70: 80a1883a add r16,r16,r2
- 41f74: 003f2406 br 41c08 <_realloc_r+0x138>
- 41f78: a8800217 ldw r2,8(r21)
- 41f7c: b0800415 stw r2,16(r22)
- 41f80: a8800317 ldw r2,12(r21)
- 41f84: b0800515 stw r2,20(r22)
- 41f88: 31000a26 beq r6,r4,41fb4 <_realloc_r+0x4e4>
- 41f8c: b0800604 addi r2,r22,24
- 41f90: ad400404 addi r21,r21,16
- 41f94: 003fa906 br 41e3c <_realloc_r+0x36c>
- 41f98: a9000417 ldw r4,16(r21)
- 41f9c: 90800604 addi r2,r18,24
- 41fa0: a8c00604 addi r3,r21,24
- 41fa4: 91000415 stw r4,16(r18)
- 41fa8: a9000517 ldw r4,20(r21)
- 41fac: 91000515 stw r4,20(r18)
- 41fb0: 003f0406 br 41bc4 <_realloc_r+0xf4>
- 41fb4: a8c00417 ldw r3,16(r21)
- 41fb8: ad400604 addi r21,r21,24
- 41fbc: b0800804 addi r2,r22,32
- 41fc0: b0c00615 stw r3,24(r22)
- 41fc4: a8ffff17 ldw r3,-4(r21)
- 41fc8: b0c00715 stw r3,28(r22)
- 41fcc: 003f9b06 br 41e3c <_realloc_r+0x36c>
- 41fd0: 9005883a mov r2,r18
- 41fd4: 003fc706 br 41ef4 <_realloc_r+0x424>
- 41fd8: a80b883a mov r5,r21
- 41fdc: 9009883a mov r4,r18
- 41fe0: 004184c0 call 4184c <memmove>
- 41fe4: 003fc906 br 41f0c <_realloc_r+0x43c>
- 41fe8: a8800217 ldw r2,8(r21)
- 41fec: b0800415 stw r2,16(r22)
- 41ff0: a8800317 ldw r2,12(r21)
- 41ff4: b0800515 stw r2,20(r22)
- 41ff8: 31000726 beq r6,r4,42018 <_realloc_r+0x548>
- 41ffc: b0800604 addi r2,r22,24
- 42000: ad400404 addi r21,r21,16
- 42004: 003fbb06 br 41ef4 <_realloc_r+0x424>
- 42008: a009883a mov r4,r20
- 4200c: 00436740 call 43674 <__malloc_unlock>
- 42010: 0005883a mov r2,zero
- 42014: 003f0a06 br 41c40 <_realloc_r+0x170>
- 42018: a8c00417 ldw r3,16(r21)
- 4201c: ad400604 addi r21,r21,24
- 42020: b0800804 addi r2,r22,32
- 42024: b0c00615 stw r3,24(r22)
- 42028: a8ffff17 ldw r3,-4(r21)
- 4202c: b0c00715 stw r3,28(r22)
- 42030: 003fb006 br 41ef4 <_realloc_r+0x424>
- 00042034 <_sbrk_r>:
- 42034: defffd04 addi sp,sp,-12
- 42038: dc000015 stw r16,0(sp)
- 4203c: 04000174 movhi r16,5
- 42040: dc400115 stw r17,4(sp)
- 42044: 84231d04 addi r16,r16,-29580
- 42048: 2023883a mov r17,r4
- 4204c: 2809883a mov r4,r5
- 42050: dfc00215 stw ra,8(sp)
- 42054: 80000015 stw zero,0(r16)
- 42058: 004385c0 call 4385c <sbrk>
- 4205c: 00ffffc4 movi r3,-1
- 42060: 10c00526 beq r2,r3,42078 <_sbrk_r+0x44>
- 42064: dfc00217 ldw ra,8(sp)
- 42068: dc400117 ldw r17,4(sp)
- 4206c: dc000017 ldw r16,0(sp)
- 42070: dec00304 addi sp,sp,12
- 42074: f800283a ret
- 42078: 80c00017 ldw r3,0(r16)
- 4207c: 183ff926 beq r3,zero,42064 <_sbrk_r+0x30>
- 42080: 88c00015 stw r3,0(r17)
- 42084: 003ff706 br 42064 <_sbrk_r+0x30>
- 00042088 <__sread>:
- 42088: defffe04 addi sp,sp,-8
- 4208c: dc000015 stw r16,0(sp)
- 42090: 2821883a mov r16,r5
- 42094: 2940038f ldh r5,14(r5)
- 42098: dfc00115 stw ra,4(sp)
- 4209c: 0042dc80 call 42dc8 <_read_r>
- 420a0: 10000716 blt r2,zero,420c0 <__sread+0x38>
- 420a4: 80c01417 ldw r3,80(r16)
- 420a8: 1887883a add r3,r3,r2
- 420ac: 80c01415 stw r3,80(r16)
- 420b0: dfc00117 ldw ra,4(sp)
- 420b4: dc000017 ldw r16,0(sp)
- 420b8: dec00204 addi sp,sp,8
- 420bc: f800283a ret
- 420c0: 80c0030b ldhu r3,12(r16)
- 420c4: 18fbffcc andi r3,r3,61439
- 420c8: 80c0030d sth r3,12(r16)
- 420cc: dfc00117 ldw ra,4(sp)
- 420d0: dc000017 ldw r16,0(sp)
- 420d4: dec00204 addi sp,sp,8
- 420d8: f800283a ret
- 000420dc <__seofread>:
- 420dc: 0005883a mov r2,zero
- 420e0: f800283a ret
- 000420e4 <__swrite>:
- 420e4: 2880030b ldhu r2,12(r5)
- 420e8: defffb04 addi sp,sp,-20
- 420ec: dcc00315 stw r19,12(sp)
- 420f0: dc800215 stw r18,8(sp)
- 420f4: dc400115 stw r17,4(sp)
- 420f8: dc000015 stw r16,0(sp)
- 420fc: dfc00415 stw ra,16(sp)
- 42100: 10c0400c andi r3,r2,256
- 42104: 2821883a mov r16,r5
- 42108: 2023883a mov r17,r4
- 4210c: 3025883a mov r18,r6
- 42110: 3827883a mov r19,r7
- 42114: 18000526 beq r3,zero,4212c <__swrite+0x48>
- 42118: 2940038f ldh r5,14(r5)
- 4211c: 01c00084 movi r7,2
- 42120: 000d883a mov r6,zero
- 42124: 0042bac0 call 42bac <_lseek_r>
- 42128: 8080030b ldhu r2,12(r16)
- 4212c: 8140038f ldh r5,14(r16)
- 42130: 10bbffcc andi r2,r2,61439
- 42134: 980f883a mov r7,r19
- 42138: 900d883a mov r6,r18
- 4213c: 8809883a mov r4,r17
- 42140: 8080030d sth r2,12(r16)
- 42144: dfc00417 ldw ra,16(sp)
- 42148: dcc00317 ldw r19,12(sp)
- 4214c: dc800217 ldw r18,8(sp)
- 42150: dc400117 ldw r17,4(sp)
- 42154: dc000017 ldw r16,0(sp)
- 42158: dec00504 addi sp,sp,20
- 4215c: 00421c41 jmpi 421c4 <_write_r>
- 00042160 <__sseek>:
- 42160: defffe04 addi sp,sp,-8
- 42164: dc000015 stw r16,0(sp)
- 42168: 2821883a mov r16,r5
- 4216c: 2940038f ldh r5,14(r5)
- 42170: dfc00115 stw ra,4(sp)
- 42174: 0042bac0 call 42bac <_lseek_r>
- 42178: 00ffffc4 movi r3,-1
- 4217c: 10c00826 beq r2,r3,421a0 <__sseek+0x40>
- 42180: 80c0030b ldhu r3,12(r16)
- 42184: 80801415 stw r2,80(r16)
- 42188: 18c40014 ori r3,r3,4096
- 4218c: 80c0030d sth r3,12(r16)
- 42190: dfc00117 ldw ra,4(sp)
- 42194: dc000017 ldw r16,0(sp)
- 42198: dec00204 addi sp,sp,8
- 4219c: f800283a ret
- 421a0: 80c0030b ldhu r3,12(r16)
- 421a4: 18fbffcc andi r3,r3,61439
- 421a8: 80c0030d sth r3,12(r16)
- 421ac: dfc00117 ldw ra,4(sp)
- 421b0: dc000017 ldw r16,0(sp)
- 421b4: dec00204 addi sp,sp,8
- 421b8: f800283a ret
- 000421bc <__sclose>:
- 421bc: 2940038f ldh r5,14(r5)
- 421c0: 00423781 jmpi 42378 <_close_r>
- 000421c4 <_write_r>:
- 421c4: defffd04 addi sp,sp,-12
- 421c8: 2805883a mov r2,r5
- 421cc: dc000015 stw r16,0(sp)
- 421d0: 04000174 movhi r16,5
- 421d4: dc400115 stw r17,4(sp)
- 421d8: 300b883a mov r5,r6
- 421dc: 84231d04 addi r16,r16,-29580
- 421e0: 2023883a mov r17,r4
- 421e4: 380d883a mov r6,r7
- 421e8: 1009883a mov r4,r2
- 421ec: dfc00215 stw ra,8(sp)
- 421f0: 80000015 stw zero,0(r16)
- 421f4: 00439480 call 43948 <write>
- 421f8: 00ffffc4 movi r3,-1
- 421fc: 10c00526 beq r2,r3,42214 <_write_r+0x50>
- 42200: dfc00217 ldw ra,8(sp)
- 42204: dc400117 ldw r17,4(sp)
- 42208: dc000017 ldw r16,0(sp)
- 4220c: dec00304 addi sp,sp,12
- 42210: f800283a ret
- 42214: 80c00017 ldw r3,0(r16)
- 42218: 183ff926 beq r3,zero,42200 <_write_r+0x3c>
- 4221c: 88c00015 stw r3,0(r17)
- 42220: 003ff706 br 42200 <_write_r+0x3c>
- 00042224 <__swsetup_r>:
- 42224: 00800134 movhi r2,4
- 42228: defffd04 addi sp,sp,-12
- 4222c: 109c7204 addi r2,r2,29128
- 42230: dc400115 stw r17,4(sp)
- 42234: 2023883a mov r17,r4
- 42238: 11000017 ldw r4,0(r2)
- 4223c: dc000015 stw r16,0(sp)
- 42240: dfc00215 stw ra,8(sp)
- 42244: 2821883a mov r16,r5
- 42248: 20000226 beq r4,zero,42254 <__swsetup_r+0x30>
- 4224c: 20800e17 ldw r2,56(r4)
- 42250: 10003126 beq r2,zero,42318 <__swsetup_r+0xf4>
- 42254: 8080030b ldhu r2,12(r16)
- 42258: 10c0020c andi r3,r2,8
- 4225c: 1009883a mov r4,r2
- 42260: 18000f26 beq r3,zero,422a0 <__swsetup_r+0x7c>
- 42264: 80c00417 ldw r3,16(r16)
- 42268: 18001526 beq r3,zero,422c0 <__swsetup_r+0x9c>
- 4226c: 1100004c andi r4,r2,1
- 42270: 20001c1e bne r4,zero,422e4 <__swsetup_r+0xc0>
- 42274: 1080008c andi r2,r2,2
- 42278: 1000291e bne r2,zero,42320 <__swsetup_r+0xfc>
- 4227c: 80800517 ldw r2,20(r16)
- 42280: 80800215 stw r2,8(r16)
- 42284: 18001c26 beq r3,zero,422f8 <__swsetup_r+0xd4>
- 42288: 0005883a mov r2,zero
- 4228c: dfc00217 ldw ra,8(sp)
- 42290: dc400117 ldw r17,4(sp)
- 42294: dc000017 ldw r16,0(sp)
- 42298: dec00304 addi sp,sp,12
- 4229c: f800283a ret
- 422a0: 2080040c andi r2,r4,16
- 422a4: 10002e26 beq r2,zero,42360 <__swsetup_r+0x13c>
- 422a8: 2080010c andi r2,r4,4
- 422ac: 10001e1e bne r2,zero,42328 <__swsetup_r+0x104>
- 422b0: 80c00417 ldw r3,16(r16)
- 422b4: 20800214 ori r2,r4,8
- 422b8: 8080030d sth r2,12(r16)
- 422bc: 183feb1e bne r3,zero,4226c <__swsetup_r+0x48>
- 422c0: 1100a00c andi r4,r2,640
- 422c4: 01408004 movi r5,512
- 422c8: 217fe826 beq r4,r5,4226c <__swsetup_r+0x48>
- 422cc: 800b883a mov r5,r16
- 422d0: 8809883a mov r4,r17
- 422d4: 0042c0c0 call 42c0c <__smakebuf_r>
- 422d8: 8080030b ldhu r2,12(r16)
- 422dc: 80c00417 ldw r3,16(r16)
- 422e0: 003fe206 br 4226c <__swsetup_r+0x48>
- 422e4: 80800517 ldw r2,20(r16)
- 422e8: 80000215 stw zero,8(r16)
- 422ec: 0085c83a sub r2,zero,r2
- 422f0: 80800615 stw r2,24(r16)
- 422f4: 183fe41e bne r3,zero,42288 <__swsetup_r+0x64>
- 422f8: 80c0030b ldhu r3,12(r16)
- 422fc: 0005883a mov r2,zero
- 42300: 1900200c andi r4,r3,128
- 42304: 203fe126 beq r4,zero,4228c <__swsetup_r+0x68>
- 42308: 18c01014 ori r3,r3,64
- 4230c: 80c0030d sth r3,12(r16)
- 42310: 00bfffc4 movi r2,-1
- 42314: 003fdd06 br 4228c <__swsetup_r+0x68>
- 42318: 00407740 call 40774 <__sinit>
- 4231c: 003fcd06 br 42254 <__swsetup_r+0x30>
- 42320: 0005883a mov r2,zero
- 42324: 003fd606 br 42280 <__swsetup_r+0x5c>
- 42328: 81400c17 ldw r5,48(r16)
- 4232c: 28000626 beq r5,zero,42348 <__swsetup_r+0x124>
- 42330: 80801004 addi r2,r16,64
- 42334: 28800326 beq r5,r2,42344 <__swsetup_r+0x120>
- 42338: 8809883a mov r4,r17
- 4233c: 004289c0 call 4289c <_free_r>
- 42340: 8100030b ldhu r4,12(r16)
- 42344: 80000c15 stw zero,48(r16)
- 42348: 80c00417 ldw r3,16(r16)
- 4234c: 00bff6c4 movi r2,-37
- 42350: 1108703a and r4,r2,r4
- 42354: 80000115 stw zero,4(r16)
- 42358: 80c00015 stw r3,0(r16)
- 4235c: 003fd506 br 422b4 <__swsetup_r+0x90>
- 42360: 00800244 movi r2,9
- 42364: 88800015 stw r2,0(r17)
- 42368: 20801014 ori r2,r4,64
- 4236c: 8080030d sth r2,12(r16)
- 42370: 00bfffc4 movi r2,-1
- 42374: 003fc506 br 4228c <__swsetup_r+0x68>
- 00042378 <_close_r>:
- 42378: defffd04 addi sp,sp,-12
- 4237c: dc000015 stw r16,0(sp)
- 42380: 04000174 movhi r16,5
- 42384: dc400115 stw r17,4(sp)
- 42388: 84231d04 addi r16,r16,-29580
- 4238c: 2023883a mov r17,r4
- 42390: 2809883a mov r4,r5
- 42394: dfc00215 stw ra,8(sp)
- 42398: 80000015 stw zero,0(r16)
- 4239c: 00430f00 call 430f0 <close>
- 423a0: 00ffffc4 movi r3,-1
- 423a4: 10c00526 beq r2,r3,423bc <_close_r+0x44>
- 423a8: dfc00217 ldw ra,8(sp)
- 423ac: dc400117 ldw r17,4(sp)
- 423b0: dc000017 ldw r16,0(sp)
- 423b4: dec00304 addi sp,sp,12
- 423b8: f800283a ret
- 423bc: 80c00017 ldw r3,0(r16)
- 423c0: 183ff926 beq r3,zero,423a8 <_close_r+0x30>
- 423c4: 88c00015 stw r3,0(r17)
- 423c8: 003ff706 br 423a8 <_close_r+0x30>
- 000423cc <_fclose_r>:
- 423cc: 28003926 beq r5,zero,424b4 <_fclose_r+0xe8>
- 423d0: defffc04 addi sp,sp,-16
- 423d4: dc400115 stw r17,4(sp)
- 423d8: dc000015 stw r16,0(sp)
- 423dc: dfc00315 stw ra,12(sp)
- 423e0: dc800215 stw r18,8(sp)
- 423e4: 2023883a mov r17,r4
- 423e8: 2821883a mov r16,r5
- 423ec: 20000226 beq r4,zero,423f8 <_fclose_r+0x2c>
- 423f0: 20800e17 ldw r2,56(r4)
- 423f4: 10002726 beq r2,zero,42494 <_fclose_r+0xc8>
- 423f8: 8080030f ldh r2,12(r16)
- 423fc: 1000071e bne r2,zero,4241c <_fclose_r+0x50>
- 42400: 0005883a mov r2,zero
- 42404: dfc00317 ldw ra,12(sp)
- 42408: dc800217 ldw r18,8(sp)
- 4240c: dc400117 ldw r17,4(sp)
- 42410: dc000017 ldw r16,0(sp)
- 42414: dec00404 addi sp,sp,16
- 42418: f800283a ret
- 4241c: 800b883a mov r5,r16
- 42420: 8809883a mov r4,r17
- 42424: 00424d00 call 424d0 <__sflush_r>
- 42428: 1025883a mov r18,r2
- 4242c: 80800b17 ldw r2,44(r16)
- 42430: 10000426 beq r2,zero,42444 <_fclose_r+0x78>
- 42434: 81400717 ldw r5,28(r16)
- 42438: 8809883a mov r4,r17
- 4243c: 103ee83a callr r2
- 42440: 10001616 blt r2,zero,4249c <_fclose_r+0xd0>
- 42444: 8080030b ldhu r2,12(r16)
- 42448: 1080200c andi r2,r2,128
- 4244c: 1000151e bne r2,zero,424a4 <_fclose_r+0xd8>
- 42450: 81400c17 ldw r5,48(r16)
- 42454: 28000526 beq r5,zero,4246c <_fclose_r+0xa0>
- 42458: 80801004 addi r2,r16,64
- 4245c: 28800226 beq r5,r2,42468 <_fclose_r+0x9c>
- 42460: 8809883a mov r4,r17
- 42464: 004289c0 call 4289c <_free_r>
- 42468: 80000c15 stw zero,48(r16)
- 4246c: 81401117 ldw r5,68(r16)
- 42470: 28000326 beq r5,zero,42480 <_fclose_r+0xb4>
- 42474: 8809883a mov r4,r17
- 42478: 004289c0 call 4289c <_free_r>
- 4247c: 80001115 stw zero,68(r16)
- 42480: 00407840 call 40784 <__sfp_lock_acquire>
- 42484: 8000030d sth zero,12(r16)
- 42488: 00407880 call 40788 <__sfp_lock_release>
- 4248c: 9005883a mov r2,r18
- 42490: 003fdc06 br 42404 <_fclose_r+0x38>
- 42494: 00407740 call 40774 <__sinit>
- 42498: 003fd706 br 423f8 <_fclose_r+0x2c>
- 4249c: 04bfffc4 movi r18,-1
- 424a0: 003fe806 br 42444 <_fclose_r+0x78>
- 424a4: 81400417 ldw r5,16(r16)
- 424a8: 8809883a mov r4,r17
- 424ac: 004289c0 call 4289c <_free_r>
- 424b0: 003fe706 br 42450 <_fclose_r+0x84>
- 424b4: 0005883a mov r2,zero
- 424b8: f800283a ret
- 000424bc <fclose>:
- 424bc: 00800134 movhi r2,4
- 424c0: 109c7204 addi r2,r2,29128
- 424c4: 200b883a mov r5,r4
- 424c8: 11000017 ldw r4,0(r2)
- 424cc: 00423cc1 jmpi 423cc <_fclose_r>
- 000424d0 <__sflush_r>:
- 424d0: 2880030b ldhu r2,12(r5)
- 424d4: defffb04 addi sp,sp,-20
- 424d8: dcc00315 stw r19,12(sp)
- 424dc: dc400115 stw r17,4(sp)
- 424e0: dfc00415 stw ra,16(sp)
- 424e4: dc800215 stw r18,8(sp)
- 424e8: dc000015 stw r16,0(sp)
- 424ec: 10c0020c andi r3,r2,8
- 424f0: 2823883a mov r17,r5
- 424f4: 2027883a mov r19,r4
- 424f8: 1800311e bne r3,zero,425c0 <__sflush_r+0xf0>
- 424fc: 28c00117 ldw r3,4(r5)
- 42500: 10820014 ori r2,r2,2048
- 42504: 2880030d sth r2,12(r5)
- 42508: 00c04b0e bge zero,r3,42638 <__sflush_r+0x168>
- 4250c: 8a000a17 ldw r8,40(r17)
- 42510: 40002326 beq r8,zero,425a0 <__sflush_r+0xd0>
- 42514: 9c000017 ldw r16,0(r19)
- 42518: 10c4000c andi r3,r2,4096
- 4251c: 98000015 stw zero,0(r19)
- 42520: 18004826 beq r3,zero,42644 <__sflush_r+0x174>
- 42524: 89801417 ldw r6,80(r17)
- 42528: 10c0010c andi r3,r2,4
- 4252c: 18000626 beq r3,zero,42548 <__sflush_r+0x78>
- 42530: 88c00117 ldw r3,4(r17)
- 42534: 88800c17 ldw r2,48(r17)
- 42538: 30cdc83a sub r6,r6,r3
- 4253c: 10000226 beq r2,zero,42548 <__sflush_r+0x78>
- 42540: 88800f17 ldw r2,60(r17)
- 42544: 308dc83a sub r6,r6,r2
- 42548: 89400717 ldw r5,28(r17)
- 4254c: 000f883a mov r7,zero
- 42550: 9809883a mov r4,r19
- 42554: 403ee83a callr r8
- 42558: 00ffffc4 movi r3,-1
- 4255c: 10c04426 beq r2,r3,42670 <__sflush_r+0x1a0>
- 42560: 88c0030b ldhu r3,12(r17)
- 42564: 89000417 ldw r4,16(r17)
- 42568: 88000115 stw zero,4(r17)
- 4256c: 197dffcc andi r5,r3,63487
- 42570: 8940030d sth r5,12(r17)
- 42574: 89000015 stw r4,0(r17)
- 42578: 18c4000c andi r3,r3,4096
- 4257c: 18002c1e bne r3,zero,42630 <__sflush_r+0x160>
- 42580: 89400c17 ldw r5,48(r17)
- 42584: 9c000015 stw r16,0(r19)
- 42588: 28000526 beq r5,zero,425a0 <__sflush_r+0xd0>
- 4258c: 88801004 addi r2,r17,64
- 42590: 28800226 beq r5,r2,4259c <__sflush_r+0xcc>
- 42594: 9809883a mov r4,r19
- 42598: 004289c0 call 4289c <_free_r>
- 4259c: 88000c15 stw zero,48(r17)
- 425a0: 0005883a mov r2,zero
- 425a4: dfc00417 ldw ra,16(sp)
- 425a8: dcc00317 ldw r19,12(sp)
- 425ac: dc800217 ldw r18,8(sp)
- 425b0: dc400117 ldw r17,4(sp)
- 425b4: dc000017 ldw r16,0(sp)
- 425b8: dec00504 addi sp,sp,20
- 425bc: f800283a ret
- 425c0: 2c800417 ldw r18,16(r5)
- 425c4: 903ff626 beq r18,zero,425a0 <__sflush_r+0xd0>
- 425c8: 2c000017 ldw r16,0(r5)
- 425cc: 108000cc andi r2,r2,3
- 425d0: 2c800015 stw r18,0(r5)
- 425d4: 84a1c83a sub r16,r16,r18
- 425d8: 1000131e bne r2,zero,42628 <__sflush_r+0x158>
- 425dc: 28800517 ldw r2,20(r5)
- 425e0: 88800215 stw r2,8(r17)
- 425e4: 04000316 blt zero,r16,425f4 <__sflush_r+0x124>
- 425e8: 003fed06 br 425a0 <__sflush_r+0xd0>
- 425ec: 90a5883a add r18,r18,r2
- 425f0: 043feb0e bge zero,r16,425a0 <__sflush_r+0xd0>
- 425f4: 88800917 ldw r2,36(r17)
- 425f8: 89400717 ldw r5,28(r17)
- 425fc: 800f883a mov r7,r16
- 42600: 900d883a mov r6,r18
- 42604: 9809883a mov r4,r19
- 42608: 103ee83a callr r2
- 4260c: 80a1c83a sub r16,r16,r2
- 42610: 00bff616 blt zero,r2,425ec <__sflush_r+0x11c>
- 42614: 88c0030b ldhu r3,12(r17)
- 42618: 00bfffc4 movi r2,-1
- 4261c: 18c01014 ori r3,r3,64
- 42620: 88c0030d sth r3,12(r17)
- 42624: 003fdf06 br 425a4 <__sflush_r+0xd4>
- 42628: 0005883a mov r2,zero
- 4262c: 003fec06 br 425e0 <__sflush_r+0x110>
- 42630: 88801415 stw r2,80(r17)
- 42634: 003fd206 br 42580 <__sflush_r+0xb0>
- 42638: 28c00f17 ldw r3,60(r5)
- 4263c: 00ffb316 blt zero,r3,4250c <__sflush_r+0x3c>
- 42640: 003fd706 br 425a0 <__sflush_r+0xd0>
- 42644: 89400717 ldw r5,28(r17)
- 42648: 000d883a mov r6,zero
- 4264c: 01c00044 movi r7,1
- 42650: 9809883a mov r4,r19
- 42654: 403ee83a callr r8
- 42658: 100d883a mov r6,r2
- 4265c: 00bfffc4 movi r2,-1
- 42660: 30801426 beq r6,r2,426b4 <__sflush_r+0x1e4>
- 42664: 8880030b ldhu r2,12(r17)
- 42668: 8a000a17 ldw r8,40(r17)
- 4266c: 003fae06 br 42528 <__sflush_r+0x58>
- 42670: 98c00017 ldw r3,0(r19)
- 42674: 183fba26 beq r3,zero,42560 <__sflush_r+0x90>
- 42678: 01000744 movi r4,29
- 4267c: 19000626 beq r3,r4,42698 <__sflush_r+0x1c8>
- 42680: 01000584 movi r4,22
- 42684: 19000426 beq r3,r4,42698 <__sflush_r+0x1c8>
- 42688: 88c0030b ldhu r3,12(r17)
- 4268c: 18c01014 ori r3,r3,64
- 42690: 88c0030d sth r3,12(r17)
- 42694: 003fc306 br 425a4 <__sflush_r+0xd4>
- 42698: 8880030b ldhu r2,12(r17)
- 4269c: 88c00417 ldw r3,16(r17)
- 426a0: 88000115 stw zero,4(r17)
- 426a4: 10bdffcc andi r2,r2,63487
- 426a8: 8880030d sth r2,12(r17)
- 426ac: 88c00015 stw r3,0(r17)
- 426b0: 003fb306 br 42580 <__sflush_r+0xb0>
- 426b4: 98800017 ldw r2,0(r19)
- 426b8: 103fea26 beq r2,zero,42664 <__sflush_r+0x194>
- 426bc: 00c00744 movi r3,29
- 426c0: 10c00226 beq r2,r3,426cc <__sflush_r+0x1fc>
- 426c4: 00c00584 movi r3,22
- 426c8: 10c0031e bne r2,r3,426d8 <__sflush_r+0x208>
- 426cc: 9c000015 stw r16,0(r19)
- 426d0: 0005883a mov r2,zero
- 426d4: 003fb306 br 425a4 <__sflush_r+0xd4>
- 426d8: 88c0030b ldhu r3,12(r17)
- 426dc: 3005883a mov r2,r6
- 426e0: 18c01014 ori r3,r3,64
- 426e4: 88c0030d sth r3,12(r17)
- 426e8: 003fae06 br 425a4 <__sflush_r+0xd4>
- 000426ec <_fflush_r>:
- 426ec: defffd04 addi sp,sp,-12
- 426f0: dc000115 stw r16,4(sp)
- 426f4: dfc00215 stw ra,8(sp)
- 426f8: 2021883a mov r16,r4
- 426fc: 20000226 beq r4,zero,42708 <_fflush_r+0x1c>
- 42700: 20800e17 ldw r2,56(r4)
- 42704: 10000c26 beq r2,zero,42738 <_fflush_r+0x4c>
- 42708: 2880030f ldh r2,12(r5)
- 4270c: 1000051e bne r2,zero,42724 <_fflush_r+0x38>
- 42710: 0005883a mov r2,zero
- 42714: dfc00217 ldw ra,8(sp)
- 42718: dc000117 ldw r16,4(sp)
- 4271c: dec00304 addi sp,sp,12
- 42720: f800283a ret
- 42724: 8009883a mov r4,r16
- 42728: dfc00217 ldw ra,8(sp)
- 4272c: dc000117 ldw r16,4(sp)
- 42730: dec00304 addi sp,sp,12
- 42734: 00424d01 jmpi 424d0 <__sflush_r>
- 42738: d9400015 stw r5,0(sp)
- 4273c: 00407740 call 40774 <__sinit>
- 42740: d9400017 ldw r5,0(sp)
- 42744: 003ff006 br 42708 <_fflush_r+0x1c>
- 00042748 <fflush>:
- 42748: 20000526 beq r4,zero,42760 <fflush+0x18>
- 4274c: 00800134 movhi r2,4
- 42750: 109c7204 addi r2,r2,29128
- 42754: 200b883a mov r5,r4
- 42758: 11000017 ldw r4,0(r2)
- 4275c: 00426ec1 jmpi 426ec <_fflush_r>
- 42760: 00800134 movhi r2,4
- 42764: 109c7104 addi r2,r2,29124
- 42768: 11000017 ldw r4,0(r2)
- 4276c: 01400134 movhi r5,4
- 42770: 2949bb04 addi r5,r5,9964
- 42774: 0040d501 jmpi 40d50 <_fwalk_reent>
- 00042778 <_malloc_trim_r>:
- 42778: defffb04 addi sp,sp,-20
- 4277c: dcc00315 stw r19,12(sp)
- 42780: 04c00134 movhi r19,4
- 42784: dc800215 stw r18,8(sp)
- 42788: dc400115 stw r17,4(sp)
- 4278c: dc000015 stw r16,0(sp)
- 42790: dfc00415 stw ra,16(sp)
- 42794: 2821883a mov r16,r5
- 42798: 9cd6ed04 addi r19,r19,23476
- 4279c: 2025883a mov r18,r4
- 427a0: 00436500 call 43650 <__malloc_lock>
- 427a4: 98800217 ldw r2,8(r19)
- 427a8: 14400117 ldw r17,4(r2)
- 427ac: 00bfff04 movi r2,-4
- 427b0: 88a2703a and r17,r17,r2
- 427b4: 8c21c83a sub r16,r17,r16
- 427b8: 8403fbc4 addi r16,r16,4079
- 427bc: 8020d33a srli r16,r16,12
- 427c0: 0083ffc4 movi r2,4095
- 427c4: 843fffc4 addi r16,r16,-1
- 427c8: 8020933a slli r16,r16,12
- 427cc: 1400060e bge r2,r16,427e8 <_malloc_trim_r+0x70>
- 427d0: 000b883a mov r5,zero
- 427d4: 9009883a mov r4,r18
- 427d8: 00420340 call 42034 <_sbrk_r>
- 427dc: 98c00217 ldw r3,8(r19)
- 427e0: 1c47883a add r3,r3,r17
- 427e4: 10c00a26 beq r2,r3,42810 <_malloc_trim_r+0x98>
- 427e8: 9009883a mov r4,r18
- 427ec: 00436740 call 43674 <__malloc_unlock>
- 427f0: 0005883a mov r2,zero
- 427f4: dfc00417 ldw ra,16(sp)
- 427f8: dcc00317 ldw r19,12(sp)
- 427fc: dc800217 ldw r18,8(sp)
- 42800: dc400117 ldw r17,4(sp)
- 42804: dc000017 ldw r16,0(sp)
- 42808: dec00504 addi sp,sp,20
- 4280c: f800283a ret
- 42810: 040bc83a sub r5,zero,r16
- 42814: 9009883a mov r4,r18
- 42818: 00420340 call 42034 <_sbrk_r>
- 4281c: 00ffffc4 movi r3,-1
- 42820: 10c00d26 beq r2,r3,42858 <_malloc_trim_r+0xe0>
- 42824: 00c00174 movhi r3,5
- 42828: 18e32504 addi r3,r3,-29548
- 4282c: 18800017 ldw r2,0(r3)
- 42830: 99000217 ldw r4,8(r19)
- 42834: 8c23c83a sub r17,r17,r16
- 42838: 8c400054 ori r17,r17,1
- 4283c: 1421c83a sub r16,r2,r16
- 42840: 24400115 stw r17,4(r4)
- 42844: 9009883a mov r4,r18
- 42848: 1c000015 stw r16,0(r3)
- 4284c: 00436740 call 43674 <__malloc_unlock>
- 42850: 00800044 movi r2,1
- 42854: 003fe706 br 427f4 <_malloc_trim_r+0x7c>
- 42858: 000b883a mov r5,zero
- 4285c: 9009883a mov r4,r18
- 42860: 00420340 call 42034 <_sbrk_r>
- 42864: 99000217 ldw r4,8(r19)
- 42868: 014003c4 movi r5,15
- 4286c: 1107c83a sub r3,r2,r4
- 42870: 28ffdd0e bge r5,r3,427e8 <_malloc_trim_r+0x70>
- 42874: 01400134 movhi r5,4
- 42878: 295c7304 addi r5,r5,29132
- 4287c: 29400017 ldw r5,0(r5)
- 42880: 18c00054 ori r3,r3,1
- 42884: 20c00115 stw r3,4(r4)
- 42888: 00c00174 movhi r3,5
- 4288c: 1145c83a sub r2,r2,r5
- 42890: 18e32504 addi r3,r3,-29548
- 42894: 18800015 stw r2,0(r3)
- 42898: 003fd306 br 427e8 <_malloc_trim_r+0x70>
- 0004289c <_free_r>:
- 4289c: 28004126 beq r5,zero,429a4 <_free_r+0x108>
- 428a0: defffd04 addi sp,sp,-12
- 428a4: dc400115 stw r17,4(sp)
- 428a8: dc000015 stw r16,0(sp)
- 428ac: 2023883a mov r17,r4
- 428b0: 2821883a mov r16,r5
- 428b4: dfc00215 stw ra,8(sp)
- 428b8: 00436500 call 43650 <__malloc_lock>
- 428bc: 81ffff17 ldw r7,-4(r16)
- 428c0: 00bfff84 movi r2,-2
- 428c4: 01000134 movhi r4,4
- 428c8: 81bffe04 addi r6,r16,-8
- 428cc: 3884703a and r2,r7,r2
- 428d0: 2116ed04 addi r4,r4,23476
- 428d4: 308b883a add r5,r6,r2
- 428d8: 2a400117 ldw r9,4(r5)
- 428dc: 22000217 ldw r8,8(r4)
- 428e0: 00ffff04 movi r3,-4
- 428e4: 48c6703a and r3,r9,r3
- 428e8: 2a005726 beq r5,r8,42a48 <_free_r+0x1ac>
- 428ec: 28c00115 stw r3,4(r5)
- 428f0: 39c0004c andi r7,r7,1
- 428f4: 3800091e bne r7,zero,4291c <_free_r+0x80>
- 428f8: 823ffe17 ldw r8,-8(r16)
- 428fc: 22400204 addi r9,r4,8
- 42900: 320dc83a sub r6,r6,r8
- 42904: 31c00217 ldw r7,8(r6)
- 42908: 1205883a add r2,r2,r8
- 4290c: 3a406526 beq r7,r9,42aa4 <_free_r+0x208>
- 42910: 32000317 ldw r8,12(r6)
- 42914: 3a000315 stw r8,12(r7)
- 42918: 41c00215 stw r7,8(r8)
- 4291c: 28cf883a add r7,r5,r3
- 42920: 39c00117 ldw r7,4(r7)
- 42924: 39c0004c andi r7,r7,1
- 42928: 38003a26 beq r7,zero,42a14 <_free_r+0x178>
- 4292c: 10c00054 ori r3,r2,1
- 42930: 30c00115 stw r3,4(r6)
- 42934: 3087883a add r3,r6,r2
- 42938: 18800015 stw r2,0(r3)
- 4293c: 00c07fc4 movi r3,511
- 42940: 18801936 bltu r3,r2,429a8 <_free_r+0x10c>
- 42944: 1004d0fa srli r2,r2,3
- 42948: 01c00044 movi r7,1
- 4294c: 21400117 ldw r5,4(r4)
- 42950: 10c00044 addi r3,r2,1
- 42954: 18c7883a add r3,r3,r3
- 42958: 1005d0ba srai r2,r2,2
- 4295c: 18c7883a add r3,r3,r3
- 42960: 18c7883a add r3,r3,r3
- 42964: 1907883a add r3,r3,r4
- 42968: 3884983a sll r2,r7,r2
- 4296c: 19c00017 ldw r7,0(r3)
- 42970: 1a3ffe04 addi r8,r3,-8
- 42974: 1144b03a or r2,r2,r5
- 42978: 32000315 stw r8,12(r6)
- 4297c: 31c00215 stw r7,8(r6)
- 42980: 20800115 stw r2,4(r4)
- 42984: 19800015 stw r6,0(r3)
- 42988: 39800315 stw r6,12(r7)
- 4298c: 8809883a mov r4,r17
- 42990: dfc00217 ldw ra,8(sp)
- 42994: dc400117 ldw r17,4(sp)
- 42998: dc000017 ldw r16,0(sp)
- 4299c: dec00304 addi sp,sp,12
- 429a0: 00436741 jmpi 43674 <__malloc_unlock>
- 429a4: f800283a ret
- 429a8: 100ad27a srli r5,r2,9
- 429ac: 00c00104 movi r3,4
- 429b0: 19404a36 bltu r3,r5,42adc <_free_r+0x240>
- 429b4: 100ad1ba srli r5,r2,6
- 429b8: 28c00e44 addi r3,r5,57
- 429bc: 18c7883a add r3,r3,r3
- 429c0: 29400e04 addi r5,r5,56
- 429c4: 18c7883a add r3,r3,r3
- 429c8: 18c7883a add r3,r3,r3
- 429cc: 1909883a add r4,r3,r4
- 429d0: 20c00017 ldw r3,0(r4)
- 429d4: 01c00134 movhi r7,4
- 429d8: 213ffe04 addi r4,r4,-8
- 429dc: 39d6ed04 addi r7,r7,23476
- 429e0: 20c04426 beq r4,r3,42af4 <_free_r+0x258>
- 429e4: 01ffff04 movi r7,-4
- 429e8: 19400117 ldw r5,4(r3)
- 429ec: 29ca703a and r5,r5,r7
- 429f0: 1140022e bgeu r2,r5,429fc <_free_r+0x160>
- 429f4: 18c00217 ldw r3,8(r3)
- 429f8: 20fffb1e bne r4,r3,429e8 <_free_r+0x14c>
- 429fc: 19000317 ldw r4,12(r3)
- 42a00: 31000315 stw r4,12(r6)
- 42a04: 30c00215 stw r3,8(r6)
- 42a08: 21800215 stw r6,8(r4)
- 42a0c: 19800315 stw r6,12(r3)
- 42a10: 003fde06 br 4298c <_free_r+0xf0>
- 42a14: 29c00217 ldw r7,8(r5)
- 42a18: 10c5883a add r2,r2,r3
- 42a1c: 00c00134 movhi r3,4
- 42a20: 18d6ef04 addi r3,r3,23484
- 42a24: 38c03b26 beq r7,r3,42b14 <_free_r+0x278>
- 42a28: 2a000317 ldw r8,12(r5)
- 42a2c: 11400054 ori r5,r2,1
- 42a30: 3087883a add r3,r6,r2
- 42a34: 3a000315 stw r8,12(r7)
- 42a38: 41c00215 stw r7,8(r8)
- 42a3c: 31400115 stw r5,4(r6)
- 42a40: 18800015 stw r2,0(r3)
- 42a44: 003fbd06 br 4293c <_free_r+0xa0>
- 42a48: 39c0004c andi r7,r7,1
- 42a4c: 10c5883a add r2,r2,r3
- 42a50: 3800071e bne r7,zero,42a70 <_free_r+0x1d4>
- 42a54: 81fffe17 ldw r7,-8(r16)
- 42a58: 31cdc83a sub r6,r6,r7
- 42a5c: 30c00317 ldw r3,12(r6)
- 42a60: 31400217 ldw r5,8(r6)
- 42a64: 11c5883a add r2,r2,r7
- 42a68: 28c00315 stw r3,12(r5)
- 42a6c: 19400215 stw r5,8(r3)
- 42a70: 10c00054 ori r3,r2,1
- 42a74: 30c00115 stw r3,4(r6)
- 42a78: 00c00134 movhi r3,4
- 42a7c: 18dc7404 addi r3,r3,29136
- 42a80: 18c00017 ldw r3,0(r3)
- 42a84: 21800215 stw r6,8(r4)
- 42a88: 10ffc036 bltu r2,r3,4298c <_free_r+0xf0>
- 42a8c: 00800174 movhi r2,5
- 42a90: 10a31c04 addi r2,r2,-29584
- 42a94: 11400017 ldw r5,0(r2)
- 42a98: 8809883a mov r4,r17
- 42a9c: 00427780 call 42778 <_malloc_trim_r>
- 42aa0: 003fba06 br 4298c <_free_r+0xf0>
- 42aa4: 28c9883a add r4,r5,r3
- 42aa8: 21000117 ldw r4,4(r4)
- 42aac: 2100004c andi r4,r4,1
- 42ab0: 2000391e bne r4,zero,42b98 <_free_r+0x2fc>
- 42ab4: 29c00217 ldw r7,8(r5)
- 42ab8: 29000317 ldw r4,12(r5)
- 42abc: 1885883a add r2,r3,r2
- 42ac0: 10c00054 ori r3,r2,1
- 42ac4: 39000315 stw r4,12(r7)
- 42ac8: 21c00215 stw r7,8(r4)
- 42acc: 30c00115 stw r3,4(r6)
- 42ad0: 308d883a add r6,r6,r2
- 42ad4: 30800015 stw r2,0(r6)
- 42ad8: 003fac06 br 4298c <_free_r+0xf0>
- 42adc: 00c00504 movi r3,20
- 42ae0: 19401536 bltu r3,r5,42b38 <_free_r+0x29c>
- 42ae4: 28c01704 addi r3,r5,92
- 42ae8: 18c7883a add r3,r3,r3
- 42aec: 294016c4 addi r5,r5,91
- 42af0: 003fb406 br 429c4 <_free_r+0x128>
- 42af4: 280bd0ba srai r5,r5,2
- 42af8: 00c00044 movi r3,1
- 42afc: 38800117 ldw r2,4(r7)
- 42b00: 194a983a sll r5,r3,r5
- 42b04: 2007883a mov r3,r4
- 42b08: 2884b03a or r2,r5,r2
- 42b0c: 38800115 stw r2,4(r7)
- 42b10: 003fbb06 br 42a00 <_free_r+0x164>
- 42b14: 21800515 stw r6,20(r4)
- 42b18: 21800415 stw r6,16(r4)
- 42b1c: 10c00054 ori r3,r2,1
- 42b20: 31c00315 stw r7,12(r6)
- 42b24: 31c00215 stw r7,8(r6)
- 42b28: 30c00115 stw r3,4(r6)
- 42b2c: 308d883a add r6,r6,r2
- 42b30: 30800015 stw r2,0(r6)
- 42b34: 003f9506 br 4298c <_free_r+0xf0>
- 42b38: 00c01504 movi r3,84
- 42b3c: 19400536 bltu r3,r5,42b54 <_free_r+0x2b8>
- 42b40: 100ad33a srli r5,r2,12
- 42b44: 28c01bc4 addi r3,r5,111
- 42b48: 18c7883a add r3,r3,r3
- 42b4c: 29401b84 addi r5,r5,110
- 42b50: 003f9c06 br 429c4 <_free_r+0x128>
- 42b54: 00c05504 movi r3,340
- 42b58: 19400536 bltu r3,r5,42b70 <_free_r+0x2d4>
- 42b5c: 100ad3fa srli r5,r2,15
- 42b60: 28c01e04 addi r3,r5,120
- 42b64: 18c7883a add r3,r3,r3
- 42b68: 29401dc4 addi r5,r5,119
- 42b6c: 003f9506 br 429c4 <_free_r+0x128>
- 42b70: 00c15504 movi r3,1364
- 42b74: 19400536 bltu r3,r5,42b8c <_free_r+0x2f0>
- 42b78: 100ad4ba srli r5,r2,18
- 42b7c: 28c01f44 addi r3,r5,125
- 42b80: 18c7883a add r3,r3,r3
- 42b84: 29401f04 addi r5,r5,124
- 42b88: 003f8e06 br 429c4 <_free_r+0x128>
- 42b8c: 00c03f84 movi r3,254
- 42b90: 01401f84 movi r5,126
- 42b94: 003f8b06 br 429c4 <_free_r+0x128>
- 42b98: 10c00054 ori r3,r2,1
- 42b9c: 30c00115 stw r3,4(r6)
- 42ba0: 308d883a add r6,r6,r2
- 42ba4: 30800015 stw r2,0(r6)
- 42ba8: 003f7806 br 4298c <_free_r+0xf0>
- 00042bac <_lseek_r>:
- 42bac: defffd04 addi sp,sp,-12
- 42bb0: 2805883a mov r2,r5
- 42bb4: dc000015 stw r16,0(sp)
- 42bb8: 04000174 movhi r16,5
- 42bbc: dc400115 stw r17,4(sp)
- 42bc0: 300b883a mov r5,r6
- 42bc4: 84231d04 addi r16,r16,-29580
- 42bc8: 2023883a mov r17,r4
- 42bcc: 380d883a mov r6,r7
- 42bd0: 1009883a mov r4,r2
- 42bd4: dfc00215 stw ra,8(sp)
- 42bd8: 80000015 stw zero,0(r16)
- 42bdc: 00434f80 call 434f8 <lseek>
- 42be0: 00ffffc4 movi r3,-1
- 42be4: 10c00526 beq r2,r3,42bfc <_lseek_r+0x50>
- 42be8: dfc00217 ldw ra,8(sp)
- 42bec: dc400117 ldw r17,4(sp)
- 42bf0: dc000017 ldw r16,0(sp)
- 42bf4: dec00304 addi sp,sp,12
- 42bf8: f800283a ret
- 42bfc: 80c00017 ldw r3,0(r16)
- 42c00: 183ff926 beq r3,zero,42be8 <_lseek_r+0x3c>
- 42c04: 88c00015 stw r3,0(r17)
- 42c08: 003ff706 br 42be8 <_lseek_r+0x3c>
- 00042c0c <__smakebuf_r>:
- 42c0c: 2880030b ldhu r2,12(r5)
- 42c10: 10c0008c andi r3,r2,2
- 42c14: 1800411e bne r3,zero,42d1c <__smakebuf_r+0x110>
- 42c18: deffec04 addi sp,sp,-80
- 42c1c: dc000f15 stw r16,60(sp)
- 42c20: 2821883a mov r16,r5
- 42c24: 2940038f ldh r5,14(r5)
- 42c28: dc401015 stw r17,64(sp)
- 42c2c: dfc01315 stw ra,76(sp)
- 42c30: dcc01215 stw r19,72(sp)
- 42c34: dc801115 stw r18,68(sp)
- 42c38: 2023883a mov r17,r4
- 42c3c: 28001c16 blt r5,zero,42cb0 <__smakebuf_r+0xa4>
- 42c40: d80d883a mov r6,sp
- 42c44: 0042e280 call 42e28 <_fstat_r>
- 42c48: 10001816 blt r2,zero,42cac <__smakebuf_r+0xa0>
- 42c4c: d8800117 ldw r2,4(sp)
- 42c50: 00e00014 movui r3,32768
- 42c54: 10bc000c andi r2,r2,61440
- 42c58: 14c80020 cmpeqi r19,r2,8192
- 42c5c: 10c03726 beq r2,r3,42d3c <__smakebuf_r+0x130>
- 42c60: 80c0030b ldhu r3,12(r16)
- 42c64: 18c20014 ori r3,r3,2048
- 42c68: 80c0030d sth r3,12(r16)
- 42c6c: 00c80004 movi r3,8192
- 42c70: 10c0521e bne r2,r3,42dbc <__smakebuf_r+0x1b0>
- 42c74: 8140038f ldh r5,14(r16)
- 42c78: 8809883a mov r4,r17
- 42c7c: 0042e840 call 42e84 <_isatty_r>
- 42c80: 10004c26 beq r2,zero,42db4 <__smakebuf_r+0x1a8>
- 42c84: 8080030b ldhu r2,12(r16)
- 42c88: 80c010c4 addi r3,r16,67
- 42c8c: 80c00015 stw r3,0(r16)
- 42c90: 10800054 ori r2,r2,1
- 42c94: 8080030d sth r2,12(r16)
- 42c98: 00800044 movi r2,1
- 42c9c: 80c00415 stw r3,16(r16)
- 42ca0: 80800515 stw r2,20(r16)
- 42ca4: 04810004 movi r18,1024
- 42ca8: 00000706 br 42cc8 <__smakebuf_r+0xbc>
- 42cac: 8080030b ldhu r2,12(r16)
- 42cb0: 10c0200c andi r3,r2,128
- 42cb4: 18001f1e bne r3,zero,42d34 <__smakebuf_r+0x128>
- 42cb8: 04810004 movi r18,1024
- 42cbc: 10820014 ori r2,r2,2048
- 42cc0: 8080030d sth r2,12(r16)
- 42cc4: 0027883a mov r19,zero
- 42cc8: 900b883a mov r5,r18
- 42ccc: 8809883a mov r4,r17
- 42cd0: 0040e140 call 40e14 <_malloc_r>
- 42cd4: 10002c26 beq r2,zero,42d88 <__smakebuf_r+0x17c>
- 42cd8: 80c0030b ldhu r3,12(r16)
- 42cdc: 01000134 movhi r4,4
- 42ce0: 21010704 addi r4,r4,1052
- 42ce4: 89000f15 stw r4,60(r17)
- 42ce8: 18c02014 ori r3,r3,128
- 42cec: 80c0030d sth r3,12(r16)
- 42cf0: 80800015 stw r2,0(r16)
- 42cf4: 80800415 stw r2,16(r16)
- 42cf8: 84800515 stw r18,20(r16)
- 42cfc: 98001a1e bne r19,zero,42d68 <__smakebuf_r+0x15c>
- 42d00: dfc01317 ldw ra,76(sp)
- 42d04: dcc01217 ldw r19,72(sp)
- 42d08: dc801117 ldw r18,68(sp)
- 42d0c: dc401017 ldw r17,64(sp)
- 42d10: dc000f17 ldw r16,60(sp)
- 42d14: dec01404 addi sp,sp,80
- 42d18: f800283a ret
- 42d1c: 288010c4 addi r2,r5,67
- 42d20: 28800015 stw r2,0(r5)
- 42d24: 28800415 stw r2,16(r5)
- 42d28: 00800044 movi r2,1
- 42d2c: 28800515 stw r2,20(r5)
- 42d30: f800283a ret
- 42d34: 04801004 movi r18,64
- 42d38: 003fe006 br 42cbc <__smakebuf_r+0xb0>
- 42d3c: 81000a17 ldw r4,40(r16)
- 42d40: 00c00134 movhi r3,4
- 42d44: 18c85804 addi r3,r3,8544
- 42d48: 20ffc51e bne r4,r3,42c60 <__smakebuf_r+0x54>
- 42d4c: 8080030b ldhu r2,12(r16)
- 42d50: 04810004 movi r18,1024
- 42d54: 84801315 stw r18,76(r16)
- 42d58: 1484b03a or r2,r2,r18
- 42d5c: 8080030d sth r2,12(r16)
- 42d60: 0027883a mov r19,zero
- 42d64: 003fd806 br 42cc8 <__smakebuf_r+0xbc>
- 42d68: 8140038f ldh r5,14(r16)
- 42d6c: 8809883a mov r4,r17
- 42d70: 0042e840 call 42e84 <_isatty_r>
- 42d74: 103fe226 beq r2,zero,42d00 <__smakebuf_r+0xf4>
- 42d78: 8080030b ldhu r2,12(r16)
- 42d7c: 10800054 ori r2,r2,1
- 42d80: 8080030d sth r2,12(r16)
- 42d84: 003fde06 br 42d00 <__smakebuf_r+0xf4>
- 42d88: 8080030b ldhu r2,12(r16)
- 42d8c: 10c0800c andi r3,r2,512
- 42d90: 183fdb1e bne r3,zero,42d00 <__smakebuf_r+0xf4>
- 42d94: 10800094 ori r2,r2,2
- 42d98: 80c010c4 addi r3,r16,67
- 42d9c: 8080030d sth r2,12(r16)
- 42da0: 00800044 movi r2,1
- 42da4: 80c00015 stw r3,0(r16)
- 42da8: 80c00415 stw r3,16(r16)
- 42dac: 80800515 stw r2,20(r16)
- 42db0: 003fd306 br 42d00 <__smakebuf_r+0xf4>
- 42db4: 04810004 movi r18,1024
- 42db8: 003fc306 br 42cc8 <__smakebuf_r+0xbc>
- 42dbc: 0027883a mov r19,zero
- 42dc0: 04810004 movi r18,1024
- 42dc4: 003fc006 br 42cc8 <__smakebuf_r+0xbc>
- 00042dc8 <_read_r>:
- 42dc8: defffd04 addi sp,sp,-12
- 42dcc: 2805883a mov r2,r5
- 42dd0: dc000015 stw r16,0(sp)
- 42dd4: 04000174 movhi r16,5
- 42dd8: dc400115 stw r17,4(sp)
- 42ddc: 300b883a mov r5,r6
- 42de0: 84231d04 addi r16,r16,-29580
- 42de4: 2023883a mov r17,r4
- 42de8: 380d883a mov r6,r7
- 42dec: 1009883a mov r4,r2
- 42df0: dfc00215 stw ra,8(sp)
- 42df4: 80000015 stw zero,0(r16)
- 42df8: 00436d40 call 436d4 <read>
- 42dfc: 00ffffc4 movi r3,-1
- 42e00: 10c00526 beq r2,r3,42e18 <_read_r+0x50>
- 42e04: dfc00217 ldw ra,8(sp)
- 42e08: dc400117 ldw r17,4(sp)
- 42e0c: dc000017 ldw r16,0(sp)
- 42e10: dec00304 addi sp,sp,12
- 42e14: f800283a ret
- 42e18: 80c00017 ldw r3,0(r16)
- 42e1c: 183ff926 beq r3,zero,42e04 <_read_r+0x3c>
- 42e20: 88c00015 stw r3,0(r17)
- 42e24: 003ff706 br 42e04 <_read_r+0x3c>
- 00042e28 <_fstat_r>:
- 42e28: defffd04 addi sp,sp,-12
- 42e2c: 2805883a mov r2,r5
- 42e30: dc000015 stw r16,0(sp)
- 42e34: 04000174 movhi r16,5
- 42e38: dc400115 stw r17,4(sp)
- 42e3c: 84231d04 addi r16,r16,-29580
- 42e40: 2023883a mov r17,r4
- 42e44: 300b883a mov r5,r6
- 42e48: 1009883a mov r4,r2
- 42e4c: dfc00215 stw ra,8(sp)
- 42e50: 80000015 stw zero,0(r16)
- 42e54: 00432300 call 43230 <fstat>
- 42e58: 00ffffc4 movi r3,-1
- 42e5c: 10c00526 beq r2,r3,42e74 <_fstat_r+0x4c>
- 42e60: dfc00217 ldw ra,8(sp)
- 42e64: dc400117 ldw r17,4(sp)
- 42e68: dc000017 ldw r16,0(sp)
- 42e6c: dec00304 addi sp,sp,12
- 42e70: f800283a ret
- 42e74: 80c00017 ldw r3,0(r16)
- 42e78: 183ff926 beq r3,zero,42e60 <_fstat_r+0x38>
- 42e7c: 88c00015 stw r3,0(r17)
- 42e80: 003ff706 br 42e60 <_fstat_r+0x38>
- 00042e84 <_isatty_r>:
- 42e84: defffd04 addi sp,sp,-12
- 42e88: dc000015 stw r16,0(sp)
- 42e8c: 04000174 movhi r16,5
- 42e90: dc400115 stw r17,4(sp)
- 42e94: 84231d04 addi r16,r16,-29580
- 42e98: 2023883a mov r17,r4
- 42e9c: 2809883a mov r4,r5
- 42ea0: dfc00215 stw ra,8(sp)
- 42ea4: 80000015 stw zero,0(r16)
- 42ea8: 00433240 call 43324 <isatty>
- 42eac: 00ffffc4 movi r3,-1
- 42eb0: 10c00526 beq r2,r3,42ec8 <_isatty_r+0x44>
- 42eb4: dfc00217 ldw ra,8(sp)
- 42eb8: dc400117 ldw r17,4(sp)
- 42ebc: dc000017 ldw r16,0(sp)
- 42ec0: dec00304 addi sp,sp,12
- 42ec4: f800283a ret
- 42ec8: 80c00017 ldw r3,0(r16)
- 42ecc: 183ff926 beq r3,zero,42eb4 <_isatty_r+0x30>
- 42ed0: 88c00015 stw r3,0(r17)
- 42ed4: 003ff706 br 42eb4 <_isatty_r+0x30>
- 00042ed8 <__divsi3>:
- 42ed8: 20001b16 blt r4,zero,42f48 <__divsi3+0x70>
- 42edc: 000f883a mov r7,zero
- 42ee0: 28001616 blt r5,zero,42f3c <__divsi3+0x64>
- 42ee4: 200d883a mov r6,r4
- 42ee8: 29001a2e bgeu r5,r4,42f54 <__divsi3+0x7c>
- 42eec: 00800804 movi r2,32
- 42ef0: 00c00044 movi r3,1
- 42ef4: 00000106 br 42efc <__divsi3+0x24>
- 42ef8: 10000d26 beq r2,zero,42f30 <__divsi3+0x58>
- 42efc: 294b883a add r5,r5,r5
- 42f00: 10bfffc4 addi r2,r2,-1
- 42f04: 18c7883a add r3,r3,r3
- 42f08: 293ffb36 bltu r5,r4,42ef8 <__divsi3+0x20>
- 42f0c: 0005883a mov r2,zero
- 42f10: 18000726 beq r3,zero,42f30 <__divsi3+0x58>
- 42f14: 0005883a mov r2,zero
- 42f18: 31400236 bltu r6,r5,42f24 <__divsi3+0x4c>
- 42f1c: 314dc83a sub r6,r6,r5
- 42f20: 10c4b03a or r2,r2,r3
- 42f24: 1806d07a srli r3,r3,1
- 42f28: 280ad07a srli r5,r5,1
- 42f2c: 183ffa1e bne r3,zero,42f18 <__divsi3+0x40>
- 42f30: 38000126 beq r7,zero,42f38 <__divsi3+0x60>
- 42f34: 0085c83a sub r2,zero,r2
- 42f38: f800283a ret
- 42f3c: 014bc83a sub r5,zero,r5
- 42f40: 39c0005c xori r7,r7,1
- 42f44: 003fe706 br 42ee4 <__divsi3+0xc>
- 42f48: 0109c83a sub r4,zero,r4
- 42f4c: 01c00044 movi r7,1
- 42f50: 003fe306 br 42ee0 <__divsi3+0x8>
- 42f54: 00c00044 movi r3,1
- 42f58: 003fee06 br 42f14 <__divsi3+0x3c>
- 00042f5c <__modsi3>:
- 42f5c: 20001716 blt r4,zero,42fbc <__modsi3+0x60>
- 42f60: 000f883a mov r7,zero
- 42f64: 2005883a mov r2,r4
- 42f68: 28001216 blt r5,zero,42fb4 <__modsi3+0x58>
- 42f6c: 2900162e bgeu r5,r4,42fc8 <__modsi3+0x6c>
- 42f70: 01800804 movi r6,32
- 42f74: 00c00044 movi r3,1
- 42f78: 00000106 br 42f80 <__modsi3+0x24>
- 42f7c: 30000a26 beq r6,zero,42fa8 <__modsi3+0x4c>
- 42f80: 294b883a add r5,r5,r5
- 42f84: 31bfffc4 addi r6,r6,-1
- 42f88: 18c7883a add r3,r3,r3
- 42f8c: 293ffb36 bltu r5,r4,42f7c <__modsi3+0x20>
- 42f90: 18000526 beq r3,zero,42fa8 <__modsi3+0x4c>
- 42f94: 1806d07a srli r3,r3,1
- 42f98: 11400136 bltu r2,r5,42fa0 <__modsi3+0x44>
- 42f9c: 1145c83a sub r2,r2,r5
- 42fa0: 280ad07a srli r5,r5,1
- 42fa4: 183ffb1e bne r3,zero,42f94 <__modsi3+0x38>
- 42fa8: 38000126 beq r7,zero,42fb0 <__modsi3+0x54>
- 42fac: 0085c83a sub r2,zero,r2
- 42fb0: f800283a ret
- 42fb4: 014bc83a sub r5,zero,r5
- 42fb8: 003fec06 br 42f6c <__modsi3+0x10>
- 42fbc: 0109c83a sub r4,zero,r4
- 42fc0: 01c00044 movi r7,1
- 42fc4: 003fe706 br 42f64 <__modsi3+0x8>
- 42fc8: 00c00044 movi r3,1
- 42fcc: 003ff106 br 42f94 <__modsi3+0x38>
- 00042fd0 <__udivsi3>:
- 42fd0: 200d883a mov r6,r4
- 42fd4: 2900152e bgeu r5,r4,4302c <__udivsi3+0x5c>
- 42fd8: 28001416 blt r5,zero,4302c <__udivsi3+0x5c>
- 42fdc: 00800804 movi r2,32
- 42fe0: 00c00044 movi r3,1
- 42fe4: 00000206 br 42ff0 <__udivsi3+0x20>
- 42fe8: 10000e26 beq r2,zero,43024 <__udivsi3+0x54>
- 42fec: 28000516 blt r5,zero,43004 <__udivsi3+0x34>
- 42ff0: 294b883a add r5,r5,r5
- 42ff4: 10bfffc4 addi r2,r2,-1
- 42ff8: 18c7883a add r3,r3,r3
- 42ffc: 293ffa36 bltu r5,r4,42fe8 <__udivsi3+0x18>
- 43000: 18000826 beq r3,zero,43024 <__udivsi3+0x54>
- 43004: 0005883a mov r2,zero
- 43008: 31400236 bltu r6,r5,43014 <__udivsi3+0x44>
- 4300c: 314dc83a sub r6,r6,r5
- 43010: 10c4b03a or r2,r2,r3
- 43014: 1806d07a srli r3,r3,1
- 43018: 280ad07a srli r5,r5,1
- 4301c: 183ffa1e bne r3,zero,43008 <__udivsi3+0x38>
- 43020: f800283a ret
- 43024: 0005883a mov r2,zero
- 43028: f800283a ret
- 4302c: 00c00044 movi r3,1
- 43030: 003ff406 br 43004 <__udivsi3+0x34>
- 00043034 <__umodsi3>:
- 43034: 2005883a mov r2,r4
- 43038: 2900122e bgeu r5,r4,43084 <__umodsi3+0x50>
- 4303c: 28001116 blt r5,zero,43084 <__umodsi3+0x50>
- 43040: 01800804 movi r6,32
- 43044: 00c00044 movi r3,1
- 43048: 00000206 br 43054 <__umodsi3+0x20>
- 4304c: 30000c26 beq r6,zero,43080 <__umodsi3+0x4c>
- 43050: 28000516 blt r5,zero,43068 <__umodsi3+0x34>
- 43054: 294b883a add r5,r5,r5
- 43058: 31bfffc4 addi r6,r6,-1
- 4305c: 18c7883a add r3,r3,r3
- 43060: 293ffa36 bltu r5,r4,4304c <__umodsi3+0x18>
- 43064: 18000626 beq r3,zero,43080 <__umodsi3+0x4c>
- 43068: 1806d07a srli r3,r3,1
- 4306c: 11400136 bltu r2,r5,43074 <__umodsi3+0x40>
- 43070: 1145c83a sub r2,r2,r5
- 43074: 280ad07a srli r5,r5,1
- 43078: 183ffb1e bne r3,zero,43068 <__umodsi3+0x34>
- 4307c: f800283a ret
- 43080: f800283a ret
- 43084: 00c00044 movi r3,1
- 43088: 003ff706 br 43068 <__umodsi3+0x34>
- 0004308c <__mulsi3>:
- 4308c: 0005883a mov r2,zero
- 43090: 20000726 beq r4,zero,430b0 <__mulsi3+0x24>
- 43094: 20c0004c andi r3,r4,1
- 43098: 2008d07a srli r4,r4,1
- 4309c: 18000126 beq r3,zero,430a4 <__mulsi3+0x18>
- 430a0: 1145883a add r2,r2,r5
- 430a4: 294b883a add r5,r5,r5
- 430a8: 203ffa1e bne r4,zero,43094 <__mulsi3+0x8>
- 430ac: f800283a ret
- 430b0: f800283a ret
- 000430b4 <alt_get_errno>:
- #undef errno
- extern int errno;
- static ALT_INLINE int* alt_get_errno(void)
- {
- 430b4: defffe04 addi sp,sp,-8
- 430b8: dfc00115 stw ra,4(sp)
- 430bc: df000015 stw fp,0(sp)
- 430c0: d839883a mov fp,sp
- return ((alt_errno) ? alt_errno() : &errno);
- 430c4: d0a00917 ldw r2,-32732(gp)
- 430c8: 10000326 beq r2,zero,430d8 <alt_get_errno+0x24>
- 430cc: d0a00917 ldw r2,-32732(gp)
- 430d0: 103ee83a callr r2
- 430d4: 00000106 br 430dc <alt_get_errno+0x28>
- 430d8: d0a6ac04 addi r2,gp,-25936
- }
- 430dc: e037883a mov sp,fp
- 430e0: dfc00117 ldw ra,4(sp)
- 430e4: df000017 ldw fp,0(sp)
- 430e8: dec00204 addi sp,sp,8
- 430ec: f800283a ret
- 000430f0 <close>:
- *
- * ALT_CLOSE is mapped onto the close() system call in alt_syscall.h
- */
-
- int ALT_CLOSE (int fildes)
- {
- 430f0: defffb04 addi sp,sp,-20
- 430f4: dfc00415 stw ra,16(sp)
- 430f8: df000315 stw fp,12(sp)
- 430fc: df000304 addi fp,sp,12
- 43100: e13fff15 stw r4,-4(fp)
- * A common error case is that when the file descriptor was created, the call
- * to open() failed resulting in a negative file descriptor. This is trapped
- * below so that we don't try and process an invalid file descriptor.
- */
- fd = (fildes < 0) ? NULL : &alt_fd_list[fildes];
- 43104: e0bfff17 ldw r2,-4(fp)
- 43108: 10000816 blt r2,zero,4312c <close+0x3c>
- 4310c: 01400304 movi r5,12
- 43110: e13fff17 ldw r4,-4(fp)
- 43114: 004308c0 call 4308c <__mulsi3>
- 43118: 1007883a mov r3,r2
- 4311c: 00800134 movhi r2,4
- 43120: 1097f904 addi r2,r2,24548
- 43124: 1885883a add r2,r3,r2
- 43128: 00000106 br 43130 <close+0x40>
- 4312c: 0005883a mov r2,zero
- 43130: e0bffd15 stw r2,-12(fp)
- if (fd)
- 43134: e0bffd17 ldw r2,-12(fp)
- 43138: 10001926 beq r2,zero,431a0 <close+0xb0>
- /*
- * If the associated file system/device has a close function, call it so
- * that any necessary cleanup code can run.
- */
- rval = (fd->dev->close) ? fd->dev->close(fd) : 0;
- 4313c: e0bffd17 ldw r2,-12(fp)
- 43140: 10800017 ldw r2,0(r2)
- 43144: 10800417 ldw r2,16(r2)
- 43148: 10000626 beq r2,zero,43164 <close+0x74>
- 4314c: e0bffd17 ldw r2,-12(fp)
- 43150: 10800017 ldw r2,0(r2)
- 43154: 10800417 ldw r2,16(r2)
- 43158: e13ffd17 ldw r4,-12(fp)
- 4315c: 103ee83a callr r2
- 43160: 00000106 br 43168 <close+0x78>
- 43164: 0005883a mov r2,zero
- 43168: e0bffe15 stw r2,-8(fp)
- /* Free the file descriptor structure and return. */
- alt_release_fd (fildes);
- 4316c: e13fff17 ldw r4,-4(fp)
- 43170: 00437d80 call 437d8 <alt_release_fd>
- if (rval < 0)
- 43174: e0bffe17 ldw r2,-8(fp)
- 43178: 1000070e bge r2,zero,43198 <close+0xa8>
- {
- ALT_ERRNO = -rval;
- 4317c: 00430b40 call 430b4 <alt_get_errno>
- 43180: 1007883a mov r3,r2
- 43184: e0bffe17 ldw r2,-8(fp)
- 43188: 0085c83a sub r2,zero,r2
- 4318c: 18800015 stw r2,0(r3)
- return -1;
- 43190: 00bfffc4 movi r2,-1
- 43194: 00000706 br 431b4 <close+0xc4>
- }
- return 0;
- 43198: 0005883a mov r2,zero
- 4319c: 00000506 br 431b4 <close+0xc4>
- }
- else
- {
- ALT_ERRNO = EBADFD;
- 431a0: 00430b40 call 430b4 <alt_get_errno>
- 431a4: 1007883a mov r3,r2
- 431a8: 00801444 movi r2,81
- 431ac: 18800015 stw r2,0(r3)
- return -1;
- 431b0: 00bfffc4 movi r2,-1
- }
- }
- 431b4: e037883a mov sp,fp
- 431b8: dfc00117 ldw ra,4(sp)
- 431bc: df000017 ldw fp,0(sp)
- 431c0: dec00204 addi sp,sp,8
- 431c4: f800283a ret
- 000431c8 <alt_dev_null_write>:
- * by the alt_dev_null device. It simple discards all data passed to it, and
- * indicates that the data has been successfully transmitted.
- */
- static int alt_dev_null_write (alt_fd* fd, const char* ptr, int len)
- {
- 431c8: defffc04 addi sp,sp,-16
- 431cc: df000315 stw fp,12(sp)
- 431d0: df000304 addi fp,sp,12
- 431d4: e13ffd15 stw r4,-12(fp)
- 431d8: e17ffe15 stw r5,-8(fp)
- 431dc: e1bfff15 stw r6,-4(fp)
- return len;
- 431e0: e0bfff17 ldw r2,-4(fp)
- }
- 431e4: e037883a mov sp,fp
- 431e8: df000017 ldw fp,0(sp)
- 431ec: dec00104 addi sp,sp,4
- 431f0: f800283a ret
- 000431f4 <alt_get_errno>:
- #undef errno
- extern int errno;
- static ALT_INLINE int* alt_get_errno(void)
- {
- 431f4: defffe04 addi sp,sp,-8
- 431f8: dfc00115 stw ra,4(sp)
- 431fc: df000015 stw fp,0(sp)
- 43200: d839883a mov fp,sp
- return ((alt_errno) ? alt_errno() : &errno);
- 43204: d0a00917 ldw r2,-32732(gp)
- 43208: 10000326 beq r2,zero,43218 <alt_get_errno+0x24>
- 4320c: d0a00917 ldw r2,-32732(gp)
- 43210: 103ee83a callr r2
- 43214: 00000106 br 4321c <alt_get_errno+0x28>
- 43218: d0a6ac04 addi r2,gp,-25936
- }
- 4321c: e037883a mov sp,fp
- 43220: dfc00117 ldw ra,4(sp)
- 43224: df000017 ldw fp,0(sp)
- 43228: dec00204 addi sp,sp,8
- 4322c: f800283a ret
- 00043230 <fstat>:
- }
- #else /* !ALT_USE_DIRECT_DRIVERS */
- int ALT_FSTAT (int file, struct stat *st)
- {
- 43230: defffb04 addi sp,sp,-20
- 43234: dfc00415 stw ra,16(sp)
- 43238: df000315 stw fp,12(sp)
- 4323c: df000304 addi fp,sp,12
- 43240: e13ffe15 stw r4,-8(fp)
- 43244: e17fff15 stw r5,-4(fp)
- * A common error case is that when the file descriptor was created, the call
- * to open() failed resulting in a negative file descriptor. This is trapped
- * below so that we don't try and process an invalid file descriptor.
- */
- fd = (file < 0) ? NULL : &alt_fd_list[file];
- 43248: e0bffe17 ldw r2,-8(fp)
- 4324c: 10000816 blt r2,zero,43270 <fstat+0x40>
- 43250: 01400304 movi r5,12
- 43254: e13ffe17 ldw r4,-8(fp)
- 43258: 004308c0 call 4308c <__mulsi3>
- 4325c: 1007883a mov r3,r2
- 43260: 00800134 movhi r2,4
- 43264: 1097f904 addi r2,r2,24548
- 43268: 1885883a add r2,r3,r2
- 4326c: 00000106 br 43274 <fstat+0x44>
- 43270: 0005883a mov r2,zero
- 43274: e0bffd15 stw r2,-12(fp)
-
- if (fd)
- 43278: e0bffd17 ldw r2,-12(fp)
- 4327c: 10001026 beq r2,zero,432c0 <fstat+0x90>
- {
- /* Call the drivers fstat() function to fill out the "st" structure. */
- if (fd->dev->fstat)
- 43280: e0bffd17 ldw r2,-12(fp)
- 43284: 10800017 ldw r2,0(r2)
- 43288: 10800817 ldw r2,32(r2)
- 4328c: 10000726 beq r2,zero,432ac <fstat+0x7c>
- {
- return fd->dev->fstat(fd, st);
- 43290: e0bffd17 ldw r2,-12(fp)
- 43294: 10800017 ldw r2,0(r2)
- 43298: 10800817 ldw r2,32(r2)
- 4329c: e17fff17 ldw r5,-4(fp)
- 432a0: e13ffd17 ldw r4,-12(fp)
- 432a4: 103ee83a callr r2
- 432a8: 00000a06 br 432d4 <fstat+0xa4>
- * device.
- */
-
- else
- {
- st->st_mode = _IFCHR;
- 432ac: e0bfff17 ldw r2,-4(fp)
- 432b0: 00c80004 movi r3,8192
- 432b4: 10c00115 stw r3,4(r2)
- return 0;
- 432b8: 0005883a mov r2,zero
- 432bc: 00000506 br 432d4 <fstat+0xa4>
- }
- }
- else
- {
- ALT_ERRNO = EBADFD;
- 432c0: 00431f40 call 431f4 <alt_get_errno>
- 432c4: 1007883a mov r3,r2
- 432c8: 00801444 movi r2,81
- 432cc: 18800015 stw r2,0(r3)
- return -1;
- 432d0: 00bfffc4 movi r2,-1
- }
- }
- 432d4: e037883a mov sp,fp
- 432d8: dfc00117 ldw ra,4(sp)
- 432dc: df000017 ldw fp,0(sp)
- 432e0: dec00204 addi sp,sp,8
- 432e4: f800283a ret
- 000432e8 <alt_get_errno>:
- #undef errno
- extern int errno;
- static ALT_INLINE int* alt_get_errno(void)
- {
- 432e8: defffe04 addi sp,sp,-8
- 432ec: dfc00115 stw ra,4(sp)
- 432f0: df000015 stw fp,0(sp)
- 432f4: d839883a mov fp,sp
- return ((alt_errno) ? alt_errno() : &errno);
- 432f8: d0a00917 ldw r2,-32732(gp)
- 432fc: 10000326 beq r2,zero,4330c <alt_get_errno+0x24>
- 43300: d0a00917 ldw r2,-32732(gp)
- 43304: 103ee83a callr r2
- 43308: 00000106 br 43310 <alt_get_errno+0x28>
- 4330c: d0a6ac04 addi r2,gp,-25936
- }
- 43310: e037883a mov sp,fp
- 43314: dfc00117 ldw ra,4(sp)
- 43318: df000017 ldw fp,0(sp)
- 4331c: dec00204 addi sp,sp,8
- 43320: f800283a ret
- 00043324 <isatty>:
- *
- * ALT_ISATTY is mapped onto the isatty() system call in alt_syscall.h
- */
-
- int ALT_ISATTY (int file)
- {
- 43324: deffed04 addi sp,sp,-76
- 43328: dfc01215 stw ra,72(sp)
- 4332c: df001115 stw fp,68(sp)
- 43330: df001104 addi fp,sp,68
- 43334: e13fff15 stw r4,-4(fp)
- * A common error case is that when the file descriptor was created, the call
- * to open() failed resulting in a negative file descriptor. This is trapped
- * below so that we don't try and process an invalid file descriptor.
- */
- fd = (file < 0) ? NULL : &alt_fd_list[file];
- 43338: e0bfff17 ldw r2,-4(fp)
- 4333c: 10000816 blt r2,zero,43360 <isatty+0x3c>
- 43340: 01400304 movi r5,12
- 43344: e13fff17 ldw r4,-4(fp)
- 43348: 004308c0 call 4308c <__mulsi3>
- 4334c: 1007883a mov r3,r2
- 43350: 00800134 movhi r2,4
- 43354: 1097f904 addi r2,r2,24548
- 43358: 1885883a add r2,r3,r2
- 4335c: 00000106 br 43364 <isatty+0x40>
- 43360: 0005883a mov r2,zero
- 43364: e0bfef15 stw r2,-68(fp)
-
- if (fd)
- 43368: e0bfef17 ldw r2,-68(fp)
- 4336c: 10000e26 beq r2,zero,433a8 <isatty+0x84>
- /*
- * If a device driver does not provide an fstat() function, then it is
- * treated as a terminal device by default.
- */
- if (!fd->dev->fstat)
- 43370: e0bfef17 ldw r2,-68(fp)
- 43374: 10800017 ldw r2,0(r2)
- 43378: 10800817 ldw r2,32(r2)
- 4337c: 1000021e bne r2,zero,43388 <isatty+0x64>
- {
- return 1;
- 43380: 00800044 movi r2,1
- 43384: 00000d06 br 433bc <isatty+0x98>
- * this is called so that the device can identify itself.
- */
- else
- {
- fstat (file, &stat);
- 43388: e0bff004 addi r2,fp,-64
- 4338c: 100b883a mov r5,r2
- 43390: e13fff17 ldw r4,-4(fp)
- 43394: 00432300 call 43230 <fstat>
- return (stat.st_mode == _IFCHR) ? 1 : 0;
- 43398: e0bff117 ldw r2,-60(fp)
- 4339c: 10880020 cmpeqi r2,r2,8192
- 433a0: 10803fcc andi r2,r2,255
- 433a4: 00000506 br 433bc <isatty+0x98>
- }
- }
- else
- {
- ALT_ERRNO = EBADFD;
- 433a8: 00432e80 call 432e8 <alt_get_errno>
- 433ac: 1007883a mov r3,r2
- 433b0: 00801444 movi r2,81
- 433b4: 18800015 stw r2,0(r3)
- return 0;
- 433b8: 0005883a mov r2,zero
- }
- }
- 433bc: e037883a mov sp,fp
- 433c0: dfc00117 ldw ra,4(sp)
- 433c4: df000017 ldw fp,0(sp)
- 433c8: dec00204 addi sp,sp,8
- 433cc: f800283a ret
- 000433d0 <alt_load_section>:
- */
- static void ALT_INLINE alt_load_section (alt_u32* from,
- alt_u32* to,
- alt_u32* end)
- {
- 433d0: defffc04 addi sp,sp,-16
- 433d4: df000315 stw fp,12(sp)
- 433d8: df000304 addi fp,sp,12
- 433dc: e13ffd15 stw r4,-12(fp)
- 433e0: e17ffe15 stw r5,-8(fp)
- 433e4: e1bfff15 stw r6,-4(fp)
- if (to != from)
- 433e8: e0fffe17 ldw r3,-8(fp)
- 433ec: e0bffd17 ldw r2,-12(fp)
- 433f0: 18800c26 beq r3,r2,43424 <alt_load_section+0x54>
- {
- while( to != end )
- 433f4: 00000806 br 43418 <alt_load_section+0x48>
- {
- *to++ = *from++;
- 433f8: e0bffe17 ldw r2,-8(fp)
- 433fc: 10c00104 addi r3,r2,4
- 43400: e0fffe15 stw r3,-8(fp)
- 43404: e0fffd17 ldw r3,-12(fp)
- 43408: 19000104 addi r4,r3,4
- 4340c: e13ffd15 stw r4,-12(fp)
- 43410: 18c00017 ldw r3,0(r3)
- 43414: 10c00015 stw r3,0(r2)
- alt_u32* to,
- alt_u32* end)
- {
- if (to != from)
- {
- while( to != end )
- 43418: e0fffe17 ldw r3,-8(fp)
- 4341c: e0bfff17 ldw r2,-4(fp)
- 43420: 18bff51e bne r3,r2,433f8 <alt_load_section+0x28>
- {
- *to++ = *from++;
- }
- }
- }
- 43424: 0001883a nop
- 43428: e037883a mov sp,fp
- 4342c: df000017 ldw fp,0(sp)
- 43430: dec00104 addi sp,sp,4
- 43434: f800283a ret
- 00043438 <alt_load>:
- * there is no bootloader, so this application is responsible for loading to
- * RAM any sections that are required.
- */
- void alt_load (void)
- {
- 43438: defffe04 addi sp,sp,-8
- 4343c: dfc00115 stw ra,4(sp)
- 43440: df000015 stw fp,0(sp)
- 43444: d839883a mov fp,sp
- /*
- * Copy the .rwdata section.
- */
- alt_load_section (&__flash_rwdata_start,
- 43448: 01800134 movhi r6,4
- 4344c: 319c7f04 addi r6,r6,29180
- 43450: 01400134 movhi r5,4
- 43454: 2955e404 addi r5,r5,22416
- 43458: 01000134 movhi r4,4
- 4345c: 211c7f04 addi r4,r4,29180
- 43460: 00433d00 call 433d0 <alt_load_section>
- /*
- * Copy the exception handler.
- */
- alt_load_section (&__flash_exceptions_start,
- 43464: 01800134 movhi r6,4
- 43468: 31808c04 addi r6,r6,560
- 4346c: 01400134 movhi r5,4
- 43470: 29400804 addi r5,r5,32
- 43474: 01000134 movhi r4,4
- 43478: 21000804 addi r4,r4,32
- 4347c: 00433d00 call 433d0 <alt_load_section>
- /*
- * Copy the .rodata section.
- */
- alt_load_section (&__flash_rodata_start,
- 43480: 01800134 movhi r6,4
- 43484: 3195e404 addi r6,r6,22416
- 43488: 01400134 movhi r5,4
- 4348c: 2955d204 addi r5,r5,22344
- 43490: 01000134 movhi r4,4
- 43494: 2115d204 addi r4,r4,22344
- 43498: 00433d00 call 433d0 <alt_load_section>
-
- /*
- * Now ensure that the caches are in synch.
- */
-
- alt_dcache_flush_all();
- 4349c: 00446900 call 44690 <alt_dcache_flush_all>
- alt_icache_flush_all();
- 434a0: 00448500 call 44850 <alt_icache_flush_all>
- }
- 434a4: 0001883a nop
- 434a8: e037883a mov sp,fp
- 434ac: dfc00117 ldw ra,4(sp)
- 434b0: df000017 ldw fp,0(sp)
- 434b4: dec00204 addi sp,sp,8
- 434b8: f800283a ret
- 000434bc <alt_get_errno>:
- #undef errno
- extern int errno;
- static ALT_INLINE int* alt_get_errno(void)
- {
- 434bc: defffe04 addi sp,sp,-8
- 434c0: dfc00115 stw ra,4(sp)
- 434c4: df000015 stw fp,0(sp)
- 434c8: d839883a mov fp,sp
- return ((alt_errno) ? alt_errno() : &errno);
- 434cc: d0a00917 ldw r2,-32732(gp)
- 434d0: 10000326 beq r2,zero,434e0 <alt_get_errno+0x24>
- 434d4: d0a00917 ldw r2,-32732(gp)
- 434d8: 103ee83a callr r2
- 434dc: 00000106 br 434e4 <alt_get_errno+0x28>
- 434e0: d0a6ac04 addi r2,gp,-25936
- }
- 434e4: e037883a mov sp,fp
- 434e8: dfc00117 ldw ra,4(sp)
- 434ec: df000017 ldw fp,0(sp)
- 434f0: dec00204 addi sp,sp,8
- 434f4: f800283a ret
- 000434f8 <lseek>:
- * ALT_LSEEK is mapped onto the lseek() system call in alt_syscall.h
- *
- */
- off_t ALT_LSEEK (int file, off_t ptr, int dir)
- {
- 434f8: defff904 addi sp,sp,-28
- 434fc: dfc00615 stw ra,24(sp)
- 43500: df000515 stw fp,20(sp)
- 43504: df000504 addi fp,sp,20
- 43508: e13ffd15 stw r4,-12(fp)
- 4350c: e17ffe15 stw r5,-8(fp)
- 43510: e1bfff15 stw r6,-4(fp)
- alt_fd* fd;
- off_t rc = 0;
- 43514: e03ffb15 stw zero,-20(fp)
- * A common error case is that when the file descriptor was created, the call
- * to open() failed resulting in a negative file descriptor. This is trapped
- * below so that we don't try and process an invalid file descriptor.
- */
- fd = (file < 0) ? NULL : &alt_fd_list[file];
- 43518: e0bffd17 ldw r2,-12(fp)
- 4351c: 10000816 blt r2,zero,43540 <lseek+0x48>
- 43520: 01400304 movi r5,12
- 43524: e13ffd17 ldw r4,-12(fp)
- 43528: 004308c0 call 4308c <__mulsi3>
- 4352c: 1007883a mov r3,r2
- 43530: 00800134 movhi r2,4
- 43534: 1097f904 addi r2,r2,24548
- 43538: 1885883a add r2,r3,r2
- 4353c: 00000106 br 43544 <lseek+0x4c>
- 43540: 0005883a mov r2,zero
- 43544: e0bffc15 stw r2,-16(fp)
-
- if (fd)
- 43548: e0bffc17 ldw r2,-16(fp)
- 4354c: 10001026 beq r2,zero,43590 <lseek+0x98>
- /*
- * If the device driver provides an implementation of the lseek() function,
- * then call that to process the request.
- */
-
- if (fd->dev->lseek)
- 43550: e0bffc17 ldw r2,-16(fp)
- 43554: 10800017 ldw r2,0(r2)
- 43558: 10800717 ldw r2,28(r2)
- 4355c: 10000926 beq r2,zero,43584 <lseek+0x8c>
- {
- rc = fd->dev->lseek(fd, ptr, dir);
- 43560: e0bffc17 ldw r2,-16(fp)
- 43564: 10800017 ldw r2,0(r2)
- 43568: 10800717 ldw r2,28(r2)
- 4356c: e1bfff17 ldw r6,-4(fp)
- 43570: e17ffe17 ldw r5,-8(fp)
- 43574: e13ffc17 ldw r4,-16(fp)
- 43578: 103ee83a callr r2
- 4357c: e0bffb15 stw r2,-20(fp)
- 43580: 00000506 br 43598 <lseek+0xa0>
- * Otherwise return an error.
- */
- else
- {
- rc = -ENOTSUP;
- 43584: 00bfde84 movi r2,-134
- 43588: e0bffb15 stw r2,-20(fp)
- 4358c: 00000206 br 43598 <lseek+0xa0>
- }
- }
- else
- {
- rc = -EBADFD;
- 43590: 00bfebc4 movi r2,-81
- 43594: e0bffb15 stw r2,-20(fp)
- }
- if (rc < 0)
- 43598: e0bffb17 ldw r2,-20(fp)
- 4359c: 1000070e bge r2,zero,435bc <lseek+0xc4>
- {
- ALT_ERRNO = -rc;
- 435a0: 00434bc0 call 434bc <alt_get_errno>
- 435a4: 1007883a mov r3,r2
- 435a8: e0bffb17 ldw r2,-20(fp)
- 435ac: 0085c83a sub r2,zero,r2
- 435b0: 18800015 stw r2,0(r3)
- rc = -1;
- 435b4: 00bfffc4 movi r2,-1
- 435b8: e0bffb15 stw r2,-20(fp)
- }
- return rc;
- 435bc: e0bffb17 ldw r2,-20(fp)
- }
- 435c0: e037883a mov sp,fp
- 435c4: dfc00117 ldw ra,4(sp)
- 435c8: df000017 ldw fp,0(sp)
- 435cc: dec00204 addi sp,sp,8
- 435d0: f800283a ret
- 000435d4 <alt_main>:
- * devices/filesystems/components in the system; and call the entry point for
- * the users application, i.e. main().
- */
- void alt_main (void)
- {
- 435d4: defffd04 addi sp,sp,-12
- 435d8: dfc00215 stw ra,8(sp)
- 435dc: df000115 stw fp,4(sp)
- 435e0: df000104 addi fp,sp,4
- #endif
- /* ALT LOG - please see HAL/sys/alt_log_printf.h for details */
- ALT_LOG_PRINT_BOOT("[alt_main.c] Entering alt_main, calling alt_irq_init.\r\n");
- /* Initialize the interrupt controller. */
- alt_irq_init (NULL);
- 435e4: 0009883a mov r4,zero
- 435e8: 0043a7c0 call 43a7c <alt_irq_init>
- /* Initialize the operating system */
- ALT_LOG_PRINT_BOOT("[alt_main.c] Done alt_irq_init, calling alt_os_init.\r\n");
- ALT_OS_INIT();
- 435ec: 0001883a nop
- ALT_LOG_PRINT_BOOT("[alt_main.c] Done OS Init, calling alt_sem_create.\r\n");
- ALT_SEM_CREATE (&alt_fd_list_lock, 1);
- /* Initialize the device drivers/software components. */
- ALT_LOG_PRINT_BOOT("[alt_main.c] Calling alt_sys_init.\r\n");
- alt_sys_init();
- 435f0: 0043ab40 call 43ab4 <alt_sys_init>
- * devices be present (not equal to /dev/null) and if direct drivers
- * aren't being used.
- */
- ALT_LOG_PRINT_BOOT("[alt_main.c] Redirecting IO.\r\n");
- alt_io_redirect(ALT_STDOUT, ALT_STDIN, ALT_STDERR);
- 435f4: 01800134 movhi r6,4
- 435f8: 3195dc04 addi r6,r6,22384
- 435fc: 01400134 movhi r5,4
- 43600: 2955dc04 addi r5,r5,22384
- 43604: 01000134 movhi r4,4
- 43608: 2115dc04 addi r4,r4,22384
- 4360c: 0044bf40 call 44bf4 <alt_io_redirect>
- /*
- * Call the C++ constructors
- */
- ALT_LOG_PRINT_BOOT("[alt_main.c] Calling C++ constructors.\r\n");
- _do_ctors ();
- 43610: 00447900 call 44790 <_do_ctors>
- * redefined as _exit()). This is in the interest of reducing code footprint,
- * in that the atexit() overhead is removed when it's not needed.
- */
- ALT_LOG_PRINT_BOOT("[alt_main.c] Calling atexit.\r\n");
- atexit (_do_dtors);
- 43614: 01000134 movhi r4,4
- 43618: 2111fc04 addi r4,r4,18416
- 4361c: 00453b40 call 453b4 <atexit>
- ALT_LOG_PRINT_BOOT("[alt_main.c] Calling main.\r\n");
- #ifdef ALT_NO_EXIT
- main (alt_argc, alt_argv, alt_envp);
- #else
- result = main (alt_argc, alt_argv, alt_envp);
- 43620: d0a6ad17 ldw r2,-25932(gp)
- 43624: d0e6ae17 ldw r3,-25928(gp)
- 43628: d126af17 ldw r4,-25924(gp)
- 4362c: 200d883a mov r6,r4
- 43630: 180b883a mov r5,r3
- 43634: 1009883a mov r4,r2
- 43638: 004026c0 call 4026c <main>
- 4363c: e0bfff15 stw r2,-4(fp)
- close(STDOUT_FILENO);
- 43640: 01000044 movi r4,1
- 43644: 00430f00 call 430f0 <close>
- exit (result);
- 43648: e13fff17 ldw r4,-4(fp)
- 4364c: 00453c80 call 453c8 <exit>
- 00043650 <__malloc_lock>:
- * configuration is single threaded, so there is nothing to do here. Note that
- * this requires that malloc is never called by an interrupt service routine.
- */
- void __malloc_lock ( struct _reent *_r )
- {
- 43650: defffe04 addi sp,sp,-8
- 43654: df000115 stw fp,4(sp)
- 43658: df000104 addi fp,sp,4
- 4365c: e13fff15 stw r4,-4(fp)
- }
- 43660: 0001883a nop
- 43664: e037883a mov sp,fp
- 43668: df000017 ldw fp,0(sp)
- 4366c: dec00104 addi sp,sp,4
- 43670: f800283a ret
- 00043674 <__malloc_unlock>:
- /*
- *
- */
- void __malloc_unlock ( struct _reent *_r )
- {
- 43674: defffe04 addi sp,sp,-8
- 43678: df000115 stw fp,4(sp)
- 4367c: df000104 addi fp,sp,4
- 43680: e13fff15 stw r4,-4(fp)
- }
- 43684: 0001883a nop
- 43688: e037883a mov sp,fp
- 4368c: df000017 ldw fp,0(sp)
- 43690: dec00104 addi sp,sp,4
- 43694: f800283a ret
- 00043698 <alt_get_errno>:
- #undef errno
- extern int errno;
- static ALT_INLINE int* alt_get_errno(void)
- {
- 43698: defffe04 addi sp,sp,-8
- 4369c: dfc00115 stw ra,4(sp)
- 436a0: df000015 stw fp,0(sp)
- 436a4: d839883a mov fp,sp
- return ((alt_errno) ? alt_errno() : &errno);
- 436a8: d0a00917 ldw r2,-32732(gp)
- 436ac: 10000326 beq r2,zero,436bc <alt_get_errno+0x24>
- 436b0: d0a00917 ldw r2,-32732(gp)
- 436b4: 103ee83a callr r2
- 436b8: 00000106 br 436c0 <alt_get_errno+0x28>
- 436bc: d0a6ac04 addi r2,gp,-25936
- }
- 436c0: e037883a mov sp,fp
- 436c4: dfc00117 ldw ra,4(sp)
- 436c8: df000017 ldw fp,0(sp)
- 436cc: dec00204 addi sp,sp,8
- 436d0: f800283a ret
- 000436d4 <read>:
- }
- #else /* !ALT_USE_DIRECT_DRIVERS */
- int ALT_READ (int file, void *ptr, size_t len)
- {
- 436d4: defff904 addi sp,sp,-28
- 436d8: dfc00615 stw ra,24(sp)
- 436dc: df000515 stw fp,20(sp)
- 436e0: df000504 addi fp,sp,20
- 436e4: e13ffd15 stw r4,-12(fp)
- 436e8: e17ffe15 stw r5,-8(fp)
- 436ec: e1bfff15 stw r6,-4(fp)
- * A common error case is that when the file descriptor was created, the call
- * to open() failed resulting in a negative file descriptor. This is trapped
- * below so that we don't try and process an invalid file descriptor.
- */
- fd = (file < 0) ? NULL : &alt_fd_list[file];
- 436f0: e0bffd17 ldw r2,-12(fp)
- 436f4: 10000816 blt r2,zero,43718 <read+0x44>
- 436f8: 01400304 movi r5,12
- 436fc: e13ffd17 ldw r4,-12(fp)
- 43700: 004308c0 call 4308c <__mulsi3>
- 43704: 1007883a mov r3,r2
- 43708: 00800134 movhi r2,4
- 4370c: 1097f904 addi r2,r2,24548
- 43710: 1885883a add r2,r3,r2
- 43714: 00000106 br 4371c <read+0x48>
- 43718: 0005883a mov r2,zero
- 4371c: e0bffb15 stw r2,-20(fp)
-
- if (fd)
- 43720: e0bffb17 ldw r2,-20(fp)
- 43724: 10002226 beq r2,zero,437b0 <read+0xdc>
- * If the file has not been opened with read access, or if the driver does
- * not provide an implementation of read(), generate an error. Otherwise
- * call the drivers read() function to process the request.
- */
- if (((fd->fd_flags & O_ACCMODE) != O_WRONLY) &&
- 43728: e0bffb17 ldw r2,-20(fp)
- 4372c: 10800217 ldw r2,8(r2)
- 43730: 108000cc andi r2,r2,3
- 43734: 10800060 cmpeqi r2,r2,1
- 43738: 1000181e bne r2,zero,4379c <read+0xc8>
- (fd->dev->read))
- 4373c: e0bffb17 ldw r2,-20(fp)
- 43740: 10800017 ldw r2,0(r2)
- 43744: 10800517 ldw r2,20(r2)
- * If the file has not been opened with read access, or if the driver does
- * not provide an implementation of read(), generate an error. Otherwise
- * call the drivers read() function to process the request.
- */
- if (((fd->fd_flags & O_ACCMODE) != O_WRONLY) &&
- 43748: 10001426 beq r2,zero,4379c <read+0xc8>
- (fd->dev->read))
- {
- if ((rval = fd->dev->read(fd, ptr, len)) < 0)
- 4374c: e0bffb17 ldw r2,-20(fp)
- 43750: 10800017 ldw r2,0(r2)
- 43754: 10800517 ldw r2,20(r2)
- 43758: e0ffff17 ldw r3,-4(fp)
- 4375c: 180d883a mov r6,r3
- 43760: e17ffe17 ldw r5,-8(fp)
- 43764: e13ffb17 ldw r4,-20(fp)
- 43768: 103ee83a callr r2
- 4376c: e0bffc15 stw r2,-16(fp)
- 43770: e0bffc17 ldw r2,-16(fp)
- 43774: 1000070e bge r2,zero,43794 <read+0xc0>
- {
- ALT_ERRNO = -rval;
- 43778: 00436980 call 43698 <alt_get_errno>
- 4377c: 1007883a mov r3,r2
- 43780: e0bffc17 ldw r2,-16(fp)
- 43784: 0085c83a sub r2,zero,r2
- 43788: 18800015 stw r2,0(r3)
- return -1;
- 4378c: 00bfffc4 movi r2,-1
- 43790: 00000c06 br 437c4 <read+0xf0>
- }
- return rval;
- 43794: e0bffc17 ldw r2,-16(fp)
- 43798: 00000a06 br 437c4 <read+0xf0>
- }
- else
- {
- ALT_ERRNO = EACCES;
- 4379c: 00436980 call 43698 <alt_get_errno>
- 437a0: 1007883a mov r3,r2
- 437a4: 00800344 movi r2,13
- 437a8: 18800015 stw r2,0(r3)
- 437ac: 00000406 br 437c0 <read+0xec>
- }
- }
- else
- {
- ALT_ERRNO = EBADFD;
- 437b0: 00436980 call 43698 <alt_get_errno>
- 437b4: 1007883a mov r3,r2
- 437b8: 00801444 movi r2,81
- 437bc: 18800015 stw r2,0(r3)
- }
- return -1;
- 437c0: 00bfffc4 movi r2,-1
- }
- 437c4: e037883a mov sp,fp
- 437c8: dfc00117 ldw ra,4(sp)
- 437cc: df000017 ldw fp,0(sp)
- 437d0: dec00204 addi sp,sp,8
- 437d4: f800283a ret
- 000437d8 <alt_release_fd>:
- * File descriptors correcponding to standard in, standard out and standard
- * error cannont be released backed to the pool. They are always reserved.
- */
- void alt_release_fd (int fd)
- {
- 437d8: defffc04 addi sp,sp,-16
- 437dc: dfc00315 stw ra,12(sp)
- 437e0: df000215 stw fp,8(sp)
- 437e4: dc000115 stw r16,4(sp)
- 437e8: df000204 addi fp,sp,8
- 437ec: e13ffe15 stw r4,-8(fp)
- if (fd > 2)
- 437f0: e0bffe17 ldw r2,-8(fp)
- 437f4: 108000d0 cmplti r2,r2,3
- 437f8: 1000111e bne r2,zero,43840 <alt_release_fd+0x68>
- {
- alt_fd_list[fd].fd_flags = 0;
- 437fc: 04000134 movhi r16,4
- 43800: 8417f904 addi r16,r16,24548
- 43804: e0bffe17 ldw r2,-8(fp)
- 43808: 01400304 movi r5,12
- 4380c: 1009883a mov r4,r2
- 43810: 004308c0 call 4308c <__mulsi3>
- 43814: 8085883a add r2,r16,r2
- 43818: 10800204 addi r2,r2,8
- 4381c: 10000015 stw zero,0(r2)
- alt_fd_list[fd].dev = 0;
- 43820: 04000134 movhi r16,4
- 43824: 8417f904 addi r16,r16,24548
- 43828: e0bffe17 ldw r2,-8(fp)
- 4382c: 01400304 movi r5,12
- 43830: 1009883a mov r4,r2
- 43834: 004308c0 call 4308c <__mulsi3>
- 43838: 8085883a add r2,r16,r2
- 4383c: 10000015 stw zero,0(r2)
- }
- }
- 43840: 0001883a nop
- 43844: e6ffff04 addi sp,fp,-4
- 43848: dfc00217 ldw ra,8(sp)
- 4384c: df000117 ldw fp,4(sp)
- 43850: dc000017 ldw r16,0(sp)
- 43854: dec00304 addi sp,sp,12
- 43858: f800283a ret
- 0004385c <sbrk>:
- #endif
-
- caddr_t ALT_SBRK (int incr) __attribute__ ((no_instrument_function ));
- caddr_t ALT_SBRK (int incr)
- {
- 4385c: defff904 addi sp,sp,-28
- 43860: df000615 stw fp,24(sp)
- 43864: df000604 addi fp,sp,24
- 43868: e13fff15 stw r4,-4(fp)
- static ALT_INLINE alt_irq_context ALT_ALWAYS_INLINE
- alt_irq_disable_all (void)
- {
- alt_irq_context context;
- NIOS2_READ_STATUS (context);
- 4386c: 0005303a rdctl r2,status
- 43870: e0bffe15 stw r2,-8(fp)
- NIOS2_WRITE_STATUS (context & ~NIOS2_STATUS_PIE_MSK);
- 43874: e0fffe17 ldw r3,-8(fp)
- 43878: 00bfff84 movi r2,-2
- 4387c: 1884703a and r2,r3,r2
- 43880: 1001703a wrctl status,r2
-
- return context;
- 43884: e0bffe17 ldw r2,-8(fp)
- alt_irq_context context;
- char *prev_heap_end;
- context = alt_irq_disable_all();
- 43888: e0bffb15 stw r2,-20(fp)
- /* Always return data aligned on a word boundary */
- heap_end = (char *)(((unsigned int)heap_end + 3) & ~3);
- 4388c: d0a00a17 ldw r2,-32728(gp)
- 43890: 10c000c4 addi r3,r2,3
- 43894: 00bfff04 movi r2,-4
- 43898: 1884703a and r2,r3,r2
- 4389c: d0a00a15 stw r2,-32728(gp)
- if (((heap_end + incr) - __alt_heap_start) > ALT_MAX_HEAP_BYTES) {
- alt_irq_enable_all(context);
- return (caddr_t)-1;
- }
- #else
- if ((heap_end + incr) > __alt_heap_limit) {
- 438a0: d0e00a17 ldw r3,-32728(gp)
- 438a4: e0bfff17 ldw r2,-4(fp)
- 438a8: 1887883a add r3,r3,r2
- 438ac: 008001f4 movhi r2,7
- 438b0: 10880004 addi r2,r2,8192
- 438b4: 10c0062e bgeu r2,r3,438d0 <sbrk+0x74>
- 438b8: e0bffb17 ldw r2,-20(fp)
- 438bc: e0bffa15 stw r2,-24(fp)
- status &= ~NIOS2_STATUS_PIE_MSK;
- status |= (context & NIOS2_STATUS_PIE_MSK);
-
- NIOS2_WRITE_STATUS (status);
- #else
- NIOS2_WRITE_STATUS (context);
- 438c0: e0bffa17 ldw r2,-24(fp)
- 438c4: 1001703a wrctl status,r2
- alt_irq_enable_all(context);
- return (caddr_t)-1;
- 438c8: 00bfffc4 movi r2,-1
- 438cc: 00000b06 br 438fc <sbrk+0xa0>
- }
- #endif
- prev_heap_end = heap_end;
- 438d0: d0a00a17 ldw r2,-32728(gp)
- 438d4: e0bffd15 stw r2,-12(fp)
- heap_end += incr;
- 438d8: d0e00a17 ldw r3,-32728(gp)
- 438dc: e0bfff17 ldw r2,-4(fp)
- 438e0: 1885883a add r2,r3,r2
- 438e4: d0a00a15 stw r2,-32728(gp)
- 438e8: e0bffb17 ldw r2,-20(fp)
- 438ec: e0bffc15 stw r2,-16(fp)
- 438f0: e0bffc17 ldw r2,-16(fp)
- 438f4: 1001703a wrctl status,r2
- #endif
- alt_irq_enable_all(context);
- return (caddr_t) prev_heap_end;
- 438f8: e0bffd17 ldw r2,-12(fp)
- }
- 438fc: e037883a mov sp,fp
- 43900: df000017 ldw fp,0(sp)
- 43904: dec00104 addi sp,sp,4
- 43908: f800283a ret
- 0004390c <alt_get_errno>:
- #undef errno
- extern int errno;
- static ALT_INLINE int* alt_get_errno(void)
- {
- 4390c: defffe04 addi sp,sp,-8
- 43910: dfc00115 stw ra,4(sp)
- 43914: df000015 stw fp,0(sp)
- 43918: d839883a mov fp,sp
- return ((alt_errno) ? alt_errno() : &errno);
- 4391c: d0a00917 ldw r2,-32732(gp)
- 43920: 10000326 beq r2,zero,43930 <alt_get_errno+0x24>
- 43924: d0a00917 ldw r2,-32732(gp)
- 43928: 103ee83a callr r2
- 4392c: 00000106 br 43934 <alt_get_errno+0x28>
- 43930: d0a6ac04 addi r2,gp,-25936
- }
- 43934: e037883a mov sp,fp
- 43938: dfc00117 ldw ra,4(sp)
- 4393c: df000017 ldw fp,0(sp)
- 43940: dec00204 addi sp,sp,8
- 43944: f800283a ret
- 00043948 <write>:
- }
- #else /* !ALT_USE_DIRECT_DRIVERS */
- int ALT_WRITE (int file, const void *ptr, size_t len)
- {
- 43948: defff904 addi sp,sp,-28
- 4394c: dfc00615 stw ra,24(sp)
- 43950: df000515 stw fp,20(sp)
- 43954: df000504 addi fp,sp,20
- 43958: e13ffd15 stw r4,-12(fp)
- 4395c: e17ffe15 stw r5,-8(fp)
- 43960: e1bfff15 stw r6,-4(fp)
- * A common error case is that when the file descriptor was created, the call
- * to open() failed resulting in a negative file descriptor. This is trapped
- * below so that we don't try and process an invalid file descriptor.
- */
- fd = (file < 0) ? NULL : &alt_fd_list[file];
- 43964: e0bffd17 ldw r2,-12(fp)
- 43968: 10000816 blt r2,zero,4398c <write+0x44>
- 4396c: 01400304 movi r5,12
- 43970: e13ffd17 ldw r4,-12(fp)
- 43974: 004308c0 call 4308c <__mulsi3>
- 43978: 1007883a mov r3,r2
- 4397c: 00800134 movhi r2,4
- 43980: 1097f904 addi r2,r2,24548
- 43984: 1885883a add r2,r3,r2
- 43988: 00000106 br 43990 <write+0x48>
- 4398c: 0005883a mov r2,zero
- 43990: e0bffb15 stw r2,-20(fp)
-
- if (fd)
- 43994: e0bffb17 ldw r2,-20(fp)
- 43998: 10002126 beq r2,zero,43a20 <write+0xd8>
- * If the file has not been opened with write access, or if the driver does
- * not provide an implementation of write(), generate an error. Otherwise
- * call the drivers write() function to process the request.
- */
- if (((fd->fd_flags & O_ACCMODE) != O_RDONLY) && fd->dev->write)
- 4399c: e0bffb17 ldw r2,-20(fp)
- 439a0: 10800217 ldw r2,8(r2)
- 439a4: 108000cc andi r2,r2,3
- 439a8: 10001826 beq r2,zero,43a0c <write+0xc4>
- 439ac: e0bffb17 ldw r2,-20(fp)
- 439b0: 10800017 ldw r2,0(r2)
- 439b4: 10800617 ldw r2,24(r2)
- 439b8: 10001426 beq r2,zero,43a0c <write+0xc4>
- {
-
- /* ALT_LOG - see altera_hal/HAL/inc/sys/alt_log_printf.h */
- ALT_LOG_WRITE_FUNCTION(ptr,len);
- if ((rval = fd->dev->write(fd, ptr, len)) < 0)
- 439bc: e0bffb17 ldw r2,-20(fp)
- 439c0: 10800017 ldw r2,0(r2)
- 439c4: 10800617 ldw r2,24(r2)
- 439c8: e0ffff17 ldw r3,-4(fp)
- 439cc: 180d883a mov r6,r3
- 439d0: e17ffe17 ldw r5,-8(fp)
- 439d4: e13ffb17 ldw r4,-20(fp)
- 439d8: 103ee83a callr r2
- 439dc: e0bffc15 stw r2,-16(fp)
- 439e0: e0bffc17 ldw r2,-16(fp)
- 439e4: 1000070e bge r2,zero,43a04 <write+0xbc>
- {
- ALT_ERRNO = -rval;
- 439e8: 004390c0 call 4390c <alt_get_errno>
- 439ec: 1007883a mov r3,r2
- 439f0: e0bffc17 ldw r2,-16(fp)
- 439f4: 0085c83a sub r2,zero,r2
- 439f8: 18800015 stw r2,0(r3)
- return -1;
- 439fc: 00bfffc4 movi r2,-1
- 43a00: 00000c06 br 43a34 <write+0xec>
- }
- return rval;
- 43a04: e0bffc17 ldw r2,-16(fp)
- 43a08: 00000a06 br 43a34 <write+0xec>
- }
- else
- {
- ALT_ERRNO = EACCES;
- 43a0c: 004390c0 call 4390c <alt_get_errno>
- 43a10: 1007883a mov r3,r2
- 43a14: 00800344 movi r2,13
- 43a18: 18800015 stw r2,0(r3)
- 43a1c: 00000406 br 43a30 <write+0xe8>
- }
- }
- else
- {
- ALT_ERRNO = EBADFD;
- 43a20: 004390c0 call 4390c <alt_get_errno>
- 43a24: 1007883a mov r3,r2
- 43a28: 00801444 movi r2,81
- 43a2c: 18800015 stw r2,0(r3)
- }
- return -1;
- 43a30: 00bfffc4 movi r2,-1
- }
- 43a34: e037883a mov sp,fp
- 43a38: dfc00117 ldw ra,4(sp)
- 43a3c: df000017 ldw fp,0(sp)
- 43a40: dec00204 addi sp,sp,8
- 43a44: f800283a ret
- 00043a48 <alt_dev_reg>:
- */
- extern int alt_fs_reg (alt_dev* dev);
- static ALT_INLINE int alt_dev_reg (alt_dev* dev)
- {
- 43a48: defffd04 addi sp,sp,-12
- 43a4c: dfc00215 stw ra,8(sp)
- 43a50: df000115 stw fp,4(sp)
- 43a54: df000104 addi fp,sp,4
- 43a58: e13fff15 stw r4,-4(fp)
- extern alt_llist alt_dev_list;
- return alt_dev_llist_insert ((alt_dev_llist*) dev, &alt_dev_list);
- 43a5c: d1600604 addi r5,gp,-32744
- 43a60: e13fff17 ldw r4,-4(fp)
- 43a64: 00446ec0 call 446ec <alt_dev_llist_insert>
- }
- 43a68: e037883a mov sp,fp
- 43a6c: dfc00117 ldw ra,4(sp)
- 43a70: df000017 ldw fp,0(sp)
- 43a74: dec00204 addi sp,sp,8
- 43a78: f800283a ret
- 00043a7c <alt_irq_init>:
- * The "base" parameter is ignored and only
- * present for backwards-compatibility.
- */
- void alt_irq_init ( const void* base )
- {
- 43a7c: defffd04 addi sp,sp,-12
- 43a80: dfc00215 stw ra,8(sp)
- 43a84: df000115 stw fp,4(sp)
- 43a88: df000104 addi fp,sp,4
- 43a8c: e13fff15 stw r4,-4(fp)
- ALTERA_NIOS2_GEN2_IRQ_INIT ( NIOS2, nios2);
- 43a90: 00450980 call 45098 <altera_nios2_gen2_irq_init>
- * alt_irq_cpu_enable_interrupts() enables the CPU to start taking interrupts.
- */
- static ALT_INLINE void ALT_ALWAYS_INLINE
- alt_irq_cpu_enable_interrupts (void)
- {
- NIOS2_WRITE_STATUS(NIOS2_STATUS_PIE_MSK
- 43a94: 00800044 movi r2,1
- 43a98: 1001703a wrctl status,r2
- alt_irq_cpu_enable_interrupts();
- }
- 43a9c: 0001883a nop
- 43aa0: e037883a mov sp,fp
- 43aa4: dfc00117 ldw ra,4(sp)
- 43aa8: df000017 ldw fp,0(sp)
- 43aac: dec00204 addi sp,sp,8
- 43ab0: f800283a ret
- 00043ab4 <alt_sys_init>:
- * Initialize the non-interrupt controller devices.
- * Called after alt_irq_init().
- */
- void alt_sys_init( void )
- {
- 43ab4: defffe04 addi sp,sp,-8
- 43ab8: dfc00115 stw ra,4(sp)
- 43abc: df000015 stw fp,0(sp)
- 43ac0: d839883a mov fp,sp
- ALTERA_AVALON_JTAG_UART_INIT ( JTAG_UART, jtag_uart);
- 43ac4: 000d883a mov r6,zero
- 43ac8: 000b883a mov r5,zero
- 43acc: 01000134 movhi r4,4
- 43ad0: 21186304 addi r4,r4,24972
- 43ad4: 0043c600 call 43c60 <altera_avalon_jtag_uart_init>
- 43ad8: 01000134 movhi r4,4
- 43adc: 21185904 addi r4,r4,24932
- 43ae0: 0043a480 call 43a48 <alt_dev_reg>
- }
- 43ae4: 0001883a nop
- 43ae8: e037883a mov sp,fp
- 43aec: dfc00117 ldw ra,4(sp)
- 43af0: df000017 ldw fp,0(sp)
- 43af4: dec00204 addi sp,sp,8
- 43af8: f800283a ret
- 00043afc <altera_avalon_jtag_uart_read_fd>:
- *
- */
- int
- altera_avalon_jtag_uart_read_fd(alt_fd* fd, char* buffer, int space)
- {
- 43afc: defffa04 addi sp,sp,-24
- 43b00: dfc00515 stw ra,20(sp)
- 43b04: df000415 stw fp,16(sp)
- 43b08: df000404 addi fp,sp,16
- 43b0c: e13ffd15 stw r4,-12(fp)
- 43b10: e17ffe15 stw r5,-8(fp)
- 43b14: e1bfff15 stw r6,-4(fp)
- altera_avalon_jtag_uart_dev* dev = (altera_avalon_jtag_uart_dev*) fd->dev;
- 43b18: e0bffd17 ldw r2,-12(fp)
- 43b1c: 10800017 ldw r2,0(r2)
- 43b20: e0bffc15 stw r2,-16(fp)
- return altera_avalon_jtag_uart_read(&dev->state, buffer, space,
- 43b24: e0bffc17 ldw r2,-16(fp)
- 43b28: 10c00a04 addi r3,r2,40
- 43b2c: e0bffd17 ldw r2,-12(fp)
- 43b30: 10800217 ldw r2,8(r2)
- 43b34: 100f883a mov r7,r2
- 43b38: e1bfff17 ldw r6,-4(fp)
- 43b3c: e17ffe17 ldw r5,-8(fp)
- 43b40: 1809883a mov r4,r3
- 43b44: 00441240 call 44124 <altera_avalon_jtag_uart_read>
- fd->fd_flags);
- }
- 43b48: e037883a mov sp,fp
- 43b4c: dfc00117 ldw ra,4(sp)
- 43b50: df000017 ldw fp,0(sp)
- 43b54: dec00204 addi sp,sp,8
- 43b58: f800283a ret
- 00043b5c <altera_avalon_jtag_uart_write_fd>:
- int
- altera_avalon_jtag_uart_write_fd(alt_fd* fd, const char* buffer, int space)
- {
- 43b5c: defffa04 addi sp,sp,-24
- 43b60: dfc00515 stw ra,20(sp)
- 43b64: df000415 stw fp,16(sp)
- 43b68: df000404 addi fp,sp,16
- 43b6c: e13ffd15 stw r4,-12(fp)
- 43b70: e17ffe15 stw r5,-8(fp)
- 43b74: e1bfff15 stw r6,-4(fp)
- altera_avalon_jtag_uart_dev* dev = (altera_avalon_jtag_uart_dev*) fd->dev;
- 43b78: e0bffd17 ldw r2,-12(fp)
- 43b7c: 10800017 ldw r2,0(r2)
- 43b80: e0bffc15 stw r2,-16(fp)
- return altera_avalon_jtag_uart_write(&dev->state, buffer, space,
- 43b84: e0bffc17 ldw r2,-16(fp)
- 43b88: 10c00a04 addi r3,r2,40
- 43b8c: e0bffd17 ldw r2,-12(fp)
- 43b90: 10800217 ldw r2,8(r2)
- 43b94: 100f883a mov r7,r2
- 43b98: e1bfff17 ldw r6,-4(fp)
- 43b9c: e17ffe17 ldw r5,-8(fp)
- 43ba0: 1809883a mov r4,r3
- 43ba4: 00443400 call 44340 <altera_avalon_jtag_uart_write>
- fd->fd_flags);
- }
- 43ba8: e037883a mov sp,fp
- 43bac: dfc00117 ldw ra,4(sp)
- 43bb0: df000017 ldw fp,0(sp)
- 43bb4: dec00204 addi sp,sp,8
- 43bb8: f800283a ret
- 00043bbc <altera_avalon_jtag_uart_close_fd>:
- #ifndef ALTERA_AVALON_JTAG_UART_SMALL
- int
- altera_avalon_jtag_uart_close_fd(alt_fd* fd)
- {
- 43bbc: defffc04 addi sp,sp,-16
- 43bc0: dfc00315 stw ra,12(sp)
- 43bc4: df000215 stw fp,8(sp)
- 43bc8: df000204 addi fp,sp,8
- 43bcc: e13fff15 stw r4,-4(fp)
- altera_avalon_jtag_uart_dev* dev = (altera_avalon_jtag_uart_dev*) fd->dev;
- 43bd0: e0bfff17 ldw r2,-4(fp)
- 43bd4: 10800017 ldw r2,0(r2)
- 43bd8: e0bffe15 stw r2,-8(fp)
- return altera_avalon_jtag_uart_close(&dev->state, fd->fd_flags);
- 43bdc: e0bffe17 ldw r2,-8(fp)
- 43be0: 10c00a04 addi r3,r2,40
- 43be4: e0bfff17 ldw r2,-4(fp)
- 43be8: 10800217 ldw r2,8(r2)
- 43bec: 100b883a mov r5,r2
- 43bf0: 1809883a mov r4,r3
- 43bf4: 0043fcc0 call 43fcc <altera_avalon_jtag_uart_close>
- }
- 43bf8: e037883a mov sp,fp
- 43bfc: dfc00117 ldw ra,4(sp)
- 43c00: df000017 ldw fp,0(sp)
- 43c04: dec00204 addi sp,sp,8
- 43c08: f800283a ret
- 00043c0c <altera_avalon_jtag_uart_ioctl_fd>:
- int
- altera_avalon_jtag_uart_ioctl_fd(alt_fd* fd, int req, void* arg)
- {
- 43c0c: defffa04 addi sp,sp,-24
- 43c10: dfc00515 stw ra,20(sp)
- 43c14: df000415 stw fp,16(sp)
- 43c18: df000404 addi fp,sp,16
- 43c1c: e13ffd15 stw r4,-12(fp)
- 43c20: e17ffe15 stw r5,-8(fp)
- 43c24: e1bfff15 stw r6,-4(fp)
- altera_avalon_jtag_uart_dev* dev = (altera_avalon_jtag_uart_dev*) fd->dev;
- 43c28: e0bffd17 ldw r2,-12(fp)
- 43c2c: 10800017 ldw r2,0(r2)
- 43c30: e0bffc15 stw r2,-16(fp)
- return altera_avalon_jtag_uart_ioctl(&dev->state, req, arg);
- 43c34: e0bffc17 ldw r2,-16(fp)
- 43c38: 10800a04 addi r2,r2,40
- 43c3c: e1bfff17 ldw r6,-4(fp)
- 43c40: e17ffe17 ldw r5,-8(fp)
- 43c44: 1009883a mov r4,r2
- 43c48: 00440340 call 44034 <altera_avalon_jtag_uart_ioctl>
- }
- 43c4c: e037883a mov sp,fp
- 43c50: dfc00117 ldw ra,4(sp)
- 43c54: df000017 ldw fp,0(sp)
- 43c58: dec00204 addi sp,sp,8
- 43c5c: f800283a ret
- 00043c60 <altera_avalon_jtag_uart_init>:
- * Return 1 on sucessful IRQ register and 0 on failure.
- */
- void altera_avalon_jtag_uart_init(altera_avalon_jtag_uart_state* sp,
- int irq_controller_id, int irq)
- {
- 43c60: defffa04 addi sp,sp,-24
- 43c64: dfc00515 stw ra,20(sp)
- 43c68: df000415 stw fp,16(sp)
- 43c6c: df000404 addi fp,sp,16
- 43c70: e13ffd15 stw r4,-12(fp)
- 43c74: e17ffe15 stw r5,-8(fp)
- 43c78: e1bfff15 stw r6,-4(fp)
- ALT_FLAG_CREATE(&sp->events, 0);
- ALT_SEM_CREATE(&sp->read_lock, 1);
- ALT_SEM_CREATE(&sp->write_lock, 1);
- /* enable read interrupts at the device */
- sp->irq_enable = ALTERA_AVALON_JTAG_UART_CONTROL_RE_MSK;
- 43c7c: e0bffd17 ldw r2,-12(fp)
- 43c80: 00c00044 movi r3,1
- 43c84: 10c00815 stw r3,32(r2)
- IOWR_ALTERA_AVALON_JTAG_UART_CONTROL(sp->base, sp->irq_enable);
- 43c88: e0bffd17 ldw r2,-12(fp)
- 43c8c: 10800017 ldw r2,0(r2)
- 43c90: 10800104 addi r2,r2,4
- 43c94: 1007883a mov r3,r2
- 43c98: e0bffd17 ldw r2,-12(fp)
- 43c9c: 10800817 ldw r2,32(r2)
- 43ca0: 18800035 stwio r2,0(r3)
-
- /* register the interrupt handler */
- #ifdef ALT_ENHANCED_INTERRUPT_API_PRESENT
- alt_ic_isr_register(irq_controller_id, irq, altera_avalon_jtag_uart_irq,
- 43ca4: e0bffe17 ldw r2,-8(fp)
- 43ca8: e0ffff17 ldw r3,-4(fp)
- 43cac: d8000015 stw zero,0(sp)
- 43cb0: e1fffd17 ldw r7,-12(fp)
- 43cb4: 01800134 movhi r6,4
- 43cb8: 318f4804 addi r6,r6,15648
- 43cbc: 180b883a mov r5,r3
- 43cc0: 1009883a mov r4,r2
- 43cc4: 00448700 call 44870 <alt_ic_isr_register>
- #else
- alt_irq_register(irq, sp, altera_avalon_jtag_uart_irq);
- #endif
- /* Register an alarm to go off every second to check for presence of host */
- sp->host_inactive = 0;
- 43cc8: e0bffd17 ldw r2,-12(fp)
- 43ccc: 10000915 stw zero,36(r2)
- if (alt_alarm_start(&sp->alarm, alt_ticks_per_second(),
- 43cd0: e0bffd17 ldw r2,-12(fp)
- 43cd4: 10800204 addi r2,r2,8
- * Obtain the system clock rate in ticks/s.
- */
- static ALT_INLINE alt_u32 ALT_ALWAYS_INLINE alt_ticks_per_second (void)
- {
- return _alt_tick_rate;
- 43cd8: d0e6b117 ldw r3,-25916(gp)
- 43cdc: e1fffd17 ldw r7,-12(fp)
- 43ce0: 01800134 movhi r6,4
- 43ce4: 318fcb04 addi r6,r6,16172
- 43ce8: 180b883a mov r5,r3
- 43cec: 1009883a mov r4,r2
- 43cf0: 00445640 call 44564 <alt_alarm_start>
- 43cf4: 1000040e bge r2,zero,43d08 <altera_avalon_jtag_uart_init+0xa8>
- &altera_avalon_jtag_uart_timeout, sp) < 0)
- {
- /* If we can't set the alarm then record "don't know if host present"
- * and behave as though the host is present.
- */
- sp->timeout = INT_MAX;
- 43cf8: e0fffd17 ldw r3,-12(fp)
- 43cfc: 00a00034 movhi r2,32768
- 43d00: 10bfffc4 addi r2,r2,-1
- 43d04: 18800115 stw r2,4(r3)
- }
- /* ALT_LOG - see altera_hal/HAL/inc/sys/alt_log_printf.h */
- ALT_LOG_JTAG_UART_ALARM_REGISTER(sp, sp->base);
- }
- 43d08: 0001883a nop
- 43d0c: e037883a mov sp,fp
- 43d10: dfc00117 ldw ra,4(sp)
- 43d14: df000017 ldw fp,0(sp)
- 43d18: dec00204 addi sp,sp,8
- 43d1c: f800283a ret
- 00043d20 <altera_avalon_jtag_uart_irq>:
- #ifdef ALT_ENHANCED_INTERRUPT_API_PRESENT
- static void altera_avalon_jtag_uart_irq(void* context)
- #else
- static void altera_avalon_jtag_uart_irq(void* context, alt_u32 id)
- #endif
- {
- 43d20: defff804 addi sp,sp,-32
- 43d24: df000715 stw fp,28(sp)
- 43d28: df000704 addi fp,sp,28
- 43d2c: e13fff15 stw r4,-4(fp)
- altera_avalon_jtag_uart_state* sp = (altera_avalon_jtag_uart_state*) context;
- 43d30: e0bfff17 ldw r2,-4(fp)
- 43d34: e0bffb15 stw r2,-20(fp)
- unsigned int base = sp->base;
- 43d38: e0bffb17 ldw r2,-20(fp)
- 43d3c: 10800017 ldw r2,0(r2)
- 43d40: e0bffc15 stw r2,-16(fp)
- /* ALT_LOG - see altera_hal/HAL/inc/sys/alt_log_printf.h */
- ALT_LOG_JTAG_UART_ISR_FUNCTION(base, sp);
- for ( ; ; )
- {
- unsigned int control = IORD_ALTERA_AVALON_JTAG_UART_CONTROL(base);
- 43d44: e0bffc17 ldw r2,-16(fp)
- 43d48: 10800104 addi r2,r2,4
- 43d4c: 10800037 ldwio r2,0(r2)
- 43d50: e0bffd15 stw r2,-12(fp)
- /* Return once nothing more to do */
- if ((control & (ALTERA_AVALON_JTAG_UART_CONTROL_RI_MSK | ALTERA_AVALON_JTAG_UART_CONTROL_WI_MSK)) == 0)
- 43d54: e0bffd17 ldw r2,-12(fp)
- 43d58: 1080c00c andi r2,r2,768
- 43d5c: 10006d26 beq r2,zero,43f14 <altera_avalon_jtag_uart_irq+0x1f4>
- break;
- if (control & ALTERA_AVALON_JTAG_UART_CONTROL_RI_MSK)
- 43d60: e0bffd17 ldw r2,-12(fp)
- 43d64: 1080400c andi r2,r2,256
- 43d68: 10003526 beq r2,zero,43e40 <altera_avalon_jtag_uart_irq+0x120>
- {
- /* process a read irq. Start by assuming that there is data in the
- * receive FIFO (otherwise why would we have been interrupted?)
- */
- unsigned int data = 1 << ALTERA_AVALON_JTAG_UART_DATA_RAVAIL_OFST;
- 43d6c: 00800074 movhi r2,1
- 43d70: e0bff915 stw r2,-28(fp)
- for ( ; ; )
- {
- /* Check whether there is space in the buffer. If not then we must not
- * read any characters from the buffer as they will be lost.
- */
- unsigned int next = (sp->rx_in + 1) % ALTERA_AVALON_JTAG_UART_BUF_LEN;
- 43d74: e0bffb17 ldw r2,-20(fp)
- 43d78: 10800a17 ldw r2,40(r2)
- 43d7c: 10800044 addi r2,r2,1
- 43d80: 1081ffcc andi r2,r2,2047
- 43d84: e0bffe15 stw r2,-8(fp)
- if (next == sp->rx_out)
- 43d88: e0bffb17 ldw r2,-20(fp)
- 43d8c: 10c00b17 ldw r3,44(r2)
- 43d90: e0bffe17 ldw r2,-8(fp)
- 43d94: 18801526 beq r3,r2,43dec <altera_avalon_jtag_uart_irq+0xcc>
- break;
- /* Try to remove a character from the FIFO and find out whether there
- * are any more characters remaining.
- */
- data = IORD_ALTERA_AVALON_JTAG_UART_DATA(base);
- 43d98: e0bffc17 ldw r2,-16(fp)
- 43d9c: 10800037 ldwio r2,0(r2)
- 43da0: e0bff915 stw r2,-28(fp)
-
- if ((data & ALTERA_AVALON_JTAG_UART_DATA_RVALID_MSK) == 0)
- 43da4: e0bff917 ldw r2,-28(fp)
- 43da8: 10a0000c andi r2,r2,32768
- 43dac: 10001126 beq r2,zero,43df4 <altera_avalon_jtag_uart_irq+0xd4>
- break;
- sp->rx_buf[sp->rx_in] = (data & ALTERA_AVALON_JTAG_UART_DATA_DATA_MSK) >> ALTERA_AVALON_JTAG_UART_DATA_DATA_OFST;
- 43db0: e0bffb17 ldw r2,-20(fp)
- 43db4: 10800a17 ldw r2,40(r2)
- 43db8: e0fff917 ldw r3,-28(fp)
- 43dbc: 1809883a mov r4,r3
- 43dc0: e0fffb17 ldw r3,-20(fp)
- 43dc4: 1885883a add r2,r3,r2
- 43dc8: 10800e04 addi r2,r2,56
- 43dcc: 11000005 stb r4,0(r2)
- sp->rx_in = (sp->rx_in + 1) % ALTERA_AVALON_JTAG_UART_BUF_LEN;
- 43dd0: e0bffb17 ldw r2,-20(fp)
- 43dd4: 10800a17 ldw r2,40(r2)
- 43dd8: 10800044 addi r2,r2,1
- 43ddc: 10c1ffcc andi r3,r2,2047
- 43de0: e0bffb17 ldw r2,-20(fp)
- 43de4: 10c00a15 stw r3,40(r2)
- /* Post an event to notify jtag_uart_read that a character has been read */
- ALT_FLAG_POST (sp->events, ALT_JTAG_UART_READ_RDY, OS_FLAG_SET);
- }
- 43de8: 003fe206 br 43d74 <altera_avalon_jtag_uart_irq+0x54>
- /* Check whether there is space in the buffer. If not then we must not
- * read any characters from the buffer as they will be lost.
- */
- unsigned int next = (sp->rx_in + 1) % ALTERA_AVALON_JTAG_UART_BUF_LEN;
- if (next == sp->rx_out)
- break;
- 43dec: 0001883a nop
- 43df0: 00000106 br 43df8 <altera_avalon_jtag_uart_irq+0xd8>
- * are any more characters remaining.
- */
- data = IORD_ALTERA_AVALON_JTAG_UART_DATA(base);
-
- if ((data & ALTERA_AVALON_JTAG_UART_DATA_RVALID_MSK) == 0)
- break;
- 43df4: 0001883a nop
- /* Post an event to notify jtag_uart_read that a character has been read */
- ALT_FLAG_POST (sp->events, ALT_JTAG_UART_READ_RDY, OS_FLAG_SET);
- }
- if (data & ALTERA_AVALON_JTAG_UART_DATA_RAVAIL_MSK)
- 43df8: e0bff917 ldw r2,-28(fp)
- 43dfc: 10bfffec andhi r2,r2,65535
- 43e00: 10000f26 beq r2,zero,43e40 <altera_avalon_jtag_uart_irq+0x120>
- {
- /* If there is still data available here then the buffer is full
- * so turn off receive interrupts until some space becomes available.
- */
- sp->irq_enable &= ~ALTERA_AVALON_JTAG_UART_CONTROL_RE_MSK;
- 43e04: e0bffb17 ldw r2,-20(fp)
- 43e08: 10c00817 ldw r3,32(r2)
- 43e0c: 00bfff84 movi r2,-2
- 43e10: 1886703a and r3,r3,r2
- 43e14: e0bffb17 ldw r2,-20(fp)
- 43e18: 10c00815 stw r3,32(r2)
- IOWR_ALTERA_AVALON_JTAG_UART_CONTROL(base, sp->irq_enable);
- 43e1c: e0bffc17 ldw r2,-16(fp)
- 43e20: 10800104 addi r2,r2,4
- 43e24: 1007883a mov r3,r2
- 43e28: e0bffb17 ldw r2,-20(fp)
- 43e2c: 10800817 ldw r2,32(r2)
- 43e30: 18800035 stwio r2,0(r3)
-
- /* Dummy read to ensure IRQ is cleared prior to ISR completion */
- IORD_ALTERA_AVALON_JTAG_UART_CONTROL(base);
- 43e34: e0bffc17 ldw r2,-16(fp)
- 43e38: 10800104 addi r2,r2,4
- 43e3c: 10800037 ldwio r2,0(r2)
- }
- }
- if (control & ALTERA_AVALON_JTAG_UART_CONTROL_WI_MSK)
- 43e40: e0bffd17 ldw r2,-12(fp)
- 43e44: 1080800c andi r2,r2,512
- 43e48: 103fbe26 beq r2,zero,43d44 <altera_avalon_jtag_uart_irq+0x24>
- {
- /* process a write irq */
- unsigned int space = (control & ALTERA_AVALON_JTAG_UART_CONTROL_WSPACE_MSK) >> ALTERA_AVALON_JTAG_UART_CONTROL_WSPACE_OFST;
- 43e4c: e0bffd17 ldw r2,-12(fp)
- 43e50: 1004d43a srli r2,r2,16
- 43e54: e0bffa15 stw r2,-24(fp)
- while (space > 0 && sp->tx_out != sp->tx_in)
- 43e58: 00001406 br 43eac <altera_avalon_jtag_uart_irq+0x18c>
- {
- IOWR_ALTERA_AVALON_JTAG_UART_DATA(base, sp->tx_buf[sp->tx_out]);
- 43e5c: e0bffc17 ldw r2,-16(fp)
- 43e60: e0fffb17 ldw r3,-20(fp)
- 43e64: 18c00d17 ldw r3,52(r3)
- 43e68: e13ffb17 ldw r4,-20(fp)
- 43e6c: 20c7883a add r3,r4,r3
- 43e70: 18c20e04 addi r3,r3,2104
- 43e74: 18c00003 ldbu r3,0(r3)
- 43e78: 18c03fcc andi r3,r3,255
- 43e7c: 18c0201c xori r3,r3,128
- 43e80: 18ffe004 addi r3,r3,-128
- 43e84: 10c00035 stwio r3,0(r2)
- sp->tx_out = (sp->tx_out + 1) % ALTERA_AVALON_JTAG_UART_BUF_LEN;
- 43e88: e0bffb17 ldw r2,-20(fp)
- 43e8c: 10800d17 ldw r2,52(r2)
- 43e90: 10800044 addi r2,r2,1
- 43e94: 10c1ffcc andi r3,r2,2047
- 43e98: e0bffb17 ldw r2,-20(fp)
- 43e9c: 10c00d15 stw r3,52(r2)
- /* Post an event to notify jtag_uart_write that a character has been written */
- ALT_FLAG_POST (sp->events, ALT_JTAG_UART_WRITE_RDY, OS_FLAG_SET);
- space--;
- 43ea0: e0bffa17 ldw r2,-24(fp)
- 43ea4: 10bfffc4 addi r2,r2,-1
- 43ea8: e0bffa15 stw r2,-24(fp)
- if (control & ALTERA_AVALON_JTAG_UART_CONTROL_WI_MSK)
- {
- /* process a write irq */
- unsigned int space = (control & ALTERA_AVALON_JTAG_UART_CONTROL_WSPACE_MSK) >> ALTERA_AVALON_JTAG_UART_CONTROL_WSPACE_OFST;
- while (space > 0 && sp->tx_out != sp->tx_in)
- 43eac: e0bffa17 ldw r2,-24(fp)
- 43eb0: 10000526 beq r2,zero,43ec8 <altera_avalon_jtag_uart_irq+0x1a8>
- 43eb4: e0bffb17 ldw r2,-20(fp)
- 43eb8: 10c00d17 ldw r3,52(r2)
- 43ebc: e0bffb17 ldw r2,-20(fp)
- 43ec0: 10800c17 ldw r2,48(r2)
- 43ec4: 18bfe51e bne r3,r2,43e5c <altera_avalon_jtag_uart_irq+0x13c>
- ALT_FLAG_POST (sp->events, ALT_JTAG_UART_WRITE_RDY, OS_FLAG_SET);
- space--;
- }
- if (space > 0)
- 43ec8: e0bffa17 ldw r2,-24(fp)
- 43ecc: 103f9d26 beq r2,zero,43d44 <altera_avalon_jtag_uart_irq+0x24>
- {
- /* If we don't have any more data available then turn off the TX interrupt */
- sp->irq_enable &= ~ALTERA_AVALON_JTAG_UART_CONTROL_WE_MSK;
- 43ed0: e0bffb17 ldw r2,-20(fp)
- 43ed4: 10c00817 ldw r3,32(r2)
- 43ed8: 00bfff44 movi r2,-3
- 43edc: 1886703a and r3,r3,r2
- 43ee0: e0bffb17 ldw r2,-20(fp)
- 43ee4: 10c00815 stw r3,32(r2)
- IOWR_ALTERA_AVALON_JTAG_UART_CONTROL(sp->base, sp->irq_enable);
- 43ee8: e0bffb17 ldw r2,-20(fp)
- 43eec: 10800017 ldw r2,0(r2)
- 43ef0: 10800104 addi r2,r2,4
- 43ef4: 1007883a mov r3,r2
- 43ef8: e0bffb17 ldw r2,-20(fp)
- 43efc: 10800817 ldw r2,32(r2)
- 43f00: 18800035 stwio r2,0(r3)
-
- /* Dummy read to ensure IRQ is cleared prior to ISR completion */
- IORD_ALTERA_AVALON_JTAG_UART_CONTROL(base);
- 43f04: e0bffc17 ldw r2,-16(fp)
- 43f08: 10800104 addi r2,r2,4
- 43f0c: 10800037 ldwio r2,0(r2)
- }
- }
- }
- 43f10: 003f8c06 br 43d44 <altera_avalon_jtag_uart_irq+0x24>
- {
- unsigned int control = IORD_ALTERA_AVALON_JTAG_UART_CONTROL(base);
- /* Return once nothing more to do */
- if ((control & (ALTERA_AVALON_JTAG_UART_CONTROL_RI_MSK | ALTERA_AVALON_JTAG_UART_CONTROL_WI_MSK)) == 0)
- break;
- 43f14: 0001883a nop
- /* Dummy read to ensure IRQ is cleared prior to ISR completion */
- IORD_ALTERA_AVALON_JTAG_UART_CONTROL(base);
- }
- }
- }
- }
- 43f18: 0001883a nop
- 43f1c: e037883a mov sp,fp
- 43f20: df000017 ldw fp,0(sp)
- 43f24: dec00104 addi sp,sp,4
- 43f28: f800283a ret
- 00043f2c <altera_avalon_jtag_uart_timeout>:
- * Timeout routine is called every second
- */
- static alt_u32
- altera_avalon_jtag_uart_timeout(void* context)
- {
- 43f2c: defff804 addi sp,sp,-32
- 43f30: df000715 stw fp,28(sp)
- 43f34: df000704 addi fp,sp,28
- 43f38: e13ffb15 stw r4,-20(fp)
- altera_avalon_jtag_uart_state* sp = (altera_avalon_jtag_uart_state *) context;
- 43f3c: e0bffb17 ldw r2,-20(fp)
- 43f40: e0bff915 stw r2,-28(fp)
- unsigned int control = IORD_ALTERA_AVALON_JTAG_UART_CONTROL(sp->base);
- 43f44: e0bff917 ldw r2,-28(fp)
- 43f48: 10800017 ldw r2,0(r2)
- 43f4c: 10800104 addi r2,r2,4
- 43f50: 10800037 ldwio r2,0(r2)
- 43f54: e0bffa15 stw r2,-24(fp)
- if (control & ALTERA_AVALON_JTAG_UART_CONTROL_AC_MSK)
- 43f58: e0bffa17 ldw r2,-24(fp)
- 43f5c: 1081000c andi r2,r2,1024
- 43f60: 10000b26 beq r2,zero,43f90 <altera_avalon_jtag_uart_timeout+0x64>
- {
- IOWR_ALTERA_AVALON_JTAG_UART_CONTROL(sp->base, sp->irq_enable | ALTERA_AVALON_JTAG_UART_CONTROL_AC_MSK);
- 43f64: e0bff917 ldw r2,-28(fp)
- 43f68: 10800017 ldw r2,0(r2)
- 43f6c: 10800104 addi r2,r2,4
- 43f70: 1007883a mov r3,r2
- 43f74: e0bff917 ldw r2,-28(fp)
- 43f78: 10800817 ldw r2,32(r2)
- 43f7c: 10810014 ori r2,r2,1024
- 43f80: 18800035 stwio r2,0(r3)
- sp->host_inactive = 0;
- 43f84: e0bff917 ldw r2,-28(fp)
- 43f88: 10000915 stw zero,36(r2)
- 43f8c: 00000a06 br 43fb8 <altera_avalon_jtag_uart_timeout+0x8c>
- }
- else if (sp->host_inactive < INT_MAX - 2) {
- 43f90: e0bff917 ldw r2,-28(fp)
- 43f94: 10c00917 ldw r3,36(r2)
- 43f98: 00a00034 movhi r2,32768
- 43f9c: 10bfff04 addi r2,r2,-4
- 43fa0: 10c00536 bltu r2,r3,43fb8 <altera_avalon_jtag_uart_timeout+0x8c>
- sp->host_inactive++;
- 43fa4: e0bff917 ldw r2,-28(fp)
- 43fa8: 10800917 ldw r2,36(r2)
- 43fac: 10c00044 addi r3,r2,1
- 43fb0: e0bff917 ldw r2,-28(fp)
- 43fb4: 10c00915 stw r3,36(r2)
- 43fb8: d0a6b117 ldw r2,-25916(gp)
- ALT_FLAG_POST (sp->events, ALT_JTAG_UART_TIMEOUT, OS_FLAG_SET);
- }
- }
- return alt_ticks_per_second();
- }
- 43fbc: e037883a mov sp,fp
- 43fc0: df000017 ldw fp,0(sp)
- 43fc4: dec00104 addi sp,sp,4
- 43fc8: f800283a ret
- 00043fcc <altera_avalon_jtag_uart_close>:
- * The close routine is not implemented for the small driver; instead it will
- * map to null. This is because the small driver simply waits while characters
- * are transmitted; there is no interrupt-serviced buffer to empty
- */
- int altera_avalon_jtag_uart_close(altera_avalon_jtag_uart_state* sp, int flags)
- {
- 43fcc: defffd04 addi sp,sp,-12
- 43fd0: df000215 stw fp,8(sp)
- 43fd4: df000204 addi fp,sp,8
- 43fd8: e13ffe15 stw r4,-8(fp)
- 43fdc: e17fff15 stw r5,-4(fp)
- /*
- * Wait for all transmit data to be emptied by the JTAG UART ISR, or
- * for a host-inactivity timeout, in which case transmit data will be lost
- */
- while ( (sp->tx_out != sp->tx_in) && (sp->host_inactive < sp->timeout) ) {
- 43fe0: 00000506 br 43ff8 <altera_avalon_jtag_uart_close+0x2c>
- if (flags & O_NONBLOCK) {
- 43fe4: e0bfff17 ldw r2,-4(fp)
- 43fe8: 1090000c andi r2,r2,16384
- 43fec: 10000226 beq r2,zero,43ff8 <altera_avalon_jtag_uart_close+0x2c>
- return -EWOULDBLOCK;
- 43ff0: 00bffd44 movi r2,-11
- 43ff4: 00000b06 br 44024 <altera_avalon_jtag_uart_close+0x58>
- {
- /*
- * Wait for all transmit data to be emptied by the JTAG UART ISR, or
- * for a host-inactivity timeout, in which case transmit data will be lost
- */
- while ( (sp->tx_out != sp->tx_in) && (sp->host_inactive < sp->timeout) ) {
- 43ff8: e0bffe17 ldw r2,-8(fp)
- 43ffc: 10c00d17 ldw r3,52(r2)
- 44000: e0bffe17 ldw r2,-8(fp)
- 44004: 10800c17 ldw r2,48(r2)
- 44008: 18800526 beq r3,r2,44020 <altera_avalon_jtag_uart_close+0x54>
- 4400c: e0bffe17 ldw r2,-8(fp)
- 44010: 10c00917 ldw r3,36(r2)
- 44014: e0bffe17 ldw r2,-8(fp)
- 44018: 10800117 ldw r2,4(r2)
- 4401c: 18bff136 bltu r3,r2,43fe4 <altera_avalon_jtag_uart_close+0x18>
- if (flags & O_NONBLOCK) {
- return -EWOULDBLOCK;
- }
- }
- return 0;
- 44020: 0005883a mov r2,zero
- }
- 44024: e037883a mov sp,fp
- 44028: df000017 ldw fp,0(sp)
- 4402c: dec00104 addi sp,sp,4
- 44030: f800283a ret
- 00044034 <altera_avalon_jtag_uart_ioctl>:
- /* ----------------------------------------------------------- */
- int
- altera_avalon_jtag_uart_ioctl(altera_avalon_jtag_uart_state* sp, int req,
- void* arg)
- {
- 44034: defffa04 addi sp,sp,-24
- 44038: df000515 stw fp,20(sp)
- 4403c: df000504 addi fp,sp,20
- 44040: e13ffd15 stw r4,-12(fp)
- 44044: e17ffe15 stw r5,-8(fp)
- 44048: e1bfff15 stw r6,-4(fp)
- int rc = -ENOTTY;
- 4404c: 00bff9c4 movi r2,-25
- 44050: e0bffb15 stw r2,-20(fp)
- switch (req)
- 44054: e0bffe17 ldw r2,-8(fp)
- 44058: 10da8060 cmpeqi r3,r2,27137
- 4405c: 1800031e bne r3,zero,4406c <altera_avalon_jtag_uart_ioctl+0x38>
- 44060: 109a80a0 cmpeqi r2,r2,27138
- 44064: 1000181e bne r2,zero,440c8 <altera_avalon_jtag_uart_ioctl+0x94>
- rc = 0;
- }
- break;
- default:
- break;
- 44068: 00002906 br 44110 <altera_avalon_jtag_uart_ioctl+0xdc>
- switch (req)
- {
- case TIOCSTIMEOUT:
- /* Set the time to wait until assuming host is not connected */
- if (sp->timeout != INT_MAX)
- 4406c: e0bffd17 ldw r2,-12(fp)
- 44070: 10c00117 ldw r3,4(r2)
- 44074: 00a00034 movhi r2,32768
- 44078: 10bfffc4 addi r2,r2,-1
- 4407c: 18802126 beq r3,r2,44104 <altera_avalon_jtag_uart_ioctl+0xd0>
- {
- int timeout = *((int *)arg);
- 44080: e0bfff17 ldw r2,-4(fp)
- 44084: 10800017 ldw r2,0(r2)
- 44088: e0bffc15 stw r2,-16(fp)
- sp->timeout = (timeout >= 2 && timeout < INT_MAX) ? timeout : INT_MAX - 1;
- 4408c: e0bffc17 ldw r2,-16(fp)
- 44090: 10800090 cmplti r2,r2,2
- 44094: 1000061e bne r2,zero,440b0 <altera_avalon_jtag_uart_ioctl+0x7c>
- 44098: e0fffc17 ldw r3,-16(fp)
- 4409c: 00a00034 movhi r2,32768
- 440a0: 10bfffc4 addi r2,r2,-1
- 440a4: 18800226 beq r3,r2,440b0 <altera_avalon_jtag_uart_ioctl+0x7c>
- 440a8: e0bffc17 ldw r2,-16(fp)
- 440ac: 00000206 br 440b8 <altera_avalon_jtag_uart_ioctl+0x84>
- 440b0: 00a00034 movhi r2,32768
- 440b4: 10bfff84 addi r2,r2,-2
- 440b8: e0fffd17 ldw r3,-12(fp)
- 440bc: 18800115 stw r2,4(r3)
- rc = 0;
- 440c0: e03ffb15 stw zero,-20(fp)
- }
- break;
- 440c4: 00000f06 br 44104 <altera_avalon_jtag_uart_ioctl+0xd0>
- case TIOCGCONNECTED:
- /* Find out whether host is connected */
- if (sp->timeout != INT_MAX)
- 440c8: e0bffd17 ldw r2,-12(fp)
- 440cc: 10c00117 ldw r3,4(r2)
- 440d0: 00a00034 movhi r2,32768
- 440d4: 10bfffc4 addi r2,r2,-1
- 440d8: 18800c26 beq r3,r2,4410c <altera_avalon_jtag_uart_ioctl+0xd8>
- {
- *((int *)arg) = (sp->host_inactive < sp->timeout) ? 1 : 0;
- 440dc: e0bffd17 ldw r2,-12(fp)
- 440e0: 10c00917 ldw r3,36(r2)
- 440e4: e0bffd17 ldw r2,-12(fp)
- 440e8: 10800117 ldw r2,4(r2)
- 440ec: 1885803a cmpltu r2,r3,r2
- 440f0: 10c03fcc andi r3,r2,255
- 440f4: e0bfff17 ldw r2,-4(fp)
- 440f8: 10c00015 stw r3,0(r2)
- rc = 0;
- 440fc: e03ffb15 stw zero,-20(fp)
- }
- break;
- 44100: 00000206 br 4410c <altera_avalon_jtag_uart_ioctl+0xd8>
- {
- int timeout = *((int *)arg);
- sp->timeout = (timeout >= 2 && timeout < INT_MAX) ? timeout : INT_MAX - 1;
- rc = 0;
- }
- break;
- 44104: 0001883a nop
- 44108: 00000106 br 44110 <altera_avalon_jtag_uart_ioctl+0xdc>
- if (sp->timeout != INT_MAX)
- {
- *((int *)arg) = (sp->host_inactive < sp->timeout) ? 1 : 0;
- rc = 0;
- }
- break;
- 4410c: 0001883a nop
- default:
- break;
- }
- return rc;
- 44110: e0bffb17 ldw r2,-20(fp)
- }
- 44114: e037883a mov sp,fp
- 44118: df000017 ldw fp,0(sp)
- 4411c: dec00104 addi sp,sp,4
- 44120: f800283a ret
- 00044124 <altera_avalon_jtag_uart_read>:
- /* ----------------------------------------------------------- */
- int
- altera_avalon_jtag_uart_read(altera_avalon_jtag_uart_state* sp,
- char * buffer, int space, int flags)
- {
- 44124: defff304 addi sp,sp,-52
- 44128: dfc00c15 stw ra,48(sp)
- 4412c: df000b15 stw fp,44(sp)
- 44130: df000b04 addi fp,sp,44
- 44134: e13ffc15 stw r4,-16(fp)
- 44138: e17ffd15 stw r5,-12(fp)
- 4413c: e1bffe15 stw r6,-8(fp)
- 44140: e1ffff15 stw r7,-4(fp)
- char * ptr = buffer;
- 44144: e0bffd17 ldw r2,-12(fp)
- 44148: e0bff515 stw r2,-44(fp)
- * When running in a multi threaded environment, obtain the "read_lock"
- * semaphore. This ensures that reading from the device is thread-safe.
- */
- ALT_SEM_PEND (sp->read_lock, 0);
- while (space > 0)
- 4414c: 00004706 br 4426c <altera_avalon_jtag_uart_read+0x148>
- unsigned int in, out;
- /* Read as much data as possible */
- do
- {
- in = sp->rx_in;
- 44150: e0bffc17 ldw r2,-16(fp)
- 44154: 10800a17 ldw r2,40(r2)
- 44158: e0bff715 stw r2,-36(fp)
- out = sp->rx_out;
- 4415c: e0bffc17 ldw r2,-16(fp)
- 44160: 10800b17 ldw r2,44(r2)
- 44164: e0bff815 stw r2,-32(fp)
- if (in >= out)
- 44168: e0fff717 ldw r3,-36(fp)
- 4416c: e0bff817 ldw r2,-32(fp)
- 44170: 18800536 bltu r3,r2,44188 <altera_avalon_jtag_uart_read+0x64>
- n = in - out;
- 44174: e0fff717 ldw r3,-36(fp)
- 44178: e0bff817 ldw r2,-32(fp)
- 4417c: 1885c83a sub r2,r3,r2
- 44180: e0bff615 stw r2,-40(fp)
- 44184: 00000406 br 44198 <altera_avalon_jtag_uart_read+0x74>
- else
- n = ALTERA_AVALON_JTAG_UART_BUF_LEN - out;
- 44188: 00c20004 movi r3,2048
- 4418c: e0bff817 ldw r2,-32(fp)
- 44190: 1885c83a sub r2,r3,r2
- 44194: e0bff615 stw r2,-40(fp)
- if (n == 0)
- 44198: e0bff617 ldw r2,-40(fp)
- 4419c: 10001e26 beq r2,zero,44218 <altera_avalon_jtag_uart_read+0xf4>
- break; /* No more data available */
- if (n > space)
- 441a0: e0fffe17 ldw r3,-8(fp)
- 441a4: e0bff617 ldw r2,-40(fp)
- 441a8: 1880022e bgeu r3,r2,441b4 <altera_avalon_jtag_uart_read+0x90>
- n = space;
- 441ac: e0bffe17 ldw r2,-8(fp)
- 441b0: e0bff615 stw r2,-40(fp)
- memcpy(ptr, sp->rx_buf + out, n);
- 441b4: e0bffc17 ldw r2,-16(fp)
- 441b8: 10c00e04 addi r3,r2,56
- 441bc: e0bff817 ldw r2,-32(fp)
- 441c0: 1885883a add r2,r3,r2
- 441c4: e1bff617 ldw r6,-40(fp)
- 441c8: 100b883a mov r5,r2
- 441cc: e13ff517 ldw r4,-44(fp)
- 441d0: 00417040 call 41704 <memcpy>
- ptr += n;
- 441d4: e0fff517 ldw r3,-44(fp)
- 441d8: e0bff617 ldw r2,-40(fp)
- 441dc: 1885883a add r2,r3,r2
- 441e0: e0bff515 stw r2,-44(fp)
- space -= n;
- 441e4: e0fffe17 ldw r3,-8(fp)
- 441e8: e0bff617 ldw r2,-40(fp)
- 441ec: 1885c83a sub r2,r3,r2
- 441f0: e0bffe15 stw r2,-8(fp)
- sp->rx_out = (out + n) % ALTERA_AVALON_JTAG_UART_BUF_LEN;
- 441f4: e0fff817 ldw r3,-32(fp)
- 441f8: e0bff617 ldw r2,-40(fp)
- 441fc: 1885883a add r2,r3,r2
- 44200: 10c1ffcc andi r3,r2,2047
- 44204: e0bffc17 ldw r2,-16(fp)
- 44208: 10c00b15 stw r3,44(r2)
- }
- while (space > 0);
- 4420c: e0bffe17 ldw r2,-8(fp)
- 44210: 00bfcf16 blt zero,r2,44150 <altera_avalon_jtag_uart_read+0x2c>
- 44214: 00000106 br 4421c <altera_avalon_jtag_uart_read+0xf8>
- n = in - out;
- else
- n = ALTERA_AVALON_JTAG_UART_BUF_LEN - out;
- if (n == 0)
- break; /* No more data available */
- 44218: 0001883a nop
- sp->rx_out = (out + n) % ALTERA_AVALON_JTAG_UART_BUF_LEN;
- }
- while (space > 0);
- /* If we read any data then return it */
- if (ptr != buffer)
- 4421c: e0fff517 ldw r3,-44(fp)
- 44220: e0bffd17 ldw r2,-12(fp)
- 44224: 1880141e bne r3,r2,44278 <altera_avalon_jtag_uart_read+0x154>
- break;
- /* If in non-blocking mode then return error */
- if (flags & O_NONBLOCK)
- 44228: e0bfff17 ldw r2,-4(fp)
- 4422c: 1090000c andi r2,r2,16384
- 44230: 1000131e bne r2,zero,44280 <altera_avalon_jtag_uart_read+0x15c>
- while (in == sp->rx_in && sp->host_inactive < sp->timeout)
- ;
- }
- #else
- /* No OS: Always spin */
- while (in == sp->rx_in && sp->host_inactive < sp->timeout)
- 44234: 0001883a nop
- 44238: e0bffc17 ldw r2,-16(fp)
- 4423c: 10c00a17 ldw r3,40(r2)
- 44240: e0bff717 ldw r2,-36(fp)
- 44244: 1880051e bne r3,r2,4425c <altera_avalon_jtag_uart_read+0x138>
- 44248: e0bffc17 ldw r2,-16(fp)
- 4424c: 10c00917 ldw r3,36(r2)
- 44250: e0bffc17 ldw r2,-16(fp)
- 44254: 10800117 ldw r2,4(r2)
- 44258: 18bff736 bltu r3,r2,44238 <altera_avalon_jtag_uart_read+0x114>
- ;
- #endif /* __ucosii__ */
- if (in == sp->rx_in)
- 4425c: e0bffc17 ldw r2,-16(fp)
- 44260: 10c00a17 ldw r3,40(r2)
- 44264: e0bff717 ldw r2,-36(fp)
- 44268: 18800726 beq r3,r2,44288 <altera_avalon_jtag_uart_read+0x164>
- * When running in a multi threaded environment, obtain the "read_lock"
- * semaphore. This ensures that reading from the device is thread-safe.
- */
- ALT_SEM_PEND (sp->read_lock, 0);
- while (space > 0)
- 4426c: e0bffe17 ldw r2,-8(fp)
- 44270: 00bfb716 blt zero,r2,44150 <altera_avalon_jtag_uart_read+0x2c>
- 44274: 00000506 br 4428c <altera_avalon_jtag_uart_read+0x168>
- }
- while (space > 0);
- /* If we read any data then return it */
- if (ptr != buffer)
- break;
- 44278: 0001883a nop
- 4427c: 00000306 br 4428c <altera_avalon_jtag_uart_read+0x168>
- /* If in non-blocking mode then return error */
- if (flags & O_NONBLOCK)
- break;
- 44280: 0001883a nop
- 44284: 00000106 br 4428c <altera_avalon_jtag_uart_read+0x168>
- while (in == sp->rx_in && sp->host_inactive < sp->timeout)
- ;
- #endif /* __ucosii__ */
- if (in == sp->rx_in)
- break;
- 44288: 0001883a nop
- * semaphore so that other threads can access the buffer.
- */
- ALT_SEM_POST (sp->read_lock);
- if (ptr != buffer)
- 4428c: e0fff517 ldw r3,-44(fp)
- 44290: e0bffd17 ldw r2,-12(fp)
- 44294: 18801826 beq r3,r2,442f8 <altera_avalon_jtag_uart_read+0x1d4>
- static ALT_INLINE alt_irq_context ALT_ALWAYS_INLINE
- alt_irq_disable_all (void)
- {
- alt_irq_context context;
- NIOS2_READ_STATUS (context);
- 44298: 0005303a rdctl r2,status
- 4429c: e0bffb15 stw r2,-20(fp)
- NIOS2_WRITE_STATUS (context & ~NIOS2_STATUS_PIE_MSK);
- 442a0: e0fffb17 ldw r3,-20(fp)
- 442a4: 00bfff84 movi r2,-2
- 442a8: 1884703a and r2,r3,r2
- 442ac: 1001703a wrctl status,r2
-
- return context;
- 442b0: e0bffb17 ldw r2,-20(fp)
- {
- /* If we read any data then there is space in the buffer so enable interrupts */
- context = alt_irq_disable_all();
- 442b4: e0bffa15 stw r2,-24(fp)
- sp->irq_enable |= ALTERA_AVALON_JTAG_UART_CONTROL_RE_MSK;
- 442b8: e0bffc17 ldw r2,-16(fp)
- 442bc: 10800817 ldw r2,32(r2)
- 442c0: 10c00054 ori r3,r2,1
- 442c4: e0bffc17 ldw r2,-16(fp)
- 442c8: 10c00815 stw r3,32(r2)
- IOWR_ALTERA_AVALON_JTAG_UART_CONTROL(sp->base, sp->irq_enable);
- 442cc: e0bffc17 ldw r2,-16(fp)
- 442d0: 10800017 ldw r2,0(r2)
- 442d4: 10800104 addi r2,r2,4
- 442d8: 1007883a mov r3,r2
- 442dc: e0bffc17 ldw r2,-16(fp)
- 442e0: 10800817 ldw r2,32(r2)
- 442e4: 18800035 stwio r2,0(r3)
- 442e8: e0bffa17 ldw r2,-24(fp)
- 442ec: e0bff915 stw r2,-28(fp)
- status &= ~NIOS2_STATUS_PIE_MSK;
- status |= (context & NIOS2_STATUS_PIE_MSK);
-
- NIOS2_WRITE_STATUS (status);
- #else
- NIOS2_WRITE_STATUS (context);
- 442f0: e0bff917 ldw r2,-28(fp)
- 442f4: 1001703a wrctl status,r2
- alt_irq_enable_all(context);
- }
- if (ptr != buffer)
- 442f8: e0fff517 ldw r3,-44(fp)
- 442fc: e0bffd17 ldw r2,-12(fp)
- 44300: 18800426 beq r3,r2,44314 <altera_avalon_jtag_uart_read+0x1f0>
- return ptr - buffer;
- 44304: e0fff517 ldw r3,-44(fp)
- 44308: e0bffd17 ldw r2,-12(fp)
- 4430c: 1885c83a sub r2,r3,r2
- 44310: 00000606 br 4432c <altera_avalon_jtag_uart_read+0x208>
- else if (flags & O_NONBLOCK)
- 44314: e0bfff17 ldw r2,-4(fp)
- 44318: 1090000c andi r2,r2,16384
- 4431c: 10000226 beq r2,zero,44328 <altera_avalon_jtag_uart_read+0x204>
- return -EWOULDBLOCK;
- 44320: 00bffd44 movi r2,-11
- 44324: 00000106 br 4432c <altera_avalon_jtag_uart_read+0x208>
- else
- return -EIO;
- 44328: 00bffec4 movi r2,-5
- }
- 4432c: e037883a mov sp,fp
- 44330: dfc00117 ldw ra,4(sp)
- 44334: df000017 ldw fp,0(sp)
- 44338: dec00204 addi sp,sp,8
- 4433c: f800283a ret
- 00044340 <altera_avalon_jtag_uart_write>:
- /* ----------------------------------------------------------- */
- int
- altera_avalon_jtag_uart_write(altera_avalon_jtag_uart_state* sp,
- const char * ptr, int count, int flags)
- {
- 44340: defff304 addi sp,sp,-52
- 44344: dfc00c15 stw ra,48(sp)
- 44348: df000b15 stw fp,44(sp)
- 4434c: df000b04 addi fp,sp,44
- 44350: e13ffc15 stw r4,-16(fp)
- 44354: e17ffd15 stw r5,-12(fp)
- 44358: e1bffe15 stw r6,-8(fp)
- 4435c: e1ffff15 stw r7,-4(fp)
- /* Remove warning at optimisation level 03 by seting out to 0 */
- unsigned int in, out=0;
- 44360: e03ff515 stw zero,-44(fp)
- unsigned int n;
- alt_irq_context context;
- const char * start = ptr;
- 44364: e0bffd17 ldw r2,-12(fp)
- 44368: e0bff715 stw r2,-36(fp)
- ALT_SEM_PEND (sp->write_lock, 0);
- do
- {
- /* Copy as much as we can into the transmit buffer */
- while (count > 0)
- 4436c: 00003706 br 4444c <altera_avalon_jtag_uart_write+0x10c>
- {
- /* We need a stable value of the out pointer to calculate the space available */
- in = sp->tx_in;
- 44370: e0bffc17 ldw r2,-16(fp)
- 44374: 10800c17 ldw r2,48(r2)
- 44378: e0bff915 stw r2,-28(fp)
- out = sp->tx_out;
- 4437c: e0bffc17 ldw r2,-16(fp)
- 44380: 10800d17 ldw r2,52(r2)
- 44384: e0bff515 stw r2,-44(fp)
- if (in < out)
- 44388: e0fff917 ldw r3,-28(fp)
- 4438c: e0bff517 ldw r2,-44(fp)
- 44390: 1880062e bgeu r3,r2,443ac <altera_avalon_jtag_uart_write+0x6c>
- n = out - 1 - in;
- 44394: e0fff517 ldw r3,-44(fp)
- 44398: e0bff917 ldw r2,-28(fp)
- 4439c: 1885c83a sub r2,r3,r2
- 443a0: 10bfffc4 addi r2,r2,-1
- 443a4: e0bff615 stw r2,-40(fp)
- 443a8: 00000b06 br 443d8 <altera_avalon_jtag_uart_write+0x98>
- else if (out > 0)
- 443ac: e0bff517 ldw r2,-44(fp)
- 443b0: 10000526 beq r2,zero,443c8 <altera_avalon_jtag_uart_write+0x88>
- n = ALTERA_AVALON_JTAG_UART_BUF_LEN - in;
- 443b4: 00c20004 movi r3,2048
- 443b8: e0bff917 ldw r2,-28(fp)
- 443bc: 1885c83a sub r2,r3,r2
- 443c0: e0bff615 stw r2,-40(fp)
- 443c4: 00000406 br 443d8 <altera_avalon_jtag_uart_write+0x98>
- else
- n = ALTERA_AVALON_JTAG_UART_BUF_LEN - 1 - in;
- 443c8: 00c1ffc4 movi r3,2047
- 443cc: e0bff917 ldw r2,-28(fp)
- 443d0: 1885c83a sub r2,r3,r2
- 443d4: e0bff615 stw r2,-40(fp)
- if (n == 0)
- 443d8: e0bff617 ldw r2,-40(fp)
- 443dc: 10001e26 beq r2,zero,44458 <altera_avalon_jtag_uart_write+0x118>
- break;
- if (n > count)
- 443e0: e0fffe17 ldw r3,-8(fp)
- 443e4: e0bff617 ldw r2,-40(fp)
- 443e8: 1880022e bgeu r3,r2,443f4 <altera_avalon_jtag_uart_write+0xb4>
- n = count;
- 443ec: e0bffe17 ldw r2,-8(fp)
- 443f0: e0bff615 stw r2,-40(fp)
- memcpy(sp->tx_buf + in, ptr, n);
- 443f4: e0bffc17 ldw r2,-16(fp)
- 443f8: 10c20e04 addi r3,r2,2104
- 443fc: e0bff917 ldw r2,-28(fp)
- 44400: 1885883a add r2,r3,r2
- 44404: e1bff617 ldw r6,-40(fp)
- 44408: e17ffd17 ldw r5,-12(fp)
- 4440c: 1009883a mov r4,r2
- 44410: 00417040 call 41704 <memcpy>
- ptr += n;
- 44414: e0fffd17 ldw r3,-12(fp)
- 44418: e0bff617 ldw r2,-40(fp)
- 4441c: 1885883a add r2,r3,r2
- 44420: e0bffd15 stw r2,-12(fp)
- count -= n;
- 44424: e0fffe17 ldw r3,-8(fp)
- 44428: e0bff617 ldw r2,-40(fp)
- 4442c: 1885c83a sub r2,r3,r2
- 44430: e0bffe15 stw r2,-8(fp)
- sp->tx_in = (in + n) % ALTERA_AVALON_JTAG_UART_BUF_LEN;
- 44434: e0fff917 ldw r3,-28(fp)
- 44438: e0bff617 ldw r2,-40(fp)
- 4443c: 1885883a add r2,r3,r2
- 44440: 10c1ffcc andi r3,r2,2047
- 44444: e0bffc17 ldw r2,-16(fp)
- 44448: 10c00c15 stw r3,48(r2)
- ALT_SEM_PEND (sp->write_lock, 0);
- do
- {
- /* Copy as much as we can into the transmit buffer */
- while (count > 0)
- 4444c: e0bffe17 ldw r2,-8(fp)
- 44450: 00bfc716 blt zero,r2,44370 <altera_avalon_jtag_uart_write+0x30>
- 44454: 00000106 br 4445c <altera_avalon_jtag_uart_write+0x11c>
- n = ALTERA_AVALON_JTAG_UART_BUF_LEN - in;
- else
- n = ALTERA_AVALON_JTAG_UART_BUF_LEN - 1 - in;
- if (n == 0)
- break;
- 44458: 0001883a nop
- static ALT_INLINE alt_irq_context ALT_ALWAYS_INLINE
- alt_irq_disable_all (void)
- {
- alt_irq_context context;
- NIOS2_READ_STATUS (context);
- 4445c: 0005303a rdctl r2,status
- 44460: e0bffb15 stw r2,-20(fp)
- NIOS2_WRITE_STATUS (context & ~NIOS2_STATUS_PIE_MSK);
- 44464: e0fffb17 ldw r3,-20(fp)
- 44468: 00bfff84 movi r2,-2
- 4446c: 1884703a and r2,r3,r2
- 44470: 1001703a wrctl status,r2
-
- return context;
- 44474: e0bffb17 ldw r2,-20(fp)
- * to enable interrupts if there is no space left in the FIFO
- *
- * For now kick the interrupt routine every time to make it transmit
- * the data
- */
- context = alt_irq_disable_all();
- 44478: e0bffa15 stw r2,-24(fp)
- sp->irq_enable |= ALTERA_AVALON_JTAG_UART_CONTROL_WE_MSK;
- 4447c: e0bffc17 ldw r2,-16(fp)
- 44480: 10800817 ldw r2,32(r2)
- 44484: 10c00094 ori r3,r2,2
- 44488: e0bffc17 ldw r2,-16(fp)
- 4448c: 10c00815 stw r3,32(r2)
- IOWR_ALTERA_AVALON_JTAG_UART_CONTROL(sp->base, sp->irq_enable);
- 44490: e0bffc17 ldw r2,-16(fp)
- 44494: 10800017 ldw r2,0(r2)
- 44498: 10800104 addi r2,r2,4
- 4449c: 1007883a mov r3,r2
- 444a0: e0bffc17 ldw r2,-16(fp)
- 444a4: 10800817 ldw r2,32(r2)
- 444a8: 18800035 stwio r2,0(r3)
- 444ac: e0bffa17 ldw r2,-24(fp)
- 444b0: e0bff815 stw r2,-32(fp)
- status &= ~NIOS2_STATUS_PIE_MSK;
- status |= (context & NIOS2_STATUS_PIE_MSK);
-
- NIOS2_WRITE_STATUS (status);
- #else
- NIOS2_WRITE_STATUS (context);
- 444b4: e0bff817 ldw r2,-32(fp)
- 444b8: 1001703a wrctl status,r2
- /*
- * If there is any data left then either return now or block until
- * some has been sent
- */
- /* consider: test whether there is anything there while doing this and delay for at most 2s. */
- if (count > 0)
- 444bc: e0bffe17 ldw r2,-8(fp)
- 444c0: 0080100e bge zero,r2,44504 <altera_avalon_jtag_uart_write+0x1c4>
- {
- if (flags & O_NONBLOCK)
- 444c4: e0bfff17 ldw r2,-4(fp)
- 444c8: 1090000c andi r2,r2,16384
- 444cc: 1000101e bne r2,zero,44510 <altera_avalon_jtag_uart_write+0x1d0>
- /*
- * No OS present: Always wait for data to be removed from buffer. Once
- * the interrupt routine has removed some data then we will be able to
- * insert some more.
- */
- while (out == sp->tx_out && sp->host_inactive < sp->timeout)
- 444d0: 0001883a nop
- 444d4: e0bffc17 ldw r2,-16(fp)
- 444d8: 10c00d17 ldw r3,52(r2)
- 444dc: e0bff517 ldw r2,-44(fp)
- 444e0: 1880051e bne r3,r2,444f8 <altera_avalon_jtag_uart_write+0x1b8>
- 444e4: e0bffc17 ldw r2,-16(fp)
- 444e8: 10c00917 ldw r3,36(r2)
- 444ec: e0bffc17 ldw r2,-16(fp)
- 444f0: 10800117 ldw r2,4(r2)
- 444f4: 18bff736 bltu r3,r2,444d4 <altera_avalon_jtag_uart_write+0x194>
- ;
- #endif /* __ucosii__ */
- if (sp->host_inactive)
- 444f8: e0bffc17 ldw r2,-16(fp)
- 444fc: 10800917 ldw r2,36(r2)
- 44500: 1000051e bne r2,zero,44518 <altera_avalon_jtag_uart_write+0x1d8>
- break;
- }
- }
- while (count > 0);
- 44504: e0bffe17 ldw r2,-8(fp)
- 44508: 00bfd016 blt zero,r2,4444c <altera_avalon_jtag_uart_write+0x10c>
- 4450c: 00000306 br 4451c <altera_avalon_jtag_uart_write+0x1dc>
- */
- /* consider: test whether there is anything there while doing this and delay for at most 2s. */
- if (count > 0)
- {
- if (flags & O_NONBLOCK)
- break;
- 44510: 0001883a nop
- 44514: 00000106 br 4451c <altera_avalon_jtag_uart_write+0x1dc>
- while (out == sp->tx_out && sp->host_inactive < sp->timeout)
- ;
- #endif /* __ucosii__ */
- if (sp->host_inactive)
- break;
- 44518: 0001883a nop
- * Now that access to the circular buffer is complete, release the write
- * semaphore so that other threads can access the buffer.
- */
- ALT_SEM_POST (sp->write_lock);
- if (ptr != start)
- 4451c: e0fffd17 ldw r3,-12(fp)
- 44520: e0bff717 ldw r2,-36(fp)
- 44524: 18800426 beq r3,r2,44538 <altera_avalon_jtag_uart_write+0x1f8>
- return ptr - start;
- 44528: e0fffd17 ldw r3,-12(fp)
- 4452c: e0bff717 ldw r2,-36(fp)
- 44530: 1885c83a sub r2,r3,r2
- 44534: 00000606 br 44550 <altera_avalon_jtag_uart_write+0x210>
- else if (flags & O_NONBLOCK)
- 44538: e0bfff17 ldw r2,-4(fp)
- 4453c: 1090000c andi r2,r2,16384
- 44540: 10000226 beq r2,zero,4454c <altera_avalon_jtag_uart_write+0x20c>
- return -EWOULDBLOCK;
- 44544: 00bffd44 movi r2,-11
- 44548: 00000106 br 44550 <altera_avalon_jtag_uart_write+0x210>
- sp->tx_out = sp->tx_in = 0;
- return ptr - start + count;
- }
- #endif
- else
- return -EIO; /* Host not connected */
- 4454c: 00bffec4 movi r2,-5
- }
- 44550: e037883a mov sp,fp
- 44554: dfc00117 ldw ra,4(sp)
- 44558: df000017 ldw fp,0(sp)
- 4455c: dec00204 addi sp,sp,8
- 44560: f800283a ret
- 00044564 <alt_alarm_start>:
- */
- int alt_alarm_start (alt_alarm* alarm, alt_u32 nticks,
- alt_u32 (*callback) (void* context),
- void* context)
- {
- 44564: defff504 addi sp,sp,-44
- 44568: df000a15 stw fp,40(sp)
- 4456c: df000a04 addi fp,sp,40
- 44570: e13ffc15 stw r4,-16(fp)
- 44574: e17ffd15 stw r5,-12(fp)
- 44578: e1bffe15 stw r6,-8(fp)
- 4457c: e1ffff15 stw r7,-4(fp)
- alt_irq_context irq_context;
- alt_u32 current_nticks = 0;
- 44580: e03ff615 stw zero,-40(fp)
- 44584: d0a6b117 ldw r2,-25916(gp)
-
- if (alt_ticks_per_second ())
- 44588: 10003c26 beq r2,zero,4467c <alt_alarm_start+0x118>
- {
- if (alarm)
- 4458c: e0bffc17 ldw r2,-16(fp)
- 44590: 10003826 beq r2,zero,44674 <alt_alarm_start+0x110>
- {
- alarm->callback = callback;
- 44594: e0bffc17 ldw r2,-16(fp)
- 44598: e0fffe17 ldw r3,-8(fp)
- 4459c: 10c00315 stw r3,12(r2)
- alarm->context = context;
- 445a0: e0bffc17 ldw r2,-16(fp)
- 445a4: e0ffff17 ldw r3,-4(fp)
- 445a8: 10c00515 stw r3,20(r2)
- static ALT_INLINE alt_irq_context ALT_ALWAYS_INLINE
- alt_irq_disable_all (void)
- {
- alt_irq_context context;
- NIOS2_READ_STATUS (context);
- 445ac: 0005303a rdctl r2,status
- 445b0: e0bff915 stw r2,-28(fp)
- NIOS2_WRITE_STATUS (context & ~NIOS2_STATUS_PIE_MSK);
- 445b4: e0fff917 ldw r3,-28(fp)
- 445b8: 00bfff84 movi r2,-2
- 445bc: 1884703a and r2,r3,r2
- 445c0: 1001703a wrctl status,r2
-
- return context;
- 445c4: e0bff917 ldw r2,-28(fp)
-
- irq_context = alt_irq_disable_all ();
- 445c8: e0bff815 stw r2,-32(fp)
- * alt_nticks() returns the elapsed number of system clock ticks since reset.
- */
- static ALT_INLINE alt_u32 ALT_ALWAYS_INLINE alt_nticks (void)
- {
- return _alt_nticks;
- 445cc: d0a6b217 ldw r2,-25912(gp)
-
- current_nticks = alt_nticks();
- 445d0: e0bff615 stw r2,-40(fp)
-
- alarm->time = nticks + current_nticks + 1;
- 445d4: e0fffd17 ldw r3,-12(fp)
- 445d8: e0bff617 ldw r2,-40(fp)
- 445dc: 1885883a add r2,r3,r2
- 445e0: 10c00044 addi r3,r2,1
- 445e4: e0bffc17 ldw r2,-16(fp)
- 445e8: 10c00215 stw r3,8(r2)
- /*
- * If the desired alarm time causes a roll-over, set the rollover
- * flag. This will prevent the subsequent tick event from causing
- * an alarm too early.
- */
- if(alarm->time < current_nticks)
- 445ec: e0bffc17 ldw r2,-16(fp)
- 445f0: 10c00217 ldw r3,8(r2)
- 445f4: e0bff617 ldw r2,-40(fp)
- 445f8: 1880042e bgeu r3,r2,4460c <alt_alarm_start+0xa8>
- {
- alarm->rollover = 1;
- 445fc: e0bffc17 ldw r2,-16(fp)
- 44600: 00c00044 movi r3,1
- 44604: 10c00405 stb r3,16(r2)
- 44608: 00000206 br 44614 <alt_alarm_start+0xb0>
- }
- else
- {
- alarm->rollover = 0;
- 4460c: e0bffc17 ldw r2,-16(fp)
- 44610: 10000405 stb zero,16(r2)
- }
-
- alt_llist_insert (&alt_alarm_list, &alarm->llist);
- 44614: e0bffc17 ldw r2,-16(fp)
- 44618: d0e00c04 addi r3,gp,-32720
- 4461c: e0fffa15 stw r3,-24(fp)
- 44620: e0bffb15 stw r2,-20(fp)
- */
- static ALT_INLINE void ALT_ALWAYS_INLINE alt_llist_insert(alt_llist* list,
- alt_llist* entry)
- {
- entry->previous = list;
- 44624: e0bffb17 ldw r2,-20(fp)
- 44628: e0fffa17 ldw r3,-24(fp)
- 4462c: 10c00115 stw r3,4(r2)
- entry->next = list->next;
- 44630: e0bffa17 ldw r2,-24(fp)
- 44634: 10c00017 ldw r3,0(r2)
- 44638: e0bffb17 ldw r2,-20(fp)
- 4463c: 10c00015 stw r3,0(r2)
- list->next->previous = entry;
- 44640: e0bffa17 ldw r2,-24(fp)
- 44644: 10800017 ldw r2,0(r2)
- 44648: e0fffb17 ldw r3,-20(fp)
- 4464c: 10c00115 stw r3,4(r2)
- list->next = entry;
- 44650: e0bffa17 ldw r2,-24(fp)
- 44654: e0fffb17 ldw r3,-20(fp)
- 44658: 10c00015 stw r3,0(r2)
- 4465c: e0bff817 ldw r2,-32(fp)
- 44660: e0bff715 stw r2,-36(fp)
- status &= ~NIOS2_STATUS_PIE_MSK;
- status |= (context & NIOS2_STATUS_PIE_MSK);
-
- NIOS2_WRITE_STATUS (status);
- #else
- NIOS2_WRITE_STATUS (context);
- 44664: e0bff717 ldw r2,-36(fp)
- 44668: 1001703a wrctl status,r2
- alt_irq_enable_all (irq_context);
- return 0;
- 4466c: 0005883a mov r2,zero
- 44670: 00000306 br 44680 <alt_alarm_start+0x11c>
- }
- else
- {
- return -EINVAL;
- 44674: 00bffa84 movi r2,-22
- 44678: 00000106 br 44680 <alt_alarm_start+0x11c>
- }
- }
- else
- {
- return -ENOTSUP;
- 4467c: 00bfde84 movi r2,-134
- }
- }
- 44680: e037883a mov sp,fp
- 44684: df000017 ldw fp,0(sp)
- 44688: dec00104 addi sp,sp,4
- 4468c: f800283a ret
- 00044690 <alt_dcache_flush_all>:
- /*
- * alt_dcache_flush_all() is called to flush the entire data cache.
- */
- void alt_dcache_flush_all (void)
- {
- 44690: deffff04 addi sp,sp,-4
- 44694: df000015 stw fp,0(sp)
- 44698: d839883a mov fp,sp
- for (i = (char*) 0; i < (char*) NIOS2_DCACHE_SIZE; i+= NIOS2_DCACHE_LINE_SIZE)
- {
- __asm__ volatile ("flushd (%0)" :: "r" (i));
- }
- #endif /* NIOS2_DCACHE_SIZE > 0 */
- }
- 4469c: 0001883a nop
- 446a0: e037883a mov sp,fp
- 446a4: df000017 ldw fp,0(sp)
- 446a8: dec00104 addi sp,sp,4
- 446ac: f800283a ret
- 000446b0 <alt_get_errno>:
- #undef errno
- extern int errno;
- static ALT_INLINE int* alt_get_errno(void)
- {
- 446b0: defffe04 addi sp,sp,-8
- 446b4: dfc00115 stw ra,4(sp)
- 446b8: df000015 stw fp,0(sp)
- 446bc: d839883a mov fp,sp
- return ((alt_errno) ? alt_errno() : &errno);
- 446c0: d0a00917 ldw r2,-32732(gp)
- 446c4: 10000326 beq r2,zero,446d4 <alt_get_errno+0x24>
- 446c8: d0a00917 ldw r2,-32732(gp)
- 446cc: 103ee83a callr r2
- 446d0: 00000106 br 446d8 <alt_get_errno+0x28>
- 446d4: d0a6ac04 addi r2,gp,-25936
- }
- 446d8: e037883a mov sp,fp
- 446dc: dfc00117 ldw ra,4(sp)
- 446e0: df000017 ldw fp,0(sp)
- 446e4: dec00204 addi sp,sp,8
- 446e8: f800283a ret
- 000446ec <alt_dev_llist_insert>:
- /*
- *
- */
- int alt_dev_llist_insert (alt_dev_llist* dev, alt_llist* list)
- {
- 446ec: defffa04 addi sp,sp,-24
- 446f0: dfc00515 stw ra,20(sp)
- 446f4: df000415 stw fp,16(sp)
- 446f8: df000404 addi fp,sp,16
- 446fc: e13ffe15 stw r4,-8(fp)
- 44700: e17fff15 stw r5,-4(fp)
- /*
- * check that the device exists, and that it has a valid name.
- */
- if (!dev || !dev->name)
- 44704: e0bffe17 ldw r2,-8(fp)
- 44708: 10000326 beq r2,zero,44718 <alt_dev_llist_insert+0x2c>
- 4470c: e0bffe17 ldw r2,-8(fp)
- 44710: 10800217 ldw r2,8(r2)
- 44714: 1000061e bne r2,zero,44730 <alt_dev_llist_insert+0x44>
- {
- ALT_ERRNO = EINVAL;
- 44718: 00446b00 call 446b0 <alt_get_errno>
- 4471c: 1007883a mov r3,r2
- 44720: 00800584 movi r2,22
- 44724: 18800015 stw r2,0(r3)
- return -EINVAL;
- 44728: 00bffa84 movi r2,-22
- 4472c: 00001306 br 4477c <alt_dev_llist_insert+0x90>
-
- /*
- * register the device.
- */
-
- alt_llist_insert(list, &dev->llist);
- 44730: e0bffe17 ldw r2,-8(fp)
- 44734: e0ffff17 ldw r3,-4(fp)
- 44738: e0fffc15 stw r3,-16(fp)
- 4473c: e0bffd15 stw r2,-12(fp)
- */
- static ALT_INLINE void ALT_ALWAYS_INLINE alt_llist_insert(alt_llist* list,
- alt_llist* entry)
- {
- entry->previous = list;
- 44740: e0bffd17 ldw r2,-12(fp)
- 44744: e0fffc17 ldw r3,-16(fp)
- 44748: 10c00115 stw r3,4(r2)
- entry->next = list->next;
- 4474c: e0bffc17 ldw r2,-16(fp)
- 44750: 10c00017 ldw r3,0(r2)
- 44754: e0bffd17 ldw r2,-12(fp)
- 44758: 10c00015 stw r3,0(r2)
- list->next->previous = entry;
- 4475c: e0bffc17 ldw r2,-16(fp)
- 44760: 10800017 ldw r2,0(r2)
- 44764: e0fffd17 ldw r3,-12(fp)
- 44768: 10c00115 stw r3,4(r2)
- list->next = entry;
- 4476c: e0bffc17 ldw r2,-16(fp)
- 44770: e0fffd17 ldw r3,-12(fp)
- 44774: 10c00015 stw r3,0(r2)
- return 0;
- 44778: 0005883a mov r2,zero
- }
- 4477c: e037883a mov sp,fp
- 44780: dfc00117 ldw ra,4(sp)
- 44784: df000017 ldw fp,0(sp)
- 44788: dec00204 addi sp,sp,8
- 4478c: f800283a ret
- 00044790 <_do_ctors>:
- /*
- * Run the C++ static constructors.
- */
- void _do_ctors(void)
- {
- 44790: defffd04 addi sp,sp,-12
- 44794: dfc00215 stw ra,8(sp)
- 44798: df000115 stw fp,4(sp)
- 4479c: df000104 addi fp,sp,4
- constructor* ctor;
- for (ctor = &__CTOR_END__[-1]; ctor >= __CTOR_LIST__; ctor--)
- 447a0: 00800134 movhi r2,4
- 447a4: 1095d104 addi r2,r2,22340
- 447a8: e0bfff15 stw r2,-4(fp)
- 447ac: 00000606 br 447c8 <_do_ctors+0x38>
- (*ctor) ();
- 447b0: e0bfff17 ldw r2,-4(fp)
- 447b4: 10800017 ldw r2,0(r2)
- 447b8: 103ee83a callr r2
- void _do_ctors(void)
- {
- constructor* ctor;
- for (ctor = &__CTOR_END__[-1]; ctor >= __CTOR_LIST__; ctor--)
- 447bc: e0bfff17 ldw r2,-4(fp)
- 447c0: 10bfff04 addi r2,r2,-4
- 447c4: e0bfff15 stw r2,-4(fp)
- 447c8: e0ffff17 ldw r3,-4(fp)
- 447cc: 00800134 movhi r2,4
- 447d0: 1095d204 addi r2,r2,22344
- 447d4: 18bff62e bgeu r3,r2,447b0 <_do_ctors+0x20>
- (*ctor) ();
- }
- 447d8: 0001883a nop
- 447dc: e037883a mov sp,fp
- 447e0: dfc00117 ldw ra,4(sp)
- 447e4: df000017 ldw fp,0(sp)
- 447e8: dec00204 addi sp,sp,8
- 447ec: f800283a ret
- 000447f0 <_do_dtors>:
- /*
- * Run the C++ static destructors.
- */
- void _do_dtors(void)
- {
- 447f0: defffd04 addi sp,sp,-12
- 447f4: dfc00215 stw ra,8(sp)
- 447f8: df000115 stw fp,4(sp)
- 447fc: df000104 addi fp,sp,4
- destructor* dtor;
- for (dtor = &__DTOR_END__[-1]; dtor >= __DTOR_LIST__; dtor--)
- 44800: 00800134 movhi r2,4
- 44804: 1095d104 addi r2,r2,22340
- 44808: e0bfff15 stw r2,-4(fp)
- 4480c: 00000606 br 44828 <_do_dtors+0x38>
- (*dtor) ();
- 44810: e0bfff17 ldw r2,-4(fp)
- 44814: 10800017 ldw r2,0(r2)
- 44818: 103ee83a callr r2
- void _do_dtors(void)
- {
- destructor* dtor;
- for (dtor = &__DTOR_END__[-1]; dtor >= __DTOR_LIST__; dtor--)
- 4481c: e0bfff17 ldw r2,-4(fp)
- 44820: 10bfff04 addi r2,r2,-4
- 44824: e0bfff15 stw r2,-4(fp)
- 44828: e0ffff17 ldw r3,-4(fp)
- 4482c: 00800134 movhi r2,4
- 44830: 1095d204 addi r2,r2,22344
- 44834: 18bff62e bgeu r3,r2,44810 <_do_dtors+0x20>
- (*dtor) ();
- }
- 44838: 0001883a nop
- 4483c: e037883a mov sp,fp
- 44840: dfc00117 ldw ra,4(sp)
- 44844: df000017 ldw fp,0(sp)
- 44848: dec00204 addi sp,sp,8
- 4484c: f800283a ret
- 00044850 <alt_icache_flush_all>:
- /*
- * alt_icache_flush_all() is called to flush the entire instruction cache.
- */
- void alt_icache_flush_all (void)
- {
- 44850: deffff04 addi sp,sp,-4
- 44854: df000015 stw fp,0(sp)
- 44858: d839883a mov fp,sp
- #if NIOS2_ICACHE_SIZE > 0
- alt_icache_flush (0, NIOS2_ICACHE_SIZE);
- #endif
- }
- 4485c: 0001883a nop
- 44860: e037883a mov sp,fp
- 44864: df000017 ldw fp,0(sp)
- 44868: dec00104 addi sp,sp,4
- 4486c: f800283a ret
- 00044870 <alt_ic_isr_register>:
- * @param irq IRQ number
- * @return 0 if successful, else error (-1)
- */
- int alt_ic_isr_register(alt_u32 ic_id, alt_u32 irq, alt_isr_func isr,
- void *isr_context, void *flags)
- {
- 44870: defff904 addi sp,sp,-28
- 44874: dfc00615 stw ra,24(sp)
- 44878: df000515 stw fp,20(sp)
- 4487c: df000504 addi fp,sp,20
- 44880: e13ffc15 stw r4,-16(fp)
- 44884: e17ffd15 stw r5,-12(fp)
- 44888: e1bffe15 stw r6,-8(fp)
- 4488c: e1ffff15 stw r7,-4(fp)
- return alt_iic_isr_register(ic_id, irq, isr, isr_context, flags);
- 44890: e0800217 ldw r2,8(fp)
- 44894: d8800015 stw r2,0(sp)
- 44898: e1ffff17 ldw r7,-4(fp)
- 4489c: e1bffe17 ldw r6,-8(fp)
- 448a0: e17ffd17 ldw r5,-12(fp)
- 448a4: e13ffc17 ldw r4,-16(fp)
- 448a8: 0044a200 call 44a20 <alt_iic_isr_register>
- }
- 448ac: e037883a mov sp,fp
- 448b0: dfc00117 ldw ra,4(sp)
- 448b4: df000017 ldw fp,0(sp)
- 448b8: dec00204 addi sp,sp,8
- 448bc: f800283a ret
- 000448c0 <alt_ic_irq_enable>:
- * @param ic_id Ignored.
- * @param irq IRQ number
- * @return 0 if successful, else error (-1)
- */
- int alt_ic_irq_enable (alt_u32 ic_id, alt_u32 irq)
- {
- 448c0: defff904 addi sp,sp,-28
- 448c4: df000615 stw fp,24(sp)
- 448c8: df000604 addi fp,sp,24
- 448cc: e13ffe15 stw r4,-8(fp)
- 448d0: e17fff15 stw r5,-4(fp)
- 448d4: e0bfff17 ldw r2,-4(fp)
- 448d8: e0bffa15 stw r2,-24(fp)
- static ALT_INLINE alt_irq_context ALT_ALWAYS_INLINE
- alt_irq_disable_all (void)
- {
- alt_irq_context context;
- NIOS2_READ_STATUS (context);
- 448dc: 0005303a rdctl r2,status
- 448e0: e0bffb15 stw r2,-20(fp)
- NIOS2_WRITE_STATUS (context & ~NIOS2_STATUS_PIE_MSK);
- 448e4: e0fffb17 ldw r3,-20(fp)
- 448e8: 00bfff84 movi r2,-2
- 448ec: 1884703a and r2,r3,r2
- 448f0: 1001703a wrctl status,r2
-
- return context;
- 448f4: e0bffb17 ldw r2,-20(fp)
- static ALT_INLINE int ALT_ALWAYS_INLINE alt_irq_enable (alt_u32 id)
- {
- alt_irq_context status;
- extern volatile alt_u32 alt_irq_active;
- status = alt_irq_disable_all ();
- 448f8: e0bffc15 stw r2,-16(fp)
- alt_irq_active |= (1 << id);
- 448fc: 00c00044 movi r3,1
- 44900: e0bffa17 ldw r2,-24(fp)
- 44904: 1884983a sll r2,r3,r2
- 44908: 1007883a mov r3,r2
- 4490c: d0a6b017 ldw r2,-25920(gp)
- 44910: 1884b03a or r2,r3,r2
- 44914: d0a6b015 stw r2,-25920(gp)
- NIOS2_WRITE_IENABLE (alt_irq_active);
- 44918: d0a6b017 ldw r2,-25920(gp)
- 4491c: 100170fa wrctl ienable,r2
- 44920: e0bffc17 ldw r2,-16(fp)
- 44924: e0bffd15 stw r2,-12(fp)
- status &= ~NIOS2_STATUS_PIE_MSK;
- status |= (context & NIOS2_STATUS_PIE_MSK);
-
- NIOS2_WRITE_STATUS (status);
- #else
- NIOS2_WRITE_STATUS (context);
- 44928: e0bffd17 ldw r2,-12(fp)
- 4492c: 1001703a wrctl status,r2
- alt_irq_enable_all(status);
- return 0;
- 44930: 0005883a mov r2,zero
- return alt_irq_enable(irq);
- 44934: 0001883a nop
- }
- 44938: e037883a mov sp,fp
- 4493c: df000017 ldw fp,0(sp)
- 44940: dec00104 addi sp,sp,4
- 44944: f800283a ret
- 00044948 <alt_ic_irq_disable>:
- * @param ic_id Ignored.
- * @param irq IRQ number
- * @return 0 if successful, else error (-1)
- */
- int alt_ic_irq_disable(alt_u32 ic_id, alt_u32 irq)
- {
- 44948: defff904 addi sp,sp,-28
- 4494c: df000615 stw fp,24(sp)
- 44950: df000604 addi fp,sp,24
- 44954: e13ffe15 stw r4,-8(fp)
- 44958: e17fff15 stw r5,-4(fp)
- 4495c: e0bfff17 ldw r2,-4(fp)
- 44960: e0bffa15 stw r2,-24(fp)
- static ALT_INLINE alt_irq_context ALT_ALWAYS_INLINE
- alt_irq_disable_all (void)
- {
- alt_irq_context context;
- NIOS2_READ_STATUS (context);
- 44964: 0005303a rdctl r2,status
- 44968: e0bffb15 stw r2,-20(fp)
- NIOS2_WRITE_STATUS (context & ~NIOS2_STATUS_PIE_MSK);
- 4496c: e0fffb17 ldw r3,-20(fp)
- 44970: 00bfff84 movi r2,-2
- 44974: 1884703a and r2,r3,r2
- 44978: 1001703a wrctl status,r2
-
- return context;
- 4497c: e0bffb17 ldw r2,-20(fp)
- static ALT_INLINE int ALT_ALWAYS_INLINE alt_irq_disable (alt_u32 id)
- {
- alt_irq_context status;
- extern volatile alt_u32 alt_irq_active;
- status = alt_irq_disable_all ();
- 44980: e0bffc15 stw r2,-16(fp)
- alt_irq_active &= ~(1 << id);
- 44984: 00c00044 movi r3,1
- 44988: e0bffa17 ldw r2,-24(fp)
- 4498c: 1884983a sll r2,r3,r2
- 44990: 0084303a nor r2,zero,r2
- 44994: 1007883a mov r3,r2
- 44998: d0a6b017 ldw r2,-25920(gp)
- 4499c: 1884703a and r2,r3,r2
- 449a0: d0a6b015 stw r2,-25920(gp)
- NIOS2_WRITE_IENABLE (alt_irq_active);
- 449a4: d0a6b017 ldw r2,-25920(gp)
- 449a8: 100170fa wrctl ienable,r2
- 449ac: e0bffc17 ldw r2,-16(fp)
- 449b0: e0bffd15 stw r2,-12(fp)
- status &= ~NIOS2_STATUS_PIE_MSK;
- status |= (context & NIOS2_STATUS_PIE_MSK);
-
- NIOS2_WRITE_STATUS (status);
- #else
- NIOS2_WRITE_STATUS (context);
- 449b4: e0bffd17 ldw r2,-12(fp)
- 449b8: 1001703a wrctl status,r2
- alt_irq_enable_all(status);
- return 0;
- 449bc: 0005883a mov r2,zero
- return alt_irq_disable(irq);
- 449c0: 0001883a nop
- }
- 449c4: e037883a mov sp,fp
- 449c8: df000017 ldw fp,0(sp)
- 449cc: dec00104 addi sp,sp,4
- 449d0: f800283a ret
- 000449d4 <alt_ic_irq_enabled>:
- * @param irq IRQ number
- * @return Zero if corresponding interrupt is disabled and
- * non-zero otherwise.
- */
- alt_u32 alt_ic_irq_enabled(alt_u32 ic_id, alt_u32 irq)
- {
- 449d4: defffc04 addi sp,sp,-16
- 449d8: df000315 stw fp,12(sp)
- 449dc: df000304 addi fp,sp,12
- 449e0: e13ffe15 stw r4,-8(fp)
- 449e4: e17fff15 stw r5,-4(fp)
- alt_u32 irq_enabled;
- NIOS2_READ_IENABLE(irq_enabled);
- 449e8: 000530fa rdctl r2,ienable
- 449ec: e0bffd15 stw r2,-12(fp)
- return (irq_enabled & (1 << irq)) ? 1: 0;
- 449f0: 00c00044 movi r3,1
- 449f4: e0bfff17 ldw r2,-4(fp)
- 449f8: 1884983a sll r2,r3,r2
- 449fc: 1007883a mov r3,r2
- 44a00: e0bffd17 ldw r2,-12(fp)
- 44a04: 1884703a and r2,r3,r2
- 44a08: 1004c03a cmpne r2,r2,zero
- 44a0c: 10803fcc andi r2,r2,255
- }
- 44a10: e037883a mov sp,fp
- 44a14: df000017 ldw fp,0(sp)
- 44a18: dec00104 addi sp,sp,4
- 44a1c: f800283a ret
- 00044a20 <alt_iic_isr_register>:
- * @param flags
- * @return 0 if successful, else error (-1)
- */
- int alt_iic_isr_register(alt_u32 ic_id, alt_u32 irq, alt_isr_func isr,
- void *isr_context, void *flags)
- {
- 44a20: defff504 addi sp,sp,-44
- 44a24: dfc00a15 stw ra,40(sp)
- 44a28: df000915 stw fp,36(sp)
- 44a2c: df000904 addi fp,sp,36
- 44a30: e13ffc15 stw r4,-16(fp)
- 44a34: e17ffd15 stw r5,-12(fp)
- 44a38: e1bffe15 stw r6,-8(fp)
- 44a3c: e1ffff15 stw r7,-4(fp)
- int rc = -EINVAL;
- 44a40: 00bffa84 movi r2,-22
- 44a44: e0bff715 stw r2,-36(fp)
- int id = irq; /* IRQ interpreted as the interrupt ID. */
- 44a48: e0bffd17 ldw r2,-12(fp)
- 44a4c: e0bff815 stw r2,-32(fp)
- alt_irq_context status;
- if (id < ALT_NIRQ)
- 44a50: e0bff817 ldw r2,-32(fp)
- 44a54: 10800808 cmpgei r2,r2,32
- 44a58: 1000271e bne r2,zero,44af8 <alt_iic_isr_register+0xd8>
- static ALT_INLINE alt_irq_context ALT_ALWAYS_INLINE
- alt_irq_disable_all (void)
- {
- alt_irq_context context;
- NIOS2_READ_STATUS (context);
- 44a5c: 0005303a rdctl r2,status
- 44a60: e0bffb15 stw r2,-20(fp)
- NIOS2_WRITE_STATUS (context & ~NIOS2_STATUS_PIE_MSK);
- 44a64: e0fffb17 ldw r3,-20(fp)
- 44a68: 00bfff84 movi r2,-2
- 44a6c: 1884703a and r2,r3,r2
- 44a70: 1001703a wrctl status,r2
-
- return context;
- 44a74: e0bffb17 ldw r2,-20(fp)
- * interrupts are disabled while the handler tables are updated to ensure
- * that an interrupt doesn't occur while the tables are in an inconsistant
- * state.
- */
- status = alt_irq_disable_all();
- 44a78: e0bffa15 stw r2,-24(fp)
- alt_irq[id].handler = isr;
- 44a7c: 00800174 movhi r2,5
- 44a80: 10a32f04 addi r2,r2,-29508
- 44a84: e0fff817 ldw r3,-32(fp)
- 44a88: 180690fa slli r3,r3,3
- 44a8c: 10c5883a add r2,r2,r3
- 44a90: e0fffe17 ldw r3,-8(fp)
- 44a94: 10c00015 stw r3,0(r2)
- alt_irq[id].context = isr_context;
- 44a98: 00800174 movhi r2,5
- 44a9c: 10a32f04 addi r2,r2,-29508
- 44aa0: e0fff817 ldw r3,-32(fp)
- 44aa4: 180690fa slli r3,r3,3
- 44aa8: 10c5883a add r2,r2,r3
- 44aac: 10800104 addi r2,r2,4
- 44ab0: e0ffff17 ldw r3,-4(fp)
- 44ab4: 10c00015 stw r3,0(r2)
- rc = (isr) ? alt_ic_irq_enable(ic_id, id) : alt_ic_irq_disable(ic_id, id);
- 44ab8: e0bffe17 ldw r2,-8(fp)
- 44abc: 10000526 beq r2,zero,44ad4 <alt_iic_isr_register+0xb4>
- 44ac0: e0bff817 ldw r2,-32(fp)
- 44ac4: 100b883a mov r5,r2
- 44ac8: e13ffc17 ldw r4,-16(fp)
- 44acc: 00448c00 call 448c0 <alt_ic_irq_enable>
- 44ad0: 00000406 br 44ae4 <alt_iic_isr_register+0xc4>
- 44ad4: e0bff817 ldw r2,-32(fp)
- 44ad8: 100b883a mov r5,r2
- 44adc: e13ffc17 ldw r4,-16(fp)
- 44ae0: 00449480 call 44948 <alt_ic_irq_disable>
- 44ae4: e0bff715 stw r2,-36(fp)
- 44ae8: e0bffa17 ldw r2,-24(fp)
- 44aec: e0bff915 stw r2,-28(fp)
- status &= ~NIOS2_STATUS_PIE_MSK;
- status |= (context & NIOS2_STATUS_PIE_MSK);
-
- NIOS2_WRITE_STATUS (status);
- #else
- NIOS2_WRITE_STATUS (context);
- 44af0: e0bff917 ldw r2,-28(fp)
- 44af4: 1001703a wrctl status,r2
- alt_irq_enable_all(status);
- }
- return rc;
- 44af8: e0bff717 ldw r2,-36(fp)
- }
- 44afc: e037883a mov sp,fp
- 44b00: dfc00117 ldw ra,4(sp)
- 44b04: df000017 ldw fp,0(sp)
- 44b08: dec00204 addi sp,sp,8
- 44b0c: f800283a ret
- 00044b10 <alt_open_fd>:
- * If the device can not be succesfully opened, then the input file descriptor
- * remains unchanged.
- */
- static void alt_open_fd(alt_fd* fd, const char* name, int flags, int mode)
- {
- 44b10: defff804 addi sp,sp,-32
- 44b14: dfc00715 stw ra,28(sp)
- 44b18: df000615 stw fp,24(sp)
- 44b1c: dc000515 stw r16,20(sp)
- 44b20: df000604 addi fp,sp,24
- 44b24: e13ffb15 stw r4,-20(fp)
- 44b28: e17ffc15 stw r5,-16(fp)
- 44b2c: e1bffd15 stw r6,-12(fp)
- 44b30: e1fffe15 stw r7,-8(fp)
- int old;
- old = open (name, flags, mode);
- 44b34: e1bffe17 ldw r6,-8(fp)
- 44b38: e17ffd17 ldw r5,-12(fp)
- 44b3c: e13ffc17 ldw r4,-16(fp)
- 44b40: 0044d980 call 44d98 <open>
- 44b44: e0bffa15 stw r2,-24(fp)
- if (old >= 0)
- 44b48: e0bffa17 ldw r2,-24(fp)
- 44b4c: 10002216 blt r2,zero,44bd8 <alt_open_fd+0xc8>
- {
- fd->dev = alt_fd_list[old].dev;
- 44b50: 04000134 movhi r16,4
- 44b54: 8417f904 addi r16,r16,24548
- 44b58: e0bffa17 ldw r2,-24(fp)
- 44b5c: 01400304 movi r5,12
- 44b60: 1009883a mov r4,r2
- 44b64: 004308c0 call 4308c <__mulsi3>
- 44b68: 8085883a add r2,r16,r2
- 44b6c: 10c00017 ldw r3,0(r2)
- 44b70: e0bffb17 ldw r2,-20(fp)
- 44b74: 10c00015 stw r3,0(r2)
- fd->priv = alt_fd_list[old].priv;
- 44b78: 04000134 movhi r16,4
- 44b7c: 8417f904 addi r16,r16,24548
- 44b80: e0bffa17 ldw r2,-24(fp)
- 44b84: 01400304 movi r5,12
- 44b88: 1009883a mov r4,r2
- 44b8c: 004308c0 call 4308c <__mulsi3>
- 44b90: 8085883a add r2,r16,r2
- 44b94: 10800104 addi r2,r2,4
- 44b98: 10c00017 ldw r3,0(r2)
- 44b9c: e0bffb17 ldw r2,-20(fp)
- 44ba0: 10c00115 stw r3,4(r2)
- fd->fd_flags = alt_fd_list[old].fd_flags;
- 44ba4: 04000134 movhi r16,4
- 44ba8: 8417f904 addi r16,r16,24548
- 44bac: e0bffa17 ldw r2,-24(fp)
- 44bb0: 01400304 movi r5,12
- 44bb4: 1009883a mov r4,r2
- 44bb8: 004308c0 call 4308c <__mulsi3>
- 44bbc: 8085883a add r2,r16,r2
- 44bc0: 10800204 addi r2,r2,8
- 44bc4: 10c00017 ldw r3,0(r2)
- 44bc8: e0bffb17 ldw r2,-20(fp)
- 44bcc: 10c00215 stw r3,8(r2)
- alt_release_fd (old);
- 44bd0: e13ffa17 ldw r4,-24(fp)
- 44bd4: 00437d80 call 437d8 <alt_release_fd>
- }
- }
- 44bd8: 0001883a nop
- 44bdc: e6ffff04 addi sp,fp,-4
- 44be0: dfc00217 ldw ra,8(sp)
- 44be4: df000117 ldw fp,4(sp)
- 44be8: dc000017 ldw r16,0(sp)
- 44bec: dec00304 addi sp,sp,12
- 44bf0: f800283a ret
- 00044bf4 <alt_io_redirect>:
- */
-
- void alt_io_redirect(const char* stdout_dev,
- const char* stdin_dev,
- const char* stderr_dev)
- {
- 44bf4: defffb04 addi sp,sp,-20
- 44bf8: dfc00415 stw ra,16(sp)
- 44bfc: df000315 stw fp,12(sp)
- 44c00: df000304 addi fp,sp,12
- 44c04: e13ffd15 stw r4,-12(fp)
- 44c08: e17ffe15 stw r5,-8(fp)
- 44c0c: e1bfff15 stw r6,-4(fp)
- /* Redirect the channels */
- alt_open_fd (&alt_fd_list[STDOUT_FILENO], stdout_dev, O_WRONLY, 0777);
- 44c10: 01c07fc4 movi r7,511
- 44c14: 01800044 movi r6,1
- 44c18: e17ffd17 ldw r5,-12(fp)
- 44c1c: 01000134 movhi r4,4
- 44c20: 2117fc04 addi r4,r4,24560
- 44c24: 0044b100 call 44b10 <alt_open_fd>
- alt_open_fd (&alt_fd_list[STDIN_FILENO], stdin_dev, O_RDONLY, 0777);
- 44c28: 01c07fc4 movi r7,511
- 44c2c: 000d883a mov r6,zero
- 44c30: e17ffe17 ldw r5,-8(fp)
- 44c34: 01000134 movhi r4,4
- 44c38: 2117f904 addi r4,r4,24548
- 44c3c: 0044b100 call 44b10 <alt_open_fd>
- alt_open_fd (&alt_fd_list[STDERR_FILENO], stderr_dev, O_WRONLY, 0777);
- 44c40: 01c07fc4 movi r7,511
- 44c44: 01800044 movi r6,1
- 44c48: e17fff17 ldw r5,-4(fp)
- 44c4c: 01000134 movhi r4,4
- 44c50: 2117ff04 addi r4,r4,24572
- 44c54: 0044b100 call 44b10 <alt_open_fd>
- }
- 44c58: 0001883a nop
- 44c5c: e037883a mov sp,fp
- 44c60: dfc00117 ldw ra,4(sp)
- 44c64: df000017 ldw fp,0(sp)
- 44c68: dec00204 addi sp,sp,8
- 44c6c: f800283a ret
- 00044c70 <alt_get_errno>:
- #undef errno
- extern int errno;
- static ALT_INLINE int* alt_get_errno(void)
- {
- 44c70: defffe04 addi sp,sp,-8
- 44c74: dfc00115 stw ra,4(sp)
- 44c78: df000015 stw fp,0(sp)
- 44c7c: d839883a mov fp,sp
- return ((alt_errno) ? alt_errno() : &errno);
- 44c80: d0a00917 ldw r2,-32732(gp)
- 44c84: 10000326 beq r2,zero,44c94 <alt_get_errno+0x24>
- 44c88: d0a00917 ldw r2,-32732(gp)
- 44c8c: 103ee83a callr r2
- 44c90: 00000106 br 44c98 <alt_get_errno+0x28>
- 44c94: d0a6ac04 addi r2,gp,-25936
- }
- 44c98: e037883a mov sp,fp
- 44c9c: dfc00117 ldw ra,4(sp)
- 44ca0: df000017 ldw fp,0(sp)
- 44ca4: dec00204 addi sp,sp,8
- 44ca8: f800283a ret
- 00044cac <alt_file_locked>:
- * performed for devices. Filesystems are required to handle the ioctl() call
- * themselves, and report the error from the filesystems open() function.
- */
- static int alt_file_locked (alt_fd* fd)
- {
- 44cac: defffb04 addi sp,sp,-20
- 44cb0: dfc00415 stw ra,16(sp)
- 44cb4: df000315 stw fp,12(sp)
- 44cb8: dc000215 stw r16,8(sp)
- 44cbc: df000304 addi fp,sp,12
- 44cc0: e13ffe15 stw r4,-8(fp)
- /*
- * Mark the file descriptor as belonging to a device.
- */
- fd->fd_flags |= ALT_FD_DEV;
- 44cc4: e0bffe17 ldw r2,-8(fp)
- 44cc8: 10800217 ldw r2,8(r2)
- 44ccc: 10d00034 orhi r3,r2,16384
- 44cd0: e0bffe17 ldw r2,-8(fp)
- 44cd4: 10c00215 stw r3,8(r2)
- /*
- * Loop through all current file descriptors searching for one that's locked
- * for exclusive access. If a match is found, generate an error.
- */
- for (i = 0; i <= alt_max_fd; i++)
- 44cd8: e03ffd15 stw zero,-12(fp)
- 44cdc: 00002306 br 44d6c <alt_file_locked+0xc0>
- {
- if ((alt_fd_list[i].dev == fd->dev) &&
- 44ce0: 04000134 movhi r16,4
- 44ce4: 8417f904 addi r16,r16,24548
- 44ce8: e0bffd17 ldw r2,-12(fp)
- 44cec: 01400304 movi r5,12
- 44cf0: 1009883a mov r4,r2
- 44cf4: 004308c0 call 4308c <__mulsi3>
- 44cf8: 8085883a add r2,r16,r2
- 44cfc: 10c00017 ldw r3,0(r2)
- 44d00: e0bffe17 ldw r2,-8(fp)
- 44d04: 10800017 ldw r2,0(r2)
- 44d08: 1880151e bne r3,r2,44d60 <alt_file_locked+0xb4>
- (alt_fd_list[i].fd_flags & ALT_FD_EXCL) &&
- 44d0c: 04000134 movhi r16,4
- 44d10: 8417f904 addi r16,r16,24548
- 44d14: e0bffd17 ldw r2,-12(fp)
- 44d18: 01400304 movi r5,12
- 44d1c: 1009883a mov r4,r2
- 44d20: 004308c0 call 4308c <__mulsi3>
- 44d24: 8085883a add r2,r16,r2
- 44d28: 10800204 addi r2,r2,8
- 44d2c: 10800017 ldw r2,0(r2)
- * for exclusive access. If a match is found, generate an error.
- */
- for (i = 0; i <= alt_max_fd; i++)
- {
- if ((alt_fd_list[i].dev == fd->dev) &&
- 44d30: 10000b0e bge r2,zero,44d60 <alt_file_locked+0xb4>
- (alt_fd_list[i].fd_flags & ALT_FD_EXCL) &&
- (&alt_fd_list[i] != fd))
- 44d34: 01400304 movi r5,12
- 44d38: e13ffd17 ldw r4,-12(fp)
- 44d3c: 004308c0 call 4308c <__mulsi3>
- 44d40: 1007883a mov r3,r2
- 44d44: 00800134 movhi r2,4
- 44d48: 1097f904 addi r2,r2,24548
- 44d4c: 1887883a add r3,r3,r2
- */
- for (i = 0; i <= alt_max_fd; i++)
- {
- if ((alt_fd_list[i].dev == fd->dev) &&
- (alt_fd_list[i].fd_flags & ALT_FD_EXCL) &&
- 44d50: e0bffe17 ldw r2,-8(fp)
- 44d54: 18800226 beq r3,r2,44d60 <alt_file_locked+0xb4>
- (&alt_fd_list[i] != fd))
- {
- return -EACCES;
- 44d58: 00bffcc4 movi r2,-13
- 44d5c: 00000806 br 44d80 <alt_file_locked+0xd4>
- /*
- * Loop through all current file descriptors searching for one that's locked
- * for exclusive access. If a match is found, generate an error.
- */
- for (i = 0; i <= alt_max_fd; i++)
- 44d60: e0bffd17 ldw r2,-12(fp)
- 44d64: 10800044 addi r2,r2,1
- 44d68: e0bffd15 stw r2,-12(fp)
- 44d6c: d0a00817 ldw r2,-32736(gp)
- 44d70: 1007883a mov r3,r2
- 44d74: e0bffd17 ldw r2,-12(fp)
- 44d78: 18bfd92e bgeu r3,r2,44ce0 <alt_file_locked+0x34>
- }
- }
-
- /* The device is not locked */
-
- return 0;
- 44d7c: 0005883a mov r2,zero
- }
- 44d80: e6ffff04 addi sp,fp,-4
- 44d84: dfc00217 ldw ra,8(sp)
- 44d88: df000117 ldw fp,4(sp)
- 44d8c: dc000017 ldw r16,0(sp)
- 44d90: dec00304 addi sp,sp,12
- 44d94: f800283a ret
- 00044d98 <open>:
- *
- * ALT_OPEN is mapped onto the open() system call in alt_syscall.h
- */
-
- int ALT_OPEN (const char* file, int flags, int mode)
- {
- 44d98: defff604 addi sp,sp,-40
- 44d9c: dfc00915 stw ra,36(sp)
- 44da0: df000815 stw fp,32(sp)
- 44da4: df000804 addi fp,sp,32
- 44da8: e13ffd15 stw r4,-12(fp)
- 44dac: e17ffe15 stw r5,-8(fp)
- 44db0: e1bfff15 stw r6,-4(fp)
- alt_dev* dev;
- alt_fd* fd;
- int index = -1;
- 44db4: 00bfffc4 movi r2,-1
- 44db8: e0bff915 stw r2,-28(fp)
- int status = -ENODEV;
- 44dbc: 00bffb44 movi r2,-19
- 44dc0: e0bffa15 stw r2,-24(fp)
- int isafs = 0;
- 44dc4: e03ffb15 stw zero,-20(fp)
- /*
- * Check the device list, to see if a device with a matching name is
- * registered.
- */
-
- if (!(dev = alt_find_dev (file, &alt_dev_list)))
- 44dc8: d1600604 addi r5,gp,-32744
- 44dcc: e13ffd17 ldw r4,-12(fp)
- 44dd0: 00450bc0 call 450bc <alt_find_dev>
- 44dd4: e0bff815 stw r2,-32(fp)
- 44dd8: e0bff817 ldw r2,-32(fp)
- 44ddc: 1000051e bne r2,zero,44df4 <open+0x5c>
- {
- /* No matching device, so try the filesystem list */
- dev = alt_find_file (file);
- 44de0: e13ffd17 ldw r4,-12(fp)
- 44de4: 004514c0 call 4514c <alt_find_file>
- 44de8: e0bff815 stw r2,-32(fp)
- isafs = 1;
- 44dec: 00800044 movi r2,1
- 44df0: e0bffb15 stw r2,-20(fp)
- /*
- * If a matching device or filesystem is found, allocate a file descriptor.
- */
- if (dev)
- 44df4: e0bff817 ldw r2,-32(fp)
- 44df8: 10002b26 beq r2,zero,44ea8 <open+0x110>
- {
- if ((index = alt_get_fd (dev)) < 0)
- 44dfc: e13ff817 ldw r4,-32(fp)
- 44e00: 00452540 call 45254 <alt_get_fd>
- 44e04: e0bff915 stw r2,-28(fp)
- 44e08: e0bff917 ldw r2,-28(fp)
- 44e0c: 1000030e bge r2,zero,44e1c <open+0x84>
- {
- status = index;
- 44e10: e0bff917 ldw r2,-28(fp)
- 44e14: e0bffa15 stw r2,-24(fp)
- 44e18: 00002506 br 44eb0 <open+0x118>
- }
- else
- {
- fd = &alt_fd_list[index];
- 44e1c: 01400304 movi r5,12
- 44e20: e13ff917 ldw r4,-28(fp)
- 44e24: 004308c0 call 4308c <__mulsi3>
- 44e28: 1007883a mov r3,r2
- 44e2c: 00800134 movhi r2,4
- 44e30: 1097f904 addi r2,r2,24548
- 44e34: 1885883a add r2,r3,r2
- 44e38: e0bffc15 stw r2,-16(fp)
- fd->fd_flags = (flags & ~ALT_FD_FLAGS_MASK);
- 44e3c: e0fffe17 ldw r3,-8(fp)
- 44e40: 00900034 movhi r2,16384
- 44e44: 10bfffc4 addi r2,r2,-1
- 44e48: 1886703a and r3,r3,r2
- 44e4c: e0bffc17 ldw r2,-16(fp)
- 44e50: 10c00215 stw r3,8(r2)
-
- /* If this is a device, ensure it isn't already locked */
- if (isafs || ((status = alt_file_locked (fd)) >= 0))
- 44e54: e0bffb17 ldw r2,-20(fp)
- 44e58: 1000051e bne r2,zero,44e70 <open+0xd8>
- 44e5c: e13ffc17 ldw r4,-16(fp)
- 44e60: 0044cac0 call 44cac <alt_file_locked>
- 44e64: e0bffa15 stw r2,-24(fp)
- 44e68: e0bffa17 ldw r2,-24(fp)
- 44e6c: 10001016 blt r2,zero,44eb0 <open+0x118>
- /*
- * If the device or filesystem provides an open() callback function,
- * call it now to perform any device/filesystem specific operations.
- */
-
- status = (dev->open) ? dev->open(fd, file, flags, mode): 0;
- 44e70: e0bff817 ldw r2,-32(fp)
- 44e74: 10800317 ldw r2,12(r2)
- 44e78: 10000826 beq r2,zero,44e9c <open+0x104>
- 44e7c: e0bff817 ldw r2,-32(fp)
- 44e80: 10800317 ldw r2,12(r2)
- 44e84: e1ffff17 ldw r7,-4(fp)
- 44e88: e1bffe17 ldw r6,-8(fp)
- 44e8c: e17ffd17 ldw r5,-12(fp)
- 44e90: e13ffc17 ldw r4,-16(fp)
- 44e94: 103ee83a callr r2
- 44e98: 00000106 br 44ea0 <open+0x108>
- 44e9c: 0005883a mov r2,zero
- 44ea0: e0bffa15 stw r2,-24(fp)
- 44ea4: 00000206 br 44eb0 <open+0x118>
- }
- }
- }
- else
- {
- status = -ENODEV;
- 44ea8: 00bffb44 movi r2,-19
- 44eac: e0bffa15 stw r2,-24(fp)
- }
- /* Allocation failed, so clean up and return an error */
- if (status < 0)
- 44eb0: e0bffa17 ldw r2,-24(fp)
- 44eb4: 1000090e bge r2,zero,44edc <open+0x144>
- {
- alt_release_fd (index);
- 44eb8: e13ff917 ldw r4,-28(fp)
- 44ebc: 00437d80 call 437d8 <alt_release_fd>
- ALT_ERRNO = -status;
- 44ec0: 0044c700 call 44c70 <alt_get_errno>
- 44ec4: 1007883a mov r3,r2
- 44ec8: e0bffa17 ldw r2,-24(fp)
- 44ecc: 0085c83a sub r2,zero,r2
- 44ed0: 18800015 stw r2,0(r3)
- return -1;
- 44ed4: 00bfffc4 movi r2,-1
- 44ed8: 00000106 br 44ee0 <open+0x148>
- }
-
- /* return the reference upon success */
- return index;
- 44edc: e0bff917 ldw r2,-28(fp)
- }
- 44ee0: e037883a mov sp,fp
- 44ee4: dfc00117 ldw ra,4(sp)
- 44ee8: df000017 ldw fp,0(sp)
- 44eec: dec00204 addi sp,sp,8
- 44ef0: f800283a ret
- 00044ef4 <alt_alarm_stop>:
- * alarms. Alternatively an alarm can unregister itself by returning zero when
- * the alarm executes.
- */
- void alt_alarm_stop (alt_alarm* alarm)
- {
- 44ef4: defffa04 addi sp,sp,-24
- 44ef8: df000515 stw fp,20(sp)
- 44efc: df000504 addi fp,sp,20
- 44f00: e13fff15 stw r4,-4(fp)
- static ALT_INLINE alt_irq_context ALT_ALWAYS_INLINE
- alt_irq_disable_all (void)
- {
- alt_irq_context context;
- NIOS2_READ_STATUS (context);
- 44f04: 0005303a rdctl r2,status
- 44f08: e0bffc15 stw r2,-16(fp)
- NIOS2_WRITE_STATUS (context & ~NIOS2_STATUS_PIE_MSK);
- 44f0c: e0fffc17 ldw r3,-16(fp)
- 44f10: 00bfff84 movi r2,-2
- 44f14: 1884703a and r2,r3,r2
- 44f18: 1001703a wrctl status,r2
-
- return context;
- 44f1c: e0bffc17 ldw r2,-16(fp)
- alt_irq_context irq_context;
- irq_context = alt_irq_disable_all();
- 44f20: e0bffb15 stw r2,-20(fp)
- alt_llist_remove (&alarm->llist);
- 44f24: e0bfff17 ldw r2,-4(fp)
- 44f28: e0bffd15 stw r2,-12(fp)
- * input argument is the element to remove.
- */
-
- static ALT_INLINE void ALT_ALWAYS_INLINE alt_llist_remove(alt_llist* entry)
- {
- entry->next->previous = entry->previous;
- 44f2c: e0bffd17 ldw r2,-12(fp)
- 44f30: 10800017 ldw r2,0(r2)
- 44f34: e0fffd17 ldw r3,-12(fp)
- 44f38: 18c00117 ldw r3,4(r3)
- 44f3c: 10c00115 stw r3,4(r2)
- entry->previous->next = entry->next;
- 44f40: e0bffd17 ldw r2,-12(fp)
- 44f44: 10800117 ldw r2,4(r2)
- 44f48: e0fffd17 ldw r3,-12(fp)
- 44f4c: 18c00017 ldw r3,0(r3)
- 44f50: 10c00015 stw r3,0(r2)
- /*
- * Set the entry to point to itself, so that any further calls to
- * alt_llist_remove() are harmless.
- */
- entry->previous = entry;
- 44f54: e0bffd17 ldw r2,-12(fp)
- 44f58: e0fffd17 ldw r3,-12(fp)
- 44f5c: 10c00115 stw r3,4(r2)
- entry->next = entry;
- 44f60: e0bffd17 ldw r2,-12(fp)
- 44f64: e0fffd17 ldw r3,-12(fp)
- 44f68: 10c00015 stw r3,0(r2)
- 44f6c: e0bffb17 ldw r2,-20(fp)
- 44f70: e0bffe15 stw r2,-8(fp)
- status &= ~NIOS2_STATUS_PIE_MSK;
- status |= (context & NIOS2_STATUS_PIE_MSK);
-
- NIOS2_WRITE_STATUS (status);
- #else
- NIOS2_WRITE_STATUS (context);
- 44f74: e0bffe17 ldw r2,-8(fp)
- 44f78: 1001703a wrctl status,r2
- alt_irq_enable_all (irq_context);
- }
- 44f7c: 0001883a nop
- 44f80: e037883a mov sp,fp
- 44f84: df000017 ldw fp,0(sp)
- 44f88: dec00104 addi sp,sp,4
- 44f8c: f800283a ret
- 00044f90 <alt_tick>:
- *
- * alt_tick() is expected to run at interrupt level.
- */
- void alt_tick (void)
- {
- 44f90: defffb04 addi sp,sp,-20
- 44f94: dfc00415 stw ra,16(sp)
- 44f98: df000315 stw fp,12(sp)
- 44f9c: df000304 addi fp,sp,12
- alt_alarm* next;
- alt_alarm* alarm = (alt_alarm*) alt_alarm_list.next;
- 44fa0: d0a00c17 ldw r2,-32720(gp)
- 44fa4: e0bffd15 stw r2,-12(fp)
- alt_u32 next_callback;
- /* update the tick counter */
- _alt_nticks++;
- 44fa8: d0a6b217 ldw r2,-25912(gp)
- 44fac: 10800044 addi r2,r2,1
- 44fb0: d0a6b215 stw r2,-25912(gp)
- /* process the registered callbacks */
- while (alarm != (alt_alarm*) &alt_alarm_list)
- 44fb4: 00002e06 br 45070 <alt_tick+0xe0>
- {
- next = (alt_alarm*) alarm->llist.next;
- 44fb8: e0bffd17 ldw r2,-12(fp)
- 44fbc: 10800017 ldw r2,0(r2)
- 44fc0: e0bffe15 stw r2,-8(fp)
- /*
- * Upon the tick-counter rolling over it is safe to clear the
- * roll-over flag; once the flag is cleared this (or subsequnt)
- * tick events are enabled to generate an alarm event.
- */
- if ((alarm->rollover) && (_alt_nticks == 0))
- 44fc4: e0bffd17 ldw r2,-12(fp)
- 44fc8: 10800403 ldbu r2,16(r2)
- 44fcc: 10803fcc andi r2,r2,255
- 44fd0: 10000426 beq r2,zero,44fe4 <alt_tick+0x54>
- 44fd4: d0a6b217 ldw r2,-25912(gp)
- 44fd8: 1000021e bne r2,zero,44fe4 <alt_tick+0x54>
- {
- alarm->rollover = 0;
- 44fdc: e0bffd17 ldw r2,-12(fp)
- 44fe0: 10000405 stb zero,16(r2)
- }
-
- /* if the alarm period has expired, make the callback */
- if ((alarm->time <= _alt_nticks) && (alarm->rollover == 0))
- 44fe4: e0bffd17 ldw r2,-12(fp)
- 44fe8: 10800217 ldw r2,8(r2)
- 44fec: d0e6b217 ldw r3,-25912(gp)
- 44ff0: 18801d36 bltu r3,r2,45068 <alt_tick+0xd8>
- 44ff4: e0bffd17 ldw r2,-12(fp)
- 44ff8: 10800403 ldbu r2,16(r2)
- 44ffc: 10803fcc andi r2,r2,255
- 45000: 1000191e bne r2,zero,45068 <alt_tick+0xd8>
- {
- next_callback = alarm->callback (alarm->context);
- 45004: e0bffd17 ldw r2,-12(fp)
- 45008: 10800317 ldw r2,12(r2)
- 4500c: e0fffd17 ldw r3,-12(fp)
- 45010: 18c00517 ldw r3,20(r3)
- 45014: 1809883a mov r4,r3
- 45018: 103ee83a callr r2
- 4501c: e0bfff15 stw r2,-4(fp)
- /* deactivate the alarm if the return value is zero */
- if (next_callback == 0)
- 45020: e0bfff17 ldw r2,-4(fp)
- 45024: 1000031e bne r2,zero,45034 <alt_tick+0xa4>
- {
- alt_alarm_stop (alarm);
- 45028: e13ffd17 ldw r4,-12(fp)
- 4502c: 0044ef40 call 44ef4 <alt_alarm_stop>
- 45030: 00000d06 br 45068 <alt_tick+0xd8>
- }
- else
- {
- alarm->time += next_callback;
- 45034: e0bffd17 ldw r2,-12(fp)
- 45038: 10c00217 ldw r3,8(r2)
- 4503c: e0bfff17 ldw r2,-4(fp)
- 45040: 1887883a add r3,r3,r2
- 45044: e0bffd17 ldw r2,-12(fp)
- 45048: 10c00215 stw r3,8(r2)
- /*
- * If the desired alarm time causes a roll-over, set the rollover
- * flag. This will prevent the subsequent tick event from causing
- * an alarm too early.
- */
- if(alarm->time < _alt_nticks)
- 4504c: e0bffd17 ldw r2,-12(fp)
- 45050: 10c00217 ldw r3,8(r2)
- 45054: d0a6b217 ldw r2,-25912(gp)
- 45058: 1880032e bgeu r3,r2,45068 <alt_tick+0xd8>
- {
- alarm->rollover = 1;
- 4505c: e0bffd17 ldw r2,-12(fp)
- 45060: 00c00044 movi r3,1
- 45064: 10c00405 stb r3,16(r2)
- }
- }
- }
- alarm = next;
- 45068: e0bffe17 ldw r2,-8(fp)
- 4506c: e0bffd15 stw r2,-12(fp)
- _alt_nticks++;
- /* process the registered callbacks */
- while (alarm != (alt_alarm*) &alt_alarm_list)
- 45070: e0fffd17 ldw r3,-12(fp)
- 45074: d0a00c04 addi r2,gp,-32720
- 45078: 18bfcf1e bne r3,r2,44fb8 <alt_tick+0x28>
- /*
- * Update the operating system specific timer facilities.
- */
- ALT_OS_TIME_TICK();
- 4507c: 0001883a nop
- }
- 45080: 0001883a nop
- 45084: e037883a mov sp,fp
- 45088: dfc00117 ldw ra,4(sp)
- 4508c: df000017 ldw fp,0(sp)
- 45090: dec00204 addi sp,sp,8
- 45094: f800283a ret
- 00045098 <altera_nios2_gen2_irq_init>:
- /*
- * To initialize the internal interrupt controller, just clear the IENABLE
- * register so that all possible IRQs are disabled.
- */
- void altera_nios2_gen2_irq_init(void)
- {
- 45098: deffff04 addi sp,sp,-4
- 4509c: df000015 stw fp,0(sp)
- 450a0: d839883a mov fp,sp
- NIOS2_WRITE_IENABLE(0);
- 450a4: 000170fa wrctl ienable,zero
- }
- 450a8: 0001883a nop
- 450ac: e037883a mov sp,fp
- 450b0: df000017 ldw fp,0(sp)
- 450b4: dec00104 addi sp,sp,4
- 450b8: f800283a ret
- 000450bc <alt_find_dev>:
- * "name" must be an exact match for the devices registered name for a match to
- * be found.
- */
-
- alt_dev* alt_find_dev(const char* name, alt_llist* llist)
- {
- 450bc: defffa04 addi sp,sp,-24
- 450c0: dfc00515 stw ra,20(sp)
- 450c4: df000415 stw fp,16(sp)
- 450c8: df000404 addi fp,sp,16
- 450cc: e13ffe15 stw r4,-8(fp)
- 450d0: e17fff15 stw r5,-4(fp)
- alt_dev* next = (alt_dev*) llist->next;
- 450d4: e0bfff17 ldw r2,-4(fp)
- 450d8: 10800017 ldw r2,0(r2)
- 450dc: e0bffc15 stw r2,-16(fp)
- alt_32 len;
- len = strlen(name) + 1;
- 450e0: e13ffe17 ldw r4,-8(fp)
- 450e4: 004037c0 call 4037c <strlen>
- 450e8: 10800044 addi r2,r2,1
- 450ec: e0bffd15 stw r2,-12(fp)
- /*
- * Check each list entry in turn, until a match is found, or we reach the
- * end of the list (i.e. next winds up pointing back to the list head).
- */
- while (next != (alt_dev*) llist)
- 450f0: 00000d06 br 45128 <alt_find_dev+0x6c>
- /*
- * memcmp() is used here rather than strcmp() in order to reduce the size
- * of the executable.
- */
- if (!memcmp (next->name, name, len))
- 450f4: e0bffc17 ldw r2,-16(fp)
- 450f8: 10800217 ldw r2,8(r2)
- 450fc: e0fffd17 ldw r3,-12(fp)
- 45100: 180d883a mov r6,r3
- 45104: e17ffe17 ldw r5,-8(fp)
- 45108: 1009883a mov r4,r2
- 4510c: 00454000 call 45400 <memcmp>
- 45110: 1000021e bne r2,zero,4511c <alt_find_dev+0x60>
- {
- /* match found */
- return next;
- 45114: e0bffc17 ldw r2,-16(fp)
- 45118: 00000706 br 45138 <alt_find_dev+0x7c>
- }
- next = (alt_dev*) next->llist.next;
- 4511c: e0bffc17 ldw r2,-16(fp)
- 45120: 10800017 ldw r2,0(r2)
- 45124: e0bffc15 stw r2,-16(fp)
- /*
- * Check each list entry in turn, until a match is found, or we reach the
- * end of the list (i.e. next winds up pointing back to the list head).
- */
- while (next != (alt_dev*) llist)
- 45128: e0fffc17 ldw r3,-16(fp)
- 4512c: e0bfff17 ldw r2,-4(fp)
- 45130: 18bff01e bne r3,r2,450f4 <alt_find_dev+0x38>
- next = (alt_dev*) next->llist.next;
- }
-
- /* No match found */
-
- return NULL;
- 45134: 0005883a mov r2,zero
- }
- 45138: e037883a mov sp,fp
- 4513c: dfc00117 ldw ra,4(sp)
- 45140: df000017 ldw fp,0(sp)
- 45144: dec00204 addi sp,sp,8
- 45148: f800283a ret
- 0004514c <alt_find_file>:
- * either '/' or '\0' is the prefix of the filename. For example the filename:
- * "/myfilesystem/junk.txt" would match: "/myfilesystem", but not: "/myfile".
- */
-
- alt_dev* alt_find_file (const char* name)
- {
- 4514c: defffb04 addi sp,sp,-20
- 45150: dfc00415 stw ra,16(sp)
- 45154: df000315 stw fp,12(sp)
- 45158: df000304 addi fp,sp,12
- 4515c: e13fff15 stw r4,-4(fp)
- alt_dev* next = (alt_dev*) alt_fs_list.next;
- 45160: d0a00417 ldw r2,-32752(gp)
- 45164: e0bffd15 stw r2,-12(fp)
- /*
- * Check each list entry in turn, until a match is found, or we reach the
- * end of the list (i.e. next winds up pointing back to the list head).
- */
-
- while (next != (alt_dev*) &alt_fs_list)
- 45168: 00003106 br 45230 <alt_find_file+0xe4>
- {
- len = strlen(next->name);
- 4516c: e0bffd17 ldw r2,-12(fp)
- 45170: 10800217 ldw r2,8(r2)
- 45174: 1009883a mov r4,r2
- 45178: 004037c0 call 4037c <strlen>
- 4517c: e0bffe15 stw r2,-8(fp)
-
- if (next->name[len-1] == '/')
- 45180: e0bffd17 ldw r2,-12(fp)
- 45184: 10c00217 ldw r3,8(r2)
- 45188: e0bffe17 ldw r2,-8(fp)
- 4518c: 10bfffc4 addi r2,r2,-1
- 45190: 1885883a add r2,r3,r2
- 45194: 10800003 ldbu r2,0(r2)
- 45198: 10803fcc andi r2,r2,255
- 4519c: 1080201c xori r2,r2,128
- 451a0: 10bfe004 addi r2,r2,-128
- 451a4: 10800bd8 cmpnei r2,r2,47
- 451a8: 1000031e bne r2,zero,451b8 <alt_find_file+0x6c>
- {
- len -= 1;
- 451ac: e0bffe17 ldw r2,-8(fp)
- 451b0: 10bfffc4 addi r2,r2,-1
- 451b4: e0bffe15 stw r2,-8(fp)
- }
- if (((name[len] == '/') || (name[len] == '\0')) &&
- 451b8: e0bffe17 ldw r2,-8(fp)
- 451bc: e0ffff17 ldw r3,-4(fp)
- 451c0: 1885883a add r2,r3,r2
- 451c4: 10800003 ldbu r2,0(r2)
- 451c8: 10803fcc andi r2,r2,255
- 451cc: 1080201c xori r2,r2,128
- 451d0: 10bfe004 addi r2,r2,-128
- 451d4: 10800be0 cmpeqi r2,r2,47
- 451d8: 1000081e bne r2,zero,451fc <alt_find_file+0xb0>
- 451dc: e0bffe17 ldw r2,-8(fp)
- 451e0: e0ffff17 ldw r3,-4(fp)
- 451e4: 1885883a add r2,r3,r2
- 451e8: 10800003 ldbu r2,0(r2)
- 451ec: 10803fcc andi r2,r2,255
- 451f0: 1080201c xori r2,r2,128
- 451f4: 10bfe004 addi r2,r2,-128
- 451f8: 10000a1e bne r2,zero,45224 <alt_find_file+0xd8>
- !memcmp (next->name, name, len))
- 451fc: e0bffd17 ldw r2,-12(fp)
- 45200: 10800217 ldw r2,8(r2)
- 45204: e0fffe17 ldw r3,-8(fp)
- 45208: 180d883a mov r6,r3
- 4520c: e17fff17 ldw r5,-4(fp)
- 45210: 1009883a mov r4,r2
- 45214: 00454000 call 45400 <memcmp>
- if (next->name[len-1] == '/')
- {
- len -= 1;
- }
- if (((name[len] == '/') || (name[len] == '\0')) &&
- 45218: 1000021e bne r2,zero,45224 <alt_find_file+0xd8>
- !memcmp (next->name, name, len))
- {
- /* match found */
- return next;
- 4521c: e0bffd17 ldw r2,-12(fp)
- 45220: 00000706 br 45240 <alt_find_file+0xf4>
- }
- next = (alt_dev*) next->llist.next;
- 45224: e0bffd17 ldw r2,-12(fp)
- 45228: 10800017 ldw r2,0(r2)
- 4522c: e0bffd15 stw r2,-12(fp)
- /*
- * Check each list entry in turn, until a match is found, or we reach the
- * end of the list (i.e. next winds up pointing back to the list head).
- */
-
- while (next != (alt_dev*) &alt_fs_list)
- 45230: e0fffd17 ldw r3,-12(fp)
- 45234: d0a00404 addi r2,gp,-32752
- 45238: 18bfcc1e bne r3,r2,4516c <alt_find_file+0x20>
- next = (alt_dev*) next->llist.next;
- }
-
- /* No match found */
-
- return NULL;
- 4523c: 0005883a mov r2,zero
- }
- 45240: e037883a mov sp,fp
- 45244: dfc00117 ldw ra,4(sp)
- 45248: df000017 ldw fp,0(sp)
- 4524c: dec00204 addi sp,sp,8
- 45250: f800283a ret
- 00045254 <alt_get_fd>:
- * the offset of the file descriptor within the file descriptor array). A
- * negative value indicates failure.
- */
- int alt_get_fd (alt_dev* dev)
- {
- 45254: defffa04 addi sp,sp,-24
- 45258: dfc00515 stw ra,20(sp)
- 4525c: df000415 stw fp,16(sp)
- 45260: dc000315 stw r16,12(sp)
- 45264: df000404 addi fp,sp,16
- 45268: e13ffe15 stw r4,-8(fp)
- alt_32 i;
- int rc = -EMFILE;
- 4526c: 00bffa04 movi r2,-24
- 45270: e0bffd15 stw r2,-12(fp)
- * indicates the highest file descriptor ever allocated. This is used to
- * improve efficency when searching the file descriptor list, and
- * therefore reduce contention on the alt_fd_list_lock semaphore.
- */
- for (i = 0; i < ALT_MAX_FD; i++)
- 45274: e03ffc15 stw zero,-16(fp)
- 45278: 00001d06 br 452f0 <alt_get_fd+0x9c>
- {
- if (!alt_fd_list[i].dev)
- 4527c: 04000134 movhi r16,4
- 45280: 8417f904 addi r16,r16,24548
- 45284: e0bffc17 ldw r2,-16(fp)
- 45288: 01400304 movi r5,12
- 4528c: 1009883a mov r4,r2
- 45290: 004308c0 call 4308c <__mulsi3>
- 45294: 8085883a add r2,r16,r2
- 45298: 10800017 ldw r2,0(r2)
- 4529c: 1000111e bne r2,zero,452e4 <alt_get_fd+0x90>
- {
- alt_fd_list[i].dev = dev;
- 452a0: 04000134 movhi r16,4
- 452a4: 8417f904 addi r16,r16,24548
- 452a8: e0bffc17 ldw r2,-16(fp)
- 452ac: 01400304 movi r5,12
- 452b0: 1009883a mov r4,r2
- 452b4: 004308c0 call 4308c <__mulsi3>
- 452b8: 8085883a add r2,r16,r2
- 452bc: e0fffe17 ldw r3,-8(fp)
- 452c0: 10c00015 stw r3,0(r2)
- if (i > alt_max_fd)
- 452c4: d0e00817 ldw r3,-32736(gp)
- 452c8: e0bffc17 ldw r2,-16(fp)
- 452cc: 1880020e bge r3,r2,452d8 <alt_get_fd+0x84>
- {
- alt_max_fd = i;
- 452d0: e0bffc17 ldw r2,-16(fp)
- 452d4: d0a00815 stw r2,-32736(gp)
- }
- rc = i;
- 452d8: e0bffc17 ldw r2,-16(fp)
- 452dc: e0bffd15 stw r2,-12(fp)
- goto alt_get_fd_exit;
- 452e0: 00000606 br 452fc <alt_get_fd+0xa8>
- * indicates the highest file descriptor ever allocated. This is used to
- * improve efficency when searching the file descriptor list, and
- * therefore reduce contention on the alt_fd_list_lock semaphore.
- */
- for (i = 0; i < ALT_MAX_FD; i++)
- 452e4: e0bffc17 ldw r2,-16(fp)
- 452e8: 10800044 addi r2,r2,1
- 452ec: e0bffc15 stw r2,-16(fp)
- 452f0: e0bffc17 ldw r2,-16(fp)
- 452f4: 10800810 cmplti r2,r2,32
- 452f8: 103fe01e bne r2,zero,4527c <alt_get_fd+0x28>
- * file descriptor pool.
- */
- ALT_SEM_POST(alt_fd_list_lock);
- return rc;
- 452fc: e0bffd17 ldw r2,-12(fp)
- }
- 45300: e6ffff04 addi sp,fp,-4
- 45304: dfc00217 ldw ra,8(sp)
- 45308: df000117 ldw fp,4(sp)
- 4530c: dc000017 ldw r16,0(sp)
- 45310: dec00304 addi sp,sp,12
- 45314: f800283a ret
- 00045318 <alt_exception_cause_generated_bad_addr>:
- * Return: 1: BADADDR (bad_addr argument to handler) is valid
- * 0: BADADDR is not valid
- */
- int
- alt_exception_cause_generated_bad_addr(alt_exception_cause cause)
- {
- 45318: defffe04 addi sp,sp,-8
- 4531c: df000115 stw fp,4(sp)
- 45320: df000104 addi fp,sp,4
- 45324: e13fff15 stw r4,-4(fp)
- switch (cause) {
- 45328: e0bfff17 ldw r2,-4(fp)
- 4532c: 10bffe84 addi r2,r2,-6
- 45330: 10c00428 cmpgeui r3,r2,16
- 45334: 18001a1e bne r3,zero,453a0 <alt_exception_cause_generated_bad_addr+0x88>
- 45338: 100690ba slli r3,r2,2
- 4533c: 00800134 movhi r2,4
- 45340: 1094d404 addi r2,r2,21328
- 45344: 1885883a add r2,r3,r2
- 45348: 10800017 ldw r2,0(r2)
- 4534c: 1000683a jmp r2
- 45350: 00045390 cmplti zero,zero,4430
- 45354: 00045390 cmplti zero,zero,4430
- 45358: 000453a0 cmpeqi zero,zero,4430
- 4535c: 000453a0 cmpeqi zero,zero,4430
- 45360: 000453a0 cmpeqi zero,zero,4430
- 45364: 00045390 cmplti zero,zero,4430
- 45368: 00045398 cmpnei zero,zero,4430
- 4536c: 000453a0 cmpeqi zero,zero,4430
- 45370: 00045390 cmplti zero,zero,4430
- 45374: 00045390 cmplti zero,zero,4430
- 45378: 000453a0 cmpeqi zero,zero,4430
- 4537c: 00045390 cmplti zero,zero,4430
- 45380: 00045398 cmpnei zero,zero,4430
- 45384: 000453a0 cmpeqi zero,zero,4430
- 45388: 000453a0 cmpeqi zero,zero,4430
- 4538c: 00045390 cmplti zero,zero,4430
- case NIOS2_EXCEPTION_MISALIGNED_TARGET_PC:
- case NIOS2_EXCEPTION_TLB_READ_PERM_VIOLATION:
- case NIOS2_EXCEPTION_TLB_WRITE_PERM_VIOLATION:
- case NIOS2_EXCEPTION_MPU_DATA_REGION_VIOLATION:
- case NIOS2_EXCEPTION_ECC_DATA_ERR:
- return 1;
- 45390: 00800044 movi r2,1
- 45394: 00000306 br 453a4 <alt_exception_cause_generated_bad_addr+0x8c>
- case NIOS2_EXCEPTION_TLB_MISS:
- case NIOS2_EXCEPTION_ECC_TLB_ERR:
- return 0;
- 45398: 0005883a mov r2,zero
- 4539c: 00000106 br 453a4 <alt_exception_cause_generated_bad_addr+0x8c>
- default:
- return 0;
- 453a0: 0005883a mov r2,zero
- }
- }
- 453a4: e037883a mov sp,fp
- 453a8: df000017 ldw fp,0(sp)
- 453ac: dec00104 addi sp,sp,4
- 453b0: f800283a ret
- 000453b4 <atexit>:
- 453b4: 200b883a mov r5,r4
- 453b8: 000f883a mov r7,zero
- 453bc: 000d883a mov r6,zero
- 453c0: 0009883a mov r4,zero
- 453c4: 004547c1 jmpi 4547c <__register_exitproc>
- 000453c8 <exit>:
- 453c8: defffe04 addi sp,sp,-8
- 453cc: 000b883a mov r5,zero
- 453d0: dc000015 stw r16,0(sp)
- 453d4: dfc00115 stw ra,4(sp)
- 453d8: 2021883a mov r16,r4
- 453dc: 00455940 call 45594 <__call_exitprocs>
- 453e0: 00800134 movhi r2,4
- 453e4: 109c7104 addi r2,r2,29124
- 453e8: 11000017 ldw r4,0(r2)
- 453ec: 20800f17 ldw r2,60(r4)
- 453f0: 10000126 beq r2,zero,453f8 <exit+0x30>
- 453f4: 103ee83a callr r2
- 453f8: 8009883a mov r4,r16
- 453fc: 00457140 call 45714 <_exit>
- 00045400 <memcmp>:
- 45400: 01c000c4 movi r7,3
- 45404: 3980192e bgeu r7,r6,4546c <memcmp+0x6c>
- 45408: 2144b03a or r2,r4,r5
- 4540c: 11c4703a and r2,r2,r7
- 45410: 10000f26 beq r2,zero,45450 <memcmp+0x50>
- 45414: 20800003 ldbu r2,0(r4)
- 45418: 28c00003 ldbu r3,0(r5)
- 4541c: 10c0151e bne r2,r3,45474 <memcmp+0x74>
- 45420: 31bfff84 addi r6,r6,-2
- 45424: 01ffffc4 movi r7,-1
- 45428: 00000406 br 4543c <memcmp+0x3c>
- 4542c: 20800003 ldbu r2,0(r4)
- 45430: 28c00003 ldbu r3,0(r5)
- 45434: 31bfffc4 addi r6,r6,-1
- 45438: 10c00e1e bne r2,r3,45474 <memcmp+0x74>
- 4543c: 21000044 addi r4,r4,1
- 45440: 29400044 addi r5,r5,1
- 45444: 31fff91e bne r6,r7,4542c <memcmp+0x2c>
- 45448: 0005883a mov r2,zero
- 4544c: f800283a ret
- 45450: 20c00017 ldw r3,0(r4)
- 45454: 28800017 ldw r2,0(r5)
- 45458: 18bfee1e bne r3,r2,45414 <memcmp+0x14>
- 4545c: 31bfff04 addi r6,r6,-4
- 45460: 21000104 addi r4,r4,4
- 45464: 29400104 addi r5,r5,4
- 45468: 39bff936 bltu r7,r6,45450 <memcmp+0x50>
- 4546c: 303fe91e bne r6,zero,45414 <memcmp+0x14>
- 45470: 003ff506 br 45448 <memcmp+0x48>
- 45474: 10c5c83a sub r2,r2,r3
- 45478: f800283a ret
- 0004547c <__register_exitproc>:
- 4547c: defffa04 addi sp,sp,-24
- 45480: dc000315 stw r16,12(sp)
- 45484: 04000134 movhi r16,4
- 45488: 841c7104 addi r16,r16,29124
- 4548c: 80c00017 ldw r3,0(r16)
- 45490: dc400415 stw r17,16(sp)
- 45494: dfc00515 stw ra,20(sp)
- 45498: 18805217 ldw r2,328(r3)
- 4549c: 2023883a mov r17,r4
- 454a0: 10003726 beq r2,zero,45580 <__register_exitproc+0x104>
- 454a4: 10c00117 ldw r3,4(r2)
- 454a8: 010007c4 movi r4,31
- 454ac: 20c00e16 blt r4,r3,454e8 <__register_exitproc+0x6c>
- 454b0: 1a000044 addi r8,r3,1
- 454b4: 8800221e bne r17,zero,45540 <__register_exitproc+0xc4>
- 454b8: 18c00084 addi r3,r3,2
- 454bc: 18c7883a add r3,r3,r3
- 454c0: 18c7883a add r3,r3,r3
- 454c4: 12000115 stw r8,4(r2)
- 454c8: 10c7883a add r3,r2,r3
- 454cc: 19400015 stw r5,0(r3)
- 454d0: 0005883a mov r2,zero
- 454d4: dfc00517 ldw ra,20(sp)
- 454d8: dc400417 ldw r17,16(sp)
- 454dc: dc000317 ldw r16,12(sp)
- 454e0: dec00604 addi sp,sp,24
- 454e4: f800283a ret
- 454e8: 00800034 movhi r2,0
- 454ec: 10800004 addi r2,r2,0
- 454f0: 10002626 beq r2,zero,4558c <__register_exitproc+0x110>
- 454f4: 01006404 movi r4,400
- 454f8: d9400015 stw r5,0(sp)
- 454fc: d9800115 stw r6,4(sp)
- 45500: d9c00215 stw r7,8(sp)
- 45504: 00000000 call 0 <__alt_mem_onchip_memory2-0x40000>
- 45508: d9400017 ldw r5,0(sp)
- 4550c: d9800117 ldw r6,4(sp)
- 45510: d9c00217 ldw r7,8(sp)
- 45514: 10001d26 beq r2,zero,4558c <__register_exitproc+0x110>
- 45518: 81000017 ldw r4,0(r16)
- 4551c: 10000115 stw zero,4(r2)
- 45520: 02000044 movi r8,1
- 45524: 22405217 ldw r9,328(r4)
- 45528: 0007883a mov r3,zero
- 4552c: 12400015 stw r9,0(r2)
- 45530: 20805215 stw r2,328(r4)
- 45534: 10006215 stw zero,392(r2)
- 45538: 10006315 stw zero,396(r2)
- 4553c: 883fde26 beq r17,zero,454b8 <__register_exitproc+0x3c>
- 45540: 18c9883a add r4,r3,r3
- 45544: 2109883a add r4,r4,r4
- 45548: 1109883a add r4,r2,r4
- 4554c: 21802215 stw r6,136(r4)
- 45550: 01800044 movi r6,1
- 45554: 12406217 ldw r9,392(r2)
- 45558: 30cc983a sll r6,r6,r3
- 4555c: 4992b03a or r9,r9,r6
- 45560: 12406215 stw r9,392(r2)
- 45564: 21c04215 stw r7,264(r4)
- 45568: 01000084 movi r4,2
- 4556c: 893fd21e bne r17,r4,454b8 <__register_exitproc+0x3c>
- 45570: 11006317 ldw r4,396(r2)
- 45574: 218cb03a or r6,r4,r6
- 45578: 11806315 stw r6,396(r2)
- 4557c: 003fce06 br 454b8 <__register_exitproc+0x3c>
- 45580: 18805304 addi r2,r3,332
- 45584: 18805215 stw r2,328(r3)
- 45588: 003fc606 br 454a4 <__register_exitproc+0x28>
- 4558c: 00bfffc4 movi r2,-1
- 45590: 003fd006 br 454d4 <__register_exitproc+0x58>
- 00045594 <__call_exitprocs>:
- 45594: defff504 addi sp,sp,-44
- 45598: df000915 stw fp,36(sp)
- 4559c: dd400615 stw r21,24(sp)
- 455a0: dc800315 stw r18,12(sp)
- 455a4: dfc00a15 stw ra,40(sp)
- 455a8: ddc00815 stw r23,32(sp)
- 455ac: dd800715 stw r22,28(sp)
- 455b0: dd000515 stw r20,20(sp)
- 455b4: dcc00415 stw r19,16(sp)
- 455b8: dc400215 stw r17,8(sp)
- 455bc: dc000115 stw r16,4(sp)
- 455c0: d9000015 stw r4,0(sp)
- 455c4: 2839883a mov fp,r5
- 455c8: 04800044 movi r18,1
- 455cc: 057fffc4 movi r21,-1
- 455d0: 00800134 movhi r2,4
- 455d4: 109c7104 addi r2,r2,29124
- 455d8: 12000017 ldw r8,0(r2)
- 455dc: 45005217 ldw r20,328(r8)
- 455e0: 44c05204 addi r19,r8,328
- 455e4: a0001c26 beq r20,zero,45658 <__call_exitprocs+0xc4>
- 455e8: a0800117 ldw r2,4(r20)
- 455ec: 15ffffc4 addi r23,r2,-1
- 455f0: b8000d16 blt r23,zero,45628 <__call_exitprocs+0x94>
- 455f4: 14000044 addi r16,r2,1
- 455f8: 8421883a add r16,r16,r16
- 455fc: 8421883a add r16,r16,r16
- 45600: 84402004 addi r17,r16,128
- 45604: a463883a add r17,r20,r17
- 45608: a421883a add r16,r20,r16
- 4560c: e0001e26 beq fp,zero,45688 <__call_exitprocs+0xf4>
- 45610: 80804017 ldw r2,256(r16)
- 45614: e0801c26 beq fp,r2,45688 <__call_exitprocs+0xf4>
- 45618: bdffffc4 addi r23,r23,-1
- 4561c: 843fff04 addi r16,r16,-4
- 45620: 8c7fff04 addi r17,r17,-4
- 45624: bd7ff91e bne r23,r21,4560c <__call_exitprocs+0x78>
- 45628: 00800034 movhi r2,0
- 4562c: 10800004 addi r2,r2,0
- 45630: 10000926 beq r2,zero,45658 <__call_exitprocs+0xc4>
- 45634: a0800117 ldw r2,4(r20)
- 45638: 1000301e bne r2,zero,456fc <__call_exitprocs+0x168>
- 4563c: a0800017 ldw r2,0(r20)
- 45640: 10003226 beq r2,zero,4570c <__call_exitprocs+0x178>
- 45644: a009883a mov r4,r20
- 45648: 98800015 stw r2,0(r19)
- 4564c: 00000000 call 0 <__alt_mem_onchip_memory2-0x40000>
- 45650: 9d000017 ldw r20,0(r19)
- 45654: a03fe41e bne r20,zero,455e8 <__call_exitprocs+0x54>
- 45658: dfc00a17 ldw ra,40(sp)
- 4565c: df000917 ldw fp,36(sp)
- 45660: ddc00817 ldw r23,32(sp)
- 45664: dd800717 ldw r22,28(sp)
- 45668: dd400617 ldw r21,24(sp)
- 4566c: dd000517 ldw r20,20(sp)
- 45670: dcc00417 ldw r19,16(sp)
- 45674: dc800317 ldw r18,12(sp)
- 45678: dc400217 ldw r17,8(sp)
- 4567c: dc000117 ldw r16,4(sp)
- 45680: dec00b04 addi sp,sp,44
- 45684: f800283a ret
- 45688: a0800117 ldw r2,4(r20)
- 4568c: 80c00017 ldw r3,0(r16)
- 45690: 10bfffc4 addi r2,r2,-1
- 45694: 15c01426 beq r2,r23,456e8 <__call_exitprocs+0x154>
- 45698: 80000015 stw zero,0(r16)
- 4569c: 183fde26 beq r3,zero,45618 <__call_exitprocs+0x84>
- 456a0: 95c8983a sll r4,r18,r23
- 456a4: a0806217 ldw r2,392(r20)
- 456a8: a5800117 ldw r22,4(r20)
- 456ac: 2084703a and r2,r4,r2
- 456b0: 10000b26 beq r2,zero,456e0 <__call_exitprocs+0x14c>
- 456b4: a0806317 ldw r2,396(r20)
- 456b8: 2088703a and r4,r4,r2
- 456bc: 20000c1e bne r4,zero,456f0 <__call_exitprocs+0x15c>
- 456c0: 89400017 ldw r5,0(r17)
- 456c4: d9000017 ldw r4,0(sp)
- 456c8: 183ee83a callr r3
- 456cc: a0800117 ldw r2,4(r20)
- 456d0: 15bfbf1e bne r2,r22,455d0 <__call_exitprocs+0x3c>
- 456d4: 98800017 ldw r2,0(r19)
- 456d8: 153fcf26 beq r2,r20,45618 <__call_exitprocs+0x84>
- 456dc: 003fbc06 br 455d0 <__call_exitprocs+0x3c>
- 456e0: 183ee83a callr r3
- 456e4: 003ff906 br 456cc <__call_exitprocs+0x138>
- 456e8: a5c00115 stw r23,4(r20)
- 456ec: 003feb06 br 4569c <__call_exitprocs+0x108>
- 456f0: 89000017 ldw r4,0(r17)
- 456f4: 183ee83a callr r3
- 456f8: 003ff406 br 456cc <__call_exitprocs+0x138>
- 456fc: a0800017 ldw r2,0(r20)
- 45700: a027883a mov r19,r20
- 45704: 1029883a mov r20,r2
- 45708: 003fb606 br 455e4 <__call_exitprocs+0x50>
- 4570c: 0005883a mov r2,zero
- 45710: 003ffb06 br 45700 <__call_exitprocs+0x16c>
- 00045714 <_exit>:
- *
- * ALT_EXIT is mapped onto the _exit() system call in alt_syscall.h
- */
- void ALT_EXIT (int exit_code)
- {
- 45714: defffd04 addi sp,sp,-12
- 45718: df000215 stw fp,8(sp)
- 4571c: df000204 addi fp,sp,8
- 45720: e13fff15 stw r4,-4(fp)
- ALT_LOG_PRINT_BOOT("[alt_exit.c] Entering _exit() function.\r\n");
- ALT_LOG_PRINT_BOOT("[alt_exit.c] Exit code from main was %d.\r\n",exit_code);
- /* Stop all other threads */
- ALT_LOG_PRINT_BOOT("[alt_exit.c] Calling ALT_OS_STOP().\r\n");
- ALT_OS_STOP();
- 45724: 0001883a nop
- 45728: e0bfff17 ldw r2,-4(fp)
- 4572c: e0bffe15 stw r2,-8(fp)
- /*
- * Routine called on exit.
- */
- static ALT_INLINE ALT_ALWAYS_INLINE void alt_sim_halt(int exit_code)
- {
- register int r2 asm ("r2") = exit_code;
- 45730: e0bffe17 ldw r2,-8(fp)
- __asm__ volatile ("\n0:\n\taddi %0,%0, -1\n\tbgt %0,zero,0b" : : "r" (ALT_CPU_FREQ/100) ); /* Delay for >30ms */
- __asm__ volatile ("break 2" : : "r"(r2), "r"(r3) ALT_GMON_DATA );
- #else /* !DEBUG_STUB */
- if (r2) {
- 45734: 10000226 beq r2,zero,45740 <_exit+0x2c>
- ALT_SIM_FAIL();
- 45738: 002af070 cmpltui zero,zero,43969
- 4573c: 00000106 br 45744 <_exit+0x30>
- } else {
- ALT_SIM_PASS();
- 45740: 002af0b0 cmpltui zero,zero,43970
- ALT_SIM_HALT(exit_code);
- /* spin forever, since there's no where to go back to */
- ALT_LOG_PRINT_BOOT("[alt_exit.c] Spinning forever.\r\n");
- while (1);
- 45744: 003fff06 br 45744 <_exit+0x30>
|