diff options
author | Tom Musta <tommusta@gmail.com> | 2014-01-07 10:06:08 -0600 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-03-05 03:06:43 +0100 |
commit | 6d41d146c92e99e21ef267be4c4b9893940e0838 (patch) | |
tree | f9f231dabd54853197f4060eed0304ac75bbc113 /target-ppc/translate.c | |
parent | da29cb7bc7b62c14a69a104f91867edf9ce88543 (diff) | |
download | qemu-6d41d146c92e99e21ef267be4c4b9893940e0838.zip qemu-6d41d146c92e99e21ef267be4c4b9893940e0838.tar.gz qemu-6d41d146c92e99e21ef267be4c4b9893940e0838.tar.bz2 |
target-ppc: Add ISA 2.06 ftsqrt
This patch adds the Floating Point Test for Square Root instruction
which was introduced in Power ISA 2.06.
Signed-off-by: Tom Musta <tommusta@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r-- | target-ppc/translate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index f372742..c9aebc5 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -2248,6 +2248,15 @@ static void gen_ftdiv(DisasContext *ctx) cpu_fpr[rB(ctx->opcode)]); } +static void gen_ftsqrt(DisasContext *ctx) +{ + if (unlikely(!ctx->fpu_enabled)) { + gen_exception(ctx, POWERPC_EXCP_FPU); + return; + } + gen_helper_ftsqrt(cpu_crf[crfD(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); +} + /*** Floating-Point compare ***/ @@ -9869,6 +9878,7 @@ GEN_FLOAT_ACB(msub, 0x1C, 1, PPC_FLOAT), GEN_FLOAT_ACB(nmadd, 0x1F, 1, PPC_FLOAT), GEN_FLOAT_ACB(nmsub, 0x1E, 1, PPC_FLOAT), GEN_HANDLER_E(ftdiv, 0x3F, 0x00, 0x04, 1, PPC_NONE, PPC2_FP_TST_ISA206), +GEN_HANDLER_E(ftsqrt, 0x3F, 0x00, 0x05, 1, PPC_NONE, PPC2_FP_TST_ISA206), GEN_FLOAT_B(ctiw, 0x0E, 0x00, 0, PPC_FLOAT), GEN_HANDLER_E(fctiwu, 0x3F, 0x0E, 0x04, 0, PPC_NONE, PPC2_FP_CVT_ISA206), GEN_FLOAT_B(ctiwz, 0x0F, 0x00, 0, PPC_FLOAT), |