Module Name: src
Committed By: matt
Date: Mon Aug 11 04:03:59 UTC 2014
Modified Files:
src/sys/arch/aarch64/include: byte_swap.h
Log Message:
Use %x/%w as appropriate.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/include/byte_swap.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/aarch64/include/byte_swap.h
diff -u src/sys/arch/aarch64/include/byte_swap.h:1.1 src/sys/arch/aarch64/include/byte_swap.h:1.2
--- src/sys/arch/aarch64/include/byte_swap.h:1.1 Sun Aug 10 05:47:38 2014
+++ src/sys/arch/aarch64/include/byte_swap.h Mon Aug 11 04:03:59 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: byte_swap.h,v 1.1 2014/08/10 05:47:38 matt Exp $ */
+/* $NetBSD: byte_swap.h,v 1.2 2014/08/11 04:03:59 matt Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@ static __inline uint64_t
__byte_swap_u64_variable(uint64_t v)
{
if (!__builtin_constant_p(v)) {
- __asm("rev\t%0, %1" : "=r" (v) : "0" (v));
+ __asm("rev\t%x0, %x1" : "=r" (v) : "0" (v));
return v;
}
@@ -71,7 +71,7 @@ static __inline uint32_t
__byte_swap_u32_variable(uint32_t v)
{
if (!__builtin_constant_p(v)) {
- __asm("rev\t%0, %1" : "=r" (v) : "0" (v));
+ __asm("rev\t%w0, %w1" : "=r" (v) : "0" (v));
return v;
}
@@ -88,7 +88,7 @@ __byte_swap_u16_variable(uint16_t v)
if (!__builtin_constant_p(v)) {
uint32_t v32 = v;
- __asm("rev16\t%0, %1" : "=r" (v32) : "0" (v32));
+ __asm("rev16\t%w0, %w1" : "=r" (v32) : "0" (v32));
return v32;
}