Skip to content

Commit 6f1fce5

Browse files
committed
parisc: math-emu: Fix fall-through warnings
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>
1 parent 030f653 commit 6f1fce5

1 file changed

Lines changed: 53 additions & 3 deletions

File tree

arch/parisc/math-emu/fpudispatch.c

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,15 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
310310
r1 &= ~3;
311311
fpregs[t+3] = fpregs[r1+3];
312312
fpregs[t+2] = fpregs[r1+2];
313+
fallthrough;
313314
case 1: /* double */
314315
fpregs[t+1] = fpregs[r1+1];
316+
fallthrough;
315317
case 0: /* single */
316318
fpregs[t] = fpregs[r1];
317319
return(NOEXCEPTION);
318320
}
321+
BUG();
319322
case 3: /* FABS */
320323
switch (fmt) {
321324
case 2: /* illegal */
@@ -325,13 +328,16 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
325328
r1 &= ~3;
326329
fpregs[t+3] = fpregs[r1+3];
327330
fpregs[t+2] = fpregs[r1+2];
331+
fallthrough;
328332
case 1: /* double */
329333
fpregs[t+1] = fpregs[r1+1];
334+
fallthrough;
330335
case 0: /* single */
331336
/* copy and clear sign bit */
332337
fpregs[t] = fpregs[r1] & 0x7fffffff;
333338
return(NOEXCEPTION);
334339
}
340+
BUG();
335341
case 6: /* FNEG */
336342
switch (fmt) {
337343
case 2: /* illegal */
@@ -341,13 +347,16 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
341347
r1 &= ~3;
342348
fpregs[t+3] = fpregs[r1+3];
343349
fpregs[t+2] = fpregs[r1+2];
350+
fallthrough;
344351
case 1: /* double */
345352
fpregs[t+1] = fpregs[r1+1];
353+
fallthrough;
346354
case 0: /* single */
347355
/* copy and invert sign bit */
348356
fpregs[t] = fpregs[r1] ^ 0x80000000;
349357
return(NOEXCEPTION);
350358
}
359+
BUG();
351360
case 7: /* FNEGABS */
352361
switch (fmt) {
353362
case 2: /* illegal */
@@ -357,13 +366,16 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
357366
r1 &= ~3;
358367
fpregs[t+3] = fpregs[r1+3];
359368
fpregs[t+2] = fpregs[r1+2];
369+
fallthrough;
360370
case 1: /* double */
361371
fpregs[t+1] = fpregs[r1+1];
372+
fallthrough;
362373
case 0: /* single */
363374
/* copy and set sign bit */
364375
fpregs[t] = fpregs[r1] | 0x80000000;
365376
return(NOEXCEPTION);
366377
}
378+
BUG();
367379
case 4: /* FSQRT */
368380
switch (fmt) {
369381
case 0:
@@ -376,6 +388,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
376388
case 3: /* quad not implemented */
377389
return(MAJOR_0C_EXCP);
378390
}
391+
BUG();
379392
case 5: /* FRND */
380393
switch (fmt) {
381394
case 0:
@@ -389,7 +402,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
389402
return(MAJOR_0C_EXCP);
390403
}
391404
} /* end of switch (subop) */
392-
405+
BUG();
393406
case 1: /* class 1 */
394407
df = extru(ir,fpdfpos,2); /* get dest format */
395408
if ((df & 2) || (fmt & 2)) {
@@ -419,6 +432,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
419432
case 3: /* dbl/dbl */
420433
return(MAJOR_0C_EXCP);
421434
}
435+
BUG();
422436
case 1: /* FCNVXF */
423437
switch(fmt) {
424438
case 0: /* sgl/sgl */
@@ -434,6 +448,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
434448
return(dbl_to_dbl_fcnvxf(&fpregs[r1],0,
435449
&fpregs[t],status));
436450
}
451+
BUG();
437452
case 2: /* FCNVFX */
438453
switch(fmt) {
439454
case 0: /* sgl/sgl */
@@ -449,6 +464,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
449464
return(dbl_to_dbl_fcnvfx(&fpregs[r1],0,
450465
&fpregs[t],status));
451466
}
467+
BUG();
452468
case 3: /* FCNVFXT */
453469
switch(fmt) {
454470
case 0: /* sgl/sgl */
@@ -464,6 +480,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
464480
return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0,
465481
&fpregs[t],status));
466482
}
483+
BUG();
467484
case 5: /* FCNVUF (PA2.0 only) */
468485
switch(fmt) {
469486
case 0: /* sgl/sgl */
@@ -479,6 +496,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
479496
return(dbl_to_dbl_fcnvuf(&fpregs[r1],0,
480497
&fpregs[t],status));
481498
}
499+
BUG();
482500
case 6: /* FCNVFU (PA2.0 only) */
483501
switch(fmt) {
484502
case 0: /* sgl/sgl */
@@ -494,6 +512,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
494512
return(dbl_to_dbl_fcnvfu(&fpregs[r1],0,
495513
&fpregs[t],status));
496514
}
515+
BUG();
497516
case 7: /* FCNVFUT (PA2.0 only) */
498517
switch(fmt) {
499518
case 0: /* sgl/sgl */
@@ -509,10 +528,11 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
509528
return(dbl_to_dbl_fcnvfut(&fpregs[r1],0,
510529
&fpregs[t],status));
511530
}
531+
BUG();
512532
case 4: /* undefined */
513533
return(MAJOR_0C_EXCP);
514534
} /* end of switch subop */
515-
535+
BUG();
516536
case 2: /* class 2 */
517537
fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS];
518538
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[])
590610
case 3: /* quad not implemented */
591611
return(MAJOR_0C_EXCP);
592612
}
613+
BUG();
593614
case 1: /* FTEST */
594615
switch (fmt) {
595616
case 0:
@@ -609,8 +630,10 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
609630
case 3:
610631
return(MAJOR_0C_EXCP);
611632
}
633+
BUG();
612634
} /* end of switch subop */
613635
} /* end of else for PA1.0 & PA1.1 */
636+
BUG();
614637
case 3: /* class 3 */
615638
r2 = extru(ir,fpr2pos,5) * sizeof(double)/sizeof(u_int);
616639
if (r2 == 0)
@@ -633,6 +656,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
633656
case 3: /* quad not implemented */
634657
return(MAJOR_0C_EXCP);
635658
}
659+
BUG();
636660
case 1: /* FSUB */
637661
switch (fmt) {
638662
case 0:
@@ -645,6 +669,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
645669
case 3: /* quad not implemented */
646670
return(MAJOR_0C_EXCP);
647671
}
672+
BUG();
648673
case 2: /* FMPY */
649674
switch (fmt) {
650675
case 0:
@@ -657,6 +682,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
657682
case 3: /* quad not implemented */
658683
return(MAJOR_0C_EXCP);
659684
}
685+
BUG();
660686
case 3: /* FDIV */
661687
switch (fmt) {
662688
case 0:
@@ -669,6 +695,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
669695
case 3: /* quad not implemented */
670696
return(MAJOR_0C_EXCP);
671697
}
698+
BUG();
672699
case 4: /* FREM */
673700
switch (fmt) {
674701
case 0:
@@ -681,6 +708,7 @@ decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
681708
case 3: /* quad not implemented */
682709
return(MAJOR_0C_EXCP);
683710
}
711+
BUG();
684712
} /* end of class 3 switch */
685713
} /* end of switch(class) */
686714

@@ -736,43 +764,51 @@ u_int fpregs[];
736764
return(MAJOR_0E_EXCP);
737765
case 1: /* double */
738766
fpregs[t+1] = fpregs[r1+1];
767+
fallthrough;
739768
case 0: /* single */
740769
fpregs[t] = fpregs[r1];
741770
return(NOEXCEPTION);
742771
}
772+
BUG();
743773
case 3: /* FABS */
744774
switch (fmt) {
745775
case 2:
746776
case 3:
747777
return(MAJOR_0E_EXCP);
748778
case 1: /* double */
749779
fpregs[t+1] = fpregs[r1+1];
780+
fallthrough;
750781
case 0: /* single */
751782
fpregs[t] = fpregs[r1] & 0x7fffffff;
752783
return(NOEXCEPTION);
753784
}
785+
BUG();
754786
case 6: /* FNEG */
755787
switch (fmt) {
756788
case 2:
757789
case 3:
758790
return(MAJOR_0E_EXCP);
759791
case 1: /* double */
760792
fpregs[t+1] = fpregs[r1+1];
793+
fallthrough;
761794
case 0: /* single */
762795
fpregs[t] = fpregs[r1] ^ 0x80000000;
763796
return(NOEXCEPTION);
764797
}
798+
BUG();
765799
case 7: /* FNEGABS */
766800
switch (fmt) {
767801
case 2:
768802
case 3:
769803
return(MAJOR_0E_EXCP);
770804
case 1: /* double */
771805
fpregs[t+1] = fpregs[r1+1];
806+
fallthrough;
772807
case 0: /* single */
773808
fpregs[t] = fpregs[r1] | 0x80000000;
774809
return(NOEXCEPTION);
775810
}
811+
BUG();
776812
case 4: /* FSQRT */
777813
switch (fmt) {
778814
case 0:
@@ -785,6 +821,7 @@ u_int fpregs[];
785821
case 3:
786822
return(MAJOR_0E_EXCP);
787823
}
824+
BUG();
788825
case 5: /* FRMD */
789826
switch (fmt) {
790827
case 0:
@@ -798,7 +835,7 @@ u_int fpregs[];
798835
return(MAJOR_0E_EXCP);
799836
}
800837
} /* end of switch (subop */
801-
838+
BUG();
802839
case 1: /* class 1 */
803840
df = extru(ir,fpdfpos,2); /* get dest format */
804841
/*
@@ -826,6 +863,7 @@ u_int fpregs[];
826863
case 3: /* dbl/dbl */
827864
return(MAJOR_0E_EXCP);
828865
}
866+
BUG();
829867
case 1: /* FCNVXF */
830868
switch(fmt) {
831869
case 0: /* sgl/sgl */
@@ -841,6 +879,7 @@ u_int fpregs[];
841879
return(dbl_to_dbl_fcnvxf(&fpregs[r1],0,
842880
&fpregs[t],status));
843881
}
882+
BUG();
844883
case 2: /* FCNVFX */
845884
switch(fmt) {
846885
case 0: /* sgl/sgl */
@@ -856,6 +895,7 @@ u_int fpregs[];
856895
return(dbl_to_dbl_fcnvfx(&fpregs[r1],0,
857896
&fpregs[t],status));
858897
}
898+
BUG();
859899
case 3: /* FCNVFXT */
860900
switch(fmt) {
861901
case 0: /* sgl/sgl */
@@ -871,6 +911,7 @@ u_int fpregs[];
871911
return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0,
872912
&fpregs[t],status));
873913
}
914+
BUG();
874915
case 5: /* FCNVUF (PA2.0 only) */
875916
switch(fmt) {
876917
case 0: /* sgl/sgl */
@@ -886,6 +927,7 @@ u_int fpregs[];
886927
return(dbl_to_dbl_fcnvuf(&fpregs[r1],0,
887928
&fpregs[t],status));
888929
}
930+
BUG();
889931
case 6: /* FCNVFU (PA2.0 only) */
890932
switch(fmt) {
891933
case 0: /* sgl/sgl */
@@ -901,6 +943,7 @@ u_int fpregs[];
901943
return(dbl_to_dbl_fcnvfu(&fpregs[r1],0,
902944
&fpregs[t],status));
903945
}
946+
BUG();
904947
case 7: /* FCNVFUT (PA2.0 only) */
905948
switch(fmt) {
906949
case 0: /* sgl/sgl */
@@ -916,9 +959,11 @@ u_int fpregs[];
916959
return(dbl_to_dbl_fcnvfut(&fpregs[r1],0,
917960
&fpregs[t],status));
918961
}
962+
BUG();
919963
case 4: /* undefined */
920964
return(MAJOR_0C_EXCP);
921965
} /* end of switch subop */
966+
BUG();
922967
case 2: /* class 2 */
923968
/*
924969
* Be careful out there.
@@ -994,6 +1039,7 @@ u_int fpregs[];
9941039
}
9951040
} /* end of switch subop */
9961041
} /* end of else for PA1.0 & PA1.1 */
1042+
BUG();
9971043
case 3: /* class 3 */
9981044
/*
9991045
* Be careful out there.
@@ -1026,6 +1072,7 @@ u_int fpregs[];
10261072
return(dbl_fadd(&fpregs[r1],&fpregs[r2],
10271073
&fpregs[t],status));
10281074
}
1075+
BUG();
10291076
case 1: /* FSUB */
10301077
switch (fmt) {
10311078
case 0:
@@ -1035,6 +1082,7 @@ u_int fpregs[];
10351082
return(dbl_fsub(&fpregs[r1],&fpregs[r2],
10361083
&fpregs[t],status));
10371084
}
1085+
BUG();
10381086
case 2: /* FMPY or XMPYU */
10391087
/*
10401088
* check for integer multiply (x bit set)
@@ -1071,6 +1119,7 @@ u_int fpregs[];
10711119
&fpregs[r2],&fpregs[t],status));
10721120
}
10731121
}
1122+
BUG();
10741123
case 3: /* FDIV */
10751124
switch (fmt) {
10761125
case 0:
@@ -1080,6 +1129,7 @@ u_int fpregs[];
10801129
return(dbl_fdiv(&fpregs[r1],&fpregs[r2],
10811130
&fpregs[t],status));
10821131
}
1132+
BUG();
10831133
case 4: /* FREM */
10841134
switch (fmt) {
10851135
case 0:

0 commit comments

Comments
 (0)