summaryrefslogtreecommitdiffstats
path: root/gcc/fold-const.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * fold-const.c (make_range): Don't try to reverse an unbounded range.law2000-01-041-4/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31197 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (free_element, get_element): Remove unused prototypes.ghazi1999-12-291-1/+1
| | | | | | | | | | | * fold-const.c (extract_muldiv): Initialize variables `op0' and `op1'. * jump.c (invert_exp): Add explicit braces to avoid ambiguous `else' clauses. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31123 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (operand_equal_p): Use memcmp to compare stringloewis1999-12-271-1/+1
| | | | | | | constants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31097 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold_truthop): Properly check for FP RHS.kenner1999-12-261-5/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31091 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (real_hex_to_f): Remove unused "isldouble" variable.law1999-12-211-5/+1
| | | | | | | Remove redundant initialization of "frexpon" and "expon". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31043 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix typo in last changekenner1999-12-191-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31019 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Minor reformatting.kenner1999-12-181-110/+132
| | | | | | | | | | | | | | | | | | | | * flow.c: Likewise. * regs.h: Likewise. * stor-layout.c: Likewise. * fold-const.c: Likewise. (OVERFLOW_SUM_SIGN): Renamed from overflow_sum_sign. (struct cb_args, const_binop_1, const_binop): Pass type of arg, not arg itself. (size_int_wide): Cache nodes even if garbage collecting. (twoval_comparison_p): Reenable SAVE_EXPR case if operand of SAVE_EXPR has no side effects. * cse.c: Move a comment. * tree.c: Minor reformatting. (int_size_in_bytes): Return -1 if constant overflows. * reload.c (combine_reloads): Do nothing if no output reload git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31017 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (optimize_bit_field_compare): Only use one modekenner1999-12-061-37/+20
| | | | | | | for both RHS and LHS in non-constant case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30800 138bc75d-0d04-0410-961f-82ee72b054a4
* Install proper changekenner1999-11-291-2/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30715 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (extract_muldiv, case {MIN,MAX}_EXPR): Reversekenner1999-11-291-19/+47
| | | | | | | | | | | operation if C is negative. (extract_muldiv, case SAVE_EXPR): Supresss if arg has side effects. (extract_muldiv, case {PLUS,MINUS}_EXPR): Don't apply distributive law for some divisions if constant is negative and change other divisions to the opposite rounding. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30714 138bc75d-0d04-0410-961f-82ee72b054a4
* Delete unused vars.crux1999-11-291-6/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30706 138bc75d-0d04-0410-961f-82ee72b054a4
* Add missing return typescrux1999-11-291-0/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30705 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (negate_expr, associate_trees, extract_muldiv): New.kenner1999-11-271-372/+443
| | | | | | | | | | | (split_tree): Completely rework to make more general. (make_range, fold): Call negate_expr. (fold, case NEGATE_EXPR): Simplify -(a-b) is -ffast-math. (fold, associate): Call new split_tree and associate_trees. (fold, case MULT_EXPR, case *_{DIV,MOD}_EXPR): Call extract_muldiv. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30673 138bc75d-0d04-0410-961f-82ee72b054a4
* Fri Oct 29 15:25:07 1999 Arnaud Charlet <charlet@ACT-Europe.FR>kenner1999-11-011-38/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gcov.c (DIR_SEPARATOR): Provide default. (output_data): Add test for MS-DOS format absolute filename. (fancy_abort): Correct program name. (open_files): Open all files in binary mode. * libgcc2.c (__bb_exit_func): Likewise. * profile.c (init_branch_prob): Specify binary when opening files. * flags.h (flag_unwind_tables): New decl. * toplev.c (flag_unwind_table): New definition. (f_options): Add -funwind-tables. (decode_g_option): Clarify warning when unknown -g option is given. (rest_of_compilation): If inside an inlined external function, pretend we are just being declared. * dwarf2out.c (dwarf2out_do_frame): Check -funwind_tables. (dwarf2out_frame_finish): Likewise. Fri Oct 29 06:32:44 1999 Geoffrey Keating <geoffk@cygnus.com> * flow.c (propagate_block): When the last reference to a label before an ADDR_VEC is deleted because the reference is a dead store, delete the ADDR_VEC. Fri Oct 29 07:44:26 1999 Vasco Pedro <vp@di.fct.unl.pt> * fold-const.c (merge_ranges): In not in0, but in1, handle upper bounds equal like subset case. Thu Oct 28 19:22:24 1999 Douglas Rupp <rupp@gnat.com> * dbxout.c (dbxout_parms): Generate a second stabs line for parameters passed in a register but moved to the stack. Thu Oct 28 19:12:57 1999 Sam Tardieu <tardieu@act-europe.fr> * gcc.c (pass_exit_codes, greatest_status): New variables. (struct option_map): Add entry for "--pass-exit-codes". (execute): Update greatest_status if error. (display_help): Add documentation for -pass-exit-codes. (process_command): Handle -pass-exit-codes. (main): Look at pass_exit_codes and greatest_status on call to exit. Thu Oct 28 18:06:50 1999 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * reload.c (find_reloads): Refine test for no input reload case to not includes reloads emitted after insn. * function.c (find_temp_slots_from_address): Handle sum involving a register that points to a temp slot. (update_temp_slot_address): Make recursive call if both old and new are PLUS with a common operand. * calls.c (expand_call): Mark temp slot for result as having address taken. * rtlanal.c (reg_referenced_p, case IF_THEN_ELSE): New case. * gcc.c (process_command): Add standard_exec_prefix with "GCC" component as well as "BINUTILS". * integrate.h (copy_rtx_and_substitute): New arg, FOR_LHS. * integrate.c (copy_rtx_and_substitute): Likewise. (expand_inline_function, integrate_parm_decls, integrate_decl_tree): All callers changed. * unroll.c (inital_reg_note_copy, copy_loop_body): Likewise. * dbxout.c (dbxout_type, case INTEGER_TYPE_NODE): If can use gdb extensions, write size of type; also be more consistent in using references when this is a subtype. * pa.md (extv, extzv, insv): Use define_expand to reject constant that is out of range. * loop.c (unknown_constant_address_altered): New variable. (prescan_loop): Initialize it. (note_addr_stored): Set it for RTX_UNCHANGING_P MEM. (invariant_p, case MEM): Remove handling for volatile and readony; check new variable if readonly. (check_dbra_loop): Chdeck unknown_constant_address_altered. * cse.c (canon_hash, case MEM): Do not record if BLKmode. (addr_affects_sp_p): Removed from note_mem_written and only define #ifdef AUTO_INC_DEC. * alpha.c (input_operand, case ADDRESSOF): Treat as REG. * regclass.c (record_reg_classes): Properly handle register move directions. * varasm.c (initializer_constant_valid_p, case MINUS_EXPR): Don't think valid if both operands are invalid. (struct constant_descriptor): New field RTL. (mark_const_hash_entry): Mark it. (record_constant{,_rtx}): Initialize it. (output_constant_def): Allocate RTL in permanent obstack and save in table. ({record,compare}_constant_1): Modes must match for CONSTRUCTOR of ARRAY_TYPE. * c-common.h (initializer_constant_valid_p): Delete decl from here. * output.h (initializer_constant_valid_p): Move decl to here. * c-common.c (initializer_constant_valid_p): Delete function from here. * varasm.c (initializer_constant_valid_p): Move function to here. * tree.h (STRIP_SIGN_NOPS): New macro. * fold-const.c (optimize_minmax_comparison): New function. (invert_truthvalue, case WITH_RECORD_EXPR): New case. (fold): Use STRIP_SIGN_NOPS instead of STRIP_TYPE_NOPS. (fold, case EQ_EXPR): Call optimize_minmax_comparison and add cases with ABS_EXPR, NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR, and widening conversions. (fold, case LE_EXPR): Rework changing unsigned to signed comparisons to look at size of mode, not precision of type; also add missing cases. (optimize_bit_field_compare, decode_field_reference): Don't try to optimize COMPONENT_REF of a PLACEHOLDER_EXPR. * dwarf2out.c (ctype.h): Include. (dwarf2out_set_demangle_name_func): New function. (size_of_line_info): Deleted. (output_line_info): Compute size of line info table from difference of labels. (base_type_die, add_name_attribute): Call demangle function, if any. (field_byte_offset): Use bits per word for variable length fields. (gen_array_type_die): Add array name. (gen_subprogram_die): Ignore DECL_INLINE if -fno-inline. (dwarf2out_add_library_unit_info): New function. * explow.c (set_stack_check_libfunc): New function. (stack_check_libfunc): New static variable. (probe_stack_range): Allow front-end to set up a libfunc to call. * combine.c (simplify_comparison): When making comparison in wider mode, check for having commuted an AND and a SUBREG. (contains_muldiv): New function. (try_combine): Call it when dividing a PARALLEL. (simplify_rtx, case TRUNCATE): Don't remove for umulsi3_highpart. (simplify_comparison, case ASHIFTRT): Recognize sign-extension of a PLUS. (record_value_for_reg): If TEM is a binary operation with two CLOBBERs, use one of the CLOBBERs instead. (if_then_else_cond): If comparing against zero, just return thing being compared. * optabs.c (expand_abs): If machine has MAX, ABS (x) is MAX (x, -x). Don't generate shifts and subtract if have conditional arithmetic. * rtl.h (delete_barrier): New declaration. * jump.c (jump_optimize): Set up to handle conditional call. In conditional arithmetic case, handle CALL_INSN followed by a BARRIER. (delete_barrier): New function. * rtl.c (read_rtx): Call fatal if bad RTL code; check for bad mode. * recog.c (nonmemory_operand): Accept ADDRESSOF. * tree.c (build_type_attribute_variant): Push to obstack of ttype around type_hash_canon call. * expr.c (placeholder_list): Move decl to file scope. (expand_expr): Don't force access to volatile just because its address is taken. If ignoring reference operations, just expand the operands. (expand_expr, case COMPONENT_REF): Propagate EXPAND_CONST_ADDRESS to recursive call when expanding inner. Refine test for using bitfield operations vs pointer punning. (expand_expr, case CONVERT_EXPR): If converting to BLKmode UNION_TYPE from BLKmode, just return inner object. Use proper mode in store_field call. Properly set sizes of object to store and total size in store_field call for convert to union. (expand_expr, case ARRAY_REF): If OP0 is in a register, put it in memory (like for ADDR_EXPR). Also, don't put constant in register if we'll want it in memory. (readonly_fields_p): New function. (expand_expr, case INDIRECT_REF): Call it if LHS. (expand_assignment): Handle a RESULT_DECL where DECL_RTL is a PARALLEL. (do_jump, case WITH_RECORD_EXPR): New case. (get_inner_reference): Always go inside a CONVERT_EXPR and NOP_EXPR if both modes are the same. (store_field): Use bitfield operations if size of bitsize is not same as size of RHS's type. Check for bitpos not a multiple of alignment in BLKmode case. Do block move in largest possible alignment. (store_constructor): Set BITSIZE to -1 for variable size and properly in case of array of BLKmode. (expand_expr_unaligned): New function. (do_compare_and_jump): Call it. * mips/iris5.h (SWITCHES_NEED_SPACES): New macro. * collect2.c (main): Only allow -ofoo if SWITCHES_NEED_SPACES does not include 'o'. * function.c (instantiate_virtual_regs_1, case SET): Handle case where both SET_DEST and SET_SRC reference a virtual register. (gen_mem_addressof): Copy RTX_UNCHANGING_P from new REG to old REG. * integrate.c (expand_inline_function): Handle case of setting virtual stack vars register (from built in setjmp); when parameter lives in memory, expand virtual_{stack_vars,incoming_args}_rtx early. (subst_constant): Add new parm, MEMONLY. (expand_inline_function, integrate_parm_decls): Pass new parm. (integrate_decl_tree): Likewise. (copy_rtx_and_substitute, case MEM): Do copy RTX_UNCHANGING_P. (try_constants): Call subst_constants twice, with MEMONLY 0 and 1. (copy_rtx_and_substitute, case SET): Add explicit calls to copy_rtx_and_substitute for both sides. * stmt.c (expand_asm_operands): Don't use TREE_STRING_LENGTH for constraints. (pushcase{,_range}): Convert to NOMINAL_TYPE after checking for within INDEX_TYPE, instead of before. (fixup_gotos): Use f->target_rtl, not the next insn, since latter may be from a later fixup. (expand_value_return): Correctly convert VAL when promoting function return; support RETURN_REG being a PARALLEL. (expand_return): When checking for result in regs and having cleanup, consider PARALLEL in DECL_RTL as being in regs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30299 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Fix thinko when optimizing comparisonslaw1999-10-311-1/+2
| | | | | | | against -0.0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30282 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Fix comment.law1999-10-261-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30174 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Fix thinko in x+(-0) -> x transformation.law1999-10-191-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30077 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Convert (or (not arg0) (not arg1))law1999-10-151-0/+31
| | | | | | | to (not (and (arg0) (arg1))). Similary for and. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30001 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Move bit_rotate code to the EXPR_PLUS case,law1999-10-151-75/+89
| | | | | | | | | | | | falltrought to assocate code. Convert XOR to OR in code like (a&c1)^(a&c2) where c1 and c2 don't have bits in common. * combine.c (simplify_logical): Convert XOR to IOR if operands have no bits in common; remove XOR to ROTATE conversion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29998 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Handle more simplifications allowed by IEEE.law1999-10-151-3/+52
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29994 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Detect rotates built from BIT_XOR_EXPRs.law1999-10-141-1/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29966 138bc75d-0d04-0410-961f-82ee72b054a4
* Revert this change. Gavin's patch to operand_equal_p is a better fix.law1999-09-201-4/+0
| | | | | | | | * fold-const.c (fold_range_test): Do not try to fold the range test if the rhs or lhs has side effects. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29526 138bc75d-0d04-0410-961f-82ee72b054a4
* Make it possible to prototype port-specific functions (and convert i386 to ↵crux1999-09-201-0/+1
| | | | | | use this) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29514 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (operand_equal_p): Pay attention to side effects.gavin1999-09-171-0/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29483 138bc75d-0d04-0410-961f-82ee72b054a4
* * system.h (CTYPE_CONV, TOUPPER, TOLOWER): New macros. Useghazi1999-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CTYPE_CONV in all ctype macros. * cccp.c (initialize_char_syntax): Use uppercase ctype macro from system.h. * cexp.y (initialize_random_junk): Likewise. * c4x.c (c4x_interrupt_function_p, c4x_handle_pragma): Likewise. * i370.c (handle_pragma): Likewise. * i370.h (ASM_OUTPUT_LABELREF, ASM_OUTPUT_ASCII): Likewise. * v850.c (override_options): Likewise. * doprint.c (_doprnt): Likewise. * fixinc/fixincl.c (main, quoted_file_exists, extract_quoted_files): Likewise. * fixinc/server.c (load_data): Likewise. * fold-const.c (real_hex_to_f): Likewise. * genattr.c (write_upcase, gen_attr): Likewise. * genattrtab.c (convert_const_symbol_ref, evaluate_eq_attr, write_upcase): Likewise. * genemit.c (print_code): Likewise. * genopinit.c (gen_insn): Likewise. * genpeep.c (print_code): Likewise. * genrecog.c (print_code): Likewise. * optabs.c (init_libfuncs): Likewise. ch: * lex.c (maybe_downcase, getlc, handle_generic_pragma, check_newline): Likewise. f: * bad.c (ffebad_finish): Likewise. * fini.c (main): Likewise. * intrin.c (ffeintrin_init_0): Likewise. * lex.c (ffelex_hash_): Likewise. * src.c (ffesrc_init_1): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29463 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge in gcc2-ss-010999law1999-09-071-38/+25
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29150 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (ggc-simple.o): Depend on varray.h.mmitchel1999-09-051-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (rtl.o): Depend on ggc.h. (genattrtab.o): Depend on ggc.h. (print-tree.o): Likewise. (fold-const.o): Likewise. * emit-rtl.c (sequence_element_free_list): Remove, and all references. (make_insn_raw): Don't cache insns when GC'ing. (emit_insn_before): Likewise. (emit_insn_after): Likewise. (emit_insn): Likewise. (start_sequence): Use xmalloc to allocate the sequence_stack. (end_sequence): Add free to free it. (gen_sequence): Don't cache insns when GC'ing. (clear_emit_caches): Don't use sequence_element_free_list. (init_emit): Use xcalloc, not xmalloc+bzero. * fold-const.c (size_int_wide): Kill the cache, when GC'ing. * function.c (pop_function_context_from): Use free to free the fixup_var_refs_queue. (put_reg_into_stack): Allocate it with xmalloc. * genattrtab.c: Include ggc.h. (operate_exp): Don't use obstack_free when GC'ing. (simplify_cond): Likewise. (simplify_text_exp): Likewise. (optimize_attrs): Likewise. * gengentrtl.c (gendef): Use ggc_alloc_rtx to allocate RTL, when GC'ing. (gencode): Generate a #include for ggc.h. * ggc-callbacks.c (ggc_p): Define it to zero. * ggc-none.c (ggc_p): Likewise. * ggc-simple.c: Include varray.h. (ggc_mark_tree_varray): New function. (ggc_add_tree_varray_root): Likewise. (ggc_mark_tree_varray_ptr): Likewise. * ggc.h (ggc_p): Declare. (varray_head_tag): Likewise. (ggc_add_tree_varray_root): Declare. * print-tree.c (print_node): Don't check for TREE_PERMANENT inconsistencies when GC'ing. * rtl.c: Include ggc.h. (rtvec_alloc): Use ggc_alloc_rtvec when GC'ing. (rtx_alloc): Use ggc_alloc_rtx when GC'ing. (rtx_free): Don't call obstack_free when GC'ing. * toplev.c (rest_of_compilation): Call ggc_collect after every pass, if GC'ing. * tree.c (push_obstacks): Do nothing, if GC'ing. (pop_obstacks_nochange): Likewise. (pop_obstacks): Likewise. (make_node): Use ggc_alloc_tree when GC'ing. (copy_node): Likewise. (get_identifier): Use ggc_alloc_string when GC'ing. (build_string): Likewise. (make_tree_vec): Use ggc_alloc_tree when GC'ing. (tree_cons): Likewise. (build1): Likewise. (type_hash_canon): Don't call obstack_free when GC'ing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29125 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold_range_test): Do not try to fold the rangelaw1999-09-021-0/+4
| | | | | | | test if the rhs or lhs has side effects. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29058 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-08-27 00:27 -0700 Zack Weinberg <zack@bitmover.com>zack1999-08-271-0/+2
| | | | | | | | | | | | | * c-typeck.c (c_expand_start_case): Return immediately if exp is an ERROR_MARK. * fold-const.c (operand_equal_p): Return immediately if arg1 or arg0 are ERROR_MARKs. * stor-layout.c (layout_type [case RECORD_TYPE]): Ignore fields of type ERROR_MARK when calculating if the record can go in a register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28923 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Reassociate (+ (+ (* a b) c) (* d e))rth1999-08-241-0/+61
| | | | | | | | as (+ (+ (* a b) (* d e)) c). Factor a common power-of-two multiplicand out of (+ (* a b) (* c d)). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28829 138bc75d-0d04-0410-961f-82ee72b054a4
* Revert this change:mmitchel1999-06-021-14/+10
| | | | | | | | * fold-const.c (fold): STRIP_NOPS when deciding whether or not something is a candidate for optimize_bit_field_compare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27318 138bc75d-0d04-0410-961f-82ee72b054a4
* hlaw1999-05-271-7/+5
| | | | | | | | * fold-const.c (fold_truthop): Make the field reference unsigned when converting a single bit compare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27202 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): STRIP_NOPS when deciding whether or notmmitchel1999-05-261-10/+14
| | | | | | | something is a candidate for optimize_bit_field_compare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27169 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold_truthop): When converting a one-bitlaw1999-05-171-15/+10
| | | | | | | comparison don't sign extend the constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26962 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (make_range): Always initialize arg0 and arg1.law1999-04-261-2/+2
| | | | | | | | | | | | (fold): Simlarly for alt0 and alt1. * function.c (fixup_var_refs_insns): Initialize insn_list. (instantiate_virtual_regs_1): Initialize offset. * optabs.c (expand_binop): Initialize carry_in, carry_out, op0_xhigh and op1_xhigh. * stmt.c (expand_end_case): Initialize minval and maxval. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26632 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold_truthop): Optimize bitfield references withlaw1999-03-261-12/+11
| | | | | | | different masks as long as their size and bit position are the same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26006 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold_truthop): Build a type for both the lhs andlaw1999-03-261-25/+49
| | | | | | | rhs and use it appropriately. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26005 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold_truthop): Mask the lhs and rhs after merginglaw1999-03-261-10/+22
| | | | | | | adjacent bitfield references. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26004 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold_truthop): Verify that the lhs and rhs arelaw1999-03-261-1/+3
| | | | | | | | in the same bit position when optimizing bitfield references which have the same mask. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25993 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (make_range): If orig_type is unset, set it as soonlaw1999-03-241-2/+5
| | | | | | | | as we know the type. Remove now unnecessary set of orig_type for conversions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25959 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Recognise a rotate by an unsigned amount.law1999-03-241-16/+36
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25937 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (exact_real_inverse): Move variable `float_error'ghazi1999-03-151-59/+112
| | | | | | | | | | | | | into the scope where it is used. (const_binop_1): New static function. (cb_args): New struct. (const_binop): Use them in call to `do_float_handler'. (fold_convert_1): New static function. (fc_args): New struct. (fold_convert): Use them in call to `do_float_handler'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25776 138bc75d-0d04-0410-961f-82ee72b054a4
* hlaw1999-02-111-6/+18
| | | | | | | | * fold-const.c (range_binop): Take account of the bounded nature of fixed length arithmetic when comparing unbounded ranges. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25146 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove trigraph in commentzack1999-01-271-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24881 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog forlaw1999-01-271-11/+34
| | | | | | | details. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24879 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (lshift_double): Mark 'prec' arguments as possiblylaw1999-01-231-2/+2
| | | | | | | unused. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24830 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (declare_function_name): Declare predefinied variablerth1998-12-011-0/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `__func__'. * c-decl.c (flag_isoc9x): Set to 1 by default. (c_decode_option): Handle -std= option. Remove -flang-isoc9x. (grokdeclarator): Always emit warning about implicit int for ISO C 9x. * c-parse.in: Allow constructors in ISO C 9x. Rewrite designator list handling. Allow [*] parameters. Don't warn about comma at end of enum definition for ISO C 9x. * cccp.c (c9x): New variable. (rest_extension): New variable. (print_help): Document new -std= option. (main): Recognize -std= option. Set c9x appropriately. (create_definition): Recognize ISO C 9x vararg macros. * gcc.c (default_compilers): Adjust specs for -std options. (option_map): Add --std. (display_help): Document -std. * toplev.c (documented_lang_options): Add -std and remove -flang-isoc9x. * c-lex.c (yylex): Recognize hex FP constants and call REAL_VALUE_ATOF or REAL_VALUE_HTOF based on base of the constants. * fold-const.c (real_hex_to_f): New function. Replacement function for hex FP conversion if REAL_ARITHMETIC is not defined. * real.c (asctoeg): Add handling of hex FP constants. * real.h: Define REAL_VALUE_HTOF if necessary using ereal_atof or real_hex_to_f. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24049 138bc75d-0d04-0410-961f-82ee72b054a4
* Warning fixes:ghazi1998-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (gencheck.o): Depend on gansidecl.h. * c-common.c (print_char_table): Add missing initializers. (scan_char_table): Likewise. (time_char_table): Likewise. * c-decl.c (c_decode_option): Mark parameter `argc' with ATTRIBUTE_UNUSED. (declare_parm_level): Mark parameter `definition_flag' with ATTRIBUTE_UNUSED. * c-lex.c (readescape): Use `(unsigned)1' in shift. (yylex): Likewise. Cast `sizeof' to an (int) when comparing against one. * calls.c (store_one_arg): Remove unused parameter `fndecl'. All callers changed. (emit_call_1): Mark parameters `fndecl' and `funtype' with ATTRIBUTE_UNUSED. (expand_call): Cast result of MIN() to (unsigned int) when comparing against an unsigned value. * cccp.c (pcfinclude): Remove unused parameter `limit'. All callers changed. (make_definition): Remove unused parameter `op'. All callers changed. (create_definition): Cast REST_EXTENSION_LENGTH to (long) when comparing against the result of pointer arithmetic. * config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Cast to (unsigned) when comparing against one. * dwarf2out.c (dwarf2out_frame_debug): Cast REGNO() and HARD_FRAME_POINTER_REGNUM to (unsigned) when comparing against one. (output_die): Move variable `i' into the scope in which it is used. Change its type to `unsigned'. (output_die): Cast the result of `strlen' to (int) when passing it to ASM_OUTPUT_ASCII(). (output_pubnames): Likewise. (output_line_info): Likewise. * emit-rtl.c (global_rtl): Add missing initializers. * explow.c (promote_mode): Mark parameter `for_call' with ATTRIBUTE_UNUSED. * expmed.c (expand_shift): Cast the result of GET_MODE_BITSIZE to `unsigned HOST_WIDE_INT' when comparing against one. (synth_mult): Change type of variable `cost' to int. (emit_store_flag): Use `(unsigned HOST_WIDE_INT) 1' in shift. * expr.c (copy_blkmode_from_reg): Cast BITS_PER_WORD to (unsigned) when comparing against one. (get_inner_reference): Change variable `alignment' to unsigned. (expand_expr): Cast the result of GET_MODE_ALIGNMENT to (unsigned int) when comparing against one. (expand_builtin_setjmp): Change type of variable `i' to size_t. * fold-const.c (div_and_round_double): Cast BASE to (HOST_WIDE_INT) when comparing against one. * gencheck.c: Include gansidecl.h. (main): Mark parameter `argv' with ATTRIBUTE_UNUSED. * optabs.c (gen_cond_trap): Mark parameters `code', `op2' and `tcode' with ATTRIBUTE_UNUSED. * real.c (edivm): Cast constant value to (unsigned long) in expression compared against an unsigned value. * stmt.c (expand_return): Cast BITS_PER_WORD to (unsigned) when comparing against one. (expand_end_case): Cast CASE_VALUES_THRESHOLD to (unsigned int) when comparing against one. * stor-layout.c (mode_for_size): Cast MAX_FIXED_MODE_SIZE to (unsigned int) when comparing against one. Likewise for GET_MODE_BITSIZE. (smallest_mode_for_size): Likewise. (save_storage_status): Mark parameter `p' with ATTRIBUTE_UNUSED. (restore_storage_status): Likewise. * toplev.c (debug_args): Add missing initializer. (f_options): Spelling correction. Add missing initializers. (documented_lang_options): Likewise. (debug_end_source_file): Mark parameter `lineno' with ATTRIBUTE_UNUSED. * tree.c (valid_machine_attribute): Mark parameters `attr_args', `decl' and `type' with ATTRIBUTE_UNUSED. * varasm.c (decode_reg_name): Cast `sizeof' expression to (int) when comparing against one. (assemble_variable): Mark parameter `top_level' with ATTRIBUTE_UNUSED. (assemble_external_libcall): Mark parameter `fun' with ATTRIBUTE_UNUSED. (output_constant_pool): Mark parameters `fnname' and `fndecl' with ATTRIBUTE_UNUSED. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23054 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Yet another COND_EXPR bug: when foldingrth1998-09-201-0/+4
| | | | | | | to an ABS expr, convert an unsigned input to signed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22503 138bc75d-0d04-0410-961f-82ee72b054a4
* * fold-const.c (fold): Fix another type in COND_EXPR handling code.law1998-09-201-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22499 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud