Use uint32_t for __asm to appease clang.
This commit is contained in:
parent
d71cca3bb3
commit
674f7f26d9
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: byte_swap.h,v 1.12 2012/09/05 01:03:53 matt Exp $ */
|
||||
/* $NetBSD: byte_swap.h,v 1.13 2013/01/28 06:16:05 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1999, 2002 The NetBSD Foundation, Inc.
|
||||
@ -91,8 +91,9 @@ __byte_swap_u16_variable(uint16_t v)
|
||||
|
||||
#ifdef _ARM_ARCH_6
|
||||
if (!__builtin_constant_p(v)) {
|
||||
__asm("rev16\t%0, %1" : "=r" (v) : "0" (v));
|
||||
return v;
|
||||
uint32_t v32 = v;
|
||||
__asm("rev16\t%0, %1" : "=r" (v32) : "0" (v32));
|
||||
return v32;
|
||||
}
|
||||
#elif !defined(__thumb__) && 0 /* gcc produces decent code for this */
|
||||
if (!__builtin_constant_p(v)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lock.h,v 1.23 2013/01/24 10:15:30 matt Exp $ */
|
||||
/* $NetBSD: lock.h,v 1.24 2013/01/28 06:17:05 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
|
||||
@ -78,8 +78,7 @@ static __inline unsigned char
|
||||
__swp(__cpu_simple_lock_t __val, volatile __cpu_simple_lock_t *__ptr)
|
||||
{
|
||||
#ifdef _ARM_ARCH_6
|
||||
uint32_t __rv;
|
||||
__cpu_simple_lock_t __tmp;
|
||||
uint32_t __rv, __tmp;
|
||||
if (sizeof(*__ptr) == 1) {
|
||||
__asm volatile(
|
||||
"1:\t"
|
||||
|
Loading…
Reference in New Issue
Block a user