mirror of
https://github.com/qemu/qemu.git
synced 2024-12-15 07:23:52 +08:00
target/m68k: optimize bcd_flags() using extract op
Done with the Coccinelle semantic patch scripts/coccinelle/tcg_gen_extract.cocci. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-Id: <20170718045540.16322-5-f4bug@amsat.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
68cedf733a
commit
0d9acef240
@ -1749,8 +1749,7 @@ static void bcd_flags(TCGv val)
|
||||
tcg_gen_andi_i32(QREG_CC_C, val, 0x0ff);
|
||||
tcg_gen_or_i32(QREG_CC_Z, QREG_CC_Z, QREG_CC_C);
|
||||
|
||||
tcg_gen_shri_i32(QREG_CC_C, val, 8);
|
||||
tcg_gen_andi_i32(QREG_CC_C, QREG_CC_C, 1);
|
||||
tcg_gen_extract_i32(QREG_CC_C, val, 8, 1);
|
||||
|
||||
tcg_gen_mov_i32(QREG_CC_X, QREG_CC_C);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user