ARM Technical Support Knowledge Articles

REGPARMS/NOREGPARMS DIRECTIVE

Applies to: C251 C Compiler

Answer


Information in this article applies to:


QUESTION

How do I enable the compiler to generate code that passes function arguments in registers to the callee?

ANSWER

The REGPARMS directive instructs the compiler to pass up to three function arguments in registers to the callee. This kind of parameter passing is similar to what you would use when writing assembly language code and is significantly faster than storing function arguments in static memory or on the stack. The NOREGPARMS directive forces the compiler to pass all function arguments in fixed memory locations.

MORE INFORMATION

Article last edited on: 2005-07-15 14:10:37

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential