diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-08-11 14:48:11 +0200 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2020-10-22 17:00:11 -0700 |
commit | 70d7081acb5be54ea7fa4c3f9ef9a6134a43519e (patch) | |
tree | 6bf1c33283d13b4b197047f225d45cd253ceaccf /riscv/insns/crc32c_d.h | |
parent | f1c24eff543e6f41980993f41ae1ab5ab80a7340 (diff) | |
download | spike-70d7081acb5be54ea7fa4c3f9ef9a6134a43519e.zip spike-70d7081acb5be54ea7fa4c3f9ef9a6134a43519e.tar.gz spike-70d7081acb5be54ea7fa4c3f9ef9a6134a43519e.tar.bz2 |
[riscv-bitmanip] Add bitmanip instructions
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'riscv/insns/crc32c_d.h')
-rw-r--r-- | riscv/insns/crc32c_d.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/riscv/insns/crc32c_d.h b/riscv/insns/crc32c_d.h new file mode 100644 index 0000000..862407c --- /dev/null +++ b/riscv/insns/crc32c_d.h @@ -0,0 +1,5 @@ +require_extension('B'); +reg_t x = RS1; +for (int i = 0; i < 64; i++) + x = (x >> 1) ^ (0x82F63B78 & ~((x&1)-1)); +WRITE_RD(sext_xlen(x)); |