<gordonDrogon>
(after hearing on the radio this morning about global shipping issues)
Hypercube3D has joined #riscv
Hypercube3D_ has joined #riscv
jacklsw has quit [Quit: Back to the real world]
seninha has joined #riscv
catern has joined #riscv
seninha has quit [Ping timeout: 240 seconds]
seninha has joined #riscv
seninha has quit [Quit: Leaving]
seninha has joined #riscv
Hypercube3D_ has quit [Quit: Leaving]
Hypercube3D has quit [Quit: Leaving]
Sofia has quit [Remote host closed the connection]
Sofia has joined #riscv
geranim0 has quit [Ping timeout: 240 seconds]
radu242407821 has quit [Ping timeout: 240 seconds]
jmdaemon has quit [Ping timeout: 256 seconds]
radu242407821 has joined #riscv
seninha_ has joined #riscv
seninha has quit [Ping timeout: 268 seconds]
seninha_ has quit [Quit: Leaving]
radu242407821 has quit [Ping timeout: 240 seconds]
aburgess_ has joined #riscv
aburgess has quit [Ping timeout: 240 seconds]
seninha has joined #riscv
radu242407821 has joined #riscv
BOKALDO has quit [Quit: Leaving]
radu242407821 has quit [Ping timeout: 250 seconds]
geranim0 has joined #riscv
aerkiaga has joined #riscv
alMalsamo has quit [Ping timeout: 276 seconds]
alMalsamo has joined #riscv
<la_mettrie>
tried to write a bitness independent assembly code to find out the register width (instruction set bitness) of the device by reading MISA system register https://justpaste.it/8glgu
<la_mettrie>
ISA manual tells it can be read with branching so I guess it's something like that
<jrtc27>
you should go re-read what lui does on rv64
radu242407821 has joined #riscv
<jrtc27>
(and, by extension, rv128)
<jrtc27>
also what's all this .equ MISA, 0x301 #hardware dependent address of MISA register (0x301 for Longan Nano)
<jrtc27>
(a) it's a CSR number not an address
<jrtc27>
(c) you can just use `csrr t2, misa`, assemblers know what CSRs there are
<jrtc27>
(b) the RISC-V spec defines that number as 0x301, it's not hardware dependent
<jrtc27>
well, the spec does call them CSR addresses I guess, which is unnecessarily confusing
<jrtc27>
there as much addresses as 1 is an address for the GPR ra
<la_mettrie>
okay, thanks for the feedback. i've been really sloppy regarding to how LUI works on rv64 (I've actually read it but...)
radu242407821 has quit [Ping timeout: 240 seconds]
BOKALDO has joined #riscv
winterflaw has quit [Ping timeout: 276 seconds]
seninha has quit [Quit: Leaving]
cwebber has quit [Ping timeout: 240 seconds]
vagrantc has joined #riscv
winterflaw has joined #riscv
jacklsw has joined #riscv
radu242407821 has joined #riscv
radu242407821 has quit [Ping timeout: 250 seconds]
JanC has quit [Remote host closed the connection]
JanC has joined #riscv
<la_mettrie>
I'd like to use RISC-V assembly "Hello, World!" code with Linux syscalls when spreading the word about RISC-V, but I don't have a RISC-V machine running Linux yet to test this. At least it compiles. https://pastebin.com/raw/ET1nAEkn
<ssb>
it should not be that hard, "gcc -v hello.c" surely prints lots of line noise these days, and then collect2 even forgets to add -v to ld. Yet this all is decipherable and works by parts.
<jrtc27>
you're writing raw standalone assembly
<jrtc27>
add -nostdlib
mahmutov_ has quit [Read error: Connection reset by peer]
<jrtc27>
otherwise gcc will pull in libc and, more importantly, crt files, where crt1.o defines a _start that overrides yours
<rm>
thanks, now worked, but the result is 10 KB vs 1288 bytes with manual invocation of as + ld
<jrtc27>
those warnings are dumb and another reason why the ISA version bump is a pain in the butt
<jrtc27>
readelf will tell you what you've gained
<jrtc27>
probably stuff like build id
<jrtc27>
maybe some debug info
<gordonDrogon>
la_mettrie, do what I did - write your own RV emulator... although there are many out there an da few in pure C which ought to be easy to get going.
seninha has quit [Remote host closed the connection]
seninha has joined #riscv
vagrantc has quit [Remote host closed the connection]
vagrantc has joined #riscv
mahmutov has joined #riscv
jacklsw has quit [Read error: Connection reset by peer]
mahmutov has quit [Ping timeout: 250 seconds]
mahmutov has joined #riscv
EchelonX has joined #riscv
radu242407821 has joined #riscv
radu242407821 has quit [Ping timeout: 240 seconds]
jmdaemon has joined #riscv
geranim0 has quit [Remote host closed the connection]