exec/memory_ldst: Use correct type sizes
Use uint8_t for (unsigned) byte, and uint16_t for (unsigned) 16-bit word. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210518183655.1711377-4-philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
e1d2dbee57
commit
f933b02b59
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef TARGET_ENDIANNESS
|
#ifdef TARGET_ENDIANNESS
|
||||||
extern uint32_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
|
extern uint16_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern uint32_t glue(address_space_ldl, SUFFIX)(ARG1_DECL,
|
extern uint32_t glue(address_space_ldl, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
||||||
@ -29,17 +29,17 @@ extern uint64_t glue(address_space_ldq, SUFFIX)(ARG1_DECL,
|
|||||||
extern void glue(address_space_stl_notdirty, SUFFIX)(ARG1_DECL,
|
extern void glue(address_space_stl_notdirty, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern void glue(address_space_stw, SUFFIX)(ARG1_DECL,
|
extern void glue(address_space_stw, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern void glue(address_space_stl, SUFFIX)(ARG1_DECL,
|
extern void glue(address_space_stl, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern void glue(address_space_stq, SUFFIX)(ARG1_DECL,
|
extern void glue(address_space_stq, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result);
|
||||||
#else
|
#else
|
||||||
extern uint32_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
|
extern uint8_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern uint32_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL,
|
extern uint16_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern uint32_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL,
|
extern uint16_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern uint32_t glue(address_space_ldl_le, SUFFIX)(ARG1_DECL,
|
extern uint32_t glue(address_space_ldl_le, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
||||||
@ -50,11 +50,11 @@ extern uint64_t glue(address_space_ldq_le, SUFFIX)(ARG1_DECL,
|
|||||||
extern uint64_t glue(address_space_ldq_be, SUFFIX)(ARG1_DECL,
|
extern uint64_t glue(address_space_ldq_be, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern void glue(address_space_stb, SUFFIX)(ARG1_DECL,
|
extern void glue(address_space_stb, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, uint8_t val, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern void glue(address_space_stw_le, SUFFIX)(ARG1_DECL,
|
extern void glue(address_space_stw_le, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern void glue(address_space_stw_be, SUFFIX)(ARG1_DECL,
|
extern void glue(address_space_stw_be, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern void glue(address_space_stl_le, SUFFIX)(ARG1_DECL,
|
extern void glue(address_space_stl_le, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
|
||||||
extern void glue(address_space_stl_be, SUFFIX)(ARG1_DECL,
|
extern void glue(address_space_stl_be, SUFFIX)(ARG1_DECL,
|
||||||
|
@ -157,7 +157,7 @@ uint64_t glue(address_space_ldq_be, SUFFIX)(ARG1_DECL,
|
|||||||
DEVICE_BIG_ENDIAN);
|
DEVICE_BIG_ENDIAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
|
uint8_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
|
||||||
{
|
{
|
||||||
uint8_t *ptr;
|
uint8_t *ptr;
|
||||||
@ -193,7 +193,7 @@ uint32_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* warning: addr must be aligned */
|
/* warning: addr must be aligned */
|
||||||
static inline uint32_t glue(address_space_lduw_internal, SUFFIX)(ARG1_DECL,
|
static inline uint16_t glue(address_space_lduw_internal, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result,
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result,
|
||||||
enum device_endian endian)
|
enum device_endian endian)
|
||||||
{
|
{
|
||||||
@ -240,21 +240,21 @@ static inline uint32_t glue(address_space_lduw_internal, SUFFIX)(ARG1_DECL,
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
|
uint16_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
|
||||||
{
|
{
|
||||||
return glue(address_space_lduw_internal, SUFFIX)(ARG1, addr, attrs, result,
|
return glue(address_space_lduw_internal, SUFFIX)(ARG1, addr, attrs, result,
|
||||||
DEVICE_NATIVE_ENDIAN);
|
DEVICE_NATIVE_ENDIAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL,
|
uint16_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
|
||||||
{
|
{
|
||||||
return glue(address_space_lduw_internal, SUFFIX)(ARG1, addr, attrs, result,
|
return glue(address_space_lduw_internal, SUFFIX)(ARG1, addr, attrs, result,
|
||||||
DEVICE_LITTLE_ENDIAN);
|
DEVICE_LITTLE_ENDIAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL,
|
uint16_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
|
hwaddr addr, MemTxAttrs attrs, MemTxResult *result)
|
||||||
{
|
{
|
||||||
return glue(address_space_lduw_internal, SUFFIX)(ARG1, addr, attrs, result,
|
return glue(address_space_lduw_internal, SUFFIX)(ARG1, addr, attrs, result,
|
||||||
@ -366,7 +366,7 @@ void glue(address_space_stl_be, SUFFIX)(ARG1_DECL,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void glue(address_space_stb, SUFFIX)(ARG1_DECL,
|
void glue(address_space_stb, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
|
hwaddr addr, uint8_t val, MemTxAttrs attrs, MemTxResult *result)
|
||||||
{
|
{
|
||||||
uint8_t *ptr;
|
uint8_t *ptr;
|
||||||
MemoryRegion *mr;
|
MemoryRegion *mr;
|
||||||
@ -398,7 +398,7 @@ void glue(address_space_stb, SUFFIX)(ARG1_DECL,
|
|||||||
|
|
||||||
/* warning: addr must be aligned */
|
/* warning: addr must be aligned */
|
||||||
static inline void glue(address_space_stw_internal, SUFFIX)(ARG1_DECL,
|
static inline void glue(address_space_stw_internal, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs,
|
hwaddr addr, uint16_t val, MemTxAttrs attrs,
|
||||||
MemTxResult *result, enum device_endian endian)
|
MemTxResult *result, enum device_endian endian)
|
||||||
{
|
{
|
||||||
uint8_t *ptr;
|
uint8_t *ptr;
|
||||||
@ -441,21 +441,21 @@ static inline void glue(address_space_stw_internal, SUFFIX)(ARG1_DECL,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void glue(address_space_stw, SUFFIX)(ARG1_DECL,
|
void glue(address_space_stw, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
|
hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result)
|
||||||
{
|
{
|
||||||
glue(address_space_stw_internal, SUFFIX)(ARG1, addr, val, attrs, result,
|
glue(address_space_stw_internal, SUFFIX)(ARG1, addr, val, attrs, result,
|
||||||
DEVICE_NATIVE_ENDIAN);
|
DEVICE_NATIVE_ENDIAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
void glue(address_space_stw_le, SUFFIX)(ARG1_DECL,
|
void glue(address_space_stw_le, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
|
hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result)
|
||||||
{
|
{
|
||||||
glue(address_space_stw_internal, SUFFIX)(ARG1, addr, val, attrs, result,
|
glue(address_space_stw_internal, SUFFIX)(ARG1, addr, val, attrs, result,
|
||||||
DEVICE_LITTLE_ENDIAN);
|
DEVICE_LITTLE_ENDIAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
void glue(address_space_stw_be, SUFFIX)(ARG1_DECL,
|
void glue(address_space_stw_be, SUFFIX)(ARG1_DECL,
|
||||||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
|
hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result)
|
||||||
{
|
{
|
||||||
glue(address_space_stw_internal, SUFFIX)(ARG1, addr, val, attrs, result,
|
glue(address_space_stw_internal, SUFFIX)(ARG1, addr, val, attrs, result,
|
||||||
DEVICE_BIG_ENDIAN);
|
DEVICE_BIG_ENDIAN);
|
||||||
|
Loading…
Reference in New Issue
Block a user