Details
-
Bug
-
Status: Fixed
-
Medium
-
Resolution: Fixed
-
Code Generation Tools
-
CODEGEN-1495
-
SDSCM00052849
-
-
-
Use --opt_level=1 or lower
Description
The TI ARM compiler generates a CPSIE (CPSID) instruction for the _enable_IRQ (_disable_IRQ) instrinsic when compiled for Cortex. Sometimes, especially when --opt_level=2 or higher is used, the compiler will mistakenly try to put the CPSIE instruction in an IT block (for Thumb mode) or to place a conditional suffix on the instruction (for ARM mode). In Thumb mode, you'll see a misleading warning on the CPSIE instruction.
void test(int cond)
{ if (cond) _enable_IRQ(); }WARNING! at line 79: [W0004] Missing condition code inside of IT block
CPSIE i