What does the syntax constant(register) mean?
Question
I'm learning the AT&T syntax for the Intel x86 architecture, and I'm a bit clueless as to the following syntax's meaning:
- Shrb $1, 2(%esp)
- Incw 2(%esp)
My initial interpretation was:
- esp = (esp + 2) >> 1
- esp = esp + 2
I can't find any reference for using increase in this way, which leads me to believe I'm more fundamentally flawed here.
Is my interpretation correct, or am I completely off-base? Thank you for your time.
Solution
Neither. Just as (%esp)
refers to the memory location at %esp
(e.g, treating %esp
as a pointer), 2(%esp)
refers to the memory location at %esp + 2
.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow