1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863 |
- "$Id$"
- /********************************************************
- * 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/30
- REGISTERS:
- r0 = ("r0", 2), REG.
- r1 = ("r1", 2), REG, ODD_REG.
- #ifdef REGVARS
- r2 = ("r2", 2) regvar, RREG.
- #else
- /* r2 = ("r2", 2), REG. */
- #endif
- r3 = ("r3", 2), REG, ODD_REG.
- #ifdef REGVARS
- r4 = ("r4", 2) regvar, RREG.
- #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,30) "$%[num]"
- LOCAL2 = {INT ind,size;} 2 cost=(2,60) "%[ind](r5)"
- LOCAL4 = {INT ind,size;} 4 cost=(2,120) "%[ind](r5)"
- ADDR_LOCAL = {INT ind;} 2
- ADDR_EXTERNAL = {STRING ind;} 2 cost=(2,30) "$%[ind]"
- /********************************************************
- * Now mostly addressing modes of target machine *
- ********************************************************/
- regdef2 = {REGISTER reg;} 2 cost=(0,30) "(%[reg])"
- regind2 = {REGISTER reg; STRING ind;} 2 cost=(2,60) "%[ind](%[reg])"
- reginddef2 = {REGISTER reg; STRING ind;} 2 cost=(2,105) "*%[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,60) "%[ind]"
- reldef2 = {STRING ind;} 2 cost=(2,105) "*%[ind]"
- regdef1 = {REGISTER reg;} 2 cost=(0,30) "(%[reg])"
- regind1 = {REGISTER reg; STRING ind;} 2 cost=(2,60) "%[ind](%[reg])"
- reginddef1 = {REGISTER reg; STRING ind;} 2 cost=(2,105) "*%[ind](%[reg])"
- relative1 = {STRING ind;} 2 cost=(2,60) "%[ind]"
- reldef1 = {STRING ind;} 2 cost=(2,105) "*%[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,363) "%[ind](%[reg])"
- relative4 = {STRING ind; } 4 cost=(2,363) "%[ind]"
- regdef4 = {REGISTER reg;} 4 cost=(2,324) "(%[reg])"
- regdef8 = {REGISTER reg;} 8 cost=(2,522) "(%[reg])"
- relative8 = {STRING ind; } 8 cost=(2,561) "%[ind]"
- regind8 = {REGISTER reg; STRING ind;} 8 cost=(2,561) "%[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 = RREG + 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 + RREG + REG + regind2
- regs = RREG + 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
- register = RREG + REG
- #define INDSTORE remove(allexeptcon-locals) remove(locals, inreg(%[ind])==0)
- #else
- register = REG
- #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 | register | | {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 | register | | {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 | register | | {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 | register | | {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 | register | | {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 | register 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 | register 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 | NC dadres2 FLT_REG |
- INDSTORE
- "movfo %[2],*%[1]"
- samecc | | |
- ... | NC dadres2 ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],*%[1]\nseti"
- samecc | | |
- ... | NC regconst2 FLT_REG |
- INDSTORE
- "movfo %[2],%[1.ind](%[1.reg])"
- samecc | | |
- ... | NC regconst2 ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],%[1.ind](%[1.reg])\nseti"
- samecc | | |
- ... | NC ADDR_LOCAL FLT_REG |
- INDSTORE
- "movfo %[2],%[1.ind](r5)"
- samecc | | |
- ... | NC ADDR_LOCAL ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],%[1.ind](r5)\nseti"
- samecc | | |
- ... | NC ADDR_EXTERNAL FLT_REG |
- INDSTORE
- "movfo %[2],%[1.ind]"
- samecc | | |
- ... | NC ADDR_EXTERNAL ftolong |
- INDSTORE
- "setl\nmovfi %[2.reg],%[1.ind]\nseti"
- samecc | | |
- ... | register source2 source2 |
- INDSTORE
- move(%[2],{regdef2,%[1]})
- move(%[3],{regind2,%[1],"2"}) | | |
- ... | SCR_REG STACK |
- "mov (sp)+,(%[1])+"
- "mov (sp)+,(%[1])"
- erase(%[1]) | | | (4,204)
- sti $1==8 | NC dadres2 DBL_REG |
- INDSTORE
- "movf %[2],*%[1]"
- samecc | | |
- ... | NC regconst2 DBL_REG |
- INDSTORE
- "movf %[2],%[1.ind](%[1.reg])"
- samecc | | |
- ... | NC ADDR_LOCAL DBL_REG |
- INDSTORE
- "movf %[2],%[1.ind](r5)"
- samecc | | |
- ... | NC 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,408)
- sti | SCR_REG |
- remove(all)
- allocate(REG={CONST2,$1/2})
- "1:\tmov (sp)+,(%[1])+"
- "sob %[a],1b"
- erase(%[1]) erase(%[a]) | | | (8,150+$1*82)
- 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,45)
- ... | NC register ADDR_LOCAL |
- allocate(REG)
- "mov r5,%[a]"
- "add %[1],%[a]"
- erase(%[a]) | {regconst2,%[a],tostring(%[2.ind])} | | (4,90)
- ... | NC SCR_REG regconst2 |
- "add %[2.reg],%[1]" erase(%[1]) |
- {regconst2,%[1],%[2.ind]} | | (2,45)
- ... | NC CONST2+ADDR_EXTERNAL+ADDR_LOCAL+regconst2 SCR_REG |
- | %[1] %[2] | adi 2 |
- ... | NC source2-register CONST2+ADDR_EXTERNAL+ADDR_LOCAL |
- allocate(%[1],REG=%[1]) | %[2] %[a] | adi 2 |
- ... | NC source1 CONST2+ADDR_EXTERNAL+ADDR_LOCAL |
- allocate(REG={CONST2, 0})
- "bisb %[1],%[a]"
- erase(%[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,45)
- ... | NC regconst2 regconst2 |
- "add %[2.reg],%[1.reg]" erase(%[1.reg]) |
- {regconst2,%[1.reg],%[2.ind]+"+"+%[1.ind]} | | (2,45)
- ... | NC regconst2 noconst2 |
- "add %[2],%[1.reg]" erase(%[1.reg]) | %[1] | | (2,45)+%[2]
- ... | NC SCR_REG noconst2 |
- "add %[2],%[1]"
- setcc(%[1]) erase(%[1]) | %[1] | | (2,45)+%[2]
- ... | NC source2 regconst2 |
- "add %[1],%[2.reg]"
- erase(%[2.reg]) | %[2] | | (2,45)+%[1]
- ... | NC regconst2 source2 |
- "add %[2],%[1.reg]"
- erase(%[1.reg]) | %[1] | | (2,45)+%[2]
- ... | source2 SCR_REG |
- "add %[1],%[2]"
- setcc(%[2]) erase(%[2]) | %[2] | | (2,45)+%[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,120)+%[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,190)+%[3]
- ... | SCR_REG SCR_REG STACK |
- "add (sp)+,%[1]"
- "add (sp)+,%[2]"
- "adc %[1]"
- setcc(%[1]) erase(%[1]) erase(%[2])
- | %[2] %[1] | | (6,280)
- ... | source2 source2 SCR_REG SCR_REG |
- "add %[2],%[4]"
- "adc %[3]"
- "add %[1],%[3]"
- setcc(%[3]) erase(%[3]) erase(%[4])
- | %[4] %[3] | | (6,120)+%[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,45)+%[1]
- ... | NC SCR_REG source2-register |
- "sub %[2],%[1]"
- "neg %[1]"
- setcc(%[1]) erase(%[1]) | %[1] | | (4,75)+%[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-register source2-register SCR_REG SCR_REG |
- "sub %[2],%[4]"
- "sbc %[3]"
- "sub %[1],%[3]"
- setcc(%[3]) erase(%[3]) erase(%[4])
- | %[4] %[3] | | (6,120)+%[1]+%[2]
- ... | source2 source2 STACK |
- "sub %[2],2(sp)"
- "sbc (sp)"
- "sub %[1],(sp)" | | | (10,280)+%[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,330)+%[2]
- ... | source2 SCR_ODD_REG |
- "mul %[1],%[2]"
- setcc(%[2]) erase(%[2]) | %[2] | |(2,330)+%[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,1000)
- 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,1000)
- 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,75)
- ngi $1==4 | SCR_REG SCR_REG |
- "neg %[1]"
- "neg %[2]"
- "sbc %[1]"
- setcc(%[1]) erase(%[1]) erase(%[2])
- | %[2] %[1] | | (6,180)
- #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 | source2 xsource2 |
- allocate(%[1],%[2],REG=%[1],REG_PAIR)
- move(%[2],%[b.2])
- move({CONST2,0},%[b.1])
- "neg %[a]"
- "ashc %[a],%[b]"
- erase(%[b]) | %[b.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,500)+%[1]
- ... | SCR_FLT_REG FLT_REG |
- "addf %[2],%[1]"
- samecc erase(%[1]) | %[1] | | (2,500)+%[2]
- adf $1==8 | double8 SCR_DBL_REG |
- "addf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,600)+%[1]
- ... | SCR_DBL_REG double8 |
- "addf %[2],%[1]"
- samecc erase(%[1]) | %[1] | | (2,600)+%[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,500)+%[1]
- sbf $1==8 | double8 SCR_DBL_REG |
- "subf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,600)+%[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,700)+%[1]
- ... | SCR_FLT_REG FLT_REG |
- "mulf %[2],%[1]"
- samecc erase(%[1]) | %[1] | | (2,700)+%[2]
- mlf $1==8 | double8 SCR_DBL_REG |
- "mulf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,1000)+%[1]
- ... | SCR_DBL_REG double8 |
- "mulf %[2],%[1]"
- samecc erase(%[1]) | %[1] | | (2,1000)+%[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,800)+%[1]
- dvf $1==8 | double8 SCR_DBL_REG |
- "divf %[1],%[2]"
- samecc erase(%[2]) | %[2] | | (2,1200)+%[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,270)
- ngf $1==8 | SCR_DBL_REG |
- "negf %[1]"
- samecc erase(%[1]) | %[1] | |(2,270)
- #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,750)+%[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,1500)+%[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,500)
- fef $1==8 | DBL_REG |
- allocate(REG)
- "movei %[1],%[a]"
- "movie $$0,%[1]"
- samecc
- erase(%[1]) |%[1] %[a] | | (4,500)
- #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,90)
- #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 dup adp stl loi $1==$4 && $2==2 && inreg($1)==2 && $3==1 && $5==1 | |
- allocate(REG={CONST2, 0})
- remove(regvar($1))
- "bisb (%(regvar($1)%))+,%[a]"
- erase(%[a]) | %[a] | |
- lol dup adp stl loi loc loc cii $1==$4 && $2==2 && inreg($1)==2 && $3==1 && $5==1 && $6==1 && $7==2 | |
- allocate(REG)
- remove(regvar($1))
- "movb (%(regvar($1)%))+,%[a]"
- erase(%[a]) | %[a] | |
- lol dup adp stl loi $1==$4 && $2==2 && 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 dup adp stl $1==$4 && $2==2 && inreg($1)==2 | |
- allocate(REG=regvar($1)) | %[a]
- | lol $1 adp $3 stl $1 |
- lol dup adp stl $1==$4 && $2==2 | |
- allocate(REG={LOCAL2, $1, 2}) | %[a]
- | lol $1 adp $3 stl $1 |
- 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 dup adp ste $1==$4 && $2==2 | |
- allocate(REG={relative2, $1}) | %[a]
- | loe $1 adp $3 ste $1 |
- #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,90)
- #endif
- zrl | | remove(indordef)
- remove(locals, %[ind] <= $1 && %[ind]+%[size] > $1)
- "clr $1(r5)"
- setcc({LOCAL2,$1,2}) | | | (4,90)
- zre | | remove(posextern)
- "clr $1"
- setcc({relative2,$1}) | | | (4,90)
- zrf $1==4 | | allocate(FLT_REG)
- "clrf %[a]" | %[a] | | (2,220)
- zrf $1==8 | | allocate(DBL_REG)
- "clrf %[a]" | %[a] | | (2,240)
- 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,150+$1*37)
- 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 cfu $1==4 | FLT_REG | | {ftolong,%[1]} | loc 4 loc $2 cuu |
- loc loc cfu $1==8 | DBL_REG | | {ftolong,%[1]} | loc 4 loc $2 cuu |
- loc loc cfi $1==4 && $2==2 | FLT_REG | | {ftoint,%[1]} | |
- loc loc cfi $1==4 && $2==4 | FLT_REG | | {ftolong,%[1]} | |
- loc loc cfi $1==8 && $2==2 | DBL_REG | | {ftoint,%[1]} | |
- loc loc cfi $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,75)
- ... | SCR_REG CONST2 |
- "bic $$%(~%[2.num]%),%[1]"
- setcc(%[1])
- erase(%[1]) | %[1] | | (4,75)
- ... | SCR_REG SCR_REG |
- "com %[1]"
- "bic %[1],%[2]"
- setcc(%[2])
- erase(%[1]) erase(%[2]) | %[2] | | (4,60)
- 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,45)+%[2]
- ... | source2 SCR_REG |
- "bis %[1],%[2]"
- setcc(%[2])
- erase(%[2]) | %[2] | | (2,45)+%[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,210+$1*97)
- 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 | register SCR_REG |
- "xor %[1],%[2]"
- setcc(%[2])
- erase(%[2]) | %[2] | | (2,30)
- ... | SCR_REG register |
- "xor %[2],%[1]"
- setcc(%[1])
- erase(%[1]) | %[1] | | (2,30)
- 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,30)
- com defined($1) | | remove(all)
- allocate(REG={CONST2,$1/2},REG)
- "mov sp,%[b]"
- "1:\tcom (%[b])+"
- "sob %[a],1b"
- erase(%[a]) | | | (10,180+$1*82)
- 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,45)+%[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,210+$1*97)
- /********************************
- * Group 10 : Set instructions *
- ********************************/
- inn $1==2 | SCR_REG SCR_REG |
- "neg %[1]"
- "ash %[1],%[2]"
- "bic $$0177776,%[2]"
- erase(%[1]) erase(%[2]) | %[2] | |
- loc inn $2==2 && $1==0 | SCR_REG |
- "bic $$0177776,%[1]"
- erase(%[1]) | %[1] | |
- loc inn $2==2 && $1==1 | SCR_REG |
- "asr %[1]"
- "bic $$0177776,%[1]"
- erase(%[1]) | %[1] | |
- loc inn $2==2 | SCR_REG |
- "ash $$%(0-$1%),%[1]"
- "bic $$0177776,%[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 | register |
- 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 && defined(rom(1,3)) | SCR_ODD_REG |
- "mul $$%(rom(1,3)%),%[1]"
- erase(%[1]) |
- %[1] |
- adi 2 |
- lae aar $2==2 && defined(rom(1,3)) | 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 source2 |
- allocate(REG = {CONST2,0})
- "cmp %[1],%[2]"
- "beq 2f"
- "bgt 1f"
- "inc %[a]"
- "br 2f"
- "1:\tdec %[a]\n2:"
- setcc(%[a])
- erase(%[a]) | %[a] | |
- 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 | register | 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 | register | | %[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" | | |
- lni | | "inc hol0" | | |
- 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)
- #ifdef DEBUG
- "jsr pc,nop~"
- #endif
- | | |
- #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,105)
- | ADDR_LOCAL | allocate(REG)
- "mov r5,%[a]"
- "add $$%[1.ind],%[a]"
- setcc(%[a]) | %[a] | |(6,105)
- | register | | {regconst2, %[1], "0"} | | (2,60)
- | xsource2 | allocate(%[1], REG=%[1]) | %[a] | |
- | xsource2 | allocate(%[1], REG=%[1]) | {regconst2, %[a], "0"} | |
- | longf4 | allocate(FLT_REG)
- move( %[1],%[a]) | %[a] | | (20,2000) + %[1]
- | double8 | allocate(DBL_REG)
- move(%[1],%[a]) | %[a] | | (20,3000) + %[1]
- /********************************
- * From source1 to source2 *
- ********************************/
- | source1 | allocate(REG={CONST2,0})
- "bisb %[1],%[a]"
- erase(%[a]) setcc(%[a]) | %[a] | | (6,105)+%[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,75)
- | STACK | allocate(REG)
- "mov (sp)+,%[a]"
- setcc(%[a]) | {regconst2, %[a], "0"} | | (2,75)
- | STACK | allocate(FLT_REG)
- "movof (sp)+,%[a]"
- samecc | %[a] | | (20,4740) /* /10 */
- | STACK | allocate(DBL_REG)
- "movf (sp)+,%[a]"
- samecc | %[a] | | (20,6920) /* /10 */
- | STACK | allocate(REG_PAIR)
- "mov (sp)+,%[a.1]"
- "mov (sp)+,%[a.2]"
- setcc(%[a.2]) | %[a] | | (4,150)
- MOVES:
- (CONST2 %[num] == 0, source2, "clr %[2]" setcc(%[2]),(2,30))
- (source2, source2, "mov %[1],%[2]" setcc(%[2]),(2,30)+%[1]+%[2])
- (FLT_REG, longf4-FLT_REG,"movfo %[1],%[2]" samecc, (2,88) + %[2])
- (longf4-FLT_REG,FLT_REG, "movof %[1],%[2]" samecc, (2,150) + %[2])
- (FLT_REG, FLT_REG, "movf %[1],%[2]" samecc,(2,88))
- (DBL_REG,double8, "movf %[1],%[2]" samecc,(2,88) + %[2])
- (double8,DBL_REG, "movf %[1],%[2]" samecc,(2,170) + %[1])
- (CONST2 %[num] == 0,source1, "clrb %[2]" setcc(%[2]),(2,45)+%[2])
- (source1or2,source1, "movb %[1],%[2]" setcc(%[2]),(2,30)+%[1]+%[2])
- (ftoint,source2, "movfi %[1.reg],%[2]" samecc)
- TESTS:
- (source2, "tst %[1]" ,(2,30) + %[1])
- (source1, "tstb %[1]",(2,40) + %[1])
- (FLT_REG+DBL_REG, "tstf %[1]\ncfcc" ,(4,260))
- /* (DBL_REG, "tstf %[1]\ncfcc" ,(4,260)) */
- STACKS:
- ( CONST2 %[num]==0 ,, "clr -(sp)" )
- ( source2 ,, "mov %[1],-(sp)" setcc(%[1]), (2,90)+%[1])
- ( regconst2 ,, "mov %[1.reg],-(sp)\nadd $$%[1.ind],(sp)" , (6,225))
- ( ADDR_LOCAL,, "mov r5,-(sp)" "add $$%[1.ind],(sp)", (6,225))
- ( DBL_REG ,, "movf %[1],-(sp)" samecc , (2,610))
- ( FLT_REG ,, "movfo %[1],-(sp)" samecc , (2,412))
- ( REG_PAIR ,, "mov %[1.2],-(sp)" "mov %[1.1],-(sp)" , (4,180))
- ( regind4 ,, "mov 2+%[1.ind](%[1.reg]),-(sp)"
- "mov %[1.ind](%[1.reg]),-(sp)" , (8,300))
- ( relative4 ,, "mov 2+%[1.ind],-(sp)"
- "mov %[1.ind],-(sp)" , (8,300))
- ( regdef4 ,, "mov 2(%[1.reg]),-(sp)"
- "mov (%[1.reg]),-(sp)" , (6,270))
- ( 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,600))
- ( 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,600))
- ( relative8 ,REG,"mov $$%(8%)+%[1.ind],%[a]"
- "mov -(%[a]),-(sp)"
- "mov -(%[a]),-(sp)"
- "mov -(%[a]),-(sp)"
- "mov -(%[a]),-(sp)" , (12,500))
- ( relative8 ,, "mov 6+%[1.ind],-(sp)"
- "mov 4+%[1.ind],-(sp)"
- "mov 2+%[1.ind],-(sp)"
- "mov %[1.ind],-(sp)" , (16,600))
- ( regdef8 ,, "mov 6(%[1.reg]),-(sp)"
- "mov 4(%[1.reg]),-(sp)"
- "mov 2(%[1.reg]),-(sp)"
- "mov (%[1.reg]),-(sp)" , (14,570))
- ( LOCAL4 ,, "mov 2+%[1.ind](r5),-(sp)"
- "mov %[1.ind](r5),-(sp)" , (8,300))
- ( source1 ,, "clr -(sp)"
- "movb %[1],(sp)" , (4,180)+%[1])
- ( ftoint ,, "movfi %[1.reg],-(sp)" )
- ( ftolong ,, "setl\nmovfi %[1.reg],-(sp)\nseti" )
|