mirror of
https://github.com/riscv-software-src/riscv-isa-sim.git
synced 2025-10-18 00:01:30 +08:00
6 lines
148 B
C
6 lines
148 B
C
require_extension(EXT_ZBB);
|
|
reg_t x = xlen;
|
|
for (int i = 0; i < xlen; i++)
|
|
if (1 & (RS1 >> (xlen-i-1))) { x = i; break; }
|
|
WRITE_RD(sext_xlen(x));
|