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]

Re: fix PR40952: promote_decl_mode has wrong semantics on POINTERS_EXTEND machines


On Wed, Aug 12, 2009 at 12:35 PM, Paolo Bonzini<bonzini@gnu.org> wrote:
> This fixes a failure on ia64-hpux, which has 32-bit pointers and 64-bit
> addresses.
>
> The reason of the failure is that on these machines the pointers are always
> extended to Pmode as soon as they're copied from the incoming hard register
> to a pseudo. ?In this case, promote_decl_mode should return Pmode (and the
> appropriate signed/unsigned value) for PARM_DECL and RESULT_DECL trees.
>
> To achieve this, I added a third mode to the promote_function_mode hook,
> which is what promote_decl_mode should use. ?At the same time, when emitting
> the copy out from the RESULT_DECL to the return value hard register I have
> to use promote_function_mode instead of promote_decl_mode.
>
> The patch also fixes a typo in calls.c.
>
> I'll rename for_return and add an enum for it in a follow-up early next
> week. ?I posted this now because of Richard's patch that introduces a new
> use of promote_decl_mode. ?Richard, I would like to commit this first if it
> is not a problem for you.
>
> Tested C/Fortran on hppa-hpux, all languages on ia64-hpux (both by Steve
> Ellcey). ?Bootstrap/regtest on x86_64-linux in progress.
>
> Ok?

Ok if the bootstrap / regtest passes.

Thanks,
Richard.

> Paolo
>


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