diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-10 08:00:24 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-10 08:00:24 +0000 |
commit | 6f6c767ccfbaff75eb44beb7771df877dcd855bb (patch) | |
tree | 767977ecd796812aa67661af18ea9f29fcf760ee /gcc/config | |
parent | d011df4af27ce866ffa9e531d6d208c1482b2afc (diff) | |
download | gcc-6f6c767ccfbaff75eb44beb7771df877dcd855bb.tar.gz |
2009-02-10 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r144050
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@144052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/avr/avr.c | 5 | ||||
-rw-r--r-- | gcc/config/avr/avr.h | 5 | ||||
-rw-r--r-- | gcc/config/avr/t-avr | 1 | ||||
-rw-r--r-- | gcc/config/m32c/m32c.h | 16 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 68 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 69 | ||||
-rw-r--r-- | gcc/config/sh/predicates.md | 8 | ||||
-rw-r--r-- | gcc/config/spu/spu.c | 5 |
8 files changed, 97 insertions, 80 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 8ec6e2cf8db..f8ef6d58fa2 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -1,6 +1,6 @@ /* Subroutines for insn-output.c for ATMEL AVR micro controllers - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 - Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, + 2009 Free Software Foundation, Inc. Contributed by Denis Chertykov (denisc@overta.ru) This file is part of GCC. @@ -175,6 +175,7 @@ static const struct mcu_type_s avr_mcu_types[] = { { "at90s8535", ARCH_AVR2, "__AVR_AT90S8535__" }, /* Classic + MOVW, <= 8K. */ { "avr25", ARCH_AVR25, NULL }, + { "ata6289", ARCH_AVR25, "__AVR_ATA6289__" }, { "attiny13", ARCH_AVR25, "__AVR_ATtiny13__" }, { "attiny13a", ARCH_AVR25, "__AVR_ATtiny13A__" }, { "attiny2313", ARCH_AVR25, "__AVR_ATtiny2313__" }, diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index d54870cac30..8a4d98ab365 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -1,7 +1,7 @@ /* Definitions of target machine for GNU compiler, for ATMEL AVR at90s8515, ATmega103/103L, ATmega603/603L microcontrollers. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008 Free Software Foundation, Inc. + 2008, 2009 Free Software Foundation, Inc. Contributed by Denis Chertykov (denisc@overta.ru) This file is part of GCC. @@ -826,6 +826,7 @@ mmcu=*:-mmcu=%*}" mmcu=at90s8*|\ mmcu=at90c8*|\ mmcu=at86rf401|\ + mmcu=ata6289|\ mmcu=attiny13*|\ mmcu=attiny2313|\ mmcu=attiny24|\ @@ -900,6 +901,7 @@ mmcu=*:-mmcu=%*}" mmcu=atmega16u4|\ mmcu=atmega32u*|\ mmcu=at90scr100|\ + mmcu=ata6289|\ mmcu=at90usb*: -Tdata 0x800100}\ %{mmcu=atmega640|\ mmcu=atmega1280|\ @@ -957,6 +959,7 @@ mmcu=*:-mmcu=%*}" %{mmcu=attiny87:crttn87.o%s} \ %{mmcu=attiny48:crttn48.o%s} \ %{mmcu=attiny88:crttn88.o%s} \ +%{mmcu=ata6289:crta6289.o%s} \ %{mmcu=at43usb355|mmcu=avr3:crt43355.o%s} \ %{mmcu=at76c711:crt76711.o%s} \ %{mmcu=atmega103|mmcu=avr31:crtm103.o%s} \ diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr index cbb47817d6d..9d8d386c787 100644 --- a/gcc/config/avr/t-avr +++ b/gcc/config/avr/t-avr @@ -43,6 +43,7 @@ MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 # The many avr2 matches are not listed here - this is the default. MULTILIB_MATCHES = \ + mmcu?avr25=mmcu?ata6289 \ mmcu?avr25=mmcu?attiny13 \ mmcu?avr25=mmcu?attiny13a \ mmcu?avr25=mmcu?attiny2313 \ diff --git a/gcc/config/m32c/m32c.h b/gcc/config/m32c/m32c.h index 2292a33bb5a..7775bd85dbd 100644 --- a/gcc/config/m32c/m32c.h +++ b/gcc/config/m32c/m32c.h @@ -143,6 +143,17 @@ machine_function; #define UNITS_PER_WORD 2 #define POINTER_SIZE (TARGET_A16 ? 16 : 32) #define POINTERS_EXTEND_UNSIGNED 1 +/* We have a problem with libgcc2. It only defines two versions of + each function, one for "int" and one for "long long". Ie it assumes + that "sizeof (int) == sizeof (long)". For the M32C this is not true + and we need a third set of functions. We explicitly define + LIBGCC2_UNITS_PER_WORD here so that it is clear that we are expecting + to get the SI and DI versions from the libgcc2.c sources, and we + provide our own set of HI functions in m32c-lib2.c, which is why this + definition is surrounded by #ifndef..#endif. */ +#ifndef LIBGCC2_UNITS_PER_WORD +#define LIBGCC2_UNITS_PER_WORD 4 +#endif /* These match the alignment enforced by the two types of stack operations. */ #define PARM_BOUNDARY (TARGET_A16 ? 8 : 16) @@ -154,6 +165,11 @@ machine_function; #define FUNCTION_BOUNDARY 8 #define BIGGEST_ALIGNMENT 8 +/* Since we have a maximum structure alignment of 8 there + is no need to enforce any alignment of bitfield types. */ +#undef PCC_BITFIELD_TYPE_MATTERS +#define PCC_BITFIELD_TYPE_MATTERS 0 + #define STRICT_ALIGNMENT 0 #define SLOW_BYTE_ACCESS 1 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d2ebf628f57..966a0f760c4 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -15542,6 +15542,7 @@ rs6000_emit_allocate_stack (HOST_WIDE_INT size, int copy_r12, int copy_r11) rtx stack_reg = gen_rtx_REG (Pmode, STACK_POINTER_REGNUM); rtx tmp_reg = gen_rtx_REG (Pmode, 0); rtx todec = gen_int_mode (-size, Pmode); + rtx par, set, mem; if (INTVAL (todec) != -size) { @@ -15585,54 +15586,39 @@ rs6000_emit_allocate_stack (HOST_WIDE_INT size, int copy_r12, int copy_r11) warning (0, "stack limit expression is not supported"); } - if (copy_r12 || copy_r11 || ! TARGET_UPDATE) + if (copy_r12 || copy_r11) emit_move_insn (copy_r11 ? gen_rtx_REG (Pmode, 11) : gen_rtx_REG (Pmode, 12), stack_reg); - if (TARGET_UPDATE) - { - rtx par, set, mem; - - if (size > 32767) - { - /* Need a note here so that try_split doesn't get confused. */ - if (get_last_insn () == NULL_RTX) - emit_note (NOTE_INSN_DELETED); - insn = emit_move_insn (tmp_reg, todec); - try_split (PATTERN (insn), insn, 0); - todec = tmp_reg; - } - - insn = emit_insn (TARGET_32BIT - ? gen_movsi_update (stack_reg, stack_reg, - todec, stack_reg) - : gen_movdi_di_update (stack_reg, stack_reg, - todec, stack_reg)); - /* Since we didn't use gen_frame_mem to generate the MEM, grab - it now and set the alias set/attributes. The above gen_*_update - calls will generate a PARALLEL with the MEM set being the first - operation. */ - par = PATTERN (insn); - gcc_assert (GET_CODE (par) == PARALLEL); - set = XVECEXP (par, 0, 0); - gcc_assert (GET_CODE (set) == SET); - mem = SET_DEST (set); - gcc_assert (MEM_P (mem)); - MEM_NOTRAP_P (mem) = 1; - set_mem_alias_set (mem, get_frame_alias_set ()); - } - else + if (size > 32767) { - insn = emit_insn (TARGET_32BIT - ? gen_addsi3 (stack_reg, stack_reg, todec) - : gen_adddi3 (stack_reg, stack_reg, todec)); - emit_move_insn (gen_frame_mem (Pmode, stack_reg), - copy_r11 - ? gen_rtx_REG (Pmode, 11) - : gen_rtx_REG (Pmode, 12)); + /* Need a note here so that try_split doesn't get confused. */ + if (get_last_insn () == NULL_RTX) + emit_note (NOTE_INSN_DELETED); + insn = emit_move_insn (tmp_reg, todec); + try_split (PATTERN (insn), insn, 0); + todec = tmp_reg; } + + insn = emit_insn (TARGET_32BIT + ? gen_movsi_update_stack (stack_reg, stack_reg, + todec, stack_reg) + : gen_movdi_di_update_stack (stack_reg, stack_reg, + todec, stack_reg)); + /* Since we didn't use gen_frame_mem to generate the MEM, grab + it now and set the alias set/attributes. The above gen_*_update + calls will generate a PARALLEL with the MEM set being the first + operation. */ + par = PATTERN (insn); + gcc_assert (GET_CODE (par) == PARALLEL); + set = XVECEXP (par, 0, 0); + gcc_assert (GET_CODE (set) == SET); + mem = SET_DEST (set); + gcc_assert (MEM_P (mem)); + MEM_NOTRAP_P (mem) = 1; + set_mem_alias_set (mem, get_frame_alias_set ()); RTX_FRAME_RELATED_P (insn) = 1; REG_NOTES (insn) = diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index b6f41814eba..ffbc8ad861e 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -10079,6 +10079,20 @@ stdu %3,%2(%0)" [(set_attr "type" "store_ux,store_u")]) +;; This pattern is only conditional on TARGET_POWERPC64, as it is +;; needed for stack allocation, even if the user passes -mno-update. +(define_insn "movdi_<mode>_update_stack" + [(set (mem:DI (plus:P (match_operand:P 1 "gpc_reg_operand" "0,0") + (match_operand:P 2 "reg_or_aligned_short_operand" "r,I"))) + (match_operand:DI 3 "gpc_reg_operand" "r,r")) + (set (match_operand:P 0 "gpc_reg_operand" "=b,b") + (plus:P (match_dup 1) (match_dup 2)))] + "TARGET_POWERPC64" + "@ + stdux %3,%0,%2 + stdu %3,%2(%0)" + [(set_attr "type" "store_ux,store_u")]) + (define_insn "*movsi_update1" [(set (match_operand:SI 3 "gpc_reg_operand" "=r,r") (mem:SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "0,0") @@ -10121,6 +10135,20 @@ {stu|stwu} %3,%2(%0)" [(set_attr "type" "store_ux,store_u")]) +;; This is an unconditional pattern; needed for stack allocation, even +;; if the user passes -mno-update. +(define_insn "movsi_update_stack" + [(set (mem:SI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "0,0") + (match_operand:SI 2 "reg_or_short_operand" "r,I"))) + (match_operand:SI 3 "gpc_reg_operand" "r,r")) + (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") + (plus:SI (match_dup 1) (match_dup 2)))] + "" + "@ + {stux|stwux} %3,%0,%2 + {stu|stwu} %3,%2(%0)" + [(set_attr "type" "store_ux,store_u")]) + (define_insn "*movhi_update1" [(set (match_operand:HI 3 "gpc_reg_operand" "=r,r") (mem:HI (plus:SI (match_operand:SI 1 "gpc_reg_operand" "0,0") @@ -10543,6 +10571,7 @@ { rtx chain = gen_reg_rtx (Pmode); rtx stack_bot = gen_rtx_MEM (Pmode, stack_pointer_rtx); rtx neg_op0; + rtx insn, par, set, mem; emit_move_insn (chain, stack_bot); @@ -10569,34 +10598,22 @@ else neg_op0 = GEN_INT (- INTVAL (operands[1])); - if (TARGET_UPDATE) - { - rtx insn, par, set, mem; - - insn = emit_insn ((* ((TARGET_32BIT) ? gen_movsi_update - : gen_movdi_di_update)) + insn = emit_insn ((* ((TARGET_32BIT) ? gen_movsi_update + : gen_movdi_di_update)) (stack_pointer_rtx, stack_pointer_rtx, neg_op0, chain)); - /* Since we didn't use gen_frame_mem to generate the MEM, grab - it now and set the alias set/attributes. The above gen_*_update - calls will generate a PARALLEL with the MEM set being the first - operation. */ - par = PATTERN (insn); - gcc_assert (GET_CODE (par) == PARALLEL); - set = XVECEXP (par, 0, 0); - gcc_assert (GET_CODE (set) == SET); - mem = SET_DEST (set); - gcc_assert (MEM_P (mem)); - MEM_NOTRAP_P (mem) = 1; - set_mem_alias_set (mem, get_frame_alias_set ()); - } - - else - { - emit_insn ((* ((TARGET_32BIT) ? gen_addsi3 : gen_adddi3)) - (stack_pointer_rtx, stack_pointer_rtx, neg_op0)); - emit_move_insn (gen_frame_mem (Pmode, stack_pointer_rtx), chain); - } + /* Since we didn't use gen_frame_mem to generate the MEM, grab + it now and set the alias set/attributes. The above gen_*_update + calls will generate a PARALLEL with the MEM set being the first + operation. */ + par = PATTERN (insn); + gcc_assert (GET_CODE (par) == PARALLEL); + set = XVECEXP (par, 0, 0); + gcc_assert (GET_CODE (set) == SET); + mem = SET_DEST (set); + gcc_assert (MEM_P (mem)); + MEM_NOTRAP_P (mem) = 1; + set_mem_alias_set (mem, get_frame_alias_set ()); emit_move_insn (operands[0], virtual_stack_dynamic_rtx); DONE; diff --git a/gcc/config/sh/predicates.md b/gcc/config/sh/predicates.md index ff6a1a2898a..bbd5fd4f104 100644 --- a/gcc/config/sh/predicates.md +++ b/gcc/config/sh/predicates.md @@ -1,5 +1,5 @@ ;; Predicate definitions for Renesas / SuperH SH. -;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc. ;; ;; This file is part of GCC. ;; @@ -392,12 +392,6 @@ return 0; } - if ((mode == QImode || mode == HImode) - && (GET_CODE (op) == SUBREG - && GET_CODE (XEXP (op, 0)) == REG - && system_reg_operand (XEXP (op, 0), mode))) - return 0; - if (TARGET_SHMEDIA && (GET_CODE (op) == PARALLEL || GET_CODE (op) == CONST_VECTOR) && sh_rep_vec (op, mode)) diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index cd7f6edacb2..75f785393f9 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -4722,9 +4722,8 @@ array_to_constant (enum machine_mode mode, unsigned char arr[16]) } if (mode == DFmode) { - val = (arr[0] << 24) | (arr[1] << 16) | (arr[2] << 8) | arr[3]; - val <<= 32; - val |= (arr[4] << 24) | (arr[5] << 16) | (arr[6] << 8) | arr[7]; + for (i = 0, val = 0; i < 8; i++) + val = (val << 8) | arr[i]; return hwint_to_const_double (DFmode, val); } |