diff options
author | kan <kan@FreeBSD.org> | 2007-08-14 02:45:23 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2007-08-14 02:45:23 +0000 |
commit | d2ff90cc580c62afb8528917c1c80ac49d9aaa01 (patch) | |
tree | 7b2fa7d3de8706d9ca72fdb284ce2a57f67d460a /contrib/gcc/config | |
parent | 8a2681fa7ee14c49235e12318f7de5a9a7f492ea (diff) | |
download | FreeBSD-src-d2ff90cc580c62afb8528917c1c80ac49d9aaa01.zip FreeBSD-src-d2ff90cc580c62afb8528917c1c80ac49d9aaa01.tar.gz |
GCC 4.2.1 release.
Diffstat (limited to 'contrib/gcc/config')
-rw-r--r-- | contrib/gcc/config/arm/arm.c | 2 | ||||
-rw-r--r-- | contrib/gcc/config/arm/cirrus.md | 22 | ||||
-rw-r--r-- | contrib/gcc/config/i386/i386.c | 23 | ||||
-rw-r--r-- | contrib/gcc/config/i386/i386.h | 3 | ||||
-rw-r--r-- | contrib/gcc/config/i386/i386.md | 18 | ||||
-rw-r--r-- | contrib/gcc/config/i386/sse.md | 7 | ||||
-rw-r--r-- | contrib/gcc/config/mips/iris6.h | 7 | ||||
-rw-r--r-- | contrib/gcc/config/rs6000/predicates.md | 4 | ||||
-rw-r--r-- | contrib/gcc/config/rs6000/rs6000.c | 3 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/double.h | 14 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/extended.h | 54 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/floatundidf.c | 5 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/floatundisf.c | 5 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/floatunsidf.c | 5 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/floatunsisf.c | 5 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/op-2.h | 4 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/op-4.h | 4 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/op-common.h | 40 | ||||
-rw-r--r-- | contrib/gcc/config/soft-fp/quad.h | 18 | ||||
-rw-r--r-- | contrib/gcc/config/sparc/sparc.c | 28 |
20 files changed, 136 insertions, 135 deletions
diff --git a/contrib/gcc/config/arm/arm.c b/contrib/gcc/config/arm/arm.c index dc7aa77..670e791 100644 --- a/contrib/gcc/config/arm/arm.c +++ b/contrib/gcc/config/arm/arm.c @@ -10555,6 +10555,7 @@ arm_get_frame_offsets (void) if (leaf && frame_size == 0) { offsets->outgoing_args = offsets->soft_frame; + offsets->locals_base = offsets->soft_frame; return offsets; } @@ -13874,6 +13875,7 @@ thumb_expand_epilogue (void) amount = offsets->locals_base - offsets->saved_regs; } + gcc_assert (amount >= 0); if (amount) { if (amount < 512) diff --git a/contrib/gcc/config/arm/cirrus.md b/contrib/gcc/config/arm/cirrus.md index b857cbb..0521989 100644 --- a/contrib/gcc/config/arm/cirrus.md +++ b/contrib/gcc/config/arm/cirrus.md @@ -404,28 +404,6 @@ ;; Cirrus SI values have been outlawed. Look in arm.h for the comment ;; on HARD_REGNO_MODE_OK. -(define_insn "*cirrus_arm_movsi_insn" - [(set (match_operand:SI 0 "general_operand" "=r,r,r,m,*v,r,*v,T,*v") - (match_operand:SI 1 "general_operand" "rI,K,mi,r,r,*v,T,*v,*v"))] - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0 - && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "@ - mov%?\\t%0, %1 - mvn%?\\t%0, #%B1 - ldr%?\\t%0, %1 - str%?\\t%1, %0 - cfmv64lr%?\\t%Z0, %1 - cfmvr64l%?\\t%0, %Z1 - cfldr32%?\\t%V0, %1 - cfstr32%?\\t%V1, %0 - cfsh32%?\\t%V0, %V1, #0" - [(set_attr "type" "*, *, load1,store1, *, *, load1,store1, *") - (set_attr "pool_range" "*, *, 4096, *, *, *, 1024, *, *") - (set_attr "neg_pool_range" "*, *, 4084, *, *, *, 1012, *, *") - (set_attr "cirrus" "not,not, not, not,move,normal,normal,normal,normal")] -) - (define_insn "*cirrus_movsf_hard_insn" [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m") (match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))] diff --git a/contrib/gcc/config/i386/i386.c b/contrib/gcc/config/i386/i386.c index 29afed7..729dd40 100644 --- a/contrib/gcc/config/i386/i386.c +++ b/contrib/gcc/config/i386/i386.c @@ -13478,6 +13478,9 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n) gcc_assert (n < MAX_386_STACK_LOCALS); + /* Virtual slot is valid only before vregs are instantiated. */ + gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated); + for (s = ix86_stack_locals; s; s = s->next) if (s->mode == mode && s->n == n) return s->rtl; @@ -14567,6 +14570,7 @@ enum ix86_builtins IX86_BUILTIN_VEC_EXT_V4SF, IX86_BUILTIN_VEC_EXT_V4SI, IX86_BUILTIN_VEC_EXT_V8HI, + IX86_BUILTIN_VEC_EXT_V16QI, IX86_BUILTIN_VEC_EXT_V2SI, IX86_BUILTIN_VEC_EXT_V4HI, IX86_BUILTIN_VEC_SET_V8HI, @@ -15539,13 +15543,13 @@ ix86_init_mmx_sse_builtins (void) /* Access to the vec_extract patterns. */ ftype = build_function_type_list (double_type_node, V2DF_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2df", ftype, IX86_BUILTIN_VEC_EXT_V2DF); ftype = build_function_type_list (long_long_integer_type_node, V2DI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2di", ftype, IX86_BUILTIN_VEC_EXT_V2DI); ftype = build_function_type_list (float_type_node, V4SF_type_node, @@ -15555,12 +15559,12 @@ ix86_init_mmx_sse_builtins (void) ftype = build_function_type_list (intSI_type_node, V4SI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v4si", ftype, IX86_BUILTIN_VEC_EXT_V4SI); ftype = build_function_type_list (intHI_type_node, V8HI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v8hi", ftype, IX86_BUILTIN_VEC_EXT_V8HI); ftype = build_function_type_list (intHI_type_node, V4HI_type_node, @@ -15573,11 +15577,15 @@ ix86_init_mmx_sse_builtins (void) def_builtin (MASK_MMX, "__builtin_ia32_vec_ext_v2si", ftype, IX86_BUILTIN_VEC_EXT_V2SI); + ftype = build_function_type_list (intQI_type_node, V16QI_type_node, + integer_type_node, NULL_TREE); + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v16qi", ftype, IX86_BUILTIN_VEC_EXT_V16QI); + /* Access to the vec_set patterns. */ ftype = build_function_type_list (V8HI_type_node, V8HI_type_node, intHI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_set_v8hi", ftype, IX86_BUILTIN_VEC_SET_V8HI); ftype = build_function_type_list (V4HI_type_node, V4HI_type_node, @@ -16121,13 +16129,13 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, case IX86_BUILTIN_LDMXCSR: op0 = expand_normal (TREE_VALUE (arglist)); - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_move_insn (target, op0); emit_insn (gen_sse_ldmxcsr (target)); return 0; case IX86_BUILTIN_STMXCSR: - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_insn (gen_sse_stmxcsr (target)); return copy_to_mode_reg (SImode, target); @@ -16489,6 +16497,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, case IX86_BUILTIN_VEC_EXT_V4SF: case IX86_BUILTIN_VEC_EXT_V4SI: case IX86_BUILTIN_VEC_EXT_V8HI: + case IX86_BUILTIN_VEC_EXT_V16QI: case IX86_BUILTIN_VEC_EXT_V2SI: case IX86_BUILTIN_VEC_EXT_V4HI: return ix86_expand_vec_ext_builtin (arglist, target); diff --git a/contrib/gcc/config/i386/i386.h b/contrib/gcc/config/i386/i386.h index ba732dc..1adb1a5 100644 --- a/contrib/gcc/config/i386/i386.h +++ b/contrib/gcc/config/i386/i386.h @@ -2164,7 +2164,8 @@ enum ix86_entity enum ix86_stack_slot { - SLOT_TEMP = 0, + SLOT_VIRTUAL = 0, + SLOT_TEMP, SLOT_CW_STORED, SLOT_CW_TRUNC, SLOT_CW_FLOOR, diff --git a/contrib/gcc/config/i386/i386.md b/contrib/gcc/config/i386/i386.md index d24b32a..f7481ed 100644 --- a/contrib/gcc/config/i386/i386.md +++ b/contrib/gcc/config/i386/i386.md @@ -3716,7 +3716,7 @@ ; else { - rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP); + rtx temp = assign_386_stack_local (SFmode, SLOT_VIRTUAL); emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp)); DONE; } @@ -3868,7 +3868,7 @@ DONE; } else - operands[2] = assign_386_stack_local (SFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (SFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfsf2_mixed" @@ -3966,7 +3966,7 @@ DONE; } else - operands[2] = assign_386_stack_local (DFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (DFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfdf2_mixed" @@ -4749,7 +4749,7 @@ (define_insn "*addti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "%0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (PLUS, TImode, operands)" "#") @@ -4757,7 +4757,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (unspec:CC [(match_dup 1) (match_dup 2)] @@ -6483,7 +6483,7 @@ (define_insn "*subti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (MINUS, TImode, operands)" "#") @@ -6491,7 +6491,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (match_dup 2))) @@ -9326,7 +9326,7 @@ (define_insn "*negti2_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=ro") - (neg:TI (match_operand:TI 1 "general_operand" "0"))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" "0"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_unary_operator_ok (NEG, TImode, operands)" @@ -9334,7 +9334,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") - (neg:TI (match_operand:TI 1 "general_operand" ""))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel diff --git a/contrib/gcc/config/i386/sse.md b/contrib/gcc/config/i386/sse.md index 96361e0..15817fc 100644 --- a/contrib/gcc/config/i386/sse.md +++ b/contrib/gcc/config/i386/sse.md @@ -2055,11 +2055,11 @@ (match_dup 1)) (parallel [(const_int 0) (const_int 2)])))] - "TARGET_SSE3 && !(MEM_P (operands[1]) && MEM_P (operands[2]))" + "TARGET_SSE3 && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ movddup\t{%1, %0|%0, %1} #" - [(set_attr "type" "sselog,ssemov") + [(set_attr "type" "sselog1,ssemov") (set_attr "mode" "V2DF")]) (define_split @@ -3494,9 +3494,10 @@ "TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ movhps\t{%1, %0|%0, %1} - psrldq\t{$4, %0|%0, 4} + psrldq\t{$8, %0|%0, 8} movq\t{%H1, %0|%0, %H1}" [(set_attr "type" "ssemov,sseishft,ssemov") + (set_attr "memory" "*,none,*") (set_attr "mode" "V2SF,TI,TI")]) ;; Not sure this is ever used, but it doesn't hurt to have it. -aoliva diff --git a/contrib/gcc/config/mips/iris6.h b/contrib/gcc/config/mips/iris6.h index 8686b14..87d9a21 100644 --- a/contrib/gcc/config/mips/iris6.h +++ b/contrib/gcc/config/mips/iris6.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. IRIX version 6. Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, - 2005, 2006 + 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GCC. @@ -96,10 +96,11 @@ Boston, MA 02110-1301, USA. */ " %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \ SUBTARGET_WARN_UNUSED_SPEC "}" -/* Avoid getting two warnings for libgcc.a everytime we link. */ +/* Avoid getting two warnings for libgcc.a everytime we link. libgcc.a + contains references to copysignl, so link with libm to resolve them. */ #undef LIBGCC_SPEC #define LIBGCC_SPEC \ - SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc " SUBTARGET_WARN_UNUSED_SPEC + SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc -lm " SUBTARGET_WARN_UNUSED_SPEC #undef ENDFILE_SPEC #define ENDFILE_SPEC \ diff --git a/contrib/gcc/config/rs6000/predicates.md b/contrib/gcc/config/rs6000/predicates.md index 6aefe2d..65231e1 100644 --- a/contrib/gcc/config/rs6000/predicates.md +++ b/contrib/gcc/config/rs6000/predicates.md @@ -694,7 +694,9 @@ (define_predicate "current_file_function_operand" (and (match_code "symbol_ref") (match_test "(DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op)) - && (SYMBOL_REF_LOCAL_P (op) + && ((SYMBOL_REF_LOCAL_P (op) + && (DEFAULT_ABI != ABI_AIX + || !SYMBOL_REF_EXTERNAL_P (op))) || (op == XEXP (DECL_RTL (current_function_decl), 0)))"))) diff --git a/contrib/gcc/config/rs6000/rs6000.c b/contrib/gcc/config/rs6000/rs6000.c index 5e9d0fe..6670a20 100644 --- a/contrib/gcc/config/rs6000/rs6000.c +++ b/contrib/gcc/config/rs6000/rs6000.c @@ -13515,7 +13515,8 @@ rs6000_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) } } if (DEFAULT_ABI == ABI_DARWIN - || (*targetm.binds_local_p) (decl)) + || ((*targetm.binds_local_p) (decl) + && (DEFAULT_ABI != ABI_AIX || !DECL_EXTERNAL (decl)))) { tree attr_list = TYPE_ATTRIBUTES (TREE_TYPE (decl)); diff --git a/contrib/gcc/config/soft-fp/double.h b/contrib/gcc/config/soft-fp/double.h index c8f4420..b012d9d 100644 --- a/contrib/gcc/config/soft-fp/double.h +++ b/contrib/gcc/config/soft-fp/double.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Double Precision - Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -168,13 +168,13 @@ union _FP_UNION_D DFtype flt; struct { #if __BYTE_ORDER == __BIG_ENDIAN - unsigned sign : 1; - unsigned exp : _FP_EXPBITS_D; - unsigned long frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0); + unsigned sign : 1; + unsigned exp : _FP_EXPBITS_D; + _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0); #else - unsigned long frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0); - unsigned exp : _FP_EXPBITS_D; - unsigned sign : 1; + _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0); + unsigned exp : _FP_EXPBITS_D; + unsigned sign : 1; #endif } bits __attribute__((packed)); }; diff --git a/contrib/gcc/config/soft-fp/extended.h b/contrib/gcc/config/soft-fp/extended.h index bbf3942..e5f16de 100644 --- a/contrib/gcc/config/soft-fp/extended.h +++ b/contrib/gcc/config/soft-fp/extended.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Extended Precision. - Copyright (C) 1999,2006 Free Software Foundation, Inc. + Copyright (C) 1999,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek (jj@ultra.linux.cz). @@ -94,12 +94,6 @@ union _FP_UNION_E X##_f[1] = _flo.bits.frac1; \ X##_e = _flo.bits.exp; \ X##_s = _flo.bits.sign; \ - if (!X##_e && (X##_f[1] || X##_f[0]) \ - && !(X##_f[1] & _FP_IMPLBIT_E)) \ - { \ - X##_e++; \ - FP_SET_EXCEPTION(FP_EX_DENORM); \ - } \ } while (0) #define FP_UNPACK_RAW_EP(X, val) \ @@ -112,12 +106,6 @@ union _FP_UNION_E X##_f[1] = _flo->bits.frac1; \ X##_e = _flo->bits.exp; \ X##_s = _flo->bits.sign; \ - if (!X##_e && (X##_f[1] || X##_f[0]) \ - && !(X##_f[1] & _FP_IMPLBIT_E)) \ - { \ - X##_e++; \ - FP_SET_EXCEPTION(FP_EX_DENORM); \ - } \ } while (0) #define FP_PACK_RAW_E(val, X) \ @@ -164,13 +152,13 @@ union _FP_UNION_E #define FP_UNPACK_SEMIRAW_E(X,val) \ do { \ - _FP_UNPACK_RAW_E(X,val); \ + FP_UNPACK_RAW_E(X,val); \ _FP_UNPACK_SEMIRAW(E,4,X); \ } while (0) #define FP_UNPACK_SEMIRAW_EP(X,val) \ do { \ - _FP_UNPACK_RAW_EP(X,val); \ + FP_UNPACK_RAW_EP(X,val); \ _FP_UNPACK_SEMIRAW(E,4,X); \ } while (0) @@ -189,13 +177,13 @@ union _FP_UNION_E #define FP_PACK_SEMIRAW_E(val,X) \ do { \ _FP_PACK_SEMIRAW(E,4,X); \ - _FP_PACK_RAW_E(val,X); \ + FP_PACK_RAW_E(val,X); \ } while (0) #define FP_PACK_SEMIRAW_EP(val,X) \ do { \ _FP_PACK_SEMIRAW(E,4,X); \ - _FP_PACK_RAW_EP(val,X); \ + FP_PACK_RAW_EP(val,X); \ } while (0) #define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,4,X) @@ -277,14 +265,14 @@ union _FP_UNION_E XFtype flt; struct { #if __BYTE_ORDER == __BIG_ENDIAN - unsigned long pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E); - unsigned sign : 1; - unsigned exp : _FP_EXPBITS_E; - unsigned long frac : _FP_W_TYPE_SIZE; + _FP_W_TYPE pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E); + unsigned sign : 1; + unsigned exp : _FP_EXPBITS_E; + _FP_W_TYPE frac : _FP_W_TYPE_SIZE; #else - unsigned long frac : _FP_W_TYPE_SIZE; - unsigned exp : _FP_EXPBITS_E; - unsigned sign : 1; + _FP_W_TYPE frac : _FP_W_TYPE_SIZE; + unsigned exp : _FP_EXPBITS_E; + unsigned sign : 1; #endif } bits; }; @@ -299,11 +287,6 @@ union _FP_UNION_E X##_f1 = 0; \ X##_e = _flo.bits.exp; \ X##_s = _flo.bits.sign; \ - if (!X##_e && X##_f0 && !(X##_f0 & _FP_IMPLBIT_E)) \ - { \ - X##_e++; \ - FP_SET_EXCEPTION(FP_EX_DENORM); \ - } \ } while (0) #define FP_UNPACK_RAW_EP(X, val) \ @@ -315,11 +298,6 @@ union _FP_UNION_E X##_f1 = 0; \ X##_e = _flo->bits.exp; \ X##_s = _flo->bits.sign; \ - if (!X##_e && X##_f0 && !(X##_f0 & _FP_IMPLBIT_E)) \ - { \ - X##_e++; \ - FP_SET_EXCEPTION(FP_EX_DENORM); \ - } \ } while (0) #define FP_PACK_RAW_E(val, X) \ @@ -365,13 +343,13 @@ union _FP_UNION_E #define FP_UNPACK_SEMIRAW_E(X,val) \ do { \ - _FP_UNPACK_RAW_E(X,val); \ + FP_UNPACK_RAW_E(X,val); \ _FP_UNPACK_SEMIRAW(E,2,X); \ } while (0) #define FP_UNPACK_SEMIRAW_EP(X,val) \ do { \ - _FP_UNPACK_RAW_EP(X,val); \ + FP_UNPACK_RAW_EP(X,val); \ _FP_UNPACK_SEMIRAW(E,2,X); \ } while (0) @@ -390,13 +368,13 @@ union _FP_UNION_E #define FP_PACK_SEMIRAW_E(val,X) \ do { \ _FP_PACK_SEMIRAW(E,2,X); \ - _FP_PACK_RAW_E(val,X); \ + FP_PACK_RAW_E(val,X); \ } while (0) #define FP_PACK_SEMIRAW_EP(val,X) \ do { \ _FP_PACK_SEMIRAW(E,2,X); \ - _FP_PACK_RAW_EP(val,X); \ + FP_PACK_RAW_EP(val,X); \ } while (0) #define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,2,X) diff --git a/contrib/gcc/config/soft-fp/floatundidf.c b/contrib/gcc/config/soft-fp/floatundidf.c index 2169a3f..af8e4a5 100644 --- a/contrib/gcc/config/soft-fp/floatundidf.c +++ b/contrib/gcc/config/soft-fp/floatundidf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 64bit unsigned integer to IEEE double - Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -32,8 +32,7 @@ #include "soft-fp.h" #include "double.h" -double -__floatundidf(UDItype i) +DFtype __floatundidf(UDItype i) { FP_DECL_EX; FP_DECL_D(A); diff --git a/contrib/gcc/config/soft-fp/floatundisf.c b/contrib/gcc/config/soft-fp/floatundisf.c index 5f08764..977f7df 100644 --- a/contrib/gcc/config/soft-fp/floatundisf.c +++ b/contrib/gcc/config/soft-fp/floatundisf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 64bit unsigned integer to IEEE single - Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -32,8 +32,7 @@ #include "soft-fp.h" #include "single.h" -float -__floatundisf(UDItype i) +SFtype __floatundisf(UDItype i) { FP_DECL_EX; FP_DECL_S(A); diff --git a/contrib/gcc/config/soft-fp/floatunsidf.c b/contrib/gcc/config/soft-fp/floatunsidf.c index 97b488a..12d0f25 100644 --- a/contrib/gcc/config/soft-fp/floatunsidf.c +++ b/contrib/gcc/config/soft-fp/floatunsidf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 32bit unsigned integer to IEEE double - Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -32,8 +32,7 @@ #include "soft-fp.h" #include "double.h" -double -__floatunsidf(USItype i) +DFtype __floatunsidf(USItype i) { FP_DECL_EX; FP_DECL_D(A); diff --git a/contrib/gcc/config/soft-fp/floatunsisf.c b/contrib/gcc/config/soft-fp/floatunsisf.c index 2ec16ba..80c5d3d 100644 --- a/contrib/gcc/config/soft-fp/floatunsisf.c +++ b/contrib/gcc/config/soft-fp/floatunsisf.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Convert a 32bit unsigned integer to IEEE single - Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -32,8 +32,7 @@ #include "soft-fp.h" #include "single.h" -float -__floatunsisf(USItype i) +SFtype __floatunsisf(USItype i) { FP_DECL_EX; FP_DECL_S(A); diff --git a/contrib/gcc/config/soft-fp/op-2.h b/contrib/gcc/config/soft-fp/op-2.h index 5c9bce4..3a3b3aa 100644 --- a/contrib/gcc/config/soft-fp/op-2.h +++ b/contrib/gcc/config/soft-fp/op-2.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Basic two-word fraction declaration and manipulation. - Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -613,3 +613,5 @@ #define _FP_FRAC_COPY_1_2(D, S) (D##_f = S##_f0) #define _FP_FRAC_COPY_2_1(D, S) ((D##_f0 = S##_f), (D##_f1 = 0)) + +#define _FP_FRAC_COPY_2_2(D,S) _FP_FRAC_COPY_2(D,S) diff --git a/contrib/gcc/config/soft-fp/op-4.h b/contrib/gcc/config/soft-fp/op-4.h index 1b90535..70b9faf 100644 --- a/contrib/gcc/config/soft-fp/op-4.h +++ b/contrib/gcc/config/soft-fp/op-4.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Basic four-word fraction declaration and manipulation. - Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -684,3 +684,5 @@ do { \ D##_f[1] = S##_f1; \ D##_f[2] = D##_f[3] = 0; \ } while (0) + +#define _FP_FRAC_COPY_4_4(D,S) _FP_FRAC_COPY_4(D,S) diff --git a/contrib/gcc/config/soft-fp/op-common.h b/contrib/gcc/config/soft-fp/op-common.h index 0aa6e3e..ef11b52 100644 --- a/contrib/gcc/config/soft-fp/op-common.h +++ b/contrib/gcc/config/soft-fp/op-common.h @@ -1153,7 +1153,8 @@ do { \ if (_FP_FRACBITS_##dfs < _FP_FRACBITS_##sfs \ || (_FP_EXPMAX_##dfs - _FP_EXPBIAS_##dfs \ < _FP_EXPMAX_##sfs - _FP_EXPBIAS_##sfs) \ - || _FP_EXPBIAS_##dfs < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1) \ + || (_FP_EXPBIAS_##dfs < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1 \ + && _FP_EXPBIAS_##dfs != _FP_EXPBIAS_##sfs)) \ abort(); \ D##_s = S##_s; \ _FP_FRAC_COPY_##dwc##_##swc(D, S); \ @@ -1168,6 +1169,14 @@ do { \ { \ if (_FP_FRAC_ZEROP_##swc(S)) \ D##_e = 0; \ + else if (_FP_EXPBIAS_##dfs \ + < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1) \ + { \ + FP_SET_EXCEPTION(FP_EX_DENORM); \ + _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs \ + - _FP_FRACBITS_##sfs)); \ + D##_e = 0; \ + } \ else \ { \ int _lz; \ @@ -1199,7 +1208,8 @@ do { \ #define FP_TRUNC(dfs,sfs,dwc,swc,D,S) \ do { \ if (_FP_FRACBITS_##sfs < _FP_FRACBITS_##dfs \ - || _FP_EXPBIAS_##sfs < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1) \ + || (_FP_EXPBIAS_##sfs < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1 \ + && _FP_EXPBIAS_##sfs != _FP_EXPBIAS_##dfs)) \ abort(); \ D##_s = S##_s; \ if (_FP_EXP_NORMAL(sfs, swc, S)) \ @@ -1211,8 +1221,11 @@ do { \ { \ if (D##_e <= 0) \ { \ - if (D##_e <= 1 - _FP_FRACBITS_##dfs) \ - _FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \ + if (D##_e < 1 - _FP_FRACBITS_##dfs) \ + { \ + _FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \ + _FP_FRAC_LOW_##swc(S) |= 1; \ + } \ else \ { \ _FP_FRAC_HIGH_##sfs(S) |= _FP_IMPLBIT_SH_##sfs; \ @@ -1234,11 +1247,24 @@ do { \ if (S##_e == 0) \ { \ D##_e = 0; \ - _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \ - if (!_FP_FRAC_ZEROP_##swc(S)) \ + if (_FP_FRAC_ZEROP_##swc(S)) \ + _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \ + else \ { \ FP_SET_EXCEPTION(FP_EX_DENORM); \ - FP_SET_EXCEPTION(FP_EX_INEXACT); \ + if (_FP_EXPBIAS_##sfs \ + < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1) \ + { \ + _FP_FRAC_SRS_##swc(S, (_FP_WFRACBITS_##sfs \ + - _FP_WFRACBITS_##dfs), \ + _FP_WFRACBITS_##sfs); \ + _FP_FRAC_COPY_##dwc##_##swc(D, S); \ + } \ + else \ + { \ + _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \ + _FP_FRAC_LOW_##dwc(D) |= 1; \ + } \ } \ } \ else \ diff --git a/contrib/gcc/config/soft-fp/quad.h b/contrib/gcc/config/soft-fp/quad.h index d7840ff..c22e944 100644 --- a/contrib/gcc/config/soft-fp/quad.h +++ b/contrib/gcc/config/soft-fp/quad.h @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Quad Precision. - Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -176,15 +176,15 @@ union _FP_UNION_Q } longs; struct { #if __BYTE_ORDER == __BIG_ENDIAN - unsigned sign : 1; - unsigned exp : _FP_EXPBITS_Q; - unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE; - unsigned long frac0 : _FP_W_TYPE_SIZE; + unsigned sign : 1; + unsigned exp : _FP_EXPBITS_Q; + _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE; + _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE; #else - unsigned long frac0 : _FP_W_TYPE_SIZE; - unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE; - unsigned exp : _FP_EXPBITS_Q; - unsigned sign : 1; + _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE; + _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE; + unsigned exp : _FP_EXPBITS_Q; + unsigned sign : 1; #endif } bits; }; diff --git a/contrib/gcc/config/sparc/sparc.c b/contrib/gcc/config/sparc/sparc.c index 692e46e..738264a 100644 --- a/contrib/gcc/config/sparc/sparc.c +++ b/contrib/gcc/config/sparc/sparc.c @@ -703,7 +703,7 @@ sparc_override_options (void) error ("-mcmodel= is not supported on 32 bit systems"); } - fpu = TARGET_FPU; /* save current -mfpu status */ + fpu = target_flags & MASK_FPU; /* save current -mfpu status */ /* Set the default CPU. */ for (def = &cpu_default[0]; def->name; ++def) @@ -7968,8 +7968,10 @@ sparc_vis_init_builtins (void) Expand builtin functions for sparc intrinsics. */ static rtx -sparc_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, - enum machine_mode tmode, int ignore ATTRIBUTE_UNUSED) +sparc_expand_builtin (tree exp, rtx target, + rtx subtarget ATTRIBUTE_UNUSED, + enum machine_mode tmode ATTRIBUTE_UNUSED, + int ignore ATTRIBUTE_UNUSED) { tree arglist; tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); @@ -7978,14 +7980,13 @@ sparc_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode[4]; int arg_count = 0; - mode[arg_count] = tmode; - - if (target == 0 - || GET_MODE (target) != tmode - || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) - op[arg_count] = gen_reg_rtx (tmode); + mode[0] = insn_data[icode].operand[0].mode; + if (!target + || GET_MODE (target) != mode[0] + || ! (*insn_data[icode].operand[0].predicate) (target, mode[0])) + op[0] = gen_reg_rtx (mode[0]); else - op[arg_count] = target; + op[0] = target; for (arglist = TREE_OPERAND (exp, 1); arglist; arglist = TREE_CHAIN (arglist)) @@ -8101,11 +8102,11 @@ sparc_fold_builtin (tree fndecl, tree arglist, bool ignore) { tree arg0, arg1, arg2; tree rtype = TREE_TYPE (TREE_TYPE (fndecl)); - - if (ignore && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrsi_vis + if (ignore + && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrsi_vis && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrdi_vis) - return build_int_cst (rtype, 0); + return fold_convert (rtype, integer_zero_node); switch (DECL_FUNCTION_CODE (fndecl)) { @@ -8219,6 +8220,7 @@ sparc_fold_builtin (tree fndecl, tree arglist, bool ignore) default: break; } + return NULL_TREE; } |