[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 40/43] target/ppc: Add set_vscr_sat
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 40/43] target/ppc: Add set_vscr_sat |
Date: |
Tue, 19 Feb 2019 01:30:46 +1100 |
From: Richard Henderson <address@hidden>
This is required before changing the representation of the register.
Signed-off-by: Richard Henderson <address@hidden>
Acked-by: David Gibson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/int_helper.c | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
index ec3ef9ff3f..1d8a4b530b 100644
--- a/target/ppc/int_helper.c
+++ b/target/ppc/int_helper.c
@@ -468,6 +468,11 @@ uint32_t helper_mfvscr(CPUPPCState *env)
return env->vscr;
}
+static inline void set_vscr_sat(CPUPPCState *env)
+{
+ env->vscr |= 1 << VSCR_SAT;
+}
+
void helper_vaddcuw(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
{
int i;
@@ -581,7 +586,7 @@ VARITHFPFMA(nmsubfp, float_muladd_negate_result |
float_muladd_negate_c);
} \
} \
if (sat) { \
- env->vscr |= (1 << VSCR_SAT); \
+ set_vscr_sat(env); \
} \
}
#define VARITHSAT_SIGNED(suffix, element, optype, cvt) \
@@ -853,7 +858,7 @@ void helper_vcmpbfp_dot(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a,
} \
} \
if (sat) { \
- env->vscr |= (1 << VSCR_SAT); \
+ set_vscr_sat(env); \
} \
}
VCT(uxs, cvtsduw, u32)
@@ -900,7 +905,7 @@ void helper_vmhaddshs(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a,
}
if (sat) {
- env->vscr |= (1 << VSCR_SAT);
+ set_vscr_sat(env);
}
}
@@ -917,7 +922,7 @@ void helper_vmhraddshs(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a,
}
if (sat) {
- env->vscr |= (1 << VSCR_SAT);
+ set_vscr_sat(env);
}
}
@@ -1029,7 +1034,7 @@ void helper_vmsumshs(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a,
}
if (sat) {
- env->vscr |= (1 << VSCR_SAT);
+ set_vscr_sat(env);
}
}
@@ -1082,7 +1087,7 @@ void helper_vmsumuhs(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a,
}
if (sat) {
- env->vscr |= (1 << VSCR_SAT);
+ set_vscr_sat(env);
}
}
@@ -1599,7 +1604,7 @@ void helper_vpkpx(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t
*b)
} \
*r = result; \
if (dosat && sat) { \
- env->vscr |= (1 << VSCR_SAT); \
+ set_vscr_sat(env); \
} \
}
#define I(x, y) (x)
@@ -2043,7 +2048,7 @@ void helper_vsumsws(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a, ppc_avr_t *b)
*r = result;
if (sat) {
- env->vscr |= (1 << VSCR_SAT);
+ set_vscr_sat(env);
}
}
@@ -2066,7 +2071,7 @@ void helper_vsum2sws(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a, ppc_avr_t *b)
*r = result;
if (sat) {
- env->vscr |= (1 << VSCR_SAT);
+ set_vscr_sat(env);
}
}
@@ -2085,7 +2090,7 @@ void helper_vsum4sbs(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a, ppc_avr_t *b)
}
if (sat) {
- env->vscr |= (1 << VSCR_SAT);
+ set_vscr_sat(env);
}
}
@@ -2102,7 +2107,7 @@ void helper_vsum4shs(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a, ppc_avr_t *b)
}
if (sat) {
- env->vscr |= (1 << VSCR_SAT);
+ set_vscr_sat(env);
}
}
@@ -2121,7 +2126,7 @@ void helper_vsum4ubs(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a, ppc_avr_t *b)
}
if (sat) {
- env->vscr |= (1 << VSCR_SAT);
+ set_vscr_sat(env);
}
}
--
2.20.1
- [Qemu-ppc] [PULL 36/43] target/ppc: Use helper_mtvscr for reset and gdb, (continued)
- [Qemu-ppc] [PULL 36/43] target/ppc: Use helper_mtvscr for reset and gdb, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 28/43] target/ppc: convert vaddu[b, h, w, d] and vsubu[b, h, w, d] over to use vector operations, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 26/43] xics: Drop the KVM ICS class, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 24/43] xics: Handle KVM interrupt presentation from "simple" ICS code, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 33/43] target/ppc: convert xxspltw to vector operations, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 39/43] target/ppc: Use mtvscr/mfvscr for vmstate, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 30/43] target/ppc: convert vsplt[bhw] to use vector operations, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 32/43] target/ppc: convert xxspltib to vector operations, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 37/43] target/ppc: Remove vscr_nj and vscr_sat, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 41/43] target/ppc: Split out VSCR_SAT to a vector field, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 40/43] target/ppc: Add set_vscr_sat,
David Gibson <=
- [Qemu-ppc] [PULL 43/43] target/ppc: convert vmin* and vmax* to vector operations, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 35/43] target/ppc: Pass integer to helper_mtvscr, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 38/43] target/ppc: Add helper_mfvscr, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 34/43] target/ppc: convert xxsel to vector operations, David Gibson, 2019/02/18
- [Qemu-ppc] [PULL 42/43] target/ppc: convert vadd*s and vsub*s to vector operations, David Gibson, 2019/02/18
- Re: [Qemu-ppc] [PULL 00/43] ppc-for-4.0 queue 20190219, Peter Maydell, 2019/02/19