On 09-07-14 20:32, Richard Sandiford wrote:
Tom de Vries <tom_devr...@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.
or why -mabi would make a difference
--target_board=unix/-mabi=64:
...
FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O2 scan-assembler-times
(?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O3 -fomit-frame-pointer
scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O3 -g
scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save-micromips.c -Os scan-assembler-times
(?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O2 -flto
-flto-partition=none scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O2 -flto
scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save.c -O2 scan-assembler-times
(?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save.c -O3 -fomit-frame-pointer
scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save.c -O3 -g scan-assembler-times
(?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save.c -Os scan-assembler-times
(?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save.c -O2 -flto -flto-partition=none
scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
FAIL: gcc.target/mips/fuse-caller-save.c -O2 -flto scan-assembler-times
(?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2
...
> for -mno-abicalls.
With --target_board=unix/-mabi=64/-mno-abicalls, indeed those tests pass.
-mabicalls might change the output because of things like the $gp save slot,
but if that's the only reason it might be better to add addressing=absolute
to the tests instead.
OK, attached patch implements that, that fixes the -mabi=64 problem.
What do we do about the 'save' instead of 'sw' ?
Thanks,
- Tom
Thanks,
Richard
2014-07-09 Tom de Vries <t...@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