diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-08 08:23:46 +0100 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2025-03-08 08:05:40 -0800 |
| commit | bf4a155b7a847c9290b1b5ab4208ca361f5a469c (patch) | |
| tree | d9c620c6a4349f11402001ebd12ef469b38ece8d | |
| parent | 3fd60df2a6e59133f58074f5d6e0e57f99c769cd (diff) | |
| download | focaccia-qemu-bf4a155b7a847c9290b1b5ab4208ca361f5a469c.tar.gz focaccia-qemu-bf4a155b7a847c9290b1b5ab4208ca361f5a469c.zip | |
accel/tcg: Restrict GETPC_ADJ to 'tb-internal.h'
GETPC_ADJ is only used within accel/tcg/, no need to expose it to all the code base. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250308072348.65723-2-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| -rw-r--r-- | accel/tcg/tb-internal.h | 11 | ||||
| -rw-r--r-- | include/exec/exec-all.h | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/accel/tcg/tb-internal.h b/accel/tcg/tb-internal.h index 62a59a5307..68aa8d17f4 100644 --- a/accel/tcg/tb-internal.h +++ b/accel/tcg/tb-internal.h @@ -13,6 +13,17 @@ #include "exec/exec-all.h" #include "exec/translation-block.h" +/* + * The true return address will often point to a host insn that is part of + * the next translated guest insn. Adjust the address backward to point to + * the middle of the call insn. Subtracting one would do the job except for + * several compressed mode architectures (arm, mips) which set the low bit + * to indicate the compressed mode; subtracting two works around that. It + * is also the case that there are no host isas that contain a call insn + * smaller than 4 bytes, so we don't worry about special-casing this. + */ +#define GETPC_ADJ 2 + #ifdef CONFIG_SOFTMMU #define CPU_TLB_DYN_MIN_BITS 6 diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index a758b7a843..2ac98e56c4 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -186,15 +186,6 @@ extern __thread uintptr_t tci_tb_ptr; ((uintptr_t)__builtin_extract_return_addr(__builtin_return_address(0))) #endif -/* The true return address will often point to a host insn that is part of - the next translated guest insn. Adjust the address backward to point to - the middle of the call insn. Subtracting one would do the job except for - several compressed mode architectures (arm, mips) which set the low bit - to indicate the compressed mode; subtracting two works around that. It - is also the case that there are no host isas that contain a call insn - smaller than 4 bytes, so we don't worry about special-casing this. */ -#define GETPC_ADJ 2 - #if !defined(CONFIG_USER_ONLY) /** |