From owner-freebsd-arm@freebsd.org Sat Mar 30 17:54:12 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 49536155BA30; Sat, 30 Mar 2019 17:54:12 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from outgoing-exchange-7.mit.edu (outgoing-exchange-7.mit.edu [18.9.28.58]) (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 4F2D66E2D1; Sat, 30 Mar 2019 17:54:11 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from w92exedge3.exchange.mit.edu (W92EXEDGE3.EXCHANGE.MIT.EDU [18.7.73.15]) by outgoing-exchange-7.mit.edu (8.14.7/8.12.4) with ESMTP id x2UHocbr014590; Sat, 30 Mar 2019 13:50:39 -0400 Received: from W92EXCAS20.exchange.mit.edu (18.7.71.33) by w92exedge3.exchange.mit.edu (18.7.73.15) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Sat, 30 Mar 2019 13:50:35 -0400 Received: from OC11EXPO24.exchange.mit.edu ([169.254.1.112]) by W92EXCAS20.exchange.mit.edu ([18.7.71.33]) with mapi id 14.03.0439.000; Sat, 30 Mar 2019 13:50:36 -0400 From: John F Carr To: bob prohaska CC: "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/Ui4D1u3G3LuWKYktxyA Date: Sat, 30 Mar 2019 17:50:35 +0000 Message-ID: <236A3D25-0B4D-46DA-95BA-71DA505CC2E0@exchange.mit.edu> References: <20190330152327.GA11933@www.zefox.net> In-Reply-To: <20190330152327.GA11933@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: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Rspamd-Queue-Id: 4F2D66E2D1 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of jfc@mit.edu designates 18.9.28.58 as permitted sender) smtp.mailfrom=jfc@mit.edu X-Spamd-Result: default: False [0.09 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; HAS_XOIP(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; 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_SPAM_MEDIUM(0.03)[0.033,0]; NEURAL_SPAM_SHORT(0.23)[0.231,0]; NEURAL_HAM_LONG(-0.85)[-0.854,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]; IP_SCORE(-0.01)[asn: 3(-0.00), country: US(-0.07)]; 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: Sat, 30 Mar 2019 17:54:12 -0000 > 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 asm= : '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 The swap function at that line in sys/arm64/include/endian.h doesn't look r= ight to me. I think it should read __asm("rev16 %w0, %w1\n" : "=3Dr" (ret) : "r" (w)); instead of __asm __volatile("rev16 %w0, %w1\n" : "=3D&r" (ret), "+r" (v)); Two changes: (1) it doesn't need to be volatile because it has no side effe= cts and (2) the constraints and lack of explicit input operand are wrong. = The other swap functions should have similar changes.