This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: literal pool support


>>>>> Richard Henderson writes:

Richard> On Wed, Jul 07, 1999 at 05:27:49PM -0400, David Edelsohn wrote:
>> Is there a good reason why a compiler should be relying on a
>> literal pool located in the code segment at all?

Richard> Branch addresses are formed like memory addresses.  So you need
Richard> some sort of pointer within code already.

	I am not sure what you mean by this.  Yes, one needs a base
register for branches, but one need not create a literal pool which must
be addressed by that base register.  One needs local addressibility for
branches, but one does not need a literal pool.

	If one did not generate a literal pool then one would not need to
keep track of the size of a literal pool in addition to the normal length
attribute.  The choice of branch instructions would be based solely on
instruction length using the normal shorten_branches() optimization
without any modification and without creating an additional "length"-like
attribute. 

David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]