aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/sha256sum0.h
blob: f0aed47fe18ae8802f8c798aa5b2ebf76264577a (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, 2) ^ ROR32(a,13) ^ ROR32(a, 22))
);

#undef ROR32