From 868314358ea3f3009fb72d2867dc73af54338ae7 Mon Sep 17 00:00:00 2001 From: pbrook Date: Sun, 11 May 2008 12:22:01 +0000 Subject: Add zero extension (pseudo-)ops. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4424 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-cris/translate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'target-cris/translate.c') diff --git a/target-cris/translate.c b/target-cris/translate.c index 72eb48c..89a0533 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); } -- cgit v1.1