]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/i386/i386-options.c
PR target/103069: Relax cmpxchg loop for x86 target
[thirdparty/gcc.git] / gcc / config / i386 / i386-options.c
index a8cc0664f11cb2f20eb967f7409e0620e638a93f..feff2584f41a2c5b7e501d3e8415b8d29708e056 100644 (file)
@@ -397,7 +397,8 @@ ix86_target_string (HOST_WIDE_INT isa, HOST_WIDE_INT isa2,
     { "-mstv",                         MASK_STV },
     { "-mavx256-split-unaligned-load", MASK_AVX256_SPLIT_UNALIGNED_LOAD },
     { "-mavx256-split-unaligned-store",        MASK_AVX256_SPLIT_UNALIGNED_STORE },
-    { "-mcall-ms2sysv-xlogues",                MASK_CALL_MS2SYSV_XLOGUES }
+    { "-mcall-ms2sysv-xlogues",                MASK_CALL_MS2SYSV_XLOGUES },
+    { "-mrelax-cmpxchg-loop",          MASK_RELAX_CMPXCHG_LOOP }
   };
 
   /* Additional flag options.  */
@@ -1092,6 +1093,10 @@ ix86_valid_target_attribute_inner_p (tree fndecl, tree args, char *p_strings[],
     IX86_ATTR_IX86_YES ("general-regs-only",
                        OPT_mgeneral_regs_only,
                        OPTION_MASK_GENERAL_REGS_ONLY),
+
+    IX86_ATTR_YES ("relax-cmpxchg-loop",
+                  OPT_mrelax_cmpxchg_loop,
+                  MASK_RELAX_CMPXCHG_LOOP),
   };
 
   location_t loc