Commit 46804e28 authored by Nikunj A Dadhania's avatar Nikunj A Dadhania Committed by David Gibson

target-ppc: Add xvxexpdp instruction

xvxexpdp: VSX Vector Extract Exponent Dual Precision
Signed-off-by: 's avatarNikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 08f1ee5a
......@@ -1413,6 +1413,23 @@ static void gen_xvxexpsp(DisasContext *ctx)
tcg_gen_andi_i64(xtl, xtl, 0xFF000000FF);
}
static void gen_xvxexpdp(DisasContext *ctx)
{
TCGv_i64 xth = cpu_vsrh(xT(ctx->opcode));
TCGv_i64 xtl = cpu_vsrl(xT(ctx->opcode));
TCGv_i64 xbh = cpu_vsrh(xB(ctx->opcode));
TCGv_i64 xbl = cpu_vsrl(xB(ctx->opcode));
if (unlikely(!ctx->vsx_enabled)) {
gen_exception(ctx, POWERPC_EXCP_VSXU);
return;
}
tcg_gen_shri_i64(xth, xbh, 52);
tcg_gen_andi_i64(xth, xth, 0x7FF);
tcg_gen_shri_i64(xtl, xbl, 52);
tcg_gen_andi_i64(xtl, xtl, 0x7FF);
}
#undef GEN_XX2FORM
#undef GEN_XX3FORM
#undef GEN_XX2IFORM
......
......@@ -126,6 +126,7 @@ GEN_VSX_XFORM_300(xsiexpqp, 0x4, 0x1B, 0x00000001),
GEN_XX3FORM(xviexpsp, 0x00, 0x1B, PPC2_ISA300),
GEN_XX3FORM(xviexpdp, 0x00, 0x1F, PPC2_ISA300),
GEN_XX2FORM_EO(xvxexpdp, 0x16, 0x1D, 0x00, PPC2_ISA300),
GEN_XX2FORM_EO(xvxexpsp, 0x16, 0x1D, 0x08, PPC2_ISA300),
GEN_XX2FORM(xvabsdp, 0x12, 0x1D, PPC2_VSX),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment