|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH RFC v1 11/29] target-arc: BCLR, BMSK, BSET, BTST, BXOR |
Date: | Tue, 20 Sep 2016 17:07:51 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
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~
[Prev in Thread] | Current Thread | [Next in Thread] |