SSE, Inline assembler, Structs, ...

Sascha Katzner sorry.no at spam.invalid
Tue Apr 1 06:32:28 PDT 2008


Audun Wilhelmsen wrote:
> Also, this confuses me:
> 	Vec4 v1 = Vec4(1,2,3,4);
> //	Vec4* p = &v1;
> 	asm {
> 		movaps XMM1, v1[EBP]; 
> 	}
> 
> if I remove the comment, the program crashes.

It seems that this is an data alignment problem, IIRC the "a" in movAps 
stands for "align" that means the command expects aligned data. You can 
use movups (unaligned), but that is not as fast. Or you can align your data.

LLAP,
Sascha


More information about the Digitalmars-d-learn mailing list