__pld() Instruction Intrinsic

Has anyone used the __pld() instruction intrinsic with the Keil compiler tools?

According to the ARM V7-M Architecture Reference Manual: "The effect of these memory system hints is IMPLEMENTATION DEFINED".

Please. No 'what are you using this for' questions. Right now this is just a research on my part to determine whether or not I would need to use this intrinsic. Since this is implementation defined I would need to know if this is even used within the Keil environment and what would be the benefit (if any) over using this rather than say optimization level 3 or even using the volatile keyword.

Thanks.

Parents
  • You should probably read the relevant compiler reference manual section as well:
    www.keil.com/.../armccref_cjagadac.htm

    Since this is implementation defined I would need to know if this is even used within the Keil environment

    If you use it explicitly, it will be used. I doubt the compiler emits such an instruction, though.

    and what would be the benefit (if any) over using this rather than say optimization level 3 or even using the volatile keyword.

    Some processors are equipped with data caches and prefetch units. If you are working with one of those, this intrinsic might help you optimize memory reads in your program. This will probably be completely opaque to the compiler, so no intersection with optimization level or use of volatile.

Reply
  • You should probably read the relevant compiler reference manual section as well:
    www.keil.com/.../armccref_cjagadac.htm

    Since this is implementation defined I would need to know if this is even used within the Keil environment

    If you use it explicitly, it will be used. I doubt the compiler emits such an instruction, though.

    and what would be the benefit (if any) over using this rather than say optimization level 3 or even using the volatile keyword.

    Some processors are equipped with data caches and prefetch units. If you are working with one of those, this intrinsic might help you optimize memory reads in your program. This will probably be completely opaque to the compiler, so no intersection with optimization level or use of volatile.

Children
More questions in this forum