(Untitled)

May 30, 2011 18:44

I have just written the following commit message:
"Branch over unconditional jump" hack for arbitrary-length brcc ( Read more... )

computers, jobs, programming, beware the geek, compilers, git

Leave a comment

Comments 4

necaris May 30 2011, 21:37:51 UTC
Genius :-)

Reply

pozorvlak May 30 2011, 21:54:10 UTC
Thanks!

I should point out that the blame credit for the "branch over unconditional jump" trick properly belongs to aaroncrane. The idea to do it all in the assembly-emission pass (rather than, say, doing it in IR and fixing up the control-flow graph accordingly) was all mine, though. As was the decision to create a new L_BRCC_HACK goto-label family (using raw printfs) rather than trying to work out how to access the existing label-creation system.

Reply


gareth_rees May 31 2011, 11:35:20 UTC
Do you go back and rewrite once you know whether the jump distance is within the limit?

Reply

pozorvlak June 1 2011, 09:20:03 UTC
Not yet, but that's a possibility (and probably an easier one than accurately calculating the jump distance ahead-of-time). Thanks!

Reply


Leave a comment

Up