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 Command-line Options<br />

2.1.161 --unaligned_access, --no_unaligned_access<br />

These options enable and disable unaligned accesses to data on <strong>ARM</strong><br />

architecture-based processors.<br />

Default<br />

The default is --unaligned_access on <strong>ARM</strong>-architecture based processors that support<br />

unaligned accesses to data. This includes:<br />

• all <strong>ARM</strong>v6 architecture-based processors<br />

• <strong>ARM</strong>v7-A, <strong>ARM</strong>v7-R, and <strong>ARM</strong>v7-M architecture-based processors.<br />

The default is --no_unaligned_access on <strong>ARM</strong>-architecture based processors that do not<br />

support unaligned accesses to data. This includes:<br />

• all pre-<strong>ARM</strong>v6 architecture-based processors<br />

• <strong>ARM</strong>v6-M architecture-based processors.<br />

Usage<br />

--unaligned_access<br />

Use --unaligned_access on processors that support unaligned accesses to<br />

data, for example --cpu=<strong>ARM</strong>1136J-S, to speed up accesses to packed<br />

structures.<br />

To enable unaligned support, you must:<br />

• Clear 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 />

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

designed to exploit unaligned accesses. When unaligned access support<br />

is enabled, the RVCT tools use these library functions to take advantage<br />

of unaligned accesses.<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 />

2-128 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!