flat assembler
Message board for the users of flat assembler.
Index
> Linux > Trying to pass a structure to registry via stack; linux, x64 |
Author |
|
ProMiNick 13 Oct 2017, 13:23
In AMD64 mode there is no 16 bit push.
Why not just: mov rdi,1+2 shl 16 + 3 shl 32? with pushes it will be: push 3 push 1+2 shl 16 mov rdi,rsp |
|||
13 Oct 2017, 13:23 |
|
Tomasz Grysztar 13 Oct 2017, 14:01
ProMiNick wrote: In AMD64 mode there is no 16 bit push. You can still get fasm to generate the 16-bit variants in long mode with the PUSHW mnemonic. That said, I would not recommend even trying this route. Probably only the earliest CPUs implementing x86-64 architecture really supported this. ___ * I just opened the original x86-64 manuals to look for this just to make sure that I have no false memory of it. I'm attaching the excerpt I found - the PUSH instruction is listed earlier in the table, but the note below the table is what I wanted to show. This may be one of the first time I opened these paper manuals in ages, the last time I was really reading them was back in 2004 when working on x86-64 support for fasm.
|
||||||||||
13 Oct 2017, 14:01 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.