From owner-freebsd-sparc64@freebsd.org Fri May 27 03:59:04 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9E09B4C894 for ; Fri, 27 May 2016 03:59:04 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-165.reflexion.net [208.70.211.165]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E8481A36 for ; Fri, 27 May 2016 03:59:04 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 6424 invoked from network); 27 May 2016 03:59:03 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 27 May 2016 03:59:03 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v7.90.3) with SMTP; Thu, 26 May 2016 23:59:40 -0400 (EDT) Received: (qmail 31337 invoked from network); 27 May 2016 03:59:39 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 27 May 2016 03:59:39 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 3D9151C43E9; Thu, 26 May 2016 20:58:56 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Are there SPARC [or other] aligned memory access requirements to avoid exceptions? [now that 11.0's armv6/v7 is allowing more unaligned accesses] From: Mark Millard In-Reply-To: Date: Thu, 26 May 2016 20:59:01 -0700 Cc: freebsd-sparc64@freebsd.org, freebsd-arm , FreeBSD Toolchain , mandree@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <7AFD3661-9764-434B-A387-FD31B62DD77E@dsl-only.net> To: Cedric Blancher X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2016 03:59:05 -0000 On 2016-May-26, at 8:21 PM, Cedric Blancher = wrote: > All pure RISC implementations enforce 'natural alignment' - a 32bit > data type must be aligned 32bit, i.e. 4 bytes, a 64bit data type must > be 8 byte aligned, a 128bit data type must be 16 byte aligned. > Some RISC implementations are not pure, but still the misalignment > comes with a (performance) penalty, either by issuing two loads or > running through a whole trap handler (!!!!) function with hundreds of > instructions. >=20 > Ced Thanks for the notes. Having once worked in a "micros" group in a logic analyzer product line = for many years, working on the software tools that were used for that = subject area, I'm very familiar with that general structure of = alternatives --but not with SPARC specifics. In your terminology: I've = no clue how pure of a RISC implementation is involved for any SPARC = variation. I'm looking for SPARC-specific information that suggests if the defect = report originally for armv7-a/cortex-a7 as FreeBSD formerly configured = things instead also likely applies to some SPARC variation/configuration = that FreeBSD supports. (See later below.) If FreeBSD has some other fairly strict alignment context that is not a = SPARC that might also serve. Unless upstream can be told that some specific FreeBSD variant is = unsupported by their software because of presuming unaligned access is = okay, I doubt that a report to upstream should be made based on FreeBSD = as a context. (This presumes that the port passes a test under the new = armv7-a/cortex-a7 and related alignment requirements. I'm not to that = point yet.) > On 27 May 2016 at 00:03, Mark Millard wrote: >> Is is safe to interpret that an rpi2 armv7/cortex-a7 unaligned access = failure [from before -r300694] would (likely?) also be a failure on some = forms of FreeBSD SPARC use? >>=20 >>=20 >> Why I ask: >>=20 >> One of the ports that I had submitted a bug report for unaligned = access problems on a rpi2 (armv7-a/cortex-a7 style handling) was: >>=20 >> archivers/lzo2 >>=20 >> ( https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207096 ). I'd = recently commented that the report might go away after testing what is = now -r300694 (allowing more unaligned access on, for example, = armv7-a/cortex-a7). >>=20 >> Matthias Andree has since asked in a comment: >>=20 >>> ISTR SPARC architectures also barf on unaligned access, so is it = worth bothering the upstream author? >>=20 >> I have generally stuck to architectures for which I have examples to = observe, if nothing else than to validate at least some of my = understanding that is from reading materials. I normally only submit = what I've observed in some form. >>=20 >> I've no such SPARC context nor do I have knowledge/reference material = for SPARCs. Nor am I familiar with the choices FreeBSD may have made for = SPARC configuration coverage. >>=20 >> As a matter of hear-say my impression is that some SPARCs can be = configured to require some variation of strict alignment. >>=20 >> But I do not know how much I can infer from what I observed on a rpi2 = (armv7-a/cortex-a7) to FreeBSD SPARC use getting similar results for at = least come configurations. Nor do I have access to a test environment = for SPARC. >>=20 >> So I wonder if my archivers/lzo2 submittal in question should survive = because of SPARC even if the problem is validated to go away for the = updated rpi2 like contexts (with armv7-a/cortex-a7 tailoring possibly = involved). I have some other submittals that might face the same type of = question. >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >>=20 >> _______________________________________________ >> freebsd-sparc64@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-sparc64 >> To unsubscribe, send any mail to = "freebsd-sparc64-unsubscribe@freebsd.org" >=20 >=20 >=20 > --=20 > Cedric Blancher > Institute Pasteur =3D=3D=3D Mark Millard markmi at dsl-only.net