flat assembler
Message board for the users of flat assembler.
Index
> Main > [Help] - Saving xmm register |
Author |
|
idle 10 Jan 2011, 07:15
Code: movaps [esp] ;if destination aligned movups [esp] ;if destination !aligned |
|||
10 Jan 2011, 07:15 |
|
ctl3d32 10 Jan 2011, 13:41
I can't do this:
Code: proc LUsolve a,l,u locals lij dq ? i dd ? j dd ? endl mov [i],1 mov [j],1 stdcall getLij,[a],[l],[u],[i],[j] movsd [lij],xmm0 stdcall setMatrixElem,[l],[i],[j],lij endp Only works if lij is declared at .bss or .data section. Code: proc LUsolve a,l,u locals i dd ? j dd ? endl mov [i],1 mov [j],1 stdcall getLij,[a],[l],[u],[i],[j] movsd [lij],xmm0 stdcall setMatrixElem,[l],[i],[j],lij endp section '.bss' ... align 16 lij dq ? Why? Thanks |
|||
10 Jan 2011, 13:41 |
|
revolution 12 Jan 2011, 08:13
ctl3d32 wrote: I can't do this: Also you need to use addr lij Code: stdcall setMatrixElem,[l],[i],[j],addr lij |
|||
12 Jan 2011, 08:13 |
|
ctl3d32 12 Jan 2011, 11:59
Can i make local variables aligned 16 like in .data or .bss section?
Thanks |
|||
12 Jan 2011, 11:59 |
|
edfed 12 Jan 2011, 12:27
yes, you can.
with align16 directive. remember that every instructions and directives are designed to be alone, then, they can be inserted anywhere. |
|||
12 Jan 2011, 12:27 |
|
revolution 12 Jan 2011, 13:31
ctl3d32 wrote: Can i make local variables aligned 16 like in .data or .bss section? Long answer: Yes, but ... it requires extra either 1) extra code at function entry to force stack alignment at runtime, or 2) your whole application must be made stack alignment compliant everywhere. |
|||
12 Jan 2011, 13:31 |
|
rugxulo 19 Jan 2011, 22:36
fxsave / fxrstor ??
|
|||
19 Jan 2011, 22:36 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.