From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiong Wang Subject: [PATH bpf-next 13/13] selftests: bpf: makefile support sub-register code-gen test mode Date: Wed, 19 Dec 2018 17:44:20 -0500 Message-ID: <1545259460-13376-14-git-send-email-jiong.wang@netronome.com> References: <1545259460-13376-1-git-send-email-jiong.wang@netronome.com> Cc: netdev@vger.kernel.org, oss-drivers@netronome.com, Jiong Wang To: ast@kernel.org, daniel@iogearbox.net Return-path: Received: from mail-wm1-f65.google.com ([209.85.128.65]:52030 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729373AbeLSWou (ORCPT ); Wed, 19 Dec 2018 17:44:50 -0500 Received: by mail-wm1-f65.google.com with SMTP id b11so98671wmj.1 for ; Wed, 19 Dec 2018 14:44:49 -0800 (PST) In-Reply-To: <1545259460-13376-1-git-send-email-jiong.wang@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: Add a new BPF_SELFTEST_32BIT variable to enable sub-register code-gen test mode. For example: make BPF_SELFTEST_32BIT=1 -C tools/testing/selftests/bpf run_tests will compile all bpf C program with sub-register code-gen enabled, ALU32 and JMP32 instructions will be used. Signed-off-by: Jiong Wang --- tools/testing/selftests/bpf/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 73aa6d8..70bccf6 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -146,6 +146,10 @@ endif endif endif +ifneq ($(BPF_SELFTEST_32BIT),) + LLC_FLAGS += -mattr=alu32 +endif + # Have one program compiled without "-target bpf" to test whether libbpf loads # it successfully $(OUTPUT)/test_xdp.o: test_xdp.c -- 2.7.4