aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/sha512sum0.h
blob: 01182e679aca8538519b539c29f4659611849950 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require_rv64;
require_extension(EXT_ZKNH);

#define ROR64(a,amt) ((a << (-amt & (64-1))) | (a >> (amt & (64-1))))

uint64_t a = RS1;

WRITE_RD(
    ROR64(a, 28) ^ ROR64(a,34) ^ ROR64(a,39)
);

#undef ROR64