D is crap

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 5 18:06:57 PDT 2016


On Tuesday, 5 July 2016 at 23:56:48 UTC, Walter Bright wrote:
> On 7/5/2016 2:44 PM, ketmar wrote:
>> anyway, fixing long-standing bug with `align()` being ignored 
>> on stack variables
>> will allow to use SIMD on x86.
>
> Not really. The alignment requirement has to be done by all 
> functions, whether they use SIMD or not.
>

The intel performance optimization manual have some nice trick to 
mix code with different stack alignment.

You may want to check that out. Sadly, I can't find the article 
right now, but mostly it boils down to :
  - as the stack grow down, you can mask the stack pointer at 
function entry to get it aligned.
  - If both caller and callee both need alignment, callee can 
call/jump over the masking instructions directly into the meat of 
the callee.



More information about the Digitalmars-d mailing list