Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20261004100417.GY3542221@port70.net>
Date: Sun, 4 Oct 2026 12:04:17 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: Alex Rønne Petersen <alex@...xrp.com>
Cc: Alexander Monakov <amonakov@...ras.ru>, musl@...ts.openwall.com,
	Rich Felker <dalias@...c.org>
Subject: Re: [PATCH] riscv: declare all vector registers as clobbers
 of syscalls

* Alex Rønne Petersen <alex@...xrp.com> [2026-10-04 10:08:28 +0200]:
> On Sun, Oct 4, 2026, at 09:14, Alexander Monakov wrote:
> > But this is not the right test. You have to diff -E -dM from two runs, one with
> > -march=rv64gc, another with -march=rv64gcv (and you'll find __riscv_vector).
> 
> I dismissed __riscv_vector initially because of these findings:
> 
> * GCC 12 defined __riscv_vector
> * GCC 13+ understands v0-v31, vl, vtype
> * GCC 14+ understands vxrm, vxsat
> * Clang 12 defined __riscv_vector
> * Clang 13+ understands v0-v31
> * Clang 18+ understands vl, vtype, vxrm, vxsat
> 
> So that's all pretty horrible and makes __riscv_vector alone insufficient.
> 
> However, what we could do is a configure check that errors if __riscv_vector is defined but the clobbers we need aren't accepted.

that should work

fwiw glibc checks __riscv_v for the clobbers which is defined
in gcc-16 when the abi flag v is present, clang had it forever.
musl could error on !__riscv_v && __riscv_vector to approximate
the config check.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.