Commit Graph

7477 Commits

Author SHA1 Message Date
Doug Evans
f6cdc7ea0f (multilib.h, stmp-multilib, install-multilib): New targets.
(gcc.o): Depend on multilib.h.
(clean): Remove multilib.h and tmpmultilib*.

From-SVN: r7490
1994-06-15 08:03:05 +00:00
Doug Evans
08b28cd3a2 Initial revision
From-SVN: r7489
1994-06-15 08:01:42 +00:00
Doug Evans
5181669e07 Initial revision
From-SVN: r7488
1994-06-15 07:53:49 +00:00
Doug Evans
a8d2b75275 sparc.md (cpu): New attribute.
* sparc/sparc.md (cpu): New attribute.
	(type attribute): New value cmove (conditional moves).
	(cmpdi): New pattern for v9.
	(seq*, sne*): Add v9 support.
	(sgt,slt,sge,sle): Explicitly restrict operand 0 to the integer
	registers.  Try emitting a conditional move for v9.
	(sgtu,sltu,sgeu,sleu): Likewise.
	(comparison insns): Add v9 versions.
	(scc insns): Add DImode versions for v9.
	(beq, bne, bgt, blt, bge, ble): If comparing DImode with 0 on v9,
	use brxx insns.  Use emit_jump_insn, not emit_insn, as the latter
	mishandles brxx insns.
	(branch insns): Update calls to output_cbranch.
	Add v9 versions to support multiple floating point condition code regs.
	Add v9 versions to support brxx insns.
	(lo_sum, high, pic): Add v9 support.
	(symbolic move patterns): Disable for v9.
	(DImode, DFmode, TFmode moves): Add v9 support.
	(conditional move insns): Define for v9.
	(zero_extendqidi2, extendqidi2, zero_extendhidi2, extendhidi2,
	zero_extendsidi2, extendsidi2, floatdisf2, floatdidf2, floatditf2,
	fix_truncsfdi2, fix_truncdfdi2, fix_trunctfdi2, muldi3, divdi3,
	udivdi3, ashldi3, ashrdi3, lshrdi3, ffsdi2): New patterns for v9.
	(bitfield compare insn): Add DImode version for v9.
	(adddi3, subdi3, negdi2, anddi3, iordi3, xordi3, one_cmpldi2,
	mixed mode fp mult insns, negdf2, negtf2, absdf2, abstf2, tablejump,
	call, call_value, untyped_call, untyped_return, indirect_jump,
	flush_register_windows, flush): Add v9 support.
	(ldd peep holes): Disable for v9.
	(set/compare peep hole): Define DImode version for v9.
	(sign extend/compare peep hole): Likewise.
	(return peep holes): Add v9 support.
	(call/jump peep holes): Add v9 support.

From-SVN: r7487
1994-06-15 07:50:13 +00:00
Doug Evans
61a55e8b09 sparc.c (SKIP_CALLERS_UNIMP_P): Define.
* sparc/sparc.c (SKIP_CALLERS_UNIMP_P): Define.
	(sparc_cpu_type, sparc_arg_count, sparc_n_named_args,
	frame_base_offset, fpconv_stack_temp): New globals.
	(leaf_reg_remap): Add additional registers for v9.
	(sparc_override_options, sparc64_init_expanders,
	sparc64_fpconv_stack_temp, intreg_operand, ccfp_reg_operand,
	data_segment_operand, text_segment_operand, v9_regcmp_op,
	arith11_operand, arith10_operand, arith11_double_operand,
	arith10_double_operand, gen_v9_scc, emit_v9_brxx_insn,
	sparc_init_modes, build_big_number, output_v9branch,
	sparc_initialize_trampoline, sparc64_initialize_trampoline):
	New functions.
	(arith_double_operand, gen_compare_reg, finalize_pic,
	emit_move_sequence, mem_aligned_8, output_move_double,
	output_move_quad, output_fp_move_double, output_fp_move_quad,
	output_block_move, save_regs, restore_regs): Add v9 support.
	(sparc_mode_class): New enum.
	(*_MODES): Redefine to use it.
	(hard_32bit_mode_classes): Renamed from hard_regno_mode_ok.
	(hard_regno_mode_classes, hard_64bit_mode_classes,
	sparc_mode_class): New globals.
	(num_gfregs): Renamed from num_fregs.
	(compute_frame_size): Add v9 support.  Simplify calculations.
	(output_function_prologue): Call build_big_number to compute stack
	size in %g1, then adjust %sp.
	Fix saving of call saved registers.  Handle new v9 registers.
	(output_function_epilogue): Fix restoration of call saved registers.
	Handle new v9 registers.
	Use SKIP_CALLERS_UNIMP_P to see if unimp insn is at return address.
	(sparc_builtin_saveregs): Define v9 version.
	(output_cbranch): New argument fp_cond_reg.  All callers changed.
	Add v9 support.
	(output_return): Use SKIP_CALLERS_UNIMP_P.
	(print_operand): New codes '_', '@', 'C', 'D'.
	(output_double_int): Handle LABEL_REF and MINUS for v9.
	Use ASM_LONGLONG if assembler can handle it.

From-SVN: r7486
1994-06-15 07:49:12 +00:00
Doug Evans
7a6cf43910 sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
	(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
	(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
	SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
	FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
	MAX_LONG_TYPE_SIZE): Define.
	(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
	UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
	POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
	EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
	FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
	Add v9 support.
	(sparc_override_options, sparc_code_model): Declare.
	(OVERRIDE_OPTIONS): Call it.
	(MASK_*): Define bits set by target flags.
	(TARGET_*): Use them.
	({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
	MEDLOW,MEDANY,FULLANY}): Define.
	(MEDANY_BASE_REG): Define.
	(V9_SWITCHES, TARGET_OPTIONS): Define.
	(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
	(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
	(SECONDARY_MEMORY_NEEDED): Simplify.
	(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
	(REG_PARM_STACK_SPACE): Do not define if v9.
	(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
	RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
	REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
	REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
	CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
	BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
	BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
	(sparc_arg_class): New enum (v9 only).
	(sparc_args): New struct to record v9 arguments.
	(CUMULATIVE_ARGS): Use it (v9 only).
	(GET_SPARC_ARG_CLASS): Define.
	(sparc_arg_count, sparc_n_named_args): Declare.
	(PASS_IN_REG_P): Define.
	(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
	FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
	FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
	Add v9 support.
	(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
	(INIT_EXPANDERS): Define (v9 only).
	(gen_v9_scc, output_v9branch): Declare.
	(HAVE_conditional_move): Define.
	(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
	DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
	REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
	CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
	SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
	(REGNO_OK_FOR_CCFP_P): Define.
	(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
	(INITIALIZE_TRAMPOLINE): Call them.
	(ENCODE_SECTION_INFO): Mark functions in v9.
	(RTX_COSTS): Assume MULT costs the same for v9 as v8.
	(ASM_LONGLONG, ASM_FLOAT): Define.
	(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.

From-SVN: r7485
1994-06-15 07:46:50 +00:00
Doug Evans
df9da8adc8 * sparc/sysv4.h (ASM_OUTPUT_CASE_LABEL): Handle 64 bit pointers.
From-SVN: r7484
1994-06-15 07:45:23 +00:00
Doug Evans
5ca018b4e5 Add v9 support.
From-SVN: r7483
1994-06-15 07:43:31 +00:00
Doug Evans
4505c23636 genconfig.c (main): Allow targets to override HAVE_conditional_move.
* genconfig.c (main): Allow targets to override HAVE_conditional_move.
	* jump.c (jump_optimize): Use it at run-time.

From-SVN: r7482
1994-06-15 07:42:17 +00:00
Doug Evans
a3ae935a82 config.sub (sparc64): New cpu.
* config.sub (sparc64): New cpu.
	(aout, elf): New os's.

From-SVN: r7481
1994-06-15 07:40:43 +00:00
Michael Meissner
4b71cd6ed2 Support 32x32->64 bit multiply
From-SVN: r7480
1994-06-15 02:44:18 +00:00
Torbjorn Granlund
1ecba59dce Trivial simplification of many patterns.
(subsi3): Don't handle CONST_INT for operand 2.
(ashiftrt, op2 > 8): New pattern.
(lshiftrt, op2 > 8): New pattern.

From-SVN: r7479
1994-06-15 02:35:23 +00:00
Torbjorn Granlund
6918e4ae27 (PREDICATE_CODES): Add cmplsrcb_operand.
From-SVN: r7478
1994-06-15 02:32:24 +00:00
Torbjorn Granlund
6f7f03f812 (cmplsrcb_operand): New predicate.
From-SVN: r7477
1994-06-15 02:32:05 +00:00
Torbjorn Granlund
fe006562ba (logical patterns): Tune to give better code for immediate values.
From-SVN: r7476
1994-06-15 02:31:28 +00:00
Torbjorn Granlund
e627f0b601 Revert last patch: (fold, case *_DIV_EXPR): Optimize (x / C << y)...
From-SVN: r7475
1994-06-15 02:29:07 +00:00
Torbjorn Granlund
ebc75e94ec (MAX_SHORTS): Deleted.
From-SVN: r7474
1994-06-15 02:24:47 +00:00
Torbjorn Granlund
37bdb7e314 (encode, decode): Use 4 HOST_WIDE_INTs for encoded value with HOST_BITS_PER_WIDE_INT/2 bits in each.
(encode, decode): Use 4 HOST_WIDE_INTs for encoded
value with HOST_BITS_PER_WIDE_INT/2 bits in each.
(LOWPART, HIGHPART): New macros.
(BASE): Move definition outside of div_and_round_double.
(add_double, mul_double, lshift_double, rshift_double): Rewrite.
(lrotate_double): Use LOWPART, HIGHPART, and BASE.
(rrotate_double): Likewise.
(div_and_round_double): Major changes to code for general case.
Now it actually produces non-garbage results for large operands.
(div_and_round_double): Simplify condition for special code used when
divisor < BASE.
(const_binop): Delete special cases for multiplying by 0, 1, 2, 4, 8.
(fold, case *_DIV_EXPR): Don't try to optimize for overflow.

From-SVN: r7473
1994-06-15 02:23:14 +00:00
Richard Kenner
4c9a05bc55 Cast pointer operands to bzero, bcopy, and bcmp to (char *).
From-SVN: r7472
1994-06-14 18:19:28 -04:00
Richard Kenner
de953b38a3 (min_precision): New function.
(finish_enum): Rewrite code to determine precision required for enumeral type.

From-SVN: r7471
1994-06-14 17:55:38 -04:00
Richard Kenner
62c0ea12e9 (simplify_unary_operation): Correctly and consistently handle
CONST_INT cases for FLOAT and UNSIGNED_FLOAT.

From-SVN: r7470
1994-06-14 17:53:33 -04:00
Richard Kenner
ac7157f6c9 (DO_GLOBAL_CTORS_BODY): Call __builtin_alloca with a non-zero
argument, forcing a frame pointer to be needed.

From-SVN: r7469
1994-06-14 17:52:06 -04:00
Richard Kenner
36f6ff0d2b (sbrk): Don't declare here.
From-SVN: r7468
1994-06-14 17:48:11 -04:00
Richard Kenner
06eb8e9262 (CONST_COSTS, case CONST_INT): Fix typo.
From-SVN: r7467
1994-06-14 17:46:43 -04:00
Richard Kenner
86270344f3 (staticp, case FUNCTION_DECL): A nested function isn't static.
From-SVN: r7466
1994-06-14 17:44:58 -04:00
Richard Kenner
761a3df02f (STARTFILE_SPEC): Don't force -static for -g.
From-SVN: r7465
1994-06-14 17:43:05 -04:00
Richard Kenner
9ad92d9bba (rs6000_override_options): Remove MPC620 cpu variants.
From-SVN: r7464
1994-06-14 17:41:17 -04:00
Richard Kenner
f6eb2a9ede (TARGET_SWITCHES): Remove -mpowerpc64 and -mno-powerpc64.
From-SVN: r7463
1994-06-14 17:40:57 -04:00
Richard Kenner
893bc85368 (reload): Process and accumulate needs for RELOAD_FOR_OPADDR_ADDR reloads.
When determining if needs are nongroup needs, ignore inactive or optional
reloads.
(reload_reg_used_in_op_addr_reload): New variable to indicate when reloads of
class RELOAD_FOR_OPADDR_ADDR are in use.
(mark_reload_reg_in_use, clear_reload_reg_in_use): Process reloads of class
RELOAD_FOR_OPADDR_ADDR.
(reload_reg_free_p, reload_reg_free_before_p, reloads_conflict): Likewise.
(choose_reload_regs): Support RELOAD_FOR_OPADDR_ADDR reloads.
(emit_reload_insns): Output RELOAD_FOR_OPADDR_ADDR reloads.

From-SVN: r7462
1994-06-14 17:37:25 -04:00
Richard Kenner
f98bb7d33f (find_reloads): Change secondary reloads of class
RELOAD_FOR_OPERAND_ADDRESS to RELOAD_FOR_OPADDR_ADDR.

From-SVN: r7461
1994-06-14 17:36:25 -04:00
Richard Kenner
ca8e02b0ff (RELOAD_FOR_OPADDR_ADDR): New reload class.
From-SVN: r7460
1994-06-14 17:36:02 -04:00
Richard Kenner
460dcab481 (find_a_file): Try EXECUTABLE_SUFFIX first, then file without the
suffix.

From-SVN: r7459
1994-06-14 17:34:01 -04:00
Richard Kenner
d008e26c41 (jump_optimize): Don't delete dead insn if it has a REG_RETVAL note.
From-SVN: r7458
1994-06-14 17:32:30 -04:00
Richard Kenner
1bc61c04f8 (xstrdup): Renamed from strdup.
(check_protection): Call xstrdup, not strdup.

From-SVN: r7457
1994-06-14 17:29:48 -04:00
Richard Kenner
3d5570cb0c Fix whitespace in pattern.
From-SVN: r7456
1994-06-14 17:28:37 -04:00
Richard Kenner
b57d3f55fe (output_prolog): Fix error in loading size of large stack frames.
From-SVN: r7455
1994-06-14 17:26:00 -04:00
Richard Kenner
c95c07325b (reload_as_needed): Clear spill_reg_store at start.
(emit_reload_insns): Omit erroneous predicate of reload
deletion -- reload_spill_index is not indexed by regno.

From-SVN: r7454
1994-06-14 17:23:53 -04:00
Ian Lance Taylor
86bb0d5f7b Wrap assert.h in extern "C" { }
From-SVN: r7453
1994-06-14 20:01:08 +00:00
Jeff Law
3480bb9842 jump.c (condjump_in_parallel_p): New function to detect conditional jumps within PARALLEL insns.
* jump.c (condjump_in_parallel_p): New function to detect
        conditional jumps within PARALLEL insns.
        (jump_optimize): Allow for some simple optimizations involving
        conditional jumps within PARALLEL insns.
        * reorg.c (get_jump_flags): Handle conditional jumps in PARALLEL
        insns.
        (get_branch_condition, fill_simple_delay_slots): Likewise.
        (fill_eager_delay_slots, relax_delay_slots, dbr_schedule): Likewise.

From-SVN: r7452
1994-06-14 13:18:43 -06:00
Jeff Law
36e2f858ba pa-osf.h (SIZE_TYPE): Define as "long unsigned int" to be compatable with system include files.
* pa-osf.h (SIZE_TYPE): Define as "long unsigned int" to be
	compatable with system include files.
	* pa1-osf.h (SIZE_TYPE): Likewise.

	* pa1-osf.h (WCHAR_TYPE): Define as "short unsigned int".
	(WCHAR_TYPE_SIZE): Define as 16 bits.

From-SVN: r7451
1994-06-14 13:16:07 -06:00
Jeff Law
d061684267 pa.c (output_arg_descriptor): Restore old behavior for SImode USE insns of FP registers (used by untyped call...
* pa.c (output_arg_descriptor): Restore old behavior for SImode
	USE insns of FP registers (used by untyped call support).

From-SVN: r7450
1994-06-14 13:14:26 -06:00
Richard Earnshaw
b5cc037f4b (arm_reload_out_hi): Rewrite.
(arm_reload_out_hi): Rewrite.  Add support for processors running in
big-endian mode.
(fp_immediate_constant): Fix typo in argument declaration.

From-SVN: r7449
1994-06-06 13:14:03 +00:00
Richard Earnshaw
fe241a29e3 (storehi_bigend): New expansion pattern.
(storeinthi): Rework to generate better code, add big-endian support.
(movhi): Add support for processors running in big-endian mode.
(movhi_bigend): New expansion pattern.
(matcher for movhi): Remove incorrect alternative for storing HImode to
memory.  Only match when little endian.
(matcher for big-endian movhi): New pattern.
(matchers/peepholes for extended pre/post increment HImode loads): Only
match when little-endian.
(matcher for operating on adjacent memory locations): Load operation into
arith operands.
(peepholes for extended pre-increment byte loads): New patterns.

From-SVN: r7448
1994-06-06 13:14:03 +00:00
Richard Earnshaw
9c8728721e (PROMOTE_MODE): Promote HImode integers as signed.
(BYTES_BIG_ENDIAN): Allow target description to override default.
(LOAD_EXTEND_OP): When big-endian, HImode loads are sign extended.

From-SVN: r7447
1994-06-06 13:14:03 +00:00
Doug Evans
88e7060674 (__gnuc_va_list): Use instead of va_list.
From-SVN: r7446
1994-06-05 01:06:20 +00:00
Doug Evans
e9e218294b (*): Use __gnuc_va_list, not va_list.
From-SVN: r7445
1994-06-05 01:05:11 +00:00
Richard Earnshaw
4eda77ec3e (FUNCTION_PROFILER): Delete duplicate definition.
(FUNCTION_PROFILER, TRAMPOLINE_TEMPLATE, ASM_FILE_START,
 ASM_OUTPUT_REG_{PUSH,POP}, PRINT_OPERAND_ADDRESS):  Output register
 prefix before any explicit register name.
(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
 ASM_OUTPUT_COMMON): Output the target dependent comment char.
(ASM_FILE_START): Output register alias for r10.
(REGISTER_NAMES): Output "r9" now for r9, not "rfp".
(ADDITIONAL_REGISTER_NAMES): New macro.

From-SVN: r7444
1994-06-04 11:17:23 +00:00
Richard Earnshaw
916cc8c5aa (all patterns explicitly mentioning regs): Output the target dependent prefix before the register name.
(all patterns explicitly mentioning regs): Output the target dependent
prefix before the register name.
(all patterns with asm comments): Output the target dependent comment
character.

From-SVN: r7443
1994-06-04 11:17:23 +00:00
Richard Earnshaw
1d5473cbe4 (print_multi_reg, output_call, output_call_mem,
output_mov_long_double_fpu_from_arm,
 output_mov_long_double_arm_from_fpu,
 output_mov_double_fpu_from_arm, output_mov_double_arm_from_fpu,
 output_return_instruction, output_func_{prologue,epilogue},
 arm_print_operand, output_load_symbol):  Print the register prefix
before each register name.
(output_func_prologue, output_lcomm_directive):  Output the target
dependent comment char for asm comments.

From-SVN: r7442
1994-06-04 11:17:23 +00:00
Doug Evans
b3de8b7505 (make_decl_rtl): If section attribute is being ignored, really ignore it.
From-SVN: r7441
1994-06-03 22:13:55 +00:00