reko icon indicating copy to clipboard operation
reko copied to clipboard

Risc-V: fails to handle compiled switch statements

Open uxmal opened this issue 5 years ago • 0 comments

Attempting to decompile Risc-V binaries (see #958) with compiled switch statements results in warnings because the scanner isn't handling the Risc-V switch statements that look like this:

c.li a5,00000012
bgeu a5,s7,000000002309B2C2
jal zero,000000002309CE8C

lui a4,000230CB
slli a5,s7,00000002
addi a4,a4,-00000744
c.add a5,a4
c.lw a5,0(a5)
c.jr a5

The bgeu statement is confusing the indirect jump scanner.

uxmal avatar Nov 02 '20 13:11 uxmal