Commit Graph

543 Commits

Author SHA1 Message Date
Jeff Law
2c7ee1a641 calls.c (expand_call): Remove current_call_is_indirect nonsense.
* calls.c (expand_call): Remove current_call_is_indirect nonsense.
	Add additional argument to INIT_CUMULATIVE_ARGS.
	(emit_library_call): Likewise.
	(emit_library_call_value): Likewise.
	* expr.c (expand_builtin): Likewise.
	* function.c (assign_parms): Likewise.
	* cp/method.c (emit_thunk): Likewise.
	* config/pa/pa.h (hppa_args): New field "indirect".
	(INIT_CUMULATIVE_ARGS): Initialize "indirect" field.
	(FUNCTION_ARG): Check "indirect" field, rather than
	"current_call_is_indirect".
	* All other backends updated with new argument to
	INIT_CUMULATIVE_ARGS

From-SVN: r11641
1996-03-29 07:37:11 -07:00
Jeff Law
31d4f31fd7 pa.c (hppa_legitimize_address): Don't lose for (plus (plus (mult (A) (shadd_const)) (B)) (C)) if...
* pa.c (hppa_legitimize_address): Don't lose for
        (plus (plus (mult (A) (shadd_const)) (B)) (C)) if
        B + C isn't a valid address for indexing.
        (basereg_operand): Only accept base registers after
        cse has completed.  Don't accept the frame pointer if
        it's likely to be eliminated.
        * pa.md (unscaled indexing patterns): Add variants with
        basereg and index register reversed.
        (HImode and QImode loads): Add zero extended variants.

From-SVN: r11625
1996-03-28 10:14:41 -07:00
Jeff Law
c2827c50df pa.c (hppa_legitimize_address): Don't lose for x[n-const] when n-const will not be shifted.
* pa.c (hppa_legitimize_address): Don't lose for x[n-const]
        when n-const will not be shifted.  Don't pessimize code for
        x[n-const] when const is small.

From-SVN: r11579
1996-03-20 11:15:13 -07:00
Jeff Law
d6e35c2d34 pa.c (compute_frame_size): Update comments to reflect reality.
* pa.c (compute_frame_size): Update comments to reflect reality.
        (hppa_expand_prologue): Don't save registers which aren't
        used, even if it creates holes.  Partially undoes changes from
        early March.
        (hppa_expand_epilogue): Likewise.

From-SVN: r11567
1996-03-19 11:57:24 -07:00
Jeff Law
80363f0d97 pa.h (ASM_DECLARE_FUNCTION_NAME): Change TYPE_NEEDS_CONSTRUCTING to TREE_ADDRESSABLE.
* pa/pa.h (ASM_DECLARE_FUNCTION_NAME): Change TYPE_NEEDS_CONSTRUCTING
        to TREE_ADDRESSABLE.  From Jim Wilson.

From-SVN: r11527
1996-03-13 23:54:34 -07:00
Jeff Law
ddaf4c9114 lib2funcs.asm: Remove entry/exit routines.
* lib2funcs.asm: Remove entry/exit routines.  Move them into...
        * ee.asm: New file.  Entry/exit code.
        * ee_fp.asm: New file.  Entry/exit code with frame pointer.
        * t-pa: Corresponding changes.
        * t-pro: Corresponding changes.

From-SVN: r11491
1996-03-07 10:38:08 -07:00
Jeff Law
9e9b00600b Initial revision
From-SVN: r11490
1996-03-07 10:34:53 -07:00
Jeff Law
99561ab6ee cd config/pa
* pa.c: Fix misc small typos/thinkos in recent changes.

From-SVN: r11489
1996-03-07 08:38:43 -07:00
Jeff Law
077fbf9ea3 * t-pro (dp-bit rule): Fix typo.
From-SVN: r11488
1996-03-06 19:46:06 -07:00
Jeff Law
e63ffc3836 lib2funcs.asm (__outline_prologue): Remove frame pointer support.
* lib2funcs.asm (__outline_prologue): Remove frame pointer
        support.
        (__outline_prologue_fp): Out of line prologue with frame pointer.
        (__outline_epilogue, outline_epilogue_fp): Similarly.
        * pa.c (compute_frame_size): Allocate enough space to avoid holes
        in the callee register saves.  Remove some special handling of %r3.
        (hppa_expand_prologue): Don't do an out of line prologue/epilogue
        if it would take more insns than an inline prologue/epilogue.
        Don't leave holes in the callee register save set.
        (hppa_expand_prologue): Corresponding changes.  Pass stack size
        to out of line epilogue code.
        * pa.h (FRAME_POINTER_REQUIRED): Revert last change.
        * pa.md (outline_prologue_call): Handle outline prologues which
        don't need frame pointers.
        (outline_epilogue_call): Similarly.
        * t-pro: Reenable multilib code.  Build a set of libraries that
        optimize for space.

From-SVN: r11483
1996-03-06 13:18:32 -07:00
Jeff Law
8c5b059c2d Fix typo in last change.
From-SVN: r11457
1996-03-05 09:30:04 -07:00
Jeff Law
9e18f57555 lib2funcs.asm (__outline_prologue): New "function".
* lib2funcs.asm (__outline_prologue): New "function".
        (__outline_epilogue): New "function".
        * pa.h (TARGET_SPACE): Define.
        (target_flags): Add -mspace and -mno-space.  Enable/disable
        space saving optimizations.
        (FRAME_POINTER_REQUIRED): Frame pointers are always required
        when generating out of line prologues and epilogues.
        * pa.c (compute_frame_size): Handle out of line prologues/epilogues.
        (hppa_expand_prologue): If optimizing for space, emit an out of
        line prologue.
        * pa.c (compute_frame_size): Handle out of line prologues/epilogues.
        (hppa_expand_prologue): If optimizing for space, emit an out of
        line prologue.
        (hppa_expand_epilogue): Similarly.
        (override_options): Optimizing for space is not compatable with
        either profiling or PIC code generation.
        * pa.md (outline_prologue_call): New pattern.
        (outline_epilogue_call): Likewise.

From-SVN: r11438
1996-03-05 00:34:13 -07:00
Jeff Law
c3d4f633e6 pa.h (TARGET_SWITCHES): Add new flags "-mlong-load-store" and "-mno-long-load-store".
* pa.h (TARGET_SWITCHES): Add new flags "-mlong-load-store" and
        "-mno-long-load-store".
        (TARGET_LONG_LOAD_STORE): Define.
        * pa.md (symbolic high part): Handle TARGET_LONG_LOAD_STORE.

From-SVN: r11384
1996-02-29 11:17:35 -07:00
Doug Evans
f7093a42ad pa.h (EXTRA_SECTIONS): Delete in_bss.
* pa/pa.h (EXTRA_SECTIONS): Delete in_bss.
	(EXTRA_SECTION_FUNCTIONS): Delete bss_section.

From-SVN: r11379
1996-02-29 03:12:52 +00:00
Jeff Law
f2be3a724b Fix typo in last change.
From-SVN: r11348
1996-02-26 10:29:16 -07:00
Jeff Law
77c872735a * pa.md (abssi2): Rework to avoid matching constraints.
From-SVN: r11344
1996-02-24 00:04:43 -07:00
Jeff Law
0eba3d300d pa.c (override_options): Warn if both PIC code generation and profiling are requested.
* pa.c (override_options): Warn if both PIC code generation and
        profiling are requested.

From-SVN: r11343
1996-02-23 09:23:13 -07:00
Jeff Law
1144563fbc pa.h (DBX_CONTIN_LENGTH): Define to 4000 characters.
* pa.h (DBX_CONTIN_LENGTH): Define to 4000 characters.

        * pa.c (hppa_expand_epilogue): Always emit a blockage insn
        before cutting back the stack.

From-SVN: r11327
1996-02-20 12:22:49 -07:00
Jeff Law
d177a3ef11 pa.md (floatunssisf2 expander): Don't use "general_operand".
* pa.md (floatunssisf2 expander): Don't use "general_operand".
        (floatunssidf2 expander): Likewise.

From-SVN: r11181
1996-02-07 23:12:24 -07:00
Jeff Law
cda0f51eb5 pa.md (various patterns): Avoid using "general operand" in define_insn patterns.
* pa.md (various patterns): Avoid using "general operand" in
	define_insn patterns.

From-SVN: r11176
1996-02-06 13:14:33 -07:00
Jeff Law
2029eca3a3 pa-pro.h (TARGET_DEFAULT): Turn on TARGET_SOFT_FLOAT by default for all pro targets.
* pa-pro.h (TARGET_DEFAULT): Turn on TARGET_SOFT_FLOAT by
        default for all pro targets.
        * t-pro: Delete all multilib references.

From-SVN: r11156
1996-02-01 19:50:29 -07:00
Jeff Law
981e5cd940 * pa.h (STACK_BOUNDARY): Bring back down to 64bits.
From-SVN: r10973
1996-01-13 23:03:38 -07:00
Jeff Law
305123ba4b pa.md (pre_ldwm): Fix bug exposed by recent changes.
* pa.md (pre_ldwm): Fix bug exposed by recent changes.
        Simplify.
        (pre_stwm, post_ldwm, post_stwm): Likewise.
        (HImode and QImode variants): Likewise.
        * pa.c (hppa_expand_prologue): Corresponding changes.
        (hppa_expand_epilogue): Likewise.

        * pa.c (hppa_legitimize_address): Generate more indexing
        address modes.

From-SVN: r10972
1996-01-13 21:15:10 -07:00
Jeff Law
18a686c082 * pa.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Call text_section.
From-SVN: r10938
1996-01-03 00:43:56 -07:00
Jeff Law
98d654f60c pa.h (REG_ALLOC_ORDER): Allocate PA1.1 caller-saved FP regs before PA1.0 caller-saved FP regs.
* pa.h (REG_ALLOC_ORDER): Allocate PA1.1 caller-saved FP regs
        before PA1.0 caller-saved FP regs.

From-SVN: r10919
1995-12-31 14:34:11 -07:00
Jeff Law
7c4a1f088f sched.c (adjust_priority): Use ADJUST_PRIORITY if its defined.
* sched.c (adjust_priority): Use ADJUST_PRIORITY if its defined.

        * pa.h (ADJUST_PRIORITY): Define to keep lifetimes of registers
        that will be allocated to %r1 shorter.

From-SVN: r10918
1995-12-31 13:48:17 -07:00
Jeff Law
3ba1236fc8 pa.c (output_function_epilogue): Use assemble_integer rather than calling ASM_OUTPUT_INT directly.
* pa.c (output_function_epilogue): Use assemble_integer rather
        than calling ASM_OUTPUT_INT directly.
        * pa.h (ASM_OUTPUT_INT): Use plabels for everything in the
        exception table section.

        * pa.c (print_operand): Don't call fprintf to output a register
        name.  Use fputs instead.

From-SVN: r10861
1995-12-24 22:46:32 -07:00
Jeff Law
435b1237b1 pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Strip any name encoding on the section name.
* pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Strip any name encoding
        on the section name.

From-SVN: r10860
1995-12-24 20:22:10 -07:00
Jeff Law
bad883f8a1 pa.c (output_move_double): Correctly identify and handle overlapping moves.
* pa.c (output_move_double): Correctly identify and handle
        overlapping moves.
        * pa.md (movdi patterns): Eliminate earlyclobbers in mem<->gr
        cases.
        (movdf patterns): Likewise.

From-SVN: r10837
1995-12-23 10:25:00 -07:00
Richard Kenner
c34d858fbb (emit_move_sequence): Don't try to set REGNO_POINTER_FLAG for a SUBREG.
From-SVN: r10834
1995-12-22 17:40:00 -05:00
Jeff Law
b0c418b5ad pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Don't surround section names with '$'.
* pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Don't surround section names
        with '$'.  That confuses collect2.
        (ASM_OUTPUT_SECTION_NAME): Likewise.

From-SVN: r10794
1995-12-17 23:13:50 -07:00
Jeff Law
c0bd9b2439 * pa.c (override_options): Make 7100 scheduling the default.
From-SVN: r10792
1995-12-17 12:38:24 -07:00
Jeff Law
0f05dcc2c2 * pa.md: Add 2nd reload peephole somehow omitted from Nov27 changes.
From-SVN: r10791
1995-12-17 12:32:56 -07:00
Jeff Law
2e742d899d pa.md (millicode delay slot description): Remove reference to defunct TARGET_MILLICODE_LONG_CALLS.
* pa.md (millicode delay slot description): Remove reference
        to defunct TARGET_MILLICODE_LONG_CALLS.

From-SVN: r10694
1995-12-09 23:07:52 -07:00
Jason Merrill
6e94a50355 (TARGET_LIBGCC2_CFLAGS): Use -fPIC.
From-SVN: r10678
1995-12-05 03:26:37 +00:00
Jeff Law
953776a3f5 FIx typo in last change.
From-SVN: r10672
1995-12-04 14:26:00 -07:00
Jeff Law
a688adc783 pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Handle arbitrary sections.
* pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Handle arbitrary sections.
        (ASM_OUTPUT_SECTION_NAME): Define.

From-SVN: r10667
1995-12-03 18:58:44 -07:00
Jeff Law
8b68935bb7 Fix typos/thinkos in fprintf->fputs changes.
From-SVN: r10666
1995-12-03 12:27:44 -07:00
Jeff Law
e236a9ff68 pa.h: Replace many uses of fprintf with fputs.
* pa.h: Replace many uses of fprintf with fputs.
        * pa.c: Likewise.
        * pa-pro.h: Likewise.

        * pa.h (SECONDARY_RELOAD_CLASS): Don't call secondary_reload_class
        to handle trivial cases.
        * pa.c (secondary_reload_class): Rework to be more efficient.

From-SVN: r10664
1995-12-02 22:33:31 -07:00
Jeff Law
141b2e9f05 pa.md (define split for (plus (reg) (large_constant)): Try another way to handle this with only 2 insns.
* pa.md (define split for (plus (reg) (large_constant)): Try
        another way to handle this with only 2 insns.  From Tege.

From-SVN: r10616
1995-11-28 10:49:46 -07:00
Jeff Law
1ace9b6052 Initial revision
From-SVN: r10615
1995-11-27 15:10:51 -07:00
Jeff Law
b01c45558a Update copyrights.
From-SVN: r10614
1995-11-27 15:01:57 -07:00
Jeff Law
ad238e4b39 pa.h (ASM_OUTPUT_EXTERNAL): Don't let assemble_name clobber the value of TREE_SYMBOL_REFERENCED.
* pa.h (ASM_OUTPUT_EXTERNAL): Don't let assemble_name clobber
	the value of TREE_SYMBOL_REFERENCED.

	* pa-ghpux9.h (LINK_SPEC): Pass "-z" to the linker to enable
	trap on null pointer dereference for programs built on hpux9.
	* pa-hpux9.h, pa1-ghpux9.h, pa1-hpux9.h: Likewise.

	* pa.c (output_function_prologue): No longer need to keep
	track of the total number code bytes when TARGET_GAS &&
	not TARGET_PORTABLE_RUNTIME.
	* pa.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Use .NSUBSPA when
	not TARGET_PORTABLE_RUNTIME.
	(ASM_OUTPUT_FUNCTION_PREFIX): Define.  Prefix functions with
	.NSUBSPA when TARGET_GAS and not TARGET_PORTABLE_RUNTIME.

	* pa.md (symbolic high patterns): Use 'H' to print the symbolic
	address so that the constant part gets rounded.
	* pa.c (print_operand): Handle 'H' operand for high part of a
	symbolic address with a rounded constant.
	(output_global_address): New argument "rounded_constant".  All
	callers changed appropriately.

	* x-pa-hpux (FIXPROTO_DEFINES): Add -D_HPUX_SOURCE.

	* pa.h (CPP_SPEC): Only pass -D_HPUX_SOURCE and -D_HIUX_SOURCE if
	-ansi is not present.
	(CPP_PREDEFINES): Remove -D_HPUX_SOURCE and/or -D_HIUX_SOURCE.
	* pa-ghiux.h (CPP_PREDEFINES): Likewise.
	* pa-gux7.h (CPP_PREDEFINES): Likewise.
	* pa-hiux.h (CPP_PREDEFINES): Likewise.
	* pa-hpux.h (CPP_PREDEFINES): Likewise.
	* pa-hpux7.h (CPP_PREDEFINES): Likewise.
	* pa1-ghiux.h (CPP_PREDEFINES): Likewise.
	* pa1-hiux.h (CPP_PREDEFINES): Likewise.

	* pa-hpux.h (LINK_SPEC): If -mlinker-opt, then pass -O to the
	linker.
	* pa-ghpux.h, pa-hpux9.h, pa-ghpux9.h: Likewise.
	* pa1-ghpux9.h, pa1-hpux9.h: Likewise.
	* pa.h (LINK_SPEC): Likewise.
	(TARGET_SWITCHES): Add -mlinker-opt.

	* pa.md (all peepholes): Disable if TARGET_SOFT_FLOAT.

	* pa.c (pa_reorg): If TARGET_GAS, then emit insns to mark
	the beginning and end of the branch table.
	* pa.md (begin_brtab): New insn.  Just a marker so GCC knows
	where to put the .begin_brtab pseudo-op.
	(end_brtab): Similarly.

	* pa.h (EXTRA_SECTIONS): Add in_ctors and in_dtors if
	CTORS_SECTION_FUNCTION is defined.  Else define dummy
	versions of CTORS_SECTION_FUNCTION and DTORS_SECTION_FUNCTION.
	(EXTRA_SECTION_FUNCTIONS): Add CTORS_SECTION_FUNCTION and
	DTORS_SECTION_FUNCTION.

	* pa.md: Add peepholes to improve spill code generated
	by reload when we run out of FP registers.

From-SVN: r10612
1995-11-27 01:31:46 -07:00
Jeff Law
4f26a76615 * xm-pa.h: Remove spurious double-quote.
From-SVN: r10611
1995-11-27 00:58:32 -07:00
Jeff Law
6a73009d9d pa.md (call expanders): For indirect calls, load %r22 with the function's address.
* pa.md (call expanders): For indirect calls, load %r22 with the
	function's address.
	(indirect call patterns): No need to copy the call address into
	%r22 anymore.

	* pa.c (output_cbranch): Fix buglet in length handling of
	backwards branches with unfilled delay slots.
	(output_bb, output_bvb, output_dbra, output_movb): Likewise.

	* pa.md: Fix off-by-one error in length computations for all
	conditional branch patterns.

	* pa.h (output_bvb): Declare.
	* pa.c (output_bvb): New function to output branch on variable
	bit insns.
	* pa.md (branch-on-variable-bit): New patterns.

	* pa.h (TARGET_MILLICODE_LONG_CALLS): Delete swtich and all
	references.
	(output_millicode_call): Declare new function
	* pa.md (millicode calls): Update length computation to handle
	variable length millicode calls.
	(call pattners): Likewise.
	(indirect call patterns): Update length compuations and output
	templates to handle variable length millicode calls.
	(plabel_dereference): Likewise.
	* pa.c (override_options): Give warnings when incompatable
	options are used.
	(output_mul_insn): Call output_millicode_call instead of
	output_call, eliminate last argument to output_millicode_call.
	(output_div_insn): Likewise.
	(output_mod_insn): Likewise.
	(output_call): Rewrite long call code to handle variable length
	millicode calls.  Eliminate support for calling mul, div and mod
	millicode routines.
	(output_millicode_call): New function for calling mul, div and mod
	millicode routines.

From-SVN: r10610
1995-11-27 00:55:04 -07:00
Jeff Law
68944452e4 pa.md (abssi2): New pattern.
* pa.md (abssi2): New pattern.

	* pa.c (secondary_reload_class): Loads from reg+d addresses into
	FP registers don't need secondary reloads.
	* pa.h: Delete soem #if 0 code.  Update some comments.
	(EXTRA_CONSTRAINT, case 'Q'): Only accept valid memory addresses.

        * pa.h (RTX_COSTS): Tege's rewrite.

	* pa.c (hppa_legitimize_address): Generate unscaled indexed
	addressing for (plus (symbol_ref) (reg)).
	(emit_move_sequence): Set REGNO_POINTER_FLAG appropriately
	to encourage unscaled indexing modes.
	(basereg_operand): New function for unscaled index address support.
	* pa.md (unscaled indexing patterns): New patterns for unscaled
	index address support.

	* pa.h (MOVE_RATIO): Define.
	* pa.md (movstrsi expander): Refine tests for when to use the
	library routine instead of an inlined loop copy.  Provide an
	additional scratch register for use in the inlined loop copy.
	(movstrsi_internal): Name the pattern for ease of use.  Add
	additional scratch register.
	* pa.c (output_block_move): Greatly simplify.  Use 2X unrolled
	copy loops to improve performance.
	(compute_movstrsi_length): Corresponding changes.

	* pa.c (print_operand): Handle 'y' case for reversed FP
	comparisons.  Delete some #if 0 code.  Fix various comment typos.
	* pa.md (fcmp patterns): Try and reverse the comparison to avoid
	useless add,tr insns.

From-SVN: r10609
1995-11-27 00:33:58 -07:00
Richard Kenner
859d9ce43f (CONDITIONAL_REGISTER_USAGE): Make sure FP regs get disabled regardless of...
(CONDITIONAL_REGISTER_USAGE): Make sure FP regs get disabled
regardless of PA1.0 vs PA1.1 code generation when TARGET_SOFT_FLOAT or
TARGET_DISABLE_FPREGS is on.

From-SVN: r10554
1995-11-05 10:53:40 -05:00
Richard Kenner
ae8b3cd830 (pa_adjust_cost): Use pa_cpu, not pa_cpu_attr.
From-SVN: r10505
1995-10-22 07:45:51 -04:00
Richard Kenner
c60a3c2ffc (ASM_DECLARE_FUNCTION_NAME): If a parameter's type has TYPE_NEEDS_CONSTRUCTING on...
(ASM_DECLARE_FUNCTION_NAME): If a parameter's type has
TYPE_NEEDS_CONSTRUCTING on, then it's passed by invisible reference.

From-SVN: r10371
1995-09-17 12:39:13 -04:00
Richard Kenner
abc95ed36d Fix spelling errors.
From-SVN: r10289
1995-08-28 06:54:22 -04:00