[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#278379: Atomic stdc++ operations are broken on some MIPS machines



On Tue, Oct 26, 2004 at 04:09:15PM +0200, Thiemo Seufer wrote:
> Package: gcc-3.3
> Version: 3.3.5-1
> Severity: important
> 
> While trying to run Debian on a SGI O200 Machine I found out that the
> inline assembly to handle atomic operations in libstdc++ is broken.
> The effect is very visible: "apt-get update" hangs in an endless loop
> on startup, same for every other c++ program I tried. This happens on
> machines with R10000 CPU, others may show degraded performance.
> 
> R10000 CPUs aren't yet officially supported in Debian, so I used
> serverity important for this bugreport.
> 
> The problem is caused by inserting normal load operation in the atomic
> loop, which isn't guaranteed to work. The load is generated by the
> assembler to fulfill the memory reference, so it isn't visible in the
> source.
> 
> The appended patch fixes it. It also changes the branch to the likely
> variant, this works around some breakage in early R10000 silicon.
> The patch is against gcc-3.3, newer gccs have the same problem, but
> have some apparently bogus changes in that area.

I don't know about the R10k workarounds, but newer GCC ought to have
the other problem fixed.  Is there something wrong with the version in
HEAD?

IIRC, likely branches are deprecated in the latest MIPS ISAs; we
shouldn't be introducing more of them.  I don't know what silicon bug
you're working around, though, so I don't know if there's a better way.

-- 
Daniel Jacobowitz



Reply to: