[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/28] exec/cpu: Indent TARGET_PAGE_foo definitions
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 01/28] exec/cpu: Indent TARGET_PAGE_foo definitions |
Date: |
Mon, 6 May 2024 14:37:01 +0200 |
The TARGET_PAGE_foo definitions are defined with multiple
level of #ifdef'ry. Indent it a bit for clarity.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240427155714.53669-6-philmd@linaro.org>
---
include/exec/cpu-all.h | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 032c6d990e..14fd40046d 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -139,19 +139,20 @@ static inline void stl_phys_notdirty(AddressSpace *as,
hwaddr addr, uint32_t val
#ifdef TARGET_PAGE_BITS_VARY
# include "exec/page-vary.h"
extern const TargetPageBits target_page;
-#ifdef CONFIG_DEBUG_TCG
-#define TARGET_PAGE_BITS ({ assert(target_page.decided); target_page.bits; })
-#define TARGET_PAGE_MASK ({ assert(target_page.decided); \
- (target_long)target_page.mask; })
+# ifdef CONFIG_DEBUG_TCG
+# define TARGET_PAGE_BITS ({ assert(target_page.decided); \
+ target_page.bits; })
+# define TARGET_PAGE_MASK ({ assert(target_page.decided); \
+ (target_long)target_page.mask; })
+# else
+# define TARGET_PAGE_BITS target_page.bits
+# define TARGET_PAGE_MASK ((target_long)target_page.mask)
+# endif
+# define TARGET_PAGE_SIZE (-(int)TARGET_PAGE_MASK)
#else
-#define TARGET_PAGE_BITS target_page.bits
-#define TARGET_PAGE_MASK ((target_long)target_page.mask)
-#endif
-#define TARGET_PAGE_SIZE (-(int)TARGET_PAGE_MASK)
-#else
-#define TARGET_PAGE_BITS_MIN TARGET_PAGE_BITS
-#define TARGET_PAGE_SIZE (1 << TARGET_PAGE_BITS)
-#define TARGET_PAGE_MASK ((target_long)-1 << TARGET_PAGE_BITS)
+# define TARGET_PAGE_BITS_MIN TARGET_PAGE_BITS
+# define TARGET_PAGE_SIZE (1 << TARGET_PAGE_BITS)
+# define TARGET_PAGE_MASK ((target_long)-1 << TARGET_PAGE_BITS)
#endif
#define TARGET_PAGE_ALIGN(addr) ROUND_UP((addr), TARGET_PAGE_SIZE)
--
2.41.0
- [PULL 00/28] Accelerator patches for 2024-05-06, Philippe Mathieu-Daudé, 2024/05/06
- [PULL 01/28] exec/cpu: Indent TARGET_PAGE_foo definitions,
Philippe Mathieu-Daudé <=
- [PULL 02/28] exec/cpu: Rename PAGE_BITS macro to PAGE_RWX, Philippe Mathieu-Daudé, 2024/05/06
- [PULL 03/28] exec/cpu: Remove obsolete PAGE_RESERVED definition, Philippe Mathieu-Daudé, 2024/05/06
- [PULL 04/28] exec/cpu: Remove duplicated PAGE_PASSTHROUGH definition, Philippe Mathieu-Daudé, 2024/05/06
- [PULL 05/28] exec/cpu: Extract page-protection definitions to page-protection.h, Philippe Mathieu-Daudé, 2024/05/06
- [PULL 06/28] accel/tcg: Use cpu_loop_exit_requested() in cpu_loop_exec_tb(), Philippe Mathieu-Daudé, 2024/05/06
- [PULL 07/28] accel/tcg: Access tcg_cflags with getter / setter, Philippe Mathieu-Daudé, 2024/05/06
- [PULL 08/28] accel/tcg: Move user definition of cpu_interrupt() to user-exec.c, Philippe Mathieu-Daudé, 2024/05/06
- [PULL 11/28] accel/tcg: Restrict cpu_plugin_mem_cbs_enabled() to TCG, Philippe Mathieu-Daudé, 2024/05/06
- [PULL 10/28] accel/tcg: Restrict qemu_plugin_vcpu_exit_hook() to TCG plugins, Philippe Mathieu-Daudé, 2024/05/06
- [PULL 09/28] accel/tcg: Update CPUNegativeOffsetState::can_do_io field documentation, Philippe Mathieu-Daudé, 2024/05/06