What is the difference of idivl and divl?

前端 未结 1 356
忘掉有多难
忘掉有多难 2021-01-21 23:56

I have these expressions:

cltd
idivl   (%ecx)

when dividing by an int, and:

movl    $0, %edx
divl    (%ecx)
         


        
1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-22 00:36

    idiv performs signed division, div performs unsigned division.

    0 讨论(0)
提交回复
热议问题