From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E2E3A0544; Tue, 7 Jun 2022 12:47:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5A5242B7A; Tue, 7 Jun 2022 12:46:36 +0200 (CEST) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by mails.dpdk.org (Postfix) with ESMTP id 9B8D14281B for ; Tue, 7 Jun 2022 12:46:33 +0200 (CEST) Received: by mail-lf1-f44.google.com with SMTP id u23so27691133lfc.1 for ; Tue, 07 Jun 2022 03:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=il/Ojg6nMnnxJ4v/UzuQOsltnvdlSZEce3Ircx4SClE=; b=O2sVtPmex90PcxuN7h/kGoM/NcCkO0n+xVE1csLL02cMrn3sHEguqOyvwZWFR93tV6 J32VOvdv7Ya3n9DPFE2/CWR48WDCviZHNSn8UhznS1TuEig0dIdb/2z0T9V2lFspeo1x S6Eq96r6oTOUmrVIA7/JC4Y9sDlyfGhM3cSvXhA08yTBjbuNnCVUC8KXPd98ihA0Z+CO r0l4J3bYJMUQGX2SYSEUdKMtjvrIL53POvF9G02EXlUvP69qpM+CYEVAgNav9aHpFj5U IEStdDHQBUDd1FpJbxM3FOgjoT7/VG/2+mJPhBUv5aoCtv0oZEbdImKp3GeceFNz1abN D/Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=il/Ojg6nMnnxJ4v/UzuQOsltnvdlSZEce3Ircx4SClE=; b=Na17WsNL0ap/Gxi7jE0iBHyTCvuBuS9YqNbXt6B5R+iCMm6HdIueJc5aPlwlLU1oJ6 DX8Lxg41aWTRyLQuGDDukmxzwXo5Zj1HuJqoLqMhyNe8neEJZY8ow47Fkeg0Y5bX/M9z 3+gIBCrD4PeCSE8K0xerRL5A7lZOGerZOupnG5LgnoywKLxOlPuU79Jr3VT2IwcdSgwA A2nbX/eEjLzKKVmze1WjP4sr12g8ARYje2DKORK1B6VHWgUz6R5eFka0XgQ5HJntoSTX w9jI/Fev9CyYxYLrfylxO59RxFelbuWrEjcD9zkQdryDLN+csusRJ1yow2FzmTzOhZTW hOsw== X-Gm-Message-State: AOAM5315MD9/LxLlK8kg92032ZIK1CFC4tHwzM4+t3fYngN0BduDuEic PN2fi2vFmiBB9sJDBNb4YJXjZ0xfgxw6KO+Z X-Google-Smtp-Source: ABdhPJxKMP9sT3zxzj0n693RGPYW6T5Gykb7VJs7bwNcomckt0HY7ZlGUKyDo4BQwHYb+6xcxTrwpg== X-Received: by 2002:a05:6512:224d:b0:479:20f7:a19a with SMTP id i13-20020a056512224d00b0047920f7a19amr11325112lfu.26.1654598793204; Tue, 07 Jun 2022 03:46:33 -0700 (PDT) Received: from localhost.localdomain (89-73-146-138.dynamic.chello.pl. [89.73.146.138]) by smtp.gmail.com with ESMTPSA id m16-20020a056512115000b00478f2f2f044sm3217272lfg.123.2022.06.07.03.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 03:46:32 -0700 (PDT) From: Stanislaw Kardach To: dev@dpdk.org Cc: Michal Mazurek , Frank Zhao , Sam Grove , mw@semihalf.com, upstream@semihalf.com, Stanislaw Kardach Subject: [PATCH RESEND v4 6/8] test/cpuflags: add test for RISC-V cpu flag Date: Tue, 7 Jun 2022 12:46:15 +0200 Message-Id: <20220607104617.153892-7-kda@semihalf.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220607104617.153892-1-kda@semihalf.com> References: <20220607104617.153892-1-kda@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Michal Mazurek Add checks for all flag values defined in the RISC-V misa CSR register. Sponsored-by: Frank Zhao Sponsored-by: Sam Grove Signed-off-by: Michal Mazurek Signed-off-by: Stanislaw Kardach --- app/test/test_cpuflags.c | 81 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/app/test/test_cpuflags.c b/app/test/test_cpuflags.c index 40f6ac7fca..98a99c2c7d 100644 --- a/app/test/test_cpuflags.c +++ b/app/test/test_cpuflags.c @@ -200,6 +200,87 @@ test_cpuflags(void) CHECK_FOR_FLAG(RTE_CPUFLAG_INVTSC); #endif +#if defined(RTE_ARCH_RISCV) + + printf("Check for RISCV_ISA_A:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_A); + + printf("Check for RISCV_ISA_B:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_B); + + printf("Check for RISCV_ISA_C:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_C); + + printf("Check for RISCV_ISA_D:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_D); + + printf("Check for RISCV_ISA_E:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_E); + + printf("Check for RISCV_ISA_F:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_F); + + printf("Check for RISCV_ISA_G:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_G); + + printf("Check for RISCV_ISA_H:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_H); + + printf("Check for RISCV_ISA_I:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_I); + + printf("Check for RISCV_ISA_J:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_J); + + printf("Check for RISCV_ISA_K:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_K); + + printf("Check for RISCV_ISA_L:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_L); + + printf("Check for RISCV_ISA_M:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_M); + + printf("Check for RISCV_ISA_N:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_N); + + printf("Check for RISCV_ISA_O:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_O); + + printf("Check for RISCV_ISA_P:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_P); + + printf("Check for RISCV_ISA_Q:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_Q); + + printf("Check for RISCV_ISA_R:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_R); + + printf("Check for RISCV_ISA_S:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_S); + + printf("Check for RISCV_ISA_T:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_T); + + printf("Check for RISCV_ISA_U:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_U); + + printf("Check for RISCV_ISA_V:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_V); + + printf("Check for RISCV_ISA_W:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_W); + + printf("Check for RISCV_ISA_X:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_X); + + printf("Check for RISCV_ISA_Y:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_Y); + + printf("Check for RISCV_ISA_Z:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_Z); +#endif + /* * Check if invalid data is handled properly */ -- 2.30.2