hlorenzi / customasm

💻 An assembler for custom, user-defined instruction sets! https://hlorenzi.github.io/customasm/web/
Apache License 2.0
724 stars 56 forks source link

Thread "main" panicked Error [v0.11.9] #106

Closed ProxyPlayerHD closed 3 years ago

ProxyPlayerHD commented 3 years ago

I'm working on a 32-bit RISC-V CPU in Logisim, like always i'm using CustomASM for the assembler to write code. but i somehow broke it again.

customasm v0.11.9 (2021-05-09, x86_64-pc-windows-gnu)
assembling `Z:\Logisim\RISC-V\CASM\Testing.RVA`...
thread 'main' panicked at 'slice index starts at 5 but ends at 4', src/syntax/parser.rs:138:43
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

here the CPU File: https://pastebin.com/Gie1jhwx and the Program i tried to assemble: https://pastebin.com/FuPpkAqy

the only thing that is kinda weird about this CPU file is the fact that each instruction in inside the le() function, because RISC-V uses little endian for the instructions, and manually flipping the bit fields is way too much work so i just opted to use le() instead

hlorenzi commented 3 years ago

Could you try it now on v0.11.10? I believe the crash is gone.

ProxyPlayerHD commented 3 years ago

yes it works. thanks!