GCC's assembly output of an empty program on x86, win32

前端 未结 5 395
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-29 20:50

I write empty programs to annoy the hell out of stackoverflow coders, NOT. I am just exploring the gnu toolchain.

Now the following might be too deep for me, but to cont

5条回答
  •  太阳男子
    2021-01-29 21:21

    Regarding that andl $-16,%esp

    • 32 bits: -16 in decimal equals to 0xfffffff0 in hexadecimal representation
    • 64 bits: -16 in decimal equals to 0xfffffffffffffff0 in hexadecimal representation

    So it will mask off the last 4 bits of ESP (btw: 2**4 equals to 16) and will retain all other bits (no matter if the target system is 32 or 64 bits).

提交回复
热议问题