public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* expand_expr: mode of returned value
@ 2002-09-12  4:37 Unruh, Erwin
  2002-09-12 14:29 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Unruh, Erwin @ 2002-09-12  4:37 UTC (permalink / raw)
  To: GCC mailing list; +Cc: Unruh, Erwin

Hello,

On a new port I ran into a problem. It has ptr_mode != Pmode. When expanding
a builtin memcpy, the result of expand_expr has mode Pmode. The natural mode
would have been ptr_mode.

This caused a problem in precompute_register_parameters where there is an
assumption that the result is in its native mode.

Regarding the parameter TMODE of expand_expr there is a comment. TMODE is only
a suggestion.  "callers must assume that the rtx returned may not have mode
TMODE".

I do not fully understand the implications of this comment. What behaviour of
expand_expr is allowed. 

The best interpretation I have is:
if (TMODE == VOIDmode)
{ the result of expand_expr is in its native mode }
else
{ the result is in its native mode or in TMODE }

Is this interpretation correct ?

If yes, there are some errors in builtins.c
If no, there are some errors in calls.c

        Erwin

Erwin Unruh, Fujitsu Siemens Computers, C/C++ compiler group

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: expand_expr: mode of returned value
  2002-09-12  4:37 expand_expr: mode of returned value Unruh, Erwin
@ 2002-09-12 14:29 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2002-09-12 14:29 UTC (permalink / raw)
  To: Unruh, Erwin; +Cc: GCC mailing list

On Thu, Sep 12, 2002 at 01:37:29PM +0200, Unruh, Erwin wrote:
> The best interpretation I have is:
> if (TMODE == VOIDmode)
> { the result of expand_expr is in its native mode }
> else
> { the result is in its native mode or in TMODE }
> 
> Is this interpretation correct ?

This is my understanding, yes.


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-12 21:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-12  4:37 expand_expr: mode of returned value Unruh, Erwin
2002-09-12 14:29 ` Richard Henderson

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).