Open benibela opened 3 years ago
movdqa xmm2,[rdi] movdqa xmm3,[rdi] movdqa xmm4,[rdi+16] movdqa xmm5,[rdi+16]
That assumes rdi is aligned, does it not?
But it is not aligned since the offset is 2...
edit: Ok, the and rdi,-32
makes it aligned. But then it is reading from the string header
Consider:
Prints
5
as it should.Calling the same program with valgrind, it prints
-1
(PtrPosCharPairSearch returns 0)fpc 3.2.2 on linux64, valgrind-3.16.1
When I tried to initialized the string with
s := 'ABRACADABRA'
, it worked the first time even with valgrind, but now it stopped working.It also seems to work with every other string. Like
'xABRACADABRA'
. Or