summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/smartmips-ror-4.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-ror-4.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c b/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
new file mode 100644
index 000000000..b8b829445
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O -msmartmips" } */
+
+#define S 13
+
+NOMIPS16 int rotate_right_constant (unsigned a)
+{
+ return (a >> S) | (a << (32 - S));
+}
+/* { dg-final { scan-assembler "\tror\t" } } */