Keil Logo

REGFILE Compiler Directive




A file name enclosed in parentheses.




Options — C51 — Global Register Coloring.


The REGFILE directive instructs the compiler to use a register definition file for global register optimization. The register definition file specifies the registers used by external functions. Using this information, the compiler can optimize the use of the general purpose registers. This feature enables global program-wide register optimization. The name of the REGFILE must be identical across the complete project.

Refer to the REGFILE linker directive and to Global Register Coloring for more information.

C51 SAMPLE.C REGFILE(sample.reg)

#pragma REGFILE(sample.reg)
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

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.