summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-02 17:46:11 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-02 17:46:11 +0000
commit53e60c1e174c5d068f383ffeca738ac8a9d468ca (patch)
treef4f721790d5f713ce0d49c08edba1191d96636be /gcc/testsuite/gcc.target/mips
parentbaf6c9e1c8051afd79c418316474bfa201ee71d1 (diff)
downloadgcc-53e60c1e174c5d068f383ffeca738ac8a9d468ca.tar.gz
gcc/
* config/mips/mips.c (mips_frame_barrier): New function. (mips_expand_prologue): Call it after allocating stack space. (mips_deallocate_stack): New function. (mips_expand_epilogue): Call mips_frame_barrier and mips_deallocate_stack. gcc/testsuite/ * gcc.target/mips/stack-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179432 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/mips')
-rw-r--r--gcc/testsuite/gcc.target/mips/stack-1.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/stack-1.c b/gcc/testsuite/gcc.target/mips/stack-1.c
new file mode 100644
index 00000000000..3d495453dd7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/stack-1.c
@@ -0,0 +1,11 @@
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "addiu\t(\\\$sp,)?\\\$sp,\[1-9\]" } } */
+/* { dg-final { scan-assembler "\tlw\t" } } */
+/* { dg-final { scan-assembler-not "addiu\t(\\\$sp,)?\\\$sp,\[1-9\].*\tlw\t" } } */
+
+int foo (int y)
+{
+ volatile int a = y;
+ volatile int *volatile b = &a;
+ return *b;
+}