* generating constant pool
@ 2010-01-27 11:57 Rajiv KI
2010-01-27 15:33 ` Ian Lance Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Rajiv KI @ 2010-01-27 11:57 UTC (permalink / raw)
To: gcc-help
Hi gcc-help,
I have ported gcc on a dummy target to learn about gcc-porting. I referenced
'gccint' document and 'IIT' docs for porting. And i am finished with support
to single integer. All my desired operations are working fine.
Now to extend with and learn more i started double integer support. My
target size i fixed is 32bit. So to support double integer i want to
generate a constant pool. And for generating constant pool i read in gccint
doc it says to define TARGET_CANNOT_FORCE_CONST_MEM as TRUE. I tried that
but didn't get desired results. Help me to solve it out.
Regards,
Rajiv.
--
View this message in context: http://old.nabble.com/generating-constant-pool-tp27337873p27337873.html
Sent from the gcc - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: generating constant pool
2010-01-27 11:57 generating constant pool Rajiv KI
@ 2010-01-27 15:33 ` Ian Lance Taylor
2010-01-28 5:14 ` Rajiv KI
0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2010-01-27 15:33 UTC (permalink / raw)
To: Rajiv KI; +Cc: gcc-help
Rajiv KI <rajivkumarsingla@gmx.com> writes:
> Now to extend with and learn more i started double integer support. My
> target size i fixed is 32bit. So to support double integer i want to
> generate a constant pool. And for generating constant pool i read in gccint
> doc it says to define TARGET_CANNOT_FORCE_CONST_MEM as TRUE. I tried that
> but didn't get desired results. Help me to solve it out.
TARGET_CANNOT_FORCE_CONST_MEM should not be defined to be true for an
ordinary constant. It should only return true for special cases like
the address of a TLS symbol.
gcc will automatically generate a constant pool when it sees a
constant which is not LEGITIMATE_CONSTANT_P.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: generating constant pool
2010-01-27 15:33 ` Ian Lance Taylor
@ 2010-01-28 5:14 ` Rajiv KI
0 siblings, 0 replies; 3+ messages in thread
From: Rajiv KI @ 2010-01-28 5:14 UTC (permalink / raw)
To: gcc-help
Ya I tried in that way also. Means making double integer as
non-Legitimate_constant.
In my case legitimate_constant_p was looking like this:
int
legitimate_constant_p (rtx X)
{
return (GET_CODE(X)!= CONST_DOUBLE);
}
But it was not generating constant pool when i assigned 64bit no. to a 'long
long' type variable. Rather It was doing all in '.main' function only.
Ian Lance Taylor-3 wrote:
>
> Rajiv KI <rajivkumarsingla@gmx.com> writes:
>
>> Now to extend with and learn more i started double integer support. My
>> target size i fixed is 32bit. So to support double integer i want to
>> generate a constant pool. And for generating constant pool i read in
>> gccint
>> doc it says to define TARGET_CANNOT_FORCE_CONST_MEM as TRUE. I tried that
>> but didn't get desired results. Help me to solve it out.
>
> TARGET_CANNOT_FORCE_CONST_MEM should not be defined to be true for an
> ordinary constant. It should only return true for special cases like
> the address of a TLS symbol.
>
> gcc will automatically generate a constant pool when it sees a
> constant which is not LEGITIMATE_CONSTANT_P.
>
> Ian
>
>
--
View this message in context: http://old.nabble.com/generating-constant-pool-tp27337873p27351204.html
Sent from the gcc - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-28 5:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-27 11:57 generating constant pool Rajiv KI
2010-01-27 15:33 ` Ian Lance Taylor
2010-01-28 5:14 ` Rajiv KI
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).