What is the x86 “ret” instruction equivalent to?

前端 未结 5 1933
独厮守ぢ
独厮守ぢ 2020-12-08 16:27

Say I\'m writing a routine in x86 assembly, like, \"add\" which adds two numbers passed as arguments.

For the most part this is a very simple method:



        
5条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 17:07

    This is possible to make the return_address an array of dwords and let each thread access return_address at an unique index computed by an one to one injective function of it's unique identifier.

    This change makes nrz's accepted answer works also for multithreaded code as well!

提交回复
热议问题