Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Dec 2011 01:07:23 +0100
From:      Marius Strobl <marius@alchemy.franken.de>
To:        Ed Schouten <ed@80386.nl>
Cc:        mips@freebsd.org, sparc64@freebsd.org
Subject:   Re: (Finally) migrate MIPS and SPARC64 to libcompiler_rt
Message-ID:  <20111228000723.GA77332@alchemy.franken.de>
In-Reply-To: <20111227231243.GB1895@hoeg.nl>
References:  <20111227231243.GB1895@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 28, 2011 at 12:12:43AM +0100, Ed Schouten wrote:
> Hi all,
> 
> Quite some time ago, we switched from libgcc to libcompiler_rt on all
> architectures except MIPS and SPARC64. At the time I was also quite busy
> with other FreeBSD and LLVM related things, so I decided to leave MIPS
> and SPARC64 the way they were.
> 
> The reason why we haven't switched these two architectures yet, is due
> to a minor bug in __ctzdi2() calling __builtin_ctz(). On these two
> architectures, this ends up calling __ctzdi2() again, causing a hang.
> 
> I have filed a bug for this at the LLVM folks, but until that time I
> want to ask if there are people that are willing to test the attached
> patch on their MIPS and SPARC64 systems. The only thing you need to do:
> rebuild world two iterations to see whether everything works properly. I
> do advise you to test this patch in a jail first.
> 
> If this patch fixes the problem, I will commit the change to SVN. As of
> then, every architecture will use libcompiler_rt. This also makes
> <stdatomic.h> work on MIPS properly.
> 

Before making libcompiler_rt the default for sparc64 could you please
also look into adding the optimized versions of _divsi3 and _modsi3
(see contrib/gcc/config/sparc/lb1spc.asm) to libcompiler_rt? They're
taken from/based on the SPARC V8 Architecture Manual and IIRC I once
compared them and there actually was little difference so there should
be no licensing issues.

Marius




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111228000723.GA77332>