Well folks, we're at that period in the formation of a mailing list where we now have enough people to keep a conversation going, so I'll kick things off by...
Hi! I've been interested in static recompilation for a while. I first got the thought of writing one when I wanted to play Super Metroid on my Gamboy Advance,...
... got ... my ... the ... first ... cpu I ... this ... stage. ... etc ... work; ... understand ... Maybe we can help you with this. The fact that you would...
Wow, thank you very much for that lengthy description. I'll be printing that out and storing it in my filing cabinet :) There are a couple of issues I think I...
... The translator is the code which was based on a disassembler. Instead of printing out asm statements, it prints out the source code stolen from the...
... That's what should be revealed. When I wrote my 68K interpreter, I tested it by having it check against Starscream (which isn't by any means a sufficiently...
... translation ... executes ... I'm really curious as to how this static recompilation method works - is the entire program converted into one function/switch...
... Yes and no! ... it's like that, but initially with each instruction being emulated ... GCC does. I wasn't able to get CodeWarrior for the Palm to swallow ...
... But it doesn't really eliminate redundant loads/stores at all. At least not the kind I'm thinking of. The code generator simply generates ugly load/stores...
Do you reckon you could you do a switch like this?: switch (pc&0xff0000) { case 0x000000: switch (pc&0xffff00) { case 0x000200: switch (pc) { case 0x000206: //...
We're discussing the implementation of this over in 'compilers101' but I wanted to show an example here so you understand why it's so relevant to static binary...
... unfortunately it does, I was careless; the first assignment to register_A was redundant... register_B = 0 cmp_old = 0xf00 cmp_new = 1 register_A = flag_C =...
Thing is, this is all compiler theory - wouldn't GCC spot all of this, making any 6502->C (elimate dead registers) C->x86 method pointless? Thing is, even so,...
... I'd be interested in seeing the kind of code GCC generates without any fancy optimizations done ahead of time and with the optimizations Graham was talking...
... Ho ho! You've never done a dump of GCC's output, have you? It's not all they'd like you to think it is. For all the fancy techniques it tries to do, a...
A passing thought... let's say we have a reasonably good compiler which eliminates dead stores and redundant loads, but only within basic blocks. In that...
... <davesbit@y...>" ... 70's ... True GCC has been known to be a bit naff - MVSC is pretty good though from what I've seen, with x86 at least - has a few...
Back to the subject of translating a program from native opcodes to C: I had mentioned that a significant source of overhead comes from things like the C/V/Z/N...
Although my personal concept of static recompilation is biased towards translating specific programs for a purpose - which means that I don't mind too much if...
We've already looked at how we can discard assignments to flag registers if they are not used before a subsequent assignment, and indeed we can handle long...
... I hate giving myself a challenge :-) Here's the code ... G #define DEBUG 1 // A test program to eliminate redundant code; does *not* do common //...
... By the way this is quite typical of real code. I don't think I've posted it here before, so here: http://www.gtoal.com/athome/tailgunner/macros.h.html is...
... I wasn't happy with some aspects of that code and have now cleaned it up considerably. In fact it now makes quite a nice demonstrator of the concept, and...
I have written a first draft of a static binary translation HOWTO. This is just my personal method; it isn't the state of the art, and I had to force myself to...
... You append statements to a list which allows you to perform some analysis before flushing it out, right? In my SH-2 recompiler, I had 2 different lists:...
... Very cool! I think you've taken a very good approach to this subject in your document. It's much more accessible than the academic texts (as you mention)...
Although my Cinematronics recompiler was rather messy, and took a few weeks to write, I got a itch to scratch tonight about doing a z80 recompiler (primarily...
http://www.cs.ubc.ca/local/reading/proceedings/spe91- 95/spe/vol21/issue8/spe046cm.pdf Apparently what I've considered static binary translation is properly...