Message ID | 53BDAEC0.4060908@mentor.com |
---|---|
State | New |
Headers | show |
On 09-07-14 23:06, Tom de Vries wrote: > On 09-07-14 20:32, Richard Sandiford wrote: >> Tom de Vries <Tom_deVries@mentor.com> writes: >>> Richard, >>> >>> during testing the gcc.target/mips/fuse-caller-save*.c test-cases with more >>> combinations of -march, -mabi, -fpic etc, I found that the checks for amount of >>> stores are rather fragile, so I removed them in this patch. >> >> Which combinations specifically? I don't see offhand why -march would >> make a difference, > > --target_board=unix/-march=mips32: > ... > FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O2 scan-assembler-times > (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 > FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O3 -fomit-frame-pointer > scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 > FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O3 -g scan-assembler-times > (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 > FAIL: gcc.target/mips/fuse-caller-save-mips16.c -Os scan-assembler-times > (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 > FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O2 -flto -flto-partition=none > scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 > FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O2 -flto scan-assembler-times > (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 > ... > > We're using save instead of sw. > <SNIP> > > What do we do about the 'save' instead of 'sw' ? > The mips16e save/restore enabling is controlled by this code in mips.h: ... /* Generate mips16e code. Default 16bit ASE for mips32* and mips64* */ #define GENERATE_MIPS16E (TARGET_MIPS16 && mips_isa >= 32) /* Generate mips16e register save/restore sequences. */ #define GENERATE_MIPS16E_SAVE_RESTORE (GENERATE_MIPS16E && mips_abi == ABI_32) ... Adding isa_rev=0 in dg-options works. Is that the way to fix it? Thanks, - Tom
Tom de Vries <Tom_deVries@mentor.com> writes: > The mips16e save/restore enabling is controlled by this code in mips.h: > ... > /* Generate mips16e code. Default 16bit ASE for mips32* and mips64* */ > #define GENERATE_MIPS16E (TARGET_MIPS16 && mips_isa >= 32) > /* Generate mips16e register save/restore sequences. */ > #define GENERATE_MIPS16E_SAVE_RESTORE (GENERATE_MIPS16E && mips_abi == ABI_32) > ... > > Adding isa_rev=0 in dg-options works. Is that the way to fix it? Yeah, that sounds right. The addressing=absolute patch is OK with that change, thanks. Richard
2014-07-09 Tom de Vries <tom@codesourcery.com> * gcc.target/mips/fuse-caller-save.c: Add addression=absolute to dg-options. * gcc.target/mips/fuse-caller-save-mips16.c: Same. * gcc.target/mips/fuse-caller-save-micromips.c: Same. diff --git a/gcc/testsuite/gcc.target/mips/fuse-caller-save-micromips.c b/gcc/testsuite/gcc.target/mips/fuse-caller-save-micromips.c index 6ad01c7..70349dc 100644 --- a/gcc/testsuite/gcc.target/mips/fuse-caller-save-micromips.c +++ b/gcc/testsuite/gcc.target/mips/fuse-caller-save-micromips.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fuse-caller-save (-mmicromips)" } */ +/* { dg-options "-fuse-caller-save (-mmicromips) addressing=absolute" } */ /* At -O0 and -O1, the register allocator behaves more conservatively, and the fuse-caller-save optimization doesnt' trigger. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" } } */ diff --git a/gcc/testsuite/gcc.target/mips/fuse-caller-save-mips16.c b/gcc/testsuite/gcc.target/mips/fuse-caller-save-mips16.c index a7c6cf4..330d325 100644 --- a/gcc/testsuite/gcc.target/mips/fuse-caller-save-mips16.c +++ b/gcc/testsuite/gcc.target/mips/fuse-caller-save-mips16.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fuse-caller-save (-mips16)" } */ +/* { dg-options "-fuse-caller-save (-mips16) addressing=absolute" } */ /* At -O0 and -O1, the register allocator behaves more conservatively, and the fuse-caller-save optimization doesnt' trigger. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" } } */ diff --git a/gcc/testsuite/gcc.target/mips/fuse-caller-save.c b/gcc/testsuite/gcc.target/mips/fuse-caller-save.c index 72c08fe..370b1ee 100644 --- a/gcc/testsuite/gcc.target/mips/fuse-caller-save.c +++ b/gcc/testsuite/gcc.target/mips/fuse-caller-save.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fuse-caller-save" } */ +/* { dg-options "-fuse-caller-save addressing=absolute" } */ /* At -O0 and -O1, the register allocator behaves more conservatively, and the fuse-caller-save optimization doesnt' trigger. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" } } */ -- 1.9.1