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

Type pun with pointer conversion from non-complex to complex type may lose swap

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-10214
    • Hide
      C7000_1.4.0.LTS
      C6000_8.3.0
      C7000_2.1.0.LTS
      C7000_3.0.0.STS
      C7000_3.1.0.LTS
      Show
      C7000_1.4.0.LTS C6000_8.3.0 C7000_2.1.0.LTS C7000_3.0.0.STS C7000_3.1.0.LTS
    • Hide
      C7000_2.1.3.LTS*
      C7000_3.1.1.LTS*
      C7000_1.4.3.LTS
      C6000_8.3.13*
      Show
      C7000_2.1.3.LTS* C7000_3.1.1.LTS* C7000_1.4.3.LTS C6000_8.3.13*
    • default
    • Hide
      For cl7x, use a reinterpret and swap operation explicitly. For example, instead of:
      cfloat cfvec = *((cfloat*)&fvec);
      Use:
      cfloat cfvec = __as_cfloat(__swap(fvec));
      Show
      For cl7x, use a reinterpret and swap operation explicitly. For example, instead of: cfloat cfvec = *((cfloat*)&fvec); Use: cfloat cfvec = __as_cfloat(__swap(fvec));

      Using a pointer conversion to type pun between a complex and non-complex vector type may result in incorrect representation of the complex result in register. For example:

      float2 fvec = (float2)(1.0f, 2.0f);
      cfloat cfvec = ((cfloat)&fvec);

      Will result in an incorrect ordering of the contents in cfvec.

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

              Created:
              Updated:
              Resolved: