This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
expand_expr: mode of returned value
- From: "Unruh, Erwin" <Erwin dot Unruh at fujitsu-siemens dot com>
- To: GCC mailing list <gcc at gcc dot gnu dot org>
- Cc: "Unruh, Erwin" <Erwin dot Unruh at fujitsu-siemens dot com>
- Date: Thu, 12 Sep 2002 13:37:29 +0200
- Subject: expand_expr: mode of returned value
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