FreeBSD Bugzilla – Attachment 203277 Details for
Bug 236920
Bad asm constraints in arm64 byte swap functions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix inline assembly
rev.diff (text/plain), 882 bytes, created by
John F. Carr
on 2019-04-01 00:04:10 UTC
(
hide
)
Description:
Fix inline assembly
Filename:
MIME Type:
Creator:
John F. Carr
Created:
2019-04-01 00:04:10 UTC
Size:
882 bytes
patch
obsolete
>Index: sys/arm64/include/endian.h >=================================================================== >--- sys/arm64/include/endian.h (revision 345754) >+++ sys/arm64/include/endian.h (working copy) >@@ -60,13 +60,12 @@ > #define __htons(x) (__bswap16(x)) > > static __inline __uint64_t >-__bswap64(__uint64_t x) >+__bswap64(__uint64_t v) > { > __uint64_t ret; > >- __asm __volatile("rev %0, %1\n" >- : "=&r" (ret), "+r" (x)); >- >+ __asm("rev %0, %1\n" : "=r" (ret) : "r" (v)); >+ > return (ret); > } > >@@ -75,8 +74,7 @@ > { > __uint32_t ret; > >- __asm __volatile("rev32 %x0, %x1\n" >- : "=&r" (ret), "+r" (v)); >+ __asm("rev32 %x0, %x1\n" : "=r" (ret) : "r" (v)); > > return (ret); > } >@@ -86,8 +84,7 @@ > { > __uint32_t ret; > >- __asm __volatile("rev16 %w0, %w1\n" >- : "=&r" (ret), "+r" (v)); >+ __asm("rev16 %w0, %w1\n" : "=r" (ret) : "r" (v)); > > return ((__uint16_t)ret); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236920
: 203277