[Bug 236920] Bad asm constraints in arm64 byte swap functions

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Apr 1 00:04:11 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236920

            Bug ID: 236920
           Summary: Bad asm constraints in arm64 byte swap functions
           Product: Base System
           Version: CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: freebsd-arm at FreeBSD.org
          Reporter: jfc at mit.edu

Created attachment 203277
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203277&action=edit
Fix inline assembly

The bswap inline functions in sys/arm64/include/endian.h look wrong.

The ARM byte swap instructions are ordinary RISC register to register
instructions and should have "=r" as the constraint on the output operand and
"r" as the constraint on the input operand.

A message to the freebsd-arm list mentioned an error message "invalid operand
in inline asm" associated with one of the inline assembly statements in
endian.h.  This could have been caused by the strange constraints on the inline
assembly.

I've tested that buildworld works with the attached patch.  I have only run a
couple network utilities as a smoke test.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-arm mailing list