From: Richard Henderson Date: Mon, 4 Aug 2025 11:47:57 +0000 (+1000) Subject: aarch64: Disable TARGET_CMPBR with aarch64_track_speculation X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a2d86939c735ca2e9aba68c534bffe763a8f7a6;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 096c853af7f..2b3610c86ed 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. */