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.
e.g.:

        .text
# NOT HERE
        .even
        .globl        _main
_main:
        ...
        rts
# HERE
LC0:
        .ascii "this is a string\0"
LC1:
        .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<i...@google.com> 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?

Reply via email to