beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
beneroth has quit [Quit: Leaving]
chexum has quit [Remote host closed the connection]
chexum has joined #picolisp
rob_w has joined #picolisp
<abu[7]> tankf33der: The guy on github says there is "frame-pointer"="all"
<abu[7]> Wouldn't that help?
<tankf33der> Morning
<tankf33der> i will read and check
<abu[7]> 👍
<tankf33der> i used llc -frame-pointer=all ...
<tankf33der> the same crash
<tankf33der> i can send you generated s file
<abu[7]> yes, good
rob_w has quit [Ping timeout: 265 seconds]
<tankf33der> i added "frame-pointer"="all" in _Co and _Yield functions declarations
<tankf33der> compiled and the same crash
<abu[7]> Ah, it is not a compiler-flag?
<abu[7]> ie mess with base.ll ?
<tankf33der> define i64 @_Co(i64) "frame-pointer"="all" align 8 {
<tankf33der> define i64 @_Yield(i64) "frame-pointer"="all" align 8 {
<abu[7]> hmm
<tankf33der> AI gives contradictory information. I've tried different things.
<abu[7]> OK
rob_w has joined #picolisp
<abu[7]> we need it for other places too
<abu[7]> but for now just to test
<abu[7]> as you say it did not help anyway
<tankf33der> i did not find cli commands for this
<abu[7]> Stack pointer is set in other pil functions too iirc
<abu[7]> 'stack' or 'history' and perhaps others
<abu[7]> anyway ...
<abu[7]> Let's see how the asm looks like
<abu[7]> It seems that RISC-V uses a frame pointer if not optimized
<abu[7]> it "optimizes" it ouu
<abu[7]> out
<tankf33der> this is ^^^ s file with frame-pointer=all
<abu[7]> Because if I understood correctly RISC-V work without optim
<abu[7]> ok
<abu[7]> checking
<abu[7]> Contains only a filename?
<abu[7]> Can you post the correct link?
<tankf33der> oops
<tankf33der> modified lib/llvm.l to add "frame-pointer"="all" to all functions in base.ll
<tankf33der> the same crash.
<abu[7]> I mean the correct .s file
<tankf33der> doing
<abu[7]> ok, for now just _Co would have been enough
<abu[7]> I analyse only that little part before ''memset'
<tankf33der> try this one
<tankf33der> afk.
<abu[7]> ok
<abu[7]> Still the same code
<abu[7]> "mr 1, 3" and then "std 5, 0(1)"
<abu[7]> crap
<abu[7]> I want to look at RISC-V and Sparc code too. Later when you have time.
<tankf33der> ^^^ SPARC
<abu[7]> Sparc code looks good
<tankf33der> creating riscv64 machine, will take time
<tankf33der> ^^^ RISCV64
<abu[7]> The problematic code for ppc was:
<abu[7]> mr 1, 3 # Set stack pointer
<abu[7]> std 5, 0(1) # Store something in stack !!
<abu[7]> li 4, 7
<abu[7]> addi 5, 4, -256
<abu[7]> std 3, 40(27)
<abu[7]> bl memset
<abu[7]> For Sparc:
<abu[7]> mov %o0, %sp # Set stack pointer
<abu[7]> add %sp, -48, %sp
<abu[7]> stx %o0, [%i1+40] # Store something in frame
<abu[7]> call memset
<abu[7]> add %g2, -256, %o2
<abu[7]> I check RISC-V
<abu[7]> Also good:
<abu[7]> mv s8, sp # Set stack pointer
<abu[7]> sub a0, s8, a1
<abu[7]> mv sp, a0
<abu[7]> sd a0, 40(s4) # Store something in frame
<abu[7]> li a1, 7
<abu[7]> addi a2, a1, -256
<abu[7]> call memset
<abu[7]> Both Sparc and RISC-V don't mess with stack memory, but have a separate frame pointer
<abu[7]> Seems %i1 for Sparc and s4 for RISC-V
<abu[7]> Too bad the guy in the github discussion does not seem to understand the point
<aw-> s4 is not frame pointer in risc-v
<aw-> who chose s4 for frame pointer?
<abu[7]> No idea, can be any pointer to some memory are
<abu[7]> It is just fatal if 0(1) is used on ppc
<abu[7]> 1 is sp
<abu[7]> I mean, fatal if after sp is set with "mr 1, 3" to a new location
<abu[7]> Anyway
<abu[7]> I think the issue can be closed
<abu[7]> outside our control
<tankf33der> closing, right ?
<abu[7]> T
<abu[7]> Thanks for all the work!
<tankf33der> i will wait for a while
<abu[7]> good
<abu[7]> I meant mentally closed for us, not wasting time on it. The github issue may stay open.
rob_w has quit [Remote host closed the connection]
<tankf33der> llvm 20.1.0 release beginning of March
<abu[7]> Do you know if anything changed?
<tankf33der> I am sure not fixed
<tankf33der> i always can recompile release/20 anytime
<abu[7]> 👍
<abu[7]> Surely not fixed. They think it is correct that way.
f[x] has joined #picolisp
bjorkintosh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
bjorkintosh has joined #picolisp
bjorkintosh has joined #picolisp
f[x] has quit [Quit: Leaving]
ygrek has joined #picolisp
ygrek has quit [Remote host closed the connection]