<dh`>
more basically: it has to truncate the value to 32 bits and this is normally done in the callee
<dh`>
(for values smaller than int, it has to be, because of the C promotion rules, but that doesn't apply here)
<dh`>
(so I wonder if this was ever explicitly decided by anyone or appeared in the compiler by default)
shicz has quit [Ping timeout: 260 seconds]
shicz has joined #riscv
<jrtc27>
specifically "When passed in registers or on the stack, integer scalars narrower than XLEN bits are widened according to the sign of their type up to 32 bits, then sign-extended to XLEN bits." in the calling convention spec
Sofia has quit [Ping timeout: 276 seconds]
somlo has quit [Ping timeout: 252 seconds]
Sofia has joined #riscv
somlo has joined #riscv
<muurkha>
ohhh. so it's not *garbage* as such it's worried about but *sign-extension*
<muurkha>
thanks jimwilson_, dh`, and jrtc27!
jacklsw has joined #riscv
<dh`>
ah
[itchyjunk] has quit [Remote host closed the connection]
freakazoid343 has joined #riscv
freakazoid12345 has quit [Ping timeout: 258 seconds]
jacklsw has quit [Read error: Connection reset by peer]
freakazoid343 has joined #riscv
freakazoid333 has quit [Ping timeout: 258 seconds]
riff-IRC has quit [Remote host closed the connection]
riff-IRC has joined #riscv
solrize has quit [Ping timeout: 245 seconds]
BOKALDO has joined #riscv
jacklsw has joined #riscv
<geist>
Question for those that have their finger on the riscv specs and the direction it’s going: do you think W and/or WX page protections (no R) has a future in a future spec? It seems to still be considered reserved
<geist>
I kinda doubt it, but it hasn’t bee reclaimed for any other purpose in the spec yet
<dh`>
there ought to be only four states, - R RW and RX :-)
winterflaw has joined #riscv
EchelonX has joined #riscv
FL4SHK has quit [Ping timeout: 244 seconds]
FL4SHK has joined #riscv
FL4SHK has quit [Ping timeout: 260 seconds]
<geist>
X is useful in some cases too
winterflaw has quit [Remote host closed the connection]
freakazoid12345 has joined #riscv
freakazoid343 has quit [Ping timeout: 260 seconds]
winterflaw has joined #riscv
bauruine has joined #riscv
<kaddkaka[m]>
How does RISC-V define signed integer division `INT_MIN/-1` ?
FL4SHK has joined #riscv
<sorear>
"7.2 Division Operations" "Signed division overflow occurs only when the most-negative integer is divided by −1. The quotient of a signed division with overflow is equal to the dividend, and the remainder is zero."
djdelorie has quit [Ping timeout: 260 seconds]
hendursa1 has joined #riscv
hendursaga has quit [Ping timeout: 276 seconds]
pecastro has joined #riscv
jellydonut has quit [Ping timeout: 260 seconds]
jacklsw has quit [Ping timeout: 265 seconds]
peepsalot has quit [Ping timeout: 258 seconds]
smartin has joined #riscv
voltron has joined #riscv
freakazoid343 has joined #riscv
freakazoid12345 has quit [Ping timeout: 260 seconds]
ttmrichter has joined #riscv
freakazoid12345 has joined #riscv
freakazoid343 has quit [Ping timeout: 258 seconds]
jimwilson_ has quit [Ping timeout: 245 seconds]
jimwilson has joined #riscv
freakazoid343 has joined #riscv
freakazoid12345 has quit [Ping timeout: 258 seconds]
FL4SHK has quit [*.net *.split]
zjason has quit [*.net *.split]
rvalles has quit [*.net *.split]
pabs3 has quit [*.net *.split]
stefanct has quit [*.net *.split]
theruran has quit [*.net *.split]
jotweh has quit [*.net *.split]
sm2n has quit [*.net *.split]
gktrk has quit [*.net *.split]
avoidr has quit [*.net *.split]
kido_ has quit [*.net *.split]
Esmil has quit [*.net *.split]
FL4SHK has joined #riscv
pabs3 has joined #riscv
sm2n has joined #riscv
stefanct has joined #riscv
theruran has joined #riscv
avoidr has joined #riscv
jotweh has joined #riscv
rvalles has joined #riscv
kido_ has joined #riscv
Esmil has joined #riscv
gktrk has joined #riscv
zjason has joined #riscv
nmeum has quit [Remote host closed the connection]
nmeum has joined #riscv
shicz has quit [Ping timeout: 265 seconds]
shicz has joined #riscv
somlo_ has joined #riscv
aburgess_ has joined #riscv
bsduser2 has joined #riscv
adamse_ has joined #riscv
brettgilio7 has joined #riscv
helium-3 has joined #riscv
smartin has quit [Remote host closed the connection]
balrog_ has joined #riscv
gdd1 has joined #riscv
klys_ has joined #riscv
sjs has quit [Killed (silver.libera.chat (Nickname regained by services))]
sjs has joined #riscv
smartin has joined #riscv
somlo has quit [*.net *.split]
aburgess has quit [*.net *.split]
grubman9001 has quit [*.net *.split]
gdd has quit [*.net *.split]
balrog has quit [*.net *.split]
wgrant has quit [*.net *.split]
frost has quit [*.net *.split]
brettgilio has quit [*.net *.split]
mwbrown has quit [*.net *.split]
palmer has quit [*.net *.split]
klys has quit [*.net *.split]
dh` has quit [*.net *.split]
gordonDrogon has quit [*.net *.split]
dilfridge has quit [*.net *.split]
Finde has quit [*.net *.split]
adamse has quit [*.net *.split]
geertu has quit [*.net *.split]
muurkha has quit [*.net *.split]
brettgilio7 is now known as brettgilio
adamse_ is now known as adamse
muurkha has joined #riscv
geertu has joined #riscv
Finde has joined #riscv
gordonDrogon has joined #riscv
palmer has joined #riscv
wgrant has joined #riscv
[itchyjunk] has joined #riscv
BOKALDO has quit [Quit: Leaving]
jacklsw has joined #riscv
Ivii has joined #riscv
shicz has quit [Ping timeout: 258 seconds]
shicz has joined #riscv
djdelorie has joined #riscv
bsduser2 is now known as grubman9000
dh` has joined #riscv
freakazoid343 has quit [Read error: Connection reset by peer]
freakazoid343 has joined #riscv
compscipunk has quit [Quit: WeeChat 2.8]
compscipunk has joined #riscv
BOKALDO has joined #riscv
freakazoid12345 has joined #riscv
freakazoid343 has quit [Ping timeout: 260 seconds]
vagrantc has joined #riscv
freakazoid333 has joined #riscv
freakazoid12345 has quit [Ping timeout: 260 seconds]
Sofia has quit [Remote host closed the connection]
Sofia has joined #riscv
SpaceCoaster has joined #riscv
peepsalot has joined #riscv
mahmutov has joined #riscv
pehaef has joined #riscv
voltron has quit [Remote host closed the connection]
[itchyjunk] has quit [Read error: Connection reset by peer]