IRC channel logs
2023-05-22.log
back to list of logs
<stikonas>I'll switch all risc-v defines to lowercase so that it mathes more those new x86 define style and also the ones I'm using in riscv64/mescc <stikonas>(more repos will need updates but M2libc needs to be merged first) <stikonas>by the way, I ran stage0-posix-riscv64 with all of this to completion <stikonas>riscv32 needs a bit more work, so I'll probably finish stage0-posix-riscv* changes tomorrow... <fossy>yes, of course stikonas[m], it was rickmasters who did all the hard work to get this in - huge props to rickmasters :D <janneke>stikonas[m]: i've bisected the scaffold/hello.c problem using this silly script: <janneke>the problem is in _write (# Defining function _write) <janneke>note the negative sign has been dropped <janneke>hex2 says: Target label -0x08 is not valid <janneke>weird, that means we cannot use hex! <janneke>ACTION really likes how oriansj created something that can sometimes be bisected trivially <janneke>stikonas[m]: yeah, that's for negative numbers <janneke>stikonas[m]: the !-0x08 => !0x08 oversight also happened consistently elsewhere, of course <janneke>lib/linux/riscv64-mes-m2/syscall.c, eg <janneke>it would be great if we could do that (bisecting) mix-and-matching also with M2-Planet generated M1 and MesCC-generated M1; that's (much) more tricksy to do if it works at all <janneke>not sure if that might be even "more correct" <janneke>stikonas, reading _write.c, what do you think about: <janneke>- asm ("rd_a7 !64 addi"); // SYS_write <janneke>+ asm ("rd_a7 !64 addi #SYS_write"); <stikonas>though his SYS_write already includede quotes around the number <stikonas>sorry missed that you are still passing !64 <stikonas>janneke: I'll take a look at negative hexes later, need to run to work soon <janneke>yeah, still using !64; just making the M1 better to read -- dunno <stikonas>also need to make sure which is the correct way <janneke>stikonas[m]: yeah, gcc says it's -0x03 and rejects 0x-03 <oriansj>janneke: I don't see much advantage for hex offsets for risc-v as unlike x86, it has little mapping to the resulting instruction due to how the encoding is jumbled.