Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/include Use uint32_t for __asm to appease clang.



details:   https://anonhg.NetBSD.org/src/rev/bddc5199e3e0
branches:  trunk
changeset: 784414:bddc5199e3e0
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jan 28 06:16:05 2013 +0000

description:
Use uint32_t for __asm to appease clang.

diffstat:

 sys/arch/arm/include/byte_swap.h |  7 ++++---
 sys/arch/arm/include/lock.h      |  5 ++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r 53b0c2e4ab9f -r bddc5199e3e0 sys/arch/arm/include/byte_swap.h
--- a/sys/arch/arm/include/byte_swap.h  Mon Jan 28 06:14:45 2013 +0000
+++ b/sys/arch/arm/include/byte_swap.h  Mon Jan 28 06:16:05 2013 +0000
@@ -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 @@
 
 #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)) {
diff -r 53b0c2e4ab9f -r bddc5199e3e0 sys/arch/arm/include/lock.h
--- a/sys/arch/arm/include/lock.h       Mon Jan 28 06:14:45 2013 +0000
+++ b/sys/arch/arm/include/lock.h       Mon Jan 28 06:16:05 2013 +0000
@@ -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 @@
 __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"



Home | Main Index | Thread Index | Old Index