From owner-freebsd-arm@freebsd.org Tue Apr 2 10:42:47 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFBDA1560D98; Tue, 2 Apr 2019 10:42:47 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from outgoing-exchange-3.mit.edu (outgoing-exchange-3.mit.edu [18.9.28.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.outgoing-exchange.mit.edu", Issuer "InCommon RSA Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0C9B86136; Tue, 2 Apr 2019 10:42:46 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from OC11EXEDGE4.EXCHANGE.MIT.EDU (OC11EXEDGE4.EXCHANGE.MIT.EDU [18.9.3.27]) by outgoing-exchange-3.mit.edu (8.14.7/8.12.4) with ESMTP id x32Aduln032007; Tue, 2 Apr 2019 06:39:57 -0400 Received: from OC11EXHUB9.exchange.mit.edu (18.9.3.23) by OC11EXEDGE4.EXCHANGE.MIT.EDU (18.9.3.27) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Apr 2019 06:39:22 -0400 Received: from OC11EXPO24.exchange.mit.edu ([169.254.1.112]) by OC11EXHUB9.exchange.mit.edu ([18.9.3.23]) with mapi id 14.03.0439.000; Tue, 2 Apr 2019 06:39:43 -0400 From: John F Carr To: bob prohaska CC: John F Carr , "freebsd-ports@freebsd.org" , "freebsd-arm@freebsd.org" Subject: Re: RPI3, error: invalid operand in inline asm: 'rev16 ${0:w}, ${1:w}' Thread-Topic: RPI3, error: invalid operand in inline asm: 'rev16 ${0:w}, ${1:w}' Thread-Index: AQHU5wysVg2BgjPU/Ui4D1u3G3LuWKYktxyAgAOtYgCAAJE5AA== Date: Tue, 2 Apr 2019 10:39:42 +0000 Message-ID: <28F4BF7B-4391-4A4B-ABEC-36A154F9FAE2@exchange.mit.edu> References: <20190330152327.GA11933@www.zefox.net> <236A3D25-0B4D-46DA-95BA-71DA505CC2E0@exchange.mit.edu> <20190402015956.GA27268@www.zefox.net> In-Reply-To: <20190402015956.GA27268@www.zefox.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [18.9.1.84] Content-Type: text/plain; charset="us-ascii" Content-ID: <9D7C6A3AD60A034DB6B3CA434E3F1E08@exchange.mit.edu> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Rspamd-Queue-Id: A0C9B86136 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of jfc@mit.edu designates 18.9.28.13 as permitted sender) smtp.mailfrom=jfc@mit.edu X-Spamd-Result: default: False [-1.48 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; HAS_XOIP(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:18.9.28.0/24]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_HAS_CURRENCY(1.00)[]; DMARC_NA(0.00)[mit.edu]; NEURAL_HAM_LONG(-0.96)[-0.959,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mit-edu.mail.protection.outlook.com,mit-edu.mail.protection.outlook.com]; NEURAL_HAM_SHORT(-0.67)[-0.670,0]; NEURAL_HAM_MEDIUM(-0.53)[-0.529,0]; IP_SCORE(-0.01)[asn: 3(-0.00), country: US(-0.06)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:3, ipnet:18.9.0.0/16, country:US]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2019 10:42:47 -0000 On Apr 1, 2019, at 21:59 , bob prohaska wrote: >=20 > On Sat, Mar 30, 2019 at 05:50:35PM +0000, John F Carr wrote: >>=20 >>=20 >>> On Mar 30, 2019, at 11:23 , bob prohaska wrote: >>>=20 >>> In a recent attempt to compile www/chromium on an RPI3 running r345516 >>> compilation stopped with repeated reports of=20 >>>=20 >>> /usr/include/machine/endian.h:89:19: error: invalid operand in inline a= sm: 'rev16 ${0:w}, ${1:w}' >>>=20 >>> Chromium compiled on the same host a couple of months ago, but the=20 >>> executable failed on a runtime library error. Now attempts to upgrade >>> stop during compilation. Ports are presently at revision 496949. >>>=20 >>> Thanks for reading, and any guidance. >>>=20 >>> bob prohaska >>=20 >> The swap function at that line in sys/arm64/include/endian.h doesn't loo= k right to me. I think it should read >>=20 >> __asm("rev16 %w0, %w1\n" : "=3Dr" (ret) : "r" (w)); >>=20 >> instead of >>=20 >> __asm __volatile("rev16 %w0, %w1\n" : "=3D&r" (ret), "+r" (v)); >>=20 >> Two changes: (1) it doesn't need to be volatile because it has no side e= ffects and (2) the constraints and lack of explicit input operand are wrong= . The other swap functions should have similar changes. >>=20 >=20 > Apologies for being obtuse, but is that suggestive of a problem with the > host system, or a problem with the port? >=20 > Thanks for reading! >=20 > bob prohaska >=20 The problem I mentioned is with the system. I filed a bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236920 If you change the system header /usr/include/machine/endian.h according to the path in that bug report, does chromium compile?=