push and pop: How RSP Changes
push raxis equivalent to:
sub rsp, 8 ; make room (stack grows down)
mov [rsp], rax ; store value at new top
pop raxis equivalent to:
mov rax, [rsp] ; read value from top
add rsp, 8 ; release the slot
- Each slot on a 64-bit stack is 8 bytes.
pushdecrementsRSP;popincrements it.