aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/sha256sig0.h
blob: f86e42f7a02e92e1210ff75497f9d7c9ebf2139b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

require_extension(EXT_ZKNH);

#define ROR32(a,amt) ((a << (-amt & (32-1))) | (a >> (amt & (32-1))))

uint32_t a = RS1;

WRITE_RD(
    sext32(ROR32(a, 7) ^ ROR32(a,18) ^ (a >> 3))
);

#undef ROR32