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] MIPS: fix failing branch range checks for micromips


Hi Andrew,

> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@gcc.gnu.org] On Behalf Of Andrew Bennett
> Sent: Friday, July 03, 2015 7:50 PM
> Subject: [PATCH] MIPS: fix failing branch range checks for micromips
> 
> diff --git a/gcc/testsuite/gcc.target/mips/branch-10.c
> b/gcc/testsuite/gcc.target/mips/branch-10.c
> index e2b1b5f..00569b0 100644
> --- a/gcc/testsuite/gcc.target/mips/branch-10.c
> +++ b/gcc/testsuite/gcc.target/mips/branch-10.c
> @@ -1,4 +1,4 @@
> -/* { dg-options "-mshared -mabi=n32" } */
> +/* { dg-options "-mshared -mabi=n32 -mno-micromips" } */
>  /* { dg-final { scan-assembler-not "(\\\$28|%gp_rel|%got)" } } */
>  /* { dg-final { scan-assembler-not "\tjr\t\\\$1\n" } } */
> 

Like the other patch, the -mno-micromips should be removed from dg-options and NOCOMPRESS used in place of NOMIPS16.
This comment applies to all of the branch-*.c tests.

> 
> diff --git a/gcc/testsuite/gcc.target/mips/branch-helper.h
> b/gcc/testsuite/gcc.target/mips/branch-helper.h
> index 85399be..bc4a31f 100644
> --- a/gcc/testsuite/gcc.target/mips/branch-helper.h
> +++ b/gcc/testsuite/gcc.target/mips/branch-helper.h
> @@ -33,5 +33,23 @@
>         D2 ("nop") "\n\t" \
>         D1 ("nop"))
> 
> +/* Emit something that is 0xfffc bytes long, which is the largest
> +   permissible range for micromips forward branches when branches

s/micromips/microMIPS/

> +   have delay slots.  */
> +#define OCCUPY_0xfffc \
> +  asm (D13 ("nop32") "\n\t" \
> +       D12 ("nop32") "\n\t" \
> +       D11 ("nop32") "\n\t" \
> +       D10 ("nop32") "\n\t" \
> +       D9 ("nop32") "\n\t" \
> +       D8 ("nop32") "\n\t" \
> +       D7 ("nop32") "\n\t" \
> +       D6 ("nop32") "\n\t" \
> +       D5 ("nop32") "\n\t" \
> +       D4 ("nop32") "\n\t" \
> +       D3 ("nop32") "\n\t" \
> +       D2 ("nop32") "\n\t" \
> +       D1 ("nop32") "\n\t" \
> +       D0 ("nop32"))
>  /* Likewise emit something that is 0x1fffc bytes long.  */  #define
> OCCUPY_0x1fffc do { asm ("nop"); OCCUPY_0x1fff8; } while (0)

diff --git
> a/gcc/testsuite/gcc.target/mips/branch-umips-10.c
> b/gcc/testsuite/gcc.target/mips/branch-umips-10.c

I see that you are naming these tests after the original branch-<number> tests that they were derived from.
I think it would be better to keep all of the microMIPS tests named umips-???.    I don't think preserving the original number is important.

Thanks,
Catherine



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