Reputation: 539
can someone explain what is the difference between the arm instructions prfm and prfum and usage of these ?
PRFUM https://developer.arm.com/documentation/dui0802/b/PRFUM
PRFM https://developer.arm.com/documentation/dui0801/g/A64-Data-Transfer-Instructions/PRFM--literal-
Upvotes: 0
Views: 2072
Reputation: 4111
For questions like this, your primary source is the ARMv8 Architecture Reference manual. I happen to have the edition E.a at hand, so page numbers are going to refer to that edition.
On Page C6-1136, PRFM
(immediate) is described. It allows to prefetch data that is at an offset that is a multiple of 8 in the range of 0 to +32760 relative to the value in a base register.
On Page C6-1142, PRFUM
is described. It allows to prefetch data that is at any kind of offset (not just multiples of 8) in the range -256 to +255 relative to the value in a base register.
So if you need (for some reasons, like working with strings) to prefetch with byte accuracy, or you need to prefetch with a negative offset, you have to use PRFUM
. On the other hand, if you want to prefetch with an offset of 256 or higher, you have to use PRFM
.
Upvotes: 4