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
This commit is contained in:
darylm503
2011-09-16 20:59:10 +00:00
parent 9c6595dca0
commit c614ca505d
17 changed files with 839 additions and 101 deletions

View File

@@ -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
}