Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-10 Thread Trevor Scroggins
> I doubt that there is any documentation on this, but I'd be happy to be > surprised.  TARGET_MACHINE_DEPENDENT_REORG is pretty much free to > rearrange things however it likes. > > If you write > > const int ai[] = { 1 }; > int main() { } > > then in some cases the global const variable will be p

Fwd: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-10 Thread Trevor Scroggins
Rather, a safe ref distance. Apologies for the duplicate message. Trev -- Forwarded message -- From: Trevor Scroggins Date: Fri, Jul 10, 2009 at 3:19 PM Subject: Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h? To: Ian Lance Taylor Cc: gcc@gcc.gnu.org While I still

Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-10 Thread Trevor Scroggins
GCC or both. In every case I tried, 'const int ai[] = { 1 };' (and volatile ...) was translated to an immediate value of 1. Trev On Mon, Jul 6, 2009 at 11:45 AM, Ian Lance Taylor wrote: > Trevor Scroggins writes: > >> No, that won't work. The assembler only recogn

Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-06 Thread Trevor Scroggins
No, that won't work. The assembler only recognizes .text, .data, and .bss and doesn't support .section. Surely there's a simple hook that instructs that compiler to print locals after a function instead of before it? On Mon, Jul 6, 2009 at 10:11 AM, Trevor Scroggins wrote: >

Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-06 Thread Trevor Scroggins
The target doesn't use ELF. I have .text, .data, and .bss, and read-only data normally goes in .text. I'm learning as I go, so I'll fiddle with a dummy .rodata section of some sort that the linker can position accordingly. On Mon, Jul 6, 2009 at 10:00 AM, Ian Lance Taylor wrote: > Most targets put

Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-06 Thread Trevor Scroggins
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--string

CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-05 Thread Trevor Scroggins
Hello, all. I'm attempting to port GCC 4.4.0 to a new m68k target. The target begins execution in the first byte of the first text section. Adding '#define CONSTANT_POOL_BEFORE_FUNCTION 0' in my target's tm.h seems like the simplest way to avoid execution of read-only data; however, defining the co