|
From: | Richard Henderson |
Subject: | Re: [PATCH] tcg/loongarch64: Support raising sigbus for user-only |
Date: | Wed, 5 Jan 2022 19:55:53 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 1/5/22 9:44 AM, WANG Xuerui wrote:
+static void tcg_out_test_alignment(TCGContext *s, bool is_ld, TCGReg addr_reg, + unsigned a_bits) +{ + TCGLabelQemuLdst *l = new_ldst_label(s); + + l->is_ld = is_ld; + l->addrlo_reg = addr_reg; + + tcg_debug_assert(a_bits < TCG_TARGET_REG_BITS); + tcg_out_opc_bstrpick_d(s, TCG_REG_TMP1, addr_reg, 0, a_bits - 1);
Looks good. My only comment is wrt using bstrpick vs andi. I haven't found any pipeline or timing info for loongarch, so I don't know if either way is best. With bstrpick, you can drop the assert. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
[Prev in Thread] | Current Thread | [Next in Thread] |