From 5a2d86939c735ca2e9aba68c534bffe763a8f7a6 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 4 Aug 2025 21:47:57 +1000 Subject: aarch64: Disable TARGET_CMPBR with aarch64_track_speculation With -mtrack-speculation, CC_REGNUM must be used at every conditional branch. gcc: * config/aarch64/aarch64.h (TARGET_CMPBR): False when aarch64_track_speculation is true. --- gcc/config/aarch64/aarch64.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 096c853..2b3610c 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -410,8 +410,9 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE ATTRIBUTE_UNUSED /* CSSC instructions are enabled through +cssc. */ #define TARGET_CSSC AARCH64_HAVE_ISA (CSSC) -/* CB instructions are enabled through +cmpbr. */ -#define TARGET_CMPBR AARCH64_HAVE_ISA (CMPBR) +/* CB instructions are enabled through +cmpbr, + but are incompatible with -mtrack-speculation. */ +#define TARGET_CMPBR (AARCH64_HAVE_ISA (CMPBR) && !aarch64_track_speculation) /* Make sure this is always defined so we don't have to check for ifdefs but rather use normal ifs. */ -- cgit v1.1