• A
    tcg/mips: optimize bswap{16,16s,32} on MIPS32R2 · c1cf85c9
    Aurelien Jarno 提交于
    bswap operations can be optimized on MIPS32 Release 2 using the ROTR,
    WSBH and SEH instructions. We can't use the non-R2 code to implement the
    ops due to registers constraints, so don't define the corresponding
    TCG_TARGET_HAS_bswap* values.
    
    Also bswap16* operations are supposed to be called with the 16 high bits
    zeroed. This is the case everywhere (including for TCG by definition)
    except when called from the store helper. Remove the AND instructions from
    bswap16* and move it there.
    Reviewed-by: NRichard Henderson <rth@twiddle.net>
    Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
    c1cf85c9
tcg-target.c 50.3 KB