1 | // compile with -march=armv8-a+sve on compatible aarch64 compiler |
2 | // linux-aarch64-sve.core was generated by: aarch64-linux-gnu-gcc-8 |
3 | // commandline: -march=armv8-a+sve -nostdlib -static -g linux-aarch64-sve.c |
4 | static void bar(char *boom) { |
5 | char F = 'b'; |
6 | asm volatile("ptrue p0.s\n\t" ); |
7 | asm volatile("fcpy z0.s, p0/m, #7.5\n\t" ); |
8 | asm volatile("ptrue p1.s\n\t" ); |
9 | asm volatile("fcpy z1.s, p1/m, #11.5\n\t" ); |
10 | asm volatile("ptrue p3.s\n\t" ); |
11 | asm volatile("fcpy z3.s, p3/m, #15.5\n\t" ); |
12 | |
13 | *boom = 47; // Frame bar |
14 | } |
15 | |
16 | static void foo(char *boom, void (*boomer)(char *)) { |
17 | char F = 'f'; |
18 | boomer(boom); // Frame foo |
19 | } |
20 | |
21 | void _start(void) { |
22 | char F = '_'; |
23 | foo(boom: 0, boomer: bar); // Frame _start |
24 | } |
25 | |