diff options
author | Jing Yu <jingyu@google.com> | 2011-01-30 22:18:29 -0800 |
---|---|---|
committer | Jing Yu <jingyu@google.com> | 2011-01-30 22:18:29 -0800 |
commit | 4a66e756636cb8364582ea503abd10d76f5b4aa3 (patch) | |
tree | 9660204ec085888a0601a6460c967b204a63d5f3 /gcc-4.4.3/gcc/testsuite/gcc.target/arm/eabi1.c | |
parent | b6be42e837844cce5283f42fcfac31e6d66a277d (diff) | |
download | toolchain_gcc-4a66e756636cb8364582ea503abd10d76f5b4aa3.tar.gz toolchain_gcc-4a66e756636cb8364582ea503abd10d76f5b4aa3.tar.bz2 toolchain_gcc-4a66e756636cb8364582ea503abd10d76f5b4aa3.zip |
Upgrade gcc-4.4.3 for Android toolchain.
- Backport upstream patches to support arm hardfp.
- Backport gcc-4.5 patches to support -march=atom. Now it is
able to build atom toolchain with glibc from this branch
- Develop a bunch of optimizations
- Fix a few arm dejagnu failures
To-do list:
- Support Android/atom
- Fix ia32 bootstrap failure
Change-Id: I5e10dcd21620d4d8ca984d1d1707a76067e61691
Diffstat (limited to 'gcc-4.4.3/gcc/testsuite/gcc.target/arm/eabi1.c')
-rw-r--r-- | gcc-4.4.3/gcc/testsuite/gcc.target/arm/eabi1.c | 71 |
1 files changed, 38 insertions, 33 deletions
diff --git a/gcc-4.4.3/gcc/testsuite/gcc.target/arm/eabi1.c b/gcc-4.4.3/gcc/testsuite/gcc.target/arm/eabi1.c index e88ba021f..c90f5ff08 100644 --- a/gcc-4.4.3/gcc/testsuite/gcc.target/arm/eabi1.c +++ b/gcc-4.4.3/gcc/testsuite/gcc.target/arm/eabi1.c @@ -30,43 +30,48 @@ #include <stdlib.h> #include <math.h> -#define decl_float(code, type) \ - extern type __aeabi_ ## code ## add (type, type); \ - extern type __aeabi_ ## code ## div (type, type); \ - extern type __aeabi_ ## code ## mul (type, type); \ - extern type __aeabi_ ## code ## neg (type); \ - extern type __aeabi_ ## code ## rsub (type, type); \ - extern type __aeabi_ ## code ## sub (type, type); \ - extern int __aeabi_ ## code ## cmpeq (type, type); \ - extern int __aeabi_ ## code ## cmplt (type, type); \ - extern int __aeabi_ ## code ## cmple (type, type); \ - extern int __aeabi_ ## code ## cmpge (type, type); \ - extern int __aeabi_ ## code ## cmpgt (type, type); \ - extern int __aeabi_ ## code ## cmpun (type, type); \ - extern int __aeabi_ ## code ## 2iz (type); \ - extern unsigned int __aeabi_ ## code ## 2uiz (type); \ - extern long long __aeabi_ ## code ## 2lz (type); \ - extern unsigned long long __aeabi_ ## code ## 2ulz (type); \ - extern type __aeabi_i2 ## code (int); \ - extern type __aeabi_ui2 ## code (int); \ - extern type __aeabi_l2 ## code (long long); \ - extern type __aeabi_ul2 ## code (unsigned long long); \ - \ - type code ## zero = 0.0; \ - type code ## one = 1.0; \ - type code ## two = 2.0; \ - type code ## four = 4.0; \ - type code ## minus_one = -1.0; \ - type code ## minus_two = -2.0; \ - type code ## minus_four = -4.0; \ - type code ## epsilon = 1E-32; \ - type code ## NaN = 0.0 / 0.0; +/* All these functions are defined to use the base ABI, so use the + attribute to ensure the tests use the base ABI to call them even + when the VFP ABI is otherwise in effect. */ +#define PCS __attribute__((pcs("aapcs"))) + +#define decl_float(code, type) \ + extern type __aeabi_ ## code ## add (type, type) PCS; \ + extern type __aeabi_ ## code ## div (type, type) PCS; \ + extern type __aeabi_ ## code ## mul (type, type) PCS; \ + extern type __aeabi_ ## code ## neg (type) PCS; \ + extern type __aeabi_ ## code ## rsub (type, type) PCS; \ + extern type __aeabi_ ## code ## sub (type, type) PCS; \ + extern int __aeabi_ ## code ## cmpeq (type, type) PCS; \ + extern int __aeabi_ ## code ## cmplt (type, type) PCS; \ + extern int __aeabi_ ## code ## cmple (type, type) PCS; \ + extern int __aeabi_ ## code ## cmpge (type, type) PCS; \ + extern int __aeabi_ ## code ## cmpgt (type, type) PCS; \ + extern int __aeabi_ ## code ## cmpun (type, type) PCS; \ + extern int __aeabi_ ## code ## 2iz (type) PCS; \ + extern unsigned int __aeabi_ ## code ## 2uiz (type) PCS; \ + extern long long __aeabi_ ## code ## 2lz (type) PCS; \ + extern unsigned long long __aeabi_ ## code ## 2ulz (type) PCS; \ + extern type __aeabi_i2 ## code (int) PCS; \ + extern type __aeabi_ui2 ## code (int) PCS; \ + extern type __aeabi_l2 ## code (long long) PCS; \ + extern type __aeabi_ul2 ## code (unsigned long long) PCS; \ + \ + type code ## zero = 0.0; \ + type code ## one = 1.0; \ + type code ## two = 2.0; \ + type code ## four = 4.0; \ + type code ## minus_one = -1.0; \ + type code ## minus_two = -2.0; \ + type code ## minus_four = -4.0; \ + type code ## epsilon = 1E-32; \ + type code ## NaN = 0.0 / 0.0; decl_float (d, double) decl_float (f, float) -extern float __aeabi_d2f (double); -extern double __aeabi_f2d (float); +extern float __aeabi_d2f (double) PCS; +extern double __aeabi_f2d (float) PCS; extern long long __aeabi_lmul (long long, long long); extern long long __aeabi_llsl (long long, int); extern long long __aeabi_llsr (long long, int); |