Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-8126

ARM compiler incorrectly puts CPSIE and CPSID instructions into an IT block

    XMLWordPrintable

Details

    • Bug
    • Status: Fixed
    • Medium
    • Resolution: Fixed
    • Code Generation Tools
    • CODEGEN-1495
    • SDSCM00052849
    • Hide
      ARM_18.1.0.LTS
      ARM_16.9.0.LTS
      ARM_18.12.0.LTS
      ARM_20.2.0.LTS
      Show
      ARM_18.1.0.LTS ARM_16.9.0.LTS ARM_18.12.0.LTS ARM_20.2.0.LTS
    • Hide
      ARM_18.12.8.LTS*
      ARM_20.2.4.LTS*
      Show
      ARM_18.12.8.LTS* ARM_20.2.4.LTS*
    • 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

      Attachments

        Activity

          People

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: