flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
idle
Code: movaps [esp] ;if destination aligned movups [esp] ;if destination !aligned |
|||
![]() |
|
ctl3d32
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 |
|||
![]() |
|
revolution
ctl3d32 wrote: I can't do this: Also you need to use addr lij Code: stdcall setMatrixElem,[l],[i],[j],addr lij |
|||
![]() |
|
ctl3d32
Can i make local variables aligned 16 like in .data or .bss section?
Thanks |
|||
![]() |
|
edfed
yes, you can.
with align16 directive. remember that every instructions and directives are designed to be alone, then, they can be inserted anywhere. |
|||
![]() |
|
revolution
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. |
|||
![]() |
|
rugxulo
fxsave / fxrstor ??
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.