* base on CFI spec, ch2.8
The access type is classified as a store/AMO in the event of an
access-fault, page-fault, or guest-page
fault exception triggered by shadow stack instructions.
ROI from "The RISC-V Debug Specification" (1.0)
```
3.1. Debug Module Interface (DMI)
...
The DMI uses between 7 and 32 address bits. ...
```
NOTE: RISC-V External Debug Specification 0.13.2 has the same sentence.
This applies when the binary is set to "none".
This is useful when implementing a binary loading
mechanism outside of the HTIF, and the bootloader
is supposed to boot from that.
referece from: ISO C99 (6.5.7/4)
"The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated
bits are filled with zeros. If E1 has an unsigned type, the value of the
result is E1 × 2E2, reduced modulo one more than the maximum value
representable in the result type. If E1 has a signed type and
nonnegative value, and E1 × 2E2 is representable in the result type,
then that is the resulting value; otherwise, the behavior is undefined."
list the affectections. X means it is problematic and fixed by change
operand type / redundant mask
1. vsll.v[vxi] -> X X
2. vsra.v[vxi] -> O O
3. vsrl.v[vxi] -> O X
4. vwsll.v[vxi] -> O O
5. vnsrl.w[vxi] -> O O
6. vnsra.w[vxi] -> O X
7. vssrl.v[vxi] -> O X
7. vssra.v[vxi] -> O X
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Adds an optional --instructions=N CLI argument which will stop the simulation after N instructions.
This is useful for benchmarking and profiling and sometimes debugging.
Pointer masking needs to be reapplied after computing the address of the
tail of a misaligned access in case there's a carry-out into the MSBs.
Resolves#1895
Ensuring No negation on -2^63(int64_t) is performed during mulh/mulhsu
Signed-off-by: Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com>
Update riscv/arith.h
Signed-off-by: Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com>