NO

Author Topic: Align 16 for use with SIMD instructions doesn't work  (Read 4063 times)

Offline jj2007

  • Member
  • *
  • Posts: 536
Align 16 for use with SIMD instructions doesn't work
« on: June 21, 2015, 12:14:34 PM »
Any ideas why this doesn't work as expected?

Code: [Select]
__declspec(align(16)) byte xms[512];

void XmmPrint(int index) {
  RECT rc;
//   __m128 xms[32]; // same problem
  __asm int 3;
  __asm lea eax, xms; // eax is 004090E4, clearly unaligned...
  __asm fxsave xms;

P.S.:
Perhaps I can do something about __declspec(align()) for variables later. It suspect it will take much more than "5 minutes", so not top priority at the moment...

P.P.S.: The locally defined version works: __declspec(align(16)) byte xms[512];
« Last Edit: June 21, 2015, 12:36:03 PM by jj2007 »