Compatibility issues
In general, if two modules are used together in the same application, they should have the same setting for register locking and register constants. The reason for this is that registers that can be locked could also be used as parameter registers when calling functions. In other words, the calling convention will depend on the number of locked registers.
However, because this leads to a situation where suppliers of object files and libraries would be forced to make a choice between either delivering many different prebuilt versions or selecting a few configurations to support, there is a compiler option --lock_regs_compatibility. Object files compiled using this option can be linked with object files that lock the same or a fewer number of registers.
To create object files that are compatible with as many options as possible, you should lock ten registers and specify the --lock_regs_compatibility option, using a data model that supports short addressing.