[Bug target/45476] libgcc should contain TCmode functions

2010-09-03 Thread uros at gcc dot gnu dot org


--- Comment #9 from uros at gcc dot gnu dot org  2010-09-03 14:23 ---
Subject: Bug 45476

Author: uros
Date: Fri Sep  3 14:23:05 2010
New Revision: 163819

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163819
Log:
libgcc/ChangeLog:

PR target/45476
* Makefile.in (sifuncs, difuncs, tifuncs): Filter out
LIB2FUNCS_EXCLUDE functions.

gcc/ChangeLog:

PR target/45476
* config/i386/t-darwin (LIB2FUNCS_EXCLUDE): New.
* config/i386/darwin.h (LIBGCC2_HAS_TF_MODE,
LIBGCC2_TF_CEXT, TF_SIZE): New defines.

gcc/testsuite/ChangeLog:

PR target/45476
* gcc.target/i386/float128-1.c: Enable for all x86 targets.
* gcc.target/i386/float128-2.c: Ditto.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/darwin.h
trunk/gcc/config/i386/t-darwin
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/float128-1.c
trunk/gcc/testsuite/gcc.target/i386/float128-2.c
trunk/libgcc/ChangeLog
trunk/libgcc/Makefile.in


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45476



[Bug target/45476] libgcc should contain TCmode functions

2010-09-03 Thread ubizjak at gmail dot com


--- Comment #10 from ubizjak at gmail dot com  2010-09-03 19:58 ---
Fixed for all targets that support __float128.


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 GCC target triplet|*86*-apple-darwin10 |x86
 Resolution||FIXED
   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45476



[Bug target/45476] libgcc should contain TCmode functions

2010-09-01 Thread fxcoudert at gcc dot gnu dot org


--- Comment #2 from fxcoudert at gcc dot gnu dot org  2010-09-01 10:21 
---
It partially does. But TC functions are missing:

$ cat a.c
typedef _Complex float __attribute__((mode(TC))) __complex128;

__complex128 foo (__complex128 z1, __complex128 z2) {
  return z1 * z2; }

__complex128 bar (__complex128 z1, __complex128 z2) {
  return z1 / z2; }

int main (void) {
  (void) foo (0, 0);
  return 0;
}
$ ./bin/gcc a.c -W -Wall
Undefined symbols:
  ___divtc3, referenced from:
  _bar in ccqf0ZEK.o
  ___multc3, referenced from:
  _foo in ccqf0ZEK.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

$ ./bin/gcc -v  
Using built-in specs.
COLLECT_GCC=./bin/gcc
COLLECT_LTO_WRAPPER=/Users/fx/devel/gcc/irun/libexec/gcc/x86_64-apple-darwin10.4.0/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10.4.0
Configured with: ../trunk/configure --prefix=/Users/fx/devel/gcc/irun
--with-gmp=/Users/fx/devel/gcc/deps --enable-languages=c,fortran --without-ppl
Thread model: posix
gcc version 4.6.0 20100901 (experimental) [trunk revision 163721] (GCC) 


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |
Summary|libgcc should contain TFmode|libgcc should contain TCmode
   |functions   |functions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45476



[Bug target/45476] libgcc should contain TCmode functions

2010-09-01 Thread ubizjak at gmail dot com


--- Comment #3 from ubizjak at gmail dot com  2010-09-01 10:30 ---
(In reply to comment #2)
 It partially does. But TC functions are missing:

Ah, I see.  Put these defines somewhere:

/* Put all *tf routines in libgcc.  */
#undef LIBGCC2_HAS_TF_MODE
#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
#define TF_SIZE 113


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-09-01 10:30:44
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45476



[Bug target/45476] libgcc should contain TCmode functions

2010-09-01 Thread dominiq at lps dot ens dot fr


--- Comment #4 from dominiq at lps dot ens dot fr  2010-09-01 12:31 ---
(In reply to comment #3)
On x86_64-apple-darwin10 I have applied the following patch

--- ../_clean/gcc/config/i386/darwin.h  2010-07-19 11:51:25.0 +0200
+++ ../p_work/gcc/config/i386/darwin.h  2010-09-01 14:10:53.0 +0200
@@ -148,6 +148,12 @@ extern int darwin_emit_branch_islands;

 #define SHIFT_DOUBLE_OMITS_COUNT 0

+/* Put all *tf routines in libgcc.  */
+#undef LIBGCC2_HAS_TF_MODE
+#define LIBGCC2_HAS_TF_MODE 1
+#define LIBGCC2_TF_CEXT q
+#define TF_SIZE 113
+
 #undef TARGET_ASM_FILE_END
 #define TARGET_ASM_FILE_END darwin_file_end

and bootstrap fails at stage 1 with

ld: duplicate symbol ___fixtfdi in fixtfdi_s.o and _fixtfdi_s.o

Any idea?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45476



[Bug target/45476] libgcc should contain TCmode functions

2010-09-01 Thread burnus at gcc dot gnu dot org


--- Comment #5 from burnus at gcc dot gnu dot org  2010-09-01 13:31 ---
Cf. patch by Uros for cygming, darwin, freebsd at
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00040.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45476



[Bug target/45476] libgcc should contain TCmode functions

2010-09-01 Thread burnus at gcc dot gnu dot org


--- Comment #6 from burnus at gcc dot gnu dot org  2010-09-01 13:35 ---
Uros, did you see the comment of Dominique regarding x86_64-apple-darwin10?

(In reply to comment #4)
 and bootstrap fails at stage 1 with
 ld: duplicate symbol ___fixtfdi in fixtfdi_s.o and _fixtfdi_s.o

That's with the patch from comment 2 (or comment 4) - but I think that's
identical to the submitted patch (comment 5).


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45476



[Bug target/45476] libgcc should contain TCmode functions

2010-09-01 Thread uros at gcc dot gnu dot org


--- Comment #7 from uros at gcc dot gnu dot org  2010-09-01 18:06 ---
Subject: Bug 45476

Author: uros
Date: Wed Sep  1 18:06:02 2010
New Revision: 163741

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163741
Log:
PR target/45476
* config/i386/cygming.h (LIBGCC2_HAS_TF_MODE,
LIBGCC2_TF_CEXT, TF_SIZE): Move from ...
* config/i386/mingw32.h: ... here.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/cygming.h
trunk/gcc/config/i386/mingw32.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45476



[Bug target/45476] libgcc should contain TCmode functions

2010-09-01 Thread uros at gcc dot gnu dot org


--- Comment #8 from uros at gcc dot gnu dot org  2010-09-02 05:05 ---
Subject: Bug 45476

Author: uros
Date: Thu Sep  2 05:05:01 2010
New Revision: 163756

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163756
Log:
PR target/45476
* config/i386/freebsd.h (LIBGCC2_HAS_TF_MODE,
LIBGCC2_TF_CEXT, TF_SIZE): New defines.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/freebsd.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45476