X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=libgcc%2Fsync.c;h=dd32cac0e019eca7e3418f45ce90a3fb2cbf533e;hb=6c2675fa2bbcfe37308af593edb18e2c1c8eabf0;hp=3bc0e4a82869563cc46e2793398f0b31c1401904;hpb=c6412d86762ea3c31654c4c72b5e7ef86e66d90e;p=gcc.git diff --git a/libgcc/sync.c b/libgcc/sync.c index 3bc0e4a8286..dd32cac0e01 100644 --- a/libgcc/sync.c +++ b/libgcc/sync.c @@ -1,5 +1,5 @@ /* Out-of-line libgcc versions of __sync_* builtins. */ -/* Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2008-2020 Free Software Foundation, Inc. This file is part of GCC. @@ -67,27 +67,26 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined FN -/* Define macros for each __sync_* function type. Each macro defines a - local function called _ that acts like ___. - TYPE is a type that has UNITS bytes. */ +/* Define functions called __sync__, with one macro per + signature. TYPE is a type that has UNITS bytes. */ #define DEFINE_V_PV(NAME, UNITS, TYPE) \ - static TYPE \ - NAME##_##UNITS (TYPE *ptr, TYPE value) \ + TYPE \ + __##NAME##_##UNITS (TYPE *ptr, TYPE value) \ { \ return __##NAME (ptr, value); \ } -#define DEFINE_V_PVV(NAME, UNITS, TYPE) \ - static TYPE \ - NAME##_##UNITS (TYPE *ptr, TYPE value1, TYPE value2) \ +#define DEFINE_V_PVV(NAME, UNITS, TYPE) \ + TYPE \ + __##NAME##_##UNITS (TYPE *ptr, TYPE value1, TYPE value2) \ { \ return __##NAME (ptr, value1, value2); \ } #define DEFINE_BOOL_PVV(NAME, UNITS, TYPE) \ - static _Bool \ - NAME##_##UNITS (TYPE *ptr, TYPE value1, TYPE value2) \ + _Bool \ + __##NAME##_##UNITS (TYPE *ptr, TYPE value1, TYPE value2) \ { \ return __##NAME (ptr, value1, value2); \ } @@ -118,9 +117,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define DEFINE1(NAME, UNITS, TYPE) \ static int unused[sizeof (TYPE) == UNITS ? 1 : -1] \ __attribute__((unused)); \ - local_##NAME (NAME, UNITS, TYPE); \ - typeof (NAME##_##UNITS) __##NAME##_##UNITS \ - __attribute__((alias (#NAME "_" #UNITS))); + local_##NAME (NAME, UNITS, TYPE); /* As above, but performing macro expansion on the arguments. */ #define DEFINE(NAME, UNITS, TYPE) DEFINE1 (NAME, UNITS, TYPE) @@ -167,13 +164,11 @@ DEFINE (FN, 8, UOItype) #if defined Lsync_synchronize -static void -sync_synchronize (void) +void +__sync_synchronize (void) { __sync_synchronize (); } -typeof (sync_synchronize) __sync_synchronize \ - __attribute__((alias ("sync_synchronize"))); #endif