On 9/20/21 1:04 AM, WANG Xuerui wrote:
+ case INDEX_op_rotl_i32: + /* transform into equivalent rotr_i32 */ + if (c2) { + a2 = 32 - a2; + } else { + tcg_out_opc_sub_w(s, a2, TCG_REG_ZERO, a2); + tcg_out_opc_addi_w(s, a2, a2, 32);
You can't modify a2 here; need to use TCG_REG_TMP0. You don't need the addi, because the negation is sufficient, mod 32. Likewise for INDEX_op_rotl_i64. r~