Closed christian-herber-nxp closed 2 weeks ago
This does appear to be a bug. Would you like to take a stab at this one, or should one of us handle it later this week?
I couldn't find the code that is supposed to set extension_table['C'] == true, so honestly, I have no idea where to look to fix this.
OK, I'll take this one.
For future reference, this is where extension_table['C']
is set: https://github.com/riscv-software-src/riscv-isa-sim/blob/5e7928a3475f3fe6a148abd74abb6d97c65c31f2/disasm/isa_parser.cc#L78
So the problem is just that the logic that handles C -> Zca occurs too late in the procedure; it needs to be hoisted up before the error-checking code.
These strings are accepted:
While this isn't:
From the isa_parser, I would expect that the second one should also work, as having C should assert Zca:
It seems that extension_table['C'] is not set anywhere in the isa_parser.