Debian Codegraph @

gcc/testsuite/gcc.target/msp430/mlarge-use-430-insn.c

raw
1 /* { dg-do compile } */
2 /* { dg-skip-if "" { *-*-* } { "-mcpu=msp430" "-mcpu=430" "-msmall" } { "" } } */
3 /* { dg-options "-mlarge -O1" } */
4 /* { dg-final { check-function-bodies "**" "" } } */
5
6 /* Test to verify cases where we can use a 430 insn even in the large memory
7 model. */
8
9 int foo[2];
10
11 /*
12 ** func: { target msp430_region_lower }
13 ** ...
14 ** MOV.W #-4088, &foo
15 ** MOV.W #-8531, &40960
16 ** MOVX.W #-16657, &106496
17 ** ...
18 */
19 /*
20 ** func: { target msp430_region_not_lower }
21 ** ...
22 ** MOVX.W #-4088, &foo
23 ** MOV.W #-8531, &40960
24 ** MOVX.W #-16657, &106496
25 ** ...
26 */
27 void
28 func (void)
29 {
30 foo[0] = 0xF008;
31 (*(int *)0xA000) = 0xDEAD;
32 (*(int *)0x1A000) = 0xBEEF;
33 }