aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
AgeCommit message (Collapse)AuthorFilesLines
1999-08-02Unroll my commit of 1999/08/01 16:14:58, there was a communications mixupGeoffrey Keating1-5/+3
about its status. From-SVN: r28403
1999-08-01rs6000.c (num_insns_constant_wide): Correct for type promotion.Geoff Keating1-3/+5
* config/rs6000/rs6000.c (num_insns_constant_wide): Correct for type promotion. (add_operand): Get test correct for 64-bit HOST_WIDE_INT. (non_add_cint_operand): Likewise. (logical_operand): Likewise. (non_logical_cint_operand): Likewise. (print_operand): Correct printf()s for 64-bit HOST_WIDE_INT. (print_operand_address): Correct printf() for 64-bit HOST_WIDE_INT. (rs6000_select_rtx_section): Suppress warning. (small_data_operand): Suppress warning. (rs6000_got_register): Suppress warning. * config/rs6000/rs6000.md (andsi3): HOST_WIDE_INT is a signed type, so `J' is generally the wrong constraint for a SImode value; use `L' instead. (andsi3_internal2): Likewise. (andsi3_internal3): Likewise. (iorsi3_internal1): Likewise. (xorsi3_internal1): Likewise. (movsi): Likewise. (movsf_softfloat): Likewise. various unnamed compare insns: Likewise. (movsi+2): Preserve sign bits of SImode constant. (floatsidf2_internal+1): Sign-extend SImode constant correctly. (movdf+1): Preserve high bits of DFmode constant. (movdi_32+1): Sign-extend properly. various unnamed compare insns: Sign-extend properly. * unroll.c (loop_iterations): Convert HOST_WIDE_INT to unsigned properly for mode. * expmed.c (expand_mult_highpart): Convert HOST_WIDE_INT from unsigned properly for mode. (expand_divmod): Likewise. * optabs.c (expand_fix): Keep HOST_WIDE_INT constants properly signed. (expand_binop): Sometimes there is work to do when changing the mode of a CONST_INT. From-SVN: r28375
1999-06-27* expmed.c (expand_divmod): Ensure unsigned value fits in reg_note.David Edelsohn1-1/+3
From-SVN: r27796
1999-04-17c-aux-info.c, [...]: Include toplev.h for real declaration of trim_filename.Zack Weinberg1-0/+1
1999-04-17 20:11 -0400 Zack Weinberg <zack@rabi.columbia.edu> * c-aux-info.c, emit-rtl.c, explow.c, expmed.c, gcse.c, haifa-sched.c, optabs.c, reorg.c, resource.c, sched.c: Include toplev.h for real declaration of trim_filename. * Makefile.in: Update dependencies. From-SVN: r26523
1999-03-25rtl.texi (RTX_FRAME_RELATED_P): Add documentation.Andrew Macleod1-24/+20
d Thu Mar 25 14:04:54 EST 1999 Andrew MacLeod <amacleod@cygnus.com> * rtl.texi (RTX_FRAME_RELATED_P): Add documentation. * rtl.h (struct rtx_def): Update comment for frame_related field. (set_unique_reg_note): Declare prototype. * dwarf2out.c (dwarf2out_frame_debug_expr): Split out from 'dwarf2out_frame_debug' to handle only expressions, and process component parts of a PARALLEL expression. (dwarf2out_frame_debug): Process insns only, and call new function 'dwarf2out_frame_debug_expr' for patterns. * emit-rtl.c (set_unique_reg_note): New function to add a reg note, but if there is an existingone, deletes it first. * expmed.c (expand_mult, expand_divmod): Use set_unique_reg_note. * optabs.c (add_equal_note, expand_binop): Use set_unique_reg_note. (emit_no_conflict_block, emit_libcall_block): Use set_unique_reg_note. (expand_fix): Use set_unique_reg_note. From-SVN: r25979
1999-03-19Warning fixes:Kaveh R. Ghazi1-2/+2
* calls.c (initialize_argument_information): Mark parameters `num_actuals' and `n_named_args' with ATTRIBUTE_UNUSED. * dbxout.c (dbxout_start_new_source_file): Likewise for parameter `filename'. (dbxout_finish): Likewise for parameters `file' and `filename'. (dbxout_prepare_symbol): Likewise for parameter `decl'. (dbxout_begin_function): Likewise. * explow.c (hard_function_value): Likewise for parameter `func'. * function.c (locate_and_pad_parm): Likewise for parameter `fndecl'. * expmed.c (expand_divmod): Omit unused argument to `expand_abs'. * expr.c (expand_expr): Likewise. * expr.h (expand_abs): Delete unused argument from prototype. * optabs.c (expand_abs): Remove unused parameter `unsignedp'. * sdbout.c (sdbout_init): Mark parameter `syms' with ATTRIBUTE_UNUSED. (sdbout_end_block): Likewise for parameter `n'. * toplev.c (debug_define): Likewise for parameters `lineno' and `buffer'. (debug_undef): Likewise. * varasm.c (named_section): Likewise for parameter 'reloc'. (assemble_external): Likewise for parameter `decl'. (assemble_alias): Likewise for parameter `target'. From-SVN: r25858
1999-02-14except.c (start_catch_handler): Use emit_cmp_and_jump_insns.Jeffrey A Law1-4/+1
* except.c (start_catch_handler): Use emit_cmp_and_jump_insns. * explow.c (probe_stack_range): Likewise. * expmed.c (do_cmp_and_jump): Likewise. * expr.c (store_expr, expand_expr, expand_builtin): Likewise. (do_tablejump): Likewise. * stmt.c (expand_expr_stmt, expand_end_case): Likewise. (do_jump_if_equal, emit_case_nodes): Likewise. * optabs.c (emit_cmp_and_jump_insns): Clarify comments. If UNSIGNEDP, then convert comparison to an unsigned code before emitting the jump. (expand_float, expand_fix): Use emit_cmp_and_jump_insns. From-SVN: r25205
1998-12-08loop.c (strength_reduce): If scan_start points to the loop exit test...J"orn Rennecke1-0/+21
* loop.c (strength_reduce): If scan_start points to the loop exit test, be wary of subversive use of gotos inside expression statements. Don't set maybe_multiple for a backward jump that does not include the label under consideration into its range. * unroll.c (biv_total_increment): Make use of maybe_multiple field. From-SVN: r24196
1998-10-21Fix sparc builtin_memcpy miscompilation.Jim Wilson1-1/+12
* expmed.c (store_bit_field): If need to add a SUBREG, then remove existing SUBREG if we can, otherwise abort. From-SVN: r23215
1998-10-13function.c (purge_addressof_1): Fix typo in inequality: do bitfield ↵Richard Henderson1-7/+29
optimization for equal mode sizes. * function.c (purge_addressof_1): Fix typo in inequality: do bitfield optimization for equal mode sizes. * expmed.c (store_bit_field): Don't take subregs of subregs in the movstrict case. Tidy a potential problem in the multi-word case. (extract_bit_field): Likewise. From-SVN: r23066
1998-10-13Warning fixes:Kaveh R. Ghazi1-3/+4
* 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. From-SVN: r23054
1998-10-09expmed.c (store_bit_field): Pun non-integral str_rtx modes.Richard Henderson1-4/+58
* expmed.c (store_bit_field): Pun non-integral str_rtx modes. Take extra care for op0 now possibly being a subreg. (extract_bit_field): Likewise. * function.c (purge_addressof_1): Revert Oct 4 change. Drop the reg to memory if there is no equal sized integral mode. * stor-layout.c (int_mode_for_mode): New function. * machmode.h: Prototype it. From-SVN: r22962
1998-10-04expmed.c (expand_divmod): Don't widen for computing remainder if we seem to ↵Torbjorn Granlund1-4/+16
have a divmod pattern for... * expmed.c (expand_divmod): Don't widen for computing remainder if we seem to have a divmod pattern for needed mode. From-SVN: r22828
1998-09-23Add comment provided by Jim Wilson.Nick Clifton1-0/+4
From-SVN: r22560
1998-09-15combine.c (make_extraction): If no mode is specified for an operand of insv...Jeffrey A Law1-23/+55
* combine.c (make_extraction): If no mode is specified for an operand of insv, extv, or extzv, default it to word_mode. (simplify_comparison): Similarly. * expmed.c (store_bit_field): Similarly. (extract_bit_field): Similarly. * function.c (fixup_var_regs_1): Similarly. * recog.c (validate_replace_rtx_1): Similarly. * mips.md (extv, extzv, insv expanders): Default modes for most operands. Handle TARGET_64BIT. (movdi_uld, movdi_usd): New patterns. From-SVN: r22439
1998-08-21expmed.c (make_tree): Sign extend even if TREE_UNSIGNED...David S. Miller1-1/+3
* expmed.c (make_tree) [CONST_INT]: Sign extend even if TREE_UNSIGNED, when bitsize of type's mode is larger than HOST_BITS_PER_WIDE_INT. From-SVN: r21904
1998-06-29* Merge from gcc2 June 9, 1998 snapshot. See ChangeLog.13 forJeff Law1-3/+13
details. From-SVN: r20808
1998-06-24expr.c (get_memory_rtx): New function.John Carr1-1/+1
* expr.c (get_memory_rtx): New function. (expand_builtin): Call get_memory_rtx for MEM arguments to builtin string functions. * expmed.c (init_expmed): Initialize all elements of *_cost arrays. From-SVN: r20700
1998-06-19calls.c (expand_call): Initialize "src" and "dest".Jeffrey A Law1-1/+1
* calls.c (expand_call): Initialize "src" and "dest". * stmt.c (expand_return): Likewise. * expmed.c (extract_split_bit_field): Similarly for "result" * gcse.c (compute_hash_table): Mark first arg as unused. * jump.c (jump_optimize): Initialize reversep. * tree.c (make_node): Initialize length. From-SVN: r20629
1998-05-06typo typo fixes fixesJeff Law1-2/+2
From-SVN: r19601
1998-05-05* Check in merge from gcc2. See ChangeLog.12 for details.Jeff Law1-47/+98
From-SVN: r19553
1998-04-16expr.c (store_constructor_field): Add prototype.Jeff Law1-0/+9
* expr.c (store_constructor_field): Add prototype. (memory_use_mode): Likewise. * expmed.c (synth_mult): Add prototype. (choose_multiplier, invert_mod2n): Likewise. From-SVN: r19250
1998-04-04* Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12Jeff Law1-5/+7
for details. * haifa-sched.c: Mirror recent changes from gcc2. From-SVN: r18984
1998-04-03dummy commit before mergeJeff Law1-4/+10
From-SVN: r18980
1998-03-20Major cutover to using system.h:Kaveh R. Ghazi1-1/+1
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. From-SVN: r18726
1998-01-14alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO...Richard Henderson1-93/+101
* alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO; change gen_rtx(expr...) to gen_rtx_fmt_foo(expr...). * caller-save.c, calls.c, combine.c, cse.c: Likewise. * dwarf2out.c, except.c, explow.c, expmed.c, expr.c: Likewise. * final.c, flow.c, function.c, genpeep.c, haifa-sched.c: Likewise. * halfpic.c, integrate.c, jump.c, local-alloc.c, loop.c: Likewise. * profile.c, recog.c, reg-stack.c, regclass.c, regmove.c: Likewise. * reload.c, reload1.c, reorg.c, sched.c, stmt.c, stupid.c: Likewise. * unroll.c, varasm.c: Likewise. * config/alpha/alpha.c, config/alpha/alpha.md: Likewise. From-SVN: r17357
1997-12-15* expmed.c (expand_shift): If SHIFT_COUNT_TRUNCATED, drop a SUBREG.Richard Henderson1-5/+10
From-SVN: r17107
1997-12-06Merge from gcc-2.8Jeff Law1-0/+2
From-SVN: r16987
1997-11-02Update mainline egcs to gcc2 snapshot 971021.Jeff Law1-3/+9
From-SVN: r16278
1997-10-20Patches to fix minor optimizer bugsJim Wilson1-3/+2
Patches to fix minor optimizer bugs * expmed.c (extract_bit_field): Don't make flag_force_mem disable extzv for memory operands. * cse.c (simplify_ternary_operation, case IF_THEN_ELSE): Collapse redundant conditional moves to single operand. From-SVN: r16129
1997-09-23expmed.c (expand_divmod): If compute_mode is not the same as mode...David S. Miller1-0/+8
* expmed.c (expand_divmod): If compute_mode is not the same as mode, handle the case where convert_modes() causes op1 to no longer be a CONST_INT. From-SVN: r15672
1997-09-07version.c: Bump for snapshot.Jeff Law1-1/+3
* version.c: Bump for snapshot. * expmed.c (expand_divmod): Make op1_is_pow2 depend on unsignedp for negative constants. Promote EXACT_DIV_EXPR to TRUNC_DIV_EXPR when op1_is_pow2. * final.c (shorten_branches): During first pass, assume worst possible alignment for ADDR_VEC and ADDR_VEC_DIFF insns. * Makefile.in (distclean): Remove various things left around by running the testsuite. From-SVN: r15136
1997-05-06reformat a little to match GNU coding standards.Mike Stump1-15/+15
From-SVN: r14024
1997-02-15(expand_divmod): prefer divmod in same mode over div in wider mode.Richard Kenner1-5/+12
From-SVN: r13638
1997-01-27(emit_store_flag): Properly test for STORE_FLAG_VALUE of just sign bit.Richard Kenner1-2/+2
From-SVN: r13552
1997-01-04(store_fixed_bit_field): If not SLOW_UNALIGNED_ACCESS, treatRichard Kenner1-1/+4
everything as maximally aligned. From-SVN: r13371
1996-12-12* expmed.c (emit_store_flag_force): Fix typos/thinkos.Jeff Law1-2/+2
From-SVN: r13296
1996-10-21(emit_store_flag_force): New function.Torbjorn Granlund1-0/+37
From-SVN: r12987
1996-09-25(store_bit_field): don't make flag_force_mem disable insvJim Wilson1-6/+6
for memory operands. From-SVN: r12843
1996-07-17(expand_mult_highpart): Revert last change.Torbjorn Granlund1-2/+2
From-SVN: r12512
1996-07-03formatting tweaksMike Stump1-3/+3
From-SVN: r12390
1996-06-28(expand_mult_highpart): Use op1 not wide_op1 in expansion ofRichard Kenner1-2/+2
mul_highpart. From-SVN: r12361
1996-06-27(extract_bit_field): Check TRULY_NOOP_TRUNCATION beforeJim Wilson1-1/+3
making a SUBREG of a REG. From-SVN: r12338
1996-05-17(store_split_bit_field): Don't assume the alignment of VALUE is theRichard Kenner1-6/+21
same as the record. From-SVN: r12017
1996-05-05Fix typo in comment.Richard Kenner1-1/+1
From-SVN: r11927
1996-03-30(expand_divmod, case TRUNC_DIV_EXPR): Move some codeTorbjorn Granlund1-70/+74
to avoid shifting by a too large count. From-SVN: r11645
1996-03-27(negate_rtx): Fix typo in previous change.Richard Kenner1-1/+1
From-SVN: r11624
1996-03-24(negate_rtx): Don't try to negate a constant ourself; instead callRichard Kenner1-15/+6
simplify_unary_operation. From-SVN: r11611
1996-03-18(emit_store_flag): If expanding (GE X 0) will need two insns, don't use ↵Richard Kenner1-2/+4
subtarget for the result of the first insn. (emit_store_flag): If expanding (GE X 0) will need two insns, don't use subtarget for the result of the first insn. Move a likely constant to the start of a condition. From-SVN: r11562
1996-01-17(extract_bit_field): For multi-word bitfield, clobber target beforeJim Wilson1-0/+3
storing to it. From-SVN: r11059