Reputation: 12530
I'm very new to asm,
does this:
sub $0x8, %esp
subtract 8 bits or 8 bytes from the stack pointer?
Upvotes: 2
Views: 3575
Reputation: 1912
Assuming it as IA-32 assembly on gnu tool chain, with at&t syntax,
It subtracts 8 Bytes from the stack pointer...
That means your stack grows 8 Bytes downwards, allowing you to store more 8 Bytes of data there.
Also refer H2CO3's comment. It has the correct perspective that you don't subtract bits or bytes, but just a number and as pointers point to a byte, it points 8 bytes below.
Upvotes: 2