mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-09 21:47:33 +00:00
target/mips: Fix block-comment-related issues in msa_helper.c
Fix block-comment-related issues reported by checkpatch for file msa_helper.c. Backports commit 7cc8a7220de39d77894edcb376378f280ec9c4c2 from qemu
This commit is contained in:
parent
b9d8008931
commit
10b0f86caf
|
@ -1974,8 +1974,10 @@ static inline int update_msacsr(CPUMIPSState *env, int action, int denormal)
|
||||||
c &= ~FP_UNDERFLOW;
|
c &= ~FP_UNDERFLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reciprocal operations set only Inexact when valid and not
|
/*
|
||||||
divide by zero */
|
* Reciprocal operations set only Inexact when valid and not
|
||||||
|
* divide by zero
|
||||||
|
*/
|
||||||
if ((action & RECIPROCAL_INEXACT) &&
|
if ((action & RECIPROCAL_INEXACT) &&
|
||||||
(c & (FP_INVALID | FP_DIV0)) == 0) {
|
(c & (FP_INVALID | FP_DIV0)) == 0) {
|
||||||
c = FP_INEXACT;
|
c = FP_INEXACT;
|
||||||
|
@ -1984,15 +1986,19 @@ static inline int update_msacsr(CPUMIPSState *env, int action, int denormal)
|
||||||
cause = c & enable; /* all current enabled exceptions */
|
cause = c & enable; /* all current enabled exceptions */
|
||||||
|
|
||||||
if (cause == 0) {
|
if (cause == 0) {
|
||||||
/* No enabled exception, update the MSACSR Cause
|
/*
|
||||||
with all current exceptions */
|
* No enabled exception, update the MSACSR Cause
|
||||||
|
* with all current exceptions
|
||||||
|
*/
|
||||||
SET_FP_CAUSE(env->active_tc.msacsr,
|
SET_FP_CAUSE(env->active_tc.msacsr,
|
||||||
(GET_FP_CAUSE(env->active_tc.msacsr) | c));
|
(GET_FP_CAUSE(env->active_tc.msacsr) | c));
|
||||||
} else {
|
} else {
|
||||||
/* Current exceptions are enabled */
|
/* Current exceptions are enabled */
|
||||||
if ((env->active_tc.msacsr & MSACSR_NX_MASK) == 0) {
|
if ((env->active_tc.msacsr & MSACSR_NX_MASK) == 0) {
|
||||||
/* Exception(s) will trap, update MSACSR Cause
|
/*
|
||||||
with all enabled exceptions */
|
* Exception(s) will trap, update MSACSR Cause
|
||||||
|
* with all enabled exceptions
|
||||||
|
*/
|
||||||
SET_FP_CAUSE(env->active_tc.msacsr,
|
SET_FP_CAUSE(env->active_tc.msacsr,
|
||||||
(GET_FP_CAUSE(env->active_tc.msacsr) | c));
|
(GET_FP_CAUSE(env->active_tc.msacsr) | c));
|
||||||
}
|
}
|
||||||
|
@ -3056,9 +3062,11 @@ void helper_msa_fexdo_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
|
||||||
switch (df) {
|
switch (df) {
|
||||||
case DF_WORD:
|
case DF_WORD:
|
||||||
for (i = 0; i < DF_ELEMENTS(DF_WORD); i++) {
|
for (i = 0; i < DF_ELEMENTS(DF_WORD); i++) {
|
||||||
/* Half precision floats come in two formats: standard
|
/*
|
||||||
IEEE and "ARM" format. The latter gains extra exponent
|
* Half precision floats come in two formats: standard
|
||||||
range by omitting the NaN/Inf encodings. */
|
* IEEE and "ARM" format. The latter gains extra exponent
|
||||||
|
* range by omitting the NaN/Inf encodings.
|
||||||
|
*/
|
||||||
flag ieee = 1;
|
flag ieee = 1;
|
||||||
|
|
||||||
MSA_FLOAT_BINOP(Lh(pwx, i), from_float32, pws->w[i], ieee, 16);
|
MSA_FLOAT_BINOP(Lh(pwx, i), from_float32, pws->w[i], ieee, 16);
|
||||||
|
@ -3614,9 +3622,11 @@ void helper_msa_fexupl_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
|
||||||
switch (df) {
|
switch (df) {
|
||||||
case DF_WORD:
|
case DF_WORD:
|
||||||
for (i = 0; i < DF_ELEMENTS(DF_WORD); i++) {
|
for (i = 0; i < DF_ELEMENTS(DF_WORD); i++) {
|
||||||
/* Half precision floats come in two formats: standard
|
/*
|
||||||
IEEE and "ARM" format. The latter gains extra exponent
|
* Half precision floats come in two formats: standard
|
||||||
range by omitting the NaN/Inf encodings. */
|
* IEEE and "ARM" format. The latter gains extra exponent
|
||||||
|
* range by omitting the NaN/Inf encodings.
|
||||||
|
*/
|
||||||
flag ieee = 1;
|
flag ieee = 1;
|
||||||
|
|
||||||
MSA_FLOAT_BINOP(pwx->w[i], from_float16, Lh(pws, i), ieee, 32);
|
MSA_FLOAT_BINOP(pwx->w[i], from_float16, Lh(pws, i), ieee, 32);
|
||||||
|
@ -3648,9 +3658,11 @@ void helper_msa_fexupr_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
|
||||||
switch (df) {
|
switch (df) {
|
||||||
case DF_WORD:
|
case DF_WORD:
|
||||||
for (i = 0; i < DF_ELEMENTS(DF_WORD); i++) {
|
for (i = 0; i < DF_ELEMENTS(DF_WORD); i++) {
|
||||||
/* Half precision floats come in two formats: standard
|
/*
|
||||||
IEEE and "ARM" format. The latter gains extra exponent
|
* Half precision floats come in two formats: standard
|
||||||
range by omitting the NaN/Inf encodings. */
|
* IEEE and "ARM" format. The latter gains extra exponent
|
||||||
|
* range by omitting the NaN/Inf encodings.
|
||||||
|
*/
|
||||||
flag ieee = 1;
|
flag ieee = 1;
|
||||||
|
|
||||||
MSA_FLOAT_BINOP(pwx->w[i], from_float16, Rh(pws, i), ieee, 32);
|
MSA_FLOAT_BINOP(pwx->w[i], from_float16, Rh(pws, i), ieee, 32);
|
||||||
|
|
Loading…
Reference in a new issue