[PTR-PLUS] Fix SPU-elf
Andrew_Pinski@PlayStation.Sony.Com
Andrew_Pinski@PlayStation.Sony.Com
Fri May 11 20:28:00 GMT 2007
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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixspuptr.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070511/49ec6829/attachment.txt>
More information about the Gcc-patches
mailing list