mortbopet / Ripes

A graphical processor simulator and assembly editor for the RISC-V ISA
https://ripes.me/
MIT License
2.57k stars 274 forks source link

local labels not working ? #199

Closed hl037 closed 2 years ago

hl037 commented 2 years ago

Hi, From here : https://github.com/riscv-non-isa/riscv-asm-manual/blob/master/riscv-asm.md#labels I is said we can use numeric local labels...

...But I get an error when trying to do so... Is it expected ?

image

mortbopet commented 2 years ago

Hi @hl037

That part of the assembly spec has not been implemented in the Ripes assembler. It shouldn't be too hard to implement though; I'll take a look at it. Thank you for raising the issue!

mortbopet commented 2 years ago

@hl037 took a stab at writing an implementation for this - the feature should be available in the continuous release. Please let me know if it works for you.

hl037 commented 2 years ago

That was pretty fast ! Thank you very much ! I've tested most common scenarios everything seems to be as expected !

I have not checked ripes source code before, but looking at the diff, I understand you needed to add a whole logic to differentiate absolute label from relative ones. It was not that trivial, so you have all my respect sir to have implemented it in two days !