7.7.18. REQUIRE8 and PRESERVE8

The REQUIRE8 directive specifies that the current file requires 8-byte alignment of the stack.

The PRESERVE8 directive specifies that the current file preserves 8-byte alignment of the stack.

Syntax

REQUIRE8
PRESERVE8

Usage

LDRD and STRD instructions (double-word transfers) only work correctly if the address they access is 8-byte aligned.

If your code includes LDRD or STRD transfers to or from the stack, use REQUIRE8 to instruct the linker to ensure that your code is only called from objects that preserve 8-byte alignment of the stack.

If your code preserves 8-byte alignment of the stack, use PRESERVE8 to inform the linker.

The linker ensures that any code that requires 8-byte alignment of the stack is only called, directly or indirectly, by code that preserves 8-byte alignment of the stack.

Copyright © 2000, 2001 ARM Limited. All rights reserved.ARM DUI 0068B
Non-Confidential