aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/sha256sig1.h
blob: 72e586cb83acc108e5e00feb4041c24ad47c8da1 (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, 17) ^ ROR32(a,19) ^ (a >> 10))
);

#undef ROR32