Is there a Divide By Zero exception ?

This topic contains 1 reply, has 1 voice, and was last updated by  ChrisImgtec 3 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31564

    ChrisImgtec
    Moderator

    For floating-point unit, there IS a divide-by-zero exception. For integer unit, there is no special “Divide By Zero” exception. Instead, the “div” instruction, which is an assembly macro, checks the operands for a divide by zero condition, and if there is one, uses a trap instruction to set the exception code to 7. The trap causes the CPU to enter exception mode.

    arithmetic

    #38254

    ChrisImgtec
    Moderator

    Imagination MIPS Support

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.