flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
LocoDelAssembly 06 Apr 2009, 12:55
vid wrote:
mmmh, right, but since those are stdcall functions I can't pre-reserve once and use many, I would have to reserve space every time I call a stdcall function. The second call on the code would be hard to avoid AGI stall (if really exists), unless I waste a second non-volatile register to store that address pre-calculated. Anyway, even if there is no stalls at all with this method I think that still it would be probably slower just because of having that extra "sub esp, args*4" instruction every time I call something. |
|||
![]() |
|
vid 06 Apr 2009, 13:28
oh yeah, right.
|
|||
![]() |
|
Borsuc 04 Dec 2009, 16:10
vid wrote: Your code doesn't exactly reflect way used in funcs with omitted stack frames. You never "push" in such procs. You just reserve enough place on stack for arguments of every function you call, and then you MOVe arguments to stack. So the value of ESP doesn't change over all the procedure. |
|||
![]() |
|
vid 04 Dec 2009, 16:46
Quote: ...making the code even bigger. depends... remember that stdcall is choice of the day, and "add esp, xy" takes space too. Also, size of code doesn't matter to real world problems at all these days. |
|||
![]() |
|
Borsuc 04 Dec 2009, 22:20
pushing the parameters (actually setting them) with "mov" is much bigger than pushing. Not to mention if you push small values (sign-extended) where mov needs all bytes.
Code: push 0 Code: mov qword [rsp+offset], 0 |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.