* Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o
with min-insn-modes.o.
(STAGESTUFF): Add min-insn-modes.c.
(genobjs): Add genmodes.o.
(print-rtl.o, print-rtl1.o): Depend on $(TM_P_H).
(insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h.
(min-insn-modes.c, min-insn-modes.o): New rules.
(s-modes): Also generate min-insn-modes.c.
($(BUILD_PREFIX_1)insn-modes.o): Kill.
* genmodes.c (struct mode_data): Add format field.
(blank_mode, validate_mode, complete_mode): Update to match.
(make_scalar_mode): Separate into make_int_mode and make_float_mode.
(_SCALAR_MODE): Kill.
(FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument.
(emit_insn_modes_c_header): Adjust.
(emit_min_insn_modes_c_header, emit_real_format_for_mode)
(emit_min_insn_modes_c): New functions.
(emit_insn_modes_c): Call emit_real_format_for_mode.
(main): Add -m option to generate min-insn-modes.c.
* machmode.h: Update documentation. Add format argument to
all uses of FLOAT_MODE.
* real.c: Don't define real_format_for_mode here.
* dwarfout.c: Move default definition of PRINT_REG...
* defaults.h: ...here.
* print-rtl.c: Include tm_p.h.
(DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names):
Kill.
(print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround
this entire block with #ifndef GENERATOR_FILE.
* regclass.c: Unconditionally define reg_names.
* config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h
Don't define DEBUG_REGISTER_NAMES.
* config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in
redefinition of REGISTER_NAMES.
* config/i386/i386.h: Don't define DEBUG_PRINT_REG.
* combine.c: Change all preprocessor conditionals on
EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit
for clarity.
* genopinit.c: Remove mention of EXTRA_CC_MODES in comment.
* configure.in: Don't define EXTRA_CC_MODES.
* configure, config.in: Regenerate.
* doc/tm.texi: Remove documentation of EXTRA_CC_MODES.
* config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c:
May assume that GET_MODE_CLASS is accurate for extra CC modes
at all times.
* config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct
number of arguments to aggregate_value_p.
* genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New.
* machmode.def: Explain ARCH-modes.def. Document
RESET_FLOAT_FORMAT. Improve commentary on various mode
clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF,
XF, or TF modes here. Remove backward-compatibility
definition of CC.
* config/alpha/alpha-modes.def: New file; define TF mode.
* config/arc/arm-modes.def: Define XF mode.
* config/c4x/c4x-modes.def: Define QF and HF modes. Unset
float format for SF and DF modes.
* config/dsp16xx/dsp16xx-modes.def: New file; define HF mode.
* config/i386/i386-modes.def: Define XF and TF modes.
* config/i960/i960-modes.def: Define TF mode.
* config/ia64/ia64-modes.def: Define TF and OI modes.
* config/m68k/m68k-modes.def: New file; define XF mode.
* config/mips/mips-modes.def: New file; define TF mode, reset
formats for SF and DF modes.
* config/pa/pa-modes.def: Define TF mode.
* config/rs6000/rs6000.c: Define TF and PSI modes.
* config/s390/s390-modes.def: Define OI mode.
* config/sh/sh-modes.def: New file; define PSI mode.
* config/sparc/sparc-modes.def: Define TF mode.
* config/vax/vax-modes.def: New file; reset formats for SF and
DF modes.
* config/c4x/c4x.c (c4x_override_options): No need to mess
with real_format_for_mode or set REAL_MODE_FORMATs.
(c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx
variable.
* config/i386/i386.c (override_options): No need to set
REAL_MODE_FORMATs here.
* config/i960/i960.c (i960_initialize): Likewise.
* config/m68k/m68k.c (m68k_override_options): Likewise.
* config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT
for TFmode only if not the default.
* config/mips/mips.c (override_options): Likewise.
* config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for
DFmode only if not the default.
* config/i370/i370.h (RET_REG): Don't consider TFmode.
* config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode.
* config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use
of modes that don't appear anywhere in the machine description.
* config/arc/arc-modes.def, config/arm/arm-modes.def
* config/c4x/c4x-modes.def, config/frv/frv-modes.def
* config/i386/i386-modes.def, config/i960/i960-modes.def
* config/ia64/ia64-modes.def, config/mmix/mmix-modes.def
* config/pa/pa-modes.def, config/pdp11/pdp11-modes.def
* config/rs6000/rs6000-modes.def, config/s390/s390-modes.def
* config/sparc/sparc-modes.def: Convert to new style for
declaring extra CC modes.
From-SVN: r72440
* cpplex.c (_cpp_clean_line): In the common case of a line
with no trigraphs and no \-newline, avoid writing to memory.
(_cpp_skip_block_comment): Use a local 'cur' pointer instead
of the buffer member. Make c an uchar to avoid unnecessary
sign extensions.
From-SVN: r72437
2003-10-13 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.md ("*fmadddf4", "*fmsubdf4", "*fmaddsf4",
"*fmsubsf4"): Insns are now dependent on TARGET_FUSED_MADD instead
of flag_unsafe_math_optimizations.
* config/s390/s390.h ("MASK_NO_FUSED_MADD", "TARGET_NO_FUSED_MADD",
"TARGET_FUSED_MADD", "TARGET_SWITCHES"): Introduced new target flags
fused-madd and no-fused-madd.
* doc/invoke.texi: Documented the new options fused-madd and
no-fused-madd for S/390.
From-SVN: r72433
PR target/12538
* config/sparc/sparc.c (MUST_SAVE_REGISTER): Delete.
(sparc_flat_must_save_register_p): New function to decide whether
a register must be saved/restored in the function prologue/epilogue.
(sparc_flat_compute_frame_size): Use it instead of MUST_SAVE_REGISTER.
From-SVN: r72425
* java/nio/Buffer.java
(hasRemaining): Made implementation more clear.
* java/nio/MappedByteBuffer.java
(loaded): New member variable.
(force): Added comment.
(isLoaded): Return value of loaded.
(load): Set loaded to true, added comment.
From-SVN: r72418
* config.gcc (*-*-freebsd*): Use tm_defines instead of tiny
config files which do the same thing.
* config/freebsd3.h, config/freebsd4.h, config/freebsd5.h,
config/freebsd6.h: Remove now unnecessary files.
OK, I don't know what happened, but get this to commit properly.
From-SVN: r72417
gcc/
* c-common.c (c_common_truthvalue_conversion): Warn if the
address of a non-weak function is used as a truth value.
cp/
* cvt.c (ocp_convert): Move warning to C common code.
testsuite/
* gcc.dg/weak/weak-3.c: Fix for new warning.
From-SVN: r72409
* config/h8300/h8300.c (WORD_REG_USED): Use SP_REG instead of
a literal.
* config/h8300/h8300.h (REGNO_OK_FOR_BASE_P): Use MAC_REG
instead of a literal.
From-SVN: r72407
* config.gcc (*-*-freebsd*): Use tm_defines instead of tiny
config files which do the same thing.
* config/freebsd3.h, config/freebsd4.h, config/freebsd5.h,
config/freebsd6.h: Remove now unnecessary files.
From-SVN: r72406
2003-10-12 Petur Runolfsson <peturr02@ru.is>
Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/11460
* src/strstream.cc (pbackfail): Fix to use to_int_type.
* testsuite/backward/11460.cc: New, from the PR.
Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>
From-SVN: r72405
* gnu/java/nio/PipeImpl.java
(SourceChannelImpl): New inner class.
(SinkChannelImpl): New inner class.
(sink): New member variable.
(source): New member variable.
(PipeImpl): Add SelectorProvider argument, implemented.
(nativeInit): New method.
(sink): Return sink channel.
(source): Return source channel.
* gnu/java/nio/SelectorProviderImpl.java
(openPipe): Give provider as argument to PipeImpl constructor.
* java/nio/channels/spi/SelectorProvider.java
(pr): Removed.
(systemDefaultProvider): New member variable.
(provider): Made it synchronized, use property
java.nio.channels.spi.SelectorProvider.
* gnu/java/nio/natPipeImpl.cc: New file.
* Makefile.am (nat_source_files): Added gnu/java/nio/natPipeImpl.cc.
* Makefile.in: Regenerated.
From-SVN: r72397
2003-10-12 Andreas Tobler <a.tobler@schweiz.ch>
Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/11844/11740 (cont)
* config/os/generic/ctype_inline.h (ctype<char>::is):
Generically, use a bitmasksize of 15 (instead of 10);
Fix the logic to actually return (M & m) != 0 as per
22.2.1.1.2.
Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>
From-SVN: r72389
* fold-const.c (negate_mathfn_p): New function to determine whether
a built-in mathematical function is sign preserving, f(-x) == -f(x).
Add support for BUILT_IN_ASIN, BUILT_IN_ASINF and BUILT_IN_ASINL.
(tree_swap_operands_p): Change API to take an additional argument
indicating that the swapped operands evaluate in reverse order.
Canonicalize VAR_DECLs and PARM_DECLs last if we can, i.e. neither
operand side-effects or we don't care about flag_evaluation_order.
(reorder_operands_p): New function to check whether its safe to
evaluate the given operands in reverse order.
(negate_expr_p): We can always negate integer constants unless
we honor -ftrapv and the signed type would overflow. Only allow
-(A-B) into B-A if reorder_operands_p says that its OK. Allow
negation of COMPLEX_CST if both real and imaginary parts can be
negated. Allow negation through floating point extensions and
sign-preserving built-in functions.
(negate_expr): Move the code to negate integers from "fold" to
here. Always negate integer constants unless we honor -ftrapv
and the signed type would overflow. Always negate real constants
unless we honor -ftrapping-math. Only convert -(A-B) into B-A
if allowed by reorder_operands_p. Add support for COMPLEX_CST.
Optimize negation through floating point extensions and
sign-preserving built-in functions (as defined by negate_mathfn_p).
(fold): Adjust calls to tree_swap_operands_p.
(fold <NEGATE_EXPR>): Move the remaining negation optimizations
to negate_expr_p/negate_expr.
(fold <MINUS_EXPR>): Use reorder_operands_p to check whether we're
allowed to convert (-A) - B into (-B) - A.
From-SVN: r72381
* builtins.c (expand_builtin_strcmp): Defend against the possibility
that gen_cmpstrsi may fail: Stabilize the argument list against
re-evaluation and expand the library call directly using this saved
argument list if a cmpstrsi sequence can't be generated.
(expand_builtin_strncmp): Likewise.
* config/i386/i386.md (cmpstrsi, movstrsi): Disable with -Os.
* gcc.c-torture/execute/string-opt-8.c: Don't test optimizations
that inline strncmp as cmpstrsi on i386 when compiled with -Os.
From-SVN: r72380
PR optimization/12260
* simplify-rtx.c (simplify_unary_operation): Simplify all unary
operations through CONST nodes. Optimize (neg (plus X C)) as
(minus -C X) for constant values C.
(simplify_binary_operation): Optimize (minus (neg X) C) as
(minus -C X) for constant values C.
(simplify_plus_minus): Avoid creating (neg (const (plus X C)),
instead create (minus -C X).
* gcc.c-torture/compile/20031011-2.c: New test case.
From-SVN: r72379
* expr.c (expand_expr <PLUS_EXPR>): Let expand_operands call
safe_from_p for us, once it chooses an evaluation order.
(expand_expr <MULT_EXPR>): Likewise.
(expand_expr <MIN_EXPR> <MAX_EXPR>): Likewise. If expand_operands
places the second operand in "target", swap the operands.
(do_store_flag): Let expand_operands call safe_from_p for us.
* gcc.c-torture/execute/20031011-1.c: New testcase.
From-SVN: r72376