RPI3, error: invalid operand in inline asm: 'rev16 ${0:w}, ${1:w}'
John F Carr
jfc at mit.edu
Tue Apr 2 10:42:47 UTC 2019
On Apr 1, 2019, at 21:59 , bob prohaska <fbsd at www.zefox.net> wrote:
>
> On Sat, Mar 30, 2019 at 05:50:35PM +0000, John F Carr wrote:
>>
>>
>>> On Mar 30, 2019, at 11:23 , bob prohaska <fbsd at www.zefox.net> wrote:
>>>
>>> In a recent attempt to compile www/chromium on an RPI3 running r345516
>>> compilation stopped with repeated reports of
>>>
>>> /usr/include/machine/endian.h:89:19: error: invalid operand in inline asm: 'rev16 ${0:w}, ${1:w}'
>>>
>>> Chromium compiled on the same host a couple of months ago, but the
>>> executable failed on a runtime library error. Now attempts to upgrade
>>> stop during compilation. Ports are presently at revision 496949.
>>>
>>> Thanks for reading, and any guidance.
>>>
>>> bob prohaska
>>
>> The swap function at that line in sys/arm64/include/endian.h doesn't look right to me. I think it should read
>>
>> __asm("rev16 %w0, %w1\n" : "=r" (ret) : "r" (w));
>>
>> instead of
>>
>> __asm __volatile("rev16 %w0, %w1\n" : "=&r" (ret), "+r" (v));
>>
>> Two changes: (1) it doesn't need to be volatile because it has no side effects and (2) the constraints and lack of explicit input operand are wrong. The other swap functions should have similar changes.
>>
>
> Apologies for being obtuse, but is that suggestive of a problem with the
> host system, or a problem with the port?
>
> Thanks for reading!
>
> bob prohaska
>
The problem I mentioned is with the system. I filed a bug:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236920
If you change the system header /usr/include/machine/endian.h
according to the path in that bug report, does chromium compile?
More information about the freebsd-arm
mailing list