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 90168A00C2; Thu, 5 May 2022 19:31:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8A5F4284F; Thu, 5 May 2022 19:30:36 +0200 (CEST) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by mails.dpdk.org (Postfix) with ESMTP id 26BF442843 for ; Thu, 5 May 2022 19:30:34 +0200 (CEST) Received: by mail-lj1-f174.google.com with SMTP id q14so6481757ljc.12 for ; Thu, 05 May 2022 10:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NsvKHV50P8eyjkcSn3XumW8sSl+3syDFWSTC1jk/6ug=; b=gReMkbSl9hOV/fDMBZYh+REAz3kQXOqDw+lJws1GpUm3NUOwpT70ltW9ihUENGvUmw mbZBb6meef0LmSisiriHuMG0toTJK9kjRTOfWhBa+bR8bR8jhmbA/JP6sXhMgyS66SCW /3JMjtIYPACd4wA2HolfP+cRJ5YfHqFeK9cm7l23hfalFyF5eLrNl6DNuzl0yFaD6Gc6 o4VLSCECaEhPFu26pCO4QPmY/T8q+uIP6fy1HTD13QPo1nnCMhFaF2vcZhsk1nk4gZpI tCY+wsoKtfEcJo9eFKwTqQF+PAv5hPhpn+wBhHWbsW9iK3+EQ8Y+hxM3r+yG1Hfdy9dT dJYw== 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=NsvKHV50P8eyjkcSn3XumW8sSl+3syDFWSTC1jk/6ug=; b=tkx57FZMIR1Rfswct36DShUws+fhFcq5WVDgYxi/9ELHW5Lx19T5FVwa1w/+fTJAWk ruargNRvLnkuNAfDar4KOyJIRhLLaAaH5vuJiBdlk0S5ujmjG+fw9OehHjGDltUAB/6A h46xuoJmAOHkYIGAPDPuNA748MoHoEo9hcBmeBYvxoXxrhqx2vcW/SgLnt/QJXDr5zBr rjl3bGN9H7PVhhRS8x3rOeGMmFTJ6Ao+bpHsUUXvpMEU2uNnbX/q+47shU65PJFP564h Dq5aUnkPr6FS3CRk3mwBS6eTJ5x2IC4ovqHKJVMhR50v8AjjIvYvu2As1LkdflfOFJtg mNkw== X-Gm-Message-State: AOAM532FFPQyWhJwXc0bL9b7GxblUYrnAktG9CQ7QZYpkUg1jpujng5O 0R7Wjodq9QAnt34O2rxawk0gxDtb1bqtKw== X-Google-Smtp-Source: ABdhPJzrPBe2dmRSiQoE4nHEf+iAZFG/Ps4F0as7yVaIroAEyNvS/uH7WC0dGsEf1nn3xwHtHWP0Hw== X-Received: by 2002:a2e:81c1:0:b0:24b:f44:3970 with SMTP id s1-20020a2e81c1000000b0024b0f443970mr17206911ljg.97.1651771833769; Thu, 05 May 2022 10:30: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 z26-20020ac25dfa000000b0047255d21203sm289640lfq.306.2022.05.05.10.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 10:30:33 -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 08/11] test/cpuflags: add test for RISC-V cpu flag Date: Thu, 5 May 2022 19:30:00 +0200 Message-Id: <20220505173003.3242618-9-kda@semihalf.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220505173003.3242618-1-kda@semihalf.com> References: <20220505173003.3242618-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. Signed-off-by: Michal Mazurek Signed-off-by: Stanislaw Kardach Sponsored-by: Frank Zhao Sponsored-by: Sam Grove --- 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