diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-30 01:11:48 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-30 01:11:48 +0000 |
commit | d7e4b87e53923542c1a7220e08bcae2252f5a22e (patch) | |
tree | 0d29076ef6fd68674772fcefa0382a6921f0889c /target-ppc/translate.c | |
parent | 477023a6038e8f457c604b138198f76d093b9a87 (diff) |
Implement new floating-point instructions (fre, frin, friz, frip, frim)
as defined in the PowerPC 2.04 specification.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3281 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r-- | target-ppc/translate.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 7f84ed7d69..f4ff22e385 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -476,6 +476,8 @@ enum { PPC_RFMCI = 0x0000020000000000ULL, /* user-mode DCR access, implemented in PowerPC 460 */ PPC_DCRUX = 0x0000040000000000ULL, + /* New floating-point extensions (PowerPC 2.0x) */ + PPC_FLOAT_EXT = 0x0000080000000000ULL, }; /*****************************************************************************/ @@ -1660,6 +1662,9 @@ GEN_FLOAT_AB(div, 0x12, 0x000007C0); /* fmul - fmuls */ GEN_FLOAT_AC(mul, 0x19, 0x0000F800); +/* fre */ +GEN_FLOAT_BS(re, 0x3F, 0x18, PPC_FLOAT_EXT); + /* fres */ GEN_FLOAT_BS(res, 0x3B, 0x18, PPC_FLOAT_FRES); @@ -1727,6 +1732,15 @@ GEN_FLOAT_B(ctid, 0x0E, 0x19, PPC_64B); GEN_FLOAT_B(ctidz, 0x0F, 0x19, PPC_64B); #endif +/* frin */ +GEN_FLOAT_B(rin, 0x08, 0x0C, PPC_FLOAT_EXT); +/* friz */ +GEN_FLOAT_B(riz, 0x08, 0x0D, PPC_FLOAT_EXT); +/* frip */ +GEN_FLOAT_B(rip, 0x08, 0x0E, PPC_FLOAT_EXT); +/* frim */ +GEN_FLOAT_B(rim, 0x08, 0x0F, PPC_FLOAT_EXT); + /*** Floating-Point compare ***/ /* fcmpo */ GEN_HANDLER(fcmpo, 0x3F, 0x00, 0x01, 0x00600001, PPC_FLOAT) |