28.08.2019. 02.07, "Richard Henderson" <richard.hender...@linaro.org> је написао/ла: > > On 8/27/19 2:34 AM, Peter Maydell wrote: > >> + tcg_gen_andi_i32(tmp, tmp, -4); > > > > Minor nit, but can we use 0xfffffffc like the old code did, > > to avoid the reader having to do 2s-complement arithmetic > > in their head to figure out that we're clearing the low 2 bits? > > I always preferred "x & -c" for exactly the same reason: > to avoid the reader having to do 2s compliment arithmetic > in their head to figure out that we're aligning to c. > > But, sure, if you like. >
I vote for 0xfffffffc. Aleksandar > > This would be a good place to put a comment equivalent to that > > in the old decoder: > > > > # thumb_insn_is_16bit() ensures we won't be decoding these as > > # T16 instructions for a Thumb2 CPU, so these patterns must be > > # a Thumb1 split BL/BLX. > > > >> +BLX_suffix 11101 imm:11 &i > >> +BL_BLX_prefix 11110 imm:s11 &i > >> +BL_suffix 11111 imm:11 &i > > I had placed that with trans_BL_BLX_prefix, but I suppose this > is a better place. > > > r~ >