diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 16:39:37 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 16:39:37 +0000 |
commit | 60dc82ead5535ecde6be3592a3d5a40f6d265253 (patch) | |
tree | 0f5b9378fd7890076172f1fbcb65104a35be308d /gcc/config/cris | |
parent | b848ffcdedc48f26697abb3ad2b88f2dd8d2faa0 (diff) | |
download | gcc-60dc82ead5535ecde6be3592a3d5a40f6d265253.tar.gz |
* config/cris/cris.c (cris_atomic_align_for_mode): New function.
(TARGET_ATOMIC_ALIGN_FOR_MODE): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205276 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/cris')
-rw-r--r-- | gcc/config/cris/cris.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 2d2a108031d..235b6c652cf 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -93,6 +93,8 @@ static int cris_reg_overlap_mentioned_p (rtx, rtx); static enum machine_mode cris_promote_function_mode (const_tree, enum machine_mode, int *, const_tree, int); +static unsigned int cris_atomic_align_for_mode (enum machine_mode); + static void cris_print_base (rtx, FILE *); static void cris_print_index (rtx, FILE *); @@ -227,6 +229,9 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION; #undef TARGET_PROMOTE_FUNCTION_MODE #define TARGET_PROMOTE_FUNCTION_MODE cris_promote_function_mode +#undef TARGET_ATOMIC_ALIGN_FOR_MODE +#define TARGET_ATOMIC_ALIGN_FOR_MODE cris_atomic_align_for_mode + #undef TARGET_STRUCT_VALUE_RTX #define TARGET_STRUCT_VALUE_RTX cris_struct_value_rtx #undef TARGET_SETUP_INCOMING_VARARGS @@ -4019,6 +4024,14 @@ cris_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, return CRIS_PROMOTED_MODE (mode, *punsignedp, type); } +/* Atomic types require alignment to be at least their "natural" size. */ + +static unsigned int +cris_atomic_align_for_mode (enum machine_mode mode) +{ + return GET_MODE_BITSIZE (mode); +} + /* Let's assume all functions return in r[CRIS_FIRST_ARG_REG] for the time being. */ |