]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/microblaze/others/sdata_var6.c
Check in support for Xilinx MicroBlaze processor.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / microblaze / others / sdata_var6.c
1 /* { dg-options "-mxl-gp-opt -G 16" } */
2
3 struct test_s {
4 int a;
5 int b;
6 int c;
7 int d;
8 };
9
10 /* { dg-final { scan-assembler "\.sdata2" } } */
11 const struct test_s global1 = { 1, 2, 3, 4};
12 extern const struct test_s global2;
13
14 int testfunc ()
15 {
16 /* { dg-final { scan-assembler "\lwi\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r2" } } */
17 return global2.a + global1.a;
18 }