The __strt intrinsic lets you store data to memory in your C or C++ code using an STR{size}T instruction.
Syntax
void __strt(unsigned int val, volatile void
*ptr)
Where:
val
Is the value to be written to memory.
ptr
Points to the address of the data to be written to in memory. To specify the size
of the data to be written, cast the parameter to an appropriate integral type.
Table 9-13 Access widths that the __strt intrinsic supports
Instruction
Size of data stored
Pointer type
STRBT
byte
char *
STRHT
halfword
short *
STRT
word
int *
Errors
The compiler does not recognize the __strt intrinsic when compiling for a
target that does not support the STRT instruction. The compiler generates
either a warning or an error in this case, depending on the source language:
In C code: Warning: #223-D: function "__strt" declared implicitly.
In C++ code: Error: #20: identifier "__strt" is undefined.
The __strt intrinsic does not support
access either to signed data or to doubleword data. The compiler generates an error if you
specify an access width that is not supported. The unused most-significant bits of val are ignored when signed data is stored.
Example
void foo(void)
{
int loc=0xff;
__strt(0x20, (volatile char *)loc);
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.