__ldrexd intrinsic

This intrinsic inserts an LDREXD instruction into the instruction stream generated by the compiler. It enables you to load data from memory in your C or C++ code using an LDREXD instruction. It supports access to doubleword data.

Show/hideSyntax

unsigned long long __ldrexd(volatile void *ptr)

Where:

ptr

points to the address of the data to be loaded from memory. To specify the type of the data to be loaded, cast the parameter to an appropriate pointer type.

Table 15. Access widths supported by the __ldrex intrinsic

InstructionSize of data loadedC cast
LDREXDunsigned long long(unsigned long long *)
LDREXDsigned long long(signed long long *)

Show/hideReturn value

The __ldrexd intrinsic returns the data loaded from the memory address pointed to by ptr.

Show/hideErrors

The compiler does not recognize the __ldrexd intrinsic when compiling for a target that does not support the LDREXD instruction. The compiler generates either a warning or an error in this case.

The __ldrexd intrinsic only supports access to doubleword data. The compiler generates an error if you specify an access width that is not supported.

Show/hideSee also

Copyright © 2007-2008, 2011 ARM. All rights reserved.ARM DUI 0376C
Non-ConfidentialID061811