2003-05-15 Eric Christopher <echristo@redhat.com>
* combine.c (expand_compound_operation): Make sure
that zero_extend operation is profitable.
From-SVN: r66853
2003-05-15 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers <ncm@cantrip.org>
* include/bits/fstream.tcc (_M_overflow): Rewrote to call
_M_convert_to_external only once (_M_buf_size is now the size of
the put area + 1 for the overflow char of a full area); call
_M_set_buffer instead of _M_set_indeterminate.
(setbuf): Don't accept a buffer smaller than 2 chars.
(_M_underflow): Refill _M_buf_size - 1 chars; call _M_set_buffer,
instead of _M_set_determinate.
(open): Call _M_set_buffer, instead of _M_set_indeterminate.
(seekoff): Likewise.
* include/ext/stdio_filebuf.h (stdio_filebuf(int,
std::ios_base::openmode, bool, size_t),
stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t):
Likewise.
* include/std/std_fstream.h (_M_set_indeterminate): Remove.
(_M_set_determinate): Rename as _M_set_buffer, _M_buf_size ->
_M_buf_size - 1.
* include/std/std_streambuf.h: Tweak _M_out_lim comment.
* testsuite/27_io/basic_filebuf/sgetn/char/1.cc: Tweak, taking
into account that, for _M_buf_size == BUFSIZ == 8192, the size of
the put area is now BUFSIZ - 1.
* testsuite/ext/stdio_filebuf_2.cc: Tweak, taking into account
that now the smallest _M_buf_size is 2 (still fails, for the same
reason, with 3.2.3)
Co-Authored-By: Nathan Myers <ncm@cantrip.org>
From-SVN: r66848
PR c++/5388
* call.c (conditional_conversion): Don't consider implicit
conversions if T2 is a base of T1.
* cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
(ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
* parser.c (cp_parser_primary_expression): Convert a static data
member from reference.
From-SVN: r66844
libiberty/ChangeLog:
2003-05-14 Jim Blandy <jimb@redhat.com>
* hex.c (_hex_value): Make this unsigned.
(hex_value): Update documentation for new return type. hex_value
now expands to an unsigned int expression, to avoid unexpected
sign extension when we store it in a bfd_vma, which is larger than
int on some platforms.
* functions.texi: Regenerated.
include/ChangeLog:
2003-05-14 Jim Blandy <jimb@redhat.com>
* libiberty.h (hex_value): Make the value an unsigned int, to
avoid unexpected sign-extension when cast to unsigned types larger
than int --- like bfd_vma, on some platforms.
(_hex_value): Update declaration.
From-SVN: r66840
2003-05-15 Philip Blundell <philb@gnu.org>
* config/arm/arm.c (arm_is_xscale): Rename to arm_arch_xscale.
All uses updated.
(arm_tune_xscale): New variable.
(arm_override_options): Set it.
(arm_adjust_cost): Use it in place of arm_arch_xscale.
(arm_gen_load_multiple): Likewise.
(arm_gen_store_multiple): Likewise.
* config/arm/arm.md (is_xscale): Likewise.
* config/arm/arm.h (arm_tune_xscale): Declare.
From-SVN: r66839
2003-05-14 Eric Christopher <echristo@redhat.com>
* combine.c: Fix header comments.
(distribute_notes): Remove usage of elim_i1, elim_i2. Propagate
to all calls and prototype.
From-SVN: r66813
PR optimization/10764
* config/i386/i386.md (atan2df3, atan2sf3, atan2xf3, atan2tf3):
Add an explicit clobber to show that UNSPEC_FPATAN clobbers st(1).
(*fyl2x_sfxf3, *fyl2x_dfxf3, *fyl2x_xf3, *fyl2x_tfxf3): Likewise,
add an explicit clobber to show that UNSPEC_FYL2X clobbers st(1).
(logsf2, logdf2, logxf2, logtf2): Update expander patterns to match
the corresponding *fyl2x_?fxf3 instructions.
* gcc.dg/builtins-15.c: New test case.
From-SVN: r66811
* config/xtensa/lib2funcs.S (TRAMPOLINE_SIZE): Change from 49 to 59.
* config/xtensa/xtensa-config.h (XCHAL_HAVE_CONST16,
XCHAL_HAVE_L32R): New.
* config/xtensa/xtensa-protos.h (non_const_move_operand,
xtensa_load_constant, xtensa_function_prologue,
xtensa_function_epilogue): Delete prototypes.
(xtensa_expand_prologue): New.
* config/xtensa/xtensa.c (frame_size_const,
TARGET_ASM_FUNCTION_PROLOGUE, TARGET_MACHINE_DEPENDENT_REORG,
non_const_move_operand, xtensa_load_constant, xtensa_reorg,
xtensa_function_prologue): Delete.
(add_operand, xtensa_mem_offset): Formatting.
(move_operand): If the const16 option is available, allow any SFmode
and SImode constants.
(xtensa_emit_move_sequence): Inline the former contents of
xtensa_load_constant with modifications to handle the const16 option.
(override_options): Add xtensa_char_to_class['W'] and set it to
the general register class only if the const16 option is enabled.
Fix formatting. Disallow PIC when using the const16 option.
(print_operand): Reorganize to switch on "letter" instead of the
RTL code. Add output_operand_lossage calls for invalid cases.
Add support for 't' and 'b' letters.
(xtensa_expand_prologue): New function to replace
xtensa_function_prologue and xtensa_reorg.
(xtensa_function_epilogue): Declare this as static. Delete code
to print the retw.n or retw instruction.
(xtensa_return_addr): Use A0_REG instead of 0.
(xtensa_rtx_costs): Add costs for using the const16 option.
* config/xtensa/xtensa.h (MASK_CONST16, TARGET_CONST16): New.
(TARGET_DEFAULT): Add CONST16 if L32R instructions not available.
(TARGET_SWITCHES): Add "const16" and "no-const16".
(REG_CLASS_FROM_LETTER): Add comment about new 'W' letter.
(EXTRA_CONSTRAINT): Change 'T' constraint to only apply when not
using the const16 option.
(TRAMPOLINE_TEMPLATE): Rewrite to avoid hardwired use of l32r insn.
(TRAMPOLINE_SIZE): Change from 49 to 59.
(INITIALIZE_TRAMPOLINE): Adjust offsets to match new trampoline.
(GO_IF_LEGITIMATE_ADDRESS): Do not allow constant pool addresses
when using the const16 option.
(PREDICATE_CODES): Delete non_const_move_operand.
* config/xtensa/xtensa.md (define_constants): Add A1_REG, A8_REG, and
UNSPECV_ENTRY.
(movdi, movdf): If the source is a constant, always expand to a
sequence of movsi insns.
(movdi_internal, movdf_internal): Remove alternative using l32r insns.
(movsi_internal, movsf_internal): Add alternative using const16 insns.
(movsf): Add const16 support.
(entry, prologue, epilogue): New.
(set_frame_ptr): Add missing mode for unspec_volatile operation.
Likewise for subsequent split pattern.
* doc/invoke.texi (Option Summary, Xtensa Options): Document new
"-mconst16" and "-mno-const16" options.
From-SVN: r66809
* rtl.h (TREE_CONSTANT_POOL_ADDRESS_P): Rename from
DEFERRED_CONSTANT_P.
* integrate.c (copy_rtx_and_substitute): Update use.
* varasm.c (build_constant_desc): Set SYMBOL_REF_DECL
to the copy generated.
(maybe_output_constant_def_contents): Examine TREE_ASM_WRITTEN
of the constant to see if we should emit.
(mark_constant): Similarly.
(output_constant_def_contents): Set TREE_ASM_WRITTEN.
From-SVN: r66807
* gcov-io.h (gcov_write_bytes, gcov_read_bytes): Remove here.
(GCOV_TAG_*) Force type to gcov_unsigned_t.
(GCOV_CHECK, GCOV_CHECK_READING, GCOV_CHECK_WRITING): New.
(struct gcov_var): Remove modified. Add start, length, offset,
overread. Have buffer array for libgcov.
(gcov_sync, gcov_seek): Definitions moved to gcov-io.c.
(gcov_position, gcov_rewrite, gcov_is_eof): Adjust.
* gcov-io.c (gcov_open): Set mode, do not read anything.
(gcov_close): Write final block.
(gcov_write_block, gcov_allocate): New.
(gcov_write_bytes): Make static. Write or allocate buffer.
(gcov_write_unsigned, gcov_write_counter): Buffer can never be
null.
(gcov_write_string): Adjust.
(gcov_write_tag)
(gcov_write_length): Adjust. Flush the block.
(gcov_write_tag_length): Buffer can never be null.
(gcov_read_bytes): Make static. Read in block.
(gcov_sync): Moved here. Adjust.
(gcov_seek): Moved here. Adjust.
* coverage.c (read_counts_file): Adjust.
* gcov-dump.c (print_prefix): Add position parameter.
(flag_dump_positions): New flag.
(options, main, print_usage): Add it.
(dump_file, tag_blocks, tag_arcs, tag_lines, tag_counters,
tag_summary): Adjust.
* gcov.c (read_graph_file, read_count_file): Adjust.
* libgcov.c (gcov_exit): Adjust.
From-SVN: r66805