File tree Expand file tree Collapse file tree 4 files changed +65
-1
lines changed
tools/perf/tests/shell/coresight Expand file tree Collapse file tree 4 files changed +65
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ include ../../../../../tools/scripts/Makefile.include
4
4
include ../../../../../tools/scripts/Makefile.arch
5
5
include ../../../../../tools/scripts/utilities.mak
6
6
7
- SUBDIRS =
7
+ SUBDIRS = \
8
+ asm_pure_loop
8
9
9
10
all : $(SUBDIRS )
10
11
$(SUBDIRS ) :
Original file line number Diff line number Diff line change
1
+ asm_pure_loop
Original file line number Diff line number Diff line change
1
+ # SPDX-License-Identifier: GPL-2.0
2
+ # Carsten Haitzler <[email protected] >, 2021
3
+
4
+ include ../Makefile.miniconfig
5
+
6
+ # Binary to produce
7
+ BIN =asm_pure_loop
8
+ # Any linking/libraries needed for the binary - empty if none needed
9
+ LIB =
10
+
11
+ all : $(BIN )
12
+
13
+ $(BIN ) : $(BIN ) .S
14
+ ifdef CORESIGHT
15
+ ifeq ($(ARCH ) ,arm64)
16
+ # Build line - this is raw asm with no libc to have an always exact binary
17
+ $(Q)$(CC) $(BIN).S -nostdlib -static -o $(BIN) $(LIB)
18
+ endif
19
+ endif
20
+
21
+ install-tests : all
22
+ ifdef CORESIGHT
23
+ ifeq ($(ARCH ) ,arm64)
24
+ # Install the test tool in the right place
25
+ $(call QUIET_INSTALL, tests) \
26
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$(INSTDIR_SUB)/$(BIN)'; \
27
+ $(INSTALL) $(BIN) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$(INSTDIR_SUB)/$(BIN)/$(BIN)'
28
+ endif
29
+ endif
30
+
31
+ clean :
32
+ $(Q )$(RM ) -f $(BIN )
33
+
34
+ .PHONY : all clean install-tests
Original file line number Diff line number Diff line change
1
+ / * SPDX - License - Identifier: GPL - 2 . 0 * /
2
+ / * Tamas Zsoldos <[email protected] > , 2021 * /
3
+
4
+ .globl _start
5
+ _start:
6
+ mov x0 , 0x0000ffff
7
+ mov x1 , xzr
8
+ loop :
9
+ nop
10
+ nop
11
+ cbnz x1 , noskip
12
+ nop
13
+ nop
14
+ adrp x2 , skip
15
+ add x2 , x2 , :lo12:skip
16
+ br x2
17
+ nop
18
+ nop
19
+ noskip:
20
+ nop
21
+ nop
22
+ skip:
23
+ sub x0 , x0 , 1
24
+ cbnz x0 , loop
25
+
26
+ mov x0 , # 0
27
+ mov x8 , # 93 // __NR_exit syscall
28
+ svc # 0
You can’t perform that action at this time.
0 commit comments