[Qemu-devel] [PATCH 07/13] Add VSX Scalar Move Instructions

2013-10-04 Thread Tom Musta
(VSX_SCALAR_MOVE) is added since these instructions vary only slightly from each other. Macros to support VSX XX2 and XX3 form opcodes are also added. These macros handle the overloading of opcode 2 space (instruction bits 26:30) caused by AX and BX bits (29 and 30, respectively). Signed-off-by: Tom Musta

[Qemu-devel] [PATCH 12/13] Add xxspltw

2013-10-04 Thread Tom Musta
This patch adds the VSX Splat Word (xxsplatw) instruction. This is the first instruction to use the UIM immediate field and consequently a decoder is also added. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 50 1

[Qemu-devel] [PATCH 00/13] Stage 2 VSX Support

2013-10-04 Thread Tom Musta
defined by the V2.06 Power ISA (aka Power7). b) The vector and scalar move instructions. c) The logical instructions defined by V2.06. d) Assorted permute and select instructions. Tom Musta (13): Abandon GEN_VSX_* macros Add lxsdx Add lxvdsx Add lxvw4x Add stxsdx Add stxvw4x

[Qemu-devel] [PATCH 01/13] Abandon GEN_VSX_* macros

2013-10-04 Thread Tom Musta
Abandon GEN_VSX_* macros This patch eliminates the GEN_VSX_LXVNX/GEN_VSX_STXVNX macros which did not provide significant value above the general GEN_HANDLER_E macro. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 12 ++-- 1 files changed, 2 insertions(+), 10

[Qemu-devel] [PATCH 03/13] Add lxvdsx

2013-10-04 Thread Tom Musta
This patch adds the Load VSX Vector Doubleword Splat Indexed (lxvdsx) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c

[Qemu-devel] [PATCH 11/13] Add xxsel

2013-10-04 Thread Tom Musta
with two macros (GEN_XXSEL_ROW and GEN_XX_SEL). Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 83 1 files changed, 83 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index

[Qemu-devel] [PATCH 02/13] Add lxsdx

2013-10-04 Thread Tom Musta
This patch adds the Load VSX Scalar Doubleowrd Indexed (lxsdx) instruction. The lower 8 bytes of the target register are undefined; this implementation leaves those bytes unaltered. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 16 1 files changed

[Qemu-devel] [PATCH 06/13] Add stxvw4x

2013-10-04 Thread Tom Musta
This patch adds the Store VSX Vector Word*4 Indexed (stxvw4x) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c

[Qemu-devel] [PATCH 08/13] Add VSX Vector Move Instructions

2013-10-04 Thread Tom Musta
Single-Precision - xvnabssp - Vector Negative Absolute Value Single-Precision - xvnegsp - Vector Negate Single-Precision - xvcpsgnsp - Vector Copy Sign Single-Precision Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 68

[Qemu-devel] [PATCH 04/13] Add lxvw4x

2013-10-04 Thread Tom Musta
This patch adds the Load VSX Vector Word*4 Indexed (lxvw4x) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c

[Qemu-devel] [PATCH 05/13] Add stxsdx

2013-10-04 Thread Tom Musta
This patch adds the Store VSX Scalar Doubleword Indexed (stxsdx) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index

[Qemu-devel] [PATCH 09/13] Add Power7 VSX Logical Instructions

2013-10-04 Thread Tom Musta
This patch adds the VSX logical instructions that are defined by the Version 2.06 Power ISA (aka Power7): - xxland - xxlandc - xxlor - xxlxor - xxlnor Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 29 + 1 files changed, 29

[Qemu-devel] [PATCH 10/13] Add xxmrgh/xxmrgl

2013-10-04 Thread Tom Musta
This patch adds the VSX Merge High Word and VSX Merge Low Word instructions. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 44 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b

[Qemu-devel] [PATCH 13/13] Add xxsldwi

2013-10-04 Thread Tom Musta
This patch adds the VSX Shift Left Double by Word Immediate (xxsldwi) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 62 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/target-ppc

Re: [Qemu-devel] [PATCH 10/13] Add xxmrgh/xxmrgl

2013-10-10 Thread Tom Musta
On 10/9/2013 3:09 PM, Richard Henderson wrote: On 10/04/2013 06:23 AM, Tom Musta wrote: +tcg_gen_andi_i64(a0, a0, 0xul); \ +tcg_gen_shli_i64(a1, a1, 32); \ +tcg_gen_shri_i64(b0, b0, 32

Re: [Qemu-devel] [PATCH 11/13] Add xxsel

2013-10-10 Thread Tom Musta
On 10/9/2013 3:13 PM, Richard Henderson wrote: On 10/04/2013 06:24 AM, Tom Musta wrote: +tcg_gen_and_i64(b, b, c); +tcg_gen_not_i64(c, c); +tcg_gen_and_i64(a, a, c); tcg_gen_andc_i64. +#define GEN_XXSEL() \ +GEN_XXSEL_ROW(0x00) \ +GEN_XXSEL_ROW(0x01) \ Why bother with defining

[Qemu-devel] [v2 00/13] Stage 2 VSX Support

2013-10-11 Thread Tom Musta
defined by the V2.06 Power ISA (aka Power7). b) The vector and scalar move instructions. c) The logical instructions defined by V2.06. d) Assorted permute and select instructions. V2: reworked patches 4, 10, 11 and 12 per comments from Richard Henderson (thanks, Richard!) Tom Musta (13

[Qemu-devel] [v2 01/13] Abandon GEN_VSX_* macros

2013-10-11 Thread Tom Musta
This patch eliminates the GEN_VSX_LXVNX/GEN_VSX_STXVNX macros which did not provide significant value above the general GEN_HANDLER_E macro. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 12 ++-- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [v2 02/13] Add lxsdx

2013-10-11 Thread Tom Musta
This patch adds the Load VSX Scalar Doubleowrd Indexed (lxsdx) instruction. The lower 8 bytes of the target register are undefined; this implementation leaves those bytes unaltered. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 16 1 files changed

[Qemu-devel] [v2 03/13] Add lxvdsx

2013-10-11 Thread Tom Musta
This patch adds the Load VSX Vector Doubleword Splat Indexed (lxvdsx) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c

[Qemu-devel] [v2 04/13] Add lxvw4x

2013-10-11 Thread Tom Musta
This patch adds the Load VSX Vector Word*4 Indexed (lxvw4x) instruction. V2: changed to use deposit_i64 per Richard Henderson's review. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 29 + 1 files changed, 29 insertions(+), 0 deletions

[Qemu-devel] [v2 05/13] Add stxsdx

2013-10-11 Thread Tom Musta
This patch adds the Store VSX Scalar Doubleword Indexed (stxsdx) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index

[Qemu-devel] [v2 06/13] Add stxvw4x

2013-10-11 Thread Tom Musta
This patch adds the Store VSX Vector Word*4 Indexed (stxvw4x) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c

[Qemu-devel] [v2 07/13] Add VSX Scalar Move Instructions

2013-10-11 Thread Tom Musta
(VSX_SCALAR_MOVE) is added since these instructions vary only slightly from each other. Macros to support VSX XX2 and XX3 form opcodes are also added. These macros handle the overloading of opcode 2 space (instruction bits 26:30) caused by AX and BX bits (29 and 30, respectively). Signed-off-by: Tom Musta

[Qemu-devel] [v2 08/13] Add VSX Vector Move Instructions

2013-10-11 Thread Tom Musta
Single-Precision - xvnabssp - Vector Negative Absolute Value Single-Precision - xvnegsp - Vector Negate Single-Precision - xvcpsgnsp - Vector Copy Sign Single-Precision Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 68

[Qemu-devel] [v2 09/13] Add Power7 VSX Logical Instructions

2013-10-11 Thread Tom Musta
This patch adds the VSX logical instructions that are defined by the Version 2.06 Power ISA (aka Power7): - xxland - xxlandc - xxlor - xxlxor - xxlnor Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 29 + 1 files changed, 29

[Qemu-devel] [v2 10/13] Add xxmrgh/xxmrgl

2013-10-11 Thread Tom Musta
This patch adds the VSX Merge High Word and VSX Merge Low Word instructions. V2: Now implemented using deposit (per Richard Henderson's comment) Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 41 + 1 files changed, 41

[Qemu-devel] [v2 11/13] Add xxsel

2013-10-11 Thread Tom Musta
with two macros (GEN_XXSEL_ROW and GEN_XX_SEL). V2: (1) eliminated unecessary XXSEL macro (2) tighter implementation using tcg_gen_andc_i64. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 76 1 files changed, 76

[Qemu-devel] [v2 12/13] Add xxspltw

2013-10-11 Thread Tom Musta
This patch adds the VSX Splat Word (xxsplatw) instruction. This is the first instruction to use the UIM immediate field and consequently a decoder is also added. V2: reworked implementation per Richard Henderson's comments. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc

[Qemu-devel] [v2 13/13] Add xxsldwi

2013-10-11 Thread Tom Musta
This patch adds the VSX Shift Left Double by Word Immediate (xxsldwi) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 62 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/target-ppc

[Qemu-devel] [PATCH] Fix float64_to_uint64

2013-10-16 Thread Tom Musta
The comment preceding the float64_to_uint64 routine suggests that the implementation is broken. And this is, indeed, the case. This patch properly implements the conversion of a 64-bit floating point number to an unsigned, 64 bit integer. Note that the patch does not pass scripts/checkpatch.pl

[Qemu-devel] [PATCH V2] Fix float64_to_uint64

2013-10-16 Thread Tom Musta
The comment preceding the float64_to_uint64 routine suggests that the implementation is broken. And this is, indeed, the case. This patch properly implements the conversion of a 64-bit floating point number to an unsigned, 64 bit integer. Note that the patch does not pass scripts/checkpatch.pl

Re: [Qemu-devel] [Qemu-ppc] [PATCH V2] Fix float64_to_uint64

2013-10-17 Thread Tom Musta
On 10/17/2013 11:31 AM, Stefan Weil wrote: Am 17.10.2013 11:40, schrieb Alexander Graf: Missing a SoB line. Alex There is already a mix of coding styles in fpu/softfloat.c, and your patch adds large regions of new code. Therefore I expect that such contributions should respect the QEMU

[Qemu-devel] [V3 PATCH] Fix float64_to_uint64

2013-10-18 Thread Tom Musta
the softfloat-2a or -2b license. V2: Added softfloat license statement. V3: Modified to meet QEMU coding conventions. Signed-off-by: Tom Musta tommu...@gmail.com --- fpu/softfloat.c | 95 ++- 1 files changed, 87 insertions(+), 8 deletions(-) diff

Re: [Qemu-devel] [v2 07/13] Add VSX Scalar Move Instructions

2013-10-22 Thread Tom Musta
On 10/22/2013 1:31 AM, Paolo Bonzini wrote: Il 11/10/2013 14:02, Tom Musta ha scritto: +case OP_CPSGN: { \ +TCGv_i64 xa = tcg_temp_new(); \ +tcg_gen_mov_i64(xa, cpu_vsrh(xA(ctx-opcode

[Qemu-devel] [V3 07/13] Add VSX Scalar Move Instructions

2013-10-22 Thread Tom Musta
From 37b74a6ca422e62b349692188c457bf6127a3a83 Mon Sep 17 00:00:00 2001 From: Tom Musta tommu...@gmail.com Date: Thu, 3 Oct 2013 10:09:50 -0500 Subject: [PATCH 07/13] Add VSX Scalar Move Instructions To: qemu-...@nongnu.org This patch adds the VSX scalar move instructions: - xsabsdp (Scalar

[Qemu-devel] [V3 08/13] Add VSX Vector Move Instructions

2013-10-22 Thread Tom Musta
Single-Precision - xvnabssp - Vector Negative Absolute Value Single-Precision - xvnegsp - Vector Negate Single-Precision - xvcpsgnsp - Vector Copy Sign Single-Precision V3: Per Paolo Bonzini's suggestion, used a temporary for the sign mask and andc. Signed-off-by: Tom Musta tommu...@gmail.com

[Qemu-devel] [PATCH 00/19] PowerPC VSX Stage 3

2013-10-24 Thread Tom Musta
library and the existing PowerPC floating point helper code. As with the previous series, the Power ISA V2.06 instructions are added but the V2.07 instructions are not. The latter will be implemented in a future patch series. Tom Musta (19): Add New softfloat Routines for VSX Add set_fprf

[Qemu-devel] [PATCH 01/19] Add New softfloat Routines for VSX

2013-10-24 Thread Tom Musta
/msg02622.html for details. This contribution can be licensed under either the softfloat-2a or -2b license. Signed-off-by: Tom Musta tommu...@gmail.com --- fpu/softfloat.c | 45 + include/fpu/softfloat.h | 22 ++ 2 files

[Qemu-devel] [PATCH 02/19] Add set_fprf Argument to fload_invalid_op_excp()

2013-10-24 Thread Tom Musta
of the FPRF field is made conditional via a parameter. All invocations of this routine in existing instructions are modified to pass 1 and thus retain their current behavior. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 103 +-- 1

[Qemu-devel] [PATCH 04/19] Add VSX ISA2.06 xadd Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX floating point add instructions that are defined by V2.06 of the PowerPC ISA: xsadddp, xvadddp and xvaddsp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 46 ++ target-ppc/helper.h |6

[Qemu-devel] [PATCH 03/19] General Support for VSX Helpers

2013-10-24 Thread Tom Musta
This patch adds general support that will be used by the VSX helper routines: - a union describing the various VSR subfields. - access routines to get and set VSRs - VSX decoders - a general routine to generate a handler that invokes a VSX helper. Signed-off-by: Tom Musta tommu

[Qemu-devel] [PATCH 05/19] Add VSX ISA2.06 xsub Instructions

2013-10-24 Thread Tom Musta
This patch adds the floating point subtraction instructions defined by V2.06 of the PowerPC ISA: xssubdp, xvsubdp and xvsubsp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 46 ++ target-ppc/helper.h |3

[Qemu-devel] [PATCH 06/19] Add VSX ISA2.06 xmul Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX floating point multiply instructions defined by V2.06 of the PowerPC ISA: xsmuldp, xvmuldp, xvmulsp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 47 +++ target-ppc/helper.h |3 +++ target

[Qemu-devel] [PATCH 07/19] Add VSX ISA2.06 xdiv Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX floating point divide instructions defined by V2.06 of the PowerPC ISA: xsdivdp, xvdivdp, xvdivsp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 52 +++ target-ppc/helper.h |3 ++ target

[Qemu-devel] [PATCH 10/19] Add VSX ISA2.06 xrsqrte Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX floating point reciprocal square root estimate instructions defined by V2.06 of the PowerPC ISA: xsrsqrtedp, xvrsqrtedp, xvrsqrtesp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 44 target-ppc

[Qemu-devel] [PATCH 09/19] Add VSX ISA2.06 xsqrt Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX floating point square root instructions defined by V2.06 of the PowerPC ISA: xssqrtdp, xvsqrtdp, xvsqrtsp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 43 +++ target-ppc/helper.h |3

[Qemu-devel] [PATCH 12/19] Add VSX ISA2.06 xtsqrt Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX floating point test for software square root instructions defined by V2.06 of the PowerPC ISA: xstsqrtdp, xvtsqrtdp, xvtsqrtsp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 52 +++ target-ppc

[Qemu-devel] [PATCH 14/19] Add VSX xscmp*dp Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX scalar floating point compare ordered and unordered instructions. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 39 +++ target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files

[Qemu-devel] [PATCH 15/19] Add VSX xmax/xmin Instructions

2013-10-24 Thread Tom Musta
as well as one might think. Therefore specific routines for comparing 64 and 32 bit floating point numbers are implemented in the PowerPC helper code. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 162 +++ target-ppc/helper.h

[Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions

2013-10-24 Thread Tom Musta
- xsnmaddmdp, xvnmaddmdp, xvnmaddmsp - xsnmsubadp, xvnmsubadp, xvnmsubasp - xsnmsubmdp, xvnmsubmdp, xvnmsubmsp Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 106 +++ target-ppc/helper.h | 24 +++ target-ppc

[Qemu-devel] [PATCH 16/19] Add VSX Vector Compare Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX floating point compare vector instructions: - xvcmpeqdp[.], xvcmpgedp[.], xvcmpgtdp[.] - xvcmpeqsp[.], xvcmpgesp[.], xvcmpgtsp[.] Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 58 +++ target

[Qemu-devel] [PATCH 17/19] Add VSX Floating Point to Floating Point Conversion Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX instructions that convert between floating point formats: xscvdpsp, xscvspdp, xvcvdpsp, xvcvspdp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 46 ++ target-ppc/helper.h |4 target

[Qemu-devel] [PATCH 19/19] Add VSX Rounding Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX Round to Floating Point Integer instructions: - xsrdpi, xsrdpic, xsrdpim, xsrdpip, xsrdpiz - xvrdpi, xvrdpic, xvrdpim, xvrdpip, xvrdpiz - xvrspi, xvrspic, xvrspim, xvrspip, xvrspiz Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 68

[Qemu-devel] [PATCH 18/19] Add VSX ISA2.06 Integer Conversion Instructions

2013-10-24 Thread Tom Musta
, xvcvuxddp, xvcvuxwdp - xvcvsxdsp, xscvsxwsp, xvcvuxdsp, xvcvuxwsp Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 108 +++ target-ppc/helper.h | 22 ++ target-ppc/translate.c | 44 +++ 3

[Qemu-devel] [PATCH 08/19] Add VSX ISA2.06 xre Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX floating point reciprocal estimate instructions defined by V2.06 of the PowerPC ISA: xsredp, xvredp, xvresp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 35 +++ target-ppc/helper.h |3 +++ target-ppc

[Qemu-devel] [PATCH 11/19] Add VSX ISA2.06 xtdiv Instructions

2013-10-24 Thread Tom Musta
This patch adds the VSX floating point test for software divide instructions defined by V2.06 of the PowerPC ISA: xstdivdp, xvtdivdp, and xvtdivsp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 55 +++ target-ppc/helper.h

Re: [Qemu-devel] [PATCH 03/19] General Support for VSX Helpers

2013-10-24 Thread Tom Musta
On 10/24/2013 1:51 PM, Richard Henderson wrote: On 10/24/2013 09:19 AM, Tom Musta wrote: +#define GEN_VSX_HELPER_2(name, op1, op2, inval, type) \ +static void gen_##name(DisasContext * ctx

Re: [Qemu-devel] [PATCH 15/19] Add VSX xmax/xmin Instructions

2013-10-24 Thread Tom Musta
On 10/24/2013 3:45 PM, Richard Henderson wrote: On 10/24/2013 09:26 AM, Tom Musta wrote: Because of the Power ISA definitions of maximum and minimum on various boundary cases, the standard softfloat comparison routines (e.g. float64_lt) do not work as well as one might think. Therefore

Re: [Qemu-devel] [PATCH 01/19] Add New softfloat Routines for VSX

2013-10-25 Thread Tom Musta
Peter: Thanks for your feedback. Responses below. On 10/25/2013 6:55 AM, Peter Maydell wrote: On 24 October 2013 17:17, Tom Musta tommu...@gmail.com wrote: This patch adds routines to the softfloat library that are useful for the PowerPC VSX implementation. The routines are, however

Re: [Qemu-devel] [PATCH 01/19] Add New softfloat Routines for VSX

2013-10-25 Thread Tom Musta
On 10/25/2013 6:44 AM, Peter Maydell wrote: On 25 October 2013 12:34, Alex Bennée alex.ben...@linaro.org wrote: Is it worth adding some sort of test into make check to defend these softfloat functions against unintentional breakage? It would certainly be worthwhile as soon as multiple arches

Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions

2013-10-25 Thread Tom Musta
On 10/24/2013 3:38 PM, Richard Henderson wrote: On 10/24/2013 09:25 AM, Tom Musta wrote: \ snip +ft1 = tp##_to_##btp(s-fld[i], env-fp_status); \ +ft0 = btp##_##sum(ft0, ft1, env-fp_status

Re: [Qemu-devel] [PATCH 15/19] Add VSX xmax/xmin Instructions

2013-10-25 Thread Tom Musta
On 10/24/2013 5:10 PM, Peter Maydell wrote: Can't you use the min and max softfloat functions? Those are there specifically because the corner cases mean you can't implement them using the comparisons. (For instance for the example you quote of max(-0.0, +0.0) they return +0.0 as you require.)

Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions

2013-10-25 Thread Tom Musta
On 10/24/2013 3:38 PM, Richard Henderson wrote: On 10/24/2013 09:25 AM, Tom Musta wrote: \ +ft0 = tp##_to_##btp(xa.fld[i], env-fp_status); \ +ft1 = tp##_to_##btp(m-fld[i], env-fp_status

Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions

2013-10-25 Thread Tom Musta
On 10/25/2013 11:42 AM, Richard Henderson wrote: I believe that a better implementation could use float*_muladd, and check the result for float_flag_invalid. If set, compute the intermediate product so you can figure out the VXISI setting. But we'd expect that to be an unlikely path.

[Qemu-devel] [PATCH V2 00/19] PowerPC VSX Stage 3

2013-10-29 Thread Tom Musta
From 89de52ee03f68cef1f3343d3275162427ec22ded Mon Sep 17 00:00:00 2001 From: Tom Musta tommu...@gmail.com Date: Tue, 29 Oct 2013 07:52:19 -0500 Subject: To: qemu-...@nongnu.org This is the third series of patches to add PowerPC VSX emulation support to QEMU. This series adds the floating point

[Qemu-devel] [PATCH V2 01/19] Fix float64_to_uint64

2013-10-29 Thread Tom Musta
the softfloat-2a or -2b license. V2: Added softfloat license statement. V3: Modified to meet QEMU coding conventions. Signed-off-by: Tom Musta tommu...@gmail.com --- fpu/softfloat.c | 95 ++- 1 files changed, 87 insertions(+), 8 deletions(-) diff

[Qemu-devel] [PATCH V2 02/19] Add float32_to_uint64()

2013-10-29 Thread Tom Musta
-by: Tom Musta tommu...@gmail.com --- fpu/softfloat.c | 45 + include/fpu/softfloat.h |1 + 2 files changed, 46 insertions(+), 0 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 3070eaa..cb03dca 100644 --- a/fpu/softfloat.c

[Qemu-devel] [PATCH V2 03/19] Add set_fprf Argument to fload_invalid_op_excp()

2013-10-29 Thread Tom Musta
of the FPRF field is made conditional via a parameter. All invocations of this routine in existing instructions are modified to pass 1 and thus retain their current behavior. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 103 +-- 1

[Qemu-devel] [PATCH V2 05/19] Add VSX ISA2.06 xadd/xsub Instructions

2013-10-29 Thread Tom Musta
This patch adds the floating point addition and subtraction instructions defined by V2.06 of the PowerPC ISA: xssubdp, xvsubdp and xvsubsp. V2: re-implemented helper macro and combined add and substract. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 51

[Qemu-devel] [PATCH V2 04/19] General Support for VSX Helpers

2013-10-29 Thread Tom Musta
This patch adds general support that will be used by the VSX helper routines: - a union describing the various VSR subfields. - access routines to get and set VSRs - VSX decoders - a general routine to generate a handler that invokes a VSX helper. Signed-off-by: Tom Musta tommu

[Qemu-devel] [PATCH V2 07/19] Add VSX ISA2.06 xdiv Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX floating point divide instructions defined by V2.06 of the PowerPC ISA: xsdivdp, xvdivdp, xvdivsp. V2: re-implemented the VSX_DIV macro. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 49

[Qemu-devel] [PATCH V2 06/19] Add VSX ISA2.06 xmul Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX floating point multiply instructions defined by V2.06 of the PowerPC ISA: xsmuldp, xvmuldp, xvmulsp. V2: re-implemented VSX_MUL macro. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 46 ++ target

[Qemu-devel] [PATCH V2 08/19] Add VSX ISA2.06 xre Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX floating point reciprocal estimate instructions defined by V2.06 of the PowerPC ISA: xsredp, xvredp, xvresp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 35 +++ target-ppc/helper.h |3 +++ target-ppc

[Qemu-devel] [PATCH V2 09/19] Add VSX ISA2.06 xsqrt Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX floating point square root instructions defined by V2.06 of the PowerPC ISA: xssqrtdp, xvsqrtdp, xvsqrtsp. V2: re-implemented the VSX_SQRT macro. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 44

[Qemu-devel] [PATCH V2 12/19] Add VSX ISA2.06 xtsqrt Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX floating point test for software square root instructions defined by V2.06 of the PowerPC ISA: xstsqrtdp, xvtsqrtdp, xvtsqrtsp. V2: (a) using locally implemented ppc_float*_get_unbiased_exp routines (b) eliminated dependency on float*_is_denormal(). Signed-off-by: Tom

[Qemu-devel] [PATCH V2 11/19] Add VSX ISA2.06 xtdiv Instructions

2013-10-29 Thread Tom Musta
-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 67 +++ target-ppc/helper.h |3 ++ target-ppc/translate.c |6 3 files changed, 76 insertions(+), 0 deletions(-) diff --git a/target-ppc/fpu_helper.c b/target-ppc

[Qemu-devel] [PATCH V2 13/19] Add VSX ISA2.06 Multiply Add Instructions

2013-10-29 Thread Tom Musta
- xsnmaddmdp, xvnmaddmdp, xvnmaddmsp - xsnmsubadp, xvnmsubadp, xvnmsubasp - xsnmsubmdp, xvnmsubmdp, xvnmsubmsp V2: reworked implementation per comments from Richard Henderson and Peter Maydell. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 100

[Qemu-devel] [PATCH V2 14/19] Add VSX xscmp*dp Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX scalar floating point compare ordered and unordered instructions. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 39 +++ target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files

[Qemu-devel] [PATCH V2 17/19] Add VSX Floating Point to Floating Point Conversion Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX instructions that convert between floating point formats: xscvdpsp, xscvspdp, xvcvdpsp, xvcvspdp. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 46 ++ target-ppc/helper.h |4 target

[Qemu-devel] [PATCH V2 15/19] Add VSX xmax/xmin Instructions

2013-10-29 Thread Tom Musta
as well as one might think. Therefore specific routines for comparing 64 and 32 bit floating point numbers are implemented in the PowerPC helper code. V2: consolidated into a single macro, using the softfloat float*_max/float*_min routines. Signed-off-by: Tom Musta tommu...@gmail.com --- target

[Qemu-devel] [PATCH V2 16/19] Add VSX Vector Compare Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX floating point compare vector instructions: - xvcmpeqdp[.], xvcmpgedp[.], xvcmpgtdp[.] - xvcmpeqsp[.], xvcmpgesp[.], xvcmpgtsp[.] Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 57 +++ target

[Qemu-devel] [PATCH V2 18/19] Add VSX ISA2.06 Integer Conversion Instructions

2013-10-29 Thread Tom Musta
, xvcvuxddp, xvcvuxwdp - xvcvsxdsp, xscvsxwsp, xvcvuxdsp, xvcvuxwsp Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 107 +++ target-ppc/helper.h | 22 ++ target-ppc/translate.c | 44 +++ 3

[Qemu-devel] [PATCH V2 19/19] Add VSX Rounding Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX Round to Floating Point Integer instructions: - xsrdpi, xsrdpic, xsrdpim, xsrdpip, xsrdpiz - xvrdpi, xvrdpic, xvrdpim, xvrdpip, xvrdpiz - xvrspi, xvrspic, xvrspim, xvrspip, xvrspiz Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 68

[Qemu-devel] [PATCH V2 10/19] Add VSX ISA2.06 xrsqrte Instructions

2013-10-29 Thread Tom Musta
This patch adds the VSX floating point reciprocal square root estimate instructions defined by V2.06 of the PowerPC ISA: xsrsqrtedp, xvrsqrtedp, xvrsqrtesp. V2: re-implemented VSX_RSQRTE macro. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/fpu_helper.c | 45

Re: [Qemu-devel] [Qemu-ppc] [v2 02/13] Add lxsdx

2013-11-01 Thread Tom Musta
On 10/31/2013 5:58 PM, Alexander Graf wrote: On 11.10.2013, at 05:57, Tom Musta tommu...@gmail.com wrote: This patch adds the Load VSX Scalar Doubleowrd Indexed (lxsdx) instruction. The lower 8 bytes of the target register are undefined; this implementation leaves those bytes unaltered

[Qemu-devel] [PATCH V3 00/13] Stage 2 VSX Support

2013-11-01 Thread Tom Musta
instructions. V2: reworked patches 4, 10, 11 and 12 per comments from Richard Henderson (thanks, Richard!) V3: reworked patches 7 8 per comments from Paolo Bonzini (thanks, Paulo) Tom Musta (13): Abandon GEN_VSX_* macros Add lxsdx Add lxvdsx Add lxvw4x Add stxsdx Add stxvw4x Add

[Qemu-devel] [PATCH V3 01/13] Abandon GEN_VSX_* macros

2013-11-01 Thread Tom Musta
This patch eliminates the GEN_VSX_LXVNX/GEN_VSX_STXVNX macros which did not provide significant value above the general GEN_HANDLER_E macro. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 12 ++-- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [PATCH V3 05/13] Add stxsdx

2013-11-01 Thread Tom Musta
This patch adds the Store VSX Scalar Doubleword Indexed (stxsdx) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index

[Qemu-devel] [PATCH V3 02/13] Add lxsdx

2013-11-01 Thread Tom Musta
This patch adds the Load VSX Scalar Doubleowrd Indexed (lxsdx) instruction. The lower 8 bytes of the target register are undefined; this implementation leaves those bytes unaltered. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 16 1 files changed

[Qemu-devel] [PATCH V3 04/13] Add lxvw4x

2013-11-01 Thread Tom Musta
This patch adds the Load VSX Vector Word*4 Indexed (lxvw4x) instruction. V2: changed to use deposit_i64 per Richard Henderson's review. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 29 + 1 files changed, 29 insertions(+), 0 deletions

[Qemu-devel] [PATCH V3 03/13] Add lxvdsx

2013-11-01 Thread Tom Musta
This patch adds the Load VSX Vector Doubleword Splat Indexed (lxvdsx) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c

[Qemu-devel] [PATCH V3 09/13] Add Power7 VSX Logical Instructions

2013-11-01 Thread Tom Musta
This patch adds the VSX logical instructions that are defined by the Version 2.06 Power ISA (aka Power7): - xxland - xxlandc - xxlor - xxlxor - xxlnor Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 29 + 1 files changed, 29

[Qemu-devel] [PATCH V3 08/13] Add VSX Vector Move Instructions

2013-11-01 Thread Tom Musta
Single-Precision - xvnabssp - Vector Negative Absolute Value Single-Precision - xvnegsp - Vector Negate Single-Precision - xvcpsgnsp - Vector Copy Sign Single-Precision V3: Per Paolo Bonzini's suggestion, used a temporary for the sign mask and andc. Signed-off-by: Tom Musta tommu...@gmail.com

[Qemu-devel] [PATCH V3 11/13] Add xxsel

2013-11-01 Thread Tom Musta
with two macros (GEN_XXSEL_ROW and GEN_XX_SEL). V2: (1) eliminated unecessary XXSEL macro (2) tighter implementation using tcg_gen_andc_i64. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 76 1 files changed, 76 insertions

[Qemu-devel] [PATCH V3 07/13] Add VSX Scalar Move Instructions

2013-11-01 Thread Tom Musta
Paolo Bonzini, moved the sign mask into a temporary and used andc. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 69 1 files changed, 69 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc

[Qemu-devel] [PATCH V3 12/13] Add xxspltw

2013-11-01 Thread Tom Musta
This patch adds the VSX Splat Word (xxsplatw) instruction. This is the first instruction to use the UIM immediate field and consequently a decoder is also added. V2: reworked implementation per Richard Henderson's comments. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c

[Qemu-devel] [PATCH V3 10/13] Add xxmrgh/xxmrgl

2013-11-01 Thread Tom Musta
This patch adds the VSX Merge High Word and VSX Merge Low Word instructions. V2: Now implemented using deposit (per Richard Henderson's comment) Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 41 + 1 files changed, 41

[Qemu-devel] [PATCH V3 06/13] Add stxvw4x

2013-11-01 Thread Tom Musta
This patch adds the Store VSX Vector Word*4 Indexed (stxvw4x) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c

[Qemu-devel] [PATCH V3 13/13] Add xxsldwi

2013-11-01 Thread Tom Musta
This patch adds the VSX Shift Left Double by Word Immediate (xxsldwi) instruction. Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/translate.c | 62 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/target-ppc

  1   2   3   4   5   6   7   8   9   >