diff --git a/VersionASM b/VersionASM index 7d4ce40145e40e126c8c8240d5077a578596561e..6c2e915ea817290b91af9c5840cfb924467c227a 100644 --- a/VersionASM +++ b/VersionASM @@ -9,12 +9,12 @@ GBLS Module_ApplicationDate GBLS Module_HelpVersion GBLS Module_ComponentName -Module_MajorVersion SETS "6.10" -Module_Version SETA 610 +Module_MajorVersion SETS "6.11" +Module_Version SETA 611 Module_MinorVersion SETS "" -Module_Date SETS "13 Nov 2021" -Module_ApplicationDate SETS "13-Nov-21" +Module_Date SETS "22 Nov 2021" +Module_ApplicationDate SETS "22-Nov-21" Module_ComponentName SETS "RISC_OSLib" -Module_FullVersion SETS "6.10" -Module_HelpVersion SETS "6.10 (13 Nov 2021)" +Module_FullVersion SETS "6.11" +Module_HelpVersion SETS "6.11 (22 Nov 2021)" END diff --git a/VersionNum b/VersionNum index 3e4125710cc0f3ee8e87d5b9fddd5e19316fdbdc..71661491bd47465e96fc3d26a82717453221a7f6 100644 --- a/VersionNum +++ b/VersionNum @@ -1,21 +1,21 @@ -/* (6.10) +/* (6.11) * * This file is automatically maintained by srccommit, do not edit manually. * */ -#define Module_MajorVersion_CMHG 6.10 +#define Module_MajorVersion_CMHG 6.11 #define Module_MinorVersion_CMHG -#define Module_Date_CMHG 13 Nov 2021 +#define Module_Date_CMHG 22 Nov 2021 -#define Module_MajorVersion "6.10" -#define Module_Version 610 +#define Module_MajorVersion "6.11" +#define Module_Version 611 #define Module_MinorVersion "" -#define Module_Date "13 Nov 2021" +#define Module_Date "22 Nov 2021" -#define Module_ApplicationDate "13-Nov-21" +#define Module_ApplicationDate "22-Nov-21" #define Module_ComponentName "RISC_OSLib" -#define Module_FullVersion "6.10" -#define Module_HelpVersion "6.10 (13 Nov 2021)" -#define Module_LibraryVersionInfo "6:10" +#define Module_FullVersion "6.11" +#define Module_HelpVersion "6.11 (22 Nov 2021)" +#define Module_LibraryVersionInfo "6:11" diff --git a/clib/s/cl_body b/clib/s/cl_body index ae7ad9a340c1591f37fdf17f70b8f041bbf8060f..8668fe804b88ba3d185381a0c152ea2da4b3c950 100644 --- a/clib/s/cl_body +++ b/clib/s/cl_body @@ -1241,11 +1241,18 @@ fmaxf [ FloatingPointArgsInRegs STFS f1, [sp, #-4]! STFS f0, [sp, #-4]! - LDMIA sp!, {r0-r1} - ] - AND r0, r0, r1 + LDMIA sp!, {r0, r2} ; restore *narrowed* x & y to ARM regs + AND r0, r0, r2 ; this works like fmax case as both are narrow STR r0, [sp, #-4]! LDFS f0, [sp], #4 + | + ; EQ -> f0 (result) is still (narrowed) x from {r0,r1} + ; NB r0 and r2 are not narrow! (Sign.Expt.MantHi word of x and y respectively) + ; if x==y, then for fmaxf(-0,+0), return +0 + EOR r1, r0, r2 ; were signs of x and y mixed? + TST r1, #1 :SHL: 31 + MVFNES f0, #0 ; if so, result := +0 + ] Return ,LinkNotStacked fcmpnanf @@ -1290,13 +1297,22 @@ fminf [ FloatingPointArgsInRegs STFS f1, [sp, #-4]! STFS f0, [sp, #-4]! - LDMIA sp!, {r0-r1} - ] - ORR r0, r0, r2 + LDMIA sp!, {r0, r2} ; restore *narrowed* x & y to ARM regs + ORR r0, r0, r2 ; this works like fmin case as both are narrow STR r0, [sp, #-4]! LDFS f0, [sp], #4 + | + ; EQ -> f0 (result) is still (narrowed) x from {r0,r1} + ; if x==y, then for fminf(+0,-0), return -0 + ; NB r0 and r2 are not narrow! (Sign.Expt.MantHi word of x and y respectively) + EOR r1, r0, r2 ; were signs of x and y mixed? + TST r1, #1 :SHL: 31 + LDFNES f0, =-0.0 ; if so, result := -0 (doesn't fit in immediate constant) + ] Return ,LinkNotStacked + LTORG + nearbyint [ :LNOT:FloatingPointArgsInRegs STMFD sp!, {r0,r1}