X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fstmt.c;h=c8f56f5470b68dc30f5048a43f314905a44e4d5b;hp=5418fee50a0ad5edfa2b4bf5a79fdf752b7f9a79;hb=4211f78ad1aa9078800828594e1960e3d848d611;hpb=c10b52fdec37125fb9b6e36ffac5709abda223a8 diff --git a/gcc/stmt.c b/gcc/stmt.c index 5418fee50a0..c8f56f5470b 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1,7 +1,7 @@ /* Expands front end tree to back end RTL for GCC Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 - Free Software Foundation, Inc. + 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see #include "libfuncs.h" #include "recog.h" #include "machmode.h" +#include "diagnostic-core.h" #include "toplev.h" #include "output.h" #include "ggc.h" @@ -52,6 +53,8 @@ along with GCC; see the file COPYING3. If not see #include "regs.h" #include "alloc-pool.h" #include "pretty-print.h" +#include "bitmap.h" + /* Functions and data structures for expanding case statements. */ @@ -773,6 +776,10 @@ expand_asm_operands (tree string, tree outputs, tree inputs, /* Second pass evaluates arguments. */ + /* Make sure stack is consistent for asm goto. */ + if (nlabels > 0) + do_pending_stack_adjust (); + ninout = 0; for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++) { @@ -937,7 +944,7 @@ expand_asm_operands (tree string, tree outputs, tree inputs, ASM_OPERANDS_INPUT (body, i) = op; ASM_OPERANDS_INPUT_CONSTRAINT_EXP (body, i) - = gen_rtx_ASM_INPUT (TYPE_MODE (type), + = gen_rtx_ASM_INPUT (TYPE_MODE (type), ggc_strdup (constraints[i + noutputs])); if (tree_conflicts_with_clobbers_p (val, &clobbered_regs)) @@ -1317,7 +1324,7 @@ resolve_asm_operand_names (tree string, tree outputs, tree inputs, tree labels) break; else { - c += 1; + c += 1 + (c[1] == '%'); continue; } } @@ -1339,7 +1346,7 @@ resolve_asm_operand_names (tree string, tree outputs, tree inputs, tree labels) p += 2; else { - p += 1; + p += 1 + (p[1] == '%'); continue; } @@ -1592,8 +1599,11 @@ expand_value_return (rtx val) tree type = TREE_TYPE (decl); int unsignedp = TYPE_UNSIGNED (type); enum machine_mode old_mode = DECL_MODE (decl); - enum machine_mode mode = promote_function_mode (type, old_mode, - &unsignedp, funtype, 1); + enum machine_mode mode; + if (DECL_BY_REFERENCE (decl)) + mode = promote_function_mode (type, old_mode, &unsignedp, funtype, 2); + else + mode = promote_function_mode (type, old_mode, &unsignedp, funtype, 1); if (mode != old_mode) val = convert_modes (mode, old_mode, val, unsignedp); @@ -1733,7 +1743,7 @@ expand_return (tree retval) xbitpos for the destination store (right justified). */ store_bit_field (dst, bitsize, xbitpos % BITS_PER_WORD, word_mode, extract_bit_field (src, bitsize, - bitpos % BITS_PER_WORD, 1, + bitpos % BITS_PER_WORD, 1, false, NULL_RTX, word_mode, word_mode)); } @@ -1828,7 +1838,7 @@ expand_nl_goto_receiver (void) decrementing fp by STARTING_FRAME_OFFSET. */ emit_move_insn (virtual_stack_vars_rtx, hard_frame_pointer_rtx); -#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM +#if !HARD_FRAME_POINTER_IS_ARG_POINTER if (fixed_regs[ARG_POINTER_REGNUM]) { #ifdef ELIMINABLE_REGS @@ -2069,7 +2079,7 @@ add_case_node (struct case_node *head, tree type, tree low, tree high, /* By default, enable case bit tests on targets with ashlsi3. */ #ifndef CASE_USE_BIT_TESTS -#define CASE_USE_BIT_TESTS (optab_handler (ashl_optab, word_mode)->insn_code \ +#define CASE_USE_BIT_TESTS (optab_handler (ashl_optab, word_mode) \ != CODE_FOR_nothing) #endif @@ -2332,11 +2342,8 @@ expand_case (gimple stmt) /* If we have not seen this label yet, then increase the number of unique case node targets seen. */ lab = label_rtx (n->code_label); - if (!bitmap_bit_p (label_bitmap, CODE_LABEL_NUMBER (lab))) - { - bitmap_set_bit (label_bitmap, CODE_LABEL_NUMBER (lab)); - uniq++; - } + if (bitmap_set_bit (label_bitmap, CODE_LABEL_NUMBER (lab))) + uniq++; } BITMAP_FREE (label_bitmap); @@ -2535,7 +2542,7 @@ do_jump_if_equal (enum machine_mode mode, rtx op0, rtx op1, rtx label, int unsignedp) { do_compare_rtx_and_jump (op0, op1, EQ, unsignedp, mode, - NULL_RTX, NULL_RTX, label); + NULL_RTX, NULL_RTX, label, -1); } /* Not all case values are encountered equally. This function