12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852 |
- "$Header$"
- /********************************************************
- * Back end tables for pdp 11 *
- * Authors : Ceriel J.H. Jacobs,Hans van Staveren *
- * *
- * wordsize = 2 bytes, pointersize = 2 bytes. *
- * *
- * Register r5 is used for the LB, the stack pointer *
- * is used for SP. Also some global variables are used: *
- * - reghp~ : the heap pointer *
- * - trpim~ : trap ignore mask *
- * - trppc~ : address of user defined trap handler *
- * - retar : function return area for size>4 *
- * *
- * Timing is based on the timing information available *
- * for the 11/45. Hardware floating point processor is *
- * assumed. *
- ********************************************************/
- /*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- * This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- * Dr. Andrew S. Tanenbaum
- * Wiskundig Seminarium
- * Vrije Universiteit
- * Postbox 7161
- * 1007 MC Amsterdam
- * The Netherlands
- *
- */
- /* #define REGPATCH \* save all registers in link block */
- /* #define UNTESTED \* include untested rules */
- #ifdef REGPATCH
- #define SL 8
- #define SSL "010"
- #else REGPATCH
- #define SL 4
- #define SSL "4"
- #endif REGPATCH
- #define NC nocoercions:
- /* options */
- /* #define DORCK \* rck is expanded instead of thrown away */
- #define REGVARS /* use register variables */
- EM_WSIZE=2
- EM_PSIZE=2
- EM_BSIZE=SL
- TIMEFACTOR= 1/300
- FORMAT="0%o"
- REGISTERS:
- r0 = ("r0", 2), REG.
- r1 = ("r1", 2), REG, ODD_REG.
- #ifdef REGVARS
- r2 = ("r2", 2) regvar, REG.
- #else
- /* r2 = ("r2", 2), REG. */
- #endif
- r3 = ("r3", 2), REG, ODD_REG.
- #ifdef REGVARS
- r4 = ("r4", 2) regvar, REG.
- #else
- /* r4 = ("r4", 2), REG. */
- #endif
- lb = ("r5", 2), localbase.
- r01 = ("r0", 4, r0, r1), REG_PAIR.
- #ifndef REGVARS
- /* r23 = ("r2", 4, r2, r3), REG_PAIR. */
- #endif
- fr0 = ("fr0", 4), FLT_REG.
- fr1 = ("fr1", 4), FLT_REG.
- fr2 = ("fr2", 4), FLT_REG.
- fr3 = ("fr3", 4), FLT_REG.
- fr01 = ("fr0", 8, fr0, fr1), FLT_REG_PAIR.
- fr23 = ("fr2", 8, fr2, fr3), FLT_REG_PAIR.
- dr0 = ("fr0", 8, fr0), DBL_REG.
- dr1 = ("fr1", 8, fr1), DBL_REG.
- dr2 = ("fr2", 8, fr2), DBL_REG.
- dr3 = ("fr3", 8, fr3), DBL_REG.
- dr01 = ("fr0", 16, dr0, dr1), DBL_REG_PAIR.
- dr23 = ("fr2", 16, dr2, dr3), DBL_REG_PAIR.
- TOKENS:
- /********************************
- * Types on the EM-machine *
- ********************************/
- CONST2 = {INT num;} 2 cost=(2,300) "$%[num]"
- LOCAL2 = {INT ind,size;} 2 cost=(2,600) "%[ind](r5)"
- LOCAL4 = {INT ind,size;} 4 cost=(2,1200) "%[ind](r5)"
- ADDR_LOCAL = {INT ind;} 2
- ADDR_EXTERNAL = {STRING ind;} 2 cost=(2,300) "$%[ind]"
- /********************************************************
- * Now mostly addressing modes of target machine *
- ********************************************************/
- regdef2 = {REGISTER reg;} 2 cost=(0,300) "*%[reg]"
- regind2 = {REGISTER reg; STRING ind;} 2 cost=(2,600) "%[ind](%[reg])"
- reginddef2 = {REGISTER reg; STRING ind;} 2 cost=(2,1050) "*%[ind](%[reg])"
- regconst2 = {REGISTER reg; STRING ind;} 2
- /********************************************************
- * This means : add "reg" and "ind" to get address. *
- * Not really addressable on the PDP 11 *
- ********************************************************/
- relative2 = {STRING ind;} 2 cost=(2,600) "%[ind]"
- reldef2 = {STRING ind;} 2 cost=(2,1050) "*%[ind]"
- regdef1 = {REGISTER reg;} 2 cost=(0,300) "*%[reg]"
- regind1 = {REGISTER reg; STRING ind;} 2 cost=(2,600) "%[ind](%[reg])"
- reginddef1 = {REGISTER reg; STRING ind;} 2 cost=(2,1050) "*%[ind](%[reg])"
- relative1 = {STRING ind;} 2 cost=(2,600) "%[ind]"
- reldef1 = {STRING ind;} 2 cost=(2,1050) "*%[ind]"
- /************************************************************************
- * fto* are floats converted to *, conversion is delayed to be combined *
- * with store. *
- ************************************************************************/
- ftoint = {REGISTER reg;} 2
- ftolong = {REGISTER reg;} 4
- /************************************************************************
- * ...4 and ...8 are only addressable by the floating point processor. *
- ************************************************************************/
- regind4 = {REGISTER reg; STRING ind; } 4 cost=(2,3630) "%[ind](%[reg])"
- relative4 = {STRING ind; } 4 cost=(2,3630) "%[ind]"
- regdef4 = {REGISTER reg;} 4 cost=(2,3240) "*%[reg]"
- regdef8 = {REGISTER reg;} 8 cost=(2,5220) "*%[reg]"
- relative8 = {STRING ind; } 8 cost=(2,5610) "%[ind]"
- regind8 = {REGISTER reg; STRING ind;} 8 cost=(2,5610) "%[ind](%[reg])"
- TOKENEXPRESSIONS:
- SCR_REG = REG * SCRATCH
- SCR_FLT_REG = FLT_REG * SCRATCH
- SCR_DBL_REG = DBL_REG * SCRATCH
- SCR_ODD_REG = ODD_REG * SCRATCH
- SCR_REG_PAIR = REG_PAIR * SCRATCH
- all= ALL
- source2 = REG + regdef2 + regind2 + reginddef2 + localbase +
- relative2 + reldef2 + ADDR_EXTERNAL + CONST2 + LOCAL2
- xsource2 = source2 + ftoint
- source1 = regdef1 + regind1 + reginddef1 + relative1 +
- reldef1
- source1or2 = source1 + source2
- long4 = relative4 + regdef4 + LOCAL4 + regind4 + REG_PAIR
- longf4 = long4 + FLT_REG - REG_PAIR
- double8 = relative8 + regdef8 + regind8 + DBL_REG
- indexed2 = regind2 + reginddef2
- indexed4 = regind4
- indexed8 = regind8
- indexed = indexed2 + indexed4 + indexed8
- regdeferred = regdef2 + regdef4 + regdef8
- indordef = indexed + regdeferred
- locals = LOCAL2 + LOCAL4
- variable2 = relative2 + reldef2
- variable4 = relative4
- variable8 = relative8
- variable = variable2 + variable4 + variable8
- dadres2 = relative2 + REG + regind2
- regs = REG + REG_PAIR + FLT_REG + FLT_REG_PAIR +
- DBL_REG + DBL_REG_PAIR
- noconst2 = source2 - CONST2 - ADDR_EXTERNAL
- allexeptcon = all - regs - CONST2 - ADDR_LOCAL - ADDR_EXTERNAL
- externals = relative1 + relative2 + relative4 + relative8
- posextern = variable + regdeferred + indexed + externals
- diradr2 = regconst2 + ADDR_EXTERNAL
- #ifdef REGVARS
- #define INDSTORE remove(allexeptcon-locals) remove(locals, inreg(%[ind])==0)
- #else
- #define INDSTORE remove(allexeptcon)
- #endif
- CODE:
- /********************************************************
- * Group 1 : load instructions. *
- * *
- * For most load instructions no code is generated. *
- * Action : put something on the fake-stack. *
- ********************************************************/
- loc | | | {CONST2, $1} | |
- ldc | | | {CONST2, loww(1)} {CONST2, highw(1)} | |
- #ifdef REGVARS
- lol inreg($1)==2| | | regvar($1) | |
- #endif
- lol | | | {LOCAL2, $1,2} | |
- loe | | | {relative2, $1} | |
- #ifdef REGVARS
- lil inreg($1)==2| | | {regdef2, regvar($1)} | |
- #endif
- lil | | | {reginddef2, lb, tostring($1)} | |
- lof | REG | | {regind2,%[1],tostring($1)} | |
- ... | NC regconst2 |
- | {regind2,%[1.reg],tostring($1)+"+"+%[1.ind]} | |
- ... | NC ADDR_EXTERNAL |
- | {relative2,tostring($1)+"+"+%[1.ind]} | |
- ... | NC ADDR_LOCAL | | {LOCAL2, %[1.ind] + $1,2} | |
- #ifdef REGVARS
- lol lof inreg($1)!=2 | |
- allocate(REG={LOCAL2, $1,2})
- | {regind2,%[a],tostring($2)} | |
- #endif
- lal | | | {ADDR_LOCAL, $1} | |
- lae | | | {ADDR_EXTERNAL, $1} | |
- lpb | | | | adp SL |
- lxl $1==0 | | | lb | |
- lxl $1==1 | | | {LOCAL2 ,SL,2} | |
- lxl $1==2 | | allocate(REG={LOCAL2, SL, 2})
- | {regind2,%[a], SSL} | |
- lxl $1==3 | | allocate(REG={LOCAL2, SL, 2})
- move({regind2,%[a], SSL},%[a])
- | {regind2,%[a], SSL} | |
- lxl $1>3 | | allocate(REG={LOCAL2, SL, 2}, REG={CONST2,$1-1})
- "1:"
- move({regind2,%[a], SSL},%[a])
- "sob %[b],1b"
- setcc(%[a]) erase(%[a]) erase(%[b])
- | %[a] | |
- lxa $1==0 | | | {ADDR_LOCAL, SL} | |
- lxa $1==1 | | allocate(REG={LOCAL2, SL, 2 })
- | {regconst2, %[a], SSL } | |
- lxa $1==2 | | allocate(REG={LOCAL2, SL, 2 })
- move({regind2, %[a], SSL }, %[a])
- | {regconst2, %[a], SSL } | |
- lxa $1==3 | | allocate(REG={LOCAL2, SL, 2 })
- move({regind2, %[a], SSL }, %[a])
- move({regind2, %[a], SSL }, %[a])
- | {regconst2, %[a], SSL } | |
- lxa $1 > 3 | | allocate(REG={LOCAL2, SL, 2}, REG={CONST2,$1-1})
- "1:"
- move({regind2,%[a], SSL},%[a])
- "sob %[b],1b"
- setcc(%[a]) erase(%[a]) erase(%[b])
- | {regconst2, %[a], SSL } | |
- dch | | | | loi 2 |
- loi $1==2 | REG | | {regdef2, %[1]} | |
- ... | NC regconst2 | | {regind2, %[1.reg], %[1.ind]} | |
- ... | NC relative2 | | {reldef2, %[1.ind]} | |
- ... | NC regind2 | | {reginddef2, %[1.reg], %[1.ind]} | |
- ... | NC regdef2 | | {reginddef2, %[1.reg], "0"}| |
- ... | NC ADDR_LOCAL | | {LOCAL2, %[1.ind],2} | |
- ... | NC ADDR_EXTERNAL | | {relative2, %[1.ind]} | |
- ... | NC LOCAL2 |
- |{reginddef2, lb, tostring(%[1.ind])}| |
- loi $1==1 | REG | | {regdef1, %[1]} | |
- ... | NC regconst2 | | {regind1, %[1.reg], %[1.ind]} | |
- ... | NC ADDR_EXTERNAL | | {relative1, %[1.ind]} | |
- ... | NC ADDR_LOCAL| |{regind1, lb, tostring(%[1.ind])} | |
- ... | NC relative2 | | {reldef1, %[1.ind]} | |
- ... | NC regind2 | | {reginddef1, %[1.reg], %[1.ind]} | |
- ... | NC regdef2 | | {reginddef1, %[1.reg], "0"}| |
- ... | NC LOCAL2 | |{reginddef1, lb, tostring(%[1.ind])} | |
- loi $1==4 | REG | | {regdef4, %[1]} | |
- ... | NC regconst2 | | {regind4, %[1.reg], %[1.ind]} | |
- ... | NC ADDR_LOCAL | | {LOCAL4,%[1.ind],4} | |
- ... | NC ADDR_EXTERNAL | | {relative4, %[1.ind]} | |
- loi $1==8 | REG | | {regdef8, %[1]} | |
- ... | NC regconst2 | | {regind8, %[1.reg], %[1.ind]} | |
- ... | NC ADDR_LOCAL |
- | {regind8, lb , tostring(%[1.ind])} | |
- ... | NC ADDR_EXTERNAL | | {relative8, %[1.ind]} | |
- loi | NC ADDR_LOCAL |
- remove(all)
- allocate(REG={CONST2,$1/2},REG)
- move(lb,%[b])
- "add $$%(%[1.ind]+$1%),%[b]"
- "1:\tmov -(%[b]),-(sp)"
- "sob %[a],1b"
- erase(%[a]) erase(%[b]) | | |
- ... | NC ADDR_EXTERNAL |
- remove(all)
- allocate(REG={CONST2,$1/2},REG)
- "mov $$%[1.ind]+$1,%[b]"
- "1:\tmov -(%[b]),-(sp)"
- "sob %[a],1b"
- erase(%[a]) erase(%[b]) | | |
- ... | SCR_REG |
- remove(all)
- allocate(REG={CONST2,$1})
- "add %[a],%[1]"
- "asr %[a]"
- "1:\tmov -(%[1]),-(sp)"
- "sob %[a],1b"
- erase(%[1]) erase(%[a]) | | |
- los $1==2 | |
- remove(all)
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jsr pc,los2~" | | |
- #ifdef UNTESTED
- los !defined($1)| source2 |
- remove(all)
- "cmp %[1],$$2"
- "beq 1f;jmp unknown~;1:"
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jsr pc,los2~" | | |
- #endif
- ldl | | | {LOCAL4, $1,4} | |
- lde | | | {relative4, $1} | |
- ldf | regconst2 |
- | {regind4,%[1.reg], tostring($1)+"+"+%[1.ind]} | |
- ... | NC ADDR_EXTERNAL |
- | {relative4, tostring($1)+"+"+%[1.ind]} | |
- ... | NC ADDR_LOCAL | | {LOCAL4, %[1.ind]+$1,4} | |
- lpi | | | {ADDR_EXTERNAL, $1} | |
- /****************************************************************
- * Group 2 : Store instructions. *
- * *
- * These instructions are likely to ruin the fake-stack. *
- * We don't expect many items on the fake-stack anyway *
- * because we seem to have evaluated an expression just now. *
- ****************************************************************/
- #ifdef REGVARS
- stl inreg($1)==2| xsource2 |
- remove(regvar($1))
- move(%[1],regvar($1)) | | |
- #endif
- stl | xsource2 |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- move(%[1],{LOCAL2,$1,2}) | | |
- ste | xsource2 |
- remove(posextern)
- move(%[1], {relative2, $1 }) | | |
- #ifdef REGVARS
- sil inreg($1)==2| xsource2 |
- INDSTORE
- move(%[1], {regdef2,regvar($1)}) | | |
- #endif
- sil | xsource2 |
- INDSTORE
- move(%[1], {reginddef2,lb,tostring($1)}) | | |
- stf | regconst2 xsource2 |
- INDSTORE
- move(%[2],{regind2,%[1.reg],tostring($1)+"+"+%[1.ind]}) | | |
- ... | ADDR_EXTERNAL xsource2 |
- INDSTORE
- move(%[2],{relative2,tostring($1)+"+"+%[1.ind]})| | |
- #ifdef REGVARS
- lol stf inreg($1)!=2 | xsource2 |
- INDSTORE
- allocate(REG={LOCAL2, $1,2})
- move(%[1],{regind2,%[a],tostring($2)}) | | |
- lae lol ads sti $3==2 && inreg($2)==2 | |
- | {regconst2, regvar($2), $1} | sti $4 |
- lae lol ads loi $3==2 && inreg($2)==2 | |
- | {regconst2, regvar($2), $1} | loi $4 |
- #endif
- sti $1==2 | REG xsource2 |
- INDSTORE
- move(%[2],{regdef2,%[1]}) | | |
- ... | regconst2 xsource2 |
- INDSTORE
- move(%[2],{regind2,%[1.reg],%[1.ind]}) | | |
- ... | ADDR_EXTERNAL xsource2 |
- INDSTORE
- move(%[2],{relative2,%[1.ind]}) | | |
- ... | ADDR_LOCAL xsource2 |
- INDSTORE
- move(%[2],{LOCAL2, %[1.ind], 2}) | | |
- ... | relative2 xsource2 |
- INDSTORE
- move(%[2],{reldef2,%[1.ind]}) | | |
- ... | regind2 xsource2 |
- INDSTORE
- move(%[2],{reginddef2,%[1.reg],%[1.ind]}) | | |
- sti $1==1 | REG source1or2 |
- INDSTORE
- move(%[2],{regdef1,%[1]}) | | |
- ... | regconst2 source1or2 |
- INDSTORE
- move(%[2],{regind1,%[1.reg],%[1.ind]}) | | |
- ... | ADDR_EXTERNAL source1or2 |
- INDSTORE
- move(%[2],{relative1,%[1.ind]}) | | |
- ... | ADDR_LOCAL source1or2 |
- INDSTORE
- move(%[2],{regind1, lb, tostring(%[1.ind])}) | | |
- ... | relative2 source1or2 |
- INDSTORE
- move(%[2],{reldef1,%[1.ind]}) | | |
- ... | regind2 source1or2 |
- INDSTORE
- move(%[2],{reginddef1,%[1.reg],%[1.ind]}) | | |
- sti $1==4 | dadres2 FLT_REG |
- INDSTORE
- "movfo %[2],*%[1]"
- samecc | | |
- ... | dadres2 ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],*%[1]\nseti"
- samecc | | |
- ... | regconst2 FLT_REG |
- INDSTORE
- "movfo %[2],%[1.ind](%[1.reg])"
- samecc | | |
- ... | regconst2 ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],%[1.ind](%[1.reg])\nseti"
- samecc | | |
- ... | ADDR_LOCAL FLT_REG |
- INDSTORE
- "movfo %[2],%[1.ind](r5)"
- samecc | | |
- ... | ADDR_LOCAL ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],%[1.ind](r5)\nseti"
- samecc | | |
- ... | ADDR_EXTERNAL FLT_REG |
- INDSTORE
- "movfo %[2],%[1.ind]"
- samecc | | |
- ... | ADDR_EXTERNAL ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],%[1.ind]\nseti"
- samecc | | |
- ... | REG source2 source2 |
- INDSTORE
- move(%[2],{regdef2,%[1]})
- move(%[3],{regind2,%[1],"2"}) | | |
- ... | SCR_REG STACK |
- "mov (sp)+,(%[1])+"
- "mov (sp)+,(%[1])"
- erase(%[1]) | | | (4,2040)
- sti $1==8 | dadres2 DBL_REG |
- INDSTORE
- "movf %[2],*%[1]"
- samecc | | |
- ... | regconst2 DBL_REG |
- INDSTORE
- "movf %[2],%[1.ind](%[1.reg])"
- samecc | | |
- ... | ADDR_LOCAL DBL_REG |
- INDSTORE
- "movf %[2],%[1.ind](r5)"
- samecc | | |
- ... | ADDR_EXTERNAL DBL_REG |
- INDSTORE
- "movf %[2],%[1.ind]"
- samecc | | |
- ... | SCR_REG regdef8 |
- INDSTORE
- "mov (%[2.reg]),(%[1])+"
- "mov 2(%[2.reg]),(%[1])+"
- "mov 4(%[2.reg]),(%[1])+"
- "mov 6(%[2.reg]),(%[1])"
- erase(%[1]) | | |
- ... | SCR_REG regind8 |
- INDSTORE
- "mov %[2.ind](%[2.reg]),(%[1])+"
- "mov 2+%[2.ind](%[2.reg]),(%[1])+"
- "mov 4+%[2.ind](%[2.reg]),(%[1])+"
- "mov 6+%[2.ind](%[2.reg]),(%[1])"
- erase(%[1]) | | |
- ... | SCR_REG relative8 |
- INDSTORE
- allocate(REG={ADDR_EXTERNAL,%[2.ind]})
- "mov (%[a])+,(%[1])+"
- "mov (%[a])+,(%[1])+"
- "mov (%[a])+,(%[1])+"
- "mov (%[a]),(%[1])"
- erase(%[1]) erase(%[a]) | | |
- ... | SCR_REG |
- remove(all)
- "mov (sp)+,(%[1])+"
- "mov (sp)+,(%[1])+"
- "mov (sp)+,(%[1])+"
- "mov (sp)+,(%[1])"
- erase(%[1]) | | | (8,4080)
- sti | SCR_REG |
- remove(all)
- allocate(REG={CONST2,$1/2})
- "1:\tmov (sp)+,(%[1])+"
- "sob %[a],1b"
- erase(%[1]) erase(%[a]) | | | (8,1500+$1*825)
- lal sti $2>2 && $2<=8 | NC xsource2 | | %[1] | stl $1 lal $1+2 sti $2-2 |
- ... | | | {ADDR_LOCAL,$1} | sti $2 |
- sts $1==2 | |
- remove(all)
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jsr pc,sto2~"
- erase(r01) | | |
- sdl | NC FLT_REG |
- remove(indordef)
- remove(locals, %[ind] <= $1+2 && %[ind]+%[size] > $1)
- move(%[1],{LOCAL4,$1,4}) | | |
- ... | NC ftolong |
- remove(indordef)
- remove(locals, %[ind] <= $1+2 && %[ind]+%[size] > $1)
- "setl\nmovfi %[1.reg],$1(r5)\nseti"
- samecc | | |
- ... | source2 source2 |
- remove(indordef)
- remove(locals, %[ind] <= $1+2 && %[ind]+%[size] > $1)
- move(%[1],{LOCAL2,$1,2})
- move(%[2],{LOCAL2,$1+2,2}) | | |
- sde | NC FLT_REG |
- remove(posextern)
- move(%[1],{relative4,$1}) | | |
- ... | NC ftolong |
- remove(posextern)
- "setl\nmovfi %[1.reg],$1\nseti"
- samecc | | |
- ... | source2 source2 |
- remove(posextern)
- move(%[1], {relative2, $1 })
- move(%[2], {relative2, $1+"+2" }) | | |
- sdf | NC regconst2 FLT_REG |
- INDSTORE
- move(%[2],{regind4,%[1.reg],tostring($1)+"+"+%[1.ind]}) | | |
- ... | NC regconst2 ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],$1+%[1.ind](%[1.reg])\nseti"
- samecc | | |
- ... | NC ADDR_EXTERNAL FLT_REG |
- INDSTORE
- move(%[2],{relative4,tostring($1)+"+"+%[1.ind]})| | |
- ... | NC ADDR_EXTERNAL ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],$1+%[1.ind]\nseti"
- samecc | | |
- ... | regconst2 source2 source2 |
- INDSTORE
- move(%[2],{regind2,%[1.reg],tostring($1)+"+"+%[1.ind]})
- move(%[3],{regind2,%[1.reg],tostring($1+2)+"+"+%[1.ind]}) | | |
- ... | ADDR_EXTERNAL source2 source2 |
- INDSTORE
- move(%[2],{relative2,tostring($1)+"+"+%[1.ind]})
- move(%[3],{relative2,tostring($1+2)+"+"+%[1.ind]}) | | |
- /****************************************************************
- * Group 3 : Integer arithmetic. *
- * *
- * Implemented (sometimes with the use of subroutines) : *
- * all 2 and 4 byte arithmetic. *
- ****************************************************************/
- adi $1==2 | NC SCR_REG CONST2 | | {regconst2,%[1],tostring(%[2.num])} | |
- ... | NC SCR_REG ADDR_EXTERNAL | | {regconst2,%[1],%[2.ind]} | |
- ... | NC SCR_REG ADDR_LOCAL |
- "add r5,%[1]" erase(%[1]) |
- {regconst2,%[1],tostring(%[2.ind])} | | (2,450)
- ... | NC REG ADDR_LOCAL |
- allocate(REG)
- "mov r5,%[a]"
- "add %[1],%[a]"
- erase(%[a]) | {regconst2,%[a],tostring(%[2.ind])} | | (4,900)
- ... | NC SCR_REG regconst2 |
- "add %[2.reg],%[1]" erase(%[1]) |
- {regconst2,%[1],%[2.ind]} | | (2,450)
- ... | NC CONST2+ADDR_EXTERNAL+ADDR_LOCAL+regconst2 SCR_REG |
- | %[1] %[2] | adi 2 |
- ... | NC source2-REG CONST2+ADDR_EXTERNAL+ADDR_LOCAL |
- allocate(%[1],REG=%[1]) | %[2] %[a] | adi 2 |
- ... | NC source1 CONST2+ADDR_EXTERNAL+ADDR_LOCAL |
- allocate(%[1],REG={CONST2, 0})
- "bisb %[1],%[a]" | %[2] %[a] | adi 2 |
- ... | NC regconst2 CONST2 | |
- {regconst2,%[1.reg],
- tostring(%[2.num])+"+"+%[1.ind]} | |
- ... | NC regconst2 ADDR_EXTERNAL | |
- {regconst2,%[1.reg],
- %[2.ind]+"+"+%[1.ind]} | |
- ... | NC regconst2 ADDR_LOCAL |
- "add r5,%[1.reg]" erase(%[1.reg]) |
- {regconst2,%[1.reg],
- tostring(%[2.ind])+"+"+%[1.ind]} | | (2,450)
- ... | NC regconst2 regconst2 |
- "add %[2.reg],%[1.reg]" erase(%[1.reg]) |
- {regconst2,%[1.reg],%[2.ind]+"+"+%[1.ind]} | | (2,450)
- ... | NC regconst2 noconst2 |
- "add %[2],%[1.reg]" erase(%[1.reg]) | %[1] | | (2,450)+%[2]
- ... | NC SCR_REG noconst2 |
- "add %[2],%[1]"
- setcc(%[1]) erase(%[1]) | %[1] | | (2,450)+%[2]
- ... | NC source2 regconst2 |
- "add %[1],%[2.reg]"
- erase(%[2.reg]) | %[2] | | (2,450)+%[1]
- ... | NC regconst2 source2 |
- "add %[2],%[1.reg]"
- erase(%[1.reg]) | %[1] | | (2,450)+%[2]
- ... | source2 SCR_REG |
- "add %[1],%[2]"
- setcc(%[2]) erase(%[2]) | %[2] | | (2,450)+%[1]
- ldc adi $2==4 && highw(1)==0 | SCR_REG SCR_REG |
- "add $$%(loww(1)%),%[2]"
- "adc %[1]"
- erase(%[1]) erase(%[2]) | %[2] %[1] | |
- ldc adi $2==4 | SCR_REG SCR_REG |
- "add $$%(loww(1)%),%[2]"
- "adc %[1]"
- "add $$%(highw(1)%),%[1]"
- erase(%[1]) erase(%[2]) | %[2] %[1] | |
- adi $1==4 | SCR_REG SCR_REG source2 source2 |
- "add %[4],%[2]"
- "adc %[1]"
- "add %[3],%[1]"
- setcc(%[1]) erase(%[1]) erase(%[2])
- | %[2] %[1] | | (6,1200)+%[4]+%[3]
- ... | SCR_REG SCR_REG source2 STACK |
- "add (sp)+,%[2]"
- "adc %[1]"
- "add %[3],%[1]"
- setcc(%[1]) erase(%[1]) erase(%[2])
- | %[2] %[1] | | (6,1900)+%[3]
- ... | SCR_REG SCR_REG STACK |
- "add (sp)+,%[1]"
- "add (sp)+,%[2]"
- "adc %[1]"
- setcc(%[1]) erase(%[1]) erase(%[2])
- | %[2] %[1] | | (6,2800)
- ... | source2 source2 SCR_REG SCR_REG |
- "add %[2],%[4]"
- "adc %[3]"
- "add %[1],%[3]"
- setcc(%[3]) erase(%[3]) erase(%[4])
- | %[4] %[3] | | (6,1200)+%[1]+%[2]
- #ifdef UNTESTED
- adi !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,adi~" | | |
- #endif
- loc sbi $2==2 | | | | loc 0-$1 adi 2 |
- sbi $1==2 | source2 SCR_REG |
- "sub %[1],%[2]"
- setcc(%[2]) erase(%[2]) | %[2] | | (2,450)+%[1]
- ... | NC SCR_REG source2-REG |
- "sub %[2],%[1]"
- "neg %[1]"
- setcc(%[1]) erase(%[1]) | %[1] | | (4,750)+%[2]
- ldc sbi $2==4 && highw(1)==0 | SCR_REG SCR_REG |
- "sub $$%(loww(1)%),%[2]"
- "sbc %[1]"
- erase(%[1]) erase(%[2]) | %[2] %[1] | |
- ldc sbi $2==4 | SCR_REG SCR_REG |
- "sub $$%(loww(1)%),%[2]"
- "sbc %[1]"
- "sub $$%(highw(1)%),%[1]"
- erase(%[1]) erase(%[2]) | %[2] %[1] | |
- sbi $1==4 | source2-REG source2-REG SCR_REG SCR_REG |
- "sub %[2],%[4]"
- "sbc %[3]"
- "sub %[1],%[3]"
- setcc(%[3]) erase(%[3]) erase(%[4])
- | %[4] %[3] | | (6,1200)+%[1]+%[2]
- ... | source2 source2 STACK |
- "sub %[2],2(sp)"
- "sbc (sp)"
- "sub %[1],(sp)" | | | (10,2800)+%[1]+%[2]
- #ifdef UNTESTED
- sbi !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,sbi~" | | |
- #endif
- mli $1==2 | SCR_ODD_REG source2 |
- "mul %[2],%[1]"
- setcc(%[1]) erase(%[1]) | %[1] | |(2,3300)+%[2]
- ... | source2 SCR_ODD_REG |
- "mul %[1],%[2]"
- setcc(%[2]) erase(%[2]) | %[2] | |(2,3300)+%[1]
- mli $1==4 | | remove(all)
- "jsr pc,mli4~"
- | r1 r0 | |
- #ifdef UNTESTED
- mli !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,mli~" | | |
- #endif
- dvi $1==2 | source2 source2 |
- allocate(%[2],REG_PAIR)
- "mov %[2],%[a.2]"
- "sxt %[a.1]"
- "div %[1],%[a.1]" | %[a.1] | |
- ... | source2 source2 |
- INDSTORE
- "mov %[1],-(sp)"
- "mov %[2],r1"
- "sxt r0"
- "div (sp)+,r0" | r0 | |(100,10000)
- dvi $1==4 | | remove(all)
- "jsr pc,dvi4~" | r1 r0 | |
- #ifdef UNTESTED
- dvi !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,dvi~" | | |
- #endif
- rmi $1==2 | source2 source2 |
- allocate(%[2],REG_PAIR)
- "mov %[2],%[a.2]"
- "sxt %[a.1]"
- "div %[1],%[a.1]" | %[a.2] | |
- ... | source2 source2 |
- INDSTORE
- "mov %[1],-(sp)"
- "mov %[2],r1"
- "sxt r0"
- "div (sp)+,r0" | r1 | |(100,10000)
- rmi $1==4 | | remove(all)
- "jsr pc,rmi4~" | r1 r0 | |
- #ifdef UNTESTED
- rmi !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,rmi~" | | |
- #endif
- ngi $1==2 | SCR_REG |
- "neg %[1]"
- setcc(%[1]) erase(%[1]) | %[1] | | (2,750)
- ngi $1==4 | SCR_REG SCR_REG |
- "neg %[1]"
- "neg %[2]"
- "sbc %[1]"
- setcc(%[1]) erase(%[1]) erase(%[2])
- | %[2] %[1] | | (6,1800)
- #ifdef UNTESTED
- ngi !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,ngi~" | | |
- #endif
- loc sli $1==1 && $2==2 | SCR_REG |
- "asl %[1]"
- setcc(%[1]) erase(%[1]) | %[1]| |
- sli $1==2 | source2 SCR_REG |
- "ash %[1],%[2]"
- setcc(%[2]) erase(%[2]) | %[2] | |
- sli $1==4 | source2 SCR_REG_PAIR |
- "ashc %[1],%[2]"
- setcc(%[2]) erase(%[2]) | %[2] | |
- #ifdef UNTESTED
- sli !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,sli~" | | |
- #endif
- loc sri $1==1 && $2==2 | SCR_REG |
- "asr %[1]"
- setcc(%[1]) erase(%[1]) | %[1]| |
- loc sri $2==2 | SCR_REG |
- "ash $$%(0-$1%),%[1]"
- setcc(%[1]) erase(%[1]) | %[1]| |
- sri $1==2 | SCR_REG SCR_REG |
- "neg %[1]"
- "ash %[1], %[2]"
- setcc(%[2]) erase(%[1]) erase(%[2]) | %[2] | |
- loc sri $2==4 | SCR_REG_PAIR |
- "ashc $$%(0-$1%),%[1]"
- setcc(%[1]) erase(%[1]) | %[1] | |
- sri $1==4 | SCR_REG SCR_REG_PAIR |
- "neg %[1]"
- "ashc %[1],%[2]"
- setcc(%[2]) erase(%[1]) erase(%[2]) | %[2] | |
- #ifdef UNTESTED
- sri !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,sri~" | | |
- #endif
- /************************************************
- * Group 4 : unsigned arithmetic *
- * *
- * adu = adi *
- * sbu = sbi *
- * slu = sli *
- * *
- * Supported : 2- and 4 byte arithmetic. *
- ************************************************/
- adu | | | | adi $1 |
- sbu | | | | sbi $1 |
- mlu $1==2 | | | | mli $1 |
- mlu $1==4 | | remove(all)
- "jsr pc,mlu4~" | r1 r0 | |
- #ifdef UNTESTED
- mlu !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,mlu~" | | |
- #endif
- loc dvu $1>0 && $1<=32767 && $2==2 | source2 |
- allocate(%[1],REG_PAIR)
- move(%[1],%[a.2])
- "clr %[a.1]"
- "div $$$1,%[a.1]" | %[a.1] | |
- dvu $1==2 | | remove(all)
- "jsr pc,dvu2~" | r0 | |
- dvu $1==4 | | remove(all)
- "jsr pc,dvu4~" | r1 r0 | |
- #ifdef UNTESTED
- dvu !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,dvu~" | | |
- #endif
- loc rmu $1>0 && $1<=32767 && $2==2 | source2 |
- allocate(%[1],REG_PAIR)
- move(%[1],%[a.2])
- "clr %[a.1]"
- "div $$$1,%[a.1]" | %[a.2] | |
- rmu $1==2 | | remove(all)
- "jsr pc,rmu2~" | r1 | |
- rmu $1==4 | | remove(all)
- "jsr pc,rmu4~" | r1 r0 | |
- #ifdef UNTESTED
- rmu !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,rmu~" | | |
- #endif
- slu | | | | sli $1 |
- loc slu | | | | loc $1 sli $2 |
- sru $1==2 | SCR_REG xsource2 |
- allocate(%[2],REG_PAIR)
- move(%[2],%[a.2])
- move({CONST2,0},%[a.1])
- "neg %[1]"
- "ashc %[1],%[a]"
- erase(%[a]) | %[a.2] | |
- loc sru $2==2 | xsource2 |
- allocate(%[1],REG_PAIR)
- move(%[1],%[a.2])
- move({CONST2,0},%[a.1])
- "ashc $$%(0-$1%),%[a]"
- erase(%[a]) | %[a.2] | |
- sru $1==4 | | remove(all)
- move({CONST2,$1},r0)
- "jsr pc,sru~"
- erase(r0) | | |
- #ifdef UNTESTED
- sru !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,sru~" | | |
- #endif
- /************************************************
- * Group 5 : Floating point arithmetic *
- * *
- * Supported : 4- and 8 byte arithmetic. *
- ************************************************/
- adf $1==4 | FLT_REG SCR_FLT_REG |
- "addf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,5000)+%[1]
- ... | SCR_FLT_REG FLT_REG |
- "addf %[2],%[1]"
- samecc erase(%[1]) | %[1] | | (2,5000)+%[2]
- adf $1==8 | double8 SCR_DBL_REG |
- "addf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,6000)+%[1]
- ... | SCR_DBL_REG double8 |
- "addf %[2],%[1]"
- samecc erase(%[1]) | %[1] | | (2,6000)+%[2]
- #ifdef UNTESTED
- adf !defined($1)| source2 |
- remove(ALL)
- move(%[1],r0)
- "jsr pc,adf~" | | |
- #endif
- sbf $1==4 | FLT_REG SCR_FLT_REG |
- "subf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,5000)+%[1]
- sbf $1==8 | double8 SCR_DBL_REG |
- "subf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,6000)+%[1]
- #ifdef UNTESTED
- sbf !defined($1)| source2 |
- remove(ALL)
- move(%[1],r0)
- "jsr pc,sbf~" | | |
- #endif
- mlf $1==4 | FLT_REG SCR_FLT_REG |
- "mulf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,7000)+%[1]
- ... | SCR_FLT_REG FLT_REG |
- "mulf %[2],%[1]"
- samecc erase(%[1]) | %[1] | | (2,7000)+%[2]
- mlf $1==8 | double8 SCR_DBL_REG |
- "mulf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,10000)+%[1]
- ... | SCR_DBL_REG double8 |
- "mulf %[2],%[1]"
- samecc erase(%[1]) | %[1] | | (2,10000)+%[2]
- #ifdef UNTESTED
- mlf !defined($1)| source2 |
- remove(ALL)
- move(%[1],r0)
- "jsr pc,mlf~" | | |
- #endif
- dvf $1==4 | FLT_REG SCR_FLT_REG |
- "divf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,8000)+%[1]
- dvf $1==8 | double8 SCR_DBL_REG |
- "divf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,12000)+%[1]
- #ifdef UNTESTED
- dvf !defined($1)| source2 |
- remove(ALL)
- move(%[1],r0)
- "jsr pc,dvf~" | | |
- #endif
- ngf $1==4 | SCR_FLT_REG |
- "negf %[1]"
- samecc erase(%[1]) | %[1] | |(2,2700)
- ngf $1==8 | SCR_DBL_REG |
- "negf %[1]"
- samecc erase(%[1]) | %[1] | |(2,2700)
- #ifdef UNTESTED
- ngf !defined($1)| source2 |
- remove(ALL)
- move(%[1],r0)
- "jsr pc,ngf~" | | |
- #endif
- fif $1==4 | longf4 FLT_REG |
- allocate(FLT_REG_PAIR)
- move(%[1],%[a.1])
- "modf %[2],%[a]"
- samecc erase(%[a.1]) | %[a.1] %[a.2] | | (2,7500)+%[2]
- fif $1==8 | double8 double8 |
- allocate(DBL_REG_PAIR)
- move(%[1],%[a.1])
- "modf %[2],%[a]"
- samecc erase(%[a.1]) | %[a.1] %[a.2] | | (2,15000)+%[2]
- #ifdef UNTESTED
- fif !defined($1)| source2 |
- remove(ALL)
- move(%[1],r0)
- "jsr pc,fif~" | | |
- #endif
- fef $1==4 | FLT_REG |
- allocate(REG)
- "movei %[1],%[a]"
- "movie $$0,%[1]"
- samecc
- erase(%[1]) |%[1] %[a] | | (4,5000)
- fef $1==8 | DBL_REG |
- allocate(REG)
- "movei %[1],%[a]"
- "movie $$0,%[1]"
- samecc
- erase(%[1]) |%[1] %[a] | | (4,5000)
- #ifdef UNTESTED
- fef !defined($1)| source2 |
- remove(ALL)
- move(%[1],r0)
- "jsr pc,fef~" | | |
- #endif
- /****************************************
- * Group 6 : pointer arithmetic. *
- * *
- * Pointers have size 2 bytes. *
- ****************************************/
- adp | SCR_REG | | {regconst2, %[1], tostring($1)} | |
- ... | NC regconst2 | | {regconst2, %[1.reg], tostring($1)+"+"+%[1.ind]} | |
- ... | NC ADDR_EXTERNAL | | {ADDR_EXTERNAL, tostring($1)+"+"+%[1.ind]} | |
- ... | NC ADDR_LOCAL | | {ADDR_LOCAL,%[1.ind]+$1} | |
- ads $1==2 | | | | adi $1 |
- sbs $1==2 | | | | sbi $1 |
- /****************************************
- * Group 7 : increment/decrement/zero *
- ****************************************/
- inc | SCR_REG |
- "inc %[1]"
- setcc(%[1]) erase(%[1]) | %[1] | |
- #ifdef REGVARS
- inl inreg($1)==2| | remove(regvar($1))
- "inc %(regvar($1)%)"
- erase(regvar($1)) | | |
- #endif
- inl | | remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "inc $1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- ldl ldc adi sdl $1==$4 && $3==4 && highw(2)==0 | |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "add $$%(loww(2)%),2+$1(r5)"
- "adc $1(r5)" | | |
- ldl ldc adi sdl $1==$4 && $3==4 | |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "add $$%(loww(2)%),2+$1(r5)"
- "adc $1(r5)"
- "add $$%(highw(2)%),$1(r5)" | | |
- ine | | remove(posextern)
- "inc $1"
- setcc({relative2,$1}) | | |
- lde ldc adi sde $1==$4 && $3==4 && highw(2)==0 | |
- remove(posextern)
- "add $$%(loww(2)%),2+$1"
- "adc $1" | | |
- lde ldc adi sde $1==$4 && $3==4 | |
- remove(posextern)
- "add $$%(loww(2)%),2+$1"
- "adc $1"
- "add $$%(highw(2)%),$1" | | |
- dec | SCR_REG |
- "dec %[1]"
- setcc(%[1]) erase(%[1]) | %[1] | |
- #ifdef REGVARS
- del inreg($1)==2| | remove(regvar($1))
- "dec %(regvar($1)%)"
- erase(regvar($1)) | | |
- #endif
- del | | remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "dec $1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- dee | | remove(posextern)
- "dec $1"
- setcc({relative2,$1}) | | | (4,900)
- #ifdef REGVARS
- lol loc sbi stl $1==$4 && $3==2 && inreg($1)==2 | |
- remove(regvar($1))
- "sub $$$2,%(regvar($1)%)"
- erase(regvar($1)) | | |
- lol ngi stl $1==$3 && $2==2 && inreg($1)==2 | |
- remove(regvar($1))
- "neg %(regvar($1)%)"
- erase(regvar($1)) | | |
- lil ngi sil $1==$3 && $2==2 && inreg($1)==2 | |
- INDSTORE
- "neg *%(regvar($1)%)" | | |
- lil inc sil $1==$3 && inreg($1)==2 | | INDSTORE
- "inc *%(regvar($1)%)"
- setcc({regdef2, regvar($1)}) | | |
- lil dec sil $1==$3 && inreg($1)==2 | | INDSTORE
- "dec *%(regvar($1)%)"
- setcc({regdef2, regvar($1)}) | | |
- lol adi stl $2==2 && $1==$3 && inreg($1)==2 | source2 |
- remove(regvar($1))
- "add %[1],%(regvar($1)%)"
- erase(regvar($1)) | | |
- lol lol adp stl loi $1==$2 && $2==$4 && inreg($1)==2 && $3==1 && $5==1 | |
- allocate(REG={CONST2, 0})
- remove(regvar($1))
- "bisb (%(regvar($1)%))+,%[a]" | %[a] | |
- lol lol adp stl loi $1==$2 && $2==$4 && inreg($1)==2 && $3==2 && $5==2 | |
- allocate(REG)
- remove(regvar($1))
- "mov (%(regvar($1)%))+,%[a]" | %[a] | |
- lol sti lol adp stl $1==$3 && $3==$5 && inreg($1)==2 && $2==1 && $4==1 | source1or2|
- remove(regvar($1))
- "movb %[1],(%(regvar($1)%))+" | | |
- sil lol adp stl $1==$2 && $2==$4 && inreg($1)==2 && $3==2 | source2 |
- remove(regvar($1))
- "mov %[1],(%(regvar($1)%))+" | | |
- lol lol adp stl $1==$2 && $2==$4 && inreg($1)==2 | |
- allocate(REG=regvar($1)) | %[a]
- | lol $2 adp $3 stl $2 |
- lol lol adp stl $1==$2 && $2==$4 | |
- allocate(REG={LOCAL2, $1, 2}) | %[a]
- | lol $2 adp $3 stl $2 |
- lol inl $1==$2 && inreg($1)==2 | |
- allocate(REG=regvar($1)) | %[a]
- | inl $2 |
- lol inl $1==$2 | |
- allocate(REG={LOCAL2, $1, 2}) | %[a]
- | inl $2 |
- lol del $1==$2 && inreg($1)==2 | |
- allocate(REG=regvar($1)) | %[a]
- | del $2 |
- lol del $1==$2 | |
- allocate(REG={LOCAL2, $1, 2}) | %[a]
- | del $2 |
- lol adp stl $1==$3 && $2==1 && inreg($1)==2 | |
- remove(regvar($1))
- "inc %(regvar($1)%)"
- erase(regvar($1)) | | |
- lol adp stl $1==$3 && $2==0-1 && inreg($1)==2 | |
- remove(regvar($1))
- "dec %(regvar($1)%)"
- erase(regvar($1)) | | |
- lol adp stl $1==$3 && inreg($1)==2 | |
- remove(regvar($1))
- "add $$$2,%(regvar($1)%)"
- erase(regvar($1)) | | |
- lil lil adp sil $2==$4 && inreg($1)==2 | |
- allocate(REG={regdef2, regvar($1)})
- | %[a] | lil $2 adp $3 sil $2 |
- lil adp sil $1==$3 && $2==1 && inreg($1)==2 | |
- INDSTORE
- "inc *%(regvar($1)%)" | | |
- lil adp sil $1==$3 && $2==0-1 && inreg($1)==2 | |
- INDSTORE
- "dec *%(regvar($1)%)" | | |
- lil adp sil $1==$3 && inreg($1)==2 | |
- INDSTORE
- "add $$$2,*%(regvar($1)%)" | | |
- lol lof inc lol stf $1==$4 && $2==$5 && inreg($1)==2 | |
- INDSTORE
- "inc $2(%(regvar($1)%))"
- setcc({regind2, regvar($1), tostring($2)}) | | |
- lol lof dec lol stf $1==$4 && $2==$5 && inreg($1)==2 | |
- INDSTORE
- "dec $2(%(regvar($1)%))"
- setcc({regind2, regvar($1), tostring($2)}) | | |
- lol lof adp lol stf $1==$4 && $2==$5 && inreg($1)==2 && $3==1 | |
- INDSTORE
- "inc $2(%(regvar($1)%))"
- setcc({regind2, regvar($1), tostring($2)}) | | |
- lol lof adp lol stf $1==$4 && $2==$5 && inreg($1)==2 && $3==0-1 | |
- INDSTORE
- "dec $2(%(regvar($1)%))"
- setcc({regind2, regvar($1), tostring($2)}) | | |
- lol lof adp lol stf $1==$4 && $2==$5 && inreg($1)==2 | |
- INDSTORE
- "add $3,$2(%(regvar($1)%))"
- setcc({regind2, regvar($1), tostring($2)}) | | |
- #endif
- lol loc sbi stl $1==$4 && $3==2 | |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "sub $$$2,$1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- lol ngi stl $1==$3 && $2==2 | |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "neg $1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- lil ngi sil $1==$3 && $2==2 | | INDSTORE
- "neg *$1(r5)" | | |
- lil inc sil $1==$3 | | INDSTORE
- "inc *$1(r5)"
- setcc({reginddef2, lb, tostring($1)}) | | |
- lil dec sil $1==$3 | | INDSTORE
- "dec *$1(r5)"
- setcc({reginddef2, lb, tostring($1)}) | | |
- lol adi stl $2==2 && $1==$3 | source2 |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "add %[1],$1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- lol adp stl $1==$3 && $2==1 | |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "inc $1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- lol adp stl $1==$3 && $2==0-1 | |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "dec $1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- lol adp stl $1==$3 | |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "add $$$2,$1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- lil lil adp sil $2==$4 | |
- allocate(REG={reginddef2, lb, tostring($1)})
- | %[a] | lil $2 adp $3 sil $2 |
- lil adp sil $1==$3 && $2==1 | |
- INDSTORE
- "inc *$1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- lil adp sil $1==$3 && $2==0-1 | |
- INDSTORE
- "dec *$1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- lil adp sil $1==$3 | |
- INDSTORE
- "add $$$2,*$1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- loe adi ste $2==2 && $1==$3 | source2 |
- remove(posextern)
- "add %[1],$1"
- setcc({relative2,$1}) | | |
- loe adp ste $1==$3 && $2==1 | |
- remove(posextern)
- "inc $1"
- setcc({relative2,$1}) | | |
- loe adp ste $1==$3 && $2==0-1 | |
- remove(posextern)
- "dec $1"
- setcc({relative2,$1}) | | |
- loe adp ste $1==$3 | |
- remove(posextern)
- "add $$$2,$1"
- setcc({relative2,$1}) | | |
- loe loi loe loi adp loe sti $3==$6 && $2==2 && $4==2 && $7==2 | |
- allocate(REG={reldef2, $1})
- | %[a] | loe $3 loi $4 adp $5 loe $6 sti $7 |
- loe loi adp loe sti $1==$4 && $2==2 && $5==2 && $3==1 | |
- INDSTORE
- "inc *$1"
- setcc({reldef2,$1}) | | |
- loe loi adp loe sti $1==$4 && $2==2 && $5==2 && $3==0-1 | |
- INDSTORE
- "dec *$1"
- setcc({reldef2,$1}) | | |
- loe loi adp loe sti $1==$4 && $2==2 && $5==2 | |
- INDSTORE
- "add $$$3,*$1"
- setcc({reldef2,$1}) | | |
- lol lof inc lol stf $1==$4 && $2==$5 | |
- INDSTORE
- allocate(REG={LOCAL2, $1, 2})
- "inc $2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- lol lof dec lol stf $1==$4 && $2==$5 | |
- INDSTORE
- allocate(REG={LOCAL2, $1, 2})
- "dec $2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- lol lof adp lol stf $1==$4 && $2==$5 && $3==1 | |
- INDSTORE
- allocate(REG={LOCAL2, $1, 2})
- "inc $2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- lol lof adp lol stf $1==$4 && $2==$5 && $3==0-1 | |
- INDSTORE
- allocate(REG={LOCAL2, $1, 2})
- "dec $2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- lol lof adp lol stf $1==$4 && $2==$5 | |
- INDSTORE
- allocate(REG={LOCAL2, $1, 2})
- "add $3,$2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- loe lof inc loe stf $1==$4 && $2==$5 | |
- INDSTORE
- allocate(REG={relative2, $1})
- "inc $2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- loe lof dec loe stf $1==$4 && $2==$5 | |
- INDSTORE
- allocate(REG={relative2, $1})
- "dec $2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- loe lof adp loe stf $1==$4 && $2==$5 && $3==1 | |
- INDSTORE
- allocate(REG={relative2, $1})
- "inc $2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- loe lof adp loe stf $1==$4 && $2==$5 && $3==0-1 | |
- INDSTORE
- allocate(REG={relative2, $1})
- "dec $2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- loe lof adp loe stf $1==$4 && $2==$5 | |
- INDSTORE
- allocate(REG={relative2, $1})
- "add $3,$2(%[a])"
- setcc({regind2, %[a], tostring($2)}) | | |
- loe ine $1==$2 | |
- allocate(REG={relative2, $1}) | %[a]
- | ine $2 |
- loe dee $1==$2 | |
- allocate(REG={relative2, $1}) | %[a]
- | dee $2 |
- loe loe adp ste $1==$2 && $2==$4 | |
- allocate(REG={relative2, $1}) | %[a]
- | loe $2 adp $3 ste $2 |
- #ifdef REGVARS
- lol ior stl $2==2 && $1==$3 && inreg($1)==2 | source2 |
- remove(regvar($1))
- "bis %[1],%(regvar($1)%)"
- erase(regvar($1)) | | |
- #endif
- lol ior stl $2==2 && $1==$3 | source2 |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "bis %[1],$1(r5)"
- setcc({LOCAL2,$1,2}) | | |
- loe ior ste $2==2 && $1==$3 | source2 |
- remove(posextern)
- "bis %[1],$1"
- setcc({relative2,$1}) | | |
- #ifdef REGVARS
- lol and stl $2==2 && $1==$3 && inreg($1)==2 | SCR_REG |
- remove(regvar($1))
- "com %[1]"
- "bic %[1],%(regvar($1)%)"
- erase(%[1])
- erase(regvar($1)) | | |
- #endif
- lol and stl $2==2 && $1==$3 | SCR_REG |
- remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "com %[1]"
- "bic %[1],$1(r5)"
- erase(%[1])
- setcc({LOCAL2,$1,2}) | | |
- loe and ste $2==2 && $1==$3 | SCR_REG |
- remove(posextern)
- "com %[1]"
- "bic %[1],$1"
- erase(%[1])
- setcc({relative2,$1}) | | |
- #ifdef REGVARS
- loc lol and stl $3==2 && $2==$4 && inreg($2)==2 | |
- remove(regvar($2))
- "bic $$%(~$1%),%(regvar($2)%)"
- erase(regvar($2)) | | |
- #endif
- loc lol and stl $3==2 && $2==$4 | |
- remove(indordef)
- remove(locals, %[ind] <= $2 && %[ind]+%[size] > $2)
- "bic $$%(~$1%),$2(r5)"
- setcc({LOCAL2,$2,2}) | | |
- loc loe and ste $3==2 && $2==$4 | |
- remove(posextern)
- "bic $$%(~$1%),$2"
- setcc({relative2,$2}) | | |
- #ifdef REGVARS
- zrl inreg($1)==2| | remove(regvar($1))
- "clr %(regvar($1)%)"
- erase(regvar($1)) | | | (4,900)
- #endif
- zrl | | remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "clr $1(r5)"
- setcc({LOCAL2,$1,2}) | | | (4,900)
- zre | | remove(posextern)
- "clr $1"
- setcc({relative2,$1}) | | | (4,900)
- zrf $1==4 | | allocate(FLT_REG)
- "clrf %[a]" | %[a] | | (2,2200)
- zrf $1==8 | | allocate(DBL_REG)
- "clrf %[a]" | %[a] | | (2,2400)
- zrf !defined($1)| | | | zer |
- zrf defined($1) | | | | zer $1 |
- zer $1==2 | | | {CONST2, 0} | |
- zer $1==4 | | | {CONST2,0} {CONST2,0} | |
- zer $1==6 | | | {CONST2,0} {CONST2,0}
- {CONST2,0} | |
- zer $1==8 | | | {CONST2,0} {CONST2,0}
- {CONST2, 0} {CONST2,0} | |
- zer defined($1) | | remove(all)
- move({CONST2,$1/2},r0)
- "1:\tclr -(sp)"
- "sob r0,1b"
- erase(r0) | | |(8,1500+$1*375)
- zer !defined($1)| SCR_REG |
- remove(all)
- "asr %[1]"
- "1:\tclr -(sp)"
- "sob %[1],1b"
- erase(%[1]) | | |
- /****************************************
- * Group 8 : Convert instructions *
- ****************************************/
- #ifdef UNTESTED
- cii | | remove(all)
- "jsr pc,cii~" | | |
- cfi | | | | cfu |
- cfu | | remove(ALL)
- "jsr pc,cfi~" | | |
- cif | | remove(ALL)
- "jsr pc,cif~" | | |
- cuf | | remove(ALL)
- "jsr pc,cuf~" | | |
- cff | | remove(ALL)
- "jsr pc,cff~" | | |
- ciu | | | | cuu |
- cui | | | | cuu |
- cuu | | remove(all)
- "jsr pc,cuu~" | | |
- #endif
- loc loc cii $1==1 && $2==2 | source1or2 |
- allocate(%[1],REG)
- "movb %[1],%[a]"
- /* movb does sign extend if dest is register */
- | %[a] | |
- loc loc cii $1==1 && $2==4 | source1or2 |
- allocate(%[1],REG,REG)
- "movb %[1],%[a]"
- "sxt %[b]"
- | %[a] %[b] | |
- loc loc cii $1==2 && $2==4 | source2 |
- allocate(%[1],REG,REG)
- move(%[1],%[a])
- test(%[a])
- "sxt %[b]"
- | %[a] %[b] | |
- loc loc loc cii $1>=0 && $2==2 && $3==4 | | | | loc $1 loc 0 |
- loc loc loc cii $1< 0 && $2==2 && $3==4 | | | | loc $1 loc 0-1 |
- loc loc cii $1==4 && $2==2 | source2 source2 | | %[2] | |
- loc loc ciu | | | | loc $1 loc $2 cuu |
- loc loc cui | | | | loc $1 loc $2 cuu |
- loc loc cuu $1==2 && $2==4 | | | {CONST2,0} | |
- loc loc cuu $1==4 && $2==2 | source2 | | | |
- loc loc cuu $1==$2 | | | | |
- loc loc cfi | | | | loc $1 loc $2 cfu |
- loc loc cfu $1==4 && $2==2 | FLT_REG | | {ftoint,%[1]} | |
- loc loc cfu $1==4 && $2==4 | FLT_REG | | {ftolong,%[1]} | |
- loc loc cfu $1==8 && $2==2 | DBL_REG | | {ftoint,%[1]} | |
- loc loc cfu $1==8 && $2==4 | DBL_REG | | {ftolong,%[1]} | |
- loc loc cif $1==2 && $2==4 | source2 |
- allocate(FLT_REG)
- "movif %[1],%[a]"
- samecc
- | %[a] | |
- loc loc cif $1==2 && $2==8 | source2 |
- allocate(DBL_REG)
- "movif %[1],%[a]"
- samecc
- | %[a] | |
- loc loc cif $1==4 && $2==4 | NC long4-REG_PAIR |
- allocate(FLT_REG)
- "setl"
- "movif %[1],%[a]"
- "seti"
- samecc
- | %[a] | |
- ... | | remove(all)
- allocate(FLT_REG)
- "setl"
- "movif (sp)+,%[a]"
- "seti"
- samecc
- | %[a] | |
- loc loc cif $1==4 && $2==8 | NC long4-REG_PAIR |
- allocate(DBL_REG)
- "setl"
- "movif %[1],%[a]"
- "seti"
- samecc
- | %[a] | |
- ... | | remove(all)
- allocate(DBL_REG)
- "setl"
- "movif (sp)+,%[a]"
- "seti"
- samecc
- | %[a] | |
- loc loc cuf $1==2 && $2==4 | |
- remove(all)
- allocate(FLT_REG)
- "clr -(sp)"
- "setl"
- "movif (sp)+,%[a]"
- "seti"
- | %[a] | |
- loc loc cuf $1==2 && $2==8 | |
- remove(all)
- allocate(DBL_REG)
- "clr -(sp)"
- "setl"
- "movif (sp)+,%[a]"
- "seti"
- | %[a] | |
- loc loc cuf $1==4 && ($2==8 || $2==4) | | | | loc $1 loc $2 cif |
- loc loc cff $1==4 && $2==8 | longf4 - FLT_REG |
- allocate(DBL_REG)
- "movof %[1],%[a]"
- samecc
- | %[a] | |
- ... | FLT_REG |
- allocate(DBL_REG)
- move(%[1],%[a.1])
- samecc | %[a] | |
- loc loc cff $1==8 && $2==4 | DBL_REG | | %[1.1] | |
- /****************************************
- * Group 9 : Logical instructions *
- ****************************************/
- and $1==2 | CONST2 SCR_REG |
- "bic $$%(~%[1.num]%),%[2]"
- setcc(%[2])
- erase(%[2]) | %[2] | | (4,750)
- ... | SCR_REG CONST2 |
- "bic $$%(~%[2.num]%),%[1]"
- setcc(%[1])
- erase(%[1]) | %[1] | | (4,750)
- ... | SCR_REG SCR_REG |
- "com %[1]"
- "bic %[1],%[2]"
- setcc(%[2])
- erase(%[1]) erase(%[2]) | %[2] | | (4,600)
- ldc and $2==4 && highw(1)==0 | source2 SCR_REG |
- "bic $$%(~loww(1)%),%[2]"
- erase(%[2]) | %[2] {CONST2, 0} | |
- ldc and $2==4 && highw(1)==0-1 | source2 SCR_REG |
- "bic $$%(~loww(1)%),%[2]"
- erase(%[2]) | %[2] %[1] | |
- ldc and $2==4 | SCR_REG SCR_REG |
- "bic $$%(~highw(1)%),%[1]"
- "bic $$%(~loww(1)%),%[2]"
- erase(%[1]) erase(%[2]) | %[2] %[1] | |
- and defined($1) | | remove(all)
- move({CONST2,$1}, r0)
- "jsr pc,and~"
- erase(r0) | | |
- and !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,and~"
- erase(r0) | | |
- ior $1==2 | SCR_REG source2 |
- "bis %[2],%[1]"
- setcc(%[1])
- erase(%[1]) | %[1] | | (2,450)+%[2]
- ... | source2 SCR_REG |
- "bis %[1],%[2]"
- setcc(%[2])
- erase(%[2]) | %[2] | | (2,450)+%[1]
- ldc ior $2==4 && highw(1)==0 | source2 SCR_REG |
- "bis $$%(loww(1)%),%[2]"
- erase(%[2]) | %[2] %[1] | |
- ldc ior $2==4 && highw(1)==0-1 | source2 SCR_REG |
- "bis $$%(loww(1)%),%[2]"
- erase(%[2]) | {CONST2, 0-1} %[1] | |
- ldc ior $2==4 | SCR_REG SCR_REG |
- "bis $$%(highw(1)%),%[1]"
- "bis $$%(loww(1)%),%[2]"
- erase(%[1]) erase(%[2]) | %[2] %[1] | |
- ior $1==8 | NC source2 source2 source2 source2 |
- remove(all)
- "bis %[1],(sp)"
- "bis %[2],2(sp)"
- "bis %[3],4(sp)"
- "bis %[4],6(sp)" | | |
- ... | | remove(all)
- allocate(REG={CONST2,$1})
- "add sp,%[a]"
- "bis (sp)+,(%[a])+"
- "bis (sp)+,(%[a])+"
- "bis (sp)+,(%[a])+"
- "bis (sp)+,(%[a])+"
- erase(%[a]) | | |
- ior defined($1) | | remove(all)
- allocate(REG={CONST2,$1},REG={CONST2,$1/2})
- "add sp,%[a]"
- "1:\tbis (sp)+,(%[a])+"
- "sob %[b],1b"
- erase(%[a]) erase(%[b]) | | | (12,2100+$1*975)
- ior !defined($1)| SCR_REG |
- remove(all)
- allocate(REG=%[1])
- "asr %[1]"
- "add sp,%[a]"
- "1:\tbis (sp)+,(%[a])+"
- "sob %[1],1b"
- erase(%[1]) erase(%[a]) | | |
- xor $1==2 | REG SCR_REG |
- "xor %[1],%[2]"
- setcc(%[2])
- erase(%[2]) | %[2] | | (2,300)
- ... | SCR_REG REG |
- "xor %[2],%[1]"
- setcc(%[1])
- erase(%[1]) | %[1] | | (2,300)
- xor defined($1) | | remove(all)
- move({CONST2,$1},r0)
- "jsr pc,xor~"
- erase(r0) | | |
- xor !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,xor~"
- erase(r0) | | |
- com $1==2 | SCR_REG |
- "com %[1]"
- setcc(%[1])
- erase(%[1]) | %[1] | | (2,300)
- com defined($1) | | remove(all)
- allocate(REG={CONST2,$1/2},REG)
- "mov sp,%[b]"
- "1:\tcom (%[b])+"
- "sob %[a],1b"
- erase(%[a]) | | | (10,1800+$1*825)
- com !defined($1)| SCR_REG |
- remove(all)
- allocate(REG)
- "asr %[1]"
- "mov sp,%[a]"
- "1:\tcom (%[a])+"
- "sob %[1],1b"
- erase(%[1]) | | |
- rol $1==2 | CONST2 SCR_ODD_REG |
- "ashc $$%(%[1.num]-16%),%[2]"
- setcc(%[2])
- erase(%[2]) | %[2] | |
- ... | SCR_REG SCR_ODD_REG |
- "sub $$16,%[1]"
- "ashc %[1],%[2]"
- setcc(%[2])
- erase(%[1]) erase(%[2]) | %[2] | |
- rol defined($1) | | remove(all)
- move({CONST2,$1},r0)
- "jsr pc,rol~"
- erase(r0) | | |
- #ifdef UNTESTED
- rol !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,rol~"
- erase(r0) | | |
- #endif
- ror $1==2 | CONST2 SCR_ODD_REG |
- "ashc $$%(0-%[1.num]%),%[2]"
- setcc(%[2])
- erase(%[2]) | %[2] | |
- ... | SCR_REG SCR_ODD_REG |
- "neg %[1]"
- "ashc %[1],%[2]"
- setcc(%[2]) erase(%[1]) erase(%[2]) | %[2] | |
- ror defined($1) | | remove(all)
- move({CONST2,$1},r0)
- "jsr pc,ror~"
- erase(r0) | | |
- #ifdef UNTESTED
- ror !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,ror~"
- erase(r0) | | |
- #endif
- com and $1==2 && $2==2 | source2 SCR_REG |
- "bic %[1],%[2]"
- setcc(%[2])
- erase(%[2]) | %[2] | | (2,450)+%[1]
- com and $1==$2 | | remove(all)
- allocate(REG={CONST2,$1},REG)
- "mov sp,%[b]"
- "add %[a],%[b]"
- "asr %[a]"
- "1:\tbic (sp)+,(%[b])+"
- "sob %[a],1b"
- erase(%[a]) | | | (12,2100+$1*975)
- /********************************
- * Group 10 : Set instructions *
- ********************************/
- inn $1==2 | SCR_REG SCR_REG |
- "neg %[1]"
- "ash %[1],%[2]"
- "bic $$177776,%[2]"
- erase(%[1]) erase(%[2]) | %[2] | |
- loc inn $2==2 && $1==0 | SCR_REG |
- "bic $$177776,%[1]"
- erase(%[1]) | %[1] | |
- loc inn $2==2 && $1==1 | SCR_REG |
- "asr %[1]"
- "bic $$177776,%[1]"
- erase(%[1]) | %[1] | |
- loc inn $2==2 | SCR_REG |
- "ash $$%(0-$1%),%[1]"
- "bic $$177776,%[1]"
- erase(%[1]) | %[1] | |
- loc inn zeq $2==2 | | | {CONST2, 1<<$1} | and 2 zeq $3 |
- inn zeq $1==2 | source2 |
- allocate(REG={CONST2,1})
- "ash %[1],%[a]" | %[a] | and 2 zeq $2 |
- loc inn zne $2==2 | | | {CONST2, 1<<$1} | and 2 zne $3 |
- inn zne $1==2 | source2 |
- allocate(REG={CONST2,1})
- "ash %[1],%[a]" | %[a] | and 2 zne $2 |
- inn defined($1) | source2 |
- remove(all)
- move(%[1],r1)
- move({CONST2,$1},r0)
- "jsr pc,inn~"
- erase(r01) | r0 | |
- #ifdef UNTESTED
- inn !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "mov (sp)+,r1"
- "jsr pc,inn~"
- erase(r01) | r0 | |
- #endif
- set $1==2 | REG |
- allocate(REG={CONST2,1})
- "ash %[1],%[a]"
- erase(%[a]) | %[a] | |
- set defined($1) | source2 |
- remove(all)
- move(%[1],r1)
- move({CONST2,$1},r0)
- "jsr pc,set~"
- erase(r01) | | |
- set !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "mov (sp)+,r1"
- "jsr pc,set~"
- erase(r01) | | |
- /****************************************
- * Group 11 : Array instructions *
- ****************************************/
- lae aar $2==2 && rom(1,3)==1 && rom(1,1)==0 | | | | adi 2 |
- lae aar $2==2 && rom(1,3)==1 && rom(1,1)!=0 | | | | adi 2 adp 0-rom(1,1) |
- lae aar $2==2 && rom(1,3)==2 && rom(1,1)==0 | SCR_REG |
- "asl %[1]"
- erase(%[1]) | %[1] | adi 2 |
- lae aar $2==2 && rom(1,3)==2 && rom(1,1)!=0 | SCR_REG |
- "asl %[1]"
- erase(%[1]) |
- {regconst2,%[1],tostring((0-2)*rom(1,1))} |
- adi 2 |
- lae aar $2==2 && rom(1,3)==4 && rom(1,1)==0 | SCR_REG |
- "ash $$2,%[1]"
- erase(%[1]) |
- %[1] |
- adi 2 |
- lae aar $2==2 && rom(1,3)==4 && rom(1,1)!=0 | SCR_REG |
- "ash $$2,%[1]"
- erase(%[1]) |
- {regconst2,%[1],tostring((0-4)*rom(1,1))} |
- adi 2 |
- lae aar $2==2 && rom(1,3)==8 && rom(1,1)==0 | SCR_REG |
- "ash $$3,%[1]"
- erase(%[1]) |
- %[1] |
- adi 2 |
- lae aar $2==2 && rom(1,3)==8 && rom(1,1)!=0 | SCR_REG |
- "ash $$3,%[1]"
- erase(%[1]) |
- {regconst2,%[1],tostring((0-8)*rom(1,1))} |
- adi 2 |
- lae aar $2==2 && rom(1,1)==0 | SCR_ODD_REG |
- "mul $$%(rom(1,3)%),%[1]"
- erase(%[1]) |
- %[1] |
- adi 2 |
- lae aar $2==2 && defined(rom(1,1)) | SCR_ODD_REG |
- "mul $$%(rom(1,3)%),%[1]"
- erase(%[1]) |
- {regconst2,%[1],tostring((0-rom(1,3))*rom(1,1))} |
- adi 2 |
- aar $1==2 | |
- remove(all)
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jsr pc,aar~"
- erase(r01) | | |
- #ifdef UNTESTED
- aar !defined($1) | | remove(all)
- "jsr pc,iaar~" | | |
- #endif
- lae sar defined(rom(1,3)) | | | | lae $1 aar $2 sti rom(1,3) |
- lae lar defined(rom(1,3)) | | | | lae $1 aar $2 loi rom(1,3) |
- sar $1==2 | |
- remove(all)
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jsr pc,sar~"
- erase(r01) | | |
- #ifdef UNTESTED
- sar !defined($1) | | remove(all)
- "jsr pc,isar~" | | |
- #endif
- lar $1==2 | |
- remove(all)
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jsr pc,lar~"
- erase(r01) | | |
- #ifdef UNTESTED
- lar !defined($1) | | remove(all)
- "jsr pc,ilar~" | | |
- #endif
- /****************************************
- * group 12 : Compare instructions *
- ****************************************/
- cmi $1==2 | source2 SCR_REG |
- "sub %[1],%[2]"
- setcc(%[2])
- erase(%[2]) | %[2] | |
- ... | SCR_REG source2 |
- "sub %[2],%[1]"
- "neg %[1]"
- setcc(%[1])
- erase(%[1]) | %[1] | |
- ldc cmi zlt highw(1)==0 && loww(1)==0 && $2==4 | source2 source2 |
- | %[1] | zlt $3 |
- ldc cmi zge highw(1)==0 && loww(1)==0 && $2==4 | source2 source2 |
- | %[1] | zge $3 |
- cmi $1==4 | | remove(all)
- "jsr pc,cmi4~" | r0 | |
- #ifdef UNTESTED
- cmi !defined($1) | source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,cmi~"
- erase(r0) | r0 | |
- #endif
- cmf defined($1) | | remove(ALL)
- move({CONST2,$1},r0)
- "jsr pc,cmf~"
- erase(r0) | r0 | |
- #ifdef UNTESTED
- cmf !defined($1)| source2 |
- remove(ALL)
- move(%[1],r0)
- "jsr pc,cmf~"
- erase(r0) | r0 | |
- #endif
- cmu $1==2 | | | | cmp |
- cmu $1==4 | | remove(all)
- "jsr pc,cmu4~" | r0 | |
- cmu defined($1) | | remove(all)
- move({CONST2,$1},r0)
- "jsr pc,cmu~" | r0 | |
- #ifdef UNTESTED
- cmu !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,cmu~"
- erase(r0) | r0 | |
- #endif
- cms $1==2 | | | | cmi $1 |
- ldc cms zeq $2==4 && loww(1)==0 && highw(1)==0 | source2 SCR_REG |
- remove(all)
- "bis %[1],%[2]"
- "jeq $3" | | |
- ldc cms zne $2==4 && loww(1)==0 && highw(1)==0 | source2 SCR_REG |
- remove(all)
- "bis %[1],%[2]"
- "jne $3" | | |
- ldc cms zeq $2==4 | source2 source2 |
- remove(all)
- "cmp $$%(loww(1)%),%[2]"
- "bne 1f"
- "cmp $$%(highw(1)%),%[1]"
- "jeq $3"
- "1:" | | |
- ldc cms zne $2==4 | source2 source2 |
- remove(all)
- "cmp $$%(loww(1)%),%[2]"
- "jne $3"
- "cmp $$%(highw(1)%),%[1]"
- "jne $3" | | |
- cms defined($1) | | remove(all)
- move({CONST2,$1},r0)
- "jsr pc,cms~"
- erase(r0) | r0 | |
- #ifdef UNTESTED
- cms !defined($1)| source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,cms~"
- erase(r0) | r0 | |
- #endif
- cmp | source2 source2 |
- allocate(REG = {CONST2,0})
- "cmp %[1],%[2]"
- "beq 2f"
- "bhi 1f"
- "inc %[a]"
- "br 2f"
- "1:\tdec %[a]\n2:"
- setcc(%[a])
- erase(%[a]) | %[a] | |
- tlt and $2==2 | source2 SCR_REG |
- test(%[1])
- "blt 1f"
- "clr %[2]\n1:"
- erase(%[2]) | %[2] | |
- tlt ior $2==2 | source2 SCR_REG |
- test(%[1])
- "bge 1f"
- "bis $$1,%[2]\n1:"
- erase(%[2]) | %[2] | |
- tlt | source2 |
- allocate(REG={CONST2,0})
- test(%[1])
- "bge 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- tle and $2==2 | source2 SCR_REG |
- test(%[1])
- "ble 1f"
- "clr %[2]\n1:"
- erase(%[2]) | %[2] | |
- tle ior $2==2 | source2 SCR_REG |
- test(%[1])
- "bgt 1f"
- "bis $$1,%[2]\n1:"
- erase(%[2]) | %[2] | |
- tle | source2 |
- allocate(REG={CONST2,0})
- test(%[1])
- "bgt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- teq and $2==2 | source1or2 SCR_REG |
- test(%[1])
- "beq 1f"
- "clr %[2]\n1:"
- erase(%[2]) | %[2] | |
- teq ior $2==2 | source1or2 SCR_REG |
- test(%[1])
- "bne 1f"
- "bis $$1,%[2]\n1:"
- erase(%[2]) | %[2] | |
- teq | source1or2 |
- allocate(REG={CONST2,0})
- test(%[1])
- "bne 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- tne and $2==2 | source1or2 SCR_REG |
- test(%[1])
- "bne 1f"
- "clr %[2]\n1:"
- erase(%[2]) | %[2] | |
- tne ior $2==2 | source1or2 SCR_REG |
- test(%[1])
- "beq 1f"
- "bis $$1,%[2]\n1:"
- erase(%[2]) | %[2] | |
- tne | source1or2 |
- allocate(REG={CONST2,0})
- test(%[1])
- "beq 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- tgt and $2==2 | source2 SCR_REG |
- test(%[1])
- "bgt 1f"
- "clr %[2]\n1:"
- erase(%[2]) | %[2] | |
- tgt ior $2==2 | source2 SCR_REG |
- test(%[1])
- "ble 1f"
- "bis $$1,%[2]\n1:"
- erase(%[2]) | %[2] | |
- tgt | source2 |
- allocate(REG={CONST2,0})
- test(%[1])
- "ble 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- tge and $2==2 | source2 SCR_REG |
- test(%[1])
- "bge 1f"
- "clr %[2]\n1:"
- erase(%[2]) | %[2] | |
- tge ior $2==2 | source2 SCR_REG |
- test(%[1])
- "blt 1f"
- "bis $$1,%[2]\n1:"
- erase(%[2]) | %[2] | |
- tge | source2 |
- allocate(REG={CONST2,0})
- test(%[1])
- "blt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- and tne $1==2 | source2 source2 |
- allocate(REG={CONST2,0})
- "bit %[1],%[2]"
- "beq 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- and teq $1==2 | source2 source2 |
- allocate(REG={CONST2,0})
- "bit %[1],%[2]"
- "bne 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmi tlt and $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "blt 1f"
- "clr %[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tlt ior $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "bge 1f"
- "bis $$1,%[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tlt $1==2 | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "bge 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmi tle and $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "ble 1f"
- "clr %[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tle ior $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "bgt 1f"
- "bis $$1,%[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tle $1==2 | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "bgt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmi teq and $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "beq 1f"
- "clr %[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi teq ior $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "bne 1f"
- "bis $$1,%[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi teq $1==2 | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "bne 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- loc cmi teq and $1>=0 && $1<=127 && $2==2 && $4==2 | NC source1 SCR_REG |
- "cmpb %[1],$$$1"
- "beq 1f"
- "clr %[2]\n1:"
- erase(%[2]) | %[2] | |
- ... | | | {CONST2, $1} | cmi 2 teq and 2 |
- loc cmi teq ior $1>=0 && $1<=127 && $2==2 && $4==2 | NC source1 SCR_REG |
- "cmpb %[1],$$$1"
- "bne 1f"
- "bis $$1,%[2]\n1:"
- erase(%[2]) | %[2] | |
- ... | | | {CONST2, $1} | cmi 2 teq ior 2 |
- loc cmi teq $1>=0 && $1<=127 && $2==2 | NC source1 |
- allocate(REG={CONST2,0})
- "cmpb %[1],$$$1"
- "bne 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- ... | | | {CONST2, $1} | cmi 2 teq |
- cmi tne and $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "bne 1f"
- "clr %[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tne ior $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "beq 1f"
- "bis $$1,%[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tne $1==2 | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "beq 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- loc cmi tne and $1>=0 && $1<=127 && $2==2 && $4==2 | NC source1 SCR_REG |
- "cmpb %[1],$$$1"
- "bne 1f"
- "clr %[2]\n1:"
- erase(%[2]) | %[2] | |
- ... | | | {CONST2, $1} | cmi 2 tne and 2 |
- loc cmi tne ior $1>=0 && $1<=127 && $2==2 && $4==2 | NC source1 SCR_REG |
- "cmpb %[1],$$$1"
- "beq 1f"
- "bis $$1,%[2]\n1:"
- erase(%[2]) | %[2] | |
- ... | | | {CONST2, $1} | cmi 2 tne ior 2 |
- loc cmi tne $1>=0 && $1<=127 && $2==2 | NC source1 |
- allocate(REG={CONST2,0})
- "cmpb %[1],$$$1"
- "beq 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- ... | | | {CONST2, $1} | cmi 2 tne |
- cmi tge and $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "bge 1f"
- "clr %[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tge ior $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "blt 1f"
- "bis $$1,%[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tge $1==2 | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "blt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmi tgt and $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "bgt 1f"
- "clr %[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tgt ior $1==2 && $3==2 | source2 source2 SCR_REG |
- "cmp %[2],%[1]"
- "ble 1f"
- "bis $$1,%[3]\n1:"
- erase(%[3]) | %[3] | |
- cmi tgt $1==2 | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "ble 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmp tlt | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "bhis 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmp tle | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "bhi 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmp teq | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "bne 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmp tne | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "beq 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmp tge | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "blo 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmp tgt | source2 source2 |
- allocate(REG={CONST2,0})
- "cmp %[2],%[1]"
- "blos 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tlt $1==4 | FLT_REG FLT_REG |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "bge 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tle $1==4 | FLT_REG FLT_REG |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "bgt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf teq $1==4 | FLT_REG FLT_REG |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "bne 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tne $1==4 | FLT_REG FLT_REG |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "beq 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tgt $1==4 | FLT_REG FLT_REG |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "ble 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tge $1==4 | FLT_REG FLT_REG |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "blt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tlt $1==8 | DBL_REG double8 |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "bge 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- ... | double8 DBL_REG |
- allocate(REG={CONST2,0})
- "cmpf %[1],%[2]\ncfcc"
- "ble 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tle $1==8 | DBL_REG double8 |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "bgt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- ... | double8 DBL_REG |
- allocate(REG={CONST2,0})
- "cmpf %[1],%[2]\ncfcc"
- "blt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf teq $1==8 | DBL_REG double8 |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "bne 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- ... | double8 DBL_REG |
- allocate(REG={CONST2,0})
- "cmpf %[1],%[2]\ncfcc"
- "bne 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tne $1==8 | DBL_REG double8 |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "beq 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- ... | double8 DBL_REG |
- allocate(REG={CONST2,0})
- "cmpf %[1],%[2]\ncfcc"
- "beq 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tgt $1==8 | DBL_REG double8 |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "ble 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- ... | double8 DBL_REG |
- allocate(REG={CONST2,0})
- "cmpf %[1],%[2]\ncfcc"
- "bge 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- cmf tge $1==8 | DBL_REG double8 |
- allocate(REG={CONST2,0})
- "cmpf %[2],%[1]\ncfcc"
- "blt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- ... | double8 DBL_REG |
- allocate(REG={CONST2,0})
- "cmpf %[1],%[2]\ncfcc"
- "bgt 1f"
- "inc %[a]\n1:"
- erase(%[a]) | %[a] | |
- /****************************************
- * Group 13 : Branch instructions *
- ****************************************/
- bra | | remove(all)
- "jbr $1"
- samecc | | |
- blt | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jlt $1" | | |
- ble | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jle $1" | | |
- beq | NC source1 source1 |
- remove(all)
- "cmpb %[2],%[1]"
- "jeq $1" | | |
- ... | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jeq $1" | | |
- bne | NC source1 source1 |
- remove(all)
- "cmpb %[2],%[1]"
- "jne $1" | | |
- ... | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jne $1" | | |
- bge | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jge $1" | | |
- bgt | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jgt $1" | | |
- loc beq $1>=0 && $1<=127 | NC source1 |
- remove(all)
- "cmpb %[1],$$$1"
- "jeq $2" | | |
- ... | | | {CONST2, $1} | beq $2 |
- loc bne $1>=0 && $1<=127 | NC source1 |
- remove(all)
- "cmpb %[1],$$$1"
- "jne $2" | | |
- ... | | | {CONST2, $1} | bne $2 |
- zlt | source2 |
- remove(all)
- test(%[1])
- "jlt $1"
- samecc | | |
- zle | source2 |
- remove(all)
- test(%[1])
- "jle $1"
- samecc | | |
- zeq | source1or2 |
- remove(all)
- test(%[1])
- "jeq $1"
- samecc | | |
- zne | source1or2 |
- remove(all)
- test(%[1])
- "jne $1"
- samecc | | |
- zge | source2 |
- remove(all)
- test(%[1])
- "jge $1"
- samecc | | |
- zgt | source2 |
- remove(all)
- test(%[1])
- "jgt $1"
- samecc | | |
- cmp zlt | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jlo $2" | | |
- cmp zle | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jlos $2" | | |
- cmp zeq | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jeq $2" | | |
- cmp zne | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jne $2" | | |
- cmp zgt | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jhi $2" | | |
- cmp zge | source2 source2 |
- remove(all)
- "cmp %[2],%[1]"
- "jhis $2" | | |
- cmf zlt $1==4 | FLT_REG FLT_REG |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jlt $2" | | |
- cmf zle $1==4 | FLT_REG FLT_REG |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jle $2" | | |
- cmf zeq $1==4 | FLT_REG FLT_REG |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jeq $2" | | |
- cmf zne $1==4 | FLT_REG FLT_REG |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jne $2" | | |
- cmf zgt $1==4 | FLT_REG FLT_REG |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jgt $2" | | |
- cmf zge $1==4 | FLT_REG FLT_REG |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jge $2" | | |
- cmf zlt $1==8 | DBL_REG double8 |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jlt $2" | | |
- ... | double8 DBL_REG |
- remove(all)
- "cmpf %[1],%[2]\ncfcc"
- "jgt $2" | | |
- cmf zle $1==8 | DBL_REG double8 |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jle $2" | | |
- ... | double8 DBL_REG |
- remove(all)
- "cmpf %[1],%[2]\ncfcc"
- "jge $2" | | |
- cmf zeq $1==8 | DBL_REG double8 |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jeq $2" | | |
- ... | double8 DBL_REG |
- remove(all)
- "cmpf %[1],%[2]\ncfcc"
- "jeq $2" | | |
- cmf zne $1==8 | DBL_REG double8 |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jne $2" | | |
- ... | double8 DBL_REG |
- remove(all)
- "cmpf %[1],%[2]\ncfcc"
- "jne $2" | | |
- cmf zgt $1==8 | DBL_REG double8 |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jgt $2" | | |
- ... | double8 DBL_REG |
- remove(all)
- "cmpf %[1],%[2]\ncfcc"
- "jlt $2" | | |
- cmf zge $1==8 | DBL_REG double8 |
- remove(all)
- "cmpf %[2],%[1]\ncfcc"
- "jge $2" | | |
- ... | double8 DBL_REG |
- remove(all)
- "cmpf %[1],%[2]\ncfcc"
- "jle $2" | | |
- and zeq $1==2 | source1 source1or2 |
- remove(all)
- "bitb %[1],%[2]"
- "jeq $2" | | |
- ... | source1or2 source1 |
- remove(all)
- "bitb %[1],%[2]"
- "jeq $2" | | |
- ... | source2 source2 |
- remove(all)
- "bit %[1],%[2]"
- "jeq $2" | | |
- and zne $1==2 | source1 source1or2 |
- remove(all)
- "bitb %[1],%[2]"
- "jne $2" | | |
- ... | source1or2 source1 |
- remove(all)
- "bitb %[1],%[2]"
- "jne $2" | | |
- ... | source2 source2 |
- remove(all)
- "bit %[1],%[2]"
- "jne $2" | | |
- /************************************************
- * group 14 : Procedure call instructions *
- ************************************************/
- cal | | remove(ALL)
- "jsr pc,$1" | | |
- cai | REG | remove(ALL)
- "jsr pc,(%[1])" | | |
- lfr $1==2 | | | r0 | |
- lfr $1==4 | | | r1 r0 | |
- lfr $1==8 | | | {relative8,"retar"} | |
- lfr | | remove(all)
- move({CONST2,$1},r0)
- "jsr pc,lfr~"
- erase(r0) | | |
- lfr ret $1==$2 | | | | ret 0 |
- #ifndef REGVARS
- asp lfr ret $2==$3 | | | | ret 0 |
- asp ret $2==0 | | | | ret 0 |
- #endif
- ret $1==0 | | remove(all)
- #ifdef REGVARS
- return | | |
- #else
- "mov r5,sp\nmov (sp)+,r5\nrts pc" | | |
- #endif
- ret $1==2 | source2 |
- remove(all)
- move(%[1],r0)
- #ifdef REGVARS
- return | | |
- #else
- "mov r5,sp\nmov (sp)+,r5\nrts pc" | | |
- #endif
- ret $1==4 | |
- remove(all)
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- #ifdef REGVARS
- return | | |
- #else
- "mov r5,sp\nmov (sp)+,r5\nrts pc" | | |
- #endif
- ret $1==8 | | | {ADDR_EXTERNAL, "retar"} | sti 8 ret 0 |
- ret | | remove(all)
- move({CONST2,$1},r0)
- "jmp ret~" | | |
- /************************************************
- * Group 15 : Miscellaneous instructions *
- ************************************************/
- asp $1==2 | NC xsource2 | | | |
- ... | | remove(all)
- "tst (sp)+" | | |
- asp $1==4 | | remove(all)
- "cmp (sp)+,(sp)+" | | |
- asp $1==0-2 | | remove(all)
- "tst -(sp)" | | |
- asp | | remove(all)
- "add $$$1,sp" | | |
- ass $1==2 | | remove(all)
- "add (sp)+,sp" | | |
- #ifdef UNTESTED
- ass !defined($1)| source2 |
- remove(all)
- "cmp %[1],$$2"
- "beq 1f;jmp unknown~;1:"
- "add (sp)+,sp" | | |
- #endif
- blm $1==4 | SCR_REG SCR_REG |
- "mov (%[2])+,(%[1])+"
- "mov (%[2]),(%[1])"
- erase(%[1]) erase(%[2]) | | |
- blm $1==6 | SCR_REG SCR_REG |
- "mov (%[2])+,(%[1])+"
- "mov (%[2])+,(%[1])+"
- "mov (%[2]),(%[1])"
- erase(%[1]) erase(%[2]) | | |
- blm $1==8 | SCR_REG SCR_REG |
- "mov (%[2])+,(%[1])+"
- "mov (%[2])+,(%[1])+"
- "mov (%[2])+,(%[1])+"
- "mov (%[2]),(%[1])"
- erase(%[1]) erase(%[2]) | | |
- blm | SCR_REG SCR_REG |
- allocate(REG={CONST2,$1/2})
- "1:mov (%[2])+,(%[1])+\nsob %[a],1b"
- erase(%[1]) erase (%[2]) erase(%[a]) | | |
- bls $1==2 | SCR_REG SCR_REG SCR_REG |
- "asr %[1]\nbeq 2f"
- "1:mov (%[3])+,(%[2])+\nsob %[1],1b\n2:"
- erase(%[1]) erase (%[2]) erase(%[3]) | | |
- #ifdef UNTESTED
- bls !defined($1)| source2 SCR_REG SCR_REG SCR_REG |
- remove(all)
- "cmp %[1],$$2"
- "beq 1f;jmp unknown~;1:"
- "asr %[2]\nbeq 2f"
- "1:mov (%[4])+,(%[3])+\nsob %[2],1b\n2:"
- erase(%[2]) erase (%[3]) erase(%[4]) | | |
- #endif
- lae csa $2==2 | source2 |
- remove(all)
- move(%[1],r1)
- move({ADDR_EXTERNAL,$1},r0)
- "jmp csa~" | | |
- csa $1==2 | |
- remove(all)
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jmp csa~" | | |
- #ifdef UNTESTED
- csa !defined($1)| source2 |
- remove(all)
- "cmp %[1],$$2"
- "beq 1f;jmp unknown~;1:"
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jmp csa~" | | |
- #endif
- lae csb $2==2 | NC source2 |
- remove(all)
- move(%[1],r1)
- move({ADDR_EXTERNAL,$1},r0)
- "jmp csb~" | | |
- ... | |
- remove(all)
- move({ADDR_EXTERNAL,$1},r0)
- "mov (sp)+,r1"
- "jmp csb~" | | |
- csb $1==2 | |
- remove(all)
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jmp csb~" | | |
- #ifdef UNTESTED
- csb !defined($1)| source2 |
- remove(all)
- "cmp %[1],$$2"
- "beq 1f;jmp unknown~;1:"
- "mov (sp)+,r0"
- "mov (sp)+,r1"
- "jmp csb~" | | |
- #endif
- dup $1==2 | REG | | %[1] %[1] | |
- dup $1==4 | NC longf4 | | %[1] %[1] | |
- ... | source2 source2 | | %[2] %[1] %[2] %[1] | |
- dup $1==8 | NC double8| | %[1] %[1] | |
- ... | | remove(all)
- move({CONST2, $1}, r0)
- "jsr pc,dup~"
- erase(r01) | | |
- dup | | remove(all)
- move({CONST2, $1}, r0)
- "jsr pc,dup~"
- erase(r01) | | |
- dus $1==2 | source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,dup~"
- erase(r01) | | |
- #ifdef UNTESTED
- dus !defined($1)| source2 |
- remove(all)
- "cmp %[1],$$2"
- "beq 1f;jmp unknown~;1:"
- "mov (sp)+,r0"
- "jsr pc,dup~"
- erase(r01) | | |
- #endif
- gto | | remove(all)
- "mov $$$1,-(sp)"
- "jmp gto~" | | |
- fil | | "mov $$$1,hol0+4" | | |
- lim | | | { relative2, "trpim~"} | |
- lin | | "mov $$$1,hol0"
- "jsr pc,_u_LiB" | | |
- lni | | "inc hol0"
- "jsr pc,_u_LiB" | | |
- lor $1==0 | | | lb | |
- lor $1==1 | | remove(all)
- allocate(REG)
- "mov sp,%[a]" | %[a] | |
- lor $1==2 | | | {relative2,"reghp~"} | |
- mon | | remove(all)
- "jsr pc,mon~" | | |
- nop | | remove(all)
- "jsr pc,nop~" | | |
- #ifdef DORCK
- rck $1==2 | source2 |
- remove(all)
- move(%[1],r0)
- "jsr pc,rck~" | | |
- #ifdef UNTESTED
- rck !defined($1)| source2 source2 |
- remove(all)
- "cmp %[1],$$2"
- "beq 1f;jmp unknown~;1:"
- move(%[2],r0)
- "jsr pc,rck~" | | |
- #endif
- #else
- rck $1==2 | source2 | | | |
- rck !defined($1)| source2 source2 | | | |
- #endif
- rtt | | | | ret 0 |
- sig | source2 |
- allocate(REG)
- move({relative2,"trppc~"},%[a])
- "mov %[1],trppc~" | %[a] | |
- sim | | remove(all)
- "jsr pc,sim~" | | |
- str $1==0 | source2 |
- "mov %[1],r5" | | |
- str $1==1 | source2 |
- remove(all)
- "mov %[1],sp" | | |
- str $1==2 | | remove(all)
- "jsr pc,strhp~" | | |
- trp | | remove(all)
- "jsr pc,trp~" | | |
- exg $1==2 | source2 source2 | | %[1] %[2] | |
- exg defined($1) | | remove(all)
- move({CONST2,$1},r0)
- "jsr pc,exg~" | | |
- exg | source2 | remove(all)
- move(%[1],r0)
- "jsr pc,exg" | | |
- lol lal sti $1==$2 && $3==1| | | | | /* throw away funny C-proc-prolog */
- /********************************
- * Coercions *
- * *
- * From EM-tokens to PDP-tokens *
- ********************************/
- | LOCAL2 | | {regind2,lb,tostring(%[1.ind])} | |
- | LOCAL4 | | {regind4,lb,tostring(%[1.ind])} | |
- /********************************
- * From source to register *
- ********************************/
- | regconst2 | allocate(%[1],REG=%[1.reg])
- "add $$%[1.ind],%[a]"
- setcc(%[a]) | %[a] | |(6,1050)
- | ADDR_LOCAL | allocate(REG)
- "mov r5,%[a]"
- "add $$%[1.ind],%[a]"
- setcc(%[a]) | %[a] | |(6,1050)
- | REG | | {regconst2, %[1], "0"} | | (2,600)
- | xsource2 | allocate(%[1], REG=%[1]) | %[a] | |
- | xsource2 | allocate(%[1], REG=%[1]) | {regconst2, %[a], "0"} | |
- | longf4 | allocate(FLT_REG)
- move( %[1],%[a]) | %[a] | | (20,20000) + %[1]
- | double8 | allocate(DBL_REG)
- move(%[1],%[a]) | %[a] | | (20,30000) + %[1]
- /********************************
- * From source1 to source2 *
- ********************************/
- | source1 | allocate(REG={CONST2,0})
- "bisb %[1],%[a]"
- erase(%[a]) setcc(%[a]) | %[a] | | (6,1050)+%[1]
- /********************************
- * From long4 to source2 *
- ********************************/
- | REG_PAIR | | %[1.2] %[1.1] | |
- | regind4 | | {regind2,%[1.reg],"2+"+%[1.ind]} {regind2,%[1.reg],%[1.ind]} | |
- | relative4 | | {relative2,"2+"+%[1.ind]} {relative2,%[1.ind]} | |
- | regdef4 | | {regind2,%[1.reg],"2"} {regdef2,%[1.reg]} | |
- | LOCAL4 | | {LOCAL2, %[1.ind]+2, 2} {LOCAL2, %[1.ind], 2} | |
- /********************************
- * from double8 to long4 *
- ********************************/
- | regind8 | | {regind4,%[1.reg],"4+"+%[1.ind]} {regind4,%[1.reg],%[1.ind]} | |
- | relative8 | | {relative4,"4+"+%[1.ind]} {relative4,%[1.ind]} | |
- | regdef8 | | {regdef4,%[1.reg]} {regind4,%[1.reg],"4"} | |
- /************************
- * From STACK coercions *
- ************************/
- | STACK | allocate(REG)
- "mov (sp)+,%[a]"
- setcc(%[a]) | %[a] | | (2,750)
- | STACK | allocate(REG)
- "mov (sp)+,%[a]"
- setcc(%[a]) | {regconst2, %[a], "0"} | | (2,750)
- | STACK | allocate(FLT_REG)
- "movof (sp)+,%[a]"
- samecc | %[a] | | (20,47400) /* /10 */
- | STACK | allocate(DBL_REG)
- "movf (sp)+,%[a]"
- samecc | %[a] | | (20,69200) /* /10 */
- | STACK | allocate(REG_PAIR)
- "mov (sp)+,%[a.1]"
- "mov (sp)+,%[a.2]"
- setcc(%[a.2]) | %[a] | | (4,1500)
- MOVES:
- (CONST2 %[num] == 0, source2, "clr %[2]" setcc(%[2]),(2,300))
- (source2, source2, "mov %[1],%[2]" setcc(%[2]),(2,300)+%[1]+%[2])
- (FLT_REG, longf4-FLT_REG,"movfo %[1],%[2]" samecc, (2,880) + %[2])
- (longf4-FLT_REG,FLT_REG, "movof %[1],%[2]" samecc, (2,1500) + %[2])
- (FLT_REG, FLT_REG, "movf %[1],%[2]" samecc,(2,880))
- (DBL_REG,double8, "movf %[1],%[2]" samecc,(2,880) + %[2])
- (double8,DBL_REG, "movf %[1],%[2]" samecc,(2,1700) + %[1])
- (CONST2 %[num] == 0,source1, "clrb %[2]" setcc(%[2]),(2,450)+%[2])
- (source1or2,source1, "movb %[1],%[2]" setcc(%[2]),(2,300)+%[1]+%[2])
- (ftoint,source2, "movfi %[1.reg],%[2]" samecc)
- TESTS:
- (source2, "tst %[1]" ,(2,300) + %[1])
- (source1, "tstb %[1]",(2,400) + %[1])
- (FLT_REG+DBL_REG, "tstf %[1]\ncfcc" ,(4,2600))
- /* (DBL_REG, "tstf %[1]\ncfcc" ,(4,2600)) */
- STACKS:
- ( CONST2 %[num]==0 ,, "clr -(sp)" )
- ( source2 ,, "mov %[1],-(sp)" setcc(%[1]), (2,900)+%[1])
- ( regconst2 ,, "mov %[1.reg],-(sp)\nadd $$%[1.ind],(sp)" , (6,2250))
- ( ADDR_LOCAL,, "mov r5,-(sp)" "add $$%[1.ind],(sp)", (6,2250))
- ( DBL_REG ,, "movf %[1],-(sp)" samecc , (2,6100))
- ( FLT_REG ,, "movfo %[1],-(sp)" samecc , (2,4120))
- ( REG_PAIR ,, "mov %[1.2],-(sp)" "mov %[1.1],-(sp)" , (4,1800))
- ( regind4 ,, "mov 2+%[1.ind](%[1.reg]),-(sp)"
- "mov %[1.ind](%[1.reg]),-(sp)" , (8,3000))
- ( relative4 ,, "mov 2+%[1.ind],-(sp)"
- "mov %[1.ind],-(sp)" , (8,3000))
- ( regdef4 ,, "mov 2(%[1.reg]),-(sp)"
- "mov (%[1.reg]),-(sp)" , (6,2700))
- ( regind8 ,REG, move(%[1.reg],%[a])
- "add $$%(8%)+%[1.ind],%[a]"
- "mov -(%[a]),-(sp)"
- "mov -(%[a]),-(sp)"
- "mov -(%[a]),-(sp)"
- "mov -(%[a]),-(sp)"
- erase(%[a]) , (14,6000))
- ( regind8 ,, "mov 6+%[1.ind](%[1.reg]),-(sp)"
- "mov 4+%[1.ind](%[1.reg]),-(sp)"
- "mov 2+%[1.ind](%[1.reg]),-(sp)"
- "mov %[1.ind](%[1.reg]),-(sp)" , (16,6000))
- ( relative8 ,REG,"mov $$%(8%)+%[1.ind],%[a]"
- "mov -(%[a]),-(sp)"
- "mov -(%[a]),-(sp)"
- "mov -(%[a]),-(sp)"
- "mov -(%[a]),-(sp)" , (12,5000))
- ( relative8 ,, "mov 6+%[1.ind],-(sp)"
- "mov 4+%[1.ind],-(sp)"
- "mov 2+%[1.ind],-(sp)"
- "mov %[1.ind],-(sp)" , (16,6000))
- ( regdef8 ,, "mov 6(%[1.reg]),-(sp)"
- "mov 4(%[1.reg]),-(sp)"
- "mov 2(%[1.reg]),-(sp)"
- "mov (%[1.reg]),-(sp)" , (14,5700))
- ( LOCAL4 ,, "mov 2+%[1.ind](r5),-(sp)"
- "mov %[1.ind](r5),-(sp)" , (8,3000))
- ( source1 ,, "clr -(sp)"
- "movb %[1],(sp)" , (4,1800)+%[1])
- ( ftoint ,, "movfi %[1.reg],-(sp)" )
- ( ftolong ,, "setl\nmovfi %[1.reg],-(sp)\nseti" )
|