parisc: math-emu: Fix fall-through warnings

commit 6f1fce595b78b775d7fb585c15c2dc3a6994f96e upstream.

Fix lots of fallthrough warnings, e.g.:
arch/parisc/math-emu/fpudispatch.c:323:33: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Helge Deller 2021-09-01 22:18:18 +02:00 committed by Greg Kroah-Hartman
parent 3a9842b42e
commit b3b7f831a4

View File

@ -310,12 +310,15 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
r1 &= ~3; r1 &= ~3;
fpregs[t+3] = fpregs[r1+3]; fpregs[t+3] = fpregs[r1+3];
fpregs[t+2] = fpregs[r1+2]; fpregs[t+2] = fpregs[r1+2];
fallthrough;
case 1: /* double */ case 1: /* double */
fpregs[t+1] = fpregs[r1+1]; fpregs[t+1] = fpregs[r1+1];
fallthrough;
case 0: /* single */ case 0: /* single */
fpregs[t] = fpregs[r1]; fpregs[t] = fpregs[r1];
return(NOEXCEPTION); return(NOEXCEPTION);
} }
BUG();
case 3: /* FABS */ case 3: /* FABS */
switch (fmt) { switch (fmt) {
case 2: /* illegal */ case 2: /* illegal */
@ -325,13 +328,16 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
r1 &= ~3; r1 &= ~3;
fpregs[t+3] = fpregs[r1+3]; fpregs[t+3] = fpregs[r1+3];
fpregs[t+2] = fpregs[r1+2]; fpregs[t+2] = fpregs[r1+2];
fallthrough;
case 1: /* double */ case 1: /* double */
fpregs[t+1] = fpregs[r1+1]; fpregs[t+1] = fpregs[r1+1];
fallthrough;
case 0: /* single */ case 0: /* single */
/* copy and clear sign bit */ /* copy and clear sign bit */
fpregs[t] = fpregs[r1] & 0x7fffffff; fpregs[t] = fpregs[r1] & 0x7fffffff;
return(NOEXCEPTION); return(NOEXCEPTION);
} }
BUG();
case 6: /* FNEG */ case 6: /* FNEG */
switch (fmt) { switch (fmt) {
case 2: /* illegal */ case 2: /* illegal */
@ -341,13 +347,16 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
r1 &= ~3; r1 &= ~3;
fpregs[t+3] = fpregs[r1+3]; fpregs[t+3] = fpregs[r1+3];
fpregs[t+2] = fpregs[r1+2]; fpregs[t+2] = fpregs[r1+2];
fallthrough;
case 1: /* double */ case 1: /* double */
fpregs[t+1] = fpregs[r1+1]; fpregs[t+1] = fpregs[r1+1];
fallthrough;
case 0: /* single */ case 0: /* single */
/* copy and invert sign bit */ /* copy and invert sign bit */
fpregs[t] = fpregs[r1] ^ 0x80000000; fpregs[t] = fpregs[r1] ^ 0x80000000;
return(NOEXCEPTION); return(NOEXCEPTION);
} }
BUG();
case 7: /* FNEGABS */ case 7: /* FNEGABS */
switch (fmt) { switch (fmt) {
case 2: /* illegal */ case 2: /* illegal */
@ -357,13 +366,16 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
r1 &= ~3; r1 &= ~3;
fpregs[t+3] = fpregs[r1+3]; fpregs[t+3] = fpregs[r1+3];
fpregs[t+2] = fpregs[r1+2]; fpregs[t+2] = fpregs[r1+2];
fallthrough;
case 1: /* double */ case 1: /* double */
fpregs[t+1] = fpregs[r1+1]; fpregs[t+1] = fpregs[r1+1];
fallthrough;
case 0: /* single */ case 0: /* single */
/* copy and set sign bit */ /* copy and set sign bit */
fpregs[t] = fpregs[r1] | 0x80000000; fpregs[t] = fpregs[r1] | 0x80000000;
return(NOEXCEPTION); return(NOEXCEPTION);
} }
BUG();
case 4: /* FSQRT */ case 4: /* FSQRT */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -376,6 +388,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
case 3: /* quad not implemented */ case 3: /* quad not implemented */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
BUG();
case 5: /* FRND */ case 5: /* FRND */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -389,7 +402,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
} /* end of switch (subop) */ } /* end of switch (subop) */
BUG();
case 1: /* class 1 */ case 1: /* class 1 */
df = extru(ir,fpdfpos,2); /* get dest format */ df = extru(ir,fpdfpos,2); /* get dest format */
if ((df & 2) || (fmt & 2)) { if ((df & 2) || (fmt & 2)) {
@ -419,6 +432,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
case 3: /* dbl/dbl */ case 3: /* dbl/dbl */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
BUG();
case 1: /* FCNVXF */ case 1: /* FCNVXF */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -434,6 +448,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
return(dbl_to_dbl_fcnvxf(&fpregs[r1],0, return(dbl_to_dbl_fcnvxf(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 2: /* FCNVFX */ case 2: /* FCNVFX */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -449,6 +464,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
return(dbl_to_dbl_fcnvfx(&fpregs[r1],0, return(dbl_to_dbl_fcnvfx(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 3: /* FCNVFXT */ case 3: /* FCNVFXT */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -464,6 +480,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0, return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 5: /* FCNVUF (PA2.0 only) */ case 5: /* FCNVUF (PA2.0 only) */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -479,6 +496,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
return(dbl_to_dbl_fcnvuf(&fpregs[r1],0, return(dbl_to_dbl_fcnvuf(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 6: /* FCNVFU (PA2.0 only) */ case 6: /* FCNVFU (PA2.0 only) */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -494,6 +512,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
return(dbl_to_dbl_fcnvfu(&fpregs[r1],0, return(dbl_to_dbl_fcnvfu(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 7: /* FCNVFUT (PA2.0 only) */ case 7: /* FCNVFUT (PA2.0 only) */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -509,10 +528,11 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
return(dbl_to_dbl_fcnvfut(&fpregs[r1],0, return(dbl_to_dbl_fcnvfut(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 4: /* undefined */ case 4: /* undefined */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} /* end of switch subop */ } /* end of switch subop */
BUG();
case 2: /* class 2 */ case 2: /* class 2 */
fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS]; fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS];
r2 = extru(ir, fpr2pos, 5) * sizeof(double)/sizeof(u_int); r2 = extru(ir, fpr2pos, 5) * sizeof(double)/sizeof(u_int);
@ -590,6 +610,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
case 3: /* quad not implemented */ case 3: /* quad not implemented */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
BUG();
case 1: /* FTEST */ case 1: /* FTEST */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -609,8 +630,10 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
case 3: case 3:
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
BUG();
} /* end of switch subop */ } /* end of switch subop */
} /* end of else for PA1.0 & PA1.1 */ } /* end of else for PA1.0 & PA1.1 */
BUG();
case 3: /* class 3 */ case 3: /* class 3 */
r2 = extru(ir,fpr2pos,5) * sizeof(double)/sizeof(u_int); r2 = extru(ir,fpr2pos,5) * sizeof(double)/sizeof(u_int);
if (r2 == 0) if (r2 == 0)
@ -633,6 +656,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
case 3: /* quad not implemented */ case 3: /* quad not implemented */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
BUG();
case 1: /* FSUB */ case 1: /* FSUB */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -645,6 +669,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
case 3: /* quad not implemented */ case 3: /* quad not implemented */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
BUG();
case 2: /* FMPY */ case 2: /* FMPY */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -657,6 +682,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
case 3: /* quad not implemented */ case 3: /* quad not implemented */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
BUG();
case 3: /* FDIV */ case 3: /* FDIV */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -669,6 +695,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
case 3: /* quad not implemented */ case 3: /* quad not implemented */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
BUG();
case 4: /* FREM */ case 4: /* FREM */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -681,6 +708,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
case 3: /* quad not implemented */ case 3: /* quad not implemented */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} }
BUG();
} /* end of class 3 switch */ } /* end of class 3 switch */
} /* end of switch(class) */ } /* end of switch(class) */
@ -736,10 +764,12 @@ u_int fpregs[];
return(MAJOR_0E_EXCP); return(MAJOR_0E_EXCP);
case 1: /* double */ case 1: /* double */
fpregs[t+1] = fpregs[r1+1]; fpregs[t+1] = fpregs[r1+1];
fallthrough;
case 0: /* single */ case 0: /* single */
fpregs[t] = fpregs[r1]; fpregs[t] = fpregs[r1];
return(NOEXCEPTION); return(NOEXCEPTION);
} }
BUG();
case 3: /* FABS */ case 3: /* FABS */
switch (fmt) { switch (fmt) {
case 2: case 2:
@ -747,10 +777,12 @@ u_int fpregs[];
return(MAJOR_0E_EXCP); return(MAJOR_0E_EXCP);
case 1: /* double */ case 1: /* double */
fpregs[t+1] = fpregs[r1+1]; fpregs[t+1] = fpregs[r1+1];
fallthrough;
case 0: /* single */ case 0: /* single */
fpregs[t] = fpregs[r1] & 0x7fffffff; fpregs[t] = fpregs[r1] & 0x7fffffff;
return(NOEXCEPTION); return(NOEXCEPTION);
} }
BUG();
case 6: /* FNEG */ case 6: /* FNEG */
switch (fmt) { switch (fmt) {
case 2: case 2:
@ -758,10 +790,12 @@ u_int fpregs[];
return(MAJOR_0E_EXCP); return(MAJOR_0E_EXCP);
case 1: /* double */ case 1: /* double */
fpregs[t+1] = fpregs[r1+1]; fpregs[t+1] = fpregs[r1+1];
fallthrough;
case 0: /* single */ case 0: /* single */
fpregs[t] = fpregs[r1] ^ 0x80000000; fpregs[t] = fpregs[r1] ^ 0x80000000;
return(NOEXCEPTION); return(NOEXCEPTION);
} }
BUG();
case 7: /* FNEGABS */ case 7: /* FNEGABS */
switch (fmt) { switch (fmt) {
case 2: case 2:
@ -769,10 +803,12 @@ u_int fpregs[];
return(MAJOR_0E_EXCP); return(MAJOR_0E_EXCP);
case 1: /* double */ case 1: /* double */
fpregs[t+1] = fpregs[r1+1]; fpregs[t+1] = fpregs[r1+1];
fallthrough;
case 0: /* single */ case 0: /* single */
fpregs[t] = fpregs[r1] | 0x80000000; fpregs[t] = fpregs[r1] | 0x80000000;
return(NOEXCEPTION); return(NOEXCEPTION);
} }
BUG();
case 4: /* FSQRT */ case 4: /* FSQRT */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -785,6 +821,7 @@ u_int fpregs[];
case 3: case 3:
return(MAJOR_0E_EXCP); return(MAJOR_0E_EXCP);
} }
BUG();
case 5: /* FRMD */ case 5: /* FRMD */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -798,7 +835,7 @@ u_int fpregs[];
return(MAJOR_0E_EXCP); return(MAJOR_0E_EXCP);
} }
} /* end of switch (subop */ } /* end of switch (subop */
BUG();
case 1: /* class 1 */ case 1: /* class 1 */
df = extru(ir,fpdfpos,2); /* get dest format */ df = extru(ir,fpdfpos,2); /* get dest format */
/* /*
@ -826,6 +863,7 @@ u_int fpregs[];
case 3: /* dbl/dbl */ case 3: /* dbl/dbl */
return(MAJOR_0E_EXCP); return(MAJOR_0E_EXCP);
} }
BUG();
case 1: /* FCNVXF */ case 1: /* FCNVXF */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -841,6 +879,7 @@ u_int fpregs[];
return(dbl_to_dbl_fcnvxf(&fpregs[r1],0, return(dbl_to_dbl_fcnvxf(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 2: /* FCNVFX */ case 2: /* FCNVFX */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -856,6 +895,7 @@ u_int fpregs[];
return(dbl_to_dbl_fcnvfx(&fpregs[r1],0, return(dbl_to_dbl_fcnvfx(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 3: /* FCNVFXT */ case 3: /* FCNVFXT */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -871,6 +911,7 @@ u_int fpregs[];
return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0, return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 5: /* FCNVUF (PA2.0 only) */ case 5: /* FCNVUF (PA2.0 only) */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -886,6 +927,7 @@ u_int fpregs[];
return(dbl_to_dbl_fcnvuf(&fpregs[r1],0, return(dbl_to_dbl_fcnvuf(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 6: /* FCNVFU (PA2.0 only) */ case 6: /* FCNVFU (PA2.0 only) */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -901,6 +943,7 @@ u_int fpregs[];
return(dbl_to_dbl_fcnvfu(&fpregs[r1],0, return(dbl_to_dbl_fcnvfu(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 7: /* FCNVFUT (PA2.0 only) */ case 7: /* FCNVFUT (PA2.0 only) */
switch(fmt) { switch(fmt) {
case 0: /* sgl/sgl */ case 0: /* sgl/sgl */
@ -916,9 +959,11 @@ u_int fpregs[];
return(dbl_to_dbl_fcnvfut(&fpregs[r1],0, return(dbl_to_dbl_fcnvfut(&fpregs[r1],0,
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 4: /* undefined */ case 4: /* undefined */
return(MAJOR_0C_EXCP); return(MAJOR_0C_EXCP);
} /* end of switch subop */ } /* end of switch subop */
BUG();
case 2: /* class 2 */ case 2: /* class 2 */
/* /*
* Be careful out there. * Be careful out there.
@ -994,6 +1039,7 @@ u_int fpregs[];
} }
} /* end of switch subop */ } /* end of switch subop */
} /* end of else for PA1.0 & PA1.1 */ } /* end of else for PA1.0 & PA1.1 */
BUG();
case 3: /* class 3 */ case 3: /* class 3 */
/* /*
* Be careful out there. * Be careful out there.
@ -1026,6 +1072,7 @@ u_int fpregs[];
return(dbl_fadd(&fpregs[r1],&fpregs[r2], return(dbl_fadd(&fpregs[r1],&fpregs[r2],
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 1: /* FSUB */ case 1: /* FSUB */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -1035,6 +1082,7 @@ u_int fpregs[];
return(dbl_fsub(&fpregs[r1],&fpregs[r2], return(dbl_fsub(&fpregs[r1],&fpregs[r2],
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 2: /* FMPY or XMPYU */ case 2: /* FMPY or XMPYU */
/* /*
* check for integer multiply (x bit set) * check for integer multiply (x bit set)
@ -1071,6 +1119,7 @@ u_int fpregs[];
&fpregs[r2],&fpregs[t],status)); &fpregs[r2],&fpregs[t],status));
} }
} }
BUG();
case 3: /* FDIV */ case 3: /* FDIV */
switch (fmt) { switch (fmt) {
case 0: case 0:
@ -1080,6 +1129,7 @@ u_int fpregs[];
return(dbl_fdiv(&fpregs[r1],&fpregs[r2], return(dbl_fdiv(&fpregs[r1],&fpregs[r2],
&fpregs[t],status)); &fpregs[t],status));
} }
BUG();
case 4: /* FREM */ case 4: /* FREM */
switch (fmt) { switch (fmt) {
case 0: case 0: