mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 05:25:11 +00:00
target/m68k: optimize bcd_flags() using extract op
Done with the Coccinelle semantic patch scripts/coccinelle/tcg_gen_extract.cocci. Backports commit 0d9acef24062844b96c671b4379d9fb03c3ea606 from qemu
This commit is contained in:
parent
fc52eea5e2
commit
e5486b636b
|
@ -1786,8 +1786,7 @@ static void bcd_flags(DisasContext *s, TCGv val)
|
|||
tcg_gen_andi_i32(tcg_ctx, QREG_CC_C, val, 0x0ff);
|
||||
tcg_gen_or_i32(tcg_ctx, QREG_CC_Z, QREG_CC_Z, QREG_CC_C);
|
||||
|
||||
tcg_gen_shri_i32(tcg_ctx, QREG_CC_C, val, 8);
|
||||
tcg_gen_andi_i32(tcg_ctx, QREG_CC_C, QREG_CC_C, 1);
|
||||
tcg_gen_extract_i32(tcg_ctx, QREG_CC_C, val, 8, 1);
|
||||
|
||||
tcg_gen_mov_i32(tcg_ctx, QREG_CC_X, QREG_CC_C);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue