Skip to content

Commit 816f807

Browse files
authored
[LA64_DYNAREC] Micro-optimization for emit_shr32c (#3317)
1 parent 7e15f0e commit 816f807

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/dynarec/la64/dynarec_la64_emit_shift.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,7 @@ void emit_shr32c(dynarec_la64_t* dyn, int ninst, rex_t rex, int s1, uint32_t c,
760760
BSTRINS_D(s3, xZR, F_AF, F_AF);
761761
X64_SET_EFLAGS(s3, X_OF | X_AF);
762762
}
763-
SRLIxw(s1, s1, c);
764-
if (!rex.w) ZEROUP(s1);
763+
SRLIxw(s1, s1, c); // no need to zeroup on !rex.w
765764
IFX (X_PEND) {
766765
SDxw(s1, xEmu, offsetof(x64emu_t, res));
767766
}
@@ -789,16 +788,13 @@ void emit_shr32c(dynarec_la64_t* dyn, int ninst, rex_t rex, int s1, uint32_t c,
789788
if (rex.w) {
790789
SRLI_D(s1, s1, c);
791790
} else {
792-
SRLI_W(s1, s1, c);
791+
SRLI_W(s1, s1, c); // no need to zeroup
793792
}
794793

795794
IFX (X_SF) {
796795
BGE(s1, xZR, 8);
797796
ORI(xFlags, xFlags, 1 << F_SF);
798797
}
799-
if (!rex.w) {
800-
ZEROUP(s1);
801-
}
802798
IFX (X_PEND) {
803799
SDxw(s1, xEmu, offsetof(x64emu_t, res));
804800
}

0 commit comments

Comments
 (0)