diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-23 10:54:04 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-23 10:54:04 +0000 |
commit | 1c97856dcc4557f75eb9a86ec5300f9450a1e1a0 (patch) | |
tree | 0875ad311ee098fc2e7845eadbbffa90ba735774 /target-ppc/op_helper.h | |
parent | f48879196272e8e966d4666e05ed4c11422f3baf (diff) |
target-ppc: convert SPE FP ops to TCG
Including a few bug fixes:
- Don't clear high part for instruction with 32-bit destination
- Fix efscmp* and etstcmp* return value
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5783 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_helper.h')
-rw-r--r-- | target-ppc/op_helper.h | 151 |
1 files changed, 0 insertions, 151 deletions
diff --git a/target-ppc/op_helper.h b/target-ppc/op_helper.h index 39b4cac780..30f9ca1eb6 100644 --- a/target-ppc/op_helper.h +++ b/target-ppc/op_helper.h @@ -125,155 +125,4 @@ void do_load_403_pb (int num); void do_store_403_pb (int num); #endif -/* SPE extension helpers */ -/* Single precision floating-point helpers */ -void do_efscmplt (void); -void do_efscmpgt (void); -void do_efscmpeq (void); -void do_efscfsf (void); -void do_efscfuf (void); -void do_efsctsf (void); -void do_efsctuf (void); - -void do_efscfsi (void); -void do_efscfui (void); -void do_efsctsi (void); -void do_efsctui (void); -void do_efsctsiz (void); -void do_efsctuiz (void); - -/* Double precision floating-point helpers */ -void do_efdcmplt (void); -void do_efdcmpgt (void); -void do_efdcmpeq (void); -void do_efdcfsf (void); -void do_efdcfuf (void); -void do_efdctsf (void); -void do_efdctuf (void); - -void do_efdcfsi (void); -void do_efdcfui (void); -void do_efdctsi (void); -void do_efdctui (void); -void do_efdctsiz (void); -void do_efdctuiz (void); - -void do_efdcfs (void); -void do_efscfd (void); - -/* Floating-point vector helpers */ -void do_evfsabs (void); -void do_evfsnabs (void); -void do_evfsneg (void); -void do_evfsadd (void); -void do_evfssub (void); -void do_evfsmul (void); -void do_evfsdiv (void); -void do_evfscmplt (void); -void do_evfscmpgt (void); -void do_evfscmpeq (void); -void do_evfststlt (void); -void do_evfststgt (void); -void do_evfststeq (void); -void do_evfscfsi (void); -void do_evfscfui (void); -void do_evfscfsf (void); -void do_evfscfuf (void); -void do_evfsctsf (void); -void do_evfsctuf (void); -void do_evfsctsi (void); -void do_evfsctui (void); -void do_evfsctsiz (void); -void do_evfsctuiz (void); - -/* SPE extension */ -/* Single precision floating-point helpers */ -static always_inline uint32_t _do_efsabs (uint32_t val) -{ - return val & ~0x80000000; -} -static always_inline uint32_t _do_efsnabs (uint32_t val) -{ - return val | 0x80000000; -} -static always_inline uint32_t _do_efsneg (uint32_t val) -{ - return val ^ 0x80000000; -} -static always_inline uint32_t _do_efsadd (uint32_t op1, uint32_t op2) -{ - CPU_FloatU u1, u2; - u1.l = op1; - u2.l = op2; - u1.f = float32_add(u1.f, u2.f, &env->spe_status); - return u1.l; -} -static always_inline uint32_t _do_efssub (uint32_t op1, uint32_t op2) -{ - CPU_FloatU u1, u2; - u1.l = op1; - u2.l = op2; - u1.f = float32_sub(u1.f, u2.f, &env->spe_status); - return u1.l; -} -static always_inline uint32_t _do_efsmul (uint32_t op1, uint32_t op2) -{ - CPU_FloatU u1, u2; - u1.l = op1; - u2.l = op2; - u1.f = float32_mul(u1.f, u2.f, &env->spe_status); - return u1.l; -} -static always_inline uint32_t _do_efsdiv (uint32_t op1, uint32_t op2) -{ - CPU_FloatU u1, u2; - u1.l = op1; - u2.l = op2; - u1.f = float32_div(u1.f, u2.f, &env->spe_status); - return u1.l; -} - -static always_inline int _do_efststlt (uint32_t op1, uint32_t op2) -{ - CPU_FloatU u1, u2; - u1.l = op1; - u2.l = op2; - return float32_lt(u1.f, u2.f, &env->spe_status) ? 4 : 0; -} -static always_inline int _do_efststgt (uint32_t op1, uint32_t op2) -{ - CPU_FloatU u1, u2; - u1.l = op1; - u2.l = op2; - return float32_le(u1.f, u2.f, &env->spe_status) ? 0 : 4; -} -static always_inline int _do_efststeq (uint32_t op1, uint32_t op2) -{ - CPU_FloatU u1, u2; - u1.l = op1; - u2.l = op2; - return float32_eq(u1.f, u2.f, &env->spe_status) ? 4 : 0; -} -/* Double precision floating-point helpers */ -static always_inline int _do_efdtstlt (uint64_t op1, uint64_t op2) -{ - CPU_DoubleU u1, u2; - u1.ll = op1; - u2.ll = op2; - return float64_lt(u1.d, u2.d, &env->spe_status) ? 4 : 0; -} -static always_inline int _do_efdtstgt (uint64_t op1, uint64_t op2) -{ - CPU_DoubleU u1, u2; - u1.ll = op1; - u2.ll = op2; - return float64_le(u1.d, u2.d, &env->spe_status) ? 0 : 4; -} -static always_inline int _do_efdtsteq (uint64_t op1, uint64_t op2) -{ - CPU_DoubleU u1, u2; - u1.ll = op1; - u2.ll = op2; - return float64_eq(u1.d, u2.d, &env->spe_status) ? 4 : 0; -} #endif |