softfloat: Refactor code handling various rounding modes
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 7 Jan 2014 17:19:12 +0000 (17:19 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 7 Jan 2014 19:18:08 +0000 (19:18 +0000)
commit01a0b83cdb1c29a0066cfee3445a34280b3ac03a
treefdf22a99eab7e7207e58b359aa67f30cd62205e6
parent7b378119bd67609f25bd78b714d0fab922600f40
softfloat: Refactor code handling various rounding modes

Refactor the code in various functions which calculates rounding
increments given the current rounding mode, so that instead of a
set of nested if statements we have a simple switch statement.
This will give us a clean place to add the case for the new
tiesAway rounding mode.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
fpu/softfloat.c