sorear changed the topic of #riscv to: RISC-V instruction set architecture | https://riscv.org | Logs: https://libera.irclog.whitequark.org/riscv
GenTooMan has quit [Ping timeout: 244 seconds]
GenTooMan has joined #riscv
mixotricha has joined #riscv
brazuca has quit [Quit: Client closed]
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
rsalveti has quit [Quit: Connection closed for inactivity]
mixotricha has quit [Quit: Client closed]
pbsds has quit [Ping timeout: 268 seconds]
pbsds has joined #riscv
pbsds has quit [Ping timeout: 252 seconds]
loggervicky has joined #riscv
vagrantc has quit [Quit: leaving]
loggervicky has quit [Ping timeout: 245 seconds]
BootLayer has joined #riscv
loggervicky has joined #riscv
loggervicky has quit [Remote host closed the connection]
loggervicky has joined #riscv
paddymahoney has quit [Read error: Connection reset by peer]
paddymahoney has joined #riscv
loggervicky has quit [Ping timeout: 252 seconds]
pbsds has joined #riscv
pbsds has quit [Ping timeout: 245 seconds]
jacklsw has joined #riscv
BootLayer_ has joined #riscv
BootLayer has quit [Read error: Connection reset by peer]
strlst has joined #riscv
pbsds has joined #riscv
pbsds has quit [Ping timeout: 268 seconds]
loggervicky has joined #riscv
loggervicky has quit [Client Quit]
pbsds has joined #riscv
jacklsw has quit [Read error: Connection reset by peer]
eroux has quit [Ping timeout: 252 seconds]
eroux has joined #riscv
crabbedhaloablut has quit [Quit: No Ping reply in 180 seconds.]
crabbedhaloablut has joined #riscv
crabbedhaloablut has quit [Write error: Connection reset by peer]
crabbedhaloablut has joined #riscv
BootLayer_ has quit [Ping timeout: 268 seconds]
___nick___ has joined #riscv
___nick___ has quit [Client Quit]
___nick___ has joined #riscv
___nick___ has quit [Client Quit]
___nick___ has joined #riscv
<conchuod> palmer: https://lore.kernel.org/all/Yu+OzWv2JDbI89mW@gmail.com/ at least the lm90 isn't a riscv-only problem
BootLayer_ has joined #riscv
Andre_H has joined #riscv
Andre_H has quit [Quit: Leaving.]
jmd_ has quit [Ping timeout: 240 seconds]
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #riscv
Guest14 has joined #riscv
Guest14 is now known as brazuca
ghee has joined #riscv
aerkiaga has joined #riscv
ghee has quit [Quit: EOF]
vagrantc has joined #riscv
BootLayer_ has quit [Ping timeout: 268 seconds]
geranim0 has joined #riscv
bob has joined #riscv
Gravis has quit [Ping timeout: 268 seconds]
Gravis has joined #riscv
Andre_H has joined #riscv
BootLayer_ has joined #riscv
jacklsw has joined #riscv
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
memoryleak has quit [Read error: Connection reset by peer]
memoryleak has joined #riscv
compnerd has quit [Quit: Connection closed for inactivity]
dramforever__ has joined #riscv
dramforever_ has quit [Ping timeout: 245 seconds]
jmdaemon has joined #riscv
memoryleak has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
memoryleak has joined #riscv
memoryleak has quit [Ping timeout: 268 seconds]
jacklsw has quit [Read error: Connection reset by peer]
GenTooMan has quit [Ping timeout: 244 seconds]
GenTooMan has joined #riscv
vagrantc has quit [Quit: leaving]
BootLayer_ has quit [Quit: Leaving]
brazuca has quit [Quit: Client closed]
___nick___ has quit [Ping timeout: 268 seconds]
Guest14 has joined #riscv
bob has quit [Remote host closed the connection]
geranim0 has quit [Remote host closed the connection]
Andre_H has quit [Ping timeout: 245 seconds]
KombuchaKip has joined #riscv
strlst has quit [Quit: Lost terminal]
<mort> when compiling/assembling/linking for RISC-V, you want to emit JAL when the jump target is within the +-1MiB range of the immediate, but immediate + JALR otherwise. How is this actually handled? How and when is the most one picked?
<mort> imagine the function: 'void bar(int x) { if (x) { foo1(); foo2(); foo3(); ... } }' -- with enough 'fooN()'s, I might have a 600kB 'if' body if the function calls end up being 1-instruction, but a 1200kB 'if' body if the function call ends up being 2-instruction, so whether I can use a relative conditional branch with immediate or not also depends
<mort> on how exactly the binary is laid out
<mort> hmm after some experimentation, it seems like real-life compilers will produce inefficient code for every function call, it seems to always use auipc + jr/jalr regardless of whether the auipc is necessary
<ats> mort: "linker relaxation" is probably the term you want to search for - see https://www.sifive.com/blog/all-aboard-part-3-linker-relaxation-in-riscv-toolchain
<mort> clang produces the auipc+jalr sequence with -flto too tho
<ats> Are you look at the object file or the binary after linking? It's the linker that converts the call/jump sequences into more efficient forms when possible...
<ats> (-flto isn't necessary - it works with normal separate compilation by emitting special kinds of relocation to indicate what kind of jump/call it's doing)
<mort> I'm looking at the object file and the linked binary
<mort> I had forgotten to compile with -flto so that wasn't actually doing anything, but if it's not supposed to be necessary then that doesn't matter
<mort> the object file only contains the R_RISCV_CALL relocation, not the R_RISCV_RELAX relocation
<mort> this is clang from llvm 14.0.6
<mort> maybe only GNU supports it
<mort> but that article is useful, and it kind of confirms my thoughts about "if this is all being handled in the linker that's gonna be really messy"
haritz has quit [Remote host closed the connection]
haritz has joined #riscv
haritz has joined #riscv
kailo has joined #riscv
JanC has quit [Remote host closed the connection]
JanC has joined #riscv
kailo has quit [Remote host closed the connection]