summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/asm-1.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-20 06:54:52 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-20 06:54:52 +0000
commitece445c880638f39b3060f1a98364e99a88dc75a (patch)
tree3b4fc4f9a8b7cd419627994ceb2a9a76d6813d29 /gcc/testsuite/gcc.target/mips/asm-1.c
parentda9e65193f2e4406a3e8cf527010ed9a83245516 (diff)
downloadgcc-ece445c880638f39b3060f1a98364e99a88dc75a.tar.gz
PR target/17565
* config/mips/mips.md (define_asm_attributes): Set can_delay to no. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87744 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/asm-1.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/asm-1.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/asm-1.c b/gcc/testsuite/gcc.target/mips/asm-1.c
new file mode 100644
index 00000000000..1a64e8754fd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/asm-1.c
@@ -0,0 +1,14 @@
+/* PR target/17565. GCC used to put the asm into the delay slot
+ of the call. */
+/* { dg-do assemble } */
+/* { dg-options "-O" } */
+int foo (int n)
+{
+ register int k asm ("$16") = n;
+ if (k > 0)
+ {
+ bar ();
+ asm ("li %0,0x12345678" : "=r" (k));
+ }
+ return k;
+}