This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
arithmetic HI+PSI
- From: Aurelien Buhrig <aurelien dot buhrig dot gcc at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 14 Oct 2011 17:52:27 +0200
- Subject: arithmetic HI+PSI
Hi,
When I add a pointer (PSImode) with an int (HImode) (ex: sp-=cnt) ,
gcc expands the signed int by zero_extend'ing the int and then adding
both PSI values (instead of sign extending).
How should I fix this ?
POINTERS_EXTEND_UNSIGNED is 0.
And what is the difference between ptr_mode and Pmode ?
thanks,
Aurélien