A combination of volatile accesses of __R30 and function calls is incorrectly scheduled

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-1486
    • SDSCM00052791
    • PRU_2.1.1
    • PRU_2.1.5
    • Hide
      Introduce a dummy volatile variable into the calculations involving volatile register variables. Performance will be impacted, but order will be maintained.

      For example, to fix the code attached to the issue:

      volatile uint32_t dummy = 0;
      volatile register uint32_t __R30;
      extern void timer_delay(uint32_t cycles);

      void main()
      {
              timer_delay((58000 / 5) - 1);

              do { REGNAME &= ~((0x00000002)+dummy); } while (0);
              do { REGNAME |= ((0x00000008)+dummy); } while (0);

              timer_delay((58000 / 5) - 1);

              do { REGNAME &= ~((0x00000008)+dummy); } while (0);
              do { REGNAME |= ((0x00000002)+dummy); } while (0);

              ... /* Repeat */
      }
      Show
      Introduce a dummy volatile variable into the calculations involving volatile register variables. Performance will be impacted, but order will be maintained. For example, to fix the code attached to the issue: volatile uint32_t dummy = 0; volatile register uint32_t __R30; extern void timer_delay(uint32_t cycles); void main() {         timer_delay((58000 / 5) - 1);         do { REGNAME &= ~((0x00000002)+dummy); } while (0);         do { REGNAME |= ((0x00000008)+dummy); } while (0);         timer_delay((58000 / 5) - 1);         do { REGNAME &= ~((0x00000008)+dummy); } while (0);         do { REGNAME |= ((0x00000002)+dummy); } while (0);         ... /* Repeat */ }
    • Fixed an issue where operations on volatile register variables such as __R30 and __R31 were reordered.

      A combination of volatile accesses of __R30 and function calls is incorrectly scheduled

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

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-626 - A combination of volatile accesses ...
                SYNCHRONIZED
                • Last Sync Date: