[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 47/65] target/hppa: Remove TARGET_REGISTER_BITS
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 47/65] target/hppa: Remove TARGET_REGISTER_BITS |
Date: |
Fri, 20 Oct 2023 23:31:13 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
Hi Richard,
On 20/10/23 22:43, Richard Henderson wrote:
Rely only on TARGET_LONG_BITS, fixed at 64, and hppa_is_pa20.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/cpu-param.h | 1 -
target/hppa/cpu.h | 50 ++++-------
target/hppa/helper.h | 49 +++++------
target/hppa/cpu.c | 2 +-
target/hppa/helper.c | 34 +++-----
target/hppa/int_helper.c | 17 ++--
target/hppa/machine.c | 9 --
target/hppa/mem_helper.c | 10 +--
target/hppa/op_helper.c | 30 +++----
target/hppa/sys_helper.c | 4 +-
target/hppa/translate.c | 184 ++++++++-------------------------------
11 files changed, 119 insertions(+), 271 deletions(-)
A bit tedious to review, but very nice!
diff --git a/target/hppa/machine.c b/target/hppa/machine.c
index 0c0bba68c0..ab34b72910 100644
--- a/target/hppa/machine.c
+++ b/target/hppa/machine.c
@@ -21,21 +21,12 @@
#include "cpu.h"
#include "migration/cpu.h"
-#if TARGET_REGISTER_BITS == 64
#define qemu_put_betr qemu_put_be64
#define qemu_get_betr qemu_get_be64
#define VMSTATE_UINTTR_V(_f, _s, _v) \
VMSTATE_UINT64_V(_f, _s, _v)
#define VMSTATE_UINTTR_ARRAY_V(_f, _s, _n, _v) \
VMSTATE_UINT64_ARRAY_V(_f, _s, _n, _v)
Total 6 uses, let's use in place, removing the
definitions.
-#else
-#define qemu_put_betr qemu_put_be32
-#define qemu_get_betr qemu_get_be32
-#define VMSTATE_UINTTR_V(_f, _s, _v) \
- VMSTATE_UINT32_V(_f, _s, _v)
-#define VMSTATE_UINTTR_ARRAY_V(_f, _s, _n, _v) \
- VMSTATE_UINT32_ARRAY_V(_f, _s, _n, _v)
-#endif
IIUC for TARGET_REGISTER_BITS == 32 we need:
-- >8 --
static const VMStateDescription vmstate_env = {
.name = "env",
- .version_id = 1,
- .minimum_version_id = 1,
+ .version_id = 2,
+ .minimum_version_id = 2,
.fields = vmstate_env_fields,
};
---
(or better, keeping back-compat).
But to simplify I'd do it generically, regardless
of TARGET_REGISTER_BITS.
Regards,
Phil.
- [PATCH v2 36/65] target/hppa: Decode d for cmpb instructions, (continued)
- [PATCH v2 36/65] target/hppa: Decode d for cmpb instructions, Richard Henderson, 2023/10/20
- [PATCH v2 41/65] target/hppa: Implement EXTRD, Richard Henderson, 2023/10/20
- [PATCH v2 40/65] target/hppa: Implement DEPD, DEPDI, Richard Henderson, 2023/10/20
- [PATCH v2 42/65] target/hppa: Implement SHRPD, Richard Henderson, 2023/10/20
- [PATCH v2 43/65] target/hppa: Implement CLRBTS, POPBTS, PUSHBTS, PUSHNOM, Richard Henderson, 2023/10/20
- [PATCH v2 44/65] target/hppa: Implement STDBY, Richard Henderson, 2023/10/20
- [PATCH v2 46/65] hw/hppa: Use uint32_t instead of target_ureg, Richard Henderson, 2023/10/20
- [PATCH v2 45/65] target/hppa: Implement IDTLBT, IITLBT, Richard Henderson, 2023/10/20
- [PATCH v2 47/65] target/hppa: Remove TARGET_REGISTER_BITS, Richard Henderson, 2023/10/20
- Re: [PATCH v2 47/65] target/hppa: Remove TARGET_REGISTER_BITS,
Philippe Mathieu-Daudé <=
- [PATCH v2 51/65] target/hppa: Replace tcg_gen_*_tl with tcg_gen_*_i64, Richard Henderson, 2023/10/20
- [PATCH v2 53/65] target/hppa: Implement HSUB, Richard Henderson, 2023/10/20
- [PATCH v2 49/65] target/hppa: Remove remaining TARGET_REGISTER_BITS redirections, Richard Henderson, 2023/10/20
- [PATCH v2 48/65] target/hppa: Remove most of the TARGET_REGISTER_BITS redirections, Richard Henderson, 2023/10/20
- [PATCH v2 52/65] target/hppa: Implement HADD, Richard Henderson, 2023/10/20
- [PATCH v2 54/65] target/hppa: Implement HAVG, Richard Henderson, 2023/10/20
- [PATCH v2 55/65] target/hppa: Implement HSHL, HSHR, Richard Henderson, 2023/10/20
- [PATCH v2 56/65] target/hppa: Implement HSHLADD, HSHRADD, Richard Henderson, 2023/10/20
- [PATCH v2 50/65] target/hppa: Use tcg_temp_new_i64 not tcg_temp_new, Richard Henderson, 2023/10/20