Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
tcg: Split out tcg-target-reg-bits.h
Often, the only thing we need to know about the TCG host is the register size. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
- Loading branch information
Showing
18 changed files
with
162 additions
and
59 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
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,12 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2023 Linaro | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| #define TCG_TARGET_REG_BITS 64 | ||
|
|
||
| #endif |
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,12 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2023 Linaro | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| #define TCG_TARGET_REG_BITS 32 | ||
|
|
||
| #endif |
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,16 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2008 Fabrice Bellard | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| #ifdef __x86_64__ | ||
| # define TCG_TARGET_REG_BITS 64 | ||
| #else | ||
| # define TCG_TARGET_REG_BITS 32 | ||
| #endif | ||
|
|
||
| #endif |
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 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2021 WANG Xuerui <git@xen0n.name> | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| /* | ||
| * Loongson removed the (incomplete) 32-bit support from kernel and toolchain | ||
| * for the initial upstreaming of this architecture, so don't bother and just | ||
| * support the LP64* ABI for now. | ||
| */ | ||
| #if defined(__loongarch64) | ||
| # define TCG_TARGET_REG_BITS 64 | ||
| #else | ||
| # error unsupported LoongArch register size | ||
| #endif | ||
|
|
||
| #endif |
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,18 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2008-2009 Arnaud Patard <arnaud.patard@rtp-net.org> | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| #if _MIPS_SIM == _ABIO32 | ||
| # define TCG_TARGET_REG_BITS 32 | ||
| #elif _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 | ||
| # define TCG_TARGET_REG_BITS 64 | ||
| #else | ||
| # error "Unknown ABI" | ||
| #endif | ||
|
|
||
| #endif |
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,16 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2008 Fabrice Bellard | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| #ifdef _ARCH_PPC64 | ||
| # define TCG_TARGET_REG_BITS 64 | ||
| #else | ||
| # define TCG_TARGET_REG_BITS 32 | ||
| #endif | ||
|
|
||
| #endif |
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,19 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2018 SiFive, Inc | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| /* | ||
| * We don't support oversize guests. | ||
| * Since we will only build tcg once, this in turn requires a 64-bit host. | ||
| */ | ||
| #if __riscv_xlen != 64 | ||
| #error "unsupported code generation mode" | ||
| #endif | ||
| #define TCG_TARGET_REG_BITS 64 | ||
|
|
||
| #endif |
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,17 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2009 Ulrich Hecht <uli@suse.de> | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| /* We only support generating code for 64-bit mode. */ | ||
| #if UINTPTR_MAX == UINT64_MAX | ||
| # define TCG_TARGET_REG_BITS 64 | ||
| #else | ||
| # error "unsupported code generation mode" | ||
| #endif | ||
|
|
||
| #endif |
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,12 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2023 Linaro | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| #define TCG_TARGET_REG_BITS 64 | ||
|
|
||
| #endif |
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,18 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Define target-specific register size | ||
| * Copyright (c) 2009, 2011 Stefan Weil | ||
| */ | ||
|
|
||
| #ifndef TCG_TARGET_REG_BITS_H | ||
| #define TCG_TARGET_REG_BITS_H | ||
|
|
||
| #if UINTPTR_MAX == UINT32_MAX | ||
| # define TCG_TARGET_REG_BITS 32 | ||
| #elif UINTPTR_MAX == UINT64_MAX | ||
| # define TCG_TARGET_REG_BITS 64 | ||
| #else | ||
| # error Unknown pointer size for tci target | ||
| #endif | ||
|
|
||
| #endif |
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