{"id":2224543,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2224543/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/fc0e1cb69ab0540a8e31a5f85522437e784c952e.1776437127.git.chao.liu.zevorn@gmail.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.2/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<fc0e1cb69ab0540a8e31a5f85522437e784c952e.1776437127.git.chao.liu.zevorn@gmail.com>","list_archive_url":null,"date":"2026-04-17T14:49:32","name":"[v10,2/2] tests/tcg/riscv64: Add test for vlsseg8e32 instruction","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"c98a6d4679c7caf47a970673c38c82e98e772ce2","submitter":{"id":92265,"url":"http://patchwork.ozlabs.org/api/1.2/people/92265/?format=json","name":"Chao Liu","email":"chao.liu.zevorn@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/fc0e1cb69ab0540a8e31a5f85522437e784c952e.1776437127.git.chao.liu.zevorn@gmail.com/mbox/","series":[{"id":500357,"url":"http://patchwork.ozlabs.org/api/1.2/series/500357/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500357","date":"2026-04-17T14:49:31","name":"Generate strided vector loads/stores with tcg nodes","version":10,"mbox":"http://patchwork.ozlabs.org/series/500357/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2224543/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2224543/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=cFpdaeNW;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fxyWk4S7bz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 00:51:46 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wDkWI-0006Jk-BW; Fri, 17 Apr 2026 10:50:10 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <chao.liu.zevorn@gmail.com>)\n id 1wDkWF-0006GP-Mj\n for qemu-devel@nongnu.org; Fri, 17 Apr 2026 10:50:07 -0400","from mail-vk1-xa44.google.com ([2607:f8b0:4864:20::a44])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <chao.liu.zevorn@gmail.com>)\n id 1wDkWD-0007Wy-G0\n for qemu-devel@nongnu.org; Fri, 17 Apr 2026 10:50:07 -0400","by mail-vk1-xa44.google.com with SMTP id\n 71dfb90a1353d-56e91f17a99so510933e0c.3\n for <qemu-devel@nongnu.org>; Fri, 17 Apr 2026 07:50:05 -0700 (PDT)","from ZEVORN-PC.bbrouter ([162.244.208.119])\n by smtp.gmail.com with ESMTPSA id\n 71dfb90a1353d-56fa92f21bbsm954365e0c.11.2026.04.17.07.49.58\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 17 Apr 2026 07:50:03 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776437404; x=1777042204; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=t3BlBc3lz7D9zmiWzkR8i/iKkBIK3+ol238PEeTSaSg=;\n b=cFpdaeNWS82hrNcojhLjSILdZxntKBiYylHJFM/KV+qj1O1B88ejdOfLBTSOzu2aoA\n GovVhrNLCZ1Rqg6ZzuBGnnJo+gpJ4LyeCuHCUFjMaz/XlsC9wIzjhOsj6fLSWGLe7Hcy\n UIxgbec8AS710gnj6JjojYOrLyIvPm0bR7fu78B3B3eoju87T4CrMmhYApCf0GpuW5Yu\n AahZhBtjiWakOT3Va0Vsrr4gr191yYl8HbAMW2VGuk5fkmQ4VfR3p1jLcg25P/IdrbXZ\n 8nDscaocwIu3ZZa5XY4v0gQX2ULicqI8Qq8Q8PVundFKkFb/UWdEIRVwXSZrWnBHXZY/\n +FHA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776437404; x=1777042204;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=t3BlBc3lz7D9zmiWzkR8i/iKkBIK3+ol238PEeTSaSg=;\n b=b7xV6RMKwcx5ZPCf1272y2P+O+TcPWsBisYY7oUPW4685SAVtPVz/Z5StOaIxA10Me\n ZM9lGDXFB11WXVTg9FVmjIjdCKYKdqOr7CCFBlYYP3+QxHpsUlnwBsbFKJKwIqg7zj4A\n r9hzxNF5brFY00ZStgCLjNL6yCd82WV7urVg5D50GGO2iuar7tASi4q80uhYtj8AR5IA\n o67QAPa87AskfbokMzxsWddfgjyT1ah/1LbPo/4foaDXzHSEZZG5RY5uTIpuGVSiQzt0\n vDwWd7ovbRelFKp8fKume1AVMyYNTaYfCqO0l9+FXcP54x4xNkGUXoRHfa9sDkMfz6YS\n 6HOg==","X-Gm-Message-State":"AOJu0Ywpf3/W7+iiOkl5aUvocOuk46FBrffb+cpKKbbVjyy4/5pDpoNc\n o7Kzsjh6aPzc7wtOk2V1CoR1zQOcOV68oLOPdtN7gh/xRJkuZFDkgOuG","X-Gm-Gg":"AeBDiesGa8rOF9kB/Lf9jQIbSbhi8qS5ggMkEkXe6GBML/EA8hS6avVJPqoonCkvLxJ\n mtF1PUnnUN1QbHrZMFXZGfT/vBb1+0qU7dFQ/38q8ody8OGr0rX33J7SUbuG/O8gdJLTZKm29gD\n E8NeFAIwUVe2HJIkPP/E8yhP+P87pb3uJiJhJNMhDCLAjrUG3k9gKS2fx8Zc/HWTtQeBbiMMLM2\n MUef18siLbytVvPEiv3pBQyGh5JpWy6TiUA3Lt1ZQtF82iRks6V0bpa4BGQ2nd8tRsWzXJEcjMC\n CO2Xwynv3Pa8xZQ2bxSz7HRgoBhBeCpYn2H0+pyuENlTbnRyF0MSrzdNIgRzZILzGxkQorOLNuD\n HI2UMCDIUDRdp/SiDWlbL0zEnkIB5hIRCjRChEWngGxgS+O8tJW66HDf8GkENo3tZPVkXqotRuu\n G21RyRf1+nucuYDQL6g8zQQJMGTXag0vuKdvusTyaxO0NYSdcd9VFityMoUXEXHD4IbYSwq6UoZ\n Qoroh2lnwDu8w9pyw==","X-Received":"by 2002:a05:6122:3704:b0:56f:a329:6859 with SMTP id\n 71dfb90a1353d-56fa58a562cmr1849335e0c.7.1776437404250;\n Fri, 17 Apr 2026 07:50:04 -0700 (PDT)","From":"Chao Liu <chao.liu.zevorn@gmail.com>","To":"Palmer Dabbelt <palmer@dabbelt.com>,\n Alistair Francis <alistair.francis@wdc.com>,\n Weiwei Li <liwei1518@gmail.com>,\n Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,\n Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,\n Chao Liu <chao.liu.zevorn@gmail.com>","Cc":"qemu-devel@nongnu.org, qemu-riscv@nongnu.org,\n Nicholas Piggin <npiggin@gmail.com>, Eric Biggers <ebiggers@kernel.org>","Subject":"[PATCH v10 2/2] tests/tcg/riscv64: Add test for vlsseg8e32\n instruction","Date":"Fri, 17 Apr 2026 22:49:32 +0800","Message-ID":"\n <fc0e1cb69ab0540a8e31a5f85522437e784c952e.1776437127.git.chao.liu.zevorn@gmail.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<cover.1776437127.git.chao.liu.zevorn@gmail.com>","References":"<cover.1776437127.git.chao.liu.zevorn@gmail.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=2607:f8b0:4864:20::a44;\n envelope-from=chao.liu.zevorn@gmail.com; helo=mail-vk1-xa44.google.com","X-Spam_score_int":"-10","X-Spam_score":"-1.1","X-Spam_bar":"-","X-Spam_report":"(-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,\n FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=no autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"This case, it copied 64 bytes from a0 to a1 with vlsseg8e32.\n\nSigned-off-by: Chao Liu <chao.liu.zevorn@gmail.com>\nSigned-off-by: Nicholas Piggin <npiggin@gmail.com>\nTested-by: Eric Biggers <ebiggers@kernel.org>\n---\n tests/tcg/riscv64/Makefile.softmmu-target |   7 +-\n tests/tcg/riscv64/test-vlsseg8e32.S       | 107 ++++++++++++++++++++++\n 2 files changed, 113 insertions(+), 1 deletion(-)\n create mode 100644 tests/tcg/riscv64/test-vlsseg8e32.S","diff":"diff --git a/tests/tcg/riscv64/Makefile.softmmu-target b/tests/tcg/riscv64/Makefile.softmmu-target\nindex 82be8a2c91..05c8f851e0 100644\n--- a/tests/tcg/riscv64/Makefile.softmmu-target\n+++ b/tests/tcg/riscv64/Makefile.softmmu-target\n@@ -7,7 +7,7 @@ VPATH += $(TEST_SRC)\n \n LINK_SCRIPT = $(TEST_SRC)/semihost.ld\n LDFLAGS = -T $(LINK_SCRIPT)\n-CFLAGS += -g -Og\n+CFLAGS += -march=rv64gcv -mabi=lp64d -g -Og\n \n %.o: %.S\n \t$(CC) $(CFLAGS) $< -Wa,--noexecstack -c -o $@\n@@ -41,5 +41,10 @@ comma:= ,\n run-test-crc32: test-crc32\n \t$(call run-test, $<, $(QEMU) -cpu rv64$(comma)xlrbr=true $(QEMU_OPTS)$<)\n \n+EXTRA_RUNS += run-vlsseg8e32\n+run-vlsseg8e32: QEMU_OPTS := -cpu rv64,v=true $(QEMU_OPTS)\n+run-vlsseg8e32: test-vlsseg8e32\n+\t$(call run-test, $<, $(QEMU) $(QEMU_OPTS)$<)\n+\n # We don't currently support the multiarch system tests\n undefine MULTIARCH_TESTS\ndiff --git a/tests/tcg/riscv64/test-vlsseg8e32.S b/tests/tcg/riscv64/test-vlsseg8e32.S\nnew file mode 100644\nindex 0000000000..bbc79d5e8d\n--- /dev/null\n+++ b/tests/tcg/riscv64/test-vlsseg8e32.S\n@@ -0,0 +1,107 @@\n+#\n+# QEMU RISC-V Vector Strided Load Instruction testcase\n+#\n+# Copyright (c) 2025 Chao Liu chao.liu@yeah.net\n+#\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+#\n+\t.option\tnorvc\n+\n+\t.section .data\n+\t.align 4\n+source_data:\n+\t.asciz \"Test the vssseg8e32 insn by copy 64b and verifying correctness.\"\n+\t.equ source_len, 64\n+\n+\t.text\n+\t.global _start\n+_start:\n+\tlla\tt0, trap\n+\tcsrw\tmtvec, t0\n+\n+enable_rvv:\n+\n+\tli\tx15, 0x800000000024112d\n+\tcsrw\t0x301, x15\n+\tli\tx1, 0x2200\n+\tcsrr\tx2, mstatus\n+\tor\tx2, x2, x1\n+\tcsrw\tmstatus, x2\n+\n+rvv_test_func:\n+\tla\ta0, source_data\n+\tli\ta1, 0x80020000\n+\tvsetivli\tzero, 1, e32, m1, ta, ma\n+\tli\tt0, 64\n+\n+\tvlsseg8e32.v\tv0, (a0), t0\n+\taddi\ta0, a0, 32\n+\tvlsseg8e32.v\tv8, (a0), t0\n+\n+\tvssseg8e32.v\tv0, (a1), t0\n+\taddi\ta1, a1, 32\n+\tvssseg8e32.v\tv8, (a1), t0\n+\n+compare_start:\n+\tla\ta0, source_data\n+\tli\ta1, 0x80020000\n+\tli\tt0, 0\n+\tli\tt1, source_len\n+\n+compare_loop:\n+\t# when t0 >= len, compare end\n+\tbge\t t0, t1, compare_done\n+\n+\tlb\tt2, 0(a0)\n+\tlb\tt3, 0(a1)\n+\tbne\tt2, t3, compare_fail\n+\n+\taddi\ta0, a0, 1\n+\taddi\ta1, a1, 1\n+\taddi\tt0, t0, 1\n+\tj\tcompare_loop\n+\n+compare_done:\n+\t# compare ok, return 0\n+\tli\ta0, 0\n+\tj\t_exit\n+\n+compare_fail:\n+\t# compare failed, return 2\n+\tli\ta0, 2\n+\tj\t_exit\n+\n+trap:\n+\t# When an instruction traps, compare it to the insn in memory.\n+\tcsrr\tt0, mepc\n+\tcsrr\tt1, mtval\n+\tlwu\tt2, 0(t0)\n+\tbne\tt1, t2, fail\n+\n+\t# Skip the insn and continue.\n+\taddi\tt0, t0, 4\n+\tcsrw\tmepc, t0\n+\tmret\n+\n+fail:\n+\tli\ta0, 1\n+\n+# Exit code in a0\n+_exit:\n+\tlla\ta1, semiargs\n+\tli\tt0, 0x20026\t# ADP_Stopped_ApplicationExit\n+\tsd\tt0, 0(a1)\n+\tsd\ta0, 8(a1)\n+\tli\ta0, 0x20\t# TARGET_SYS_EXIT_EXTENDED\n+\n+\t# Semihosting call sequence\n+\t.balign\t16\n+\tslli\tzero, zero, 0x1f\n+\tebreak\n+\tsrai\tzero, zero, 0x7\n+\tj\t.\n+\n+\t.data\n+\t.balign\t16\n+semiargs:\n+\t.space\t16\n","prefixes":["v10","2/2"]}