Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,219 of 2,753    |
|    Walter Banks to Remo D.    |
|    Re: optimizing an asm-like language    |
|    04 Feb 08 14:56:40    |
      From: walter@bytecraft.com              "Remo D." wrote:              > I'm now converting the ASM code to C so I can create and execute a       > comprehensive test suite and get confidence on the correctness of my       > approach.       >       > Let's get back to coding ...       >       > Remo.D.       >       > --       >       > Code for '[a-z]?n'       >       > 1 S1: GET       > 2 CMP 'n'       > 3 JGT L3       > 4 JEQ S4       > 5 CMP 'a'       > 6 RLT       > 7 JMP S2       > 8 L3: CMP 'z'       > 9 RGT       > 10 JMP S2       > 11 S4: MTC 1       > 12 GET       > 13 CMP 'n'       > 14 RNE       > 15 S3: MTC 1       > 16 RET       > 17 S2: GET       > 18 CMP 'n'       > 19 RNE       > 20 JMP S3              You might want to check common sub expression lines 13/14 and 18/19.       From experience C as an intermediate code does work quite well.              Walter Banks              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca