softfloat: add functions corresponding to IEEE-2008 min/maxNumMag
authorLeon Alrae <leon.alrae@imgtec.com>
Fri, 27 Jun 2014 07:49:06 +0000 (08:49 +0100)
committerLeon Alrae <leon.alrae@imgtec.com>
Tue, 14 Oct 2014 12:28:51 +0000 (13:28 +0100)
commit2d31e0607d0038b0c3450bb9624b0639e1181b1a
tree8afa12be6ccc25159346b4d9882c434af0b99172
parentd4ea6acdf60db1d8373543e1557ba908f5d5479b
softfloat: add functions corresponding to IEEE-2008 min/maxNumMag

Add abs argument to the existing softfloat minmax() function and define
new float{32,64}_{min,max}nummag functions.

minnummag(x,y) returns x if |x| < |y|,
               returns y if |y| < |x|,
               otherwise minnum(x,y)

maxnummag(x,y) returns x if |x| > |y|,
               returns y if |y| > |x|,
               otherwise maxnum(x,y)

Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
fpu/softfloat.c
include/fpu/softfloat.h