This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[PTR-PLUS] Fix SPU-elf


There is two problems with Pointer Plus branch for spu-elf.  The first 
problem is that spu's spu_va_start and spu_gimplify_va_arg_expr need to be 
updated for PLUS_EXPR on pointers.  The second problem is that we did not 
always say the unsigned long type is an useless_type_conversion to 
sizetype because we were comparing the MIN/MAX of sizetype and the other 
type but since the INTEGER_CSTs of sizetype are sign extended, we would 
say the type conversion was not useless and cause an ICE in the checking 
code.  This patch fixes those two issues.


Committed to the branch after a build/test on spu-elf with the regressions 
that are also on i686-linux-gnu.

Thanks,
Andrew Pinski

ChangeLog:

        * config/spu/spu.c (spu_va_start): Create POINTER_PLUS_EXPR
        instead of PLUS_EXPR when doing addition on pointer
        types.  Use sizetype for the second operand.
        (spu_gimplify_va_arg_expr): Likewise.
        * tree-ssa.c (tree_ssa_useless_type_conversion_1):
        Convert the MIN/MAX of the inner type to the outer
        type before comparing them.

Attachment: fixspuptr.diff.txt
Description: Text document


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