Skip to content

Commit

Permalink
exec/memory_ldst_cached: Use correct type size
Browse files Browse the repository at this point in the history
Use uint16_t for (unsigned) 16-bit word.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210518183655.1711377-6-philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
philmd authored and rth7680 committed May 26, 2021
1 parent c6fe45b commit 4045f49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/exec/memory_ldst_cached.h.inc
Expand Up @@ -24,7 +24,7 @@
#define LD_P(size) \
glue(glue(ld, size), glue(ENDIANNESS, _p))

static inline uint32_t ADDRESS_SPACE_LD_CACHED(uw)(MemoryRegionCache *cache,
static inline uint16_t ADDRESS_SPACE_LD_CACHED(uw)(MemoryRegionCache *cache,
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
{
assert(addr < cache->len && 2 <= cache->len - addr);
Expand Down Expand Up @@ -72,7 +72,7 @@ static inline uint64_t ADDRESS_SPACE_LD_CACHED(q)(MemoryRegionCache *cache,
glue(glue(st, size), glue(ENDIANNESS, _p))

static inline void ADDRESS_SPACE_ST_CACHED(w)(MemoryRegionCache *cache,
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result)
{
assert(addr < cache->len && 2 <= cache->len - addr);
if (likely(cache->ptr)) {
Expand Down

0 comments on commit 4045f49

Please sign in to comment.