aboutsummaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2023-04-24 18:04:33 +0200
committerThomas Huth <thuth@redhat.com>2023-05-16 09:14:18 +0200
commit1077f50b23065a1d07cbbc6bad1141d50a5d25b9 (patch)
treecf1aaacec7e201ba7002fa77805a6c51c6859f79 /cpu.c
parent5503da4a0c9e7f6853a175f5e273897680cd12df (diff)
cpu: Introduce a wrapper for being able to use TARGET_NAME in common code
In some spots, it would be helpful to be able to use TARGET_NAME in common (target independent) code, too. Thus introduce a wrapper that can be called from common code, too, just like we already have one for target_words_bigendian(). Message-Id: <20230424160434.331175-3-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpu.c b/cpu.c
index 9105c85404..65ebaf8159 100644
--- a/cpu.c
+++ b/cpu.c
@@ -427,6 +427,11 @@ bool target_words_bigendian(void)
#endif
}
+const char *target_name(void)
+{
+ return TARGET_NAME;
+}
+
void page_size_init(void)
{
/* NOTE: we can always suppose that qemu_host_page_size >=