Skip to content

Commit d643844

Browse files
authored
Update xor_gen_sse.asm
Fix: use the correct address for the last vector in the array.
1 parent b7e6d3e commit d643844

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

raid/xor_gen_sse.asm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ len_aligned_128bytes:
119119
xor DWORD(pos), DWORD(pos)
120120

121121
loop128:
122-
mov tmp2, [arg2+tmp*PS] ;Fetch last pointer in array
122+
mov tmp2, [arg2+vec*PS] ;Fetch last pointer in array
123123
lea tmp, [vec-1] ;Next vect
124124
XLDR xmm0, [tmp2+pos] ;Start with end of array in last vector
125125
XLDR xmm1, [tmp2+pos+16] ;Keep xor parity in xmm0-7
@@ -145,8 +145,7 @@ next_vect:
145145
jae next_vect ;Loop for each vect
146146

147147

148-
mov tmp, vec ;Back to last vector
149-
mov ptr, [arg2+PS+tmp*PS] ;Address of parity vector
148+
mov ptr, [arg2+PS+vec*PS] ;Address of parity vector
150149
XSTR [ptr+pos], xmm0 ;Write parity xor vector
151150
XSTR [ptr+pos+(1*16)], xmm1
152151
XSTR [ptr+pos+(2*16)], xmm2

0 commit comments

Comments
 (0)