This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: MIPS patch for gcc.c-torture/compile/20010107-1.c
- To: Richard Sandiford <r dot sandiford at redhat dot com>
- Subject: Re: MIPS patch for gcc.c-torture/compile/20010107-1.c
- From: law at redhat dot com
- Date: Mon, 09 Jul 2001 15:31:29 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <wvnr8wd68t0.fsf@talisman.cambridge.redhat.com>you write:
>
> Testcase: gcc.c-torture/compile/20010107-1.c
> Target: mips64-elf -mips3
>
> gcc.c-torture/compile/20010107-1.c is:
>
> ---------------------------------------------------------------------------
> --
> unsigned long x[4];
>
> void foo(void)
> {
> ((void (*)())(x+2))();
> }
> ---------------------------------------------------------------------------
> --
>
> The address of the call in foo() is x+8, which the compiler outputs as:
>
> jal $31, x+8
>
> instead of:
>
> jal x+8
>
> Not earth-shattering stuff, I'll agree, but is the patch below OK
> regardless? Tested on a i686-linux-gnu-x-mips64-elf toolchain with -mips3.
> Fixes the test case and introduces no regressions.
>
>
> 2001-06-21 Richard Sandiford <rsandifo@redhat.com>
>
> * config/mips/mips.md (call_internal1): Use CONSTANT_ADDRESS_P to
> check for constant addresses.
> (call_internal2): Likewise.
> (call_value_internal1): Likewise.
> (call_value_internal2): Likewise.
> (call_value_multiple_internal1): Likewise.
> (call_value_multiple_internal2): Likewise.
Approved. Please install.
THanks,
jeff