[fpc-devel] *** GMX Spamverdacht *** Re: Broken frac function in FPC3.1.1 / Windows x86_64
Florian Klämpfl
florian at freepascal.org
Sat Apr 28 16:21:19 CEST 2018
Am 28.04.2018 um 15:33 schrieb Thorsten Engler:
> procedure XXX1;
> asm
> .noframe
> nop
> nop // added this
> end;
I did not look at the code in detail but I suspect this is caused by the two branches:
cmp edx, $43300000
jge @@zero
cmp edx, $3FE00000
jbe @@skip
If two branches are in the same 16 byte block, they share a branch prediction entry on almost all
x86 processors and branch prediction suffers very much in this case.
So something like
cmp edx, $43300000
jge @@zero
cmp edx, $3FE00000
.align 16
jbe @@skip
might be much better.
More information about the fpc-devel
mailing list