diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2008-06-11 13:49:51 +0000 |
---|---|---|
committer | H.J. Lu <hongjiu.lu@intel.com> | 2008-06-11 13:49:51 +0000 |
commit | c32767a6a0035b97b665ebf68927cf171d93fed6 (patch) | |
tree | 58cbf614ebe6231fba6f4814fa19a20e1728a912 | |
parent | 8733244f66392de678ebf7301c6d6152cc1be30e (diff) |
Merged with trunk at revision 136664.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/stack@136665 138bc75d-0d04-0410-961f-82ee72b054a4
49 files changed, 637 insertions, 150 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index 55d74f668a1..18ff127358a 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,7 +1,11 @@ +2008-06-11 Bernhard Fischer <aldot@gcc.gnu.org> + + * tls.m4: Fix typos. + 2008-06-08 Joseph Myers <joseph@codesourcery.com> PR tree-optimization/36218 - * config/mh-mingw (LDFLAGS): Define. + * mh-mingw (LDFLAGS): Define. 2008-06-05 Danny Smith <dannysmith@users.sourceforge.net> diff --git a/config/tls.m4 b/config/tls.m4 index b6c4c4a6a7d..acb123f6986 100644 --- a/config/tls.m4 +++ b/config/tls.m4 @@ -77,7 +77,7 @@ AC_DEFUN([GCC_CHECK_TLS], [ dnl Check whether the target assembler supports TLS. AC_DEFUN([GCC_CHECK_CC_TLS], [ GCC_ENABLE(tls, yes, [], [Use thread-local storage]) - AC_CACHE_CHECK([whether the target asssembler upports thread-local storage], + AC_CACHE_CHECK([whether the target assembler supports thread-local storage], gcc_cv_have_cc_tls, [ AC_COMPILE_IFELSE([__thread int a; int b; int main() { return a = b; }], [gcc_cv_have_cc_tls=yes], [gcc_cv_have_cc_tls=no])] diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd7d2048dc0..8a8f88990e0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,57 @@ +2008-06-11 Joseph Myers <joseph@codesourcery.com> + + * config/arm/arm.c (arm_init_neon_builtins): Move initialization + with function calls after declarations. Lay out + neon_float_type_node before further use. + +2008-06-11 Richard Guenther <rguenther@suse.de> + + * tree-flow.h (may_point_to_global_var): Declare. + * tree-ssa-alias.c (may_point_to_global_var): New function. + * tree-ssa-sink.c (is_hidden_global_store): Use it. + +2008-06-10 Kazu Hirata <kazu@codesourcery.com> + + * configure.ac: Teach that fido supports .debug_line. + * configure: Regenerate. + +2008-06-10 Tom Tromey <tromey@redhat.com> + + * c-lex.c (fe_file_change): Pass SOURCE_LINE to start_source_file + debug hook. + +2008-06-10 Joseph Myers <joseph@codesourcery.com> + + * dfp.c (WORDS_BIGENDIAN): Define to 0 if not defined. + (encode_decimal64, decode_decimal64, encode_decimal128, + decode_decimal128): Reverse order of 32-bit parts of value if host + and target endianness differ. + +2008-06-10 Vinodha Ramasamy <vinodha@google.com> + * value_prob.c (tree_divmod_fixed_value_transform): Use gcov_type. + Avoid division by 0. + (tree_mod_pow2_value_transform): Likewise. + (tree_ic_transform): Likewise. + (tree_stringops_transform): Likewise. + (tree_mod_subtract_transform): Likewise. + * tree-inline-c (copy_bb): Corrected int type to gcov_type. + (copy_edges_for_bb): Likewise. + (initialize_cfun): Likewise. + +2008-06-10 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.md (*btdi_rex64): Change operand 1 predicate to + nonmemory_operand. Add "N" operand constraint. + (*btsi): Ditto. + (*jcc_btdi_mask_rex64): New instruction and split pattern. + (*jcc_btsi_mask): Ditto. + (*jcc_btsi_mask_1): Ditto. + +2008-06-10 Joseph Myers <joseph@codesourcery.com> + + * config/rs6000/rs6000.c (build_opaque_vector_type): Set + TYPE_CANONICAL for copied element type. + 2008-06-10 Uros Bizjak <ubizjak@gmail.com> PR target/36473 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 02101f683e2..a4b03e33583 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20080610 +20080611 diff --git a/gcc/c-lex.c b/gcc/c-lex.c index c3e7f6e3a16..c2a0fa350b5 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -205,10 +205,13 @@ fe_file_change (const struct line_map *new_map) we already did in compile_file. */ if (!MAIN_FILE_P (new_map)) { - int included_at = LAST_SOURCE_LINE_LOCATION (new_map - 1); + unsigned int included_at = LAST_SOURCE_LINE_LOCATION (new_map - 1); + int line = 0; + if (included_at > BUILTINS_LOCATION) + line = SOURCE_LINE (new_map - 1, included_at); input_location = new_map->start_location; - (*debug_hooks->start_source_file) (included_at, new_map->to_file); + (*debug_hooks->start_source_file) (line, new_map->to_file); #ifndef NO_IMPLICIT_EXTERN_C if (c_header_level) ++c_header_level; diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index e1ec23b3862..5df6a7722ed 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -15007,124 +15007,190 @@ arm_init_neon_builtins (void) { unsigned int i, fcode = ARM_BUILTIN_NEON_BASE; + tree neon_intQI_type_node; + tree neon_intHI_type_node; + tree neon_polyQI_type_node; + tree neon_polyHI_type_node; + tree neon_intSI_type_node; + tree neon_intDI_type_node; + tree neon_float_type_node; + + tree intQI_pointer_node; + tree intHI_pointer_node; + tree intSI_pointer_node; + tree intDI_pointer_node; + tree float_pointer_node; + + tree const_intQI_node; + tree const_intHI_node; + tree const_intSI_node; + tree const_intDI_node; + tree const_float_node; + + tree const_intQI_pointer_node; + tree const_intHI_pointer_node; + tree const_intSI_pointer_node; + tree const_intDI_pointer_node; + tree const_float_pointer_node; + + tree V8QI_type_node; + tree V4HI_type_node; + tree V2SI_type_node; + tree V2SF_type_node; + tree V16QI_type_node; + tree V8HI_type_node; + tree V4SI_type_node; + tree V4SF_type_node; + tree V2DI_type_node; + + tree intUQI_type_node; + tree intUHI_type_node; + tree intUSI_type_node; + tree intUDI_type_node; + + tree intEI_type_node; + tree intOI_type_node; + tree intCI_type_node; + tree intXI_type_node; + + tree V8QI_pointer_node; + tree V4HI_pointer_node; + tree V2SI_pointer_node; + tree V2SF_pointer_node; + tree V16QI_pointer_node; + tree V8HI_pointer_node; + tree V4SI_pointer_node; + tree V4SF_pointer_node; + tree V2DI_pointer_node; + + tree void_ftype_pv8qi_v8qi_v8qi; + tree void_ftype_pv4hi_v4hi_v4hi; + tree void_ftype_pv2si_v2si_v2si; + tree void_ftype_pv2sf_v2sf_v2sf; + tree void_ftype_pdi_di_di; + tree void_ftype_pv16qi_v16qi_v16qi; + tree void_ftype_pv8hi_v8hi_v8hi; + tree void_ftype_pv4si_v4si_v4si; + tree void_ftype_pv4sf_v4sf_v4sf; + tree void_ftype_pv2di_v2di_v2di; + + tree reinterp_ftype_dreg[5][5]; + tree reinterp_ftype_qreg[5][5]; + tree dreg_types[5], qreg_types[5]; + /* Create distinguished type nodes for NEON vector element types, and pointers to values of such types, so we can detect them later. */ - tree neon_intQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode)); - tree neon_intHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode)); - tree neon_polyQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode)); - tree neon_polyHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode)); - tree neon_intSI_type_node = make_signed_type (GET_MODE_PRECISION (SImode)); - tree neon_intDI_type_node = make_signed_type (GET_MODE_PRECISION (DImode)); - tree neon_float_type_node = make_node (REAL_TYPE); - - tree intQI_pointer_node = build_pointer_type (neon_intQI_type_node); - tree intHI_pointer_node = build_pointer_type (neon_intHI_type_node); - tree intSI_pointer_node = build_pointer_type (neon_intSI_type_node); - tree intDI_pointer_node = build_pointer_type (neon_intDI_type_node); - tree float_pointer_node = build_pointer_type (neon_float_type_node); + neon_intQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode)); + neon_intHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode)); + neon_polyQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode)); + neon_polyHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode)); + neon_intSI_type_node = make_signed_type (GET_MODE_PRECISION (SImode)); + neon_intDI_type_node = make_signed_type (GET_MODE_PRECISION (DImode)); + neon_float_type_node = make_node (REAL_TYPE); + TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE; + layout_type (neon_float_type_node); + + intQI_pointer_node = build_pointer_type (neon_intQI_type_node); + intHI_pointer_node = build_pointer_type (neon_intHI_type_node); + intSI_pointer_node = build_pointer_type (neon_intSI_type_node); + intDI_pointer_node = build_pointer_type (neon_intDI_type_node); + float_pointer_node = build_pointer_type (neon_float_type_node); /* Next create constant-qualified versions of the above types. */ - tree const_intQI_node = build_qualified_type (neon_intQI_type_node, - TYPE_QUAL_CONST); - tree const_intHI_node = build_qualified_type (neon_intHI_type_node, - TYPE_QUAL_CONST); - tree const_intSI_node = build_qualified_type (neon_intSI_type_node, - TYPE_QUAL_CONST); - tree const_intDI_node = build_qualified_type (neon_intDI_type_node, - TYPE_QUAL_CONST); - tree const_float_node = build_qualified_type (neon_float_type_node, - TYPE_QUAL_CONST); - - tree const_intQI_pointer_node = build_pointer_type (const_intQI_node); - tree const_intHI_pointer_node = build_pointer_type (const_intHI_node); - tree const_intSI_pointer_node = build_pointer_type (const_intSI_node); - tree const_intDI_pointer_node = build_pointer_type (const_intDI_node); - tree const_float_pointer_node = build_pointer_type (const_float_node); + const_intQI_node = build_qualified_type (neon_intQI_type_node, + TYPE_QUAL_CONST); + const_intHI_node = build_qualified_type (neon_intHI_type_node, + TYPE_QUAL_CONST); + const_intSI_node = build_qualified_type (neon_intSI_type_node, + TYPE_QUAL_CONST); + const_intDI_node = build_qualified_type (neon_intDI_type_node, + TYPE_QUAL_CONST); + const_float_node = build_qualified_type (neon_float_type_node, + TYPE_QUAL_CONST); + + const_intQI_pointer_node = build_pointer_type (const_intQI_node); + const_intHI_pointer_node = build_pointer_type (const_intHI_node); + const_intSI_pointer_node = build_pointer_type (const_intSI_node); + const_intDI_pointer_node = build_pointer_type (const_intDI_node); + const_float_pointer_node = build_pointer_type (const_float_node); /* Now create vector types based on our NEON element types. */ /* 64-bit vectors. */ - tree V8QI_type_node = + V8QI_type_node = build_vector_type_for_mode (neon_intQI_type_node, V8QImode); - tree V4HI_type_node = + V4HI_type_node = build_vector_type_for_mode (neon_intHI_type_node, V4HImode); - tree V2SI_type_node = + V2SI_type_node = build_vector_type_for_mode (neon_intSI_type_node, V2SImode); - tree V2SF_type_node = + V2SF_type_node = build_vector_type_for_mode (neon_float_type_node, V2SFmode); /* 128-bit vectors. */ - tree V16QI_type_node = + V16QI_type_node = build_vector_type_for_mode (neon_intQI_type_node, V16QImode); - tree V8HI_type_node = + V8HI_type_node = build_vector_type_for_mode (neon_intHI_type_node, V8HImode); - tree V4SI_type_node = + V4SI_type_node = build_vector_type_for_mode (neon_intSI_type_node, V4SImode); - tree V4SF_type_node = + V4SF_type_node = build_vector_type_for_mode (neon_float_type_node, V4SFmode); - tree V2DI_type_node = + V2DI_type_node = build_vector_type_for_mode (neon_intDI_type_node, V2DImode); /* Unsigned integer types for various mode sizes. */ - tree intUQI_type_node = make_unsigned_type (GET_MODE_PRECISION (QImode)); - tree intUHI_type_node = make_unsigned_type (GET_MODE_PRECISION (HImode)); - tree intUSI_type_node = make_unsigned_type (GET_MODE_PRECISION (SImode)); - tree intUDI_type_node = make_unsigned_type (GET_MODE_PRECISION (DImode)); + intUQI_type_node = make_unsigned_type (GET_MODE_PRECISION (QImode)); + intUHI_type_node = make_unsigned_type (GET_MODE_PRECISION (HImode)); + intUSI_type_node = make_unsigned_type (GET_MODE_PRECISION (SImode)); + intUDI_type_node = make_unsigned_type (GET_MODE_PRECISION (DImode)); /* Opaque integer types for structures of vectors. */ - tree intEI_type_node = make_signed_type (GET_MODE_PRECISION (EImode)); - tree intOI_type_node = make_signed_type (GET_MODE_PRECISION (OImode)); - tree intCI_type_node = make_signed_type (GET_MODE_PRECISION (CImode)); - tree intXI_type_node = make_signed_type (GET_MODE_PRECISION (XImode)); + intEI_type_node = make_signed_type (GET_MODE_PRECISION (EImode)); + intOI_type_node = make_signed_type (GET_MODE_PRECISION (OImode)); + intCI_type_node = make_signed_type (GET_MODE_PRECISION (CImode)); + intXI_type_node = make_signed_type (GET_MODE_PRECISION (XImode)); /* Pointers to vector types. */ - tree V8QI_pointer_node = build_pointer_type (V8QI_type_node); - tree V4HI_pointer_node = build_pointer_type (V4HI_type_node); - tree V2SI_pointer_node = build_pointer_type (V2SI_type_node); - tree V2SF_pointer_node = build_pointer_type (V2SF_type_node); - tree V16QI_pointer_node = build_pointer_type (V16QI_type_node); - tree V8HI_pointer_node = build_pointer_type (V8HI_type_node); - tree V4SI_pointer_node = build_pointer_type (V4SI_type_node); - tree V4SF_pointer_node = build_pointer_type (V4SF_type_node); - tree V2DI_pointer_node = build_pointer_type (V2DI_type_node); + V8QI_pointer_node = build_pointer_type (V8QI_type_node); + V4HI_pointer_node = build_pointer_type (V4HI_type_node); + V2SI_pointer_node = build_pointer_type (V2SI_type_node); + V2SF_pointer_node = build_pointer_type (V2SF_type_node); + V16QI_pointer_node = build_pointer_type (V16QI_type_node); + V8HI_pointer_node = build_pointer_type (V8HI_type_node); + V4SI_pointer_node = build_pointer_type (V4SI_type_node); + V4SF_pointer_node = build_pointer_type (V4SF_type_node); + V2DI_pointer_node = build_pointer_type (V2DI_type_node); /* Operations which return results as pairs. */ - tree void_ftype_pv8qi_v8qi_v8qi = + void_ftype_pv8qi_v8qi_v8qi = build_function_type_list (void_type_node, V8QI_pointer_node, V8QI_type_node, V8QI_type_node, NULL); - tree void_ftype_pv4hi_v4hi_v4hi = + void_ftype_pv4hi_v4hi_v4hi = build_function_type_list (void_type_node, V4HI_pointer_node, V4HI_type_node, V4HI_type_node, NULL); - tree void_ftype_pv2si_v2si_v2si = + void_ftype_pv2si_v2si_v2si = build_function_type_list (void_type_node, V2SI_pointer_node, V2SI_type_node, V2SI_type_node, NULL); - tree void_ftype_pv2sf_v2sf_v2sf = + void_ftype_pv2sf_v2sf_v2sf = build_function_type_list (void_type_node, V2SF_pointer_node, V2SF_type_node, V2SF_type_node, NULL); - tree void_ftype_pdi_di_di = + void_ftype_pdi_di_di = build_function_type_list (void_type_node, intDI_pointer_node, neon_intDI_type_node, neon_intDI_type_node, NULL); - tree void_ftype_pv16qi_v16qi_v16qi = + void_ftype_pv16qi_v16qi_v16qi = build_function_type_list (void_type_node, V16QI_pointer_node, V16QI_type_node, V16QI_type_node, NULL); - tree void_ftype_pv8hi_v8hi_v8hi = + void_ftype_pv8hi_v8hi_v8hi = build_function_type_list (void_type_node, V8HI_pointer_node, V8HI_type_node, V8HI_type_node, NULL); - tree void_ftype_pv4si_v4si_v4si = + void_ftype_pv4si_v4si_v4si = build_function_type_list (void_type_node, V4SI_pointer_node, V4SI_type_node, V4SI_type_node, NULL); - tree void_ftype_pv4sf_v4sf_v4sf = + void_ftype_pv4sf_v4sf_v4sf = build_function_type_list (void_type_node, V4SF_pointer_node, V4SF_type_node, V4SF_type_node, NULL); - tree void_ftype_pv2di_v2di_v2di = + void_ftype_pv2di_v2di_v2di = build_function_type_list (void_type_node, V2DI_pointer_node, V2DI_type_node, V2DI_type_node, NULL); - tree reinterp_ftype_dreg[5][5]; - tree reinterp_ftype_qreg[5][5]; - tree dreg_types[5], qreg_types[5]; - - TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE; - layout_type (neon_float_type_node); - /* Define typedefs which exactly correspond to the modes we are basing vector types on. If you change these names you'll need to change the table used by arm_mangle_type too. */ diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 738061d7048..886c1267824 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -13821,7 +13821,7 @@ (zero_extract:DI (match_operand:DI 0 "register_operand" "r") (const_int 1) - (match_operand:DI 1 "register_operand" "r")) + (match_operand:DI 1 "nonmemory_operand" "rN")) (const_int 0)))] "TARGET_64BIT && (TARGET_USE_BT || optimize_size)" "bt{q}\t{%1, %0|%0, %1}" @@ -13833,7 +13833,7 @@ (zero_extract:SI (match_operand:SI 0 "register_operand" "r") (const_int 1) - (match_operand:SI 1 "register_operand" "r")) + (match_operand:SI 1 "nonmemory_operand" "rN")) (const_int 0)))] "TARGET_USE_BT || optimize_size" "bt{l}\t{%1, %0|%0, %1}" @@ -14119,6 +14119,39 @@ PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0]))); }) +;; avoid useless masking of bit offset operand +(define_insn_and_split "*jcc_btdi_mask_rex64" + [(set (pc) + (if_then_else (match_operator 0 "bt_comparison_operator" + [(zero_extract:DI + (match_operand:DI 1 "register_operand" "r") + (const_int 1) + (and:SI + (match_operand:SI 2 "register_operand" "r") + (match_operand:SI 3 "const_int_operand" "n")))]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "TARGET_64BIT && (TARGET_USE_BT || optimize_size) + && (INTVAL (operands[3]) & 0x3f) == 0x3f" + "#" + "&& 1" + [(set (reg:CCC FLAGS_REG) + (compare:CCC + (zero_extract:DI + (match_dup 1) + (const_int 1) + (match_dup 2)) + (const_int 0))) + (set (pc) + (if_then_else (match_op_dup 0 [(reg:CCC FLAGS_REG) (const_int 0)]) + (label_ref (match_dup 4)) + (pc)))] +{ + operands[2] = simplify_gen_subreg (DImode, operands[2], SImode, 0); + + PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0]))); +}) + (define_insn_and_split "*jcc_btsi" [(set (pc) (if_then_else (match_operator 0 "bt_comparison_operator" @@ -14150,6 +14183,35 @@ PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0]))); }) +;; avoid useless masking of bit offset operand +(define_insn_and_split "*jcc_btsi_mask" + [(set (pc) + (if_then_else (match_operator 0 "bt_comparison_operator" + [(zero_extract:SI + (match_operand:SI 1 "register_operand" "r") + (const_int 1) + (and:SI + (match_operand:SI 2 "register_operand" "r") + (match_operand:SI 3 "const_int_operand" "n")))]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "(TARGET_USE_BT || optimize_size) + && (INTVAL (operands[3]) & 0x1f) == 0x1f" + "#" + "&& 1" + [(set (reg:CCC FLAGS_REG) + (compare:CCC + (zero_extract:SI + (match_dup 1) + (const_int 1) + (match_dup 2)) + (const_int 0))) + (set (pc) + (if_then_else (match_op_dup 0 [(reg:CCC FLAGS_REG) (const_int 0)]) + (label_ref (match_dup 4)) + (pc)))] + "PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0])));") + (define_insn_and_split "*jcc_btsi_1" [(set (pc) (if_then_else (match_operator 0 "bt_comparison_operator" @@ -14181,6 +14243,39 @@ PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0]))); }) +;; avoid useless masking of bit offset operand +(define_insn_and_split "*jcc_btsi_mask_1" + [(set (pc) + (if_then_else + (match_operator 0 "bt_comparison_operator" + [(and:SI + (lshiftrt:SI + (match_operand:SI 1 "register_operand" "r") + (subreg:QI + (and:SI + (match_operand:SI 2 "register_operand" "r") + (match_operand:SI 3 "const_int_operand" "n")) 0)) + (const_int 1)) + (const_int 0)]) + (label_ref (match_operand 4 "" "")) + (pc)))] + "(TARGET_USE_BT || optimize_size) + && (INTVAL (operands[3]) & 0x1f) == 0x1f" + "#" + "&& 1" + [(set (reg:CCC FLAGS_REG) + (compare:CCC + (zero_extract:SI + (match_dup 1) + (const_int 1) + (match_dup 2)) + (const_int 0))) + (set (pc) + (if_then_else (match_op_dup 0 [(reg:CCC FLAGS_REG) (const_int 0)]) + (label_ref (match_dup 4)) + (pc)))] + "PUT_CODE (operands[0], reverse_condition (GET_CODE (operands[0])));") + ;; Define combination compare-and-branch fp compare instructions to use ;; during early optimization. Splitting the operation apart early makes ;; for bad code when we want to reverse the operation. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 91e1732a8f4..dcbccbca38e 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -9119,6 +9119,7 @@ build_opaque_vector_type (tree node, int nunits) { node = copy_node (node); TYPE_MAIN_VARIANT (node) = node; + TYPE_CANONICAL (node) = node; return build_vector_type (node, nunits); } diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index b944a00e5bf..3fb339d0324 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -4479,7 +4479,7 @@ spu_init_builtins (void) unsigned_V4SI_type_node = build_vector_type (unsigned_intSI_type_node, 4); unsigned_V2DI_type_node = build_vector_type (unsigned_intDI_type_node, 2); - spu_builtin_types[SPU_BTI_QUADWORD] = intTI_type_node; + spu_builtin_types[SPU_BTI_QUADWORD] = V16QI_type_node; spu_builtin_types[SPU_BTI_7] = global_trees[TI_INTSI_TYPE]; spu_builtin_types[SPU_BTI_S7] = global_trees[TI_INTSI_TYPE]; @@ -5374,8 +5374,7 @@ spu_expand_builtin_1 (struct spu_builtin_description *d, if (VECTOR_MODE_P (mode) && (GET_CODE (ops[i]) == CONST_INT || GET_MODE_CLASS (GET_MODE (ops[i])) == MODE_INT - || GET_MODE_CLASS (GET_MODE (ops[i])) == MODE_FLOAT) - && d->parm[i] != SPU_BTI_QUADWORD) + || GET_MODE_CLASS (GET_MODE (ops[i])) == MODE_FLOAT)) { if (GET_CODE (ops[i]) == CONST_INT) ops[i] = spu_const (mode, INTVAL (ops[i])); diff --git a/gcc/configure b/gcc/configure index 1f478817ac8..1d16aa0f689 100755 --- a/gcc/configure +++ b/gcc/configure @@ -22700,7 +22700,8 @@ esac case "$target" in i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ | x86_64*-*-* | hppa*-*-* | arm*-*-* \ - | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*) + | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* \ + | spu-*-* | fido*-*-*) insn="nop" ;; ia64*-*-* | s390*-*-*) diff --git a/gcc/configure.ac b/gcc/configure.ac index 57be54a5b97..49dcf34a6dd 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3060,7 +3060,8 @@ esac case "$target" in i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ | x86_64*-*-* | hppa*-*-* | arm*-*-* \ - | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*) + | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* \ + | spu-*-* | fido*-*-*) insn="nop" ;; ia64*-*-* | s390*-*-*) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 74ae4ae4d98..897a54edb4e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-06-09 Jakub Jelinek <jakub@redhat.com> + + PR c++/36408 + * semantics.c (stmt_expr_value_expr): Don't crash on empty + STATEMENT_LIST. + 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/35242 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 83d23394cb5..f39b8d1eb17 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1778,7 +1778,7 @@ stmt_expr_value_expr (tree stmt_expr) if (TREE_CODE (t) == BIND_EXPR) t = BIND_EXPR_BODY (t); - if (TREE_CODE (t) == STATEMENT_LIST) + if (TREE_CODE (t) == STATEMENT_LIST && STATEMENT_LIST_TAIL (t)) t = STATEMENT_LIST_TAIL (t)->stmt; if (TREE_CODE (t) == EXPR_STMT) diff --git a/gcc/dfp.c b/gcc/dfp.c index fde3b84bda5..43262380af5 100644 --- a/gcc/dfp.c +++ b/gcc/dfp.c @@ -36,6 +36,10 @@ along with GCC; see the file COPYING3. If not see #include "decimal32.h" #include "decNumber.h" +#ifndef WORDS_BIGENDIAN +#define WORDS_BIGENDIAN 0 +#endif + /* Initialize R (a real with the decimal flag set) from DN. Can utilize status passed in via CONTEXT, if a previous operation had interesting status. */ @@ -173,8 +177,16 @@ encode_decimal64 (const struct real_format *fmt ATTRIBUTE_UNUSED, decimal_to_decnumber (r, &dn); decimal64FromNumber (&d64, &dn, &set); - buf[0] = *(uint32_t *) &d64.bytes[0]; - buf[1] = *(uint32_t *) &d64.bytes[4]; + if (WORDS_BIGENDIAN == FLOAT_WORDS_BIG_ENDIAN) + { + buf[0] = *(uint32_t *) &d64.bytes[0]; + buf[1] = *(uint32_t *) &d64.bytes[4]; + } + else + { + buf[0] = *(uint32_t *) &d64.bytes[4]; + buf[1] = *(uint32_t *) &d64.bytes[0]; + } } /* Decode an IEEE 754R decimal64 type into a real. */ @@ -190,8 +202,16 @@ decode_decimal64 (const struct real_format *fmt ATTRIBUTE_UNUSED, decContextDefault (&set, DEC_INIT_DECIMAL128); set.traps = 0; - *((uint32_t *) &d64.bytes[0]) = (uint32_t) buf[0]; - *((uint32_t *) &d64.bytes[4]) = (uint32_t) buf[1]; + if (WORDS_BIGENDIAN == FLOAT_WORDS_BIG_ENDIAN) + { + *((uint32_t *) &d64.bytes[0]) = (uint32_t) buf[0]; + *((uint32_t *) &d64.bytes[4]) = (uint32_t) buf[1]; + } + else + { + *((uint32_t *) &d64.bytes[0]) = (uint32_t) buf[1]; + *((uint32_t *) &d64.bytes[4]) = (uint32_t) buf[0]; + } decimal64ToNumber (&d64, &dn); decimal_from_decnumber (r, &dn, &set); @@ -213,10 +233,20 @@ encode_decimal128 (const struct real_format *fmt ATTRIBUTE_UNUSED, decimal_to_decnumber (r, &dn); decimal128FromNumber (&d128, &dn, &set); - buf[0] = *(uint32_t *) &d128.bytes[0]; - buf[1] = *(uint32_t *) &d128.bytes[4]; - buf[2] = *(uint32_t *) &d128.bytes[8]; - buf[3] = *(uint32_t *) &d128.bytes[12]; + if (WORDS_BIGENDIAN == FLOAT_WORDS_BIG_ENDIAN) + { + buf[0] = *(uint32_t *) &d128.bytes[0]; + buf[1] = *(uint32_t *) &d128.bytes[4]; + buf[2] = *(uint32_t *) &d128.bytes[8]; + buf[3] = *(uint32_t *) &d128.bytes[12]; + } + else + { + buf[0] = *(uint32_t *) &d128.bytes[12]; + buf[1] = *(uint32_t *) &d128.bytes[8]; + buf[2] = *(uint32_t *) &d128.bytes[4]; + buf[3] = *(uint32_t *) &d128.bytes[0]; + } } /* Decode an IEEE 754R decimal128 type into a real. */ @@ -232,10 +262,20 @@ decode_decimal128 (const struct real_format *fmt ATTRIBUTE_UNUSED, decContextDefault (&set, DEC_INIT_DECIMAL128); set.traps = 0; - *((uint32_t *) &d128.bytes[0]) = (uint32_t) buf[0]; - *((uint32_t *) &d128.bytes[4]) = (uint32_t) buf[1]; - *((uint32_t *) &d128.bytes[8]) = (uint32_t) buf[2]; - *((uint32_t *) &d128.bytes[12]) = (uint32_t) buf[3]; + if (WORDS_BIGENDIAN == FLOAT_WORDS_BIG_ENDIAN) + { + *((uint32_t *) &d128.bytes[0]) = (uint32_t) buf[0]; + *((uint32_t *) &d128.bytes[4]) = (uint32_t) buf[1]; + *((uint32_t *) &d128.bytes[8]) = (uint32_t) buf[2]; + *((uint32_t *) &d128.bytes[12]) = (uint32_t) buf[3]; + } + else + { + *((uint32_t *) &d128.bytes[0]) = (uint32_t) buf[3]; + *((uint32_t *) &d128.bytes[4]) = (uint32_t) buf[2]; + *((uint32_t *) &d128.bytes[8]) = (uint32_t) buf[1]; + *((uint32_t *) &d128.bytes[12]) = (uint32_t) buf[0]; + } decimal128ToNumber (&d128, &dn); decimal_from_decnumber (r, &dn, &set); diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 205fc19f0c6..317fbe26231 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + * cpp.c: Add copyright notice. + * cpp.h: Add copyright notice. + 2008-06-08 Janus Weil <janus@gcc.gnu.org> PR fortran/36459 diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c index 170f6cdcd63..76ab9a3bad5 100644 --- a/gcc/fortran/cpp.c +++ b/gcc/fortran/cpp.c @@ -1,3 +1,21 @@ +/* Copyright (C) 2008 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. */ + #include "config.h" #include "system.h" #include "coretypes.h" diff --git a/gcc/fortran/cpp.h b/gcc/fortran/cpp.h index e82b3cd1d43..6f409cc45ee 100644 --- a/gcc/fortran/cpp.h +++ b/gcc/fortran/cpp.h @@ -1,3 +1,21 @@ +/* Copyright (C) 2008 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. */ + #ifndef GFC_CPP_H #define GFC_CPP_H diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1f6c771fa30..072a5cb948f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,8 +1,13 @@ 2008-06-10 Uros Bizjak <ubizjak@gmail.com> + * gcc.target/i386/bt-mask-1.c: New test. + * gcc.target/i386/bt-mask-2.c: Ditto. + +2008-06-10 Uros Bizjak <ubizjak@gmail.com> + PR target/36473 - * testsuite/gcc.target/i386/bt-1.c: New test. - * testsuite/gcc.target/i386/bt-2.c: Ditto. + * gcc.target/i386/bt-1.c: New test. + * gcc.target/i386/bt-2.c: Ditto. 2008-06-09 Andy Hutchinson <hutchinsonandy@aim.com> diff --git a/gcc/testsuite/gcc.target/i386/bt-mask-1.c b/gcc/testsuite/gcc.target/i386/bt-mask-1.c new file mode 100644 index 00000000000..bdcfd558a1b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/bt-mask-1.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mtune=core2" } */ + +void foo (void); + +int test (int x, int n) +{ + n &= 0x1f; + + if (x & (0x01 << n)) + foo (); + + return 0; +} + +/* { dg-final { scan-assembler-not "and\[lq\]\[ \t\]" } } */ diff --git a/gcc/testsuite/gcc.target/i386/bt-mask-2.c b/gcc/testsuite/gcc.target/i386/bt-mask-2.c new file mode 100644 index 00000000000..babfc2bcd36 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/bt-mask-2.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mtune=core2" } */ + +void foo (void); + +int test (long x, long n) +{ + n &= 0x3f; + + if (x & ((long)0x01 << n)) + foo (); + + return 0; +} + +/* { dg-final { scan-assembler-not "and\[lq\]\[ \t\]" } } */ diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index 94d5a69f69c..45711ae3f12 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -853,6 +853,7 @@ extern void dump_points_to_info_for (FILE *, tree); extern void debug_points_to_info_for (tree); extern bool may_be_aliased (tree); extern struct ptr_info_def *get_ptr_info (tree); +extern bool may_point_to_global_var (tree); extern void new_type_alias (tree, tree, tree); extern void count_uses_and_derefs (tree, tree, unsigned *, unsigned *, unsigned *); diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index a9ca33b14d4..cb97db1326b 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -795,7 +795,8 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data) later */ static basic_block -copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, int count_scale) +copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, + gcov_type count_scale) { block_stmt_iterator bsi, copy_bsi; basic_block copy_basic_block; @@ -1108,7 +1109,7 @@ update_ssa_across_abnormal_edges (basic_block bb, basic_block ret_bb, accordingly. Edges will be taken care of later. Assume aux pointers to point to the copies of each BB. */ static void -copy_edges_for_bb (basic_block bb, int count_scale, basic_block ret_bb) +copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb) { basic_block new_bb = (basic_block) bb->aux; edge_iterator ei; @@ -1257,7 +1258,7 @@ initialize_cfun (tree new_fndecl, tree callee_fndecl, gcov_type count, struct function *new_cfun = (struct function *) ggc_alloc_cleared (sizeof (struct function)); struct function *src_cfun = DECL_STRUCT_FUNCTION (callee_fndecl); - int count_scale, frequency_scale; + gcov_type count_scale, frequency_scale; if (ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->count) count_scale = (REG_BR_PROB_BASE * count @@ -1321,7 +1322,7 @@ copy_cfg_body (copy_body_data * id, gcov_type count, int frequency, struct function *cfun_to_copy; basic_block bb; tree new_fndecl = NULL; - int count_scale, frequency_scale; + gcov_type count_scale, frequency_scale; int last; if (ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->count) diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 05c123c0e99..e89e73b9f59 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -2783,6 +2783,23 @@ may_alias_p (tree ptr, alias_set_type mem_alias_set, return true; } +/* Return true, if PTR may point to a global variable. */ + +bool +may_point_to_global_var (tree ptr) +{ + struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr); + + /* If we do not have points-to information for this variable, + we have to punt. */ + if (!pi + || !pi->name_mem_tag) + return true; + + /* The name memory tag is marked as global variable if the points-to + set contains a global variable. */ + return is_global_var (pi->name_mem_tag); +} /* Add ALIAS to the set of variables that may alias VAR. */ diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 8945a612663..ebf54e2070b 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -189,20 +189,7 @@ is_hidden_global_store (tree stmt) } else if (INDIRECT_REF_P (lhs)) - { - tree ptr = TREE_OPERAND (lhs, 0); - struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr); - tree nmt = (pi) ? pi->name_mem_tag : NULL_TREE; - tree smt = symbol_mem_tag (SSA_NAME_VAR (ptr)); - - /* If either the name tag or the symbol tag for PTR is a - global variable, then the store is necessary. */ - if ((nmt && is_global_var (nmt)) - || (smt && is_global_var (smt))) - { - return true; - } - } + return may_point_to_global_var (TREE_OPERAND (lhs, 0)); else gcc_unreachable (); } diff --git a/gcc/value-prof.c b/gcc/value-prof.c index f1330def688..38ed8b25fdf 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -610,7 +610,7 @@ tree_divmod_fixed_value_transform (tree stmt) enum tree_code code; gcov_type val, count, all; tree modify, op, op1, op2, result, value, tree_val; - int prob; + gcov_type prob; modify = stmt; if (TREE_CODE (stmt) == RETURN_EXPR @@ -651,7 +651,10 @@ tree_divmod_fixed_value_transform (tree stmt) return false; /* Compute probability of taking the optimal path. */ - prob = (count * REG_BR_PROB_BASE + all / 2) / all; + if (all > 0) + prob = (count * REG_BR_PROB_BASE + all / 2) / all; + else + prob = 0; tree_val = build_int_cst_wide (get_gcov_type (), (unsigned HOST_WIDE_INT) val, @@ -770,7 +773,7 @@ tree_mod_pow2_value_transform (tree stmt) enum tree_code code; gcov_type count, wrong_values, all; tree modify, op, op1, op2, result, value; - int prob; + gcov_type prob; modify = stmt; if (TREE_CODE (stmt) == RETURN_EXPR @@ -817,7 +820,10 @@ tree_mod_pow2_value_transform (tree stmt) if (check_counter (stmt, "pow2", all, bb_for_stmt (stmt)->count)) return false; - prob = (count * REG_BR_PROB_BASE + all / 2) / all; + if (all > 0) + prob = (count * REG_BR_PROB_BASE + all / 2) / all; + else + prob = 0; result = tree_mod_pow2 (stmt, op, op1, op2, prob, count, all); @@ -949,7 +955,7 @@ tree_mod_subtract_transform (tree stmt) enum tree_code code; gcov_type count, wrong_values, all; tree modify, op, op1, op2, result, value; - int prob1, prob2; + gcov_type prob1, prob2; unsigned int i, steps; gcov_type count1, count2; @@ -1016,8 +1022,15 @@ tree_mod_subtract_transform (tree stmt) } /* Compute probability of taking the optimal path(s). */ - prob1 = (count1 * REG_BR_PROB_BASE + all / 2) / all; - prob2 = (count2 * REG_BR_PROB_BASE + all / 2) / all; + if (all > 0) + { + prob1 = (count1 * REG_BR_PROB_BASE + all / 2) / all; + prob2 = (count2 * REG_BR_PROB_BASE + all / 2) / all; + } + else + { + prob1 = prob2 = 0; + } /* In practice, "steps" is always 2. This interface reflects this, and will need to be changed if "steps" can change. */ @@ -1174,7 +1187,7 @@ tree_ic_transform (tree stmt) { histogram_value histogram; gcov_type val, count, all; - int prob; + gcov_type prob; tree call, callee, modify; struct cgraph_node *direct_call; @@ -1200,7 +1213,10 @@ tree_ic_transform (tree stmt) if (4 * count <= 3 * all) return false; - prob = (count * REG_BR_PROB_BASE + all / 2) / all; + if (all > 0) + prob = (count * REG_BR_PROB_BASE + all / 2) / all; + else + prob = 0; direct_call = find_func_by_pid ((int)val); if (direct_call == NULL) @@ -1365,7 +1381,7 @@ tree_stringops_transform (block_stmt_iterator *bsi) tree value; tree dest, src; unsigned int dest_align, src_align; - int prob; + gcov_type prob; tree tree_val; if (!call) @@ -1399,7 +1415,10 @@ tree_stringops_transform (block_stmt_iterator *bsi) return false; if (check_counter (stmt, "value", all, bb_for_stmt (stmt)->count)) return false; - prob = (count * REG_BR_PROB_BASE + all / 2) / all; + if (all > 0) + prob = (count * REG_BR_PROB_BASE + all / 2) / all; + else + prob = 0; dest = CALL_EXPR_ARG (call, 0); dest_align = get_pointer_alignment (dest, BIGGEST_ALIGNMENT); switch (fcode) @@ -1727,4 +1746,3 @@ value_profile_transformations (void) return (value_prof_hooks->value_profile_transformations) (); } - diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog index 91c4f08dcaa..153b6772f11 100644 --- a/libdecnumber/ChangeLog +++ b/libdecnumber/ChangeLog @@ -1,3 +1,16 @@ +2008-06-10 Joseph Myers <joseph@codesourcery.com> + + * dconfig.h: New. + * decContext.c, decExcept.c, decExcept.h, decLibrary.c, + decNumber.c, decNumberLocal.h, decRound.c, dpd/decimal128.c, + dpd/decimal32.c, dpd/decimal64.c: Include dconfig.h not config.h. + * dpd/decimal128Local.h (decimal128SetSign, decimal128ClearSign, + decimal128FlipSign): Use WORDS_BIGENDIAN not + FLOAT_WORDS_BIG_ENDIAN. + * bid/host-ieee128.c: Include dconfig.h. + (__host_to_ieee_128, __ieee_to_host_128): Swap 64-bit halves of + value if WORDS_BIGENDIAN. + 2008-04-18 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35457 diff --git a/libdecnumber/bid/host-ieee128.c b/libdecnumber/bid/host-ieee128.c index 6d493e5c9d8..12632c8aab2 100644 --- a/libdecnumber/bid/host-ieee128.c +++ b/libdecnumber/bid/host-ieee128.c @@ -29,20 +29,35 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #include <string.h> +#include "dconfig.h" #include "bid-dpd.h" #include "decimal128.h" void __host_to_ieee_128 (_Decimal128 in, decimal128 *out); void __ieee_to_host_128 (decimal128 in, _Decimal128 *out); +/* The code for converting 128-bit values between DPD and BID presumes + that the 64-bit halves of the 128-bit value are in little-endian + order, so they need swapping on big-endian hosts. */ + void __host_to_ieee_128 (_Decimal128 in, decimal128 *out) { +#if WORDS_BIGENDIAN + memcpy ((char *) out, (char *) &in + 8, 8); + memcpy ((char *) out + 8, (char *) &in, 8); +#else memcpy ((char *) out, (char *) &in, 16); +#endif } void __ieee_to_host_128 (decimal128 in, _Decimal128 *out) { +#if WORDS_BIGENDIAN + memcpy ((char *) out, (char *) &in + 8, 8); + memcpy ((char *) out + 8, (char *) &in, 8); +#else memcpy ((char *) out, (char *) &in, 16); +#endif } diff --git a/libdecnumber/dconfig.h b/libdecnumber/dconfig.h new file mode 100644 index 00000000000..ffbad255ce5 --- /dev/null +++ b/libdecnumber/dconfig.h @@ -0,0 +1,52 @@ +/* Configure decNumber for either host or target. + Copyright (C) 2008 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + In addition to the permissions in the GNU General Public License, + the Free Software Foundation gives you unlimited permission to link + the compiled version of this file into combinations with other + programs, and to distribute those combinations without any + restriction coming from the use of this file. (The General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into a combine executable.) + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifdef IN_LIBGCC2 + +#include "tconfig.h" +#include "coretypes.h" +#include "tm.h" + +#ifndef LIBGCC2_WORDS_BIG_ENDIAN +#define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN +#endif + +#ifndef LIBGCC2_FLOAT_WORDS_BIG_ENDIAN +#define LIBGCC2_FLOAT_WORDS_BIG_ENDIAN LIBGCC2_WORDS_BIG_ENDIAN +#endif + +#if LIBGCC2_FLOAT_WORDS_BIG_ENDIAN +#define WORDS_BIGENDIAN 1 +#endif + +#else + +#include "config.h" + +#endif diff --git a/libdecnumber/decContext.c b/libdecnumber/decContext.c index 07741931819..d2e3bed4397 100644 --- a/libdecnumber/decContext.c +++ b/libdecnumber/decContext.c @@ -37,7 +37,7 @@ #include <string.h> /* for strcmp */ #include <stdio.h> /* for printf if DECCHECK */ -#include "config.h" /* for GCC definitions */ +#include "dconfig.h" /* for GCC definitions */ #include "decContext.h" /* context and base types */ #include "decNumberLocal.h" /* decNumber local types, etc. */ diff --git a/libdecnumber/decExcept.c b/libdecnumber/decExcept.c index 68217024206..a111aeeb416 100644 --- a/libdecnumber/decExcept.c +++ b/libdecnumber/decExcept.c @@ -28,7 +28,7 @@ 02110-1301, USA. */ #include <fenv.h> -#include "config.h" +#include "dconfig.h" #include "decContext.h" #include "decExcept.h" diff --git a/libdecnumber/decExcept.h b/libdecnumber/decExcept.h index 12ba87d01fb..5dc1ebb1d16 100644 --- a/libdecnumber/decExcept.h +++ b/libdecnumber/decExcept.h @@ -28,7 +28,7 @@ 02110-1301, USA. */ #include <fenv.h> -#include "config.h" +#include "dconfig.h" #include "decContext.h" #define DFP_EXCEPTIONS_ENABLED 1 diff --git a/libdecnumber/decLibrary.c b/libdecnumber/decLibrary.c index 7e5e928edc2..86daedd89e6 100644 --- a/libdecnumber/decLibrary.c +++ b/libdecnumber/decLibrary.c @@ -27,7 +27,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "config.h" +#include "dconfig.h" #include "decContext.h" #include "decimal128.h" #include "decimal64.h" diff --git a/libdecnumber/decNumber.c b/libdecnumber/decNumber.c index c5e223c812f..f9a624a1afa 100644 --- a/libdecnumber/decNumber.c +++ b/libdecnumber/decNumber.c @@ -170,7 +170,7 @@ #include <stdio.h> /* for printf [if needed] */ #include <string.h> /* for strcpy */ #include <ctype.h> /* for lower */ -#include "config.h" /* for GCC definitions */ +#include "dconfig.h" /* for GCC definitions */ #include "decNumber.h" /* base number library */ #include "decNumberLocal.h" /* decNumber local types, etc. */ diff --git a/libdecnumber/decNumberLocal.h b/libdecnumber/decNumberLocal.h index c07e8cd6ef4..809eaa466a2 100644 --- a/libdecnumber/decNumberLocal.h +++ b/libdecnumber/decNumberLocal.h @@ -44,7 +44,7 @@ #include <stdlib.h> /* for abs */ #include <string.h> /* for memset, strcpy */ - #include "config.h" /* for WORDS_BIGENDIAN */ + #include "dconfig.h" /* for WORDS_BIGENDIAN */ /* Conditional code flag -- set this to match hardware platform */ /* 1=little-endian, 0=big-endian */ diff --git a/libdecnumber/decRound.c b/libdecnumber/decRound.c index 6e51eb6b5ba..26740bf69c2 100644 --- a/libdecnumber/decRound.c +++ b/libdecnumber/decRound.c @@ -28,7 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "config.h" +#include "dconfig.h" #include "decContext.h" #include "decRound.h" diff --git a/libdecnumber/dpd/decimal128.c b/libdecnumber/dpd/decimal128.c index 0e32ceb181c..54191aab5c0 100644 --- a/libdecnumber/dpd/decimal128.c +++ b/libdecnumber/dpd/decimal128.c @@ -42,7 +42,7 @@ #include <string.h> /* [for memset/memcpy] */ #include <stdio.h> /* [for printf] */ -#include "config.h" /* GCC definitions */ +#include "dconfig.h" /* GCC definitions */ #define DECNUMDIGITS 34 /* make decNumbers with space for 34 */ #include "decNumber.h" /* base number library */ #include "decNumberLocal.h" /* decNumber local types, etc. */ diff --git a/libdecnumber/dpd/decimal128Local.h b/libdecnumber/dpd/decimal128Local.h index b4130b53425..97654277193 100644 --- a/libdecnumber/dpd/decimal128Local.h +++ b/libdecnumber/dpd/decimal128Local.h @@ -34,14 +34,14 @@ /* Set sign; this assumes the sign was previously zero. */ #define decimal128SetSign(d,b) \ - { (d)->bytes[FLOAT_WORDS_BIG_ENDIAN ? 0 : 15] |= ((unsigned) (b) << 7); } + { (d)->bytes[WORDS_BIGENDIAN ? 0 : 15] |= ((unsigned) (b) << 7); } /* Clear sign. */ #define decimal128ClearSign(d) \ - { (d)->bytes[FLOAT_WORDS_BIG_ENDIAN ? 0 : 15] &= ~0x80; } + { (d)->bytes[WORDS_BIGENDIAN ? 0 : 15] &= ~0x80; } /* Flip sign. */ #define decimal128FlipSign(d) \ - { (d)->bytes[FLOAT_WORDS_BIG_ENDIAN ? 0 : 15] ^= 0x80; } + { (d)->bytes[WORDS_BIGENDIAN ? 0 : 15] ^= 0x80; } #endif diff --git a/libdecnumber/dpd/decimal32.c b/libdecnumber/dpd/decimal32.c index 42bddf172af..d8e3f597811 100644 --- a/libdecnumber/dpd/decimal32.c +++ b/libdecnumber/dpd/decimal32.c @@ -42,7 +42,7 @@ #include <string.h> /* [for memset/memcpy] */ #include <stdio.h> /* [for printf] */ -#include "config.h" /* GCC definitions */ +#include "dconfig.h" /* GCC definitions */ #define DECNUMDIGITS 7 /* make decNumbers with space for 7 */ #include "decNumber.h" /* base number library */ #include "decNumberLocal.h" /* decNumber local types, etc. */ diff --git a/libdecnumber/dpd/decimal64.c b/libdecnumber/dpd/decimal64.c index c3617c46c08..474eb7cf8a0 100644 --- a/libdecnumber/dpd/decimal64.c +++ b/libdecnumber/dpd/decimal64.c @@ -42,7 +42,7 @@ #include <string.h> /* [for memset/memcpy] */ #include <stdio.h> /* [for printf] */ -#include "config.h" /* GCC definitions */ +#include "dconfig.h" /* GCC definitions */ #define DECNUMDIGITS 16 /* make decNumbers with space for 16 */ #include "decNumber.h" /* base number library */ #include "decNumberLocal.h" /* decNumber local types, etc. */ diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 93c9b799682..9ae7ff58af3 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,13 @@ +2008-06-11 Bernhard Fischer <aldot@gcc.gnu.org> + + * configure: Regenerate. + +2008-06-10 Joseph Myers <joseph@codesourcery.com> + + * Makefile.in (DECNUMINC): Remove + -I$(MULTIBUILDTOP)../../libdecnumber. + * gstdint.h: New. + 2008-06-07 Joseph Myers <joseph@codesourcery.com> * config.host (strongarm*-*-*, ep9312*-*-*, xscale-*-*, diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 3acf2e856a4..94b6440f011 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -191,8 +191,7 @@ ifeq ($(enable_decimal_float),bid) DECNUMINC = -I$(srcdir)/config/libbid -DENABLE_DECIMAL_BID_FORMAT else DECNUMINC = -I$(srcdir)/../libdecnumber/$(enable_decimal_float) \ - -I$(srcdir)/../libdecnumber \ - -I$(MULTIBUILDTOP)../../libdecnumber + -I$(srcdir)/../libdecnumber endif else DECNUMINC = diff --git a/libgcc/configure b/libgcc/configure index 5d71457738c..b6035790bed 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -3431,8 +3431,8 @@ else enable_tls=yes fi; - echo "$as_me:$LINENO: checking whether the target asssembler upports thread-local storage" >&5 -echo $ECHO_N "checking whether the target asssembler upports thread-local storage... $ECHO_C" >&6 + echo "$as_me:$LINENO: checking whether the target assembler supports thread-local storage" >&5 +echo $ECHO_N "checking whether the target assembler supports thread-local storage... $ECHO_C" >&6 if test "${gcc_cv_have_cc_tls+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else diff --git a/libgcc/gstdint.h b/libgcc/gstdint.h new file mode 100644 index 00000000000..4d61c318440 --- /dev/null +++ b/libgcc/gstdint.h @@ -0,0 +1,6 @@ +/* This header is only for use of libdecnumber built as part of + libgcc. The targets supported for decimal floating point have + <stdint.h>; libdecnumber uses GCC_HEADER_STDINT only for the sake + of the host. */ + +#include <stdint.h> diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 92b999fd3c3..5a1cac157be 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,16 @@ +2008-06-11 Jakub Jelinek <jakub@redhat.com> + + PR libgomp/36471 + * omp_lib.f90.in (omp_get_ancestor_thread_num_8, + omp_get_team_size_8): Fix pastos. + + PR libgomp/36469 + * configure.ac: Add AC_CHECK_FUNCS (strtoull). + * configure: Regenerated. + * config.h.in: Regenerated. + * env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not + defined. + 2008-06-06 Andreas Tobler <a.tobler@schweiz.org> PR bootstrap/36452 diff --git a/libgomp/config.h.in b/libgomp/config.h.in index 88a616ca1ed..5f0dcc7570b 100644 --- a/libgomp/config.h.in +++ b/libgomp/config.h.in @@ -48,6 +48,9 @@ /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strtoull' function. */ +#undef HAVE_STRTOULL + /* Define to 1 if the target supports __sync_*_compare_and_swap */ #undef HAVE_SYNC_BUILTINS diff --git a/libgomp/configure b/libgomp/configure index f22c8a06c31..038aef5ef36 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -16624,7 +16624,8 @@ rm -f conftest.err conftest.$ac_objext \ # Check for functions needed. -for ac_func in getloadavg clock_gettime + +for ac_func in getloadavg clock_gettime strtoull do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/libgomp/configure.ac b/libgomp/configure.ac index 12c92340e8c..21aed2ba819 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -178,7 +178,7 @@ AC_LINK_IFELSE( [AC_MSG_ERROR([Pthreads are required to build libgomp])])]) # Check for functions needed. -AC_CHECK_FUNCS(getloadavg clock_gettime) +AC_CHECK_FUNCS(getloadavg clock_gettime strtoull) # Check for broken semaphore implementation on darwin. # sem_init returns: sem_init error: Function not implemented. diff --git a/libgomp/env.c b/libgomp/env.c index 022fb1bb0ad..50872c277fe 100644 --- a/libgomp/env.c +++ b/libgomp/env.c @@ -47,6 +47,9 @@ #include <limits.h> #include <errno.h> +#ifndef HAVE_STRTOULL +# define strtoull(ptr, eptr, base) strtoul (ptr, eptr, base) +#endif struct gomp_task_icv gomp_global_icv = { .nthreads_var = 1, diff --git a/libgomp/omp_lib.f90.in b/libgomp/omp_lib.f90.in index a31a94567ea..c61b93f8145 100644 --- a/libgomp/omp_lib.f90.in +++ b/libgomp/omp_lib.f90.in @@ -268,7 +268,7 @@ function omp_get_ancestor_thread_num_8 (level) use omp_lib_kinds integer (8), intent (in) :: level - integer (omp_integer_kind) :: omp_get_ancestor_thread_num + integer (omp_integer_kind) :: omp_get_ancestor_thread_num_8 end function omp_get_ancestor_thread_num_8 end interface @@ -281,7 +281,7 @@ function omp_get_team_size_8 (level) use omp_lib_kinds integer (8), intent (in) :: level - integer (omp_integer_kind) :: omp_get_team_size + integer (omp_integer_kind) :: omp_get_team_size_8 end function omp_get_team_size_8 end interface |