aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/sha512sum1.h
blob: 267d7dd991dbaaf808a017776bcd9e15b20c731f (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, 14) ^ ROR64(a, 18) ^ ROR64(a, 41)
);

#undef ROR64