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: [PATCH 02/10] addr32: Only handle zero-extended DImode addresses


On Fri, Mar 9, 2012 at 6:58 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

> I would like to point out that the patched compiler now also emits
> address registers in their natural mode (modulo zero-extended RTXes)
> and fixes following failure on Pmode == SImode targets:
>
> --cut here--
> struct foo
> {
> ?int *f;
> ?int i;
> };
>
> void
> __attribute__ ((noinline))
> bar (struct foo x)
> {
> ?*(x.f) = 1;
> }
> --cut here--
>
> For Pmode == SImode, the compiler emitted (%rdi) address, which was
> wrong, since "i" was passed in the high part of (%rdi) register.

Following patch adds torture test that check for this problem.

2012-03-11  Uros Bizjak  <ubizjak@gmail.com>

	PR target/52530
	* gcc.dg/torture/pr52530.c: New test.

Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline.

Uros.

Attachment: t.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]