Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push and Pop on AMD64 [duplicate]

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.

like image 943
Elgoog Avatar asked Feb 19 '11 10:02

Elgoog


1 Answers

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.

like image 62
Frédéric Hamidi Avatar answered Dec 01 '22 17:12

Frédéric Hamidi