diff options
author | Joseph Myers <joseph@codesourcery.com> | 2009-03-30 17:31:46 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2009-03-30 17:31:46 +0000 |
commit | 821a687bb3bfa18eabfc9e717c5c9f480fd9647e (patch) | |
tree | a6e57b0336a8e766192d6b7b6f59bd62093e8234 /gcc/config/spu/spu.c | |
parent | e0b05a75af586156d675d122abddbe0d527b0c16 (diff) |
svn merge -r144476:145289 svn+ssh://gcc.gnu.org/svn/gcc/trunkc-4_5-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/c-4_5-branch@145306 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/spu/spu.c')
-rw-r--r-- | gcc/config/spu/spu.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index a29125269e5..6e0001b0a05 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -143,6 +143,7 @@ static bool spu_vector_alignment_reachable (const_tree, bool); static tree spu_builtin_vec_perm (tree, tree *); static int spu_sms_res_mii (struct ddg *g); static void asm_file_start (void); +static unsigned int spu_section_type_flags (tree, const char *, int); extern const char *reg_names[]; rtx spu_compare_op0, spu_compare_op1; @@ -329,6 +330,9 @@ const struct attribute_spec spu_attribute_table[]; #undef TARGET_ASM_FILE_START #define TARGET_ASM_FILE_START asm_file_start +#undef TARGET_SECTION_TYPE_FLAGS +#define TARGET_SECTION_TYPE_FLAGS spu_section_type_flags + struct gcc_target targetm = TARGET_INITIALIZER; void @@ -4110,17 +4114,16 @@ spu_expand_mov (rtx * ops, enum machine_mode mode) if (GET_CODE (ops[1]) == SUBREG && !valid_subreg (ops[1])) { rtx from = SUBREG_REG (ops[1]); - enum machine_mode imode = GET_MODE (from); + enum machine_mode imode = int_mode_for_mode (GET_MODE (from)); gcc_assert (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE_CLASS (imode) == MODE_INT && subreg_lowpart_p (ops[1])); if (GET_MODE_SIZE (imode) < 4) - { - from = gen_rtx_SUBREG (SImode, from, 0); - imode = SImode; - } + imode = SImode; + if (imode != GET_MODE (from)) + from = gen_rtx_SUBREG (imode, from, 0); if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (imode)) { @@ -6285,3 +6288,13 @@ asm_file_start (void) default_file_start (); } +/* Implement targetm.section_type_flags. */ +static unsigned int +spu_section_type_flags (tree decl, const char *name, int reloc) +{ + /* .toe needs to have type @nobits. */ + if (strcmp (name, ".toe") == 0) + return SECTION_BSS; + return default_section_type_flags (decl, name, reloc); +} + |