Lazarus

Programming => General => Topic started by: julkas on June 06, 2020, 06:25:59 am

Title: [SOLVED] __builtin_prefetch
Post by: julkas on June 06, 2020, 06:25:59 am
I need  C  __builtin_prefetch analog.
Any hint?
Title: Re: __builtin_prefetch
Post by: Thaddy on June 06, 2020, 10:30:34 am
isn't it just (intel/amd):
Code: Pascal  [Select][+][-]
  1. procedure prefetch;inline;asm prefetch;end;
Note that prefetch is not very useful on modern processors.
(But it had a marked improvement on old amd64.)
Title: Re: __builtin_prefetch
Post by: PascalDragon on June 06, 2020, 11:01:33 am
I need  C  __builtin_prefetch analog.
Any hint?

It's simply called Prefetch (https://www.freepascal.org/docs-html/current/rtl/system/prefetch.html). It will only have an effect on x86 (all three bitnesses), PowerPC (both bitnesses) and ARM as only there it's backend is implemented. On other platforms won't have an effect.
Title: Re: __builtin_prefetch
Post by: julkas on June 06, 2020, 11:45:53 am
It's simply called Prefetch (https://www.freepascal.org/docs-html/current/rtl/system/prefetch.html).
Thanks.
TinyPortal © 2005-2018