[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/10] linux-user/loongarch64: Use abi_{ulong,uint} types
From: |
Song Gao |
Subject: |
[PULL 08/10] linux-user/loongarch64: Use abi_{ulong,uint} types |
Date: |
Fri, 3 Nov 2023 14:23:30 +0800 |
Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231101030816.2353416-5-gaosong@loongson.cn>
---
linux-user/loongarch64/signal.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/linux-user/loongarch64/signal.c b/linux-user/loongarch64/signal.c
index cc8324b4b3..9336f40ffe 100644
--- a/linux-user/loongarch64/signal.c
+++ b/linux-user/loongarch64/signal.c
@@ -18,10 +18,10 @@
#define SC_USED_FP (1 << 0)
struct target_sigcontext {
- uint64_t sc_pc;
- uint64_t sc_regs[32];
- uint32_t sc_flags;
- uint64_t sc_extcontext[0] QEMU_ALIGNED(16);
+ abi_ulong sc_pc;
+ abi_ulong sc_regs[32];
+ abi_uint sc_flags;
+ abi_ulong sc_extcontext[0] QEMU_ALIGNED(16);
};
QEMU_BUILD_BUG_ON(sizeof(struct target_sigcontext) != sizeof_sigcontext);
@@ -33,9 +33,9 @@ QEMU_BUILD_BUG_ON(offsetof(struct target_sigcontext, sc_regs)
#define FPU_CTX_MAGIC 0x46505501
#define FPU_CTX_ALIGN 8
struct target_fpu_context {
- uint64_t regs[32];
- uint64_t fcc;
- uint32_t fcsr;
+ abi_ulong regs[32];
+ abi_ulong fcc;
+ abi_uint fcsr;
} QEMU_ALIGNED(FPU_CTX_ALIGN);
QEMU_BUILD_BUG_ON(offsetof(struct target_fpu_context, regs)
@@ -43,9 +43,9 @@ QEMU_BUILD_BUG_ON(offsetof(struct target_fpu_context, regs)
#define CONTEXT_INFO_ALIGN 16
struct target_sctx_info {
- uint32_t magic;
- uint32_t size;
- uint64_t padding;
+ abi_uint magic;
+ abi_uint size;
+ abi_ulong padding;
} QEMU_ALIGNED(CONTEXT_INFO_ALIGN);
QEMU_BUILD_BUG_ON(sizeof(struct target_sctx_info) != sizeof_sctx_info);
@@ -162,7 +162,7 @@ static bool parse_extcontext(struct extctx_layout *extctx,
abi_ptr frame)
memset(extctx, 0, sizeof(*extctx));
while (1) {
- uint32_t magic, size;
+ abi_uint magic, size;
if (get_user_u32(magic, frame) || get_user_u32(size, frame + 4)) {
return false;
@@ -206,7 +206,7 @@ static void restore_sigframe(CPULoongArchState *env,
if (extctx->fpu.haddr) {
struct target_fpu_context *fpu_ctx =
extctx->fpu.haddr + sizeof(struct target_sctx_info);
- uint64_t fcc;
+ abi_ulong fcc;
for (i = 0; i < 32; ++i) {
__get_user(env->fpr[i].vreg.D(0), &fpu_ctx->regs[i]);
--
2.25.1
- [PULL 00/10] loongarch-to-apply queue, Song Gao, 2023/11/03
- [PULL 06/10] linux-user/loongarch64: Fix setup_extcontext alloc wrong fpu_context size, Song Gao, 2023/11/03
- [PULL 05/10] linux-user/loongarch64: Use traps to track LSX/LASX usage, Song Gao, 2023/11/03
- [PULL 07/10] linux-user/loongarch64: setup_sigframe() set 'end' context size 0, Song Gao, 2023/11/03
- [PULL 04/10] target/loongarch: Support 4K page size, Song Gao, 2023/11/03
- [PULL 03/10] target/loongarch: Implement query-cpu-model-expansion, Song Gao, 2023/11/03
- [PULL 02/10] target/loongarch: Allow user enable/disable LSX/LASX features, Song Gao, 2023/11/03
- [PULL 08/10] linux-user/loongarch64: Use abi_{ulong,uint} types,
Song Gao <=
- [PULL 01/10] target/loongarch: Add cpu model 'max', Song Gao, 2023/11/03
- [PULL 09/10] linux-user/loongarch64: Add LSX sigcontext save/restore, Song Gao, 2023/11/03
- [PULL 10/10] linux-user/loongarch64: Add LASX sigcontext save/restore, Song Gao, 2023/11/03
- Re: [PULL 00/10] loongarch-to-apply queue, Stefan Hajnoczi, 2023/11/06