提交 6175f5a0 编写于 作者: R Richard Henderson 提交者: David Gibson

target/ppc: Add set_vscr_sat

This is required before changing the representation of the register.
Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
Message-Id: <20190215100058.20015-15-mark.cave-ayland@ilande.co.uk>
Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
上级 596fff20
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册