[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 42/59] qemu: Introduce target_long_bits()
From: |
Richard Henderson |
Subject: |
[PULL 42/59] qemu: Introduce target_long_bits() |
Date: |
Thu, 1 May 2025 14:20:56 -0700 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/qemu/target-info-impl.h | 2 ++
include/qemu/target-info.h | 7 +++++++
target-info-stub.c | 1 +
target-info.c | 5 +++++
4 files changed, 15 insertions(+)
diff --git a/include/qemu/target-info-impl.h b/include/qemu/target-info-impl.h
index 76766eeaae..1b51cbcfe1 100644
--- a/include/qemu/target-info-impl.h
+++ b/include/qemu/target-info-impl.h
@@ -14,6 +14,8 @@
typedef struct TargetInfo {
/* runtime equivalent of TARGET_NAME definition */
const char *target_name;
+ /* runtime equivalent of TARGET_LONG_BITS definition */
+ unsigned long_bits;
/* runtime equivalent of CPU_RESOLVING_TYPE definition */
const char *cpu_type;
/* QOM typename machines for this binary must implement */
diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h
index 2b6ccabb11..850a2958b9 100644
--- a/include/qemu/target-info.h
+++ b/include/qemu/target-info.h
@@ -16,6 +16,13 @@
*/
const char *target_name(void);
+/**
+ * target_long_bits:
+ *
+ * Returns: number of bits in a long type for this target (i.e. 64).
+ */
+unsigned target_long_bits(void);
+
/**
* target_machine_typename:
*
diff --git a/target-info-stub.c b/target-info-stub.c
index 86da297277..fecc0e7128 100644
--- a/target-info-stub.c
+++ b/target-info-stub.c
@@ -14,6 +14,7 @@
static const TargetInfo target_info_stub = {
.target_name = TARGET_NAME,
+ .long_bits = TARGET_LONG_BITS,
.cpu_type = CPU_RESOLVING_TYPE,
.machine_typename = TYPE_MACHINE,
};
diff --git a/target-info.c b/target-info.c
index 5f5ef1f932..16fdca7aaa 100644
--- a/target-info.c
+++ b/target-info.c
@@ -15,6 +15,11 @@ const char *target_name(void)
return target_info()->target_name;
}
+unsigned target_long_bits(void)
+{
+ return target_info()->long_bits;
+}
+
const char *target_cpu_type(void)
{
return target_info()->cpu_type;
--
2.43.0
- [PULL 36/59] accel/tcg: Use TCGTBCPUState in struct tb_desc, (continued)
- [PULL 36/59] accel/tcg: Use TCGTBCPUState in struct tb_desc, Richard Henderson, 2025/05/01
- [PULL 39/59] accel/tcg: Compile cpu-exec.c twice, Richard Henderson, 2025/05/01
- [PULL 22/59] accel/tcg: Extract probe API out of 'exec/exec-all.h', Richard Henderson, 2025/05/01
- [PULL 32/59] accel/tcg: Return TCGTBCPUState from cpu_get_tb_cpu_state, Richard Henderson, 2025/05/01
- [PULL 38/59] accel/tcg: Split out accel/tcg/helper-retaddr.h, Richard Henderson, 2025/05/01
- [PULL 25/59] accel/tcg: Unconditionally use CPU_DUMP_CCOP in log_cpu_exec, Richard Henderson, 2025/05/01
- [PULL 26/59] accel/tcg: Introduce TCGCPUOps.cpu_exec_reset, Richard Henderson, 2025/05/01
- [PULL 37/59] accel/tcg: Pass TCGTBCPUState to tb_gen_code, Richard Henderson, 2025/05/01
- [PULL 31/59] target/riscv: Move cpu_get_tb_cpu_state to tcg-cpu.c, Richard Henderson, 2025/05/01
- [PULL 40/59] system/vl: Filter machine list available for a particular target binary, Richard Henderson, 2025/05/01
- [PULL 42/59] qemu: Introduce target_long_bits(),
Richard Henderson <=
- [PULL 44/59] accel/tcg: Don't use TARGET_LONG_BITS in decode_sleb128, Richard Henderson, 2025/05/01
- [PULL 43/59] tcg: Define INSN_START_WORDS as constant 3, Richard Henderson, 2025/05/01
- [PULL 47/59] accel/tcg: Build tcg-all.c twice, Richard Henderson, 2025/05/01
- [PULL 50/59] accel/tcg: Move tlb_vaddr_to_host declaration to probe.h, Richard Henderson, 2025/05/01
- [PULL 51/59] accel/tcg: Use target_long_bits() in cputlb.c, Richard Henderson, 2025/05/01
- [PULL 41/59] qemu/target_info: Add %target_cpu_type field to TargetInfo, Richard Henderson, 2025/05/01
- [PULL 46/59] accel/tcg: Build translate-all.c twice, Richard Henderson, 2025/05/01
- [PULL 49/59] accel/tcg: Move user-only tlb_vaddr_to_host out of line, Richard Henderson, 2025/05/01
- [PULL 52/59] accel/tcg: Use vaddr for plugin_{load,store}_cb, Richard Henderson, 2025/05/01
- [PULL 53/59] accel/tcg: Build cputlb.c once, Richard Henderson, 2025/05/01