flat assembler
Message board for the users of flat assembler.
Index
> Main > ccall with 64bit? |
Author |
|
typedef 06 Dec 2011, 09:07
I haven't done any 64bit stuff before but have you tried looking at the stack in OllyDbg.
I just found something interesting though: Quote:
source: http://eli.thegreenplace.net/2011/09/06/stack-frame-layout-on-x86-64/ |
|||
06 Dec 2011, 09:07 |
|
typedef 06 Dec 2011, 09:15
Here's another important read too. I recommend you start with it.
http://msdn.microsoft.com/en-us/magazine/cc301708.aspx I didn't know the IA-64 has 128 general purpose registers, lol |
|||
06 Dec 2011, 09:15 |
|
MattDiesel 06 Dec 2011, 09:28
Ok, so I think the conclusion is that ccall is possibly not as much a good way to do it...
I have been looking at the disassembly from simple C code to try and figure it out, and I reached a similar conclusion to you first post: that registers are used, along a similar sort of theory to fastcall. Thanks for the links. Will probably mean I rewrite all my procedures to use different registers so that they don't have to change them... |
|||
06 Dec 2011, 09:28 |
|
randall 06 Dec 2011, 09:54
I highly recommend this paper http://agner.org/optimize/calling_conventions.pdf
There is everything you need to know about calling convention on any compiler and any OS. |
|||
06 Dec 2011, 09:54 |
|
MattDiesel 06 Dec 2011, 10:16
Thanks randall. Makes for some nice bed time reading
From first readings, I am particularly interested in the idea of shadow space on windows, and the red zone in linux. I think the main problem is that I was hoping by linking to libc I'd be able to write good cross-platform asm. There seems to be many differences between windows and linux for 64 bit calls. Of course it is perfectly possible for me to come up with my own calling convention |
|||
06 Dec 2011, 10:16 |
|
rugxulo 16 Dec 2011, 20:59
Other links that may help too:
http://www.openwatcom.org/index.php/Calling_Conventions http://en.wikipedia.org/wiki/X86_calling_conventions |
|||
16 Dec 2011, 20:59 |
|
goldenspider 17 Dec 2011, 04:26
|
|||
17 Dec 2011, 04:26 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.