diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-18 20:50:45 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-18 20:50:45 +0000 |
commit | b8886216914424faa0ea01032696454d16e2f233 (patch) | |
tree | d5dadc6511455887ad655991208544aac9ceffd0 /gcc/config/rs6000 | |
parent | c238c203159902905b6de2d47c004cfbf7d0f297 (diff) | |
download | gcc-b8886216914424faa0ea01032696454d16e2f233.tar.gz |
* config/soft-fp: New directory. From glibc.
* config/soft-fp/t-softfp: New.
* config/soft-fp/README: New.
* mklibgcc.in: Handle LIB2FUNCS_EXCLUDE.
* Makefile.in (LIB2FUNCS_EXCLUDE, SFP_MACHINE): New.
(libgcc.mk): Pass LIB2FUNCS_EXCLUDE.
(LIBGCC_DEPS): Add $(SFP_MACHINE).
* config.gcc: Use rs6000/t-fprules-fpbit or
rs6000/t-fprules-softfp and soft-fp/t-softfp together with
rs6000/t-fprules.
* config/rs6000/sfp-machine.h: New. Based on glibc.
* config/rs6000/t-fprules-fpbit, config/rs6000/t-fprules-softfp:
New.
* config/rs6000/t-fprules: Remove fp-bit rules.
* config/rs6000/t-ppccomm (LIB2FUNCS_EXTRA): Use +=.
* config/rs6000/t-linux64: Likewise. Remove duplicates from
LIB2FUNCS_EXTRA. Remove fp-bit rules.
(softfp_wrap_start, softfp_wrap_end): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113056 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/sfp-machine.h | 63 | ||||
-rw-r--r-- | gcc/config/rs6000/t-fprules | 12 | ||||
-rw-r--r-- | gcc/config/rs6000/t-fprules-fpbit | 11 | ||||
-rw-r--r-- | gcc/config/rs6000/t-fprules-softfp | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/t-linux64 | 21 | ||||
-rw-r--r-- | gcc/config/rs6000/t-ppccomm | 2 |
6 files changed, 85 insertions, 30 deletions
diff --git a/gcc/config/rs6000/sfp-machine.h b/gcc/config/rs6000/sfp-machine.h new file mode 100644 index 00000000000..29173e235dc --- /dev/null +++ b/gcc/config/rs6000/sfp-machine.h @@ -0,0 +1,63 @@ +#define _FP_W_TYPE_SIZE 32 +#define _FP_W_TYPE unsigned long +#define _FP_WS_TYPE signed long +#define _FP_I_TYPE long + +#define _FP_MUL_MEAT_S(R,X,Y) \ + _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) +#define _FP_MUL_MEAT_D(R,X,Y) \ + _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) +#define _FP_MUL_MEAT_Q(R,X,Y) \ + _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) + +#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y) +#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) +#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) + +#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) +#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 +#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 +#define _FP_NANSIGN_S 0 +#define _FP_NANSIGN_D 0 +#define _FP_NANSIGN_Q 0 + +#define _FP_KEEPNANFRACP 1 + +/* Someone please check this. */ +#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ + do { \ + if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \ + && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \ + { \ + R##_s = Y##_s; \ + _FP_FRAC_COPY_##wc(R,Y); \ + } \ + else \ + { \ + R##_s = X##_s; \ + _FP_FRAC_COPY_##wc(R,X); \ + } \ + R##_c = FP_CLS_NAN; \ + } while (0) + +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 + +#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN +# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN +# error "Both BIG_ENDIAN and LITTLE_ENDIAN defined!" +# endif +# define __BYTE_ORDER __BIG_ENDIAN +#else +# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN +# define __BYTE_ORDER __LITTLE_ENDIAN +# else +# error "Cannot determine current byte order" +# endif +#endif + + +/* Define ALIASNAME as a strong alias for NAME. */ +# define strong_alias(name, aliasname) _strong_alias(name, aliasname) +# define _strong_alias(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name))); diff --git a/gcc/config/rs6000/t-fprules b/gcc/config/rs6000/t-fprules index d311d8c3187..aa686c15b00 100644 --- a/gcc/config/rs6000/t-fprules +++ b/gcc/config/rs6000/t-fprules @@ -1,15 +1,3 @@ -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - MULTILIB_MATCHES_FLOAT = msoft-float=mcpu?401 \ msoft-float=mcpu?403 \ msoft-float=mcpu?405 \ diff --git a/gcc/config/rs6000/t-fprules-fpbit b/gcc/config/rs6000/t-fprules-fpbit new file mode 100644 index 00000000000..a80c1cf4eec --- /dev/null +++ b/gcc/config/rs6000/t-fprules-fpbit @@ -0,0 +1,11 @@ +# We want fine grained libraries, so use the new code to build the +# floating point emulation libraries. +FPBIT = fp-bit.c +DPBIT = dp-bit.c + +dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + +fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c diff --git a/gcc/config/rs6000/t-fprules-softfp b/gcc/config/rs6000/t-fprules-softfp new file mode 100644 index 00000000000..10b271f036d --- /dev/null +++ b/gcc/config/rs6000/t-fprules-softfp @@ -0,0 +1,6 @@ +softfp_float_modes := sf df +softfp_int_modes := si di +softfp_extensions := sfdf +softfp_truncations := dfsf +softfp_machine_header := rs6000/sfp-machine.h +softfp_exclude_libgcc2 := y diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 index 2c30a89892f..a2c04f928e6 100644 --- a/gcc/config/rs6000/t-linux64 +++ b/gcc/config/rs6000/t-linux64 @@ -1,8 +1,9 @@ #rs6000/t-linux64 -LIB2FUNCS_EXTRA = tramp.S $(srcdir)/config/rs6000/ppc64-fp.c \ +LIB2FUNCS_EXTRA += tramp.S $(srcdir)/config/rs6000/ppc64-fp.c \ $(srcdir)/config/rs6000/darwin-ldouble.c +LIB2FUNCS_EXTRA := $(sort $(LIB2FUNCS_EXTRA)) TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc @@ -14,19 +15,5 @@ MULTILIB_EXCLUSIONS = m64/!m32/msoft-float MULTILIB_OSDIRNAMES = ../lib64 ../lib nof MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT) -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -# fp-bit is only to be used by 32-bit multilibs -FPBIT = fp-bit32.c -DPBIT = dp-bit32.c - -dp-bit32.c: $(srcdir)/config/fp-bit.c - ( echo '#ifndef __powerpc64__'; \ - cat $(srcdir)/config/fp-bit.c; \ - echo '#endif' ) > dp-bit32.c - -fp-bit32.c: $(srcdir)/config/fp-bit.c - ( echo '#ifndef __powerpc64__'; \ - echo '#define FLOAT'; \ - cat $(srcdir)/config/fp-bit.c; \ - echo '#endif' ) > fp-bit32.c +softfp_wrap_start := '\#ifndef __powerpc64__' +softfp_wrap_end := '\#endif' diff --git a/gcc/config/rs6000/t-ppccomm b/gcc/config/rs6000/t-ppccomm index e58dfe5f687..1ca509cd59a 100644 --- a/gcc/config/rs6000/t-ppccomm +++ b/gcc/config/rs6000/t-ppccomm @@ -1,6 +1,6 @@ # Common support for PowerPC ELF targets (both EABI and SVR4). -LIB2FUNCS_EXTRA = tramp.S $(srcdir)/config/rs6000/darwin-ldouble.c +LIB2FUNCS_EXTRA += tramp.S $(srcdir)/config/rs6000/darwin-ldouble.c # This one can't end up in shared libgcc LIB2FUNCS_STATIC_EXTRA = eabi.S |