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:

  1. Shrb $1, 2(%esp)
  2. Incw 2(%esp)

My initial interpretation was:

  1. esp = (esp + 2) >> 1
  2. 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.

Was it helpful?

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
scroll top