summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arc/mrtsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/arc/mrtsc.c')
-rw-r--r--gcc/testsuite/gcc.target/arc/mrtsc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arc/mrtsc.c b/gcc/testsuite/gcc.target/arc/mrtsc.c
new file mode 100644
index 00000000000..31852a5e479
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mrtsc.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mrtsc" } */
+/* { dg-do assemble } */
+
+int f (int i)
+{
+ __asm__("rtsc %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}