This is the mail archive of the 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]
Other format: [Raw text]

Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

I guess I'm not understanding the usage of the term constant pool.
What I'd like to do is place all constant and read-only data, which I
now think means all data affected by CONSTANT_POOL_BEFORE_FUNCTION and
READONLY_DATA_SECTION_ASM_OP (and others?); however, I'd like local,
read-only data--strings and whatnot--to stay in .text, stored after
the function rather than prior to it. More specifically, the data
should be stored in a location appropriate for the addressing mode, as
long as that location is not before the first instruction in .text.

        .globl        _main
        .ascii "this is a string\0"
        .ascii "this is another string\0"

Will I need to "optimize" the location of the data myself?

On Sun, Jul 5, 2009 at 11:14 PM, Ian Lance Taylor<> wrote:
> Setting CONSTANT_POOL_BEFORE_FUNCTION to 0 ought to work to emit the
> constant pool after the function. ?However, to be clear, it only affects
> the constant pool which holds constants which are not
> LEGITIMATE_CONSTANT_P. ?This is normally things like 32-bit constants
> which RISC architectures can not handle in a single instruction. ?The
> m68k is a flexible architecture and can handle 32-bit constants just
> fine without using a constant pool. ?You didn't really describe what you
> are seeing; what makes you think that the constant pool is the problem?

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