Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Andre Przywara's avatar
    78ad457b
    armv8: shrink exception table code · 78ad457b
    Andre Przywara authored
    
    In the moment our exception entry code needs 34 instructions, so we
    can't use put it directly into the table entry, which offers "only"
    32 instructions there. Right now we just put an unconditional branch
    there, then use a macro to place the 34 instructions *per entry* after
    that. That effectivly doubles the size of our exception table, which
    is quite a waste, given that we use it mostly for debugging purposes.
    
    Since the register saving part is actually identical, let's just convert
    that macro into a function, and "bl" into it directly from the exception
    slot, of course after having saved at least the original LR.
    This saves us about 950 bytes of code, which is quite a relief for some
    tight SPLs, in particular the 64-bit Allwinner ones.
    
    Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
    78ad457b
    History
    armv8: shrink exception table code
    Andre Przywara authored
    
    In the moment our exception entry code needs 34 instructions, so we
    can't use put it directly into the table entry, which offers "only"
    32 instructions there. Right now we just put an unconditional branch
    there, then use a macro to place the 34 instructions *per entry* after
    that. That effectivly doubles the size of our exception table, which
    is quite a waste, given that we use it mostly for debugging purposes.
    
    Since the register saving part is actually identical, let's just convert
    that macro into a function, and "bl" into it directly from the exception
    slot, of course after having saved at least the original LR.
    This saves us about 950 bytes of code, which is quite a relief for some
    tight SPLs, in particular the 64-bit Allwinner ones.
    
    Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>