riscv-non-isa/riscv-trace-spec

Trace decoder pseudo-code: parenthesize in order to get correct operator order precedence

bmcspadd-seagate opened this issue · 1 comments

On page 33, for function 'is_sequential_jump()', please change the following...

if (not is_uninferrable_jump(instr) and options.sijump)

.... to ....

if (not ( is_uninferrable_jump(instr) and options.sijump ) )

... in order to exactly specify order of operation.

There are probably other cases in the pseudo-code. This one caused a problem in trace reconstruction.
I had written it as (in Systemverilog) ....

if (  !  P_FN_is_uninferrable_jump(P_ARG_instr)  && P_GBL_options.f_sijump ) 

... which is not correct for this functional expression.