summaryrefslogtreecommitdiffstats
path: root/bsd-user/i386
diff options
context:
space:
mode:
authorWarner Losh2022-02-01 00:01:05 +0100
committerWarner Losh2022-02-27 05:05:21 +0100
commit647afdf1836548146b77c6ca68e93c7acfe35738 (patch)
treecd88758e670d117ab51c152020d8479da5ff97fd /bsd-user/i386
parentbsd-user/bsd-file.h: Implementation details for the filesystem calls (diff)
downloadqemu-647afdf1836548146b77c6ca68e93c7acfe35738.tar.gz
qemu-647afdf1836548146b77c6ca68e93c7acfe35738.tar.xz
qemu-647afdf1836548146b77c6ca68e93c7acfe35738.zip
bsd-user: introduce target.h
Create target.h. This file is intended to be simple and describe basic things about the architecture. If something is a basic feature of the architecture, it belongs here. Should we need something that's per-BSD there will be a target-os.h that will live in the per-bsd directories. Define regpairs_aligned to reflect whether or not registers are 'paired' for 64-bit arguments or not. This will be false for all 64-bit targets, and will be true on those architectures that pair (currently just armv7 and powerpc on FreeBSD 14.x). Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Kyle Evans <kevans@FreeBSD.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'bsd-user/i386')
-rw-r--r--bsd-user/i386/target.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/bsd-user/i386/target.h b/bsd-user/i386/target.h
new file mode 100644
index 0000000000..9b9df047a3
--- /dev/null
+++ b/bsd-user/i386/target.h
@@ -0,0 +1,21 @@
+/*
+ * Intel general target stuff that's common to all i386 details
+ *
+ * Copyright (c) 2022 M. Warner Losh <imp@bsdimp.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef TARGET_ARCH_H
+#define TARGET_ARCH_H
+
+/*
+ * i386 doesn't 'lump' the registers for 64-bit args.
+ */
+static inline bool regpairs_aligned(void *cpu_env)
+{
+ return false;
+}
+
+#endif /* ! TARGET_ARCH_H */
+