Spike, a RISC-V ISA Simulator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

6 lines
163 B

require_extension('B');
reg_t a = zext32(RS1), b = zext32(RS2), x = 0;
for (int i = 0; i < 32; i++)
if ((b >> i) & 1)
x ^= a >> (31-i);
WRITE_RD(sext32(x));