mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-03 21:45:51 +08:00
riscv: Add 'break' statements to fpsetround switch
This makes the fpsetround function actually do something rather than just return -1 due to the default 'fall-through' behavior of the switch statement. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
954504ea14
commit
8e74c7119f
@ -84,10 +84,10 @@ fpsetround(fp_rnd rnd_dir)
|
||||
unsigned new_rm;
|
||||
switch (rnd_dir)
|
||||
{
|
||||
case FP_RN: new_rm = 0;
|
||||
case FP_RZ: new_rm = 1;
|
||||
case FP_RM: new_rm = 2;
|
||||
case FP_RP: new_rm = 3;
|
||||
case FP_RN: new_rm = 0; break;
|
||||
case FP_RZ: new_rm = 1; break;
|
||||
case FP_RM: new_rm = 2; break;
|
||||
case FP_RP: new_rm = 3; break;
|
||||
default: return -1;
|
||||
}
|
||||
fssr (new_rm << 5 | fsr & 0x1f);
|
||||
|
Loading…
x
Reference in New Issue
Block a user