aboutsummaryrefslogtreecommitdiff
path: root/target-cris
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-11 12:22:01 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-11 12:22:01 +0000
commit868314358ea3f3009fb72d2867dc73af54338ae7 (patch)
treea6d9b6d94a727e23847d6554d1fafc865798e425 /target-cris
parentc96402b11ec09e4b719157409046790bad1f18ca (diff)
Add zero extension (pseudo-)ops.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4424 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-cris')
-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);
}