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

Hexadecimel constants are treated as unsigned numbers #268

Closed RatkoFri closed 1 year ago

RatkoFri commented 1 year ago

Hexadecimal constants are treated as unsigned numbers, which prevents users to run this instruction:

addi x2, x0, 0xAFF

Although the hexadecimal value is 12bit, the Ripes will interpret it as an unsigned number which is out of range for a 12bit signed number (2nd complement). The Ripes will prevent this code for executing

mortbopet commented 1 year ago

That was indeed a bug! Should have been fixed in 605cb01.

RatkoFri commented 1 year ago

Thank you very much !