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

bgtu a, b, offset becomes bltu b, b, offset #192

Closed BastianHentschel closed 2 years ago

BastianHentschel commented 2 years ago

The bgtu pseudo-instruction gets translated to bltu with the second register operand as both operands:

bgtu x0, x6, main -> bgtu x6, x6, main-pc

resulting in always not taking the branch, regardless of the values

EDIT: Same Bug with bleu translation to bgeu

mortbopet commented 2 years ago

Hi @BastianHentschel This was fixed in https://github.com/mortbopet/Ripes/commit/99ca6452532ca70c39d9f17f562f764065442bcc so if you download the continuous build, things should work as expected.

I'll soon have a new release ready such that these things are made available in the prebuilt version.