flat assembler
Message board for the users of flat assembler.
Index
> Windows > SSE2 Question |
Author |
|
LocoDelAssembly 28 Feb 2006, 18:28
This one crashes
Code: format PE GUI 4.0 entry start start: mov ecx,plot_double ; get address of movapd xmm0,[ecx] ; get whole xmm0 register mulpd xmm0,xmm0 ; xmm0*xmm0 movapd [ecx],xmm0 ; store result at same address ret plot_double rq 2 ;reserve 2 quad words = 128 bit sse register This not: Code: format PE GUI 4.0 entry start start: mov ecx,plot_double ; get address of movapd xmm0,[ecx] ; get whole xmm0 register mulpd xmm0,xmm0 ; xmm0*xmm0 movapd [ecx],xmm0 ; store result at same address ret align 16 plot_double rq 2 ;reserve 2 quad words = 128 bit sse register I'd never programmed using SSE but there are instructions to load unaligned data, I think. |
|||
28 Feb 2006, 18:28 |
|
Reverend 28 Feb 2006, 21:08
Yes, align the SSE data to 16 and use 'movapd' or otherwise 'movupd' if data not aligned.
|
|||
28 Feb 2006, 21:08 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.