• Mark Mendell's avatar
    X86: Assembler support for near labels · 73f455ec
    Mark Mendell authored
    
    
    The optimizing compiler uses 32 bit relative jumps for all forward
    jumps, just in case the offset is too large to fit in one byte.  Some of
    the generated code knows that the jumps will in fact fit.
    
    Add a 'NearLabel' class to the x86 and x86_64 assemblers.  This will be
    used to generate known short forward branches.
    
    Add jecxz/jrcxz instructions, which only handle a short offset.  They
    will be used for intrinsics.
    
    Add tests for the new instructions and NearLabel.
    
    Change-Id: I11177f36394d35d63b32364b0e6289ee6d97de46
    Signed-off-by: default avatarMark Mendell <mark.p.mendell@intel.com>
    73f455ec
assembler_x86_64.h 30.5 KB