On 09/08/2016 03:31 PM, Michael Rolnik wrote:
+int arc_gen_BCLR(DisasCtxt *ctx, TCGv dest, TCGv src1, TCGv src2) +{ + TCGv rslt = dest; + + if (TCGV_EQUAL(dest, src1) || TCGV_EQUAL(dest, src2)) { + rslt = tcg_temp_new_i32(); + } + + tcg_gen_andi_tl(rslt, src2, 0x3f);
0x1f, in all of the functions.
+ tcg_gen_add_tl(mask, mask, ctx->one); + tcg_gen_shr_tl(mask, ctx->one, mask); + tcg_gen_sub_tl(mask, mask, ctx->one);
I know this is the description in the manual, but this will produce a shift of 32 with an input of 31, which is illegal in tcg.
You need to use mask = -1u >> (src2 ^ 31) r~