From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 31 22:42:10 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DB1A106566B; Sun, 31 Jul 2011 22:42:10 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2886A8FC0C; Sun, 31 Jul 2011 22:42:10 +0000 (UTC) Received: from host182.msm.che.vodafone (unknown [212.183.128.47]) by cyrus.watson.org (Postfix) with ESMTPSA id A6A1546B09; Sun, 31 Jul 2011 18:41:58 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: Date: Sun, 31 Jul 2011 23:41:44 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <01C0A915-F2AC-4FD7-9196-5613CC91E27D@freebsd.org> References: <565C98BA-9B92-4F07-A747-DDA5DC3D7703@freedomnet.co.nz> To: Jayachandran C. X-Mailer: Apple Mail (2.1084) Cc: "freebsd-hackers@freebsd.org" , James Jones Subject: Re: MIPS toolchain X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 22:42:10 -0000 On 31 Jul 2011, at 12:22, Jayachandran C. wrote: >> In fact, there are some toolchain bugs I'm running into that manifest = only >> in the SDE toolchain and not the FreeBSD toolchain. (Mind you, = Philip has >> commented that in building Uboot for MIPS, he's found FreeBSD bugs = that >> don't appear in the SDE toolchain, so mileage varies). >=20 > Any idea what the bugs where? If there are fixes that can be > backported without license issues, we take take a look at this. I'm on travel currently, so don't have my notes on this with me, but as = I recall they were primarily in some combination of as and ld. A few = that come to mind off-hand: (1) .noat appears not always to work: you sometimes get sequences that = use $at without warnings from the assembler (this might be more SDE than = the FreeBSD version of as, my recollection is a bit hazy -- I know the = FreeBSD version appeared more correct in my experimentation than SDE in = this regard) (2) If you try to disable generation of divide by zero checks for ddiv = (for example) by using --no-break and --no-trap, you end up with both = break and trap instrumentation rather than neither (if I recall); later = FSF versions appear to support a --argument of some sort that completely = disables this, but both the FreeBSD and SDE versions seem not to include = it (3) ld's -o binary gives very mixed results; objcopy with a binary = output type seems to consistently work (4) I haven't yet spotted a way to prevent generation of madd/msub = instructions when using a 64-bit MIPS architecture, although there were = a moderate number of MIPS systems built that implement a 64-bit ISA = without madd/msub (but I've not dug deeply yet, so have probably simply = missed an arch option). (5) I find it annoying, although perhaps it is a feature, that objdump = -s generates MIPS register names without prefixed $ symbols, so can't be = fed straight back into as :-). Changing the output syntax would probably = confuse other stuff at this point, however. I'll dig in a bit more when I get back to the office later this week and = try to come up with a more reproducible description (and confirmation) = of each. I'm not sure any of these is the source of the problems Philip = has experienced with Uboot. Robert=