REGPARMS Compiler Directive

Abbreviation

None.

Arguments

None.

Default

REGPARMS

µVision

Options — C51 — Misc controls.

Description

The REGPARMS directive instructs the compiler to pass up to
three function arguments in registers. Parameters that cannot be
passed in registers are passed using fixed memory locations. This
technique is used in assembly programs to improve speed and reduce
memory utilization. It is significantly faster than storing function
arguments in memory.

Note

You may specify both the REGPARMS and NOREGPARMS
directive several times within a source file to compile some
functions using register parameters and other functions using the
old style of parameter passing. For example:

Important information

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.