是否指定在 x64 上推送堆栈指针时会发生什么?

Is it specified what happens when the stack pointer is pushed on x64?

我正在 x64 上用汇编编程,我打算在堆栈中压入一个地址。我打算写 push %rsp,但是,由于此指令更改了 %rsp 的值,我不确定将推送什么值。

具体来说,如果我 运行 以下内容:

movq [=10=]x10, %rsp
pushq %rsp

内存地址0x8会包含0x10还是0x8?这个处理器是依赖的​​还是所有 x64 处理器的标准?

正如@Raymond Chen 在评论中提到的,在Intel 的手册中有说明,HTML 此处摘录:https://www.felixcloutier.com/x86/push.

推送的值是 %rsp push 指令之前的值。

push mem 相同,具有涉及 RSP 的寻址模式,例如 push 16(%rsp) 复制堆栈中已有的内容。