This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [ANNOUNCE] GCC 3.3.1 uClinux/ColdFire toolchain (20030725 snapshot)
- From: Bernardo Innocenti <bernie at develer dot com>
- To: Chris Johns <cjohns at cybertec dot com dot au>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 25 Jul 2003 14:29:32 +0200
- Subject: Re: [ANNOUNCE] GCC 3.3.1 uClinux/ColdFire toolchain (20030725 snapshot)
- Organization: Develer S.r.l.
- References: <200307250622.20135.bernie@develer.com> <3F20BCE2.3070501@cybertec.com.au>
On Friday 25 July 2003 07:15, Chris Johns wrote:
> Bernardo Innocenti wrote:
> > - Fix atomic operations in libstdc++ for ColdFire V2 & V3 cores
> > (iostreams now work).
>
> Is this common to all Coldire users or just uCLinux users of libstdc++ ?
The old version had special ColdFire support for vxWorks and other targets
defining the __embedded__ preprocessor symbol.
This code path was using a privileged instruction (move #0,%sr) to turn
interrupts off when updating the counter. Since uClinux also defines __embedded__,
user applications linking with libstdc++ were segfaulting on the supervisor-only
opcode.
There was also generic thread-unsafe C code to be used as a last resort.
This patch replaces all of those variants with a single case using either
TAS (for 680x0, CPU32 and 5407) or BTST, which is atomic on non-SMP systems.
> If common, could I please have a copy of the patch ?
Here it is:
http://www.develer.com/uclinux/uclinux-elf-tools/gcc-3.3.1-libstdc++-atomicity.patch
I'm still waiting for my copyright assignment papers from FSF. Please feel free to
make a patch for GCC if you like.
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/
Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html