Keil™, An ARM® Company

Cx51 User's Guide

High-speed Arithmetic

The Cx51 Compiler uses the 32-bit and 16-bit arithmetic operations of the C517, C517A, and C509 to improve performance of a number of math-intensive operations. C language programs execute considerably faster when using either of these MCUs.

Note

  • The arithmetic unit does not allow reentrant code and cannot be used in multiple threads or the main and interrupt routines at the same time.

Use the following suggestions to help guarantee that only one thread of execution uses the arithmetic processor:

  • Use the MOD517 directive to compile functions which are guaranteed to execute only in the main program or functions used by one interrupt service routine, but not both.
  • Compile all remaining functions with the MOD517(NOAU) directive.