Re: Release of RosAsm V.2.025a



Betov wrote:


And, if i may add, anyone wishing to develop an Assembler doing Jumps Size Optimizations, - in one single and simple additional Computation, taking almost no time , instead of the traditional Multi-Passes -, can take a lesson from RosAsm Source.


Backward jumps are trivial; the distance is known because the code has been generated. But how do you assess the jump distance for forward jumps without a second pass? This;


   jmp B
   ...code...
   jmp A
   ...code...
B: ...code...
A: ...code...

requires that the jump to B is dependant on the length of the jump to A opcode. Can you describe how you optimise this in one pass?

--
Regards
ALex McDonald
.



Relevant Pages

  • Re: Release of RosAsm V.2.025a
    ... doing Jumps Size Optimizations, - in one single and simple additional Computation, taking almost no time, instead of the traditional Multi-Passes -, can take a lesson from RosAsm Source. ... But how do you assess the jump distance for forward ... that RosAsm _never_ implements Short Jumps on Plain Labels, ...
    (alt.lang.asm)
  • Re: Release of RosAsm V.2.025a
    ... > * Jumps Size Optimizations. ... This might be a cool feature and welcome addition to RosAsm if it ... With the "Magic" NOP in the code, each jump instruction should be five ...
    (alt.lang.asm)
  • Re: Java processors
    ... machine-code sequences, so once the JIT does its thing, and any state is ... then a jump is made to the analogous location in the ... there are all sorts of optimizations which could break the simple case, but what is to say that the JIT actually uses these optimizations in these cases? ... caching variables in registers and using basic peephole optimizations actually goes a long ways towards generating "optimized" compiler output. ...
    (comp.lang.java.programmer)
  • Re: Error handling in VB6
    ... I thought that line numbering overhead is a lot than just the few ... Line numbers end up as "jump tables" in compiled code. ... Compilers ... off some optimizations, but this doesn't seem to be "automatically" enforced ...
    (microsoft.public.vb.general.discussion)
  • Re: [PATCH] Linux Kernel Markers 0.14 for 2.6.17
    ... Constructing on Jeremy Fitzhardinge's comments about gcc optimizations, ... rewrote the markers mechanism so that the optimized mode does not ... jump between two different inline asm. ...
    (Linux-Kernel)