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
Armand|5800x has quit [Quit: Leaving]
JanC_ has joined #riscv
JanC_ is now known as JanC
JanC is now known as Guest9741
maylay has quit [Read error: Connection reset by peer]
maylay has joined #riscv
dramforever[m] has joined #riscv
<dramforever[m]> <Eric43> "it seems excessive to have to..." <- linux dynamically checks at runtime whether the processor has zbb and selects which function to use, grep for `ALTERNATIVE` to see
<dramforever[m]> this way the kernel works whether or not it can use zbb
maylay has quit [Read error: Connection reset by peer]
<dramforever[m]> the ifdef on strcmp_zbb is there so it doesn't try to include useless code if the toolchain can't assemble zbb instructions, or if the support is disabled altogether
lucmann has joined #riscv
JanC_ has joined #riscv
JanC_ is now known as JanC
maylay has joined #riscv
<dramforever[m]> i guess there is just no way to raise the baseline to above rv{32,64}imac
<Eric90> dramforever i wouldn't want to check it at runtime. it would be during compilation. if the architecture supports the extension, those instructions would be generated instead of the default
BootLayer has joined #riscv
<dramforever[m]> Eric90: then there's no idiomatic way to do that, you need to add your own configurations
<Eric90> i see. let me explain a little more because there's other macros in the code that have me confused about what you should use. the C API for risc-v here: https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc
<Eric90> talks about how various preprocessor definitions exist depending upon the architecture. it mentions that if an extension like zbb is present, the macro __riscv_zbb will be defined
<Eric90> on that page is also the value for XLEN, with the __riscv_xlen macro. an example file in the kernel, /arch/riscv/include/asm/cmpxchg.h uses this macro. yet elsewhere in the code i see CONFIG_64BIT used. it's confusing to me because i don't know what's the proper convention. is it the __riscv_* macros? or is it the other ones like RISCV_ISA_EXT_ZBB?
<dramforever[m]> okay, my answer remains that there is no existing way to do what you want in linux, but let's explain everything you've mentioned
<dramforever[m]> RISCV_ISA_EXT_ZBB: it's a constant 30, has nothing to do with config
<dramforever[m]> TOOLCHAIN_HAS_ZBB: there's no such identifier
<dramforever[m]> that's the "definitely not" out of the way
<dramforever[m]> CONFIG_TOOLCHAIN_HAS_ZBB: The assembler can handle zbb instructions at all
<dramforever[m]> CONFIG_RISCV_ISA_ZBB: Whether to use Zbb when it's helpful. Does not raise the baseline requirements of the kernel
<dramforever[m]> In other words if you enable it the kernel will take advantage of Zbb if available at runtime, and use non-Zbb if not available
<dramforever[m]> __riscv_zbb: You have -march=...zbb... on the compiler command line. This will never happen on Linux
<dramforever[m]> in conclusion, none of the above is what you want
<Eric90> thank you. it's definitely way more involved than i expected. considering how many extensions there are, it seems like an explosion of combinations the kernel would have to check for during runtime to see what's available and what's not
hexdump0815 has quit [Ping timeout: 252 seconds]
hexdump0815 has joined #riscv
Eric90 has quit [Ping timeout: 240 seconds]
Eric96 has joined #riscv
BootLayer has quit [Quit: Leaving]
JanC_ has joined #riscv
JanC has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
JanC_ is now known as JanC
Eric96 has quit [Quit: Client closed]
lucmann has quit [Remote host closed the connection]
paulk-bis has joined #riscv
paulk has quit [Ping timeout: 248 seconds]
ldevulder has joined #riscv
teiresias has quit [Ping timeout: 248 seconds]
teiresias has joined #riscv
ungeskriptet has quit [Remote host closed the connection]
cleger has joined #riscv
naoki has quit [Remote host closed the connection]
naoki has joined #riscv
ksp4 has quit [Ping timeout: 265 seconds]
ksp4 has joined #riscv
zjason``` is now known as zjason
paulk-bis has quit [Quit: WeeChat 3.0]
paulk has joined #riscv
paulk has joined #riscv
netmonk has joined #riscv
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #riscv
Tenkawa has joined #riscv
naoki has quit [Quit: naoki]
ungeskriptet has joined #riscv
ungeskriptet has quit [Remote host closed the connection]
ungeskriptet has joined #riscv
psydroid2 has joined #riscv
geertu has quit [Ping timeout: 246 seconds]
geertu has joined #riscv
ungeskriptet_ has joined #riscv
shreyasminocha_ has joined #riscv
kf_ has joined #riscv
sm2n_ has joined #riscv
raghavgururajan_ has joined #riscv
vigneshr_ has joined #riscv
benh_ has joined #riscv
paulbarker_ has joined #riscv
arcade_droid_ has joined #riscv
sskras_ has joined #riscv
bgamari_ has joined #riscv
vgtw_ has joined #riscv
unnick has joined #riscv
veltas_ has joined #riscv
zeha has joined #riscv
welder_ has joined #riscv
Irvise_ has joined #riscv
ungeskriptet has quit [*.net *.split]
dramforever[m] has quit [*.net *.split]
unnick_ has quit [*.net *.split]
Forty-Bot has quit [*.net *.split]
raghavgururajan has quit [*.net *.split]
sm2n has quit [*.net *.split]
shreyasminocha has quit [*.net *.split]
kf has quit [*.net *.split]
Irvise has quit [*.net *.split]
vgtw has quit [*.net *.split]
arcade_droid has quit [*.net *.split]
sskras has quit [*.net *.split]
benh has quit [*.net *.split]
veltas has quit [*.net *.split]
welder has quit [*.net *.split]
bgamari has quit [*.net *.split]
_koolazer has quit [*.net *.split]
ch has quit [*.net *.split]
vigneshr has quit [*.net *.split]
paulbarker has quit [*.net *.split]
ungeskriptet_ is now known as ungeskriptet
shreyasminocha_ is now known as shreyasminocha
vigneshr_ is now known as vigneshr
paulbarker_ is now known as paulbarker
kf_ is now known as kf
raghavgururajan_ is now known as raghavgururajan
sm2n_ is now known as sm2n
felixonmars has quit [Excess Flood]
nmeum has quit [Remote host closed the connection]
sskras_ is now known as sskras
nmeum has joined #riscv
felixonmars has joined #riscv
koolazer has joined #riscv
dramforever[m] has joined #riscv
Forty-Bot has joined #riscv
<netmonk> good afternoon, anyone having experience with sparkfun red-v thing plus ? and bronzebeard ?
jedesa has joined #riscv
BootLayer 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/]
chripo has quit [Read error: Connection reset by peer]
chripo has joined #riscv
chripo is now known as Guest3212
cousteau has joined #riscv
<unlord> palmer: Where is gcc development done?
<palmer> sourceware
<palmer> or I guess gcc.org? it's just binutils on sourceware
<unlord> gcc-15 from April 6th barfs on "-O3 -march=rv64gcv -pipe"
<palmer> OK, sounds like a bug ;)
<unlord> indeed
<palmer> they'll want at least a preprocessed source, ideally something reduced
<unlord> it builds with -march=rv64gc
<unlord> is there some magic way to create a reduced input?
<palmer> creduce or cvise, but they can take a while. You can just post the ".i" from -save-temps to start
<palmer> usually I just try to reduce stuff manually first, it's frequently faster ;)
<unlord> I have a single file with -E that breaks
<palmer> I don't remember what -E does, IIRC some preprocessor thing?
<palmer> ya, just runs the preprocessor
jacklsw has joined #riscv
<palmer> so you should be good, then. `-save-temps` will just automatically save every step of the complier
<palmer> (or I guess every step of the compiler driver)
<unlord> palmer: I have a minimal reproducer
<palmer> sweet!
<palmer> so probably time to throw it over the wall ;)
<unlord> yes
<unlord> you were right, it was easier to just make it myself
<palmer> that's a good starting point. It's probably possible to reduce it more, but no big deal -- that's good enough for a bug
jacklsw has quit [Quit: Back to the real world]
<unlord> oh lol, its already resolved
<palmer> that was easy ;)
<unlord> apparently the CI did not catch this
<palmer> the upstream CI? it's been pretty broken lately, the AI bots took down gcc.gnu.org
<unlord> Thanks AI
<palmer> ya. I think it's resolved over there, Edwin has been digging through a bunch of random CI failures due to the infra outage
cousteau has quit [Quit: Client closed]
ldevulder has quit [Ping timeout: 252 seconds]
BootLayer has quit [Quit: Leaving]
JRepin has quit [Remote host closed the connection]
JRepin has joined #riscv
ldevulder has joined #riscv
paulk has quit [Ping timeout: 268 seconds]
paulk has joined #riscv
paulk has joined #riscv
ksp4 has quit [Remote host closed the connection]
ksp4 has joined #riscv
Armand|5800x has joined #riscv
vagrantc has joined #riscv
cleger has quit [Ping timeout: 248 seconds]
Armand|5800x has quit [Quit: Leaving]
ldevulder has quit [Ping timeout: 272 seconds]
JanC_ has joined #riscv
JanC is now known as Guest9219
JanC_ is now known as JanC
Guest9219 has quit [Killed (tungsten.libera.chat (Nickname regained by services))]
peepsalot has quit [Remote host closed the connection]
peepsalot has joined #riscv
khem has quit [Quit: WeeChat 4.6.1]
maylay has quit [Read error: Connection reset by peer]
nexR has quit [Ping timeout: 252 seconds]
khem has joined #riscv
nexR has joined #riscv
maylay has joined #riscv
squelch22 has joined #riscv
squelch21 has quit [Ping timeout: 244 seconds]
squelch22 is now known as squelch21
squelch22 has joined #riscv
squelch21 has quit [Ping timeout: 245 seconds]
squelch22 is now known as squelch21
jleightcap has left #riscv [#riscv]
naoki has joined #riscv