AlignExpr(expr, align) function

This function returns:

(expr + (align-1)) & ~(align-1))


It increases expr until it is:

0 mod align


This example aligns the address of ER2 on an 8-byte boundary:

ER +0

ER2 AlignExpr(+0x8000,8)

Show/hideRelationship with the ALIGN keyword

The following relationship exists between ALIGN and AlignExpr:

ALIGN keyword

Load and execution regions already have an ALIGN keyword:

  • for load regions the ALIGN keyword aligns the base of the load region in load space and in the file to the specified alignment

  • for execution regions the ALIGN keyword aligns the base of the execution region in execution and load space to the specified alignment.


Aligns the expression it operates on, but has no effect on the properties of the load or execution region.

Show/hideSee also

Copyright © 2008, 2011-2012 ARM. All rights reserved.ARM DUI 0458C