<Regenaxer>
Ah, great, that's good news! I thought somebody simply deleted it
<Regenaxer>
Ah, tankf33der, I forgot! I promised to explain the fix
<Regenaxer>
Using ldnz X (X) was wrong
<tankf33der>
checking diff.
<Regenaxer>
"load if not zero" generates speculative load instructions
<Regenaxer>
The above is wrong because *if* X *is* zero, the value (X) was fetched already, so it gives a null-pointer
<Regenaxer>
i.e. this instruction always fetches and only throws the value away if not needed
<Regenaxer>
So I had to replace it with if ... else ... end
<Regenaxer>
This explain also why it did not crash on my qhone in Termux, because Arm does not haje such an instruction and ldnz assembles to a jump anyway
<tankf33der>
i see
<Regenaxer>
I wish I had omitted ldz and ldnz from the pil asm instruction set
<Regenaxer>
It is a rather useless preliminary optimization
<tankf33der>
i'm very happy I can finally code fixed-point math.
<Regenaxer>
Cool! Code looks good!
<Regenaxer>
Perhaps (gt0 (- E E0)) -> (> E E0) ?
<tankf33der>
let me check.
<tankf33der>
indeed. fixed.
<Regenaxer>
Thanks!
karswell_ has quit [Read error: Connection reset by peer]
karswell_ has joined #picolisp
paines has quit [Remote host closed the connection]
ubLIX has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
karswell_ has quit [Remote host closed the connection]
karswell_ has joined #picolisp
<rick42>
hello pil people!
<rick42>
nice work both of you, tankf33der, Regenaxer!
<Regenaxer>
Ho rick42!
<Regenaxer>
Thanks!
<rick42>
anytime i hear about "speculation" I think of some hw engineer saying "here let me help you with that" and i'm like "what? i didn't ask for help" lol
<rick42>
same with compiler writers :)
<Regenaxer>
right :)
<Regenaxer>
In case of ldnz the CPU does it by itself. It loads the values before it is known whether the result is zero or not
<rick42>
right
<rick42>
tankf33der: OT: i installed void linux on one of my old (core duo) thinkpads and it's working great for me so far
<rick42>
opted for the glibc version btw
<tankf33der>
yea, should be good. issues solved fast, community is active.