Commit Graph

127 Commits

Author SHA1 Message Date
Jeff Law
2d7b2c36ac pa.c (emit_move_sequence): Also handle displacements which do not fit in 14 bits for fp load/store...
* pa.c (emit_move_sequence): Also handle displacements which
	do not fit in 14 bits for fp load/store secondary reloads.

From-SVN: r8769
1995-01-17 16:42:12 -07:00
Jeff Law
dddd8006ab Update copyright years.
From-SVN: r8729
1995-01-08 21:32:49 -07:00
Jeff Law
c47decad97 pa.h (enum processor_type): New enumeration describing the processor to schedule for (700, 7100, 7100LC).
* pa.h (enum processor_type): New enumeration describing the
	processor to schedule for (700, 7100, 7100LC).
	(pa_cpu_attr, TARGET_OPTIONS, OVERRIDE_OPTIONS): Define.
	(pa_cpu_string, pa_cpu): Provide extern decls.
	* pa.c (pa_cpu, pa_cpu_string): Provide definitions.
	(override_options): New function.
	(pa_adjust_cost): Handle PROCESSOR_7100 and PROCESSOR_7100LC
	scheduling.  Handle anti-dependendy cases involving fp division
	and sqrt.  Handle output dependencies correctly.  Break TYPE_FPMUL
	into TYPE_FPMULSGL and TYPE_FPMULDBL.
	* pa.md (cpu attribute): New attribute.
	Clean up comments for PROCESSOR_700 scheduling info.  Slightly
	simplify.  Make conditional on PROCESSOR_700.
	Add comments and scheduling information for PROCESSOR_7100 and
	PROCESSOR_7100LC.  Set types for instructions which use the shifter
	to "shift".  Explicitly set lengths and types for all instructions.
	Break type "fpmul" into "fmulsgl" and "fpmuldbl".

From-SVN: r8723
1995-01-07 00:59:42 -07:00
Jeff Law
808cfea199 * pa.c (output_movb): Fix ttypo.
From-SVN: r8693
1994-12-27 13:45:51 -07:00
Jeff Law
5bff1750e9 pa.h (readonly_section): During PIC code generation, put readonly data into the standard data section.
* pa.h (readonly_section): During PIC code generation, put
	readonly data into the standard data section.

	* pa.c (pic_label_operand): Disallow SYMBOL_REFs (constant data).

From-SVN: r8661
1994-12-17 01:43:03 -07:00
Jeff Law
f215b2f779 pa.c (output_call): When emitting an inline long-call...
* pa.c (output_call): When emitting an inline long-call, use LP%
	and RP% prefixes to get the function's address.

From-SVN: r8533
1994-11-20 22:59:27 -07:00
Jeff Law
923f781d83 pa.c (output_cbranch): Improve code for short backwards branch with an unfilled delay slot.
* pa.c (output_cbranch): Improve code for short backwards branch
	with an unfilled delay slot.
	(output_bb, output_dbra, output_movb): Likewise.

From-SVN: r8441
1994-11-15 10:12:02 -07:00
Jeff Law
a205e34b22 Jeff for Tege:
* pa.h (GO_IF_LEGITIMATE_ADDRESS): Allow
	(lo_sum (reg) (unspec (symref))).

	* pa.md (pic2_lo_sum): New pattern matching when -fPIC using UNSPEC.
	* pa.c (legitimize_pic_address): Generate an insn matching
	pic2_lo_sum when -fPIC.

	* pa.md (pic_highpart): Add missing mode for PLUS.
	(add_high_const): Likewise.

	* pa.md (matcher for plain lo_sum): Call abort if this happens
	when generating pic or PIC.

From-SVN: r8423
1994-11-10 23:11:14 -07:00
Jeff Law
279c9bde62 * Automatic generation of inline long call sequences when needed.
* pa.h (TARGET_LONG_CALLS): Delete.  Replace all uses of with
	TARGET_PORTABLE_RUNTIME.
	(TARGET_MILLICODE_LONG_CALLS): New target flag.
	* pa.c (output_function_prologue): Keep track of the total number
	of code bytes emitted for each source file.
	(output_call): Handle TARGET_PORTABLE_RUNTIME and millicode calls
	for TARGET_MILLICODE_LONG_CALLS.  Emit an inline long-call if
	needed.  If emitting an inline long-call, perform argument relocations
	before the call if they are needed, unfill the delay slot of the
	call if necessary.
	* pa.md (define_delay for millicode): Disable the delay slot if
	TARGET_MILLICODE_LONG_CALLS.
	(millicode insns and indirect calls): Properly compute length for
	both TARGET_PORTABLE_RUNTIME and TARGET_MILLICODE_LONG_CALLS.
	(call_internal_symref): Properly compute the length when more
	than 240000 bytes of code have already been output.  Take
	TARGET_MILLICODE_LONG_CALLS into account in the length
	computation.

From-SVN: r8422
1994-11-10 21:53:33 -07:00
Jeff Law
6bb36601f1 * PA PIC support.
* pa.c (secondary_reload_class): Refine.  Readonly data needs a
	secondary reload only during PIC generation.  Loading a floating
	point register with a constant requires a register from R1_REGS
	during -fPIC code generation.
	(read_only_operand): Constant pool entries are no longer read only
	during PIC code generation.
	(hppa_legitimize_address): If flag_pic is nonzero, then
	immediately call legitimize_pic_address.
	(emit_move_sequence): Call legitimize_pic_address to handle
	constant data.  Handle secondary reloads for PIC.  Use
	pic_label_operand rather than open coding the test.  Handle
	loading a LABEL_REF when generating PIC.
	(legitimzie_pic_address): Handle constant data addressing for PIC
	here.   Fix loading of symbolic addresses for -fPIC generation.
	(pic_label_operand): Renamed from pic_operand.  Handle any read
	only operand (such as constant data).  Reject function addresses,
	Accept SYMBOL_REF with the read-only bit set.  Generalize to
	handle (const (plus (reg) (int))).
	(finalize_pic): Delete unused function.
	(check_pic): Delete function.
	(pic_pc_rtx): Delete variable definition.
	(current_function_uses_pic_offset_table): Delete extern decl.
	(force_reg, validize_mem): Likewise.
        (output_global_address): Don't tack on "-$global$" when generating
        PIC code.
	(finalize_pic): Don't emit code for initialization of
	hppa_save_pic_table_rtx here.  Don't claim we USE
	pic_offset_table_rtx at function end.
	* pa.h (SELECT_RTX_SECTION): Define.  During PIC generation
	everything (in the constant pool) goes into the data space.
	(PRINT_OPERAND_ADDRESS): Handle CONST_INTs during PIC
	generation.  Handle LO_SUM address during -fPIC generation.
	(LEGITIMATE_CONSTANT_P): Reject function labels when generating
	PIC code.
	(GO_IF_LEGITIMATE_ADDRESS): Only accept pic_reg + SYMBOL_REF for
	-fpic.
	(EXTRA_SECTION_FUNCTIONS): For -fpic, use the TEXT section for
	constants to avoid GAS lossage.
	(OVERRIDE_OPTIONS): Delete.
	(PIC_OFFSET_TABLE_REG_CALL_CLOBBERED): Define.
	(FINALIZE_PIC): Delete definition.
	(INIT_EXPANDERS): Define.  Clear hppa_save_pic_table_rtx here.
	* pa.md: Use !flag_pic rather than calling check_pic.
	(HImode high and lo_sum): Only accept const_int_operands.
	(pic_load_label): Force output to be in %r1.
	(pic_highpart): New pattern.  Output must go into %r1.  More
	linker trickery.
	(symbolic high and lo_sum): Disallow during PIC	generation if
	source is a symbolic operand.  Handle CONST_INT LO_SUM during PIC
	generation.  Simplify.
	(define_split for symbolic_operand load): Do not accept a symbolic
	operand that is a pic_label_operand.
	(pic_load_label): Name this pattern.  Mask least significant bits
	and optimize when a simple label is within reach of an ldo.
	(call, call_value): Emit new-style USE information for
	pic_offset_table_rtx.  Emit code for initialization of
	hppa_save_pic_table_rtx and wrap it into push_topmost_sequence()
	and pop_topmost_sequence() calls.

From-SVN: r8419
1994-11-10 21:33:43 -07:00
Richard Kenner
8a149902a7 (non_hard_reg_operand): New function.
From-SVN: r8300
1994-10-18 08:38:54 -04:00
Jeff Law
2c51d187e0 pa.c (emit_move_sequence): Handle secondary reload when loading a constant into SAR.
* pa.c (emit_move_sequence): Handle secondary reload when loading
	a constant into SAR.

From-SVN: r8272
1994-10-14 17:27:02 -06:00
Jeff Law
42fbe27f77 pa.c (emit_move_sequence): Handle secondary FP load/store reloads of the form (subreg (mem (plus (reg)...
* pa.c (emit_move_sequence): Handle secondary FP load/store
	reloads of the form (subreg (mem (plus (reg) (disp)))).
	(secondary_reload_class): A secondary register is needed to handle
	out-of-range FP loads and stores.
	* pa.md (reload_indf, reload_outdf): New expanders.
	(reload_insf, reload_outsf): Likewise.

From-SVN: r8077
1994-09-13 10:41:03 -06:00
Jeff Law
2ebb1b4217 pa.c (hppa_expand_prologue): Avoid writing outside the current stack boundary in code to handle large stack...
* pa.c (hppa_expand_prologue): Avoid writing outside the current
	stack boundary in code to handle large stack frames.

From-SVN: r7926
1994-08-14 19:55:59 -06:00
Jeff Law
326bc2de1d pa.c (hppa_legitimize_address): Do nothing with function label arithmetic.
* pa.c (hppa_legitimize_address): Do nothing with function label
	arithmetic.
	(emit_move_sequence): Split up function label arithmetic so that
	function's address is loaded first, then constant part is added to
	the function's address.
	(is_function_label_plus_const): New function.

From-SVN: r7882
1994-08-09 00:03:07 -06:00
Richard Kenner
311b7cd795 (print_operand): Integer CONST_DOUBLE is DImode.
From-SVN: r7836
1994-07-30 15:06:58 -04: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
Jeff Law
f726ea7dd5 pa.h (TARGET_SWITCHES): Enable TARGET_LONG_CALLS when TARGET_PORTABLE_RUNTIME is enabled.
* pa.h (TARGET_SWITCHES): Enable TARGET_LONG_CALLS when
	TARGET_PORTABLE_RUNTIME is enabled.
	* pa.c (output_call): If TARGET_LONG_CALLS is enabled, then emit
	an inline long-call sequence.
	* pa.md (millicode define_delay): Disable delay slots if
	TARGET_LONG_CALLS.
	(call_internal_reg, call_value_internal_reg): If TARGET_LONG_CALLS
	is enabled, then emit an inline long-call sequence.  Fix length
	computation for TARGET_LONG_CALLS.
	(millicode calls): Fix length computation for TARGET_LONG_CALLS.

From-SVN: r7434
1994-06-02 21:06:45 -06:00
Torbjorn Granlund
80225b66a6 (emit_move_sequence): Add missing argument to symbolic_operand.
(output_block_move): Prefer addl to add.
(print_operand): Print fp regs with L suffix when appropriate.
(output_arg_descriptor): Rewrite to accomodate new convention for
USE information.
(compute_frame_size): Update for changed register numbers.
Simplify loops over general registers to stop at register 4.
(hppa_expand_prologue): Likewise.
(hppa_expand_epilogue): Likewise.

From-SVN: r7411
1994-06-01 00:38:18 +00:00
Jeff Law
2822d96ec1 pa.h (ASM_OUTPUT_LABEL): TARGET_GAS no longer needs trailing colons.
* pa.h (ASM_OUTPUT_LABEL): TARGET_GAS no longer needs trailing colons.
        (ASM_OUTPUT_INTERNAL_LABEL, ASM_OUTPUT_COMMON): Likewise.

        * pa.h (TARGET_PORTABLE_RUNTIME): Define.
        (TARGET_SWITCHES): Add -mportable-runtime and -mno-portable-runtime.
        (CUMULATIVE_ARGS): Now a "struct hppa_args" rathern than an int.
        All references changed.
        (INIT_CUMULATIVE_ARGS): Also initialize nargs_prototype.
        (INIT_CUMULATIVE_INCOMING_ARGS): Define.
        (FUNCTION_ARG_ADVANCE): Decrement nargs_prototype for each arg seen.
        (FUNCTION_ARG): Handle TARGET_PORTABLE_RUNTIME.
        (ASM_DECLARE_FUNCTION_NAME): Explicitly disallow argument relocations
        for TARGET_PORTABLE_RUNTIME.
        (ASM_OUTPUT_INT): Do not use a P% prefix for function references
        if TARGET_PORTABLE_RUNTIME.

        * pa.md (high and lo_sum for function addresses): Provide alternate
        definitions for TARGET_PORTABLE_RUNTIME.

        * pa.c (output_arg_descriptor): Explicitly disallow argument
        relocations for TARGET_PORTABLE_RUNTIME.

From-SVN: r6954
1994-03-31 23:09:25 -07:00
Torbjorn Granlund
23f6f34fca (Several places): Declare values from INTVAL(x) as HOST_WIDE_INT.
(uint32_operand): New function.
(output_block_move): Change unroll threshold from 64 to 32.
(compute_movstrsi_length): Corresponding change.
(print_operand): Don't call debug_rtx, just abort.
(initialize_pic): Delete.
(finalize_pic): Use PIC_OFFSET_TABLE_REGNUM rather than 19.

From-SVN: r6292
1993-12-24 03:10:48 +00:00
Jeff Law
14dc90724e pa.c (output_function_prologue): Use ASM_GENERATE_INTERNAL_LABEL rather than generating one on its own.
* pa.c (output_function_prologue): Use ASM_GENERATE_INTERNAL_LABEL
        rather than generating one on its own.

From-SVN: r6251
1993-12-21 11:06:48 -07:00
Jeff Law
3bf35ccb68 pa.c (compute_frame_size): Remove implicit assumption that %r4 is the frame pointer.
* pa.c (compute_frame_size): Remove implicit assumption that
	%r4 is the frame pointer.

From-SVN: r6247
1993-12-16 16:24:35 -07:00
Jeff Law
ba0bfdacea pa.c (output_function_prologue): Reverse last change.
* pa.c (output_function_prologue): Reverse last change.  Output
        both the function label and the .PROC here.
        * pa.h (ASM_DECLARE_FUNCTION_NAME): Do not output the function
        label or the .PROC here.

From-SVN: r6246
1993-12-16 14:14:18 -07:00
Jeff Law
9473a84ff3 pa.c (output_call): Put temporary label after the RP adjustment.
* pa.c (output_call): Put temporary label after the
        RP adjustment.  "- 8" adjustment is no longer necessary.

From-SVN: r6235
1993-12-14 16:00:41 -07:00
Jeff Law
081c2fafcf pa.c (output_function_prologue): Do not output the .PROC directive here.
* pa.c (output_function_prologue): Do not output the .PROC directive
	here.

	* pa.h (ASM_DECLARE_FUNCTION_NAME): Emit the .PROC immediately
	after the function's label.

From-SVN: r6233
1993-12-14 14:42:44 -07:00
Jeff Law
b0ce651a54 pa.c (secondary_reload_class): Function addresses no longer need secondary reloads.
* pa.c (secondary_reload_class): Function addresses no longer
	need secondary reloads.
	(emit_move_sequence): Special handling of function addresses is
	no longer needed.

From-SVN: r6228
1993-12-13 22:20:15 -07:00
Richard Kenner
77fc931316 (hppa_legitimize_address): If we can't legitimize, do nothing; don't
call abort.

From-SVN: r6191
1993-12-06 08:01:49 -05:00
Richard Stallman
0859592396 (output_dbra): Fix argument number in addi at end.
From-SVN: r5948
1993-10-30 20:33:33 +00:00
Torbjorn Granlund
669054c144 (emit_move_sequence): Fix typo, Pmode' was mode'.
From-SVN: r5924
1993-10-28 00:58:04 +00:00
Richard Stallman
3529be8371 (output_arg_descriptor): Do not stop searching if a USE
for the static link or struct value register is found.

From-SVN: r5879
1993-10-24 07:22:00 +00:00
Jeff Law
f1c7ce822f pa.c (legitimize_pic_address): Delete unused variables.
* pa.c (legitimize_pic_address): Delete unused variables.
	(output_block_move, output_ior): Likewise.
	(hppa_builtin_saveregs): Likewise.
	(emit_move_sequence): Add parens as suggested by -Wall.
	(compute_frame_size): Likewise.
	(output_ascii): Return type is "void".
	(hppa_expand_prologue, import_milli): Likewise.

From-SVN: r5726
1993-10-10 21:23:10 -06:00
Jeff Law
e8cfae5c8e pa.c (output_function_prologue): Pass the highest register number saved for ENTRY_GR and ENTRY_FR directives...
* pa.c (output_function_prologue):  Pass the highest register
	number saved for ENTRY_GR and ENTRY_FR directives rather
	than the number	of registers saved.
	(hppa_expand_prologue):  Account for %r4 when it's being
	used as a frame pointer.

From-SVN: r5718
1993-10-10 20:32:35 -06:00
Jeff Law
68386e1e3c pa.c (output_function_prologue): Pass on information about the number of callee saved general and floating point...
* pa.c (output_function_prologue): Pass on information about the
	number of callee saved general and floating point registers which
	are saved by the current function's prologue.
	(hppa_expand_prologue): Keep track of the number of callee
	register saves done for general and floating point registers.

From-SVN: r5641
1993-10-06 13:29:13 -06:00
Jeff Law
90c10ed896 * pa.c (compute_frame_size): Always align stack to 64 byte boundary.
From-SVN: r5209
1993-08-24 14:40:02 -06:00
Jeff Law
0a7dd6e79e pa.c (output_call): Use ASM_OUTPUT_INTERNAL_LABEL instead of output_asm_label.
* pa.c (output_call): Use ASM_OUTPUT_INTERNAL_LABEL instead
	of output_asm_label.

From-SVN: r5207
1993-08-24 12:03:33 -06:00
Jeff Law
1bc695cdac pa.c (emit_move_sequence): Check both reload_in_progress and reload_completed when...
* pa.c (emit_move_sequence): Check both reload_in_progress and
	reload_completed when choosing a scratch/temporary register.

From-SVN: r5180
1993-08-18 00:50:55 -06:00
Jeff Law
ba365a1952 pa.c (emit_move_sequence): Always handle secondary reloads for symbolic addresses.
* pa.c (emit_move_sequence): Always handle secondary reloads for
        symbolic addresses.
        (secondary_reload_class): Symbolic operands always need a secondary
        reload from R1_REGS if their target class is not R1_REGS.

From-SVN: r5178
1993-08-18 00:45:41 -06:00
Jeff Law
7426c95997 pa.c (hppa_legitimize_address): Rework address computation for x[n - m] so that problems with implicit space...
* pa.c (hppa_legitimize_address): Rework address computation
        for x[n - m] so that problems with implicit space register
        selection are avoided.

From-SVN: r5172
1993-08-18 00:28:39 -06:00
Jim Wilson
02892e0694 Add new parameter to move_block_from_reg calls.
From-SVN: r5018
1993-07-28 10:21:14 -07:00
Jeff Law
3f729fda85 pa.c (emit_move_sequence): Use cint_ok_for_move instead of checking each condition ourselves.
* pa.c (emit_move_sequence): Use cint_ok_for_move instead of
	checking each condition ourselves.

From-SVN: r4918
1993-07-14 10:28:04 -06:00
Jeff Law
2c4ff308b9 pa.c (output_call): New function to output a function call or millicode call...
* pa.c (output_call): New function to output a function call or
	millicode call, possibly with a jump in the delay slot.
	(output_mul_insn): Accept additional argument, use output_call.
	(output_div_insn): Likewise.
	(output_mod_insn): Likewise.
	(jump_in_call_delay): New function to determine if the given
	JUMP_INSN is in the delay slot of a call or millicode call.

From-SVN: r4915
1993-07-14 10:22:49 -06:00
Jeff Law
1400469c00 Fix typos in last change.
From-SVN: r4896
1993-07-09 17:36:57 -06:00
Jeff Law
a1b36964f8 pa.c (compute_movstrsi_length): Return length in bytes.
* pa.c (compute_movstrsi_length): Return length in bytes.
        (pa_adjust_insn_length): Return adjustment in bytes.
        (output_cbranch): Handle lengths as bytes.
        (output_bb, output_dbra, output_movb): Likewise.

From-SVN: r4890
1993-07-09 14:29:36 -06:00
Jeff Law
b1a275e1e0 pa.c (pa_adjust_insn_length): dbra and movb insns which have their output in a FP register do not need adjustment.
* pa.c (pa_adjust_insn_length): dbra and movb insns which have
        their output in a FP register do not need adjustment.
        (output_cbranch, output_bb): Handle conditional jump to the
        following instruction.
        (output_dbra): New function extracted from dbra pattern.
        (output_movb): New function.
        (eq_neq_comparison_operator): New function.
        (movb_comparison_operator): New function.

From-SVN: r4888
1993-07-09 14:22:50 -06:00
Jeff Law
b9821af87b pa.c (pa_adjust_insn_length): Rewrite so that it only adjusts insns which really need adjustment.
* pa.c (pa_adjust_insn_length): Rewrite so that it only adjusts
        insns which really need adjustment.
        (output_cbranch): Rework so that output templates are simpler.
        Use shorter sequence for long backwards conditional branches with
        a filled delay slot that is nullified.  More agressively use "skip"
        instructions.  More agressively nullify the delay slot if nothing
        useful could be placed there.
        (output_bb): Likewise.
	(forward_branch_p): New function.

From-SVN: r4875
1993-07-07 14:40:06 -06:00
Jeff Law
9c9a6f426c * pa.c (call_operand_address): Do not accept registers anymore.
From-SVN: r4836
1993-07-03 16:55:17 -06:00
Jeff Law
22d6e660fe pa.c (output_arg_descriptor): Reverse polarity of test for HP_FP_ARG_DESCRIPTOR_REVERSED.
* pa.c (output_arg_descriptor): Reverse polarity of test for
	HP_FP_ARG_DESCRIPTOR_REVERSED.
	* pa.h (ASM_DOUBLE_ARG_DESCRIPTORS): Likewise.

From-SVN: r4817
1993-07-01 13:22:47 -06:00
Jeff Law
da3c33362d pa.c (output_function_prologue): Emit SAVE_SP flag if a frame pointer is needed.
* pa.c (output_function_prologue): Emit SAVE_SP flag if a frame
	pointer is needed.

From-SVN: r4804
1993-06-30 11:43:20 -06:00
Jeff Law
3c84bf1b0f pa.c (singlemove_string): Use zdepi and ldil to load constants into registers when appropriate.
* pa.c (singlemove_string): Use zdepi and ldil to load constants
	into registers when appropriate.

From-SVN: r4799
1993-06-29 20:28:38 -06:00