User Profile

Collapse

Profile Sidebar

Collapse
zhongyunde2019
zhongyunde2019
Last Activity: Apr 3 '19, 04:43 PM
Joined: Apr 3 '19
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • can the alignment of array elements letter than element size?

    I see https://gcc.gnu.org/ml/gcc-patches/2005-10/msg00253.html, but don't find the description in C ABI.

    *** gcc.orig/gcc/stor-layout.c Thu Sep 29 10:27:09 2005
    --- gcc/gcc/stor-layout.c Wed Oct 5 15:00:30 2005
    *************** layout_type (tree type)
    *** 1817,1822 ****
    --- 1817,1828 ----
    TYPE_MODE (type) = BLKmode;
    }
    }
    + if (TYPE_SIZE_UNIT (element)
    ...
    See more | Go to post

  • Do __attribute__((aligned(16))) take active for every element or the total variable?

    typedef __attribute__(( aligned(16)))
    struct {
    unsigned long long w[3];
    } UINT192;

    UINT192 bid_Kx192[32];

    extern void abort (void);

    int main()
    {
    int i = 0;
    unsigned long x = 0;
    for (i = 0; i < 32; ++i)
    bid_Kx192[i].w[1] = i == 1;
    for (i = 0; i < 32; ++i)
    x += bid_Kx192[1].w[1];
    if (x != 32)
    ...
    See more | Go to post
No activity results to display
Show More
Working...