From owner-freebsd-current@FreeBSD.ORG Fri Jul 2 22:50:26 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7E2716A4CF; Fri, 2 Jul 2004 22:50:26 +0000 (GMT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 507B643D49; Fri, 2 Jul 2004 22:50:26 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from dhcp50.pn.xcllnt.net (dhcp50.pn.xcllnt.net [192.168.4.250]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i62MoIGc040896; Fri, 2 Jul 2004 15:50:18 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp50.pn.xcllnt.net (localhost [127.0.0.1]) i62MoIwp003923; Fri, 2 Jul 2004 15:50:18 -0700 (PDT) (envelope-from marcel@dhcp50.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp50.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i62MoIk3003922; Fri, 2 Jul 2004 15:50:18 -0700 (PDT) (envelope-from marcel) Date: Fri, 2 Jul 2004 15:50:17 -0700 From: Marcel Moolenaar To: Ruslan Ermilov Message-ID: <20040702225017.GA3828@dhcp50.pn.xcllnt.net> References: <20040630164047.GC86725@ip.net.ua> <20040702162001.GD78489@dragon.nuxi.com> <20040702184443.GB4193@ip.net.ua> <20040702201200.GA3485@dhcp50.pn.xcllnt.net> <20040702211936.GA4962@ip.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040702211936.GA4962@ip.net.ua> User-Agent: Mutt/1.4.2.1i cc: current@freebsd.org Subject: Re: Query on status of cross-builds X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2004 22:50:26 -0000 On Sat, Jul 03, 2004 at 12:19:36AM +0300, Ruslan Ermilov wrote: > > > > No. It's a compiler bug on sparc64. I think the old binutils just > > didn't complain about the invalid instruction. I compared the > > output of the native cc and the cross cc and they are different. > > Not much, but fataly so. > > > Yes, I produced that diff as well (by using -save-temps). > Unfortunately, I don't know sparc64 assembler at all... [context: the faulty instruction is the fstox in the following snippet] fmuls %f8, %f9, %f8 fstox %f8, %f7 st %f8, [%fp+2031] As far as I can tell, the fstox is faulty because the target FP register is a double extended FP, which therefore has to be an even numbered FP register. The native cc uses %f12, while the cross cc uses %f7. Simply replacing %f7 with %f6 or %f8 resolves the problem. Note that %f8 should have been the register, because it's used by the subsequent st instruction. I have no idea why a cross cc would trigger this. Maybe there's a flags field with more than 32 flags and defined as long. On 64-bit machines this works out well, on 32-bit machines this breaks. I dunno... > But why it worked before BU upgrade? (We didn't have > these tinderbox failures.) The old binutils may not have checked for this. This may or may not have resulted in faulty machine instructions. > Does GCC use some of the BU bits internally? No. The compiler goes no further than emitting assembly language. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net