fix another unaligned load

This commit is contained in:
dzaima 2024-06-26 06:09:30 +03:00
parent 7474e51642
commit 6824b9a747
2 changed files with 3 additions and 4 deletions

View File

@ -260,7 +260,7 @@ fn xor_rows_bit(xp:*u64, rp:*u64, n:usz, l:usz, eq:u1) : void = {
if (l <= 64) {
bm:= u64~~2<<(l-1) - 1
k:= l/8
@for (i to n) add_bit{i, popc{bm & load{*u64~~(*u8~~xp + k*i)}}}
@for (i to n) add_bit{i, popc{bm & loadu{*u64~~(*u8~~xp + k*i)}}}
} else if (l < 128) xor_loop{1}
else if (l%64==0) {
@for (i to n) add_bit{i, popc{xor_words(0, xp+ll*i, ll)}}

View File

@ -45,8 +45,7 @@
{2 𝕨 _testScanCells 𝕩} _basicArgs 34
{2 𝕨 _testScanCells 𝕩} _basicArgs 34
0, 01, 10, 1, 10, 101, 110, 100 {
0, 01, 10, 22, 1, 10, 101, 110, 30 {
𝕨𝕩 ¨
sh 𝕨𝕩
cr 𝕩
@ -54,5 +53,5 @@
cr 𝕎 _testFoldCells 𝕩
cr 𝕎 _testScanCells 𝕩
} {0=×´sh? 𝕩; 𝕩, ¬¨ 𝕩, ¬(¯1)¨ 𝕩} sh¨ 01
} 0, 1, 2, 8, 81, 48, 42, 59, 60, 63, 80, 81, 200, 640, 641
} 0, 1, 2, 8, 32, 81, 48, 42, 59, 60, 63, 80, 81, 200, 640, 641
)