Blackfin arch: More explicitly describe what the instructions do in inline assembly.
authorJie Zhang <jie.zhang@analog.com>
Sat, 17 Nov 2007 16:00:10 +0000 (00:00 +0800)
committerBryan Wu <bryan.wu@analog.com>
Sat, 17 Nov 2007 16:00:10 +0000 (00:00 +0800)
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
include/asm-blackfin/mach-common/def_LPBlackfin.h

index c1d8c4a78fcfc7a4a7e8e7b840ce30e856d139bd..e8967f6124f7ea2eb0a3878ec9fbc70c142e9c9d 100644 (file)
@@ -46,7 +46,7 @@
 #endif
 
 #define bfin_read8(addr) ({ \
-       uint8_t __v; \
+       uint32_t __v; \
        __asm__ __volatile__( \
                NOP_PAD_ANOMALY_05000198 \
                "%0 = b[%1] (z);" \
@@ -56,7 +56,7 @@
        __v; })
 
 #define bfin_read16(addr) ({ \
-       uint16_t __v; \
+       uint32_t __v; \
        __asm__ __volatile__( \
                NOP_PAD_ANOMALY_05000198 \
                "%0 = w[%1] (z);" \
@@ -80,7 +80,7 @@
                NOP_PAD_ANOMALY_05000198 \
                "b[%0] = %1;" \
                : \
-               : "a" (addr), "d" (val) \
+               : "a" (addr), "d" ((uint8_t)(val)) \
                : "memory" \
        )
 
@@ -89,7 +89,7 @@
                NOP_PAD_ANOMALY_05000198 \
                "w[%0] = %1;" \
                : \
-               : "a" (addr), "d" (val) \
+               : "a" (addr), "d" ((uint16_t)(val)) \
                : "memory" \
        )