aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/alpha/stw-bwx.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/alpha/stw-bwx.c')
-rw-r--r--gcc/testsuite/gcc.target/alpha/stw-bwx.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/alpha/stw-bwx.c b/gcc/testsuite/gcc.target/alpha/stw-bwx.c
new file mode 100644
index 0000000..b4f18ad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/alpha/stw-bwx.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mbwx" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
+
+void
+stw (short *p, short v)
+{
+ *p = v;
+}
+
+/* Expect assembly such as:
+
+ stw $17,0($16)
+ */
+
+/* { dg-final { scan-assembler-times "\\sstw\\s\\\$17,0\\\(\\\$16\\\)\\s" 1 } } */