18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci# The loops are all 64-bit code 38c2ecf20Sopenharmony_ciCFLAGS += -m64 48c2ecf20Sopenharmony_ciCFLAGS += -I$(CURDIR) 58c2ecf20Sopenharmony_ciCFLAGS += -D SELFTEST 68c2ecf20Sopenharmony_ciCFLAGS += -maltivec 78c2ecf20Sopenharmony_ciCFLAGS += -mcpu=power4 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci# Use our CFLAGS for the implicit .S rule & set the asm machine type 108c2ecf20Sopenharmony_ciASFLAGS = $(CFLAGS) -Wa,-mpower4 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciTEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \ 138c2ecf20Sopenharmony_ci copyuser_p7_t0 copyuser_p7_t1 \ 148c2ecf20Sopenharmony_ci memcpy_64_t0 memcpy_64_t1 memcpy_64_t2 \ 158c2ecf20Sopenharmony_ci memcpy_p7_t0 memcpy_p7_t1 copy_mc_64 \ 168c2ecf20Sopenharmony_ci copyuser_64_exc_t0 copyuser_64_exc_t1 copyuser_64_exc_t2 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciEXTRA_SOURCES := validate.c ../harness.c stubs.S 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_citop_srcdir = ../../../../.. 218c2ecf20Sopenharmony_ciinclude ../../lib.mk 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci$(OUTPUT)/copyuser_64_t%: copyuser_64.S $(EXTRA_SOURCES) 248c2ecf20Sopenharmony_ci $(CC) $(CPPFLAGS) $(CFLAGS) \ 258c2ecf20Sopenharmony_ci -D COPY_LOOP=test___copy_tofrom_user_base \ 268c2ecf20Sopenharmony_ci -D SELFTEST_CASE=$(subst copyuser_64_t,,$(notdir $@)) \ 278c2ecf20Sopenharmony_ci -o $@ $^ 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci$(OUTPUT)/copyuser_p7_t%: copyuser_power7.S $(EXTRA_SOURCES) 308c2ecf20Sopenharmony_ci $(CC) $(CPPFLAGS) $(CFLAGS) \ 318c2ecf20Sopenharmony_ci -D COPY_LOOP=test___copy_tofrom_user_power7 \ 328c2ecf20Sopenharmony_ci -D SELFTEST_CASE=$(subst copyuser_p7_t,,$(notdir $@)) \ 338c2ecf20Sopenharmony_ci -o $@ $^ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci# Strictly speaking, we only need the memcpy_64 test cases for big-endian 368c2ecf20Sopenharmony_ci$(OUTPUT)/memcpy_64_t%: memcpy_64.S $(EXTRA_SOURCES) 378c2ecf20Sopenharmony_ci $(CC) $(CPPFLAGS) $(CFLAGS) \ 388c2ecf20Sopenharmony_ci -D COPY_LOOP=test_memcpy \ 398c2ecf20Sopenharmony_ci -D SELFTEST_CASE=$(subst memcpy_64_t,,$(notdir $@)) \ 408c2ecf20Sopenharmony_ci -o $@ $^ 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci$(OUTPUT)/memcpy_p7_t%: memcpy_power7.S $(EXTRA_SOURCES) 438c2ecf20Sopenharmony_ci $(CC) $(CPPFLAGS) $(CFLAGS) \ 448c2ecf20Sopenharmony_ci -D COPY_LOOP=test_memcpy_power7 \ 458c2ecf20Sopenharmony_ci -D SELFTEST_CASE=$(subst memcpy_p7_t,,$(notdir $@)) \ 468c2ecf20Sopenharmony_ci -o $@ $^ 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci$(OUTPUT)/copy_mc_64: copy_mc_64.S $(EXTRA_SOURCES) 498c2ecf20Sopenharmony_ci $(CC) $(CPPFLAGS) $(CFLAGS) \ 508c2ecf20Sopenharmony_ci -D COPY_LOOP=test_copy_mc_generic \ 518c2ecf20Sopenharmony_ci -o $@ $^ 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci$(OUTPUT)/copyuser_64_exc_t%: copyuser_64.S exc_validate.c ../harness.c \ 548c2ecf20Sopenharmony_ci copy_tofrom_user_reference.S stubs.S 558c2ecf20Sopenharmony_ci $(CC) $(CPPFLAGS) $(CFLAGS) \ 568c2ecf20Sopenharmony_ci -D COPY_LOOP=test___copy_tofrom_user_base \ 578c2ecf20Sopenharmony_ci -D SELFTEST_CASE=$(subst copyuser_64_exc_t,,$(notdir $@)) \ 588c2ecf20Sopenharmony_ci -o $@ $^ 59