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 30th July 2012 at http://forums.arm.com

    I'm now almost certain that you are provoking the generation of LDM/STM to perform what turns out to be an unaligned copy. Instrumenting the "c->ca = a;" assignment yields something like:

    &(c->ca) = 0x9bb2018, &(a) = 0xffa37cd4, sizeof a = 24
    &(c->ca) = 0x9bb2053, &(a) = 0xffa37cd4, sizeof a = 24
    &(c->ca) = 0x9bb208e, &(a) = 0xffa37cd4, sizeof a = 24
    &(c->ca) = 0x9bb20c9, &(a) = 0xffa37cd4, sizeof a = 24
    &(c->ca) = 0x9bb2104, &(a) = 0xffa37cd4, sizeof a = 24

    where it can be seen that "&(c->ca)" can become completely unaligned.

    I suspect you either need to add some "__attribute__((__packed__))" to the structure definitions, or find a switch to disable use of LDM/STM as a gcc specific way of addressing this; or make the code [more] standards compliant by changing your structure extension array to be of the correct type rather than char (i.e. avoid the cast of a char pointer to a structure pointer).

    hth
    s.
Reply
  • Note: This was originally posted on 30th July 2012 at http://forums.arm.com

    I'm now almost certain that you are provoking the generation of LDM/STM to perform what turns out to be an unaligned copy. Instrumenting the "c->ca = a;" assignment yields something like:

    &(c->ca) = 0x9bb2018, &(a) = 0xffa37cd4, sizeof a = 24
    &(c->ca) = 0x9bb2053, &(a) = 0xffa37cd4, sizeof a = 24
    &(c->ca) = 0x9bb208e, &(a) = 0xffa37cd4, sizeof a = 24
    &(c->ca) = 0x9bb20c9, &(a) = 0xffa37cd4, sizeof a = 24
    &(c->ca) = 0x9bb2104, &(a) = 0xffa37cd4, sizeof a = 24

    where it can be seen that "&(c->ca)" can become completely unaligned.

    I suspect you either need to add some "__attribute__((__packed__))" to the structure definitions, or find a switch to disable use of LDM/STM as a gcc specific way of addressing this; or make the code [more] standards compliant by changing your structure extension array to be of the correct type rather than char (i.e. avoid the cast of a char pointer to a structure pointer).

    hth
    s.
Children
No data