Blackfin arch: More explicitly describe what the instructions do in inline assembly.
Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
This commit is contained in:
parent
561cc18b86
commit
a961d65963
|
@ -46,7 +46,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define bfin_read8(addr) ({ \
|
#define bfin_read8(addr) ({ \
|
||||||
uint8_t __v; \
|
uint32_t __v; \
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
NOP_PAD_ANOMALY_05000198 \
|
NOP_PAD_ANOMALY_05000198 \
|
||||||
"%0 = b[%1] (z);" \
|
"%0 = b[%1] (z);" \
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
__v; })
|
__v; })
|
||||||
|
|
||||||
#define bfin_read16(addr) ({ \
|
#define bfin_read16(addr) ({ \
|
||||||
uint16_t __v; \
|
uint32_t __v; \
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
NOP_PAD_ANOMALY_05000198 \
|
NOP_PAD_ANOMALY_05000198 \
|
||||||
"%0 = w[%1] (z);" \
|
"%0 = w[%1] (z);" \
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
NOP_PAD_ANOMALY_05000198 \
|
NOP_PAD_ANOMALY_05000198 \
|
||||||
"b[%0] = %1;" \
|
"b[%0] = %1;" \
|
||||||
: \
|
: \
|
||||||
: "a" (addr), "d" (val) \
|
: "a" (addr), "d" ((uint8_t)(val)) \
|
||||||
: "memory" \
|
: "memory" \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
NOP_PAD_ANOMALY_05000198 \
|
NOP_PAD_ANOMALY_05000198 \
|
||||||
"w[%0] = %1;" \
|
"w[%0] = %1;" \
|
||||||
: \
|
: \
|
||||||
: "a" (addr), "d" (val) \
|
: "a" (addr), "d" ((uint16_t)(val)) \
|
||||||
: "memory" \
|
: "memory" \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue