1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 >> 2 # The loops are all 64-bit code >> 3 CFLAGS += -m64 >> 4 CFLAGS += -I$(CURDIR) >> 5 CFLAGS += -D SELFTEST >> 6 CFLAGS += -maltivec >> 7 CFLAGS += -mcpu=power4 >> 8 >> 9 # Use our CFLAGS for the implicit .S rule & set the asm machine type >> 10 ASFLAGS = $(CFLAGS) -Wa,-mpower4 >> 11 2 TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t 12 TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \ 3 copyuser_p7_t0 copyuser_p7_t1 13 copyuser_p7_t0 copyuser_p7_t1 \ 4 memcpy_64_t0 memcpy_64_t1 memc 14 memcpy_64_t0 memcpy_64_t1 memcpy_64_t2 \ 5 memcpy_p7_t0 memcpy_p7_t1 copy 15 memcpy_p7_t0 memcpy_p7_t1 copy_mc_64 \ 6 copyuser_64_exc_t0 copyuser_64 16 copyuser_64_exc_t0 copyuser_64_exc_t1 copyuser_64_exc_t2 \ 7 memmove_64 17 memmove_64 8 18 9 EXTRA_SOURCES := validate.c ../harness.c stubs 19 EXTRA_SOURCES := validate.c ../harness.c stubs.S 10 20 11 top_srcdir = ../../../../.. 21 top_srcdir = ../../../../.. 12 include ../../lib.mk 22 include ../../lib.mk 13 include ../flags.mk << 14 << 15 # The loops are all 64-bit code << 16 CFLAGS += -m64 << 17 CFLAGS += -I$(CURDIR) << 18 CFLAGS += -D SELFTEST << 19 CFLAGS += -maltivec << 20 CFLAGS += -mcpu=power4 << 21 << 22 # Use our CFLAGS for the implicit .S rule & se << 23 ASFLAGS = $(CFLAGS) -Wa,-mpower4 << 24 23 25 $(OUTPUT)/copyuser_64_t%: copyuser_64.S 24 $(OUTPUT)/copyuser_64_t%: copyuser_64.S $(EXTRA_SOURCES) 26 $(CC) $(CPPFLAGS) $(CFLAGS) \ 25 $(CC) $(CPPFLAGS) $(CFLAGS) \ 27 -D COPY_LOOP=test___copy_tofro 26 -D COPY_LOOP=test___copy_tofrom_user_base \ 28 -D SELFTEST_CASE=$(subst copyu 27 -D SELFTEST_CASE=$(subst copyuser_64_t,,$(notdir $@)) \ 29 -o $@ $^ 28 -o $@ $^ 30 29 31 $(OUTPUT)/copyuser_p7_t%: copyuser_power 30 $(OUTPUT)/copyuser_p7_t%: copyuser_power7.S $(EXTRA_SOURCES) 32 $(CC) $(CPPFLAGS) $(CFLAGS) \ 31 $(CC) $(CPPFLAGS) $(CFLAGS) \ 33 -D COPY_LOOP=test___copy_tofro 32 -D COPY_LOOP=test___copy_tofrom_user_power7 \ 34 -D SELFTEST_CASE=$(subst copyu 33 -D SELFTEST_CASE=$(subst copyuser_p7_t,,$(notdir $@)) \ 35 -o $@ $^ 34 -o $@ $^ 36 35 37 # Strictly speaking, we only need the memcpy_6 36 # Strictly speaking, we only need the memcpy_64 test cases for big-endian 38 $(OUTPUT)/memcpy_64_t%: memcpy_64.S $(EXTRA_SO 37 $(OUTPUT)/memcpy_64_t%: memcpy_64.S $(EXTRA_SOURCES) 39 $(CC) $(CPPFLAGS) $(CFLAGS) \ 38 $(CC) $(CPPFLAGS) $(CFLAGS) \ 40 -D COPY_LOOP=test_memcpy \ 39 -D COPY_LOOP=test_memcpy \ 41 -D SELFTEST_CASE=$(subst memcp 40 -D SELFTEST_CASE=$(subst memcpy_64_t,,$(notdir $@)) \ 42 -o $@ $^ 41 -o $@ $^ 43 42 44 $(OUTPUT)/memcpy_p7_t%: memcpy_power7.S $(EXTR 43 $(OUTPUT)/memcpy_p7_t%: memcpy_power7.S $(EXTRA_SOURCES) 45 $(CC) $(CPPFLAGS) $(CFLAGS) \ 44 $(CC) $(CPPFLAGS) $(CFLAGS) \ 46 -D COPY_LOOP=test_memcpy_power 45 -D COPY_LOOP=test_memcpy_power7 \ 47 -D SELFTEST_CASE=$(subst memcp 46 -D SELFTEST_CASE=$(subst memcpy_p7_t,,$(notdir $@)) \ 48 -o $@ $^ 47 -o $@ $^ 49 48 50 $(OUTPUT)/copy_mc_64: copy_mc_64.S $(EXTRA_SOU 49 $(OUTPUT)/copy_mc_64: copy_mc_64.S $(EXTRA_SOURCES) 51 $(CC) $(CPPFLAGS) $(CFLAGS) \ 50 $(CC) $(CPPFLAGS) $(CFLAGS) \ 52 -D COPY_LOOP=test_copy_mc_gene 51 -D COPY_LOOP=test_copy_mc_generic \ 53 -o $@ $^ 52 -o $@ $^ 54 53 55 $(OUTPUT)/copyuser_64_exc_t%: copyuser_64.S ex 54 $(OUTPUT)/copyuser_64_exc_t%: copyuser_64.S exc_validate.c ../harness.c \ 56 copy_tofrom_user_reference.S s 55 copy_tofrom_user_reference.S stubs.S 57 $(CC) $(CPPFLAGS) $(CFLAGS) \ 56 $(CC) $(CPPFLAGS) $(CFLAGS) \ 58 -D COPY_LOOP=test___copy_tofro 57 -D COPY_LOOP=test___copy_tofrom_user_base \ 59 -D SELFTEST_CASE=$(subst copyu 58 -D SELFTEST_CASE=$(subst copyuser_64_exc_t,,$(notdir $@)) \ 60 -o $@ $^ 59 -o $@ $^ 61 60 62 $(OUTPUT)/memmove_64: mem_64.S memcpy_64.S mem 61 $(OUTPUT)/memmove_64: mem_64.S memcpy_64.S memmove_validate.c ../harness.c \ 63 memcpy_stubs.S 62 memcpy_stubs.S 64 $(CC) $(CPPFLAGS) $(CFLAGS) \ 63 $(CC) $(CPPFLAGS) $(CFLAGS) \ 65 -D TEST_MEMMOVE=test_memmove \ 64 -D TEST_MEMMOVE=test_memmove \ 66 -o $@ $^ 65 -o $@ $^
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.