You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
If the first source operand is larger than the second source operand, an overflow will occur. This should produce the same result as division by zero (as specified for DIV and DIVU).
One use case for these instructions is to implement fixed point division, such that:
div s3, s1, s2 ; s3 = 32-bit integer part of division (a / b)
rem s4, s1, s2 ; s4 = division remainder (a % b)
divhi s4, s4, s2 ; s4 = 32-bit fractional part of division (((a % b) << 32) / b)
The text was updated successfully, but these errors were encountered:
The following two instructions would be useful:
(a << 32) / b
, signed(a << 32) / b
, unsignedIf the first source operand is larger than the second source operand, an overflow will occur. This should produce the same result as division by zero (as specified for DIV and DIVU).
One use case for these instructions is to implement fixed point division, such that:
The text was updated successfully, but these errors were encountered: