blob: dfee94e29bfb8b3baf12a28c13b3110c5826b5dd (
plain)
1
2
3
4
5
6
|
require_either_extension(EXT_ZBC, EXT_ZBKC);
reg_t a = zext_xlen(RS1), b = zext_xlen(RS2), x = 0;
for (int i = 1; i < xlen; i++)
if ((b >> i) & 1)
x ^= a >> (xlen-i);
WRITE_RD(sext_xlen(x));
|