From 1497c961af2b6d45bd2a1da5a351be54edcadca2 Mon Sep 17 00:00:00 2001 From: pbrook Date: Mon, 31 Mar 2008 03:45:50 +0000 Subject: ARM TCG conversion 4/16. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4141 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-arm/op.c | 99 --------------------------------------------------------- 1 file changed, 99 deletions(-) (limited to 'target-arm/op.c') diff --git a/target-arm/op.c b/target-arm/op.c index b8b45e9fa3..d8906b4477 100644 --- a/target-arm/op.c +++ b/target-arm/op.c @@ -425,105 +425,6 @@ void OPPROTO op_rorl_T1_T0_cc(void) FORCE_RET(); } -/* misc */ -#define SIGNBIT (uint32_t)0x80000000 -/* saturating arithmetic */ -void OPPROTO op_addl_T0_T1_setq(void) -{ - uint32_t res; - - res = T0 + T1; - if (((res ^ T0) & SIGNBIT) && !((T0 ^ T1) & SIGNBIT)) - env->QF = 1; - - T0 = res; - FORCE_RET(); -} - -void OPPROTO op_addl_T0_T1_saturate(void) -{ - uint32_t res; - - res = T0 + T1; - if (((res ^ T0) & SIGNBIT) && !((T0 ^ T1) & SIGNBIT)) { - env->QF = 1; - if (T0 & SIGNBIT) - T0 = 0x80000000; - else - T0 = 0x7fffffff; - } - else - T0 = res; - - FORCE_RET(); -} - -void OPPROTO op_subl_T0_T1_saturate(void) -{ - uint32_t res; - - res = T0 - T1; - if (((res ^ T0) & SIGNBIT) && ((T0 ^ T1) & SIGNBIT)) { - env->QF = 1; - if (T0 & SIGNBIT) - T0 = 0x80000000; - else - T0 = 0x7fffffff; - } - else - T0 = res; - - FORCE_RET(); -} - -void OPPROTO op_double_T1_saturate(void) -{ - int32_t val; - - val = T1; - if (val >= 0x40000000) { - T1 = 0x7fffffff; - env->QF = 1; - } else if (val <= (int32_t)0xc0000000) { - T1 = 0x80000000; - env->QF = 1; - } else { - T1 = val << 1; - } - FORCE_RET(); -} - -/* Unsigned saturating arithmetic for NEON. */ -void OPPROTO op_addl_T0_T1_usaturate(void) -{ - uint32_t res; - - res = T0 + T1; - if (res < T0) { - env->QF = 1; - T0 = 0xffffffff; - } else { - T0 = res; - } - - FORCE_RET(); -} - -void OPPROTO op_subl_T0_T1_usaturate(void) -{ - uint32_t res; - - res = T0 - T1; - if (res > T0) { - env->QF = 1; - T0 = 0; - } else { - T0 = res; - } - - FORCE_RET(); -} - /* exceptions */ void OPPROTO op_swi(void) -- cgit v1.2.3