Mike Murphy wrote: > If you've ever looked at the ir_b2a code, you'll see that there was an idea > for ir_a2b back in the beginning, but it was never implemented. I actually > remember Fred asking me about it back at SGI, but I didn't have time and > didn't see an easy way to do it because you'd have to parse the symbol table. > Well, a while ago a colleague mentioned that this would be a nice feature, > and I started thinking about it and realized it should be doable. So in my > spare time I started working on ir_a2b. What I have now works on simple > code, but there is still lots to do. But I don't have time to finish this, > so I'm publishing what I have so far, and hoping that others will take this > and productize it. > > Attached is ir_a2b.cxx, ir_b2a.cxx, and Makefile.gbase, all in ir_tools. The > Makefile.gbase change just adds ir_a2b, the ir_b2a.cxx is the old ir_a2b but > just for ir_b2a, and then the new code is all in ir_a2b.cxx. One other > change was to symtab.cxx to make Init_Constab not be inline (odd that it was > already in symtab.h but was declared inline in symtab.cxx). What is not > handled: more than 1 function, loops, arrays, structs, labels, initos, dst > other than files and includes, plus some other minor things. On the plus > side, the basic code works, and the following test is handled: > int a; > static int b; > > void test (int n) > { > a = b + n; > } > ir_b2a -st test.B test.Ba; ir_a2b test.Ba test.BB; ir_b2a -st test.BB test.Bba > produces the same result except that we don't have the dst-info output. > Hi Mike,
It's awesome that you published this.. I've only glanced, but did you write this from scratch and what license is it under? Did you have to change the output of ir_b2a so that it's easier to parse? /* NVISA comment - Having all those additional memory spaces is a bugger isn't it.. ;) */ ./C ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel