29.12.2014 Views

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

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.

<strong>Compiler</strong> Command-line Options<br />

--no_unaligned_access<br />

Use --no_unaligned_access to disable the generation of unaligned word<br />

and halfword accesses on <strong>ARM</strong>v6 processors.<br />

To enable modulo four-byte alignment checking on an <strong>ARM</strong>v6 target<br />

without unaligned accesses, you must:<br />

• Set the A bit, bit 1, of CP15 register 1 in your initialization code.<br />

• Set the U bit, bit 22, of CP15 register 1 in your initialization code.<br />

The initial value of the U bit is determined by the UBITINIT input<br />

to the core.<br />

Note<br />

Unaligned doubleword accesses, for example unaligned accesses to long<br />

long integers, are not supported by <strong>ARM</strong> processor cores. Doubleword<br />

accesses must be either eight-byte or four-byte aligned.<br />

The compiler does not provide support for modulo eight-byte alignment<br />

checking. That is, the configuration U = 0, A = 1 in CP15 register 1 is not<br />

supported by the compiler, or more generally, by the RVCT toolset.<br />

The RVCT libraries include special versions of certain library functions<br />

designed to exploit unaligned accesses. To prevent these enhanced library<br />

functions being used when unaligned access support is disabled, you<br />

need to specify --no_unaligned_access on both the compiler command<br />

line and the assembler command line when compiling a mixture of C and<br />

C++ source files and asssembly language source files.<br />

Restrictions<br />

Code compiled for processors supporting unaligned accesses to data can run correctly<br />

only if the choice of alignment support in software matches the choice of alignment<br />

support on the processor core.<br />

See also<br />

• --cpu=name on page 2-15<br />

• Command syntax on page 3-2 in the Assembler <strong>Guide</strong><br />

• Alignment support on page 4-43 in the <strong>Compiler</strong> User <strong>Guide</strong>.<br />

2.1.118 --use_pch=filename<br />

This option instructs the compiler to use a PCH file with the specified filename as part<br />

of the current compilation.<br />

<strong>ARM</strong> DUI 0348A Copyright © 2007, 2010 <strong>ARM</strong> Limited. All rights reserved. 2-89<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!