* PA PIC support.
authorJeff Law <law@gcc.gnu.org>
Fri, 11 Nov 1994 04:33:43 +0000 (21:33 -0700)
committerJeff Law <law@gcc.gnu.org>
Fri, 11 Nov 1994 04:33:43 +0000 (21:33 -0700)
commit6bb36601f1c5a8f758f29523d514f9e27ee711f8
tree4d67fb8a4a81191e22da8cca8a7163d77653ba82
parent858e1c67f7b5f471fb8d74624f7074610f43fdc6
* 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
gcc/config/pa/pa.c
gcc/config/pa/pa.h
gcc/config/pa/pa.md