Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int SRAWI(int RS, int SH)
- {
- // n <- SH
- int n = SH;
- // r <- ROTL32((RS)32:63, 64-n)
- int r = (RS << (32-n))|(RS >> (32 - (32-n)));
- // m <- MASK(n+32, 63)
- u32 m = GenerateMask32(n, 31);
- // s <- (RS)32
- // if bit 0 == 1 fill s with all 1's
- // else s is all 0's
- u32 s = ((RS & 0x80000000) == 0x80000000) ? -1:0;
- // RA <- r&m | s&~m
- int RA = r&m | s&~m;
- return RA;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement