This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] delegitimize_address target call-back (take 2)

On Fri, Jan 31, 2003 at 09:10:53PM -0700, Roger Sayle wrote:
>   avoid_constant_pool_reference (x)
>        rtx x;
>   {
> !   rtx c, tmp, addr;
>     enum machine_mode cmode;
> !   switch (GET_CODE (x))
> !     {
> !     case MEM:
> !       break;
> !
> !     case FLOAT_EXTEND:
> !       /* Handle float extensions of constant pool references.  */
> !       tmp = XEXP (x, 0);
> !       c = avoid_constant_pool_reference (tmp);
> !       return c == tmp ? x : c;

I think this case is wrong here.  The returned value will
have the wrong mode.  You should handle this in the caller
when you don't care about the mode.

> + #define TARGET_DELEGITIMIZE_ADDRESS i386_simplify_dwarf_addr

As a follow-up patch, I'd like you to rename this to the
follow the new hook, and replace the existing uses of
ASM_SIMPLIFY_DWARF_ADDR.  The only other port that uses
this at the moment is s390, so this is not a big job.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]