1 /* { dg-require-effective-target mmap } */
8 #define MMAP_SIZE 0x10000
9 #define ADDRESS 0x1122000000
13 #define MAP_ANONYMOUS MAP_ANON
16 void __attribute__((noinline
))
17 foo (TYPE
*__restrict a
, TYPE
*__restrict b
)
21 b
= __builtin_assume_aligned (b
, sizeof (TYPE
) * 2);
22 a
= __builtin_assume_aligned (a
, sizeof (TYPE
) * 2);
23 for (n
= 0; n
< COUNT
; n
++)
25 a
[n
] = b
[n
* 4] + b
[n
* 4 + 1];
37 x
= mmap ((void *) ADDRESS
, MMAP_SIZE
, PROT_READ
| PROT_WRITE
,
38 MAP_PRIVATE
| MAP_ANONYMOUS
, -1, 0);
45 b_offset
= MMAP_SIZE
- (4 * COUNT
- 2) * sizeof (TYPE
);
46 foo ((TYPE
*) x
, (TYPE
*) ((char *) x
+ b_offset
));