aboutsummaryrefslogtreecommitdiff
path: root/target-cris/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-cris/translate.c')
-rw-r--r--target-cris/translate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/target-cris/translate.c b/target-cris/translate.c
index 72eb48cdf9..89a0533857 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -1165,11 +1165,10 @@ static inline void t_gen_sext(TCGv d, TCGv s, int size)
static inline void t_gen_zext(TCGv d, TCGv s, int size)
{
- /* TCG-FIXME: this is not optimal. Many archs have fast zext insns. */
if (size == 1)
- tcg_gen_andi_i32(d, s, 0xff);
+ tcg_gen_ext8u_i32(d, s);
else if (size == 2)
- tcg_gen_andi_i32(d, s, 0xffff);
+ tcg_gen_ext16u_i32(d, s);
else
tcg_gen_mov_tl(d, s);
}