From owner-freebsd-sparc64@FreeBSD.ORG Sun Mar 7 00:29:54 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C48D106564A; Sun, 7 Mar 2010 00:29:54 +0000 (UTC) (envelope-from marcus@marcuscom.com) Received: from creme-brulee.marcuscom.com (marcuscom-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id 172DF8FC08; Sun, 7 Mar 2010 00:29:54 +0000 (UTC) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.4/8.14.4) with ESMTP id o270UFPP076145; Sat, 6 Mar 2010 19:30:15 -0500 (EST) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: Anton Shterenlikht In-Reply-To: <20100306230902.GI28483@mech-cluster241.men.bris.ac.uk> References: <20100306230902.GI28483@mech-cluster241.men.bris.ac.uk> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-IrQczVPV93aWx/MlmVMJ" Organization: MarcusCom, Inc. Date: Sat, 06 Mar 2010 19:29:52 -0500 Message-ID: <1267921792.96436.6.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,HELO_NO_DOMAIN autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on creme-brulee.marcuscom.com Cc: gnome@freebsd.org, freebsd-sparc64@freebsd.org Subject: Re: devel/gobject-introspection fails to build on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 00:29:54 -0000 --=-IrQczVPV93aWx/MlmVMJ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable On Sat, 2010-03-06 at 23:09 +0000, Anton Shterenlikht wrote: > On FreeBSD sparc64 9.0-CURRENT #0 r202774 >=20 > I get >=20 > Making all in gir > gmake[2]: Entering directory `/usr/ports/devel/gobject-introspection/work= /gobject-introspection-0.6.7/gir' > ../tools/g-ir-compiler --includedir=3D. --includedir=3D../gir --includedi= r=3D../gir --includedir=3D. GLib-2.0.gir -o GLib-2.0.typelib > gmake[2]: *** [GLib-2.0.typelib] Illegal instruction: 4 (core dumped) > gmake[2]: Leaving directory `/usr/ports/devel/gobject-introspection/work/= gobject-introspection-0.6.7/gir' > gmake[1]: *** [all-recursive] Error 1 > gmake[1]: Leaving directory `/usr/ports/devel/gobject-introspection/work/= gobject-introspection-0.6.7' > gmake: *** [all] Error 2 > *** Error code 1 >=20 > Stop in /usr/ports/devel/gobject-introspection. > #=20 >=20 > Please advise I fixed this port on sparc64 recently. If it is broken again, you, or someone else with a sparc64 machine, will need to investigate and fix. Joe --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-IrQczVPV93aWx/MlmVMJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEABECAAYFAkuS838ACgkQb2iPiv4Uz4eTygCdF0VUc1rtdnM8lsQtfyH+TM8w HdIAoJQSFQieYjQvw8NPCacc37qb+C3T =dxHn -----END PGP SIGNATURE----- --=-IrQczVPV93aWx/MlmVMJ-- From owner-freebsd-sparc64@FreeBSD.ORG Sun Mar 7 00:57:53 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30D1F1065672; Sun, 7 Mar 2010 00:57:53 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id E01908FC0C; Sun, 7 Mar 2010 00:57:52 +0000 (UTC) Received: from ncsd.bris.ac.uk ([137.222.10.59] helo=ncs.bris.ac.uk) by dirj.bris.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1No4oZ-0005tN-FF; Sun, 07 Mar 2010 00:57:51 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1No4oZ-00073u-6c; Sun, 07 Mar 2010 00:57:51 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.3/8.14.3) with ESMTP id o270vohp029201; Sun, 7 Mar 2010 00:57:50 GMT (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.3/Submit) id o270vo58029200; Sun, 7 Mar 2010 00:57:50 GMT (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Sun, 7 Mar 2010 00:57:50 +0000 From: Anton Shterenlikht To: Joe Marcus Clarke Message-ID: <20100307005750.GJ28483@mech-cluster241.men.bris.ac.uk> References: <20100306230902.GI28483@mech-cluster241.men.bris.ac.uk> <1267921792.96436.6.camel@shumai.marcuscom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1267921792.96436.6.camel@shumai.marcuscom.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: gnome@freebsd.org, freebsd-sparc64@freebsd.org Subject: Re: devel/gobject-introspection fails to build on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 00:57:53 -0000 On Sat, Mar 06, 2010 at 07:29:52PM -0500, Joe Marcus Clarke wrote: > On Sat, 2010-03-06 at 23:09 +0000, Anton Shterenlikht wrote: > > On FreeBSD sparc64 9.0-CURRENT #0 r202774 > > > > I get > > > > Making all in gir > > gmake[2]: Entering directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.6.7/gir' > > ../tools/g-ir-compiler --includedir=. --includedir=../gir --includedir=../gir --includedir=. GLib-2.0.gir -o GLib-2.0.typelib > > gmake[2]: *** [GLib-2.0.typelib] Illegal instruction: 4 (core dumped) > > gmake[2]: Leaving directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.6.7/gir' > > gmake[1]: *** [all-recursive] Error 1 > > gmake[1]: Leaving directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.6.7' > > gmake: *** [all] Error 2 > > *** Error code 1 > > > > Stop in /usr/ports/devel/gobject-introspection. > > # > > > > Please advise > > I fixed this port on sparc64 recently. If it is broken again, you, or > someone else with a sparc64 machine, will need to investigate and fix. I updated the ports tree and it seems to build now.. sorry for the bother many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-sparc64@FreeBSD.ORG Mon Mar 8 11:07:06 2010 Return-Path: Delivered-To: freebsd-sparc64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D897B106564A for ; Mon, 8 Mar 2010 11:07:06 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C64F28FC14 for ; Mon, 8 Mar 2010 11:07:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o28B76sk073819 for ; Mon, 8 Mar 2010 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o28B75tL073817 for freebsd-sparc64@FreeBSD.org; Mon, 8 Mar 2010 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 8 Mar 2010 11:07:05 GMT Message-Id: <201003081107.o28B75tL073817@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-sparc64@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-sparc64@FreeBSD.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 11:07:06 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o sparc/142102 sparc64 [nfs] [panic] FreeBSD 8.0 kernel panics on sparc64 whe o sparc/141918 sparc64 [ehci] ehci_interrupt: unrecoverable error, controller s sparc/139134 sparc64 kernel output corruption f sparc/127051 sparc64 [hme] hme interfaces "pause" with the message "device o sparc/119244 sparc64 X11Forwarding to X11 server on sparc crashes Xorg o sparc/119240 sparc64 top has WCPU over 100% on UP system s sparc/119239 sparc64 gdb coredumps on sparc64 o sparc/113556 sparc64 [panic] trap: memory address not aligned; Rebooting... f sparc/108732 sparc64 ping(8) reports 14 digit time on sparc64 s sparc/107087 sparc64 [hang] system is hung during boot from CD o sparc/105048 sparc64 [trm] trm(4) panics on sparc64 o sparc/104428 sparc64 [nullfs] nullfs panics on E4500 (but not E420) o sparc/80890 sparc64 [panic] kmem_malloc(73728): kmem_map too small running o sparc/80410 sparc64 [netgraph] netgraph is causing crash with mpd on sparc o sparc/71729 sparc64 printf in kernel thread causes panic on SPARC 15 problems total. From owner-freebsd-sparc64@FreeBSD.ORG Mon Mar 8 19:03:11 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F6CF106564A for ; Mon, 8 Mar 2010 19:03:11 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.freebsd.org (Postfix) with ESMTP id A1CCE8FC13 for ; Mon, 8 Mar 2010 19:03:10 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149]) by mail18.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o28J32c2015589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Mar 2010 06:03:03 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o28J32rV098947; Tue, 9 Mar 2010 06:03:02 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o28J310N098946; Tue, 9 Mar 2010 06:03:01 +1100 (EST) (envelope-from peter) Date: Tue, 9 Mar 2010 06:03:01 +1100 From: Peter Jeremy To: freebsd-sparc64@freebsd.org Message-ID: <20100308190301.GA69938@server.vk2pj.dyndns.org> References: <20100228192329.GA68252@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <20100228192329.GA68252@server.vk2pj.dyndns.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Marius Strobl Subject: Re: gcc code generation problems X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 19:03:11 -0000 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Mar-01 06:23:30 +1100, Peter Jeremy wrote: >The correct answer is '53', but if optimisation is enabled, I'm >getting '51' instead. Disabling the printf() and/or using >-fno-strict-aliasing has no effect. > >$ cc -DXXX -O tryfp.c; ./a.out >a 4503599627370495 !=3D 0 >51 >$ cc -DXXX -O2 tryfp.c; ./a.out >a 4503599627370495 !=3D 0 >51 >$ cc -DXXX tryfp.c; ./a.out >a 18014398509481983 !=3D 18014398509481984 >53 >$=20 I've done a bit more investigating and come to the conclusion that the FP emulation code for fxtod is trashing %f12. The problem does not exist on OpenSolaris. On FreeBSD, gcc expands a double to unsigned long cast to: if (d >=3D (double)(1UL << 63)) { ul =3D (1UL << 63) ^ (long)(d - (double)(1UL << 63)); } else { ul =3D (long)d; } In the sample code, gcc calculates (double)(1UL << 63) at the top of the function and stores it in %f12. Somehow, this register turns into 0 on the 51st iteration, though nothing updates it. If I pick a different unused register (I've tried %f16, %f24 and %f32) then the code works. The "UltraSPARC IIIi Processor User's Manual", indicates that fxtod will trap for operands >=3D 2^51 (fdtox will trap for operands >=3D 2^53 and is therefore executed in hardware) which seems to point the finger at the FP emulation code in the userland trap handler. I am still looking into the emulation code. --=20 Peter Jeremy --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuVSeUACgkQ/opHv/APuIffMACeLnK2q2l290bierARvhBP3wwG GEsAmgKDzFq4KiOknO6wfxf9cYuCLi+x =T/rq -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9-- From owner-freebsd-sparc64@FreeBSD.ORG Tue Mar 9 10:28:05 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F47B10657D0 for ; Tue, 9 Mar 2010 10:28:05 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au [211.29.132.197]) by mx1.freebsd.org (Postfix) with ESMTP id 9FACB8FC08 for ; Tue, 9 Mar 2010 10:28:04 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149]) by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o29ARtm8014255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Mar 2010 21:27:56 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o29ARss0005173; Tue, 9 Mar 2010 21:27:54 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o29ARsUw005172; Tue, 9 Mar 2010 21:27:54 +1100 (EST) (envelope-from peter) Date: Tue, 9 Mar 2010 21:27:54 +1100 From: Peter Jeremy To: freebsd-sparc64@freebsd.org Message-ID: <20100309102753.GC3978@server.vk2pj.dyndns.org> References: <20100228192329.GA68252@server.vk2pj.dyndns.org> <20100308190301.GA69938@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5QAgd0e35j3NYeGe" Content-Disposition: inline In-Reply-To: <20100308190301.GA69938@server.vk2pj.dyndns.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Marius Strobl Subject: Re: gcc code generation problems X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2010 10:28:05 -0000 --5QAgd0e35j3NYeGe Content-Type: multipart/mixed; boundary="hQiwHBbRI9kgIhsi" Content-Disposition: inline --hQiwHBbRI9kgIhsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Mar-09 06:03:01 +1100, Peter Jeremy wrote: >code works. The "UltraSPARC IIIi Processor User's Manual", indicates >that fxtod will trap for operands >=3D 2^51 (fdtox will trap for >operands >=3D 2^53 and is therefore executed in hardware) which seems to >point the finger at the FP emulation code in the userland trap handler. Attached is a block of assembler that loads all 32 double FP registers with known non-zero values, executes a fxtod and then prints the values of all FP registers. This shows that the register following the emulated fxtod target is incorrectly zeroed. In the attached, the target is %f10 but I've also tried %f8 - which zeroed %f10. The three columns are: FP register number, value before fxtod, value after fxtod. Typical output on my USIIIi: 0 0xfddb757dbd5b7ddf 0xfddb757dbd5b7ddf 2 0xfbb6eafb7ab6fbbf 0xfbb6eafb7ab6fbbf 4 0xf76dd5f6f56df77f 0xf76dd5f6f56df77f 6 0xeedbabedeadbeeff 0xeedbabedeadbeeff 8 0xddb757dbd5b7ddff 0xddb757dbd5b7ddff 10 0xbb6eafb7ab6fbbff 0x432ffffffffffffe 12 0x76dd5f6f56df77ff 0x0000000000000000 14 0x000fffffffffffff 0x000fffffffffffff 16 0xdb757dbd5b7ddffd 0xdb757dbd5b7ddffd 18 0xb6eafb7ab6fbbffb 0xb6eafb7ab6fbbffb 20 0x6dd5f6f56df77ff7 0x6dd5f6f56df77ff7 22 0xdbabedeadbeeffee 0xdbabedeadbeeffee 24 0xb757dbd5b7ddffdd 0xb757dbd5b7ddffdd 26 0x6eafb7ab6fbbffbb 0x6eafb7ab6fbbffbb 28 0xdd5f6f56df77ff76 0xdd5f6f56df77ff76 30 0xbabedeadbeeffeed 0xbabedeadbeeffeed 32 0x757dbd5b7ddffddb 0x757dbd5b7ddffddb 34 0xeafb7ab6fbbffbb6 0xeafb7ab6fbbffbb6 36 0xd5f6f56df77ff76d 0xd5f6f56df77ff76d 38 0xabedeadbeeffeedb 0xabedeadbeeffeedb 40 0x57dbd5b7ddffddb7 0x57dbd5b7ddffddb7 42 0xafb7ab6fbbffbb6e 0xafb7ab6fbbffbb6e 44 0x5f6f56df77ff76dd 0x5f6f56df77ff76dd 46 0xbedeadbeeffeedba 0xbedeadbeeffeedba 48 0x7dbd5b7ddffddb75 0x7dbd5b7ddffddb75 50 0xfb7ab6fbbffbb6ea 0xfb7ab6fbbffbb6ea 52 0xf6f56df77ff76dd5 0xf6f56df77ff76dd5 54 0xedeadbeeffeedbab 0xedeadbeeffeedbab 56 0xdbd5b7ddffddb757 0xdbd5b7ddffddb757 58 0xb7ab6fbbffbb6eaf 0xb7ab6fbbffbb6eaf 60 0x6f56df77ff76dd5f 0x6f56df77ff76dd5f 62 0xdeadbeeffeedbabe 0xdeadbeeffeedbabe >I am still looking into the emulation code. I haven't found the above bug yet but I have found two other bugs in the FP register decoding in __fpu_execute(). Firstly, for fxto{s,d,q} decoding, rs2 is set generically using RN_DECODE() with 'type' =3D=3D 0 (because the low 2 bits are always 0. In this case, RN_DECODE() will assume a 32-bit rs2, whereas the SPARC architecture manual specifies that fxto{s,d,q} has a 64-bit rs2. The effect is that using a source register in the upper half will alias to the lower half. The rd value used in f{s,d,q}tox suffers from the same problem. --=20 Peter Jeremy --hQiwHBbRI9kgIhsi Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="eval.s" Content-Transfer-Encoding: quoted-printable .file "eval.s" .section ".text" .macro initfp ireg,wreg,wmem,fnum stx \ireg,\wmem ldd \wmem,%f\fnum sllx \ireg,1,\wreg srlx \ireg,63,\ireg or \ireg,\wreg,\ireg .endm .macro savefp wmem,fnum std %f\fnum,[\wmem+4*\fnum] .endm .align 32 .global main .type main, #function .proc 04 main: .register %g2, #scratch .register %g3, #scratch save %sp, -224, %sp ! Initialise all FP registers setx 0xfeedbabedeadbeef,%g1,%g2 setx foo,%g1,%l2 setx bar,%g1,%l3 stx %g2,[%l2] ldd [%l2],%f0 sllx %g2,1,%g1 srlx %g2,63,%g2 or %g2,%g1,%g2 initfp %g2,%g1,[%l2],0 initfp %g2,%g1,[%l2],2 initfp %g2,%g1,[%l2],4 initfp %g2,%g1,[%l2],6 initfp %g2,%g1,[%l2],8 initfp %g2,%g1,[%l2],10 initfp %g2,%g1,[%l2],12 initfp %g2,%g1,[%l2],14 initfp %g2,%g1,[%l2],16 initfp %g2,%g1,[%l2],18 initfp %g2,%g1,[%l2],20 initfp %g2,%g1,[%l2],22 initfp %g2,%g1,[%l2],24 initfp %g2,%g1,[%l2],26 initfp %g2,%g1,[%l2],28 initfp %g2,%g1,[%l2],30 initfp %g2,%g1,[%l2],32 initfp %g2,%g1,[%l2],34 initfp %g2,%g1,[%l2],36 initfp %g2,%g1,[%l2],38 initfp %g2,%g1,[%l2],40 initfp %g2,%g1,[%l2],42 initfp %g2,%g1,[%l2],44 initfp %g2,%g1,[%l2],46 initfp %g2,%g1,[%l2],48 initfp %g2,%g1,[%l2],50 initfp %g2,%g1,[%l2],52 initfp %g2,%g1,[%l2],54 initfp %g2,%g1,[%l2],56 initfp %g2,%g1,[%l2],58 initfp %g2,%g1,[%l2],60 initfp %g2,%g1,[%l2],62 mov 1,%g2 sllx %g2,52,%g2 dec %g2 stx %g2,[%l2] !!! Initialise fxtod source with wanted value ldd [%l2],%f14 ! Save FP regs to memory savefp %l2,0 savefp %l2,2 savefp %l2,4 savefp %l2,6 savefp %l2,8 savefp %l2,10 savefp %l2,12 savefp %l2,14 savefp %l2,16 savefp %l2,18 savefp %l2,20 savefp %l2,22 savefp %l2,24 savefp %l2,26 savefp %l2,28 savefp %l2,30 savefp %l2,32 savefp %l2,34 savefp %l2,36 savefp %l2,38 savefp %l2,40 savefp %l2,42 savefp %l2,44 savefp %l2,46 savefp %l2,48 savefp %l2,50 savefp %l2,52 savefp %l2,54 savefp %l2,56 savefp %l2,58 savefp %l2,60 savefp %l2,62 !!! Do something fxtod %f14,%f10 target: ! Save FP regs to memory after savefp %l3,0 savefp %l3,2 savefp %l3,4 savefp %l3,6 savefp %l3,8 savefp %l3,10 savefp %l3,12 savefp %l3,14 savefp %l3,16 savefp %l3,18 savefp %l3,20 savefp %l3,22 savefp %l3,24 savefp %l3,26 savefp %l3,28 savefp %l3,30 savefp %l3,32 savefp %l3,34 savefp %l3,36 savefp %l3,38 savefp %l3,40 savefp %l3,42 savefp %l3,44 savefp %l3,46 savefp %l3,48 savefp %l3,50 savefp %l3,52 savefp %l3,54 savefp %l3,56 savefp %l3,58 savefp %l3,60 savefp %l3,62 =09 mov 0, %l1 setx .LLC0,%g1,%l0 loop: mov %l0,%o0 ldx [%l2],%o2 ldx [%l3],%o3 call printf,0 mov %l1,%o1 add %l1,2,%l1 add %l3,8,%l3 cmp %l1,64 bne,pt %icc,loop add %l2,8,%l2 =09 call exit, 0 mov 0, %o0 nop .size main,(.-main) .align 8 .section ".rodata1",#alloc .align 8 =2ELLC0: .asciz "%2d 0x%016lx 0x%016lx\n" .type .LLC0,#object .size .LLC0,24 .local foo .common foo,256,8 .local bar .common bar,256,8 .end --hQiwHBbRI9kgIhsi-- --5QAgd0e35j3NYeGe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuWIqkACgkQ/opHv/APuIeE8wCfZzqZD7Hj72KIGMGxflpNPg0p QkUAniLoHon3YIZumV/60LtlGa524lf1 =Mpkc -----END PGP SIGNATURE----- --5QAgd0e35j3NYeGe-- From owner-freebsd-sparc64@FreeBSD.ORG Tue Mar 9 20:50:55 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A148D1065686 for ; Tue, 9 Mar 2010 20:50:55 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 045248FC08 for ; Tue, 9 Mar 2010 20:50:54 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id o29KomQV049433; Tue, 9 Mar 2010 21:50:48 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id o29KomVN049432; Tue, 9 Mar 2010 21:50:48 +0100 (CET) (envelope-from marius) Date: Tue, 9 Mar 2010 21:50:48 +0100 From: Marius Strobl To: Peter Jeremy Message-ID: <20100309205048.GB18466@alchemy.franken.de> References: <20100228192329.GA68252@server.vk2pj.dyndns.org> <20100308190301.GA69938@server.vk2pj.dyndns.org> <20100309102753.GC3978@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100309102753.GC3978@server.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@freebsd.org Subject: Re: gcc code generation problems X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2010 20:50:55 -0000 On Tue, Mar 09, 2010 at 09:27:54PM +1100, Peter Jeremy wrote: > On 2010-Mar-09 06:03:01 +1100, Peter Jeremy wrote: > >code works. The "UltraSPARC IIIi Processor User's Manual", indicates > >that fxtod will trap for operands >= 2^51 (fdtox will trap for > >operands >= 2^53 and is therefore executed in hardware) which seems to > >point the finger at the FP emulation code in the userland trap handler. > > Attached is a block of assembler that loads all 32 double FP registers > with known non-zero values, executes a fxtod and then prints the > values of all FP registers. This shows that the register following > the emulated fxtod target is incorrectly zeroed. In the attached, the > target is %f10 but I've also tried %f8 - which zeroed %f10. The three > columns are: FP register number, value before fxtod, value after fxtod. > > Typical output on my USIIIi: > 0 0xfddb757dbd5b7ddf 0xfddb757dbd5b7ddf > 2 0xfbb6eafb7ab6fbbf 0xfbb6eafb7ab6fbbf > 4 0xf76dd5f6f56df77f 0xf76dd5f6f56df77f > 6 0xeedbabedeadbeeff 0xeedbabedeadbeeff > 8 0xddb757dbd5b7ddff 0xddb757dbd5b7ddff > 10 0xbb6eafb7ab6fbbff 0x432ffffffffffffe > 12 0x76dd5f6f56df77ff 0x0000000000000000 > 14 0x000fffffffffffff 0x000fffffffffffff > 16 0xdb757dbd5b7ddffd 0xdb757dbd5b7ddffd > 18 0xb6eafb7ab6fbbffb 0xb6eafb7ab6fbbffb > 20 0x6dd5f6f56df77ff7 0x6dd5f6f56df77ff7 > 22 0xdbabedeadbeeffee 0xdbabedeadbeeffee > 24 0xb757dbd5b7ddffdd 0xb757dbd5b7ddffdd > 26 0x6eafb7ab6fbbffbb 0x6eafb7ab6fbbffbb > 28 0xdd5f6f56df77ff76 0xdd5f6f56df77ff76 > 30 0xbabedeadbeeffeed 0xbabedeadbeeffeed > 32 0x757dbd5b7ddffddb 0x757dbd5b7ddffddb > 34 0xeafb7ab6fbbffbb6 0xeafb7ab6fbbffbb6 > 36 0xd5f6f56df77ff76d 0xd5f6f56df77ff76d > 38 0xabedeadbeeffeedb 0xabedeadbeeffeedb > 40 0x57dbd5b7ddffddb7 0x57dbd5b7ddffddb7 > 42 0xafb7ab6fbbffbb6e 0xafb7ab6fbbffbb6e > 44 0x5f6f56df77ff76dd 0x5f6f56df77ff76dd > 46 0xbedeadbeeffeedba 0xbedeadbeeffeedba > 48 0x7dbd5b7ddffddb75 0x7dbd5b7ddffddb75 > 50 0xfb7ab6fbbffbb6ea 0xfb7ab6fbbffbb6ea > 52 0xf6f56df77ff76dd5 0xf6f56df77ff76dd5 > 54 0xedeadbeeffeedbab 0xedeadbeeffeedbab > 56 0xdbd5b7ddffddb757 0xdbd5b7ddffddb757 > 58 0xb7ab6fbbffbb6eaf 0xb7ab6fbbffbb6eaf > 60 0x6f56df77ff76dd5f 0x6f56df77ff76dd5f > 62 0xdeadbeeffeedbabe 0xdeadbeeffeedbabe > > >I am still looking into the emulation code. > > I haven't found the above bug yet but I have found two other bugs in > the FP register decoding in __fpu_execute(). > > Firstly, for fxto{s,d,q} decoding, rs2 is set generically using > RN_DECODE() with 'type' == 0 (because the low 2 bits are always 0. In > this case, RN_DECODE() will assume a 32-bit rs2, whereas the SPARC > architecture manual specifies that fxto{s,d,q} has a 64-bit rs2. > The effect is that using a source register in the upper half will > alias to the lower half. > > The rd value used in f{s,d,q}tox suffers from the same problem. > Apparently you're right about these. What do you think about the following patch? http://people.freebsd.org/~marius/fpu.c.diff Marius From owner-freebsd-sparc64@FreeBSD.ORG Tue Mar 9 21:18:18 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02A71106564A for ; Tue, 9 Mar 2010 21:18:18 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by mx1.freebsd.org (Postfix) with ESMTP id 766178FC16 for ; Tue, 9 Mar 2010 21:18:17 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o29LI7lP004945 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Mar 2010 08:18:08 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o29LI7nX034341; Wed, 10 Mar 2010 08:18:07 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o29LI7ur034340; Wed, 10 Mar 2010 08:18:07 +1100 (EST) (envelope-from peter) Date: Wed, 10 Mar 2010 08:18:07 +1100 From: Peter Jeremy To: Marius Strobl Message-ID: <20100309211807.GA34125@server.vk2pj.dyndns.org> References: <20100228192329.GA68252@server.vk2pj.dyndns.org> <20100308190301.GA69938@server.vk2pj.dyndns.org> <20100309102753.GC3978@server.vk2pj.dyndns.org> <20100309205048.GB18466@alchemy.franken.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GRPZ8SYKNexpdSJ7" Content-Disposition: inline In-Reply-To: <20100309205048.GB18466@alchemy.franken.de> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-sparc64@freebsd.org Subject: Re: gcc code generation problems X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2010 21:18:18 -0000 --GRPZ8SYKNexpdSJ7 Content-Type: multipart/mixed; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Mar-09 21:50:48 +0100, Marius Strobl wr= ote: >Apparently you're right about these. What do you think about the >following patch? >http://people.freebsd.org/~marius/fpu.c.diff I've found the problem with over-writing registers as well: There's a macro OPSZ() which is documented to return "Operand size in 32-bit registers". In reality, it's only correct for int32 and int64 but never used for int32 or float. Thus double and extended double are consistently broken. Since extended double winds up being the only special case, it was easier to get rid of the macro completely. My patch to fix all three problems is attached - it's slightly different to yours (and doesn't include any of the constification). We both seem to basically agree. I think my approach to RN_DECODE() should be somewhat faster (since it does less testing), though it meant re-defining FTYPE_LNG. Note that I haven't had a chance to test this yet (and have been thinking about how to create regression tests for the emulator). I was also going to have a closer look at some of the other __fpu_execute() cases to check that the register assumptions were correct but ran out of time on the train. (My FreeBSD/SPARC box is turned off so I can't test it until get home tonight). --=20 Peter Jeremy --Qxx1br4bt0+wmkIi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="fpu.diff" Content-Transfer-Encoding: quoted-printable Index: fpu.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/ncvs/src/lib/libc/sparc64/fpu/fpu.c,v retrieving revision 1.9.10.1 diff -u -r1.9.10.1 fpu.c --- fpu.c 3 Aug 2009 08:13:06 -0000 1.9.10.1 +++ fpu.c 9 Mar 2010 20:17:03 -0000 @@ -181,15 +181,11 @@ } #endif =20 -static int opmask[] =3D {0, 0, 1, 3}; +static int opmask[] =3D {0, 0, 1, 3, 1}; =20 /* Decode 5 bit register field depending on the type. */ #define RN_DECODE(tp, rn) \ - ((tp =3D=3D FTYPE_DBL || tp =3D=3D FTYPE_EXT ? INSFPdq_RN((rn)) : (rn)) &= \ - ~opmask[tp]) - -/* Operand size in 32-bit registers. */ -#define OPSZ(tp) ((tp) =3D=3D FTYPE_LNG ? 2 : (1 << (tp))) + ((tp) >=3D FTYPE_DBL ? INSFPdq_RN(rn) & ~opmask[tp] : (rn)) =20 /* * Helper for forming the below case statements. Build only the op3 and opf @@ -219,12 +215,13 @@ * Need to use the double versions to be able to access * the upper 32 fp registers. */ - for (i =3D 0; i < OPSZ(type); i +=3D 2, rd +=3D 2, rs2 +=3D 2) { - tmp64 =3D __fpu_getreg64(rs2); - if (i =3D=3D 0) - tmp64 =3D (tmp64 & ~((u_int64_t)nand << 32)) ^ - ((u_int64_t)xor << 32); - __fpu_setreg64(rd, tmp64); + tmp64 =3D __fpu_getreg64(rs2); + tmp64 =3D (tmp64 & ~((u_int64_t)nand << 32)) ^ + ((u_int64_t)xor << 32); + __fpu_setreg64(rd, tmp64); + if (type =3D=3D FTYPE_EXT) { + tmp64 =3D __fpu_getreg64(rs2+2); + __fpu_setreg64(rd+2, tmp64); } } } @@ -409,17 +406,22 @@ case FOP(INS2_FPop1, INSFP1_FxTOs): case FOP(INS2_FPop1, INSFP1_FxTOd): case FOP(INS2_FPop1, INSFP1_FxTOq): + /* + * Source operand is really long, though low two bits are + * zero. Override the implied type and re-calculate rs2 + */ type =3D FTYPE_LNG; + rs2 =3D RN_DECODE(type, IF_F3_RS2(insn)); __fpu_explode(fe, fp =3D &fe->fe_f1, type, rs2); - /* sneaky; depends on instruction encoding */ + /* Target operand size is encoded in bits 3:2, not 1:0 */ type =3D (IF_F3_OPF(insn) >> 2) & 3; rd =3D RN_DECODE(type, IF_F3_RD(insn)); break; case FOP(INS2_FPop1, INSFP1_FTOx): __fpu_explode(fe, fp =3D &fe->fe_f1, type, rs2); + /* Target operand is always long */ type =3D FTYPE_LNG; - mask =3D 1; /* needs 2 registers */ - rd =3D IF_F3_RD(insn) & ~mask; + rd =3D RN_DECODE(type, IF_F3_RD(insn)); break; case FOP(INS2_FPop1, INSFP1_FTOs): case FOP(INS2_FPop1, INSFP1_FTOd): @@ -457,10 +459,10 @@ if (type =3D=3D FTYPE_INT || type =3D=3D FTYPE_SNG) __fpu_setreg(rd, space[0]); else { - for (i =3D 0; i < OPSZ(type); i +=3D 2) { - __fpu_setreg64(rd + i, ((u_int64_t)space[i] << 32) | - space[i + 1]); - } + __fpu_setreg64(rd, ((u_int64_t)space[0] << 32) | space[1]); + if (type =3D=3D FTYPE_EXT) + __fpu_setreg64(rd + 2, ((u_int64_t)space[2] << 32) | + space[3]); } return (0); /* success */ } Index: fpu_emu.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/ncvs/src/lib/libc/sparc64/fpu/fpu_emu.h,v retrieving revision 1.6.10.1 diff -u -r1.6.10.1 fpu_emu.h --- fpu_emu.h 3 Aug 2009 08:13:06 -0000 1.6.10.1 +++ fpu_emu.h 9 Mar 2010 20:17:04 -0000 @@ -134,13 +134,14 @@ =20 /* * Floating point operand types. FTYPE_LNG is syntethic (it does not occur= in - * instructions). + * instructions). Note that the code relies on the numeric values of these + * constants in some places. */ -#define FTYPE_INT INSFP_i -#define FTYPE_SNG INSFP_s -#define FTYPE_DBL INSFP_d -#define FTYPE_EXT INSFP_q -#define FTYPE_LNG -1 +#define FTYPE_INT INSFP_i /* 0 */ +#define FTYPE_SNG INSFP_s /* 1 */ +#define FTYPE_DBL INSFP_d /* 2 */ +#define FTYPE_EXT INSFP_q /* 3 */ +#define FTYPE_LNG 4 =20 /* * Emulator state. --Qxx1br4bt0+wmkIi-- --GRPZ8SYKNexpdSJ7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuWuw8ACgkQ/opHv/APuIdbnwCfZkzsGM2gtfQ/9SAqo32aHZqK LIoAoIKDUSNHqrAiiNaT6I2W3w/GCeor =ZzlO -----END PGP SIGNATURE----- --GRPZ8SYKNexpdSJ7-- From owner-freebsd-sparc64@FreeBSD.ORG Wed Mar 10 00:43:19 2010 Return-Path: Delivered-To: sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1317106566C; Wed, 10 Mar 2010 00:43:19 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 815EC8FC08; Wed, 10 Mar 2010 00:43:19 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.3) with ESMTP id o2A0hJKE025087; Tue, 9 Mar 2010 19:43:19 -0500 (EST) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o2A0hJl6025086; Wed, 10 Mar 2010 00:43:19 GMT (envelope-from tinderbox@freebsd.org) Date: Wed, 10 Mar 2010 00:43:19 GMT Message-Id: <201003100043.o2A0hJl6025086@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2010 00:43:19 -0000 TB --- 2010-03-10 00:41:41 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-03-10 00:41:41 - starting HEAD tinderbox run for sparc64/sparc64 TB --- 2010-03-10 00:41:41 - cleaning the object tree TB --- 2010-03-10 00:42:10 - cvsupping the source tree TB --- 2010-03-10 00:42:10 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/sparc64/sparc64/supfile TB --- 2010-03-10 00:42:25 - building world TB --- 2010-03-10 00:42:25 - MAKEOBJDIRPREFIX=/obj TB --- 2010-03-10 00:42:25 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-03-10 00:42:25 - TARGET=sparc64 TB --- 2010-03-10 00:42:25 - TARGET_ARCH=sparc64 TB --- 2010-03-10 00:42:25 - TZ=UTC TB --- 2010-03-10 00:42:25 - __MAKE_CONF=/dev/null TB --- 2010-03-10 00:42:25 - cd /src TB --- 2010-03-10 00:42:25 - /usr/bin/make -B buildworld >>> World build started on Wed Mar 10 00:42:26 UTC 2010 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree [...] ===> secure/libexec/sftp-server (cleandir) rm -f sftp-server sftp-server.o sftp-common.o sftp-server-main.o roaming_dummy.o sftp-server.8.gz sftp-server.8.cat.gz rm -f .depend GPATH GRTAGS GSYMS GTAGS ===> secure/libexec/ssh-keysign (cleandir) rm -f ssh-keysign ssh-keysign.o readconf.o roaming_dummy.o ssh-keysign.8.gz ssh-keysign.8.cat.gz rm -f .depend GPATH GRTAGS GSYMS GTAGS ===> secure/libexec/ssh-pkcs11-helper (cleandir) cd: can't cd to /src/secure/libexec/ssh-pkcs11-helper *** Error code 2 Stop in /src/secure/libexec. *** Error code 1 Stop in /src/secure. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-03-10 00:43:18 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-03-10 00:43:18 - ERROR: failed to build world TB --- 2010-03-10 00:43:18 - 35.17 user 22.98 system 97.35 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-sparc64-sparc64.full From owner-freebsd-sparc64@FreeBSD.ORG Wed Mar 10 00:44:13 2010 Return-Path: Delivered-To: sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFFB5106568E; Wed, 10 Mar 2010 00:44:13 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 6EFBE8FC2B; Wed, 10 Mar 2010 00:44:13 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.3) with ESMTP id o2A0iCTp030504; Tue, 9 Mar 2010 19:44:12 -0500 (EST) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o2A0iCL0030503; Wed, 10 Mar 2010 00:44:12 GMT (envelope-from tinderbox@freebsd.org) Date: Wed, 10 Mar 2010 00:44:12 GMT Message-Id: <201003100044.o2A0iCL0030503@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on sparc64/sun4v X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2010 00:44:13 -0000 TB --- 2010-03-10 00:43:04 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-03-10 00:43:04 - starting HEAD tinderbox run for sparc64/sun4v TB --- 2010-03-10 00:43:04 - cleaning the object tree TB --- 2010-03-10 00:43:15 - cvsupping the source tree TB --- 2010-03-10 00:43:15 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/sparc64/sun4v/supfile TB --- 2010-03-10 00:43:30 - building world TB --- 2010-03-10 00:43:30 - MAKEOBJDIRPREFIX=/obj TB --- 2010-03-10 00:43:30 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-03-10 00:43:30 - TARGET=sun4v TB --- 2010-03-10 00:43:30 - TARGET_ARCH=sparc64 TB --- 2010-03-10 00:43:30 - TZ=UTC TB --- 2010-03-10 00:43:30 - __MAKE_CONF=/dev/null TB --- 2010-03-10 00:43:30 - cd /src TB --- 2010-03-10 00:43:30 - /usr/bin/make -B buildworld >>> World build started on Wed Mar 10 00:43:30 UTC 2010 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree [...] ===> secure/libexec/sftp-server (cleandir) rm -f sftp-server sftp-server.o sftp-common.o sftp-server-main.o roaming_dummy.o sftp-server.8.gz sftp-server.8.cat.gz rm -f .depend GPATH GRTAGS GSYMS GTAGS ===> secure/libexec/ssh-keysign (cleandir) rm -f ssh-keysign ssh-keysign.o readconf.o roaming_dummy.o ssh-keysign.8.gz ssh-keysign.8.cat.gz rm -f .depend GPATH GRTAGS GSYMS GTAGS ===> secure/libexec/ssh-pkcs11-helper (cleandir) cd: can't cd to /src/secure/libexec/ssh-pkcs11-helper *** Error code 2 Stop in /src/secure/libexec. *** Error code 1 Stop in /src/secure. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-03-10 00:44:12 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-03-10 00:44:12 - ERROR: failed to build world TB --- 2010-03-10 00:44:12 - 35.91 user 18.12 system 68.53 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-sparc64-sun4v.full From owner-freebsd-sparc64@FreeBSD.ORG Wed Mar 10 10:14:31 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05C221065670 for ; Wed, 10 Mar 2010 10:14:31 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8D48FC0A for ; Wed, 10 Mar 2010 10:14:30 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2AAEMqO026447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Mar 2010 21:14:23 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o2AAEMRr039260; Wed, 10 Mar 2010 21:14:22 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o2AAEKHn039259; Wed, 10 Mar 2010 21:14:20 +1100 (EST) (envelope-from peter) Date: Wed, 10 Mar 2010 21:14:20 +1100 From: Peter Jeremy To: Marius Strobl Message-ID: <20100310101420.GB37825@server.vk2pj.dyndns.org> References: <20100228192329.GA68252@server.vk2pj.dyndns.org> <20100308190301.GA69938@server.vk2pj.dyndns.org> <20100309102753.GC3978@server.vk2pj.dyndns.org> <20100309205048.GB18466@alchemy.franken.de> <20100309211807.GA34125@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ghzN8eJ9Qlbqn3iT" Content-Disposition: inline In-Reply-To: <20100309211807.GA34125@server.vk2pj.dyndns.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-sparc64@freebsd.org Subject: Re: gcc code generation problems X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2010 10:14:31 -0000 --ghzN8eJ9Qlbqn3iT Content-Type: multipart/mixed; boundary="oC1+HKm2/end4ao3" Content-Disposition: inline --oC1+HKm2/end4ao3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Mar-10 08:18:07 +1100, Peter Jeremy wrote: >My patch to fix all three problems is attached - it's slightly >different to yours (and doesn't include any of the constification). >We both seem to basically agree. I think my approach to RN_DECODE() >should be somewhat faster (since it does less testing), though it >meant re-defining FTYPE_LNG. I've revised my previous patch to remove two now-unused variables as well as include the constification in your patch. After rebuilding libc, the eval.s program I posted a few days ago now works correctly as posted and with the following modifications to the two !!! blocks: ((1 << 53) - 1) =3D> %f34; fxtos %f34,%f20 ((1 << 53) - 1) =3D> %f34; fxtod %f34,%f40 ((1 << 53) - 1) =3D> %f34; fxtoq %f34,%f40 0x5a000000 =3D> %f31; fstox %f31,%f32 0x433fffffffffffff =3D> %f34; fdtox %f34,%f40 (The above are all emulated according to the US-IIIi databook). Unfortunately, the following code: 0x4033ffffffffffff =3D> %f40; 0xf000000000000000 =3D> %f42; fqtox %f40,%f30 gives a result of 0x001ffffffffffff0 instead of 0x001fffffffffffff. The low order bits (those in %f42) appear to be ignored. A similar problem occurs with fqtod. faddq %f40,%f40,%f32 has the low destination (%f34) shifted one bit right - which implies that the low order register is ignored in only one argument. I don't see any obvious issue anywhere and have elected to leave this problem for now. fmovq does work but uses a different code-path. > (and have been >thinking about how to create regression tests for the emulator). Two possibilities here are UCBTEST and TestFloat (note that SoftFloat is already in the FreeBSD tree). I have copies of both but haven't actually converted either into a suitable test harness. --=20 Peter Jeremy --oC1+HKm2/end4ao3 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="fpu.diff" Content-Transfer-Encoding: quoted-printable Index: fpu.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/ncvs/src/lib/libc/sparc64/fpu/fpu.c,v retrieving revision 1.9.10.1 diff -u -r1.9.10.1 fpu.c --- fpu.c 3 Aug 2009 08:13:06 -0000 1.9.10.1 +++ fpu.c 10 Mar 2010 08:35:00 -0000 @@ -97,7 +97,7 @@ #define X8(x) X4(x),X4(x) #define X16(x) X8(x),X8(x) =20 -static char cx_to_trapx[] =3D { +static const char cx_to_trapx[] =3D { X1(FSR_NX), X2(FSR_DZ), X4(FSR_UF), @@ -169,7 +169,7 @@ void __fpu_dumpfpn(struct fpn *fp) { - static char *class[] =3D { + static const char *class[] =3D { "SNAN", "QNAN", "ZERO", "NUM", "INF" }; =20 @@ -181,15 +181,11 @@ } #endif =20 -static int opmask[] =3D {0, 0, 1, 3}; +static const int opmask[] =3D {0, 0, 1, 3, 1}; =20 /* Decode 5 bit register field depending on the type. */ #define RN_DECODE(tp, rn) \ - ((tp =3D=3D FTYPE_DBL || tp =3D=3D FTYPE_EXT ? INSFPdq_RN((rn)) : (rn)) &= \ - ~opmask[tp]) - -/* Operand size in 32-bit registers. */ -#define OPSZ(tp) ((tp) =3D=3D FTYPE_LNG ? 2 : (1 << (tp))) + ((tp) >=3D FTYPE_DBL ? INSFPdq_RN(rn) & ~opmask[tp] : (rn)) =20 /* * Helper for forming the below case statements. Build only the op3 and opf @@ -210,7 +206,6 @@ u_int32_t xor) { u_int64_t tmp64; - int i; =20 if (type =3D=3D FTYPE_INT || type =3D=3D FTYPE_SNG) __fpu_setreg(rd, (__fpu_getreg(rs2) & ~nand) ^ xor); @@ -219,12 +214,13 @@ * Need to use the double versions to be able to access * the upper 32 fp registers. */ - for (i =3D 0; i < OPSZ(type); i +=3D 2, rd +=3D 2, rs2 +=3D 2) { - tmp64 =3D __fpu_getreg64(rs2); - if (i =3D=3D 0) - tmp64 =3D (tmp64 & ~((u_int64_t)nand << 32)) ^ - ((u_int64_t)xor << 32); - __fpu_setreg64(rd, tmp64); + tmp64 =3D __fpu_getreg64(rs2); + tmp64 =3D (tmp64 & ~((u_int64_t)nand << 32)) ^ + ((u_int64_t)xor << 32); + __fpu_setreg64(rd, tmp64); + if (type =3D=3D FTYPE_EXT) { + tmp64 =3D __fpu_getreg64(rs2+2); + __fpu_setreg64(rd+2, tmp64); } } } @@ -277,7 +273,6 @@ int opf, rs1, rs2, rd, type, mask, cx, cond; u_long reg, fsr; u_int space[4]; - int i; =20 /* * `Decode' and execute instruction. Start with no exceptions. @@ -409,24 +404,29 @@ case FOP(INS2_FPop1, INSFP1_FxTOs): case FOP(INS2_FPop1, INSFP1_FxTOd): case FOP(INS2_FPop1, INSFP1_FxTOq): + /* + * Source operand is really long, though low two bits are + * zero. Override the implied type and re-calculate rs2 + */ type =3D FTYPE_LNG; + rs2 =3D RN_DECODE(type, IF_F3_RS2(insn)); __fpu_explode(fe, fp =3D &fe->fe_f1, type, rs2); - /* sneaky; depends on instruction encoding */ + /* Target operand size is encoded in bits 3:2, not 1:0 */ type =3D (IF_F3_OPF(insn) >> 2) & 3; rd =3D RN_DECODE(type, IF_F3_RD(insn)); break; case FOP(INS2_FPop1, INSFP1_FTOx): __fpu_explode(fe, fp =3D &fe->fe_f1, type, rs2); + /* Target operand is always long */ type =3D FTYPE_LNG; - mask =3D 1; /* needs 2 registers */ - rd =3D IF_F3_RD(insn) & ~mask; + rd =3D RN_DECODE(type, IF_F3_RD(insn)); break; case FOP(INS2_FPop1, INSFP1_FTOs): case FOP(INS2_FPop1, INSFP1_FTOd): case FOP(INS2_FPop1, INSFP1_FTOq): case FOP(INS2_FPop1, INSFP1_FTOi): __fpu_explode(fe, fp =3D &fe->fe_f1, type, rs2); - /* sneaky; depends on instruction encoding */ + /* Target operand size is encoded in bits 3:2, not 1:0 */ type =3D (IF_F3_OPF(insn) >> 2) & 3; rd =3D RN_DECODE(type, IF_F3_RD(insn)); break; @@ -457,10 +457,10 @@ if (type =3D=3D FTYPE_INT || type =3D=3D FTYPE_SNG) __fpu_setreg(rd, space[0]); else { - for (i =3D 0; i < OPSZ(type); i +=3D 2) { - __fpu_setreg64(rd + i, ((u_int64_t)space[i] << 32) | - space[i + 1]); - } + __fpu_setreg64(rd, ((u_int64_t)space[0] << 32) | space[1]); + if (type =3D=3D FTYPE_EXT) + __fpu_setreg64(rd + 2, ((u_int64_t)space[2] << 32) | + space[3]); } return (0); /* success */ } Index: fpu_emu.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/ncvs/src/lib/libc/sparc64/fpu/fpu_emu.h,v retrieving revision 1.6.10.1 diff -u -r1.6.10.1 fpu_emu.h --- fpu_emu.h 3 Aug 2009 08:13:06 -0000 1.6.10.1 +++ fpu_emu.h 10 Mar 2010 08:33:26 -0000 @@ -134,13 +134,14 @@ =20 /* * Floating point operand types. FTYPE_LNG is syntethic (it does not occur= in - * instructions). + * instructions). Note that the code relies on the numeric values of these + * constants in some places. */ -#define FTYPE_INT INSFP_i -#define FTYPE_SNG INSFP_s -#define FTYPE_DBL INSFP_d -#define FTYPE_EXT INSFP_q -#define FTYPE_LNG -1 +#define FTYPE_INT INSFP_i /* 0 */ +#define FTYPE_SNG INSFP_s /* 1 */ +#define FTYPE_DBL INSFP_d /* 2 */ +#define FTYPE_EXT INSFP_q /* 3 */ +#define FTYPE_LNG 4 =20 /* * Emulator state. --oC1+HKm2/end4ao3-- --ghzN8eJ9Qlbqn3iT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuXcPwACgkQ/opHv/APuIdmZgCgu8DDl/u+J2qmfKCZe78RZx1t Ss0AnA/kp7D1cG/XoUt+4v/ifMxB/Ytg =mq4R -----END PGP SIGNATURE----- --ghzN8eJ9Qlbqn3iT-- From owner-freebsd-sparc64@FreeBSD.ORG Wed Mar 10 20:05:05 2010 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E44C81065674 for ; Wed, 10 Mar 2010 20:05:05 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 56A6A8FC1A for ; Wed, 10 Mar 2010 20:05:04 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id o2AK51Jo062067; Wed, 10 Mar 2010 21:05:02 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id o2AK505e062063; Wed, 10 Mar 2010 21:05:00 +0100 (CET) (envelope-from marius) Date: Wed, 10 Mar 2010 21:05:00 +0100 From: Marius Strobl To: Peter Jeremy Message-ID: <20100310200500.GD18466@alchemy.franken.de> References: <20100228192329.GA68252@server.vk2pj.dyndns.org> <20100308190301.GA69938@server.vk2pj.dyndns.org> <20100309102753.GC3978@server.vk2pj.dyndns.org> <20100309205048.GB18466@alchemy.franken.de> <20100309211807.GA34125@server.vk2pj.dyndns.org> <20100310101420.GB37825@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100310101420.GB37825@server.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@freebsd.org Subject: Re: gcc code generation problems X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2010 20:05:06 -0000 On Wed, Mar 10, 2010 at 09:14:20PM +1100, Peter Jeremy wrote: > On 2010-Mar-10 08:18:07 +1100, Peter Jeremy wrote: > >My patch to fix all three problems is attached - it's slightly > >different to yours (and doesn't include any of the constification). > >We both seem to basically agree. I think my approach to RN_DECODE() > >should be somewhat faster (since it does less testing), though it > >meant re-defining FTYPE_LNG. > > I've revised my previous patch to remove two now-unused variables as > well as include the constification in your patch. Thanks, I've committed a merged version. > > After rebuilding libc, the eval.s program I posted a few days ago now > works correctly as posted and with the following modifications to the > two !!! blocks: > ((1 << 53) - 1) => %f34; fxtos %f34,%f20 > ((1 << 53) - 1) => %f34; fxtod %f34,%f40 > ((1 << 53) - 1) => %f34; fxtoq %f34,%f40 > 0x5a000000 => %f31; fstox %f31,%f32 > 0x433fffffffffffff => %f34; fdtox %f34,%f40 > (The above are all emulated according to the US-IIIi databook). > > Unfortunately, the following code: > 0x4033ffffffffffff => %f40; 0xf000000000000000 => %f42; fqtox %f40,%f30 > gives a result of 0x001ffffffffffff0 instead of 0x001fffffffffffff. > The low order bits (those in %f42) appear to be ignored. A similar > problem occurs with fqtod. faddq %f40,%f40,%f32 has the low > destination (%f34) shifted one bit right - which implies that the low > order register is ignored in only one argument. I don't see any > obvious issue anywhere and have elected to leave this problem for now. > fmovq does work but uses a different code-path. > > > (and have been > >thinking about how to create regression tests for the emulator). > > Two possibilities here are UCBTEST and TestFloat (note that SoftFloat > is already in the FreeBSD tree). I have copies of both but haven't > actually converted either into a suitable test harness. > FYI, the OpenSolaris source also includes a SPARC centric test suite in src/cmd/fps/fptest. Marius From owner-freebsd-sparc64@FreeBSD.ORG Wed Mar 10 21:26:55 2010 Return-Path: Delivered-To: freebsd-sparc64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9FFA106564A; Wed, 10 Mar 2010 21:26:55 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id AB2E38FC0C; Wed, 10 Mar 2010 21:26:55 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1NpTQc-0003kR-N4; Wed, 10 Mar 2010 21:26:54 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1NpTQc-0006mh-I2; Wed, 10 Mar 2010 21:26:54 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.3/8.14.3) with ESMTP id o2ALQs1j086246; Wed, 10 Mar 2010 21:26:54 GMT (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.3/Submit) id o2ALQsfR086245; Wed, 10 Mar 2010 21:26:54 GMT (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Wed, 10 Mar 2010 21:26:54 +0000 From: Anton Shterenlikht To: kde@FreeBSD.org, freebsd-sparc64@FreeBSD.org Message-ID: <20100310212654.GB30257@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: port www/qt4-webkit failed on sparc64 9.0 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2010 21:26:56 -0000 This is on FreeBSD sparc64 9.0-CURRENT #0 r202774=20 Building www/qt4-webkit I get this error: c++ -c -O2 -pipe -fno-strict-aliasing -I../../../../include/Qt -I../../../.= =2E/include -Wreturn-type -fno-strict-aliasing -ffunction-sections -fdata-s= ections -O2 -I/usr/local/include -I/usr/local/include/freetype2 -fvisibilit= y=3Dhidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQT_SHARED -DBUILDIN= G_QT__=3D1 -DNDEBUG -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SU= PPORT -DQT_MOC_COMPAT -DHAVE_PTHREAD_NP_H -DBUILD_WEBKIT -DENABLE_JAVASCRIP= T_DEBUGGER=3D1 -DENABLE_DATABASE=3D1 -DENABLE_EVENTSOURCE=3D1 -DENABLE_OFFL= INE_WEB_APPLICATIONS=3D1 -DENABLE_DOM_STORAGE=3D1 -DENABLE_ICONDATABASE=3D1= -DENABLE_CHANNEL_MESSAGING=3D1 -DENABLE_ORIENTATION_EVENTS=3D0 -DENABLE_SQ= LITE=3D1 -DENABLE_DASHBOARD_SUPPORT=3D0 -DENABLE_FILTERS=3D0 -DENABLE_XPATH= =3D1 -DENABLE_WCSS=3D0 -DENABLE_WML=3D0 -DENABLE_SHARED_WORKERS=3D1 -DENABL= E_WORKERS=3D1 -DENABLE_XHTMLMP=3D0 -DENABLE_DATAGRID=3D0 -DENABLE_SVG=3D1 -= DENABLE_SVG_FONTS=3D1 -DENABLE_SVG_FOREIGN_OBJECT=3D1 -DENABLE_SVG_ANIMATIO= N=3D1 -DENABLE_SVG_AS_IMAGE=3D1 -DENABLE_SVG_USE=3D1 -DENABLE_RUBY=3D1 -DEN= ABLE_VIDEO=3D1 -DENABLE_DATALIST=3D1 -DENABLE_NETSCAPE_PLUGIN_API=3D1 -DENA= BLE_WEB_SOCKETS=3D1 -DENABLE_XSLT=3D1 -DWTF_USE_JAVASCRIPTCORE_BINDINGS=3D1= -DWTF_CHANGES=3D1 -DBUILDING_QT__ -DBUILDING_JavaScriptCore -DBUILDING_WTF= -DXP_UNIX -DSQLITE_CORE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLET= E -DQT_NO_DEBUG -DQT_XMLPATTERNS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_COR= E_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/local/share/qt4/mksp= ecs/freebsd-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNe= twork -I../../../../include/QtGui -I../../../../include/QtXmlPatterns -I../= =2E./../../include -Ibridge/qt -Ipage/qt -Iplatform/graphics/qt -Iplatform/= network/qt -Iplatform/qt -I../WebKit/qt/WebCoreSupport -I. -Iaccessibility = -Ibindings/js -Ibridge -Ibridge/c -Icss -Idom -Idom/default -Iediting -Ihis= tory -Ihtml -Ihtml/canvas -Iinspector -Iloader -Iloader/appcache -Iloader/a= rchive -Iloader/icon -Inotifications -Ipage -Ipage/animation -Iplatform -Ip= latform/animation -Iplatform/graphics -Iplatform/graphics/filters -Iplatfor= m/graphics/transforms -Iplatform/image-decoders -Iplatform/mock -Iplatform/= network -Iplatform/sql -Iplatform/text -Iplugins -Irendering -Irendering/st= yle -Istorage -Isvg -Isvg/animation -Isvg/graphics -Isvg/graphics/filters -= Iwebsockets -Iwml -Iworkers -Ixml -Igenerated -I../JavaScriptCore -I../../w= ebkit -I../JavaScriptCore/assembler -I../JavaScriptCore/bytecode -I../JavaS= criptCore/bytecompiler -I../JavaScriptCore/debugger -I../JavaScriptCore/int= erpreter -I../JavaScriptCore/jit -I../JavaScriptCore/parser -I../JavaScript= Core/profiler -I../JavaScriptCore/runtime -I../JavaScriptCore/wrec -I../Jav= aScriptCore/wtf -I../JavaScriptCore/wtf/unicode -I../JavaScriptCore/yarr -I= =2E./JavaScriptCore/API -I../JavaScriptCore/ForwardingHeaders -Igenerated -= I../WebKit/qt/Api -I../../../../include/QtWebKit -I.rcc/release-shared -I..= /JavaScriptCore/pcre -I/usr/ports/www/qt4-webkit/work/qt-everywhere-opensou= rce-src-4.6.1/src/3rdparty/webkit/WebKitBuild/Release/JavaScriptCore/tmp -I= =2E./../sqlite -I../../../../include/phonon -I/usr/local/include -I.moc/rel= ease-shared -I/usr/local/include -o obj/release/JSBase.o ../JavaScriptCore/= API/JSBase.cpp In file included from ../JavaScriptCore/runtime/JSCell.h:28, from ../JavaScriptCore/runtime/JSAPIValueWrapper.h:28, from ../JavaScriptCore/API/APICast.h:29, from ../JavaScriptCore/API/JSBase.cpp:30: =2E./JavaScriptCore/runtime/JSValue.h: In constructor 'JSC::JSValue::JSValu= e(JSC::JSCell*)': =2E./JavaScriptCore/runtime/JSValue.h:479: error: cast from 'JSC::JSCell*' = to 'int32_t' loses precision =2E./JavaScriptCore/runtime/JSValue.h: In constructor 'JSC::JSValue::JSValu= e(const JSC::JSCell*)': =2E./JavaScriptCore/runtime/JSValue.h:488: error: cast from 'JSC::JSCell*' = to 'int32_t' loses precision *** Error code 1 1 error The full log: http://seis.bris.ac.uk/~mexas/qt4-webkit-ia64.log Please advise many thanks anton --=20 Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-sparc64@FreeBSD.ORG Thu Mar 11 06:49:57 2010 Return-Path: Delivered-To: sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 169AC106567A; Thu, 11 Mar 2010 06:49:57 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id E54C78FC25; Thu, 11 Mar 2010 06:49:56 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.3) with ESMTP id o2B6nu5q057768; Thu, 11 Mar 2010 01:49:56 -0500 (EST) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o2B6nuZA057767; Thu, 11 Mar 2010 06:49:56 GMT (envelope-from tinderbox@freebsd.org) Date: Thu, 11 Mar 2010 06:49:56 GMT Message-Id: <201003110649.o2B6nuZA057767@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2010 06:49:57 -0000 TB --- 2010-03-11 05:36:17 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-03-11 05:36:17 - starting HEAD tinderbox run for sparc64/sparc64 TB --- 2010-03-11 05:36:17 - cleaning the object tree TB --- 2010-03-11 05:36:34 - cvsupping the source tree TB --- 2010-03-11 05:36:34 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/sparc64/sparc64/supfile TB --- 2010-03-11 05:37:04 - building world TB --- 2010-03-11 05:37:04 - MAKEOBJDIRPREFIX=/obj TB --- 2010-03-11 05:37:04 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-03-11 05:37:04 - TARGET=sparc64 TB --- 2010-03-11 05:37:04 - TARGET_ARCH=sparc64 TB --- 2010-03-11 05:37:04 - TZ=UTC TB --- 2010-03-11 05:37:04 - __MAKE_CONF=/dev/null TB --- 2010-03-11 05:37:04 - cd /src TB --- 2010-03-11 05:37:04 - /usr/bin/make -B buildworld >>> World build started on Thu Mar 11 05:37:04 UTC 2010 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Thu Mar 11 06:33:09 UTC 2010 TB --- 2010-03-11 06:33:09 - generating LINT kernel config TB --- 2010-03-11 06:33:09 - cd /src/sys/sparc64/conf TB --- 2010-03-11 06:33:09 - /usr/bin/make -B LINT TB --- 2010-03-11 06:33:09 - building LINT kernel TB --- 2010-03-11 06:33:09 - MAKEOBJDIRPREFIX=/obj TB --- 2010-03-11 06:33:09 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-03-11 06:33:09 - TARGET=sparc64 TB --- 2010-03-11 06:33:09 - TARGET_ARCH=sparc64 TB --- 2010-03-11 06:33:09 - TZ=UTC TB --- 2010-03-11 06:33:09 - __MAKE_CONF=/dev/null TB --- 2010-03-11 06:33:09 - cd /src TB --- 2010-03-11 06:33:09 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Thu Mar 11 06:33:09 UTC 2010 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] ===> siba_bwn (all) cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /obj/sparc64/src/sys/LINT/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -I/obj/sparc64/src/sys/LINT -mcmodel=medany -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c cc1: warnings being treated as errors /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c: In function 'siba_dma_translation': /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: warning: dereferencing 'void *' pointer /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: error: request for member 'sd_bus' in something not a structure or union /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: warning: dereferencing 'void *' pointer /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: error: request for member 'sd_bus' in something not a structure or union *** Error code 1 Stop in /src/sys/modules/siba_bwn. *** Error code 1 Stop in /src/sys/modules. *** Error code 1 Stop in /obj/sparc64/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-03-11 06:49:56 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-03-11 06:49:56 - ERROR: failed to build lint kernel TB --- 2010-03-11 06:49:56 - 3495.35 user 600.04 system 4419.16 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-sparc64-sparc64.full From owner-freebsd-sparc64@FreeBSD.ORG Thu Mar 11 07:08:46 2010 Return-Path: Delivered-To: sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7A821065672; Thu, 11 Mar 2010 07:08:45 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id C23118FC1E; Thu, 11 Mar 2010 07:08:45 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.3) with ESMTP id o2B78juT086803; Thu, 11 Mar 2010 02:08:45 -0500 (EST) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o2B78jkc086802; Thu, 11 Mar 2010 07:08:45 GMT (envelope-from tinderbox@freebsd.org) Date: Thu, 11 Mar 2010 07:08:45 GMT Message-Id: <201003110708.o2B78jkc086802@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on sparc64/sun4v X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2010 07:08:46 -0000 TB --- 2010-03-11 05:57:33 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-03-11 05:57:33 - starting HEAD tinderbox run for sparc64/sun4v TB --- 2010-03-11 05:57:33 - cleaning the object tree TB --- 2010-03-11 05:57:44 - cvsupping the source tree TB --- 2010-03-11 05:57:44 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/sparc64/sun4v/supfile TB --- 2010-03-11 05:58:10 - building world TB --- 2010-03-11 05:58:10 - MAKEOBJDIRPREFIX=/obj TB --- 2010-03-11 05:58:10 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-03-11 05:58:10 - TARGET=sun4v TB --- 2010-03-11 05:58:10 - TARGET_ARCH=sparc64 TB --- 2010-03-11 05:58:10 - TZ=UTC TB --- 2010-03-11 05:58:10 - __MAKE_CONF=/dev/null TB --- 2010-03-11 05:58:10 - cd /src TB --- 2010-03-11 05:58:10 - /usr/bin/make -B buildworld >>> World build started on Thu Mar 11 05:58:10 UTC 2010 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Thu Mar 11 06:51:45 UTC 2010 TB --- 2010-03-11 06:51:45 - generating LINT kernel config TB --- 2010-03-11 06:51:45 - cd /src/sys/sun4v/conf TB --- 2010-03-11 06:51:45 - /usr/bin/make -B LINT TB --- 2010-03-11 06:51:45 - building LINT kernel TB --- 2010-03-11 06:51:45 - MAKEOBJDIRPREFIX=/obj TB --- 2010-03-11 06:51:45 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-03-11 06:51:45 - TARGET=sun4v TB --- 2010-03-11 06:51:45 - TARGET_ARCH=sparc64 TB --- 2010-03-11 06:51:45 - TZ=UTC TB --- 2010-03-11 06:51:45 - __MAKE_CONF=/dev/null TB --- 2010-03-11 06:51:45 - cd /src TB --- 2010-03-11 06:51:45 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Thu Mar 11 06:51:45 UTC 2010 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] ===> siba_bwn (all) cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /obj/sun4v/src/sys/LINT/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -I/obj/sun4v/src/sys/LINT -mcmodel=medany -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c cc1: warnings being treated as errors /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c: In function 'siba_dma_translation': /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: warning: dereferencing 'void *' pointer /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: error: request for member 'sd_bus' in something not a structure or union /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: warning: dereferencing 'void *' pointer /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: error: request for member 'sd_bus' in something not a structure or union *** Error code 1 Stop in /src/sys/modules/siba_bwn. *** Error code 1 Stop in /src/sys/modules. *** Error code 1 Stop in /obj/sun4v/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-03-11 07:08:45 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-03-11 07:08:45 - ERROR: failed to build lint kernel TB --- 2010-03-11 07:08:45 - 3499.16 user 582.64 system 4271.66 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-sparc64-sun4v.full