Push and Pop on AMD64 [duplicate]

2019-01-12 10:22发布

This question already has an answer here:

What is the equivilent of pushl %ecx and popl %ecx on a AMD64 sytem, My results are Error: invalid instruction suffix for 'push' I have had a look and some one suggested changing ecx to rcx but that just resulted in Incorrect register '%rcx' used with 'l' suffix

Thanks for your help.

1条回答
老娘就宠你
2楼-- · 2019-01-12 11:02

On AMD64, push and pop operations are implicitly 64-bits and have no 32-bit counterparts. Try:

pushq %rcx
popq %rcx

See here for details.

查看更多
登录 后发表回答