diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2017-07-18 01:55:34 -0300 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-07-19 14:45:15 -0700 |
commit | 0d9acef24062844b96c671b4379d9fb03c3ea606 (patch) | |
tree | 59e99da6edd193da60c2e00d6d0adccb98e82ac1 /target/m68k | |
parent | 68cedf733ae32363ccf54f0b52c8a424d5ec98ed (diff) |
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>
Diffstat (limited to 'target/m68k')
-rw-r--r-- | target/m68k/translate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 3a519b790d..e709e6cde2 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -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); } |