IRC channel logs

2025-03-05.log

back to list of logs

<stikonas>gtker, oriansj: unxz crash on riscv is apparently fixed!
<stikonas>well, I was hoping that your (gtker) codegen unification work would help
<stikonas>and apparently it did
<stikonas>well, we also needed some of the earlier fixes that I did in https://github.com/oriansj/M2-Planet/issues/77
<stikonas>and this was the commit that fixed it https://github.com/oriansj/M2-Planet/pull/93/commits/22bf5026831456b1bd3a16f96d7ceeb65c5e70f3
<stikonas>though I don't yet understand what was wrong...
<matrix_bridge><gtker> stikonas: Perhaps it was the check for "value >= -2048"?
<matrix_bridge><gtker> oriansj: Rather than doing variadic arguments through the globals like you mentioned previously, what about having both an argument and local pointer? That way we wouldn't need to detect anything, just push args to the stack like normal and use the relevant pointer for addressing?
<matrix_bridge><Andrius Štikonas> gtker could be
<matrix_bridge><Andrius Štikonas> I guess offsets are negative
<matrix_bridge><Andrius Štikonas> gtker: I think we have two more places in riscv where simple addi is used
<matrix_bridge><Andrius Štikonas> But so far that hasn't caused bugs
<matrix_bridge><Andrius Štikonas> Though it might with variadic args
<matrix_bridge><gtker> Inside the "bool == TRUE" block in "function_call"?
<matrix_bridge><Andrius Štikonas> Yeah
<matrix_bridge><Andrius Štikonas> https://github.com/oriansj/M2-Planet/issues/77
<matrix_bridge><Andrius Štikonas> And variable load
<matrix_bridge><gtker> I'll take a look when I get the time. Won't make it into the current PR but it's definitely on my prio list. I'll probably also add functions for "add" and "mul" since we use those in "freeform" a couple of places
<matrix_bridge><Andrius Štikonas> Sure no rush...
<stikonas>gtker: I've merged your PR but now I've started testing it with stage0-posix and it crashes
<stikonas>in "./AMD64/artifact/blood-elf-0 --64 --little-endian -f ./AMD64/artifact/M1-macro-0.M1 -o ./AMD64/artifact/M1-macro-0-footer.M1"
<stikonas>oh, I didn't pull in M2libc...
<stikonas>now it works
<stikonas>ok, I pushed stage0-posix update now
<stikonas>ekaitz: ^^ this fixes that unxz crash on risc-v that we saw a year ago on M2-Planet
<ekaitz>i don't remember the crash lol
<stikonas>well, it was a couple of commits by me and gtker to fix it
<stikonas>basically unxz was crashing when built with M2-Planet
<stikonas>so I had to rebuild it with tcc
<stikonas>thre reason is more interesting though...
<stikonas>in M2-Planet I was often using addi to load numbers into registers
<stikonas>and it was failing with e.g. large types
<stikonas>e.g. big structs
<stikonas>e.g. if sizeof(type) was more than 11 bits...
<stikonas>anyway, all fixed now
<ekaitz>oh i see
<ekaitz>great news!