mirror of
https://github.com/qemu/qemu.git
synced 2024-12-15 15:33:29 +08:00
target/xtensa: Tidy translate_bb
Replace ifdefs with C, tcg_const_i32 with tcg_constant_i32. We only need a single temporary for this. Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
00ab7e6164
commit
37d7328e4a
@ -1406,19 +1406,15 @@ static void translate_b(DisasContext *dc, const OpcodeArg arg[],
|
||||
static void translate_bb(DisasContext *dc, const OpcodeArg arg[],
|
||||
const uint32_t par[])
|
||||
{
|
||||
#if TARGET_BIG_ENDIAN
|
||||
TCGv_i32 bit = tcg_const_i32(0x80000000u);
|
||||
#else
|
||||
TCGv_i32 bit = tcg_const_i32(0x00000001u);
|
||||
#endif
|
||||
TCGv_i32 tmp = tcg_temp_new_i32();
|
||||
|
||||
tcg_gen_andi_i32(tmp, arg[1].in, 0x1f);
|
||||
#if TARGET_BIG_ENDIAN
|
||||
tcg_gen_shr_i32(bit, bit, tmp);
|
||||
#else
|
||||
tcg_gen_shl_i32(bit, bit, tmp);
|
||||
#endif
|
||||
tcg_gen_and_i32(tmp, arg[0].in, bit);
|
||||
if (TARGET_BIG_ENDIAN) {
|
||||
tcg_gen_shr_i32(tmp, tcg_constant_i32(0x80000000u), tmp);
|
||||
} else {
|
||||
tcg_gen_shl_i32(tmp, tcg_constant_i32(0x00000001u), tmp);
|
||||
}
|
||||
tcg_gen_and_i32(tmp, arg[0].in, tmp);
|
||||
gen_brcondi(dc, par[0], tmp, 0, arg[2].imm);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user