summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/ext-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/ext-4.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/ext-4.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/ext-4.c b/gcc/testsuite/gcc.target/mips/ext-4.c
new file mode 100644
index 000000000..f3d2ad92a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/ext-4.c
@@ -0,0 +1,11 @@
+/* For MIPS64r2 use DEXT rather than DSLL/DSRL for clear_upper32. */
+/* { dg-do compile } */
+/* { dg-options "-O isa_rev>=2 -mgp64" } */
+/* { dg-final { scan-assembler "\tdext\t" } } */
+/* { dg-final { scan-assembler-not "sll" } } */
+
+NOMIPS16 unsigned long long
+f (unsigned long long i)
+{
+ return i & 0xffffffffull;
+}