summary refs log tree commit diff stats
path: root/tests/tcg/hexagon/test_hwloops.S
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tcg/hexagon/test_hwloops.S')
-rw-r--r--tests/tcg/hexagon/test_hwloops.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/tcg/hexagon/test_hwloops.S b/tests/tcg/hexagon/test_hwloops.S
new file mode 100644
index 0000000000..42785e6f25
--- /dev/null
+++ b/tests/tcg/hexagon/test_hwloops.S
@@ -0,0 +1,19 @@
+/* Purpose: simple C Program to test hardware loops. */
+
+    .text
+    .globl _start
+
+_start:
+    {
+        loop0(.LBB0_1, #10)
+        r2 = #0
+    }
+.LBB0_1:
+    {
+        r2 = add(r2, #1)
+        nop
+    }:endloop0
+    {
+        p0 = cmp.eq(r2, #10); if (p0.new) jump:t pass
+        jump fail
+    }