September 21, 2011 [Issue 2278] Guarantee alignment of stack-allocated variables on x86 | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2278 Benjamin Thaut <code@benjamin-thaut.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code@benjamin-thaut.de --- Comment #8 from Benjamin Thaut <code@benjamin-thaut.de> 2011-09-21 09:47:09 PDT --- SSE is getting more and more important in performance cirtical applications. There should be at least one way to make shure that a certain variable that is beeing allocated on the stack is aligned. I recently came across this issue in D2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 24, 2012 [Issue 2278] Guarantee alignment of stack-allocated variables on x86 | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2278 Manu <turkeyman@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |turkeyman@gmail.com --- Comment #9 from Manu <turkeyman@gmail.com> 2012-05-24 03:08:55 PDT --- I'm at the point where I can't reasonably work around this issue anymore. It's not just for SSE (although that is one very important case), there are also structures that encapsulate SSE variables (16 byte), structures that must be L1 line aligned (64/128 bytes), structures that must be GPU page aligned (4k-ish), virtual page alignment, and occasionally other alignments are required (for instance, in one case an algorithms performance was near doubled by aligning to 256 bytes, and squatting a byte of data in the unused low bits of the pointer) Structure alignment is really really important, and it's very annoying to work-around (and often wastes memory in doing so) As we did with 256bit vectors, can we define the grammar for attributing a struct with an alignment? Then GDC/LDC can hook it straight up, and DMD can produce an unsupported message for the time being. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 24, 2012 [Issue 2278] Guarantee alignment of stack-allocated variables on x86 | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2278 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs@eml.cc --- Comment #10 from bearophile_hugs@eml.cc 2012-07-24 06:02:27 PDT --- In DMD 2.060beta this problem seems partially solved, for structs: import core.stdc.stdio: printf; align(16) struct Foo { ubyte u; } // struct Foo { ubyte u; } // try this void main() { Foo f1; ubyte[3] b1; Foo f2; ubyte[5] b2; Foo f3; ubyte[7] b3; short s1; Foo f4; printf("%u\n", cast(size_t)&f1 % 16); printf("%u\n", cast(size_t)&f2 % 16); printf("%u\n", cast(size_t)&f3 % 16); printf("%u\n", cast(size_t)&f4 % 16); } Output: 0 0 0 0 But this syntax is not supported yet: void main() { align(16) ubyte u; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 15, 2013 [Issue 2278] Guarantee alignment of stack-allocated variables on x86 | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2278 Temtaime <temtaime@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |temtaime@gmail.com --- Comment #11 from Temtaime <temtaime@gmail.com> 2013-08-15 15:47:59 PDT --- BUMP. 2.63.2 regression ? import core.stdc.stdio: printf; align(16) struct Foo { ubyte u; } // struct Foo { ubyte u; } // try this void main() { Foo f1; ubyte[3] b1; Foo f2; ubyte[5] b2; Foo f3; ubyte[7] b3; short s1; Foo f4; printf("%u\n", cast(size_t)&f1 % 16); printf("%u\n", cast(size_t)&f2 % 16); printf("%u\n", cast(size_t)&f3 % 16); printf("%u\n", cast(size_t)&f4 % 16); } Output: 8 8 8 8 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation