ref: 631d7720fd5cb4c5072aec5270bb444b68b9e0f7
parent: eaedb95de65fb5612297b148a306398240e8ad6f
author: Henrik Gramner <gramner@twoorioles.com>
date: Sun May 10 09:40:14 EDT 2020
msac: Avoid attempting to refill after eob has already been reached Utilize the unsigned representation of a signed integer to skip the refill code if the count was already negative to begin with, which saves a few clock cycles at the end of each tile.
--- a/src/arm/64/msac.S
+++ b/src/arm/64/msac.S
@@ -216,7 +216,7 @@
lsl x7, x7, x5 // (~dif + (v << 48)) << d
str w4, [x0, #RNG]
mvn x7, x7 // ~dif
- b.ge 9f
+ b.hs 9f
// refill
ldp x3, x4, [x0] // BUF_POS, BUF_END
--- a/src/x86/msac.asm
+++ b/src/x86/msac.asm
@@ -157,7 +157,7 @@
mov [t7+msac.rng], t2d
not t4
sub t1d, ecx
- jge .end ; no refill required
+ jae .end ; no refill required
; refill:
mov t2, [t7+msac.buf]
@@ -504,7 +504,7 @@
mov [t7+msac.rng], t2d
not t4
sub t5d, ecx
- jge %%end
+ jae %%end
mov t2, [t7+msac.buf]
mov rcx, [t7+msac.end]
%if UNIX64 == 0