summaryrefslogtreecommitdiff
path: root/StdLib/LibC
diff options
context:
space:
mode:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-16 20:59:10 +0000
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-16 20:59:10 +0000
commitc614ca505dd2947acbd111e2764056aeac2012ad (patch)
treeba9bbea3d94c2265d40377307b73032c694981aa /StdLib/LibC
parent9c6595dca0fc1985a4170fa5503a7132d3445ac8 (diff)
downloadedk2-c614ca505dd2947acbd111e2764056aeac2012ad.zip
edk2-c614ca505dd2947acbd111e2764056aeac2012ad.tar.gz
edk2-c614ca505dd2947acbd111e2764056aeac2012ad.tar.bz2
StdLib: Patches and updates for ARM.
Add ARMGCC and RVCT toolchain support. Update and Add ARM specific machine headers. Set the empty macro for __warn_references(). Make __flt_rounds() return 'Round to nearest' by default on ARM. Signed-off-by: Olivier Martin [olivier.martin@arm.com] Reviewed-by: darylm503 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12367 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/LibC')
-rw-r--r--StdLib/LibC/Main/Arm/flt_rounds.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/StdLib/LibC/Main/Arm/flt_rounds.c b/StdLib/LibC/Main/Arm/flt_rounds.c
index 3f43650..a64f447 100644
--- a/StdLib/LibC/Main/Arm/flt_rounds.c
+++ b/StdLib/LibC/Main/Arm/flt_rounds.c
@@ -1,4 +1,4 @@
-/* $NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $ */
+/* $NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $ */
/*
* Copyright (c) 1996 Mark Brinicombe
@@ -15,7 +15,7 @@
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Mark Brinicombe
- * for the NetBSD Project.
+ * for the NetBSD Project.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
@@ -31,29 +31,29 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
+#include <sys/EfiCdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
-#include <ieeefp.h>
+//#include <ieeefp.h>
static const int map[] = {
- 1, /* round to nearest */
- 2, /* round to positive infinity */
- 3, /* round to negative infinity */
- 0 /* round to zero */
+ 1, /* round to nearest */
+ 2, /* round to positive infinity */
+ 3, /* round to negative infinity */
+ 0 /* round to zero */
};
/*
* Return the current FP rounding mode
*
* Returns:
- * 0 - round to zero
- * 1 - round to nearest
- * 2 - round to postive infinity
- * 3 - round to negative infinity
+ * 0 - round to zero
+ * 1 - round to nearest
+ * 2 - round to postive infinity
+ * 3 - round to negative infinity
*
* ok all we need to do is get the current FP rounding mode
* index our map table and return the appropriate value.
@@ -77,5 +77,6 @@ int __flt_rounds(void);
int
__flt_rounds()
{
- return(map[fpgetround()]);
+ //return(map[fpgetround()]);
+ return 1; //TODO: FixMe
}