public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/11135] New: It ought to be possible to make PIC_OFFSET_TABLE_REGNUM a pseudo
@ 2003-06-09 15:25 rearnsha@gcc.gnu.org
2003-06-09 15:47 ` [Bug middle-end/11135] " pinskia@physics.uc.edu
2003-07-23 19:28 ` pinskia at physics dot uc dot edu
0 siblings, 2 replies; 5+ messages in thread
From: rearnsha@gcc.gnu.org @ 2003-06-09 15:25 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11135
Summary: It ought to be possible to make PIC_OFFSET_TABLE_REGNUM
a pseudo
Product: gcc
Version: unknown
Status: NEW
Keywords: pessimizes-code
Severity: enhancement
Priority: P5
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rearnsha@gcc.gnu.org
CC: gcc-bugs@gcc.gnu.org
OtherBugsDependingO 592
nThis:
Currently the documentation says:
> @findex PIC_OFFSET_TABLE_REGNUM
> The register number of the register used to address a table of static
> data addresses in memory. In some cases this register is defined by a
> processor's ``application binary interface'' (ABI)@. When this macro
> is defined, RTL is generated for this register once, as with the stack
> pointer and frame pointer registers. If this macro is not defined, it
> is up to the machine-dependent files to allocate such a register (if
> necessary). Note that this register must be fixed when in use (e.g.@:
> when @code{flag_pic} is true).
This pessimizes code when the pic register is used in a leaf function, or when
there is only a single use (since the register is fixed for the entire
function). It ought to be possible for a machine description to make the PIC
register a pseudo that is allocated as normal. Then the register can be either
call-clobbered or call saved as appropriate and can even be spilled onto the
stack if that is preferable.
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <bug-11135-374@http.gcc.gnu.org/bugzilla/>]
* [Bug middle-end/11135] It ought to be possible to make PIC_OFFSET_TABLE_REGNUM a pseudo
[not found] <bug-11135-374@http.gcc.gnu.org/bugzilla/>
@ 2006-01-17 20:22 ` rearnsha at gcc dot gnu dot org
2006-01-17 20:32 ` rearnsha at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2006-01-17 20:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rearnsha at gcc dot gnu dot org 2006-01-17 20:22 -------
Subject: Bug 11135
Author: rearnsha
Date: Tue Jan 17 20:22:19 2006
New Revision: 109839
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109839
Log:
PR target/592
PR middle-end/11135
* arm.h (struct machine_function): Add pic_reg.
* arm.c (arm_pic_register): Make unsigned.
(arm_override_options): Only set arm_pic_register if
TARGET_SINGLE_PIC_BASE.
(use_return_insn): Only test for a pic register if it is fixed.
(arm_compute_save_reg0_reg12_mask): Likewise.
(thumb_compute_save_reg_mask): Likewise.
(legitimate_pic_operand): Factor out some known invariants.
(legitimize_pic_address): If we don't have a fixed pic register,
then set up a pseudo in the function entry sequence. Handle the
pic base being in a pseudo.
(arm_load_pic_register): Handle the pic register being in a pseudo.
(arm_expand_prologue): Only set up the pic register if it is fixed.
(thumb_expand_prologue): Likewise.
* arm.md (pic_load_addr_based): Handle the pic base being a pseudo.
(pic_load_addr_based_insn): Likewise.
(builtin_setjmp_receiver): Don't restore the pic base if it isn't
fixed.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm.c
trunk/gcc/config/arm/arm.h
trunk/gcc/config/arm/arm.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11135
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/11135] It ought to be possible to make PIC_OFFSET_TABLE_REGNUM a pseudo
[not found] <bug-11135-374@http.gcc.gnu.org/bugzilla/>
2006-01-17 20:22 ` rearnsha at gcc dot gnu dot org
@ 2006-01-17 20:32 ` rearnsha at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2006-01-17 20:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rearnsha at gcc dot gnu dot org 2006-01-17 20:32 -------
Closing as WORKSFORME. I didn't have to change anything in the middle-end in
order to fix the ARM back-end.
Maybe the documentation should be updated to reflect this status.
--
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11135
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-01-17 20:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-09 15:25 [Bug middle-end/11135] New: It ought to be possible to make PIC_OFFSET_TABLE_REGNUM a pseudo rearnsha@gcc.gnu.org
2003-06-09 15:47 ` [Bug middle-end/11135] " pinskia@physics.uc.edu
2003-07-23 19:28 ` pinskia at physics dot uc dot edu
[not found] <bug-11135-374@http.gcc.gnu.org/bugzilla/>
2006-01-17 20:22 ` rearnsha at gcc dot gnu dot org
2006-01-17 20:32 ` rearnsha at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).