summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-03 00:45:11 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-03 00:45:11 +0000
commit78747de29011f2957a7a5e267d45620890df5212 (patch)
treec96cfdb20a76d9e68d8c088315ba5f4a9d997156 /gcc
parentdeee63a8c707d24607312f7921977d64c23ffd80 (diff)
downloadgcc-78747de29011f2957a7a5e267d45620890df5212.tar.gz
* gcc.target/cris/builtin_clz_v0.c: New testcase.
* gcc.target/cris/builtin_clz_v3.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128033 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/cris/builtin_clz_v0.c12
-rw-r--r--gcc/testsuite/gcc.target/cris/builtin_clz_v3.c12
3 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 63b09677375..eb93d33e5ac 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-03 Jesper Nilsson <jesper.nilsson@axis.com>
+
+ * gcc.target/cris/builtin_clz_v0.c: New testcase.
+ * gcc.target/cris/builtin_clz_v3.c: New testcase.
+
2007-09-02 Tobias Schlüuter <tobi@gcc.gnu.org>
* gfortran.dg/substr_6.f90: New test.
diff --git a/gcc/testsuite/gcc.target/cris/builtin_clz_v0.c b/gcc/testsuite/gcc.target/cris/builtin_clz_v0.c
new file mode 100644
index 00000000000..d848a75b76c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/builtin_clz_v0.c
@@ -0,0 +1,12 @@
+/* Check that we don't use the lz insn for clz by checking assembler output.
+ The lz insn was implemented in CRIS v3 (ETRAX 4). */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "cris-*-elf" } { "-march*" } { "" } } */
+/* { dg-options "-O2 -march=v0" } */
+/* { dg-final { scan-assembler-not "\[ \t\]lz\[ \t\]" } } */
+
+int
+f (int a)
+{
+ return __builtin_clz(a);
+}
diff --git a/gcc/testsuite/gcc.target/cris/builtin_clz_v3.c b/gcc/testsuite/gcc.target/cris/builtin_clz_v3.c
new file mode 100644
index 00000000000..aa97cb9f78e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/builtin_clz_v3.c
@@ -0,0 +1,12 @@
+/* Check that we use the lz insn for clz by checking assembler output.
+ The lz insn was implemented in CRIS v3 (ETRAX 4). */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "cris-*-elf" } { "-march*" } { "" } } */
+/* { dg-options "-O2 -march=v8" } */
+/* { dg-final { scan-assembler "\[ \t\]lz\[ \t\]" } } */
+
+int
+f (int a)
+{
+ return __builtin_clz(a);
+}