• Ben Dooks's avatar
    ARM: Correct BUG() assembly to ensure it is endian-agnostic · 63328070
    Ben Dooks authored
    Currently BUG() uses .word or .hword to create the necessary illegal
    instructions. However if we are building BE8 then these get swapped
    by the linker into different illegal instructions in the text. This
    means that the BUG() macro does not get trapped properly.
    
    Change to using <asm/opcodes.h> to provide the necessary ARM instruction
    building as we cannot rely on gcc/gas having the `.inst` instructions
    which where added to try and resolve this issue (reported by Dave Martin
    <Dave.Martin@arm.com>).
    Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
    Reviewed-by: default avatarDave Martin <Dave.Martin@arm.com>
    63328070
bug.h 2.48 KB