|
From: | Richard Henderson |
Subject: | Re: [PATCH 14/28] tcg/mips: Support bswap flags in tcg_out_bswap32 |
Date: | Mon, 14 Jun 2021 08:49:30 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 6/14/21 2:31 AM, Philippe Mathieu-Daudé wrote:
On 6/14/21 10:37 AM, Richard Henderson wrote:Merge tcg_out_bswap32 and tcg_out_bswap32s. Use the flags in the internal uses for loads and stores. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/mips/tcg-target.c.inc | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-)-static void tcg_out_bswap32(TCGContext *s, TCGReg ret, TCGReg arg) +static void tcg_out_bswap32(TCGContext *s, TCGReg ret, TCGReg arg, int flags) { if (use_mips32r2_instructions) { tcg_out_opc_reg(s, OPC_WSBH, ret, 0, arg); tcg_out_opc_sa(s, OPC_ROTR, ret, ret, 16); + if (flags & TCG_BSWAP_OZ) { + tcg_out_opc_bf(s, OPC_DEXT, ret, ret, 31, 0);Maybe mention the rotr -> ext32u mips32r2 simplification?
Oh, from dsbh + dshd + dsrl in the old bswap32u function? Sure, I can do that. r~
[Prev in Thread] | Current Thread | [Next in Thread] |