Closed mainkar-rohit closed 5 years ago
Location of code being referenced.
The fesvr/htif error-reporting system uses the LSB to indicate "done" vs. "not done" and uses the MSBs to indicate the error code.
Thanks for clarifying. Apologize if this is obvious. But what do you mean by "done" vs. "not done".
Is this handled inside of fesvr? If so, can you please point to the code that does this.
The LSB tells fesvr to end the simulation. https://github.com/riscv/riscv-fesvr/blob/master/fesvr/syscall.cc#L106
Thanks for clarifying.
Why does RVTEST_FAIL macro have a sll followed by a or to TESTNUM?
#define RVTEST_FAIL \ fence; \ 1: beqz TESTNUM, 1b; \ sll TESTNUM, TESTNUM, 1; \ or TESTNUM, TESTNUM, 1;
Eg. TESTNUM of 2 gets converted to 5. Also fesvr returns (tohost = 2) when we run this in Spike.