From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4891 invoked by alias); 16 Jul 2009 20:34:42 -0000 Received: (qmail 4845 invoked by uid 48); 16 Jul 2009 20:34:30 -0000 Date: Thu, 16 Jul 2009 20:34:00 -0000 Message-ID: <20090716203430.4844.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/40757] gcc 4.4.0 miscompiles mpfr-2.4.1 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "marc dot glisse at normalesup dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg01380.txt.bz2 ------- Comment #12 from marc dot glisse at normalesup dot org 2009-07-16 20:34 ------- (In reply to comment #11) > for this memset call, which looks correct to me. The st %g1, [%i0+%l5] line > stores to %i0 a[n-1] and memset is called with memset (a, 0, (n + 0x3fffffffU) > << 2); So, if this doesn't work (and you see the same), you hit a bug in > Solaris memset implementation, which doesn't handle properly length with > garbage in upper 32-bits, guess it could use brz,pn %o2, do_nothing or > something similar, which is fine for 64-bit code, but certainly not for 32-bit > code. The sun4v implementation in opensolaris looks fine (but may not have been backported to solaris 10). The following one on the other hand seems to use the same brnz for 32 and 64 bit code: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/sparc_hwcap1/common/gen/memset.s#88 It would be good to know which implementation is used... -- marc dot glisse at normalesup dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marc dot glisse at | |normalesup dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40757