implement 64-bit arithmetic on a 32-bit machine

前端 未结 3 1367
天命终不由人
天命终不由人 2020-12-29 17:16

The following code computes the product of x and y and stores the result in memory. Data type ll_t is defined to be equivalent to long long.

typedef long lon         


        
3条回答
  •  清歌不尽
    2020-12-29 18:02

    What imul does is multiplies the contents of eax with ecx and saves the lower 32 bits in eax and higher 32 bits in edx.

    addl as far as I remember adds the two registers and saves it on the first one so in this case ebx. (I am not sure if it does anything else and the l after addl stands for long)

提交回复
热议问题