Am 12.10.2017 um 20:37 schrieb sserg...@gmail.com:
> Hi.
> 
> Sorry for late message. But nobody still have said about possible problem 
> with 
> suggested patch. 

Well, it's always very hard to review such highly optimized code. I had a look 
and tested it and it
worked, I didn't notice the problem below either.

> So I decide to pay attention on that proposed code may be 
> incorrect under some circumstances IMHO.
> 
> Instruction on line 657
> 
> subq %rcx, %rax
> 
> decreases value in %rax on %rcx, but previous code doesn't set any value to 
> 32 
> high bits of %rax and 32 high bits of %rcx still contain 32 high bits of buf1 
> address. So I think that correct result is not guarantied.
> 
> I suggest to use mozbq instead of movzbl to fix this issue.

I think also the final xor should be a xorq %rax,%rax, right?
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to