Skip to content

Commit

Permalink
AArch32: fixed sha1su1.32
Browse files Browse the repository at this point in the history
* fixed destructive left shifts on 32-bit values before zext
  • Loading branch information
Sleigh-InSPECtor committed May 16, 2024
1 parent cae9190 commit 4578168
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Ghidra/Processors/ARM/data/languages/ARMneon.sinc
Original file line number Diff line number Diff line change
Expand Up @@ -637,15 +637,15 @@ define pcodeop SHA1HashUpdateParity;
local X = Qd;
local Y = Qm;
local Tm = X ^ (Y >> 32);
local t0:4 = Tm(0);
local t1:4 = Tm(4);
local t2:4 = Tm(8);
local t3:4 = Tm(12);
local t0:4 = Tm[0, 32];
local t1:4 = Tm[32, 32];
local t2:4 = Tm[64, 32];
local t3:4 = Tm[96, 32];
local W0:4 = (t0 << 1 | t0 >> 31);
local W1:4 = (t1 << 1 | t1 >> 31);
local W2:4 = (t2 << 1 | t2 >> 31);
local W3:4 = (t3 << 1 | t3 >> 31) ^ (t0 << 2 | t0 >> 30);
Qd = zext(W3 << 96) | zext(W2 << 64) | zext(W1 << 32) | zext(W0);
Qd = (zext(W3) << 96) | (zext(W2) << 64) | (zext(W1) << 32) | zext(W0);
}

#######
Expand Down

0 comments on commit 4578168

Please sign in to comment.