Skip to content

Commit 88c413f

Browse files
committed
* move os-agnostic test code to its own folder
* add last missting bounce test to macos
1 parent e58e8ad commit 88c413f

15 files changed

+422
-543
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ reloc_add_aarch64.o: reloc_add_aarch64.c insn.h
4545
vma.o: vma.cpp vma.h char_ptr_arr.h
4646

4747
all: $(TARGET)
48+
$(MAKE) -C test_common all
4849
$(MAKE) -C $(TEST_SUBDIR) all
4950

5051
clean:
5152
rm -f $(TARGET) $(OBJ)
53+
$(MAKE) -C test_common clean
5254
$(MAKE) -C $(TEST_SUBDIR) clean

test_common/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Differentiate between GAS and Apple clang
2+
AS_VENDOR := $(word 1, $(shell $(AS) --version))
3+
ifeq ($(AS_VENDOR), GNU)
4+
ASFLAGS += --strip-local-absolute
5+
defsym = --defsym $(1)=$(2)
6+
else
7+
ASFLAGS += --target=aarch64-linux-gnu
8+
defsym = -Wa,-defsym,$(1)=$(2)
9+
endif
10+
REL := test_bounce_data_aosoa_alt_0.o \
11+
test_bounce_data_aosoa_alt_1.o \
12+
test_bounce_data_aosoa_alt_2.o \
13+
test_bounce_data_aosoa_alt_3.o
14+
15+
test_bounce_data_aosoa_alt_3.o: test_bounce_data_aosoa_alt_3.s
16+
$(AS) $(ASFLAGS) $(call defsym,FB_DIM_X,$(shell tput cols)) -o $@ $^
17+
18+
all: $(REL)
19+
20+
clean:
21+
rm -f $(REL)

test_linux/Makefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ REL := test_text.o \
88
test_bounce.o \
99
test_bounce_neon.o \
1010
test_bounce_neon_aosoa.o \
11-
test_bounce_neon_aosoa_bg.o \
12-
test_bounce_data_aosoa_alt_0.o \
13-
test_bounce_data_aosoa_alt_1.o \
14-
test_bounce_data_aosoa_alt_2.o \
15-
test_bounce_data_aosoa_alt_3.o
11+
test_bounce_neon_aosoa_bg.o
1612

1713
test_bounce.o: test_bounce.s
1814
$(AS) $(ASFLAGS) --defsym FB_DIM_X=$(shell tput cols) --defsym FB_DIM_Y=$(shell tput lines) --defsym FRAMES=1024 -o $@ $^
@@ -26,9 +22,6 @@ test_bounce_neon_aosoa.o: test_bounce_neon_aosoa.s
2622
test_bounce_neon_aosoa_bg.o: test_bounce_neon_aosoa_bg.s
2723
$(AS) $(ASFLAGS) --defsym FB_DIM_X=$(shell tput cols) --defsym FB_DIM_Y=$(shell tput lines) --defsym FRAMES=2048 -o $@ $^
2824

29-
test_bounce_data_aosoa_alt_3.o: test_bounce_data_aosoa_alt_3.s
30-
$(AS) $(ASFLAGS) --defsym FB_DIM_X=$(shell tput cols) -o $@ $^
31-
3225
all: $(REL)
3326

3427
clean:

test_linux/test_bounce_neon_aosoa.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22
BUILD=..
3+
COMMON=../test_common
34

45
make -C ${BUILD} all
56

@@ -8,9 +9,9 @@ make -C ${BUILD} all
89
# stdout; restore term cursor upon termination
910

1011
tput civis
11-
${BUILD}/elvenrel test_bounce_data_aosoa_alt_0.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
12-
${BUILD}/elvenrel test_bounce_data_aosoa_alt_1.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
13-
${BUILD}/elvenrel test_bounce_data_aosoa_alt_2.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
14-
${BUILD}/elvenrel test_bounce_data_aosoa_alt_3.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
15-
${BUILD}/elvenrel test_bounce_data_aosoa_alt_2.o test_bounce_neon_aosoa_bg.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
12+
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_0.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
13+
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_1.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
14+
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_2.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
15+
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_3.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
16+
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_2.o test_bounce_neon_aosoa_bg.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
1617
tput cnorm

test_macos/Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Support both GAS and Apple clang
1+
# Differentiate between GAS and Apple clang
22
AS_VENDOR := $(word 1, $(shell $(AS) --version))
33
ifeq ($(AS_VENDOR), GNU)
44
ASFLAGS += --strip-local-absolute
@@ -18,10 +18,7 @@ REL := test_text.o \
1818
test_bounce.o \
1919
test_bounce_neon.o \
2020
test_bounce_neon_aosoa.o \
21-
test_bounce_data_aosoa_alt_0.o \
22-
test_bounce_data_aosoa_alt_1.o \
23-
test_bounce_data_aosoa_alt_2.o \
24-
test_bounce_data_aosoa_alt_3.o
21+
test_bounce_neon_aosoa_bg.o
2522

2623
stringx.o: ../stringx.s
2724
$(AS) $(ASFLAGS) -o $@ $^
@@ -35,8 +32,8 @@ test_bounce_neon.o: test_bounce_neon.s
3532
test_bounce_neon_aosoa.o: test_bounce_neon_aosoa.s
3633
$(AS) $(ASFLAGS) $(call defsym,FB_DIM_X,$(shell tput cols)) $(call defsym,FB_DIM_Y,$(shell tput lines)) $(call defsym,FRAMES,1024) -o $@ $^
3734

38-
test_bounce_data_aosoa_alt_3.o: test_bounce_data_aosoa_alt_3.s
39-
$(AS) $(ASFLAGS) $(call defsym,FB_DIM_X,$(shell tput cols)) -o $@ $^
35+
test_bounce_neon_aosoa_bg.o: test_bounce_neon_aosoa_bg.s
36+
$(AS) $(ASFLAGS) $(call defsym,FB_DIM_X,$(shell tput cols)) $(call defsym,FB_DIM_Y,$(shell tput lines)) $(call defsym,FRAMES,2048) -o $@ $^
4037

4138
all: $(REL)
4239

test_macos/test_bounce_data_aosoa_alt_0.s

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)