Doing so we free one tcg_temp. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- target/m68k/translate.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/target/m68k/translate.c b/target/m68k/translate.c index ea95d55a11..f43ac07b7f 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -2217,15 +2217,11 @@ static TCGv gen_get_ccr(DisasContext *s) static TCGv gen_get_sr(DisasContext *s) { - TCGv ccr; - TCGv sr; + TCGv dest; - ccr = gen_get_ccr(s); - sr = tcg_temp_new(); - tcg_gen_andi_i32(sr, QREG_SR, 0xffe0); - tcg_gen_or_i32(sr, sr, ccr); - tcg_temp_free(ccr); - return sr; + dest = gen_get_ccr(s); + tcg_gen_deposit_i32(dest, dest, QREG_SR, 5, 11); + return dest; } static void gen_set_sr_im(DisasContext *s, uint16_t val, int ccr_only) -- 2.19.1