From owner-freebsd-sparc64@FreeBSD.ORG Mon Dec 26 11:07:16 2011 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 4F0C8106566C for ; Mon, 26 Dec 2011 11:07:16 +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 3C5688FC08 for ; Mon, 26 Dec 2011 11:07:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBQB7GM6022614 for ; Mon, 26 Dec 2011 11:07:16 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBQB7FfR022612 for freebsd-sparc64@FreeBSD.org; Mon, 26 Dec 2011 11:07:15 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 26 Dec 2011 11:07:15 GMT Message-Id: <201112261107.pBQB7FfR022612@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, 26 Dec 2011 11:07:16 -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/162513 sparc64 mpt(4), mptutil(8) reports variable, erroneous drive i o sparc/141918 sparc64 [ehci] ehci_interrupt: unrecoverable error, controller s sparc/139134 sparc64 kernel output corruption 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/71729 sparc64 printf in kernel thread causes panic on SPARC 7 problems total. From owner-freebsd-sparc64@FreeBSD.ORG Tue Dec 27 23:12:47 2011 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 50CBD1065672; Tue, 27 Dec 2011 23:12:47 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id B21FA8FC15; Tue, 27 Dec 2011 23:12:43 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 24C972A28CC9; Wed, 28 Dec 2011 00:12:43 +0100 (CET) Date: Wed, 28 Dec 2011 00:12:43 +0100 From: Ed Schouten To: mips@FreeBSD.org, sparc64@FreeBSD.org Message-ID: <20111227231243.GB1895@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lCAWRPmW1mITcIfM" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: (Finally) migrate MIPS and SPARC64 to libcompiler_rt 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, 27 Dec 2011 23:12:47 -0000 --lCAWRPmW1mITcIfM Content-Type: multipart/mixed; boundary="tjCHc7DPkfUGtrlw" Content-Disposition: inline --tjCHc7DPkfUGtrlw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, Quite some time ago, we switched from libgcc to libcompiler_rt on all architectures except MIPS and SPARC64. At the time I was also quite busy with other FreeBSD and LLVM related things, so I decided to leave MIPS and SPARC64 the way they were. The reason why we haven't switched these two architectures yet, is due to a minor bug in __ctzdi2() calling __builtin_ctz(). On these two architectures, this ends up calling __ctzdi2() again, causing a hang. I have filed a bug for this at the LLVM folks, but until that time I want to ask if there are people that are willing to test the attached patch on their MIPS and SPARC64 systems. The only thing you need to do: rebuild world two iterations to see whether everything works properly. I do advise you to test this patch in a jail first. If this patch fixes the problem, I will commit the change to SVN. As of then, every architecture will use libcompiler_rt. This also makes work on MIPS properly. Thanks, --=20 Ed Schouten WWW: http://80386.nl/ --tjCHc7DPkfUGtrlw Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ctzdi2.diff" Content-Transfer-Encoding: quoted-printable Index: gnu/lib/libgcc/Makefile =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 --- gnu/lib/libgcc/Makefile (revision 228913) +++ gnu/lib/libgcc/Makefile (working copy) @@ -15,10 +15,6 @@ =20 .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" =20 -.if ${TARGET_CPUARCH} =3D=3D "sparc64" || ${TARGET_CPUARCH} =3D=3D "mips" -LIB=3D gcc -.endif - .PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}/config ${GCCDIR} =20 CFLAGS+=3D -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ Index: lib/libcompiler_rt/Makefile =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 --- lib/libcompiler_rt/Makefile (revision 228919) +++ lib/libcompiler_rt/Makefile (working copy) @@ -172,13 +172,11 @@ . endif .endfor =20 -.if ${MACHINE_CPUARCH} !=3D "sparc64" && ${MACHINE_CPUARCH} !=3D "mips" -. if ${MK_INSTALLLIB} !=3D "no" +.if ${MK_INSTALLLIB} !=3D "no" SYMLINKS+=3Dlibcompiler_rt.a ${LIBDIR}/libgcc.a -. endif -. if ${MK_PROFILE} !=3D "no" +.endif +.if ${MK_PROFILE} !=3D "no" SYMLINKS+=3Dlibcompiler_rt_p.a ${LIBDIR}/libgcc_p.a -. endif .endif =20 .if ${MACHINE_CPUARCH} =3D=3D "amd64" || ${MACHINE_CPUARCH} =3D=3D "i386" = || \ Index: contrib/compiler-rt/lib/ctzdi2.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 --- contrib/compiler-rt/lib/ctzdi2.c (revision 228913) +++ contrib/compiler-rt/lib/ctzdi2.c (working copy) @@ -15,6 +15,12 @@ =20 #include "int_lib.h" =20 +/* Workaround for LLVM bug 11663. */ +#if defined(__sparc64__) || defined(__mips_n64) +si_int __ctzsi2(si_int); +#define __builtin_ctz __ctzsi2 +#endif + /* Returns: the number of trailing 0-bits */ =20 /* Precondition: a !=3D 0 */ --tjCHc7DPkfUGtrlw-- --lCAWRPmW1mITcIfM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJO+lDrAAoJEG5e2P40kaK72LgQAKsyLAEeDaC/EwLnAkVKD3rw 4oKpcRJtuEPEQwZNHZtnF3EZFKQXcE9nSl0KbMdMrbA/g4DhVkU6XyCG7Lipwzzp IcAmgm/gLPdBhuYzq2Rdo+SRfPmO3gqMau91HeGkpegrCPy4g/vjc6GW3hHrTJO0 nJmoGRUOvWjUDifkuvU9fxbALzfNu8rZ8j1xXeR2EB+3XMCJ0AyAO1wumLo+nn6j 8oLVyiwfZzUVSvoHeZqy7ioi9GVXW0Mnu9v6nkU9cvKolew3v6d4moFX9qRC3H+h +epMAZM00z7QgODApIswoNtX9ZxU7+w7AkGq1vMNCMsI07dt+acObCEc7d4PoLFz EVRdUC+oZNLllqjLOKiKr2Eki4thb0Tf8IMufboZ0tY9fLUpKxzc0wEoJ4PSFnj6 XyawiqAXcibtE9vg5bZ/l3JuT/PFPphwKU6UKA+55ZdAGxtBFC0ao6nw2+Ck+kUJ IYLJukvu0Yi7zWHkO8386t1lTrybpA9bTg2Y4XPAXGKhb6L9MUZ3x5GrjnsAhMP3 3bGTDO4x133axwD6E5qykpD53qr3tjOkGNLY8ig6n6X/lzi0r2dgV0lh6Wz8UZ4M WjHZFKnwfTLy4R97+yhJc02D3jKwnBSqNXyuijz7sWWrsnvY/Ar92iNxlIa/RfpI kAufMnLjzuZSlEGo7JfC =MBOq -----END PGP SIGNATURE----- --lCAWRPmW1mITcIfM-- From owner-freebsd-sparc64@FreeBSD.ORG Tue Dec 27 23:56:10 2011 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 D829E106566B; Tue, 27 Dec 2011 23:56:10 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (cl-414.sto-01.se.sixxs.net [IPv6:2001:16d8:ff00:19d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 896908FC16; Tue, 27 Dec 2011 23:56:10 +0000 (UTC) Received: from orion.SpringDaemons.com (207.47.0.2.static.nextweb.net [207.47.0.2]) by mx0.deglitch.com (Postfix) with ESMTPA id 3DD348FC3A; Wed, 28 Dec 2011 03:56:09 +0400 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 354C762F8; Tue, 27 Dec 2011 15:54:09 -0800 (PST) Date: Tue, 27 Dec 2011 15:54:09 -0800 From: Stanislav Sedov To: Ed Schouten Message-Id: <20111227155409.caccb69e.stas@FreeBSD.org> In-Reply-To: <20111227231243.GB1895@hoeg.nl> References: <20111227231243.GB1895@hoeg.nl> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: mips@FreeBSD.org, sparc64@FreeBSD.org Subject: Re: (Finally) migrate MIPS and SPARC64 to libcompiler_rt 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, 27 Dec 2011 23:56:10 -0000 On Wed, 28 Dec 2011 00:12:43 +0100 Ed Schouten mentioned: > Hi all, > > Quite some time ago, we switched from libgcc to libcompiler_rt on all > architectures except MIPS and SPARC64. At the time I was also quite busy > with other FreeBSD and LLVM related things, so I decided to leave MIPS > and SPARC64 the way they were. > > The reason why we haven't switched these two architectures yet, is due > to a minor bug in __ctzdi2() calling __builtin_ctz(). On these two > architectures, this ends up calling __ctzdi2() again, causing a hang. > > I have filed a bug for this at the LLVM folks, but until that time I > want to ask if there are people that are willing to test the attached > patch on their MIPS and SPARC64 systems. The only thing you need to do: > rebuild world two iterations to see whether everything works properly. I > do advise you to test this patch in a jail first. > > If this patch fixes the problem, I will commit the change to SVN. As of > then, every architecture will use libcompiler_rt. This also makes > work on MIPS properly. > Hi! It seems that the patch was stripped off. Thanks! -- Stanislav Sedov ST4096-RIPE () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments From owner-freebsd-sparc64@FreeBSD.ORG Wed Dec 28 00:29:24 2011 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 25746106564A; Wed, 28 Dec 2011 00:29:24 +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 95D1B8FC12; Wed, 28 Dec 2011 00:29:23 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pBS07NH8077408; Wed, 28 Dec 2011 01:07:24 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pBS07NK3077407; Wed, 28 Dec 2011 01:07:23 +0100 (CET) (envelope-from marius) Date: Wed, 28 Dec 2011 01:07:23 +0100 From: Marius Strobl To: Ed Schouten Message-ID: <20111228000723.GA77332@alchemy.franken.de> References: <20111227231243.GB1895@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111227231243.GB1895@hoeg.nl> User-Agent: Mutt/1.4.2.3i Cc: mips@freebsd.org, sparc64@freebsd.org Subject: Re: (Finally) migrate MIPS and SPARC64 to libcompiler_rt 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, 28 Dec 2011 00:29:24 -0000 On Wed, Dec 28, 2011 at 12:12:43AM +0100, Ed Schouten wrote: > Hi all, > > Quite some time ago, we switched from libgcc to libcompiler_rt on all > architectures except MIPS and SPARC64. At the time I was also quite busy > with other FreeBSD and LLVM related things, so I decided to leave MIPS > and SPARC64 the way they were. > > The reason why we haven't switched these two architectures yet, is due > to a minor bug in __ctzdi2() calling __builtin_ctz(). On these two > architectures, this ends up calling __ctzdi2() again, causing a hang. > > I have filed a bug for this at the LLVM folks, but until that time I > want to ask if there are people that are willing to test the attached > patch on their MIPS and SPARC64 systems. The only thing you need to do: > rebuild world two iterations to see whether everything works properly. I > do advise you to test this patch in a jail first. > > If this patch fixes the problem, I will commit the change to SVN. As of > then, every architecture will use libcompiler_rt. This also makes > work on MIPS properly. > Before making libcompiler_rt the default for sparc64 could you please also look into adding the optimized versions of _divsi3 and _modsi3 (see contrib/gcc/config/sparc/lb1spc.asm) to libcompiler_rt? They're taken from/based on the SPARC V8 Architecture Manual and IIRC I once compared them and there actually was little difference so there should be no licensing issues. Marius From owner-freebsd-sparc64@FreeBSD.ORG Wed Dec 28 09:18:19 2011 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 B8BDD106566B; Wed, 28 Dec 2011 09:18:19 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 28DFD8FC0A; Wed, 28 Dec 2011 09:18:18 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 3887B2A28CC9; Wed, 28 Dec 2011 10:18:17 +0100 (CET) Date: Wed, 28 Dec 2011 10:18:17 +0100 From: Ed Schouten To: Marius Strobl Message-ID: <20111228091817.GC1895@hoeg.nl> References: <20111227231243.GB1895@hoeg.nl> <20111228000723.GA77332@alchemy.franken.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0QFb0wBpEddLcDHQ" Content-Disposition: inline In-Reply-To: <20111228000723.GA77332@alchemy.franken.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: mips@freebsd.org, sparc64@freebsd.org Subject: [Updated patch] (Finally) migrate MIPS and SPARC64 to libcompiler_rt 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, 28 Dec 2011 09:18:19 -0000 --0QFb0wBpEddLcDHQ Content-Type: multipart/mixed; boundary="FFoLq8A0u+X9iRU8" Content-Disposition: inline --FFoLq8A0u+X9iRU8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Marius, * Marius Strobl , 20111228 01:07: > Before making libcompiler_rt the default for sparc64 could you please > also look into adding the optimized versions of _divsi3 and _modsi3 > (see contrib/gcc/config/sparc/lb1spc.asm) to libcompiler_rt? They're > taken from/based on the SPARC V8 Architecture Manual and IIRC I once > compared them and there actually was little difference so there should > be no licensing issues. Just to make sure we don't get into license problems, I copied the code =66rom the architecture manual and regenerated the assembly files. I compared them against the ones used by GCC and they should work. Please forget the previous patch I sent and use the one attached. If the attachment is missing, you can download the patch here: http://80386.nl/pub/compiler-rt.txt The code isn't that beautiful yet, but I'll clean it up before I send it to the compiler-rt folks. Thanks, --=20 Ed Schouten WWW: http://80386.nl/ --FFoLq8A0u+X9iRU8 Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="compiler-rt.diff" Content-Transfer-Encoding: quoted-printable Index: gnu/lib/libgcc/Makefile =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 --- gnu/lib/libgcc/Makefile (revision 228913) +++ gnu/lib/libgcc/Makefile (working copy) @@ -15,10 +15,6 @@ =20 .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" =20 -.if ${TARGET_CPUARCH} =3D=3D "sparc64" || ${TARGET_CPUARCH} =3D=3D "mips" -LIB=3D gcc -.endif - .PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}/config ${GCCDIR} =20 CFLAGS+=3D -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ Index: lib/libcompiler_rt/Makefile =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 --- lib/libcompiler_rt/Makefile (revision 228919) +++ lib/libcompiler_rt/Makefile (working copy) @@ -172,13 +172,11 @@ . endif .endfor =20 -.if ${MACHINE_CPUARCH} !=3D "sparc64" && ${MACHINE_CPUARCH} !=3D "mips" -. if ${MK_INSTALLLIB} !=3D "no" +.if ${MK_INSTALLLIB} !=3D "no" SYMLINKS+=3Dlibcompiler_rt.a ${LIBDIR}/libgcc.a -. endif -. if ${MK_PROFILE} !=3D "no" +.endif +.if ${MK_PROFILE} !=3D "no" SYMLINKS+=3Dlibcompiler_rt_p.a ${LIBDIR}/libgcc_p.a -. endif .endif =20 .if ${MACHINE_CPUARCH} =3D=3D "amd64" || ${MACHINE_CPUARCH} =3D=3D "i386" = || \ Index: contrib/compiler-rt/lib/ctzdi2.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 --- contrib/compiler-rt/lib/ctzdi2.c (revision 228913) +++ contrib/compiler-rt/lib/ctzdi2.c (working copy) @@ -15,6 +15,12 @@ =20 #include "int_lib.h" =20 +/* Workaround for LLVM bug 11663. */ +#if defined(__sparc64__) || defined(__mips_n64) +si_int __ctzsi2(si_int); +#define __builtin_ctz __ctzsi2 +#endif + /* Returns: the number of trailing 0-bits */ =20 /* Precondition: a !=3D 0 */ Index: contrib/compiler-rt/lib/sparc64/modsi3.S =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 --- contrib/compiler-rt/lib/sparc64/modsi3.S (revision 0) +++ contrib/compiler-rt/lib/sparc64/modsi3.S (working copy) @@ -0,0 +1,333 @@ +/* + * This m4 code has been taken from The SPARC Architecture Manual Version = 8. + */ +/* + * Division/Remainder + * + * Input is: + * dividend -- the thing being divided + * divisor -- how many ways to divide it + * Important parameters: + * N -- how many bits per iteration we try to get + * as our current guess: + * WORDSIZE -- how many bits altogether we're talking about: + * obviously: + * A derived constant: + * TOPBITS -- how many bits are in the top "decade" of a number: + * + * Important variables are: + * Q -- the partial quotient under development -- initially 0 + * R -- the remainder so far -- initially =3D=3D the dividend + * ITER -- number of iterations of the main division loop which will + * be required. Equal to CEIL( lg2(quotient)/4 ) + * Note that this is log_base_(2=CB=864) of the quotient. + * V -- the current comparand -- initially divisor*2=CB=86(ITER*4-1) + * Cost: + * current estimate for non-large dividend is + * CEIL( lg2(quotient) / 4 ) x ( 10 + 74/2 ) + C + * a large dividend is one greater than 2=CB=86(31-4 ) and takes a + * different path, as the upper bits of the quotient must be developed + * one bit at a time. + * This uses the m4 and cpp macro preprocessors. + */ +/* + * This is the recursive definition of how we develop quotient digits. + * It takes three important parameters: + * $1 -- the current depth, 1<=3D$1<=3D4 + * $2 -- the current accumulation of quotient bits + * 4 -- max depth + * We add a new bit to $2 and either recurse or insert the bits in the quo= tient. + * Dynamic input: + * %o3 -- current remainder + * %o2 -- current quotient + * %o5 -- current comparand + * cc -- set on current value of %o3 + * Dynamic output: + * %o3', %o2', %o5', cc' + */ +#include "../assembly.h" +.text + .align 4 +DEFINE_COMPILERRT_FUNCTION(__umodsi3) + save %sp,-64,%sp ! do this for debugging + b divide + mov 0,%g3 ! result always nonnegative +DEFINE_COMPILERRT_FUNCTION(__modsi3) + save %sp,-64,%sp ! do this for debugging + orcc %o1,%o0,%g0 ! are either %o0 or %o1 negative + bge divide ! if not, skip this junk + mov %o0,%g3 ! record sign of result in sign of %g3 + tst %o1 + bge 2f + tst %o0 + ! %o1 < 0 + bge divide + neg %o1 + 2: + ! %o0 < 0 + neg %o0 + ! FALL THROUGH +divide: + ! Compute size of quotient, scale comparand. + orcc %o1,%g0,%o5 ! movcc %o1,%o5 + te 2 ! if %o1 =3D 0 + mov %o0,%o3 + mov 0,%o2 + sethi %hi(1<<(32-4 -1)),%g1 + cmp %o3,%g1 + blu not_really_big + mov 0,%o4 + ! + ! Here, the %o0 is >=3D 2=CB=86(31-4) or so. We must be careful here, + ! as our usual 4-at-a-shot divide step will cause overflow and havoc. + ! The total number of bits in the result here is 4*%o4+%g2, where + ! %g2 <=3D 4. + ! Compute %o4 in an unorthodox manner: know we need to Shift %o5 into +! the top decade: so don't even bother to compare to %o3. +1: + cmp %o5,%g1 + bgeu 3f + mov 1,%g2 + sll %o5,4,%o5 + b 1b + inc %o4 +! Now compute %g2 +2: addcc %o5,%o5,%o5 + bcc not_too_big + add %g2,1,%g2 + ! We're here if the %o1 overflowed when Shifting. + ! This means that %o3 has the high-order bit set. + ! Restore %o5 and subtract from %o3. + sll %g1,4 ,%g1 ! high order bit + srl %o5,1,%o5 ! rest of %o5 + add %o5,%g1,%o5 + b do_single_div + dec %g2 +not_too_big: +3: cmp %o5,%o3 + blu 2b + nop + be do_single_div + nop +! %o5 > %o3: went too far: back up 1 step +! srl %o5,1,%o5 +! dec %g2 +! do single-bit divide steps +! +! We have to be careful here. We know that %o3 >=3D %o5, so we can do the +! first divide step without thinking. BUT, the others are conditional, +! and are only done if %o3 >=3D 0. Because both %o3 and %o5 may have the h= igh- +! order bit set in the first step, just falling into the regular +! division loop will mess up the first time around. +! So we unroll slightly... +do_single_div: + deccc %g2 + bl end_regular_divide + nop + sub %o3,%o5,%o3 + mov 1,%o2 + b end_single_divloop + nop +single_divloop: + sll %o2,1,%o2 + bl 1f + srl %o5,1,%o5 + ! %o3 >=3D 0 + sub %o3,%o5,%o3 + b 2f + inc %o2 + 1: ! %o3 < 0 + add %o3,%o5,%o3 + dec %o2 + 2: + end_single_divloop: + deccc %g2 + bge single_divloop + tst %o3 + b end_regular_divide + nop +not_really_big: +1: + sll %o5,4,%o5 + cmp %o5,%o3 + bleu 1b + inccc %o4 + be got_result + dec %o4 +do_regular_divide: + ! Do the main division iteration + tst %o3 + ! Fall through into divide loop +divloop: + sll %o2,4,%o2 + !depth 1, accumulated bits 0 + bl L.1.16 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 2, accumulated bits 1 + bl L.2.17 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 3, accumulated bits 3 + bl L.3.19 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 4, accumulated bits 7 + bl L.4.23 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (7*2+1), %o2 +L.4.23: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (7*2-1), %o2 +L.3.19: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 4, accumulated bits 5 + bl L.4.21 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (5*2+1), %o2 +L.4.21: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (5*2-1), %o2 +L.2.17: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 3, accumulated bits 1 + bl L.3.17 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 4, accumulated bits 3 + bl L.4.19 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (3*2+1), %o2 +L.4.19: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (3*2-1), %o2 +L.3.17: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 4, accumulated bits 1 + bl L.4.17 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (1*2+1), %o2 +L.4.17: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (1*2-1), %o2 +L.1.16: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 2, accumulated bits -1 + bl L.2.15 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 3, accumulated bits -1 + bl L.3.15 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 4, accumulated bits -1 + bl L.4.15 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (-1*2+1), %o2 +L.4.15: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-1*2-1), %o2 +L.3.15: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 4, accumulated bits -3 + bl L.4.13 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (-3*2+1), %o2 +L.4.13: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-3*2-1), %o2 +L.2.15: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 3, accumulated bits -3 + bl L.3.13 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 4, accumulated bits -5 + bl L.4.11 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (-5*2+1), %o2 +L.4.11: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-5*2-1), %o2 +L.3.13: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 4, accumulated bits -7 + bl L.4.9 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (-7*2+1), %o2 +L.4.9: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-7*2-1), %o2 + 9: +end_regular_divide: + deccc %o4 + bge divloop + tst %o3 + bge got_result + nop + ! non-restoring fixup here + add %o3,%o1,%o3 +got_result: + tst %g3 + bge 1f + restore + ! answer < 0 + retl ! leaf-routine return + neg %o3,%o0 ! remainder <- -%o3 +1: + retl ! leaf-routine return + mov %o3,%o0 ! remainder <- %o3 Index: contrib/compiler-rt/lib/sparc64/divmod.m4 =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 --- contrib/compiler-rt/lib/sparc64/divmod.m4 (revision 0) +++ contrib/compiler-rt/lib/sparc64/divmod.m4 (working copy) @@ -0,0 +1,250 @@ +/* + * This m4 code has been taken from The SPARC Architecture Manual Version = 8. + */ + +/* + * Division/Remainder + * + * Input is: + * dividend -- the thing being divided + * divisor -- how many ways to divide it + * Important parameters: + * N -- how many bits per iteration we try to get + * as our current guess: define(N, 4) define(TWOSUPN, 16) + * WORDSIZE -- how many bits altogether we're talking about: + * obviously: define(WORDSIZE, 32) + * A derived constant: + * TOPBITS -- how many bits are in the top "decade" of a number: + * define(TOPBITS, eval( WORDSIZE - N*((WORDSIZE-1)/N) ) ) + * Important variables are: + * Q -- the partial quotient under development -- initially 0 + * R -- the remainder so far -- initially =3D=3D the dividend + * ITER -- number of iterations of the main division loop which will + * be required. Equal to CEIL( lg2(quotient)/N ) + * Note that this is log_base_(2=CB=86N) of the quotient. + * V -- the current comparand -- initially divisor*2=CB=86(ITER*N-1) + * Cost: + * current estimate for non-large dividend is + * CEIL( lg2(quotient) / N ) x ( 10 + 7N/2 ) + C + * a large dividend is one greater than 2=CB=86(31-TOPBITS) and takes a + * different path, as the upper bits of the quotient must be developed + * one bit at a time. + * This uses the m4 and cpp macro preprocessors. + */ + +define(dividend, `%o0') +define(divisor,`%o1') +define(Q, `%o2') +define(R, `%o3') +define(ITER, `%o4') +define(V, `%o5') +define(SIGN, `%g3') +define(T, `%g1') +define(SC,`%g2') +/* + * This is the recursive definition of how we develop quotient digits. + * It takes three important parameters: + * $1 -- the current depth, 1<=3D$1<=3DN + * $2 -- the current accumulation of quotient bits + * N -- max depth + * We add a new bit to $2 and either recurse or insert the bits in the quo= tient. + * Dynamic input: + * R -- current remainder + * Q -- current quotient + * V -- current comparand + * cc -- set on current value of R + * Dynamic output: + * R', Q', V', cc' + */ + +#include "../assembly.h" + +.text + .align 4 + +define(DEVELOP_QUOTIENT_BITS, +` !depth $1, accumulated bits $2 + bl L.$1.eval(TWOSUPN+$2) + srl V,1,V + ! remainder is nonnegative + subcc R,V,R + ifelse( $1, N, + ` b 9f + add Q, ($2*2+1), Q + ',` DEVELOP_QUOTIENT_BITS( incr($1), `eval(2*$2+1)') + ') +L.$1.eval(TWOSUPN+$2): + ! remainder is negative + addcc R,V,R + ifelse( $1, N, + ` b 9f + add Q, ($2*2-1), Q + ',` DEVELOP_QUOTIENT_BITS( incr($1), `eval(2*$2-1)') + ') + ifelse( $1, 1, `9:') +') +ifelse( ANSWER, `quotient', ` +DEFINE_COMPILERRT_FUNCTION(__udivsi3) + save %sp,-64,%sp ! do this for debugging + b divide + mov 0,SIGN ! result always nonnegative +DEFINE_COMPILERRT_FUNCTION(__divsi3) + save %sp,-64,%sp ! do this for debugging + orcc divisor,dividend,%g0 ! are either dividend or divisor negative + bge divide ! if not, skip this junk + xor divisor,dividend,SIGN ! record sign of result in sign of SIGN + tst divisor + bge 2f + tst dividend + ! divisor < 0 + bge divide + neg divisor + 2: + ! dividend < 0 + neg dividend + ! FALL THROUGH +',` +DEFINE_COMPILERRT_FUNCTION(__umodsi3) + save %sp,-64,%sp ! do this for debugging + b divide + mov 0,SIGN ! result always nonnegative +DEFINE_COMPILERRT_FUNCTION(__modsi3) + save %sp,-64,%sp ! do this for debugging + orcc divisor,dividend,%g0 ! are either dividend or divisor negative + bge divide ! if not, skip this junk + mov dividend,SIGN ! record sign of result in sign of SIGN + tst divisor + bge 2f + tst dividend + ! divisor < 0 + bge divide + neg divisor + 2: + ! dividend < 0 + neg dividend + ! FALL THROUGH +') + +divide: + ! Compute size of quotient, scale comparand. + orcc divisor,%g0,V ! movcc divisor,V + te 2 ! if divisor =3D 0 + mov dividend,R + mov 0,Q + sethi %hi(1<<(WORDSIZE-TOPBITS-1)),T + cmp R,T + blu not_really_big + mov 0,ITER + ! + ! Here, the dividend is >=3D 2=CB=86(31-N) or so. We must be careful here, + ! as our usual N-at-a-shot divide step will cause overflow and havoc. + ! The total number of bits in the result here is N*ITER+SC, where + ! SC <=3D N. + ! Compute ITER in an unorthodox manner: know we need to Shift V into +! the top decade: so don't even bother to compare to R. +1: + cmp V,T + bgeu 3f + mov 1,SC + sll V,N,V + b 1b + inc ITER +! Now compute SC +2: addcc V,V,V + bcc not_too_big + add SC,1,SC + ! We're here if the divisor overflowed when Shifting. + ! This means that R has the high-order bit set. + ! Restore V and subtract from R. + sll T,TOPBITS,T ! high order bit + srl V,1,V ! rest of V + add V,T,V + b do_single_div + dec SC +not_too_big: +3: cmp V,R + blu 2b + nop + be do_single_div + nop +! V > R: went too far: back up 1 step +! srl V,1,V +! dec SC +! do single-bit divide steps +! +! We have to be careful here. We know that R >=3D V, so we can do the +! first divide step without thinking. BUT, the others are conditional, +! and are only done if R >=3D 0. Because both R and V may have the high- +! order bit set in the first step, just falling into the regular +! division loop will mess up the first time around. +! So we unroll slightly... +do_single_div: + deccc SC + bl end_regular_divide + nop + sub R,V,R + mov 1,Q + b end_single_divloop + nop +single_divloop: + sll Q,1,Q + bl 1f + srl V,1,V + ! R >=3D 0 + sub R,V,R + b 2f + inc Q + 1: ! R < 0 + add R,V,R + dec Q + 2: + end_single_divloop: + deccc SC + bge single_divloop + tst R + b end_regular_divide + nop + +not_really_big: +1: + sll V,N,V + cmp V,R + bleu 1b + inccc ITER + be got_result + dec ITER +do_regular_divide: + ! Do the main division iteration + tst R + ! Fall through into divide loop +divloop: + sll Q,N,Q + DEVELOP_QUOTIENT_BITS( 1, 0 ) +end_regular_divide: + deccc ITER + bge divloop + tst R + bge got_result + nop + ! non-restoring fixup here +ifelse( ANSWER, `quotient', +` dec Q +',` add R,divisor,R +') + +got_result: + tst SIGN + bge 1f + restore + ! answer < 0 + retl ! leaf-routine return +ifelse( ANSWER, `quotient', +` neg %o2,%o0 ! quotient <- -Q +',` neg %o3,%o0 ! remainder <- -R +') +1: + retl ! leaf-routine return +ifelse( ANSWER, `quotient', +` mov %o2,%o0 ! quotient <- Q +',` mov %o3,%o0 ! remainder <- R +') Index: contrib/compiler-rt/lib/sparc64/divsi3.S =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 --- contrib/compiler-rt/lib/sparc64/divsi3.S (revision 0) +++ contrib/compiler-rt/lib/sparc64/divsi3.S (working copy) @@ -0,0 +1,333 @@ +/* + * This m4 code has been taken from The SPARC Architecture Manual Version = 8. + */ +/* + * Division/Remainder + * + * Input is: + * dividend -- the thing being divided + * divisor -- how many ways to divide it + * Important parameters: + * N -- how many bits per iteration we try to get + * as our current guess: + * WORDSIZE -- how many bits altogether we're talking about: + * obviously: + * A derived constant: + * TOPBITS -- how many bits are in the top "decade" of a number: + * + * Important variables are: + * Q -- the partial quotient under development -- initially 0 + * R -- the remainder so far -- initially =3D=3D the dividend + * ITER -- number of iterations of the main division loop which will + * be required. Equal to CEIL( lg2(quotient)/4 ) + * Note that this is log_base_(2=CB=864) of the quotient. + * V -- the current comparand -- initially divisor*2=CB=86(ITER*4-1) + * Cost: + * current estimate for non-large dividend is + * CEIL( lg2(quotient) / 4 ) x ( 10 + 74/2 ) + C + * a large dividend is one greater than 2=CB=86(31-4 ) and takes a + * different path, as the upper bits of the quotient must be developed + * one bit at a time. + * This uses the m4 and cpp macro preprocessors. + */ +/* + * This is the recursive definition of how we develop quotient digits. + * It takes three important parameters: + * $1 -- the current depth, 1<=3D$1<=3D4 + * $2 -- the current accumulation of quotient bits + * 4 -- max depth + * We add a new bit to $2 and either recurse or insert the bits in the quo= tient. + * Dynamic input: + * %o3 -- current remainder + * %o2 -- current quotient + * %o5 -- current comparand + * cc -- set on current value of %o3 + * Dynamic output: + * %o3', %o2', %o5', cc' + */ +#include "../assembly.h" +.text + .align 4 +DEFINE_COMPILERRT_FUNCTION(__udivsi3) + save %sp,-64,%sp ! do this for debugging + b divide + mov 0,%g3 ! result always nonnegative +DEFINE_COMPILERRT_FUNCTION(__divsi3) + save %sp,-64,%sp ! do this for debugging + orcc %o1,%o0,%g0 ! are either %o0 or %o1 negative + bge divide ! if not, skip this junk + xor %o1,%o0,%g3 ! record sign of result in sign of %g3 + tst %o1 + bge 2f + tst %o0 + ! %o1 < 0 + bge divide + neg %o1 + 2: + ! %o0 < 0 + neg %o0 + ! FALL THROUGH +divide: + ! Compute size of quotient, scale comparand. + orcc %o1,%g0,%o5 ! movcc %o1,%o5 + te 2 ! if %o1 =3D 0 + mov %o0,%o3 + mov 0,%o2 + sethi %hi(1<<(32-4 -1)),%g1 + cmp %o3,%g1 + blu not_really_big + mov 0,%o4 + ! + ! Here, the %o0 is >=3D 2=CB=86(31-4) or so. We must be careful here, + ! as our usual 4-at-a-shot divide step will cause overflow and havoc. + ! The total number of bits in the result here is 4*%o4+%g2, where + ! %g2 <=3D 4. + ! Compute %o4 in an unorthodox manner: know we need to Shift %o5 into +! the top decade: so don't even bother to compare to %o3. +1: + cmp %o5,%g1 + bgeu 3f + mov 1,%g2 + sll %o5,4,%o5 + b 1b + inc %o4 +! Now compute %g2 +2: addcc %o5,%o5,%o5 + bcc not_too_big + add %g2,1,%g2 + ! We're here if the %o1 overflowed when Shifting. + ! This means that %o3 has the high-order bit set. + ! Restore %o5 and subtract from %o3. + sll %g1,4 ,%g1 ! high order bit + srl %o5,1,%o5 ! rest of %o5 + add %o5,%g1,%o5 + b do_single_div + dec %g2 +not_too_big: +3: cmp %o5,%o3 + blu 2b + nop + be do_single_div + nop +! %o5 > %o3: went too far: back up 1 step +! srl %o5,1,%o5 +! dec %g2 +! do single-bit divide steps +! +! We have to be careful here. We know that %o3 >=3D %o5, so we can do the +! first divide step without thinking. BUT, the others are conditional, +! and are only done if %o3 >=3D 0. Because both %o3 and %o5 may have the h= igh- +! order bit set in the first step, just falling into the regular +! division loop will mess up the first time around. +! So we unroll slightly... +do_single_div: + deccc %g2 + bl end_regular_divide + nop + sub %o3,%o5,%o3 + mov 1,%o2 + b end_single_divloop + nop +single_divloop: + sll %o2,1,%o2 + bl 1f + srl %o5,1,%o5 + ! %o3 >=3D 0 + sub %o3,%o5,%o3 + b 2f + inc %o2 + 1: ! %o3 < 0 + add %o3,%o5,%o3 + dec %o2 + 2: + end_single_divloop: + deccc %g2 + bge single_divloop + tst %o3 + b end_regular_divide + nop +not_really_big: +1: + sll %o5,4,%o5 + cmp %o5,%o3 + bleu 1b + inccc %o4 + be got_result + dec %o4 +do_regular_divide: + ! Do the main division iteration + tst %o3 + ! Fall through into divide loop +divloop: + sll %o2,4,%o2 + !depth 1, accumulated bits 0 + bl L.1.16 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 2, accumulated bits 1 + bl L.2.17 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 3, accumulated bits 3 + bl L.3.19 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 4, accumulated bits 7 + bl L.4.23 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (7*2+1), %o2 +L.4.23: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (7*2-1), %o2 +L.3.19: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 4, accumulated bits 5 + bl L.4.21 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (5*2+1), %o2 +L.4.21: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (5*2-1), %o2 +L.2.17: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 3, accumulated bits 1 + bl L.3.17 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 4, accumulated bits 3 + bl L.4.19 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (3*2+1), %o2 +L.4.19: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (3*2-1), %o2 +L.3.17: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 4, accumulated bits 1 + bl L.4.17 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (1*2+1), %o2 +L.4.17: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (1*2-1), %o2 +L.1.16: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 2, accumulated bits -1 + bl L.2.15 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 3, accumulated bits -1 + bl L.3.15 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 4, accumulated bits -1 + bl L.4.15 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (-1*2+1), %o2 +L.4.15: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-1*2-1), %o2 +L.3.15: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 4, accumulated bits -3 + bl L.4.13 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (-3*2+1), %o2 +L.4.13: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-3*2-1), %o2 +L.2.15: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 3, accumulated bits -3 + bl L.3.13 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + !depth 4, accumulated bits -5 + bl L.4.11 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (-5*2+1), %o2 +L.4.11: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-5*2-1), %o2 +L.3.13: + ! remainder is negative + addcc %o3,%o5,%o3 + !depth 4, accumulated bits -7 + bl L.4.9 + srl %o5,1,%o5 + ! remainder is nonnegative + subcc %o3,%o5,%o3 + b 9f + add %o2, (-7*2+1), %o2 +L.4.9: + ! remainder is negative + addcc %o3,%o5,%o3 + b 9f + add %o2, (-7*2-1), %o2 + 9: +end_regular_divide: + deccc %o4 + bge divloop + tst %o3 + bge got_result + nop + ! non-restoring fixup here + dec %o2 +got_result: + tst %g3 + bge 1f + restore + ! answer < 0 + retl ! leaf-routine return + neg %o2,%o0 ! quotient <- -%o2 +1: + retl ! leaf-routine return + mov %o2,%o0 ! quotient <- %o2 Index: contrib/compiler-rt/lib/sparc64/generate.sh =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 --- contrib/compiler-rt/lib/sparc64/generate.sh (revision 0) +++ contrib/compiler-rt/lib/sparc64/generate.sh (working copy) @@ -0,0 +1,6 @@ +#!/bin/sh + +m4 divmod.m4 | sed -e 's/[[:space:]]*$//' | grep -v '^$' > modsi3.S +m4 -DANSWER=3Dquotient divmod.m4 | sed -e 's/[[:space:]]*$//' | grep -v '^= $' > divsi3.S +echo '! This file intentionally left blank' > umodsi3.S +echo '! This file intentionally left blank' > udivsi3.S Index: contrib/compiler-rt/lib/sparc64/umodsi3.S =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 --- contrib/compiler-rt/lib/sparc64/umodsi3.S (revision 0) +++ contrib/compiler-rt/lib/sparc64/umodsi3.S (working copy) @@ -0,0 +1 @@ +! This file intentionally left blank Index: contrib/compiler-rt/lib/sparc64/udivsi3.S =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 --- contrib/compiler-rt/lib/sparc64/udivsi3.S (revision 0) +++ contrib/compiler-rt/lib/sparc64/udivsi3.S (working copy) @@ -0,0 +1 @@ +! This file intentionally left blank --FFoLq8A0u+X9iRU8-- --0QFb0wBpEddLcDHQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJO+t7ZAAoJEG5e2P40kaK73twP/jQL0q78+M0OpI7gPqhLet+d bxEdUsMn4Mnf9qw4HXTcJiqyN7jkofbnGWc1pWuJ02AQBBmwuW5f6vNpM7aj6MLG I4txZ03K6AnWfbK45BG2psd0+DFGUXLI1m/yQRDr8/2p5QtdzlGYlyL1ggBQ3puk XIk98BCrhybUDU2W8WzEKCOUUKVFFKv+U6Zq4EQhXf5XvtDwcgxoiIWFegphsdSf xCXsW+BLCQ1XN59ahsYMgtA9HNFxT3q26veM29i4nNkmGXZkOQM+SakdbHc3BqTU W4GfHB9CWtBJqmhO+lsGp/sa8TIlP5vJ/0Lc6A6IaUXBESqqki/Jp+rzJmRrnvBP EtQ+lfjUulk0SP1CUiJFXnko2BMjYo8OQj/B5X1k58qgF965cOB+rZdZBSSQWyN3 TzbRFxnovXqk9BfacXJ2ZeAjvi4+/tsQ2qrQfObg7jj2Y+hGITQFsack1iIpcIak lwk15e/Aa2xVdhxOCTWPYVvudtPS3KIP4BGAJm57g7jHj3YR0a4dDsyQpbVAqWav QoYDqtI15PDbVFoES5SFwczBtCif8IAaLWE8bM+xKEcvq9OhhozbZYlGqdLsal86 MfC/jua+48m0/QoeXNf8HU9hjXT9ha5FhXDWlHhAzXSANpheN42CygCHMdBxzl0z h48GZGtQSqUTMx6T1W7m =1nwD -----END PGP SIGNATURE----- --0QFb0wBpEddLcDHQ-- From owner-freebsd-sparc64@FreeBSD.ORG Thu Dec 29 14:26:21 2011 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 D9414106566B for ; Thu, 29 Dec 2011 14:26:21 +0000 (UTC) (envelope-from rz.bangka@yahoo.com) Received: from nm14.bullet.mail.sp2.yahoo.com (nm14.bullet.mail.sp2.yahoo.com [98.139.91.84]) by mx1.freebsd.org (Postfix) with SMTP id B16588FC0C for ; Thu, 29 Dec 2011 14:26:21 +0000 (UTC) Received: from [98.139.91.66] by nm14.bullet.mail.sp2.yahoo.com with NNFMP; 29 Dec 2011 14:12:44 -0000 Received: from [98.139.91.40] by tm6.bullet.mail.sp2.yahoo.com with NNFMP; 29 Dec 2011 14:12:44 -0000 Received: from [127.0.0.1] by omp1040.mail.sp2.yahoo.com with NNFMP; 29 Dec 2011 14:12:44 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 378763.85926.bm@omp1040.mail.sp2.yahoo.com Received: (qmail 10145 invoked by uid 60001); 29 Dec 2011 14:12:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1325167963; bh=8xuYbS8OwgIwidijimZXF3tG0RvZQts0DZ9FgLo0Bx8=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=dVp7QZUZARt5+ZflVieEtVCucL35Ovz9G0bmo3fgZVS8swv3jNRAELoq7e1VqfRlVq0My4bF82BGgYc40Eq4eKJVHrgm/KrTgkLf05AtCKtfITbGioj5UcGZvQ7ezt6LcMWtW0KUPc3A4POQbnqN9JMtbdvvbODQr/2xBCv3a/U= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=fG6gK1g0JkBUoHO53fiSdR26uYdo4ylK95AbwGyNHro4fQHnnjOJ8X0vI5ZbCuTpafJPLALbUqN59mDCbg4yOUWjqn7DEjDHvN757xrZE/uYrUQm3CMXzFeNRtQXnhsxjI9auYB+831xY2FhPdktYkAkWrwAVXLuAAzORAwtBH0=; X-YMail-OSG: sAtKv7wVM1nhKNbYNwri_OxfWdU5yg79LrwoKy7yQAIbxBQ .lzGGOgeEWnpD3H9917IQ2SpplGfUNTC_jBDECPDVXzRcEuLyPWLg8O.UwrQ GrKC_5VFCbVaiEpfsEnvlUD.VZV0vCOzu_92abaT4SsVMCfTBNiIXH5ZRP3B TjxrwBZ.VSU_DdOU9mC5o.lCTdkDItS1Ap59R0O.QfOTjcq2dTeEuugwIwfy A0dEYJ.p6MLv6Xw5Q5gZJbgHmVLQmhNdOehdtI.vjGAqJnHsPIM9es0xBq3L 0bgqHujP0Wrsb0C4gVCQeOhRN3GzFDRNYbIqxKD7ZJOqlyRCZI4Tkq7SHAa3 HRVmG0840esnwGgYplUrw9RtMH7ngqrjN_1pCNJC_yA-- Received: from [223.255.229.17] by web111509.mail.gq1.yahoo.com via HTTP; Thu, 29 Dec 2011 06:12:43 PST X-Mailer: YahooMailWebService/0.8.115.331698 Message-ID: <1325167963.10046.YahooMailNeo@web111509.mail.gq1.yahoo.com> Date: Thu, 29 Dec 2011 06:12:43 -0800 (PST) From: Ricki Z To: "freebsd-sparc64@freebsd.org" MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 29 Dec 2011 16:24:50 +0000 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: FreeBSD 8.2 install on TI UltraSparc II (BlackBird) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ricki Z List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2011 14:26:21 -0000 Hi,=0A=0AI'm newbie on sparc but i have more experience on FreeBSD. =0A=0A= =0AI have a question, whether the FreeBSD 8.2 fully support for TI UltraSpa= rc II=A0 (BlackBird)? if yes, is there any thread/reference how to install = FreeBSD 8.2 on the TI UltraSparc II=A0 (BlackBird)?=0A=0AThanks,=0ARicki From owner-freebsd-sparc64@FreeBSD.ORG Fri Dec 30 01:59:24 2011 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 45758106566B for ; Fri, 30 Dec 2011 01:59:24 +0000 (UTC) (envelope-from rz.bangka@yahoo.com) Received: from nm2.bullet.mail.sp2.yahoo.com (nm2.bullet.mail.sp2.yahoo.com [98.139.91.72]) by mx1.freebsd.org (Postfix) with SMTP id 18B1C8FC19 for ; Fri, 30 Dec 2011 01:59:24 +0000 (UTC) Received: from [98.139.91.65] by nm2.bullet.mail.sp2.yahoo.com with NNFMP; 30 Dec 2011 01:59:24 -0000 Received: from [98.139.91.16] by tm5.bullet.mail.sp2.yahoo.com with NNFMP; 30 Dec 2011 01:58:23 -0000 Received: from [127.0.0.1] by omp1016.mail.sp2.yahoo.com with NNFMP; 30 Dec 2011 01:58:23 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 967070.48338.bm@omp1016.mail.sp2.yahoo.com Received: (qmail 89735 invoked by uid 60001); 30 Dec 2011 01:58:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1325210303; bh=NBRzYx78+AEoA4G109WeN1jJVfgjjw+QzfTgyrEKz1M=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=GR5tAZGHrfQdb7pGCMgzRZT995zaQZG7Eyi/d7rr5D29x29jIckEksnLrWdR0aqErgxk26Do6ieT++DiBfOwuRkYtTMgC8dlQXBaPGNqqtsqbTOhSgxtuVNSH61drlD5rXJI05/ZpWqfuT+9bLiCnv9z+fmE1ZhwFv5qKn/OVMo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=jKZpeJxzl2eLdVE8t3fP/vEpX978yEvt9+4tI6D9a4z5NWhVz24Y18N4ujONU9tcaOaGa0RzKLc9JVabFxyCIEkDZ1lWl6ckWctYwhgSmrt0xH4KUds9DoJHd9HJJAov13dpTjSOLzz3R+ADryvfG7C7iygyNLpFxTuSmstvhB8=; X-YMail-OSG: HcGYgFwVM1nPH8Y.reXrTdYAFMzqJ4boAawpsEV9bbWl5ZJ YZpzkLZeoU7MeGKTyFvmQWqMDc5aFHzRkq3jSrJiRHDkrwobgYsE2f9Cb0os ytrZhd6jxjvQoNRLGPFIz79VCEQQoMiR68p21Qj0N_xAeMz4hKabFKI45WA7 2__EyYxVB2MYDAoI6_DFDfmMx05XwrbnJtSn2kRUpjCARfQp195E0xSR_9Fk Pz2JI2v_.IFUumFwqXAnk1v2uhDeiq_ZFB7bPGvSVAobbXc6wI8eODF6xNSR TQC.T2yT9zLT8KMyqhEysvlle8J6Wg0ClR_AMcNECpVU.lEkt8P4L1.5kSjQ VFHPV5_c9GNDI_vbiDz6e5P3BwhhAxHuVCRACL3I_JiRw7kka9EfEroF_EGd 14wkZCqSJST0oBkvh5UFJNog.QUzC1lWcoO7oaYs- Received: from [202.59.163.97] by web111502.mail.gq1.yahoo.com via HTTP; Thu, 29 Dec 2011 17:58:23 PST X-Mailer: YahooMailWebService/0.8.115.331698 References: <1325167963.10046.YahooMailNeo@web111509.mail.gq1.yahoo.com> <20111230014913.GB55604@server.vk2pj.dyndns.org> Message-ID: <1325210303.43071.YahooMailNeo@web111502.mail.gq1.yahoo.com> Date: Thu, 29 Dec 2011 17:58:23 -0800 (PST) From: Ricki Z To: Peter Jeremy In-Reply-To: <20111230014913.GB55604@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-sparc64@freebsd.org" Subject: Re: FreeBSD 8.2 install on TI UltraSparc II (BlackBird) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ricki Z List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 01:59:24 -0000 Hi Peter,=0A=0AThanks for your info.=0A=0A/Ricki=0A=0A=0A=0A_______________= _________________=0A From: Peter Jeremy =0ATo: Ricki Z= =0ACc: "freebsd-sparc64@freebsd.org" =0ASent: Friday, December 30, 2011 8:49 AM=0ASubject: Re: Fr= eeBSD 8.2 install on TI UltraSparc II (BlackBird)=0A =0AOn 2011-Dec-29 06:= 12:43 -0800, Ricki Z wrote:=0A>I have a question, whe= ther the FreeBSD 8.2 fully support for TI=0A>UltraSparc II=A0 (BlackBird)? = if yes, is there any thread/reference how=0A>to install FreeBSD 8.2 on the = TI UltraSparc II=A0 (BlackBird)?=0A=0AIt's more a question of whether FreeB= SD 8.2 supports whatever system=0Ais built around your US-II.=A0 Unlike the= PC, there's much more=0Avariation in the SPARC world and the kernel needs = to know about the=0Ahardware.=A0 Check out http://www.freebsd.org/platforms= /sparc.html=0A=0AAs for installing, it's much the same as for x86 - either = boot an=0Ainstallation DVD or netboot.=A0 Main differences are that it's no= t=0Apossible to multiboot (each different OS needs a distinct disk)=0Aand y= ou can't boot ZFS.=0A=0A-- =0APeter Jeremy From owner-freebsd-sparc64@FreeBSD.ORG Fri Dec 30 03:56:53 2011 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 9E6691065679 for ; Fri, 30 Dec 2011 03:56:53 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from fallbackmx10.syd.optusnet.com.au (fallbackmx10.syd.optusnet.com.au [211.29.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 2D0078FC12 for ; Fri, 30 Dec 2011 03:56:52 +0000 (UTC) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by fallbackmx10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBU1nIII014270 for ; Fri, 30 Dec 2011 12:49:18 +1100 Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail12.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBU1nFcn025186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Dec 2011 12:49:15 +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.5/8.14.4) with ESMTP id pBU1nE9g046995; Fri, 30 Dec 2011 12:49:14 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.5/8.14.4/Submit) id pBU1nDav046994; Fri, 30 Dec 2011 12:49:13 +1100 (EST) (envelope-from peter) Date: Fri, 30 Dec 2011 12:49:13 +1100 From: Peter Jeremy To: Ricki Z Message-ID: <20111230014913.GB55604@server.vk2pj.dyndns.org> References: <1325167963.10046.YahooMailNeo@web111509.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline In-Reply-To: <1325167963.10046.YahooMailNeo@web111509.mail.gq1.yahoo.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "freebsd-sparc64@freebsd.org" Subject: Re: FreeBSD 8.2 install on TI UltraSparc II (BlackBird) 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: Fri, 30 Dec 2011 03:56:53 -0000 --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Dec-29 06:12:43 -0800, Ricki Z wrote: >I have a question, whether the FreeBSD 8.2 fully support for TI >UltraSparc II=A0 (BlackBird)? if yes, is there any thread/reference how >to install FreeBSD 8.2 on the TI UltraSparc II=A0 (BlackBird)? It's more a question of whether FreeBSD 8.2 supports whatever system is built around your US-II. Unlike the PC, there's much more variation in the SPARC world and the kernel needs to know about the hardware. Check out http://www.freebsd.org/platforms/sparc.html As for installing, it's much the same as for x86 - either boot an installation DVD or netboot. Main differences are that it's not possible to multiboot (each different OS needs a distinct disk) and you can't boot ZFS. --=20 Peter Jeremy --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk79GJkACgkQ/opHv/APuIf7MQCgpOD073I++UN9O8w/QxSoQZ+a ke0An13DBpVqqCyu9lX9KPcQxMxK5G5/ =CM5P -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND-- From owner-freebsd-sparc64@FreeBSD.ORG Fri Dec 30 12:53:37 2011 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 971DE1065672; Fri, 30 Dec 2011 12:53:37 +0000 (UTC) (envelope-from flo@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7ECC18FC0A; Fri, 30 Dec 2011 12:53:37 +0000 (UTC) Received: from bender.solomo.local (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBUCrZY6001463; Fri, 30 Dec 2011 12:53:36 GMT (envelope-from flo@freebsd.org) Message-ID: <4EFDB44F.9060708@freebsd.org> Date: Fri, 30 Dec 2011 13:53:35 +0100 From: Florian Smeets User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111223 Thunderbird/9.0 MIME-Version: 1.0 To: Ed Schouten References: <20111227231243.GB1895@hoeg.nl> <20111228000723.GA77332@alchemy.franken.de> <20111228091817.GC1895@hoeg.nl> In-Reply-To: <20111228091817.GC1895@hoeg.nl> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: sparc64@freebsd.org, mips@freebsd.org, Marius Strobl Subject: Re: [Updated patch] (Finally) migrate MIPS and SPARC64 to libcompiler_rt 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: Fri, 30 Dec 2011 12:53:37 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 28.12.2011 10:18, Ed Schouten wrote: > Hi Marius, > > * Marius Strobl , 20111228 01:07: >> Before making libcompiler_rt the default for sparc64 could you >> please also look into adding the optimized versions of _divsi3 >> and _modsi3 (see contrib/gcc/config/sparc/lb1spc.asm) to >> libcompiler_rt? They're taken from/based on the SPARC V8 >> Architecture Manual and IIRC I once compared them and there >> actually was little difference so there should be no licensing >> issues. > > Just to make sure we don't get into license problems, I copied the > code from the architecture manual and regenerated the assembly > files. I compared them against the ones used by GCC and they should > work. > > Please forget the previous patch I sent and use the one attached. > If the attachment is missing, you can download the patch here: > > http://80386.nl/pub/compiler-rt.txt > > The code isn't that beautiful yet, but I'll clean it up before I > send it to the compiler-rt folks. > Ed, at least on sparc64 the resulting toolchain is broken. I cannot even compile a simple c file. http://tb.smeets.im/~flo/sparc64-cc-crash.txt Anything i can provide for analysis? Florian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk79tE8ACgkQapo8P8lCvwkd8QCfR+ykkbR2WX1tLaJ2o8r1X9a5 V3UAn3j7UfMieSLFMtVeS38OXJ/pyZD0 =M2+X -----END PGP SIGNATURE----- From owner-freebsd-sparc64@FreeBSD.ORG Fri Dec 30 13:01:31 2011 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 828981065672; Fri, 30 Dec 2011 13:01:31 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 1A9CC8FC19; Fri, 30 Dec 2011 13:01:31 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 413EA2A28CDD; Fri, 30 Dec 2011 14:01:30 +0100 (CET) Date: Fri, 30 Dec 2011 14:01:30 +0100 From: Ed Schouten To: Florian Smeets Message-ID: <20111230130130.GR1895@hoeg.nl> References: <20111227231243.GB1895@hoeg.nl> <20111228000723.GA77332@alchemy.franken.de> <20111228091817.GC1895@hoeg.nl> <4EFDB44F.9060708@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iskw6J4cuOvZ6IVF" Content-Disposition: inline In-Reply-To: <4EFDB44F.9060708@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: sparc64@freebsd.org, mips@freebsd.org, Marius Strobl Subject: Re: [Updated patch] (Finally) migrate MIPS and SPARC64 to libcompiler_rt 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: Fri, 30 Dec 2011 13:01:31 -0000 --iskw6J4cuOvZ6IVF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Florian, * Florian Smeets , 20111230 13:53: > Anything i can provide for analysis? It would be nice if we could get a stack trace to see which libcompiler-rt functions it calls. If that's not possible, just rm -Rf contrib/compiler-rt/lib/sparc64 and try again. That way we can already determine whether it's caused by the optimized divide/modulo code. Thanks, --=20 Ed Schouten WWW: http://80386.nl/ --iskw6J4cuOvZ6IVF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJO/bYpAAoJEG5e2P40kaK7QwEQAJbuk0doJlApg8wf3dPCR3fs nbbjCLo2LhRfAKtBZtjNkTQ0gOvfe8vUz6SJjkm5WQV7S+/h0NYzWPppFFEQyeWd MPd+oRhYJB/7l4K7aWFPWlkjddfef/x0hpNHnDGunOdl/Zv/EskFsVSgrZPrT0ml vImrN0IE2CGlLWBiI6Iyr1zbsmHXt1CtSYl/aI1VC090RWovUURPHlawbhDT81+r yZo7Hr7EW++anP8m5LOxaYQi6J7oH37WGIh+XSzgIEyfiZywnCO/ew0bi8KyGael uyrMB45ax6M1ryHXb7jOPdaBvVeo3ASFpSny31vQoXNo1FjnFf3j6FmUDY5vs7K/ c5sVqSq8IQhWlAb7jEL5rom+g+K37T5LcEW5Npyrenf5LVo8UpW6DlzVSyrtXJ/9 zaD7rm9RsJNpw300qLzxrvOnxmx5+W4bcjkuWCf2GxYWO81m1VJcgUabcPMidMvz Q96tmmP/adq4iHfZOQi9InriolHHcVGPkLUbas6oTNhvsx/+85D+vVmgNay+Miia OjAnfY3fYecGSndiaZiVF1uxTUNvvrVFSKog7ahk2/hlFckeZ7REMp9gi5eA/Grh /BHI2Th5KKqX0ORYKT2EUgMvh3welddzILIZZi+ddzaZx5KLc8wRcyYOCzYAgBZv 3e+f1TLE8DSVuaSyp3Hw =IWUs -----END PGP SIGNATURE----- --iskw6J4cuOvZ6IVF--