diff options
author | Richard Henderson <rth@redhat.com> | 2011-11-26 15:57:37 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-11-26 15:57:37 -0800 |
commit | 8b281334a0bf4bce28d0f877cf0bbddd41ac25ea (patch) | |
tree | 26e156459542ab0e539b5dea2c200d63a1abfeff /gcc/config/m68k | |
parent | 84ec53b6ac3b2f94a3d5fa9ecbd0cb3f66fd9d69 (diff) | |
download | gcc-8b281334a0bf4bce28d0f877cf0bbddd41ac25ea.zip gcc-8b281334a0bf4bce28d0f877cf0bbddd41ac25ea.tar.gz gcc-8b281334a0bf4bce28d0f877cf0bbddd41ac25ea.tar.bz2 |
m68k-linux: Implement atomic operations via syscall.
libgcc/
* config/m68k/linux.h (TARGET_INIT_LIBFUNCS): New.
* config/m68k/m68k.c (m68k_init_sync_libfuncs): New.
gcc/
* config/m68k/linux-atomic.c: New file.
* config/m68k/t-linux: New file.
* config.host (m68k-uclinux, m68k-linux): Use it.
From-SVN: r181746
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r-- | gcc/config/m68k/linux.h | 4 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.c | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h index 70738d2..325faf7 100644 --- a/gcc/config/m68k/linux.h +++ b/gcc/config/m68k/linux.h @@ -235,3 +235,7 @@ along with GCC; see the file COPYING3. If not see #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD + +/* Install the __sync libcalls. */ +#undef TARGET_INIT_LIBFUNCS +#define TARGET_INIT_LIBFUNCS m68k_init_sync_libfuncs diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 51a04ed..61267a8 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see #include "insn-codes.h" #include "ggc.h" #include "opts.h" +#include "optabs.h" enum reg_class regno_reg_class[] = { @@ -164,6 +165,7 @@ static rtx m68k_function_arg (cumulative_args_t, enum machine_mode, const_tree, bool); static bool m68k_cannot_force_const_mem (enum machine_mode mode, rtx x); static bool m68k_output_addr_const_extra (FILE *, rtx); +static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED; /* Initialize the GCC target structure. */ @@ -6524,4 +6526,10 @@ m68k_conditional_register_usage (void) fixed_regs[PIC_REG] = call_used_regs[PIC_REG] = 1; } +static void +m68k_init_sync_libfuncs (void) +{ + init_sync_libfuncs (UNITS_PER_WORD); +} + #include "gt-m68k.h" |