Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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_H | ||
#define TARGET_H | ||
|
||
/* | ||
* arm EABI 'lumps' the registers for 64-bit args. | ||
*/ | ||
static inline bool regpairs_aligned(void *cpu_env) | ||
{ | ||
return true; | ||
} | ||
|
||
#endif /* ! TARGET_H */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Intel general target stuff that's common to all x86_64 details | ||
* | ||
* Copyright (c) 2022 M. Warner Losh <imp@bsdimp.com> | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-or-later | ||
*/ | ||
|
||
#ifndef TARGET_H | ||
#define TARGET_H | ||
|
||
/* | ||
* x86 doesn't 'lump' the registers for 64-bit args, all args are 64 bits. | ||
*/ | ||
static inline bool regpairs_aligned(void *cpu_env) | ||
{ | ||
return false; | ||
} | ||
|
||
#endif /* ! TARGET_H */ | ||
|