[fpc-devel] x86_64.inc CompareByte

sserg.me at gmail.com sserg.me at gmail.com
Thu Oct 12 20:37:22 CEST 2017


Hi.

Sorry for late message. But nobody still have said about possible problem with 
suggested patch. 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.

--
With best regards
Sergey



More information about the fpc-devel mailing list