Commit Graph

426 Commits

Author SHA1 Message Date
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
58bbca8efb pa.md (call expander): Use emit_insn_before to emit an insn to save the PIC register before a function...
* pa.md (call expander): Use emit_insn_before to emit an insn to
	save the PIC register before a function call.
	(call_value expander): Likewise.

From-SVN: r8718
1995-01-04 02:26:45 -07:00
Jeff Law
ffa8b8294b pa.h (DO_GLOBAL_DTORS_BODY): Define.
* config/pa/pa.h (DO_GLOBAL_DTORS_BODY): Define.  Include a
	reference to __gcc_plt_call so __gcc_plt_call always appears in
	executables which reference __main.

From-SVN: r8702
1994-12-28 20:06:00 -07:00
Jeff Law
65b70401ce * config/pa/t-pa (LIB2FUNCS_EXTRA): Define.
From-SVN: r8701
1994-12-28 20:05:51 -07:00
Jeff Law
22d46b2ef8 Initial revision
From-SVN: r8700
1994-12-28 20:05:41 -07:00
Jeff Law
808cfea199 * pa.c (output_movb): Fix ttypo.
From-SVN: r8693
1994-12-27 13:45:51 -07:00
Jeff Law
3ab7aa1238 * pa.md (pic2_highpart): Accept readonly operands.
From-SVN: r8665
1994-12-18 19:54:42 -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
27efbf21c8 pa.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Don't emit a ".text" pseudo-op...
* pa.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Don't emit a ".text"
	pseudo-op, we already make sure we're in the right space/subspace.

From-SVN: r8656
1994-12-15 13:24:05 -07:00
Jeff Law
451d86c293 pa.h (DEFAULT_PCC_STRUCT_RETURN): Define as zero.
* pa.h (DEFAULT_PCC_STRUCT_RETURN): Define as zero.
	(RETURN_IN_MEMORY): Only large structs (>8 bytes) and addressable
	structs should be returned in memory.
	ci -u calls.c

From-SVN: r8573
1994-11-28 22:43:47 -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
Jason Merrill
68d69835ac Shared library support.
From-SVN: r8519
1994-11-19 04:09:58 +00: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
ce3b287975 * config/pa/t-pa (INSTALLED_H): Delete.
From-SVN: r8437
1994-11-14 21:59:14 -07:00
Jeff Law
e26268c2de x-pa (TAROUTOPTS): Delete.
* config/pa/x-pa (TAROUTOPTS): Delete.  It was an HPUX host
	conditional, and x-pa is a BSD host target fragment.
	(INSTALL_HEADERS): Define.
	(STMP_FIXPROTO): Define.

From-SVN: r8436
1994-11-14 21:56:03 -07:00
Jeff Law
7cc28e24ca pa-hiux.h: Include "pa/pa-hpux.h" and just override the CPP predefines.
* config/pa/pa-hiux.h: Include "pa/pa-hpux.h" and just override
	the CPP predefines.
	(CPP_PREDEFINES): Add -A assertions.
	* config/pa/{pa1-hiux.h, pa-ghiux.h, pa1-ghiux.h}: Likewise.

From-SVN: r8435
1994-11-14 21:52:54 -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
ba25ac36a7 pa.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Define.
* pa.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Define.
	(ASM_FILE_END): Delete unneeded definition.

From-SVN: r8421
1994-11-10 21:41:55 -07:00
Jeff Law
105ce113ec * Fast indirect call support.
* pa.h (TARGET_FAST_INDIRECT_CALLS): New target switch.
	(TARGET_SWITCHES): Add "fast-indirect-calls" and inverse.
	* pa.md (call_internal_reg, call_value_internal_reg): Generate
	appropriate code for TARGET_FAST_INDIRECT_CALLS.

From-SVN: r8420
1994-11-10 21:38:40 -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
3913f03a60 (add_high_const): Add missing mode for PLUS.
From-SVN: r8376
1994-11-01 18:50:47 -05:00
Jason Merrill
f85fd079f1 Back out previous change.
From-SVN: r8329
1994-10-20 22:06:20 +00:00
Jason Merrill
f311b28076 (NM_FLAGS): Define to "-h" (SysV output, no header).
(COLLECT_QUALIFY_MATCH): Define to ignore all symbols of types other
        than code.
        (REAL_NM_FILE_NAME): Define to "/bin/nm" to force use of the vendor nm.

From-SVN: r8316
1994-10-19 22:09:20 +00:00
Richard Kenner
0fc4f91130 Remove previous change.
(reload_{in,out}*): Replace general_operand with non_hard_reg_operand.

From-SVN: r8301
1994-10-18 08:39:40 -04:00
Richard Kenner
8a149902a7 (non_hard_reg_operand): New function.
From-SVN: r8300
1994-10-18 08:38:54 -04:00
Jeff Law
5c162a8a5c pa.md (reload_insi, [...]): Expanders deleted.
* pa.md (reload_insi, reload_outsi): Expanders deleted.
	(reload_indf, reload_outdf, reload_indi, reload_outdi): Likewise.
	(reload_insf, reload_outsf): Likewise.

From-SVN: r8298
1994-10-17 22:14:19 -06: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
Jason Merrill
c17704b310 (COLLECT_SUPPRESS_OPTIONS): Define to "E".
From-SVN: r8154
1994-09-28 00:11:55 +00: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
Richard Kenner
4b303b50bc (ADA_CFLAGS): New override.
From-SVN: r8076
1994-09-12 18:15:28 -04:00
Jeff Law
667f675947 pa.h (FUNCTION_ARG): Use indirect calling conventions when TARGET_LONG_CALLS is in effect.
* pa.h (FUNCTION_ARG): Use indirect calling conventions when
	TARGET_LONG_CALLS is in effect.

From-SVN: r7957
1994-08-21 21:15:12 -06:00
Jeff Law
6b2821189a pa.h (ASM_OUTPUT_ALIGNED_COMMON, [...]): Define.
* pa.h (ASM_OUTPUT_ALIGNED_COMMON, ASM_OUTPUT_ALIGNED_LOCAL):
	Define.
	(ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Delete.

From-SVN: r7927
1994-08-14 19:57:21 -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
8d768fa2ae pa.md (default set high): Do not accept function label arithmetic as a valid operand.
* pa.md (default set high): Do not accept function label arithmetic
	as a valid operand.
	(default lo_sum): Likewise.

From-SVN: r7883
1994-08-09 00:03:07 -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
Jeff Law
b93f0d4924 pa-ghpux.h, pa-hpux.h (LINK_SPEC): Any -g argument implies static linking.
* pa-ghpux.h, pa-hpux.h (LINK_SPEC): Any -g argument implies
	static linking.

From-SVN: r7843
1994-08-01 03:21:48 -06:00
Richard Kenner
311b7cd795 (print_operand): Integer CONST_DOUBLE is DImode.
From-SVN: r7836
1994-07-30 15:06:58 -04:00
Torbjorn Granlund
b87ef81e35 (USE_C_ALLOCA): Define.
From-SVN: r7759
1994-07-13 11:09:55 +00:00
Jeff Law
a08e749380 pa.h (GO_IF_LEGITIMATE_ADDRESS): Only allow immediate addressing using 5 bits to avoid losing with FP loads and...
* pa.h (GO_IF_LEGITIMATE_ADDRESS): Only allow immediate addressing
        using 5 bits to avoid losing with FP loads and stores on page zero.

From-SVN: r7752
1994-07-12 14:23:58 -06:00
Jeff Law
6a5c0a8e26 pa.h (DEBUGGER_ARG_OFFSET): Define.
* pa.h (DEBUGGER_ARG_OFFSET): Define.  If no frame pointer
        is available, then adjust the offset by the size of the
        current frame.

From-SVN: r7713
1994-07-11 14:45:30 -06:00
Jeff Law
bd1fd7fbda pa.md (define_split for (plus (reg) (large_constant))): Treat large_constant as signed.
* pa.md (define_split for (plus (reg) (large_constant))): Treat
	large_constant as signed.

From-SVN: r7583
1994-06-28 10:42:26 -06:00
Jeff Law
2e7e71216f pa.h (DEBUGGER_AUTO_OFFSET): Define.
* pa.h (DEBUGGER_AUTO_OFFSET): Define.  If no frame pointer
	is available, then adjust the offset by the size of the current
	frame.

From-SVN: r7509
1994-06-16 23:43:06 -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
Torbjorn Granlund
5345f91a0b (FP_REGNO_P): New macro for intra file usage.
(REGNO_OK_FOR_FP_P): Use FP_REGNO_P.
(FUNCTION_VALUE_REGNO_P): Revert last change.
(CONDITIONAL_REGISTER_USAGE): Partially revert last changes;
Make non-existing 1.0 fp regs fixed, including odd-numbered regs.
(enum reg_class): Get rid of SNAKE_FP_REGS, GENERAL_OR_SNAKE_FP_REGS,
and NON_SHIFT_REGS.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
(REGNO_REG_CLASS): Likewise.
(HARD_REGNO_MODE_OK): Corresponding changes.  Don't force 1.0 fpregs
to even regno here; fixed_regs does the job better.
(FP_REG_CLASS_P): Get rid of SNAKE_FP_REGS.
(REG_CLASS_FROM_LETTER, case 'z'): Deleted.
(HARD_REGNO_NREGS): Partially revert last change.
(CLASS_MAX_NREGS): Partially revert last change.

From-SVN: r7438
1994-06-03 19:50:48 +00:00
Torbjorn Granlund
0b27d5ddb2 (mulsi3): Use MATCH_DUP for op3, not MATCH_OPERAND.
(globally): Delete 'x' constraint or change it to 'f', as apropriate.

From-SVN: r7437
1994-06-03 19:50:04 +00: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
Jeff Law
b99e1ee9e9 * pa.h (ASM_DECLARE_FUNCTION_NAME): Fix typo.
From-SVN: r7433
1994-06-02 20:43:15 -06:00
Torbjorn Granlund
a40ed31be5 (SECONDARY_MEMORY_NEEDED): Simplify.
(ADDITIONAL_REGISTER_NAMES): Define.
(CONDITIONAL_REGISTER_USAGE): Make PIC_OFFSET_TABLE_REGNUM fixed
again.
(FIRST_PSEUDO_REGISTER): Now 89.
(FIXED_REGISTERS): Delete 1.0 fp registers,
(CALL_USED_REGISTERS): Likewise.
(CONDITIONAL_REGISTER_USAGE): Almost deleted.
(REG_ALLOC_ORDER): Update register numbers.
(HARD_REGNO_NREGS): Delete special case for 1.0 fp registers.
(HARD_REGNO_MODE_OK): Rewrite.  Don't allow use of odd fp registers
(enum reg_class): Delete HI_SNAKE_FP_REGS and FP_OR_SNAKE_FP_REGS.
(REG_CLASS_NAMES): Corresponding change.
(REG_CLASS_CONTENTS): Delete HI_SNAKE_FP_REGS and
FP_OR_SNAKE_FP_REGS.  Make SNAKE_FP_REGS class contain all fp
registers.  Update all values for changed register numbering.
(REGNO_REG_CLASS): Corresponding changes.
(REG_CLASS_FROM_LETTER): Delete 'y'.
(FP_REG_CLASS_P): No longer test HI_SNAKE_FP_REGS.
(CLASS_MAX_NREGS): Delete special case for 1.1 fp registers.
(FUNCTION_VALUE): Remove TARGET_SNAKE conditionals.
(LIBCALL_VALUE): Likewise.
(FUNCTION_ARG_REGNO_P): Likewise.
(FUNCTION_VALUE_REGNO_P): Likewise.  Add registers 29 and 33.
(FUNCTION_ARG): Remove TARGET_SNAKE conditionals.  Update register
numbers.
(REGNO_OK_FOR_FP_P): Update register number.
(REGISTER_NAMES): Delete special entries for 1.0 fp registers.
(DBX_REGISTER_NUMBER): Likewise.

From-SVN: r7412
1994-06-01 00:39:40 +00:00