summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-13 20:00:18 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-13 20:00:18 +0000
commitcaa36f1c53396b91841cf73c89bc2f91ee5d2941 (patch)
tree9a538648d131fc8ab5f0b00a0e37b83fb46a7aa5 /gcc/testsuite/gcc.target
parent3643e31df98024f1435ec08601c49c84ba407d3a (diff)
downloadgcc-caa36f1c53396b91841cf73c89bc2f91ee5d2941.tar.gz
2011-12-13 Andrew Pinski <apinski@cavium.com>
Adam Nemet <anemet@caviumnetworks.com> * config/mips/mips-cpus.def: Add Octeon2. * config/mips/mips-tables.opt: Regenerate. * config/mips/mips.md (define_attr "cpu"): Add Octeon2. * config/mips/driver-native.c (host_detect_local_cpu): Support Octeon2 also. * config/mips/octeon.md (octeon_arith): Add Octeon2. (octeon_condmove): Likewise. (octeon_load): Rename to .. (octeon_load_o1): this. (octeon_load_o2): New reserve. (octeon_cop_o2): New reserve. (octeon_store): Match Octeon2 also. (octeon_brj): Rename to .. (octeon_brj_o1): this. (octeon_brj_o2): New reserve. (octeon_imul3): Rename to ... (octeon_imul3_o1): this. (octeon_imul3_o2): New reserve. (octeon_imul): Rename to ... (octeon_imul_o1): this. (octeon_imul_o2): New reserve. (octeon_mfhilo): Rename to ... (octeon_mfhilo_o1): This. (octeon_mfhilo_o2): New reserve. (octeon_imadd): Rename to ... (octeon_imadd_o1): this. (octeon_imadd_o2): New reserve. (octeon_idiv): Rename to .. (octeon_idiv_o1): This. (octeon_idiv_o2_si): New reserve. (octeon_idiv_o2_di): Likewise. (octeon_unknown): Match Octeon2 also. * config/mips/mips.c (mips_rtx_cost_data): Add Octeon2 cost data. (mips_issue_rate): Octeon2 can issue 2 at a time. * config/mips/mips.h (TARGET_OCTEON): Match Octeon2 also. (TARGET_OCTEON2): New define. (TUNE_OCTEON): Match Octeon2 also. 2011-12-13 Andrew Pinski <apinski@cavium.com> Adam Nemet <anemet@caviumnetworks.com> * gcc.target/mips/mips.exp (mips_option_groups): Fix debug. Add -fdump-* options. * gcc.target/mips/octeon2-pipe-1.c: New testcase. * gcc.target/mips/octeon-pipe-1.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182300 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r--gcc/testsuite/gcc.target/mips/mips.exp3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-pipe-1.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon2-pipe-1.c11
3 files changed, 24 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp
index 55b26f9602d..fd065ec9469 100644
--- a/gcc/testsuite/gcc.target/mips/mips.exp
+++ b/gcc/testsuite/gcc.target/mips/mips.exp
@@ -226,7 +226,7 @@ set mips_option_groups {
abi "-mabi=.*"
addressing "addressing=.*"
arch "-mips([1-5]|32.*|64.*)|-march=.*|isa(|_rev)(=|<=|>=).*"
- debug "-g*"
+ debug "-g.*"
dump_pattern "-dp"
endianness "-E(L|B)|-me(l|b)"
float "-m(hard|soft)-float"
@@ -241,6 +241,7 @@ set mips_option_groups {
profiling "-pg"
small-data "-G[0-9]+"
warnings "-w"
+ dump "-fdump-.*"
}
# Add -mfoo/-mno-foo options to mips_option_groups.
diff --git a/gcc/testsuite/gcc.target/mips/octeon-pipe-1.c b/gcc/testsuite/gcc.target/mips/octeon-pipe-1.c
new file mode 100644
index 00000000000..bbcf7c8fcbb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/octeon-pipe-1.c
@@ -0,0 +1,11 @@
+/* Check that we use the octeon pipeline description. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=octeon -fdump-rtl-sched2" } */
+
+NOMIPS16 int f (int a, int b)
+{
+ return a / b;
+}
+
+/* { dg-final { scan-rtl-dump "octeon_mult\\*71" "sched2" } } */
+/* { dg-final { cleanup-tree-dump "sched2" } } */
diff --git a/gcc/testsuite/gcc.target/mips/octeon2-pipe-1.c b/gcc/testsuite/gcc.target/mips/octeon2-pipe-1.c
new file mode 100644
index 00000000000..da4f6321c73
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/octeon2-pipe-1.c
@@ -0,0 +1,11 @@
+/* Check that we use the octeon2 pipeline description. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-sched2 -march=octeon2" } */
+
+NOMIPS16 int f (int a, int b)
+{
+ return a / b;
+}
+
+/* { dg-final { scan-rtl-dump "octeon_mult\\*17" "sched2" } } */
+/* { dg-final { cleanup-tree-dump "sched2" } } */