[EXT_EP-8126] ARM compiler incorrectly puts CPSIE and CPSID instructions into an IT block Created: 05/Apr/16 Updated: 25/Nov/20 Resolved: 25/Nov/20 |
|
| Status: | Fixed |
| Project: | Embedded Software & Tools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | TI User | Assignee: | TI User |
| Resolution: | Fixed | Votes: | 0 |
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Product: | Code Generation Tools |
| Internal ID: | CODEGEN-1495 |
| OldID: | SDSCM00052849 |
| Forum URL: | https://e2e.ti.com/support/development_tools/compiler/f/343/t/503292 |
| Found In Release: | ARM_18.1.0.LTS ARM_16.9.0.LTS ARM_18.12.0.LTS ARM_20.2.0.LTS |
| Fix In Release: | ARM_18.12.8.LTS* ARM_20.2.4.LTS* |
| Workaround: | 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 |