HCS08 Compiler > Code Generation

Use this panel to specify code- and symbol-generation options for the HCS08 Compiler

The following table lists and describes the code generation options for HCS08 compiler.

Table 1. Tool Settings - HCS08 Compiler > Code Generation Options
Option Description
Bit field Byte allocation (-BfaB[MS|LS]) By default, bit allocation in byte bitfields proceeds from the least significant bit to the most significant bit. This produces less code overhead in the case of partially- allocated byte bitfields. Options are:
  • MS: Most significant bit in byte first (left to right)
  • LS: Least significant bit in byte first (right to left)
Bit field gap limit (-BfaGapLimitBits) Check to affect the maximum allowable number of gap bits. The bitfield allocation tries to avoid crossing a byte boundary whenever possible. To optimize accesses, the compiler may insert some padding or gap bits.
Bit field type size reduction This option is configurable whether or not the compiler uses type-size reduction for bitfields. Type-size reduction means that the compiler can reduce the type of an int bitfield to a char bitfield if it fits into a character. This allows the compiler to allocate memory only for one byte instead of for an integer. Options are:
  • Enabled (-BfaTSRON)
  • Disabled (-BfaTSROFF)
Maximum load factor for switch tables (-100) (-CswMaxLF) Allows changing the default strategy of the Compiler to use tables for switch statements; is only available if the compiler supports switch tables.
Minimum number of labels for switch tables (-CswMinLB) Allows changing the default strategy of the Compiler using tables for switch statements; is only available if the compiler supports switch tables.
Minimum load factor for switch tables (100) (-CswMinLF) Allows the Compiler to use tables for switch statements; is only available if the compiler supports switch tables.
Minimum number of labels for switch search tables (-CswMinSLB) Allows the Compiler to use tables for switch statements. Using a search table improves code density, but the execution time increases. Every time an entry in a search table must be found, all previous entries must be checked first. For a dense table, the right offset is computed and accessed. In addition, note that all backends implement search tables (if at all) by using a complex runtime routine. This may make debugging more complex.
Switch off code generation (-Cx) Disables the code generation process of the Compiler. No object code is generated, though the Compiler performs a syntactical check of the source code. This allows a quick test if the Compiler accepts the source without errors.
Do not use CLR for volatile variables in the direct page (-NoClrVol) Inhibits the use of CLR for volatile variables in the direct page. The CLR instruction on HC08 has a read cycle. This may lead to unwanted lateral effects (e.g. if the variable is mapped over a hardware register).
Qualifier for virtual table pointers (-Qvtp) Using a virtual function in C++ requires an additional pointer to virtual function tables. The Compiler cannot access the pointer and generates the pointer in every class object when virtual function tables are associated. Options are:
  • None
  • Near
  • Far
Use IEEE32 for double (default is IEEE64) Check to use doubles that are in IEEE32 instead of IEEE64 (default).
Assume HLI code saves modified registers With this option set, the compiler assumes that registers touched in HLI are saved or restored in the HLI code as well. If this option is not set, the compiler saves or restores the H, X, and A registers.