This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

OMAP3: encountered a blocking structure assignment, occurring only on OMAP3 processors

Parents
  • Note: This was originally posted on 1st August 2012 at http://forums.arm.com

    Thank you all for your fast and helpful answers. It seems we struggled into heavy alignment problems.

    As we have to keep our source working on different platforms and need to exchange our buffers between all platforms, we need a portable solution witch uses the same binary representation on all involved platforms.

    So I get the example working on all platforms, if I use following:

    .....
    if (m_enable_workaround) {

       union a_u {
          char *p;
          a_t *s;
       } t;
       t.s = &a;
       memcpy (&(c->ca),t.p,sizeof(a_t));

    } else {
       c->ca = a;
    }
    .....

    The performance impacts of this construct I haven't measured yet.

    Regards
    Wolfgang
Reply
  • Note: This was originally posted on 1st August 2012 at http://forums.arm.com

    Thank you all for your fast and helpful answers. It seems we struggled into heavy alignment problems.

    As we have to keep our source working on different platforms and need to exchange our buffers between all platforms, we need a portable solution witch uses the same binary representation on all involved platforms.

    So I get the example working on all platforms, if I use following:

    .....
    if (m_enable_workaround) {

       union a_u {
          char *p;
          a_t *s;
       } t;
       t.s = &a;
       memcpy (&(c->ca),t.p,sizeof(a_t));

    } else {
       c->ca = a;
    }
    .....

    The performance impacts of this construct I haven't measured yet.

    Regards
    Wolfgang
Children
No data