[Lazarus] UTF8LengthFast returning incorrect results on AARCH64 (MacOS)

Florian Klämpfl florian at freepascal.org
Tue Dec 28 15:56:52 CET 2021


Am 28.12.2021 um 15:50 schrieb Bart via lazarus:
> On Tue, Dec 28, 2021 at 3:39 PM Marco van de Voort via lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
> 
>> On what machine did you test? The settings if for the generated code,
>> but the actual processor determines the effective speed.
> 
> I have a Intel i5 7th generation on my Win10-64 laptop from approx.
> 2017 (so, it's really old for more modern folks than me).
> 
> Compiled for 32-bit:
> With -CpCOREI
> Unsigned version with multiplication: 1359
> Unsigned version with PopCnt        : 1282
> 
> Compiled for 32-bit:
> With -CpCOREAVX2
> Unsigned version with multiplication: 1312
> Unsigned version with PopCnt        : 1297
> 
> Compiled for 32-bit
> No -Cp switch
> Unsigned version with multiplication: 1329
> Unsigned version with PopCnt        : 3546
> 
> B.t.w. what happens if I compile for e.g. CoreAVX2 but my processor
> does not support that instructionset.
> Will the compilation/build fail, or will the executable just error out?
> 

Crash at run time with sigill. Popcnt was introduced with Nehalem, so >10 years ago.


More information about the lazarus mailing list