aboutsummaryrefslogtreecommitdiff
path: root/gcc/real.c
AgeCommit message (Collapse)AuthorFilesLines
2007-09-07Reapply reverted change:Janis Johnson1-1/+3
gcc/ada/ Reapply reverted change: 2007-09-06 Eric Botcazou <ebotcazou@adacore.com> * trans.c (convert_with_check): Update call to real_2expN. gcc/ config/m68k/m68k.c (floating_exact_log2): Update call to real_2expN. config/s390/s390.md (fixuns_trunc<BFP:mode><GPR:mode>2): Ditto. Reapply reverted changes: 2007-09-06 Jan Hubicka <jh@suse.cz> * config/i386.c (ix86_expand_lround, ix86_expand_round): Update call of real_2expN. 2007-09-06 Richard Sandiford <richard@codesourcery.com> * config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2) (fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN. 2007-09-05 Janis Johnson <janis187@us.ibm.com> * optabs.c (expand_float): Convert unsigned integer as signed only if it provides sufficient accuracy; add mode argument to real_2expN. (expand_fix): Fix comment typos; extend binary float into mode wider than destination for converion to unsigned integer; add mode argument to real_2expN. * real.c (real_2expN): Add mode argument to special-case decimal float values. * real.h (real_2expN): Ditto. * fixed-value.c (check_real_for_fixed_mode): Add mode argument to real_2expN. (fixed_from_string): Ditto. (fixed_to_decimal): Ditto. (fixed_convert_from_real): Ditto. (real_convert_from_fixed): Ditto. * config/rs6000/rs6000.md (FP): Include DD and TD modes. * config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3, muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1, floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New. From-SVN: r128247
2007-09-06Revert:Janis Johnson1-4/+1
2007-09-06 Jan Hubicka <jh@suse.cz> * i386.c (ix86_expand_lround, ix86_expand_round): Update call of real_2expN. 2007-09-06 Richard Sandiford <richard@codesourcery.com> * config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2) (fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN. 2007-09-05 Janis Johnson <janis187@us.ibm.com> * optabs.c (expand_float): Convert unsigned integer as signed only if it provides sufficient accuracy; add mode argument to real_2expN. (expand_fix): Fix comment typos; extend binary float into mode wider than destination for converion to unsigned integer; add mode argument to real_2expN. * real.c (real_2expN): Add mode argument to special-case decimal float values. * real.h (real_2expN): Ditto. * fixed-value.c (check_real_for_fixed_mode): Add mode argument to real_2expN. (fixed_from_string): Ditto. (fixed_to_decimal): Ditto. (fixed_convert_from_real): Ditto. (real_convert_from_fixed): Ditto. * config/rs6000/rs6000.md (FP): Include DD and TD modes. * config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3, muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1, floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New. From-SVN: r128193
2007-09-05optabs.c (expand_float): Convert unsigned integer as signed only if it ↵Janis Johnson1-1/+4
provides sufficient accuracy... gcc/ * optabs.c (expand_float): Convert unsigned integer as signed only if it provides sufficient accuracy; add mode argument to real_2expN. (expand_fix): Fix comment typos; extend binary float into mode wider than destination for converion to unsigned integer; add mode argument to real_2expN. * real.c (real_2expN): Add mode argument to special-case decimal float values. * real.h (real_2expN): Ditto. * fixed-value.c (check_real_for_fixed_mode): Add mode argument to real_2expN. (fixed_from_string): Ditto. (fixed_to_decimal): Ditto. (fixed_convert_from_real): Ditto. (real_convert_from_fixed): Ditto. * config/rs6000/rs6000.md (FP): Include DD and TD modes. * config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3, muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1, floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New. gcc/testsuite/ * gcc.target/powerpc/dfp-dd.c: New test. * gcc.target/powerpc/dfp-td.c: New test. From-SVN: r128156
2007-07-26Change copyright header to refer to version 3 of the GNU General Public ↵Nick Clifton1-4/+3
License and to point readers at the COPYING3 file and the FSF's license web page. From-SVN: r126948
2007-07-18re PR target/30652 (SSE expansion is missing for isinf() and other ↵Kaveh R. Ghazi1-0/+32
fpclassify functions) PR target/30652 PR middle-end/20558 * builtins.c (expand_builtin_interclass_mathfn): Provide a generic fallback for isinf. * c-cppbuiltin.c (builtin_define_float_constants): Move FP max calculation code ... * real.c (get_max_float): ... to here. * real.h (get_max_float): New. testsuite: * gcc.dg/pr28796-1.c: Add more cases. * gcc.dg/pr28796-2.c: Likewise. From-SVN: r126724
2007-06-12real.c (real_isfinite): New.Kaveh R. Ghazi1-1/+9
* real.c (real_isfinite): New. (real_sqrt): Use it. * real.h (real_isfinite): New. * builtins.c: Use it. From-SVN: r125654
2007-06-03m68k.c (override_options): Don't override REAL_MODE_FORMAT.Andreas Schwab1-5/+13
* config/m68k/m68k.c (override_options): Don't override REAL_MODE_FORMAT. * config/m68k/m68k-modes.def (SF, DF): Define to use motorola_single_format and motorola_double_format, resp. * real.c (motorola_single_format): Renamed from coldfire_single_format. (motorola_double_format): Renamed from coldfire_double_format. (encode_ieee_extended): Generate a proper canonical NaN image respecting canonical_nan_lsbs_set. (ieee_extended_motorola_format): Set canonical_nan_lsbs_set to true. * real.h: Adjust declarations. From-SVN: r125295
2007-05-27re PR middle-end/32083 (bug in transfer integer->real->integer)Tobias Burnus1-1/+1
2007-05-26 Tobias Burnus <burnus@net-b.de> PR fortran/32083 * real.c (mpfr_from_real): Fix sign of -Inf. 2007-05-26 Tobias Burnus <burnus@net-b.de> PR fortran/32083 * gfortran.dg/transfer_simplify_3.f90: New. From-SVN: r125108
2007-05-21defaults.h (IBM_FLOAT_FORMAT): Macro definition removed.Andreas Krebbel1-262/+8
2007-05-21 Andreas Krebbel <krebbel1@de.ibm.com> * defaults.h (IBM_FLOAT_FORMAT): Macro definition removed. * doc/tm.texi (IBM_FLOAT_FORMAT): Documentation entry removed. * real.c (encode_i370_single, decode_i370_single, encode_i370_double, decode_i370_double): Functions removed. (i370_single_format, i370_double_format): Initializations removed. (real_maxval, round_for_format, exact_real_truncate, significand_size): Consider the log2_b field to always be one. (ieee_single_format, mips_single_format, coldfire_single_format, ieee_double_format, mips_double_format, coldfire_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format, ibm_extended_format, mips_extended_format, ieee_quad_format, mips_quad_format, vax_f_format, vax_d_format, vax_g_format, decimal_single_format, decimal_double_format, decimal_quad_format, c4x_single_format, c4x_extended_format, real_internal_format): Remove initialization of log2_b. * real.h (i370_single_format, i370_double_format): Declarations removed. * c-cppbuiltin.c (builtin_define_float_constants): Consider the log2_b field to always be one. From-SVN: r124901
2007-04-24real.c (mpfr_from_real): Handle Inf and NaN, and allow the rounding mode to ↵Brooks Moses1-5/+34
be specified by the caller. * real.c (mpfr_from_real): Handle Inf and NaN, and allow the rounding mode to be specified by the caller. (real_to_mpfr) Likewise. * real.h: Update mpfr_from_real, mpfr_to_real prototypes to include new arguments. * builtins.c: Update mpfr_from_real, mpfr_to_real calls. From-SVN: r124139
2007-03-22re PR other/23572 (No warning for assigning a value to a 'float' variable ↵Manuel López-Ibáñez1-7/+12
that overflows with option -Wextra) 2007-03-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR other/23572 * c-lex.c (interpret_float): On overflow, emit pedantic warning if infinities not supported, otherwise emit warning if -Woverflow. On underflow, emit warning if -Woverflow. * real.c (real_from_string): Return -1 if underflow, +1 if overflow and 0 otherwise. * real.h (real_from_string): Update declaration testsuite/ * gcc.dg/float-range-4.c: New. * gcc.dg/float-range-1.c: Update. Test for a warning. * gcc.dg/float-range-3.c: New. * gcc.dg/float-range-5.c: New. From-SVN: r123137
2007-01-18real.h (real_format): Add a canonical_nan_lsbs_set field.Richard Sandiford1-47/+98
gcc/ * real.h (real_format): Add a canonical_nan_lsbs_set field. (coldfire_single_format): Declare. (coldfire_double_format): Likewise. * real.c (encode_ieee_single): Use canonical_nan_lsbs_set instead of qnan_msb_set to determine the lower bits of a canonical NaN significand. (encode_ieee_double): Likewise. (encode_ieee_quad): Likewise. (ieee_single_format): Initialize canonical_nan_lsbs_set. (mips_single_format): Likewise. (ieee_double_format): Likewise. (mips_double_format): Likewise. (ieee_extended_motorola_format): Likewise. (ieee_extended_intel_96_format): Likewise. (ieee_extended_intel_128_format): Likewise. (ieee_extended_intel_96_round_53_format): Likewise. (ibm_extended_format): Likewise. (mips_extended_format): Likewise. (ieee_quad_format): Likewise. (mips_quad_format): Likewise. (vax_f_format): Likewise. (vax_d_format): Likewise. (vax_g_format): Likewise. (i370_single_format): Likewise. (i370_double_format): Likewise. (decimal_single_format): Likewise. (decimal_double_format): Likewise. (decimal_quad_format): Likewise. (c4x_single_format): Likewise. (c4x_extended_format): Likewise. (real_internal_format): Likewise. (coldfire_single_format): New real_format. (coldfire_double_format): Likewise. * config/pdp11/pdp11.c (pdp11_f_format): Initialize canonical_nan_lsbs_set. (pdp11_d_format): Likewise. * config/m68k/m68k.c (override_options): Override REAL_FORMAT_MODE if TARGET_COLDFIRE_CPU. From-SVN: r120922
2006-12-19re PR target/29302 (isfinite returns wrong result at -O1)Roger Sayle1-0/+9
2006-12-18 Roger Sayle <roger@eyesopen.com> Eric Christopher <echristo@apple.com> PR target/29302 * real.c (real_maxval): Correctly handle IBM extended double format. Co-Authored-By: Eric Christopher <echristo@apple.com> From-SVN: r120040
2006-11-23real.h (real_isinteger): Declare.Manuel López-Ibáñez1-0/+11
2006-11-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org> * real.h (real_isinteger): Declare. * real.c (real_isinteger): Define. * builtins.c (integer_valued_real_p): Use it. From-SVN: r119130
2006-11-15re PR middle-end/29862 (Calling a function with gcc_assert)H.J. Lu1-1/+3
2006-11-15 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/29862 * real.c (mpfr_from_real): Call mpfr_set_str before gcc_assert. From-SVN: r118881
2006-10-29darwin.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* config/darwin.c, config/darwin.opt, config/ia64/itanium1.md, config/ia64/itanium2.md, real.c, tree-ssa-structalias.c: Fix comment typos. From-SVN: r118133
2006-10-23re PR middle-end/29335 (transcendental functions with constant arguments ↵Kaveh R. Ghazi1-0/+44
should be resolved at compile-time) PR middle-end/29335 * builtins.c (fold_builtin_sin, fold_builtin_cos, fold_builtin_tan): Fold all constant arguments. Take a "type" argument as necessary. (do_mpfr_arg1): New. * real.c, real.h (real_from_mpfr, mpfr_from_real): New. From-SVN: r117983
2006-03-16re PR middle-end/21781 (real.c incorrectly values zero with a large exponent)Roger Sayle1-0/+9
PR middle-end/21781 * real.c (real_from_string): If the mantissa is zero, don't bother parsing the exponent as the result should always be zero. * gcc.dg/real-const-1.c: New test case. From-SVN: r112136
2006-02-27re PR middle-end/19983 (__builtin_nan should allow 0X as well as 0x)Roger Sayle1-2/+6
PR middle-end/19983 * real.c (real_nan): Allow both 0x and 0X as hexadecimal prefixes. * gcc.c-torture/execute/ieee/builtin-nan-1.c: New test case. From-SVN: r111470
2005-12-16* real.c (decimal_quad_format): Correct values for emin, emax.Ben Elliston1-2/+2
From-SVN: r108622
2005-12-02Missed in last check-in.Ben Elliston1-1/+9
From-SVN: r107865
2005-12-02dfp.h, dfp.c: New files.Jon Grimm1-11/+206
2005-12-02 Jon Grimm <jgrimm2@us.ibm.com> Janis Johnson <janis187@us.ibm.com> David Edelsohn <dje@watson.ibm.com> Ben Elliston <bje@au.ibm.com> * dfp.h, dfp.c: New files. * Makefile.in (DECNUM, DECNUMINC, LIBDECNUMBER): New variables. (DECNUM_H): Likewise. (LIBDEPS, LIBS, BACKEND): Append $(LIBDECNUMBER). (INCLUDES): Append $(DECNUMINC). (OBJS-common): Add dfp.o. (dfp.o): New rule. * real.h (EXP_BITS): Pinch one bit to .. (struct real_value): Add decimal field. (real_format): Change table size, update documentation. (REAL_MODE_FORMAT): Update for to handle float, decimal float. (real_from_string3): Declare. (decimal_single_format): Declare. (decimal_double_format): Declare. (decimal_quad_format): Declare. (REAL_VALUE_TO_TARGET_DECIMAL32): New. (REAL_VALUE_TO_TARGET_DECIMAL64): New. (REAL_VALUE_TO_TARGET_DECIMAL128): New. * real.c: Include dfp.h. (normalize): Early return for decimal floats. (do_add): Zero decimal field. (do_compare): Call do_decimal_compare for decimal floats. (do_fix_trunc): Likewise, call decimal_do_fix_trunc. (real_arithmetic): Call decimal_real_arithmetic for decimal floating point operands. (real_identical): If a and b are of differing radix, return false. (real_to_integer): Call decimal_real_to_integer if the value is a decimal float. (real_to_integer2): Likewise, call decimal_real_to_integer2. (real_to_decimal): Likewise, call decimal_real_to_decimal. (real_to_hexadecimal): Place "N/A" in the return string for decimal float. (real_from_string3): New variant, given a mode. (real_maxval): Use decimal_real_maxval for decimal floats. (round_for_format): Use decimal_round_for_format for decimals. (real_convert): Use decimal_real_convert where appropriate. (significand_size): Handle base 10. (encode_decimal_single, decode_decimal_single, encode_decimal_double, decode_decimal_double, encode_decimal_quad, decode_decimal_quad): New functions. (decimal_single_format): New. (decimal_double_format): New. (decimal_quad_format): New. * machmode.def: Add SD, DD and TD decimal floating point modes. * machmode.h (FLOAT_MODE_P, SCALAR_FLOAT_MODE_P, MODES_WIDEN_P): Include MODE_DECIMAL_FLOAT. (DECIMAL_FLOAT_MODE_P): New. * mode-classes.def (MODE_DECIMAL_FLOAT): New mode class. * genmodes.c (struct mode_data): Add counter field. (struct mode_data): Update comment for format. (blank_mode): Initialise counter field. (new_mode): Increment counter field for each mode defined. (complete_mode): Handle MODE_DECIMAL_FLOAT, update check for mode using a format. (make_complex_modes): Handle modes containing `D'. (DECIMAL_FLOAT_MODE, FRACTIONAL_DECIMAL_FLOAT_MODE): New. (make_decimal_float_mode): New. (reset_float_format): Handle MODE_DECIMAL_FLOAT. (cmp_modes): Compare counter field if other characteristics similar. (emit_real_format_for_mode): Support formats for decimal floats. * doc/rtl.texi (Machine Modes): Document SD, DD and TDmodes. Document MODE_DECIMAL_FLOAT. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: David Edelsohn <dje@watson.ibm.com> Co-Authored-By: Janis Johnson <janis187@us.ibm.com> From-SVN: r107861
2005-09-19re PR rtl-optimization/23941 (compress_float_constant creates denormals)Richard Henderson1-0/+12
PR 23941 * real.c (exact_real_truncate): Return false if the format cannot represent the number as a normal. From-SVN: r104424
2005-07-29re PR middle-end/21720 (GCC incorrectly rounds hex floats)Joseph Myers1-0/+4
PR c/21720 * real.c (real_from_string): Also set last bit if there is a nonzero hex digit beyond GCC's internal precision after ".". testsuite: * gcc.dg/hex-round-1.c: Test more cases. * gcc.dg/hex-round-2.c: New test. From-SVN: r102567
2005-07-29re PR middle-end/21720 (GCC incorrectly rounds hex floats)Joseph Myers1-0/+4
PR c/21720 * real.c (real_from_string): Set last bit if there is a nonzero hex digit beyond GCC's internal precision. testsuite: * gcc.dg/hex-round-1.c: New test. From-SVN: r102539
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-03-15real.c (c4x_single_format, [...]): Provide values for signbit_ro for c4x's ↵Roger Sayle1-2/+2
single and extended floating point formats. * real.c (c4x_single_format, c4x_extended_format): Provide values for signbit_ro for c4x's single and extended floating point formats. * optabs.c (expand_copysign): Use the floating point format's signbit_ro for expanding via expand_copysign_absneg, and it's signbit_rw field for expanding via expand_copysign_bit. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r96530
2005-03-15real.h (struct real_format): Split the signbit field into two two fields, ↵Roger Sayle1-0/+20
signbit_ro and signbit_rw. * real.h (struct real_format): Split the signbit field into two two fields, signbit_ro and signbit_rw. * real.c (ieee_single_format, mips_single_format, ieee_double_format, mips_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_96_round_53_format, ieee_extended_intel_128_format, ibm_extended_format, mips_extended_format, ieee_quad_format, mips_quad_format, vax_f_format, vax_d_format, vax_g_format, i370_single_format, i370_double_format, c4x_single_format, c4x_extended_format, real_internal_format): Update initializers for new field. * builtins.c (expand_builtin_signbit): Use signbit_ro field of the real_format structure. * optabs.c (expand_absneg_bit, expand_copysign): Use signbit_rw field of the real_format structure. From-SVN: r96471
2005-03-09* real.c (real_nan): Remove neg.Kazu Hirata1-2/+1
From-SVN: r96169
2005-01-25real.c (do_add): Initialize signalling and canonical members.J"orn Rennecke1-3/+4
* real.c (do_add): Initialize signalling and canonical members. * real.c (real_from_integer): Zero out destination. From-SVN: r94228
2005-01-21re PR rtl-optimization/576 (gcc performs invalid optimization with float ↵Roger Sayle1-10/+8
operations when different rounding mode.) PR rtl-optimization/576 * real.c (real_arithmetic): Change return type from void to bool to return an indication that the result may be inexact. * real.h (real_arithmeric): Update prototype. * fold-const.c (const_binop): Don't constant fold floating point expressions when the user specifies -frounding-math and the result may depend upon the run-time rounding mode. (fold_convert_const_real_from_real): Clean-up. (fold_initializer): Ignore flag_rounding_math for initializers. * simplify-rtx.c (simplify_binary_operation): Likewise, don't constant fold FP operations with flag_rounding_math if the result may depend upon the run-time rounding mode. From-SVN: r94020
2005-01-20real.c (real_floor): Don't leave the result uninitialized when mode is ↵Roger Sayle1-1/+5
VOIDMode... * real.c (real_floor): Don't leave the result uninitialized when mode is VOIDMode, but return the unrounded intermediate value. (real_ceil): Likewise. From-SVN: r93988
2004-12-09* real.c (ibm_extended): Correct comment.David Edelsohn1-2/+1
From-SVN: r91964
2004-09-09ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead ↵Nathan Sidwell1-64/+53
of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-07-25c-common.c: Rename all identifiers named `class' to `cl'.Bernardo Innocenti1-81/+81
* c-common.c: Rename all identifiers named `class' to `cl'. * c-decl.c: Likewise. * c-common.h: Likewise. * c-parse.in: Likewise. * c-typeck.c: Likewise. * genmodes.c: Likewise. * real.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * regrename.c: Likewise. * tree.h: Likewise. From-SVN: r85153
2004-06-17Bug 14610Zack Weinberg1-35/+116
Bug 14610 * Makefile.in (min-insn-modes.o): Correct dependencies. * real.c (encode_ieee_extended, decode_ieee_extended): Always produce/consume 12-byte little-endian Intel format. (encode_ieee_extended_128, decode_ieee_extended_128): Delete. (encode_ieee_extended_motorola, decode_ieee_extended_motorola) (encode_ieee_extended_intel_96, decode_ieee_extended_intel_96) (encode_ieee_extended_intel_128, decode_ieee_extended_intel_128): New functions which convert between 12-byte little-endian Intel format and the desired format. (ieee_extended_motorola_format, ieee_extended_intel_96_round_53_format) (ieee_extended_intel_96_format, ieee_extended_intel_128_format): Update. testsuite: * gcc.dg/ia64-float80-1.c, gcc.dg/ia64-float80-2.c: New testcases. From-SVN: r83295
2004-06-14* real.c: Fix bit count in head comment.Eric Botcazou1-1/+1
From-SVN: r83133
2004-06-07real.c (real_copysign): New function to implement libm's copysign.Roger Sayle1-0/+8
* real.c (real_copysign): New function to implement libm's copysign. * real.h (real_copysign): Prototype here. * fold-const.c (tree_expr_nonnegative_p): The result of sqrt, sqrtf and sqrtl can be negative, as sqrt(-0.0) = -0.0. Correct whitespace. * builtins.c (fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit): Add function prototypes. (fold_builtin_copysign): New function to fold copysign, copysignf and copysignl. Optimize copysign(x,x) as x. Evaluate copysign of constant arguments at compile-time using real_copysign. Fold copysign(X,Y) as fabs(X) if Y is always non-negative. (fold_builtin_1): Correct minor whitespace/style issues. Call fold_builtin_copysign for BUILT_IN_COPYSIGN{,F,L}. * gcc.dg/builtins-41.c: New test case. * gcc.dg/builtins-42.c: New test case. From-SVN: r82721
2004-05-28re PR rtl-optimization/15649 (ICE with __builtin_isgreater and -ffast-math)Paolo Bonzini1-0/+2
gcc/ChangeLog: 2004-05-27 Paolo Bonzini <bonzini@gnu.org> Roger Sayle <roger@eyesopen.com> PR rtl-optimization/15649 Add LTGT_EXPR and improve pretty-printing of unordered comparisons. * c-common.c (c_common_truthvalue_conversion): Handle LTGT_EXPR. * c-typeck.c (build_binary_op): Likewise. * dojump.c (do_jump): Likewise. * expr.c (expand_expr_real_1, do_store_flag): Likewise. * predict.c (tree_predict_by_opcode): Likewise. * real.c (real_compare): Likewise. * tree-cfg.c (verify_expr): Likewise. * tree-inline.c (estimate_num_insns_1): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. Handle ORDERED_EXPR, UNORDERED_EXPR. (op_symbol): Print unordered comparisons differently than ordered ones. * tree.def (LTGT_EXPR): New '<' tree code. * doc/c-tree.texi (Expressions): Document floating-point comparison nodes. Fold comparisons between floating point values. * fold-const.c (enum comparison_code): New, from #define'd constants. Define compcodes for unordered comparisons and for invalid transformations. (invert_tree_comparison): Add "honor_nans" parameter. (fold_truthop): Revamp to work on floating-point types too. (comparison_to_compcode): Support unordered comparisons. Use new enum comparison_code. (compcode_to_comparison): Likewise. (combine_compcodes): New function. (invert_truthvalue): Let invert_tree_comparison decide whether it is valid to fold the comparison. Fold ORDERED and UNORDERED even if flag_unsafe_math_optimizations is off, and the remaining even if flag_unsafe_math_optimizations is off but we are under -fno-trapping-math. (fold_relational_const): Integer modes do not honor NaNs. gcc/testsuite/ChangeLog: 2004-05-27 Paolo Bonzini <bonzini@gnu.org> * gcc.c-torture/compare-fp-1.c, gcc.c-torture/compare-fp-2.c, gcc.c-torture/compare-fp-3.c, gcc.c-torture/compare-fp-4.c, gcc.c-torture/compare-fp-3.x, gcc.c-torture/compare-fp-4.x, gcc.c-torture/pr15649-1.c: New. Co-Authored-By: Roger Sayle <roger@eyesopen.com> From-SVN: r82365
2004-03-22real.h (struct real_value): Use the same type for all bitfields.Alexandre Oliva1-77/+79
* real.h (struct real_value): Use the same type for all bitfields. Rename exp to uexp. (REAL_EXP, SET_REAL_EXP): New accessor macros for uexp. Adjust all uses of exp... * builtins.c: ... here, ... * emit-rtl.c: ... here, and ... * real.c: ... and here. From-SVN: r79802
2004-03-12* real.c (encode_ibm_extended): Do round low word.Alan Modra1-3/+2
From-SVN: r79321
2004-03-04real.c (encode_ibm_extended): Don't bother rounding low double.Alan Modra1-1/+3
* real.c (encode_ibm_extended): Don't bother rounding low double. * c-cppbuiltin.c (builtin_define_float_constants): Tweak MAX when fmt->pnan < fmt->p. From-SVN: r78900
2004-02-10re PR c/14088 (Hexfloat constants with uppercase 0X prefix fail)Danny Smith1-1/+1
PR c/14088 real.c (real_from_string): Look for 'X' as well as 'x' in hexfloat strings. From-SVN: r77619
2004-02-08real.c (encode_ibm_extended): Normalize the input value before converting it ↵Richard Sandiford1-4/+9
to a double. * real.c (encode_ibm_extended): Normalize the input value before converting it to a double. Handle the case where a normal value rounds to infinity. From-SVN: r77498
2004-01-23real.c (real_floor, real_ceil): Tweak to allow input and output arguments to ↵Roger Sayle1-7/+25
overlap. * real.c (real_floor, real_ceil): Tweak to allow input and output arguments to overlap. (real_round): New function to implement round(3m) semantics. * real.h (real_round): Prototype here. * builtins.c (fold_builtin_round): New function to constant fold round, roundf and roundl. (fold_builtin): Call fold_builtin_round for BUILT_IN_ROUND{,F,L}. * gcc.dg/builtins-29.c: New test case. From-SVN: r76428
2004-01-12real.c: Update copyright date.Geoffrey Keating1-1/+1
* real.c: Update copyright date. * emit-rtl.c: Likewise. * rtl.h: Likewise. * dwarf2out.c: Likewise. * config/rs6000/darwin-ldouble.c: Likewise. * config/rs6000/rs6000.md: Likewise. From-SVN: r75742
2004-01-10darwin-ldouble.c: Add big comment explaining exactly what is expected as a ↵Geoffrey Keating1-45/+15
'long double'. * config/rs6000/darwin-ldouble.c: Add big comment explaining exactly what is expected as a 'long double'. (_xlqadd): When a value to be returned is representable as a 'double', just return it directly, do not construct it using a union. Also, correct final fixup. (_xlqmul): Likewise. (_xlqdiv): Likewise. * real.c (encode_ibm_extended): Make consistent with darwin-ldouble.c. From-SVN: r75629
2003-11-03* real.c (encode_ieee_single): Ensure proper promotion.Alexander Kabaev1-1/+2
From-SVN: r73232
2003-10-30* real.c (encode_ieee_extended): Back out previous patch.Jan Hubicka1-5/+0
From-SVN: r73105
2003-10-30real.c (encode_ieee_extended): Initialize whole array.Jan Hubicka1-0/+5
* real.c (encode_ieee_extended): Initialize whole array. * reg-stack.c (move_for_stack_reg0: Use always XFmode. * i386-modes.def: Change definitions of TFmode and XFmode. * i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode code. (construct_container): Allow constructing of TFmode integer containers. (ix86_return_in_memory): XFmode is not returned in memory. (init_ext_80387_constants): Always use XFmode. (print_operand): Likewise. (ix86_prepare_fp_compare_regs): Likewise. (split_to_parts): Deal with TFmode. (split_long_move): Simplify. (ix86_init_mmx_sse_builtins): Add __float80, __float128. (ix86_memory_move_cost): Do not confuse TFmode. * i386.h (LONG_DOUBLE_TYPE_SIZE): Set to 96. (IS_STACK_MODE): TFmode is not stack mode. (HARD_REGNO_NREGS, CLASS_MAX_NREGS): Deal nicely with XFmode. (VALID_SSE_REG_MODE): Allow TFmode. (VALID_FP_MODE_P): Disallow TFmode. (VALID_INT_MODE_P): Allow TFmode in 64bit mode. * i386.md (TFmode patterns): Kill. (movtf, motf_rex64): New patterns. From-SVN: r73099