04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compiler-specific Features<br />

Where:<br />

val<br />

ptr<br />

Is the value to be written to memory.<br />

Points to the address of the data to be written to in memory. To specify<br />

the size of the data to be written, cast the parameter to an appropriate<br />

integral type.<br />

Table 4-13 Access widths supported by the __strt intrinsic<br />

Instruction Size of data loaded C cast<br />

STRBT unsigned byte (char *)<br />

STRHT unsigned halfword (short int *)<br />

STRT word (int *)<br />

Errors<br />

The compiler does not recognize the __strt intrinsic when compiling for a target that<br />

does not support the STRT instruction. The compiler generates either a warning or an<br />

error in this case.<br />

The __strt intrinsic does not support access either to signed data or to doubleword data.<br />

The compiler generates an error if you specify an access width that is not supported.<br />

Example<br />

void foo(void)<br />

{<br />

int loc=0xff;<br />

__strt(0x20, (volatile char *)loc);<br />

}<br />

Compiling this code produces:<br />

||foo|| PROC<br />

MOV<br />

MOV<br />

STRBT<br />

BX<br />

ENDP<br />

r0,#0xff<br />

r1,#0x20<br />

r1,[r0],#0<br />

lr<br />

See also<br />

• --thumb on page 2-122<br />

• LDR and STR (User mode) on page 4-18 in the Assembler Guide.<br />

4-104 Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. <strong>ARM</strong> DUI 0348C<br />

Non-Confidential,<br />

ID101213

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!