summaryrefslogtreecommitdiff
path: root/libgcc/sync.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-15 18:24:30 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-15 18:24:30 +0000
commit89432048ddafc90e67e5d1377285bfd379d8f0e9 (patch)
tree2fb3dd6d894f00d9fff1ba8e8fc2b73c2cc737f8 /libgcc/sync.c
parentb0c0c8797cee3448c2780f349d2e0380cccca6dd (diff)
downloadgcc-89432048ddafc90e67e5d1377285bfd379d8f0e9.tar.gz
gcc/
2013-10-15 Richard Biener <rguenther@suse.de> * tree-tailcall.c (find_tail_calls): Don't use tail-call recursion for built-in functions. gcc/testsuite/ * gcc.dg/torture/builtin-self.c: New file. libgcc/ * sync.c: Remove static aliases and define each function directly under its real name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203628 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/sync.c')
-rw-r--r--libgcc/sync.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/libgcc/sync.c b/libgcc/sync.c
index edb985eae26..17158c90217 100644
--- a/libgcc/sync.c
+++ b/libgcc/sync.c
@@ -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 <NAME>_<UNITS> that acts like __<NAME>_<UNITS>.
- TYPE is a type that has UNITS bytes. */
+/* Define functions called __sync_<NAME>_<UNITS>, 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