提交 0d9acef2 编写于 作者: P Philippe Mathieu-Daudé 提交者: Richard Henderson

target/m68k: optimize bcd_flags() using extract op

Done with the Coccinelle semantic patch
scripts/coccinelle/tcg_gen_extract.cocci.
Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: NLaurent Vivier <laurent@vivier.eu>
Reviewed-by: NRichard Henderson <rth@twiddle.net>
Message-Id: <20170718045540.16322-5-f4bug@amsat.org>
Signed-off-by: NRichard Henderson <rth@twiddle.net>
上级 68cedf73
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册