Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros
Fixes #58974
Differential D140695
[M68k] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros brad on Dec 27 2022, 8:09 AM. Authored by
Details Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros Fixes #58974
Diff Detail
Unit Tests Event TimelineComment Actions FYI the pre-merge checks seem to have some issues. Here is the output: Command Output (stderr): -- /var/lib/buildkite-agent/builds/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c:4322:28: error: CHECK_M68K_GCC_ATOMICS: expected string not found in input // CHECK_M68K_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 ^ <stdin>:1:1: note: scanning from here #define _ILP32 1 ^ <stdin>:62:1: note: possible intended match here #define __GCC_ATOMIC_CHAR_LOCK_FREE 1 ^ Input file: <stdin> Check file: /var/lib/buildkite-agent/builds/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c -dump-input=help explains the following input dump. Input was: <<<<<< 1: #define _ILP32 1 check:4322'0 X~~~~~~~~~~~~~~~~ error: no match found 2: #define __ATOMIC_ACQUIRE 2 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3: #define __ATOMIC_ACQ_REL 4 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4: #define __ATOMIC_CONSUME 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5: #define __ATOMIC_RELAXED 0 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6: #define __ATOMIC_RELEASE 3 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ . . . 57: #define __FLT_MIN__ 1.17549435e-38F check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 58: #define __FLT_RADIX__ 2 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~ 59: #define __GCC_ATOMIC_BOOL_LOCK_FREE 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60: #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 61: #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62: #define __GCC_ATOMIC_CHAR_LOCK_FREE 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ check:4322'1 ? possible intended match 63: #define __GCC_ATOMIC_INT_LOCK_FREE 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 64: #define __GCC_ATOMIC_LLONG_LOCK_FREE 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 65: #define __GCC_ATOMIC_LONG_LOCK_FREE 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 66: #define __GCC_ATOMIC_POINTER_LOCK_FREE 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 67: #define __GCC_ATOMIC_SHORT_LOCK_FREE 1 check:4322'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ . . . >>>>>> -- Comment Actions Also, could you add "Fixes #58974" in the commit message so that the item will be closed automatically upon commiting ? Thanks Comment Actions This is probably caused by the fact that you didn't use CPU later than 68020. @brad Please update your test. Comment Actions How come the Clang M68k backend defaults to 68000? GCC defaults to 68020 for all targets. Comment Actions The Clang M68k is a complete rewrite from scratch, independent of GCC, so it's not surprising you may see differences between Clang and GCC. I'm open to raising the default baseline to 68020 though once the backend has matured enough. |