TYPE_MODE() returns wrong mode for POINTER_TYPE nodes
Richard Henderson
rth@redhat.com
Thu Apr 8 17:39:00 GMT 2004
On Thu, Apr 08, 2004 at 12:07:11PM +0200, Uros Bizjak wrote:
> printf("TARG0_P MODE: %i\n", (int) TYPE_MODE (TREE_TYPE (targ0_p)));
> printf("TARG1_P 1 MODE: %i\n", (int) TYPE_MODE (TREE_TYPE (targ1_p)));
>
> returns:
>
> EXP MODE: 0
> ARG MODE: 16
> TARG0_P MODE: 12
> TARG1_P MODE: 12
>
> According to autogenerated insn-modes.h, this means:
>
> EXP MODE: VOIDmode
> ARG MODE: DFmode
> TARG0_P MODE: SImode
> TARG1_P MODE: SImode
>
> If I understand above comment for TREE_TYPE correcty, TYPE_MODE of
> TARG0_P and TARG1_P should be DFmode, because their tree type is
> POINTER_TYPE, and mode of _target_ is DFmode.
No. The mode of the pointer is Pmode. The mode of the target is
TYPE_MODE (TREE_TYPE (TREE_TYPE (targ0_p)))
i.e. one more indirection.
r~
More information about the Gcc
mailing list