2007-08-10 Sandra Loosemore <sandra@codesourcery.com>
David Ung <davidu@mips.com>
gcc/
* config/mips/mips.c (TARGET_SCHED_INIT): Define.
(TARGET_SCHED_REORDER2): Define.
(mips_maybe_swap_ready): New.
(mips_last_74k_agen_insn): New.
(mips_74k_agen_init): New.
(mips_74k_agen_reorder): New function to group loads and stores
in the ready queue.
(mips_sched_init): New.
(mips_sched_reorder): Don't do initialization here. Call
mips_74k_agen_reorder.
(mips_variable_issue): Call mips_74k_agen_init.
Co-Authored-By: David Ung <davidu@mips.com>
From-SVN: r127341
gcc/
* config/mips/mips-protos.h (mips_address_insns): Add a boolean
argument.
(mips_fetch_insns): Delete in favor of...
(mips_load_store_insns): ...this new function.
* config/mips/mips.c (mips_address_insns): Add a boolean argument
to say whether multiword moves _might_ be split.
(mips_fetch_insns): Delete in favor of...
(mips_load_store_insns): ...this new function.
(mips_rtx_costs): Update the call to mips_address_insns.
(mips_address_cost): Likewise.
* config/mips/mips.md (length): Use mips_load_store_insns instead
of mips_fetch_insns.
* config/mips/constraints.md (R): Use mips_address_insns rather
than mips_fetch_insns. Assume that the move never needs to be split.
From-SVN: r127338
PR libffi/28313
* configure.ac: Don't treat mips64 as a special case.
* Makefile.am (nodist_libffi_la_SOURCES): Add n32.S.
* configure: Regenerate
* Makefile.in: Ditto.
* fficonfig.h.in: Ditto.
* src/mips/ffitarget.h (REG_L, REG_S, SUBU, ADDU, SRL, LI): Indent.
(LA, EH_FRAME_ALIGN, FDE_ADDR_BYTES): New preprocessor macros.
(FFI_DEFAULT_ABI): Set for n64 case.
(FFI_CLOSURES, FFI_TRAMPOLINE_SIZE): Define for n32 and n64 cases.
* src/mips/n32.S (ffi_call_N32): Add debug macros and labels for FDE.
(ffi_closure_N32): New function.
(.eh_frame): New section
* src/mips/o32.S: Clean up comments.
(ffi_closure_O32): Pass ffi_closure parameter in $12.
* src/mips/ffi.c: Use FFI_MIPS_N32 instead of
_MIPS_SIM == _ABIN32 throughout.
(FFI_MIPS_STOP_HERE): New, use in place of
ffi_stop_here.
(ffi_prep_args): Use unsigned long to hold pointer values. Rewrite
to support n32/n64 ABIs.
(calc_n32_struct_flags): Rewrite.
(calc_n32_return_struct_flags): Remove unused variable. Reverse
position of flag bits.
(ffi_prep_cif_machdep): Rewrite n32 portion.
(ffi_call): Enable for n64. Add special handling for small structure
return values.
(ffi_prep_closure_loc): Add n32 and n64 support.
(ffi_closure_mips_inner_O32): Add cast to silence warning.
(copy_struct_N32, ffi_closure_mips_inner_N32): New functions.
From-SVN: r127336
PR fortran/32933
* trans-decl.c (gfc_build_builtin_function_decls): Change
prototype for associated.
* trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
result of __builtin_isnan into a boolean.
(gfc_conv_intrinsic_strcmp): Cleanup.
(gfc_conv_associated): Convert the result of the associated
function into a boolean.
* intrinsics/associated.c: Change return type of associated into
a C int.
From-SVN: r127334
2007-08-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/33039
* io/list_read.c (find_nml_name): Check for a space after a namelist
name match.
From-SVN: r127332
2007-08-09 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* config/mips/mips.opt (mhard-float, msoft-float): Make these
control TARGET_HARD_FLOAT_ABI and TARGET_SOFT_FLOAT_ABI, rather
than TARGET_HARD_FLOAT and TARGET_SOFT_FLOAT.
* config/mips/mips.h (mips16_hard_float): Delete.
(TARGET_HARD_FLOAT_ABI, TARGET_SOFT_FLOAT_ABI): Delete these
definitions, and replace with....
(TARGET_HARD_FLOAT, TARGET_SOFT_FLOAT): Define.
* config/mips/mips.c (mips16_hard_float): Delete. Replace
all references with (TARGET_MIPS16 && TARGET_HARD_FLOAT_ABI).
(MIPS_MARCH_CONTROLS_SOFT_FLOAT): Update comments.
(override_options): Replace MASK_SOFT_FLOAT references with
MASK_SOFT_FLOAT_ABI. Delete twiddling with MASK_SOFT_FLOAT
and mips16_hard_float when TARGET_MIPS16.
From-SVN: r127325
2007-08-09 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c/32796
* c-typeck.c (build_binary_op): Check for non pointer types before
calling int_fits_type_p.
2007-08-09 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c/32796
* gcc.c-torture/compile/pr32796.c: New test.
From-SVN: r127323
2007-08-09 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/32813
* fold-const.c (omit_one_operand): Return only the ommitted expression
if the result is an empty statement.
(pedantic_omit_one_operand): Likewise.
2007-08-09 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/32813
* gfortran.fortran-torture/compile/emptyif-1.f90: New test.
* lib/fortran-torture.exp (fortran-torture): Use TORTURE_OPTIONS instead
of just -O.
From-SVN: r127322
* simplify-rtx.c (simplify_binary_operation_1): Removed erroneous
break that was preventing simplify_associative_operation() for xor.
From-SVN: r127319
2007-08-09 Sandra Loosemore <sandra@codesourcery.com>
Nigel Stephens <nigel@mips.com>
gcc/
* doc/tm.texi (CLZ_DEFINED_VALUE_AT_ZERO, CTZ_DEFINED_VALUE_AT_ZERO):
Document change in interpretation of value from boolean to
tri-state integer.
* optabs.c (expand_ffs, expand_ctz): New functions to compute
ffs and ctz using clz.
(expand_unop): Call them.
* config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Fix its
result value.
(CTZ_DEFINED_VALUE_AT_ZERO): Likewise.
* config/mips/mips.h (CLZ_DEFINED_VALUE_AT_ZERO): Likewise, to
enable the new ffs expansion on this target.
Co-Authored-By: Nigel Stephens <nigel@mips.com>
From-SVN: r127318
* tree-vect-transform.c (vectorizable_store): Remove call to
copy_virtual_operands() and call mark_symbols_for_renaming() for
the created vector store.
(vect_setup_realignment): Don't call copy_virtual_operands() and
update_vuses_to_preheader().
(vectorizable_load): Don't call copy_virtual_operands().
(update_vuses_to_preheader): Remove.
From-SVN: r127315
gcc/
2007-08-08 Richard Sandiford <richard@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com>
Chao-ying Fu <fu@mips.com>
Nigel Stephens <nigel@mips.com>
David Ung <davidu@mips.com>
* doc/invoke.texi (-mcode-readable): Document.
* config/mips/mips.opt (mcode-readable): New option.
* config/mips/mips-protos.h (SYMBOL_32_HIGH): New symbol type.
* config/mips/mips.h (mips_code_readable_setting): New enum.
(mips_code_readable): Declare.
(TARGET_MIPS16_TEXT_LOADS, TARGET_MIPS16_PCREL_LOADS): New macros.
(TARGET_MIPS16_SHORT_JUMP_TABLES): New macro.
(JUMP_TABLES_IN_TEXT_SECTION): Use it.
(CASE_VECTOR_MODE, CASE_VECTOR_PC_RELATIVE): Likewise. Remove
boiler-plate comments.
(ASM_OUTPUT_ADDR_DIFF_ELT): Use TARGET_MIPS16_SHORT_JUMP_TABLES.
* config/mips/mips.c (mips_code_readable): New variable.
(mips_classify_symbol): Only return SYMBOL_PC_RELATIVE for
MIPS16 labels if TARGET_MIPS16_SHORT_JUMP_TABLES. Use both the
context and -mcode-readable setting to restrict the use of
SYMBOL_PC_RELATIVE for MIPS16 constant pool references.
Only return TARGET_FORCE_TO_MEM if PC-relative loads are allowed.
(mips_symbolic_constant_p): Handle SYMBOL_32_HIGH.
(mips_blocks_for_constant_p): Only return false for
TARGET_MIPS16_PCREL_LOADS.
(mips_symbol_insns_1): Treat HIGHs as 2 extended instructions
for MIPS16. Handle SYMBOL_32_HIGH.
(mips_const_insns): Allow HIGHs for MIPS16 too.
(mips_unspec_address_offset): New function, split out from...
(mips_unspec_address): ...here.
(mips_output_move): Handle MIPS16 HIGH moves. Use "li" to load
16-bit symbolic constants. Assert approropiate conditions for
using the "la" and "dla" macros.
(mips_handle_option): Handle -mcode-readable=.
(override_options): Use %hi/%lo relocations for TARGET_MIPS16 too.
Set up mips_lo_relocs[SYMBOL_32_HIGH].
(mips_strip_unspec_address): New function, split out from...
(print_operand_reloc): ...here.
(print_operand): Pass constants through mips_strip_unspec_address.
(print_operand_address): Likewise.
(mips_output_mi_thunk): Remove guard of mips16_lay_out_constants.
(mips_select_rtx_section): Remove MIPS16 handling.
(mips16_gp_pseudo_reg): Check currently_expanding_to_rtl.
(mips16_rewrite_pool_refs): Wrap the labels in an address UNSPEC.
(mips16_lay_out_constants): Do nothing unless
TARGET_MIPS16_PCREL_LOADS.
(mips_avoid_hazards): Remove guard of mips16_lay_out_constants.
* config/mips/mips.md: Split HIGHs for MIPS16.
(tablejump): Use TARGET_MIPS16_SHORT_JUMP_TABLES.
gcc/testsuite/
* gcc.target/mips/code-readable-1.c: New test.
* gcc.target/mips/code-readable-2.c: Likewise.
* gcc.target/mips/code-readable-3.c: Likewise.
Co-Authored-By: Chao-ying Fu <fu@mips.com>
Co-Authored-By: David Ung <davidu@mips.com>
Co-Authored-By: Nigel Stephens <nigel@mips.com>
Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>
From-SVN: r127300
gcc/
* config/mips/mips-protos.h (mips_split_symbol): Add a mode and
an "rtx *" argument. Return a bool.
* config/mips/mips.c (mips_split_symbol): Accept arbitrary source
values and return true if they can be split. Take the same kind of
mode argument as mips_symbol_insns. Add a "lo_sum_out" parameter
and store the lo_sum there if nonnull. Use the symbol type to
determine whether a $gp or HIGH is needed.
(mips_legitimize_address): Update call to mips_split_symbol and
simplify accordingly.
(mips_legitimize_const_move): Likewise.
* config/mips/mips.md: In the combine define_split,
check mips_split_symbol instead of splittable_symbolic_operand.
Update use of mips_split_symbol in the generator code.
* config/mips/predicates.md (splittable_symbolic_operand): Delete.
From-SVN: r127298
gcc/
* config/mips/mips.c (mips_symbolic_address_p): Delete.
(mips_symbol_insns_1): New function, split out from...
(mips_symbol_insns): ...here. Take a mode argument. Treat loads
and stores separately from load addresses.
(mips_classify_address): Replace uses of mips_symbolic_address_p
with uses of mips_symbol_insns.
(mips_address_insns): Update calls to mips_symbol_insns.
(mips_const_insns): Likewise.
(mips_legitimize_address): Likewise.
From-SVN: r127297
gcc/
* config/mips/mips-protos.h (SYMBOL_FORCE_TO_MEM): New symbol type.
* config/mips/mips.c (mips_classify_symbol): Skip TARGET_ABICALLS
block for locally-binding symbols if TARGET_ABSOLUTE_ABICALLS.
Return SYMBOL_FORCE_TO_MEM instead of SYMBOL_ABSOLUTE for
non-call contexts if TARGET_MIPS16.
(mips_symbolic_constant_p): Handle SYMBOL_FORCE_TO_MEM.
(mips_symbolic_address_p): Likewise. Remove special TARGET_MIPS16
code for SYMBOL_ABSOLUTE.
(mips_symbol_insns): Likewise.
From-SVN: r127296
gcc/
* config/mips/mips-protos.h (mips_symbol_context): New enumeration.
* config/mips/mips.c (mips_classify_symbol): Take a context argument.
(mips_symbolic_constant_p): Likewise. Update the call to
mips_classify_symbol.
(mips_classify_address): Update the calls to mips_symbolic_constant_p.
(mips_const_insns): Likewise. Update the call to mips_classify_symbol.
(mips_legitimize_address): Update the call to mips_symbolic_constant_p.
(print_operand_reloc): Add a context argument. Update the call to
mips_symbolic_constant_p.
(print_operand): Update the calls to print_operand_reloc.
(print_operand_address): Use print_operand_reloc rather than
print_operand.
(mips_rewrite_small_data_p): Add a context argument. Update the call
to mips_symbolic_constant_p.
(mips_small_data_pattern_1): Make DATA the containing mem.
Update the call to mips_rewrite_small_data_p.
(mips_rewrite_small_data_1): Likewise.
(mips_use_anchors_for_symbol_p): Update the call to
mips_symbolic_constant_p.
* config/mips/predicates.md (const_call_insn_operand): Likewise.
(splittable_symbolic_operand): Likewise.
(move_operand): Likewise.
(absolute_symbolic_operand): Likewise.
(got_disp_operand): Likewise.
(got_page_ofst_operand): Likewise.
From-SVN: r127295
2007-07-31 Dalibor Topic <robilad@kaffe.org>
PR 32844
* java/util/EnumSet.java:
Made class abstract per API spec.
(size, iterator, add, addAll, clear, contains,
containsAll, remove, removeAll, retainAll) Moved
into an anonymous inner class in of(T).
(allOf, noneOf, copyOf, of, range) Made more
implementation independent.
(of(T)) return an instance of an anonymous class
implementing EmptySet.
From-SVN: r127291