sorear changed the topic of #riscv to: RISC-V instruction set architecture | https://riscv.org | Logs: https://libera.irclog.whitequark.org/riscv | Matrix: #riscv:catircservices.org
emdevt has joined #riscv
shadows has quit [Server closed connection]
shadows has joined #riscv
shreyasminocha has quit [Server closed connection]
shreyasminocha has joined #riscv
mtoy has joined #riscv
ZipCPU has quit [Read error: Connection reset by peer]
ZipCPU has joined #riscv
MyNetAz has quit [Remote host closed the connection]
Tenkawa has quit [Quit: Was I really ever here?]
stefanct has quit [Server closed connection]
stefanct has joined #riscv
hexdump01 has quit [Ping timeout: 248 seconds]
hexdump01 has joined #riscv
naoki has joined #riscv
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #riscv
fgarcia has joined #riscv
mtoy has quit [Ping timeout: 260 seconds]
mtoy has joined #riscv
Kyuvi has quit [Quit: Client closed]
haritz has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
ruidx has joined #riscv
ruidx has quit [Max SendQ exceeded]
ruidx has joined #riscv
matoro has quit [Server closed connection]
matoro has joined #riscv
agentcasey has quit [Quit: ZNC 1.9.0+deb2build3 - https://znc.in]
agentcasey has joined #riscv
zv has quit [Server closed connection]
ruidx has quit [Quit: WeeChat 3.8]
zv has joined #riscv
emdevt has quit [Remote host closed the connection]
vigneshr has quit [Quit: Connection closed for inactivity]
ruidx has joined #riscv
jjido has joined #riscv
jjido has quit [Quit: My laptop has gone to sleep. ZZZzzz…]
shreyasminocha has quit [Ping timeout: 245 seconds]
fgarcia has quit [Ping timeout: 245 seconds]
JanC has quit [Ping timeout: 245 seconds]
JanC has joined #riscv
la_mettrie has quit [Ping timeout: 245 seconds]
shreyasminocha has joined #riscv
fgarcia has joined #riscv
la_mettrie has joined #riscv
Jimmy2027 has quit [Server closed connection]
hendrik has joined #riscv
Pokey has quit [Server closed connection]
Pokey has joined #riscv
ldevulder has joined #riscv
tux3 has quit [Server closed connection]
tux3 has joined #riscv
JanC has quit [Ping timeout: 256 seconds]
JanC has joined #riscv
sgerhold has quit [Quit: Ping timeout (120 seconds)]
sgerhold has joined #riscv
netmonk has quit [Server closed connection]
netmonk has joined #riscv
JanC has quit [Killed (erbium.libera.chat (Nickname regained by services))]
JanC has joined #riscv
Andre_Z has joined #riscv
jmcgnh has quit [Server closed connection]
jmcgnh has joined #riscv
naoki has quit [Quit: naoki]
djdelorie has quit [Server closed connection]
djdelorie has joined #riscv
Tenkawa has joined #riscv
NishanthMenon has quit [Server closed connection]
NishanthMenon has joined #riscv
ldevulder has quit [Ping timeout: 272 seconds]
balrog has quit [Server closed connection]
balrog has joined #riscv
ldevulder has joined #riscv
dilfridge has quit [Server closed connection]
dilfridge has joined #riscv
mobius has quit [Server closed connection]
mobius has joined #riscv
zx2c4 has quit [Server closed connection]
zx2c4 has joined #riscv
haritz has joined #riscv
haritz has quit [Changing host]
haritz has joined #riscv
ZipCPU has quit [Read error: Connection reset by peer]
Andre_Z has quit [Quit: Leaving.]
cousteau has joined #riscv
cousteau has quit [Quit: Client closed]
cousteau has joined #riscv
SCHAPiE has quit [Server closed connection]
SCHAPiE has joined #riscv
cousteau has quit [Quit: Client closed]
cousteau has joined #riscv
cousteau has quit [Quit: Client closed]
cousteau has joined #riscv
ZipCPU has joined #riscv
JanC is now known as Guest3636
Guest3636 has quit [Killed (copper.libera.chat (Nickname regained by services))]
JanC has joined #riscv
psydroid2 has joined #riscv
crest has quit [Server closed connection]
crest has joined #riscv
emdevt has joined #riscv
JanC is now known as Guest9653
JanC has joined #riscv
Guest9653 has quit [Ping timeout: 256 seconds]
ZipCPU has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
Andre_Z has joined #riscv
wgrant has quit [Server closed connection]
wgrant has joined #riscv
emdevt has quit [Ping timeout: 255 seconds]
bgamari has quit [Server closed connection]
bgamari has joined #riscv
cousteau has quit [Quit: Client closed]
ZipCPU has joined #riscv
ZipCPU has quit [Ping timeout: 245 seconds]
ZipCPU has joined #riscv
peeweep has quit [Server closed connection]
peeweep has joined #riscv
ncopa6 has quit [Server closed connection]
ncopa6 has joined #riscv
___nick___ has joined #riscv
Andre_Z has quit [Quit: Leaving.]
jjido has joined #riscv
JanC has quit [Ping timeout: 256 seconds]
JanC has joined #riscv
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #riscv
psydroid2 has quit [Quit: KVIrc 5.2.6 Quasar http://www.kvirc.net/]
vagrantc has joined #riscv
mithro has quit [Server closed connection]
mithro has joined #riscv
ldevulder has quit [Ping timeout: 252 seconds]
khem has quit [Quit: WeeChat 4.7.0]
khem has joined #riscv
jjido has quit [Quit: My laptop has gone to sleep. ZZZzzz…]
jjido has joined #riscv
jjido has quit [Quit: My laptop has gone to sleep. ZZZzzz…]
guerby_ has joined #riscv
guerby has quit [Ping timeout: 244 seconds]
guerby_ has quit [Ping timeout: 244 seconds]
guerby has joined #riscv
cronos has quit [Server closed connection]
cronos has joined #riscv
Kyuvi has joined #riscv
rattlesnake has quit [Read error: Connection reset by peer]
rattlesnake has joined #riscv
jjido has joined #riscv
___nick___ has quit [Ping timeout: 256 seconds]
<drewfustini> palmer: or others, I'm trying to find where it is documented what registers can be clobbered across a syscall. The psABI says look at execution environment and SBI spec says: "All registers except a0 & a1 must be preserved across an SBI call by the callee."
<drewfustini> I've been looking through the arch/riscv code but am I missing something explicit? It seems like only the vector registers are mentioned in Documentation.
<drewfustini> Though I guess U to S is not an SBI call, so I'm not sure what spec covers it
<khem> drewfustini:do you mean SBI calls or syscalls
<khem> IIRC from userspace side Syscall argument/return convention a7 = number, a0–a5 = args, a0 = result/-errno
fgarcia has quit [Quit: Remote host closed the connection]
fgarcia has joined #riscv
dramforever[m]1 has joined #riscv
<dramforever[m]1> khem: the problem is what *other* registers should do in this case
<dramforever[m]1> i don't think this was ever defined on account of possibly it not being the business of riscv to define what an os does
jjido has quit [Quit: My laptop has gone to sleep. ZZZzzz…]
<khem> fp regs are preserved I think
Finde has quit [Server closed connection]
Finde has joined #riscv
<drewfustini> Yeah, the context is what registers should be listed as clobbered in the inline assembly for glibc that makes the syscall.
hmw- has joined #riscv
fgarcia has quit [Ping timeout: 245 seconds]
stazthebox has quit [Quit: Ping timeout (120 seconds)]
hmw has quit [Quit: Bye.]
<drewfustini> I was trying to enumerate what registers the kernel actually clobbers. It seems only vector is documented.
stazthebox has joined #riscv
fgarcia has joined #riscv
<drewfustini> This reply from Florian raised the issue that glibc may not be properly listing the registers that the kernel may clobber.
<drewfustini> Vector is at least defined in vector.rst in Documentation/ but there doesn't seem anything explicit for the other registers
indy has quit [Ping timeout: 244 seconds]
indy has joined #riscv
<dramforever[m]1> i think the glibc inline asm is just wrong
<dramforever[m]1> it probably happens to work by virtue of being inside some wrapper that doesn't care about vector regs
<dramforever[m]1> maybe we should just move that to a separate `.S` and enjoy the function call abi while waiting for rust's clobber_abi("C") to show up in gcc and clang...
<dramforever[m]1> (yes i recognize that this also requires knowing what the actual abi is which was the original question)
<jrtc27> musl doesn't think syscalls clobber any registers other than a0
jjido has joined #riscv
ruidx has quit [Quit: WeeChat 3.8]
<jrtc27> on FreeBSD our ABI (as far as I know) clobbers a0, a1 and t0
<jrtc27> but we also don't provide the whole syscall macro thing
ruidx has joined #riscv
<jrtc27> our syscall(2), along with other syscalls that don't have custom C wrapper bits, is a function in its own .S file and follows the normal calling convention
<drewfustini> Context of my question was Peter was working on this patch https://sourceware.org/pipermail/libc-alpha/2025-August/169390.html
ruidx has quit [Max SendQ exceeded]
ruidx has joined #riscv
<drewfustini> Which updates __SYSCALL_CLOBBERS
ruidx has quit [Max SendQ exceeded]
ruidx has joined #riscv
<jrtc27> arm64 looks to have the same bug
jmcgnh has quit [Excess Flood]
<Tenkawa> jrtc27: at least on risc-v is there any dependency on the soc having the vector extension? This has been a very touchy subject in the hardware area so far in risc-v development...
<jrtc27> for what?
<Tenkawa> This bug..
<jrtc27> I don't understand what you're asking
<jrtc27> this is about glibc defining its inline asm correctly when being compiled with V enabled
<Tenkawa> Yes... on certain risc-v hardware "V" is "non-existent"
<dramforever[m]1> this has nothing to do with hardware development
<dramforever[m]1> this is whether you have -march=+v while compiling glibc
<jrtc27> if you want a more applicable awkward question: doing this with function multi-versioning won't go well
<Tenkawa> dramforever[m]1: Its been a "constant" discussion point so far so I'm not sure i would agree with that generalization
<jrtc27> given this is a single preprocessor check in a header, not based on __attribute__((__target__)) for the function (or __target_clones__)
jmcgnh has joined #riscv
<jrtc27> Tenkawa: which profiles require V and which OSes require those profiles can be a contentious topic
<jrtc27> this is not about that at all
<dramforever[m]1> Tenkawa: i still don't get what the point even is
<jrtc27> this is about saying *if* you have asked glibc for V, for whatever reason that may be, does it function correctly?
<jrtc27> so unless your view is "V should not exist as an extension", that is something that glibc should support
<Tenkawa> Ok.. It won't matter... good enough.
<jrtc27> really don't understand why that isn't more than good enough, but whatever
Tenkawa has quit [Quit: Was I really ever here?]
Kyuvi has quit [Ping timeout: 250 seconds]
vagrantc has quit [Quit: leaving]
jjido has quit [Quit: My laptop has gone to sleep. ZZZzzz…]