On Sat, 1 Oct 2022, Biswapriyo Nath wrote:
* Sample code:
```
#include <windows.h>
int func(int a, void *b) { PreFetchCacheLine(a , b); }
```
* Required:
https://github.com/NVIDIAGameWorks/PhysX/blob/4.1/physx/source/foundation/include/windows/PsWindowsIntrinsics.h#L122
* Issue: That sample code can be compiled for x86_64 but not for
aarch64. Is it possible to add __prefetch insrtinsic and
PreFetchCacheLine macro?
Sure
* Curiosity: Microsoft docs says the __prefetch intrinsic is
translated to PLD instruction. But in arm docs, PLD is shown as <type>
of PRFM instruction. llvm-objdump shows `prfm pldl1keep, [x8]`. Are
those same?
I don't quite understand what you mean here... PLD is a 32 bit arm
instruction, PRFM is a 64 bit aarch64 instruction - they do kinda the
same, but PRFM has a bit more options.
https://learn.microsoft.com/en-us/cpp/intrinsics/arm-intrinsics shows that
__prefetch uses PLD on arm, and
https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics shows
that __prefetch uses PRFM on aarch64.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public