aboutsummaryrefslogtreecommitdiff
path: root/src/m-st-ext.adoc
diff options
context:
space:
mode:
authorHugues de Lassus <huguesdelassus@gmail.com>2023-09-12 02:53:27 -0700
committerGitHub <noreply@github.com>2023-09-12 02:53:27 -0700
commit38b04abd407709873b0bf2298405b92430e4076f (patch)
tree5de86793242e9fe285a9a0e33a73610807b8676c /src/m-st-ext.adoc
parentd5bf62100abb50f98cb97d9fe0fa3bf1795c4c6e (diff)
downloadriscv-isa-manual-38b04abd407709873b0bf2298405b92430e4076f.zip
riscv-isa-manual-38b04abd407709873b0bf2298405b92430e4076f.tar.gz
riscv-isa-manual-38b04abd407709873b0bf2298405b92430e4076f.tar.bz2
Clarify REM wording (#1123)
* Clarify REM wording * Simplify: overflow happens only for signed division
Diffstat (limited to 'src/m-st-ext.adoc')
-rw-r--r--src/m-st-ext.adoc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/m-st-ext.adoc b/src/m-st-ext.adoc
index c36ea65..94bbd4b 100644
--- a/src/m-st-ext.adoc
+++ b/src/m-st-ext.adoc
@@ -61,11 +61,12 @@ include::images/wavedrom/division-op.adoc[]
DIV and DIVU perform an XLEN bits by XLEN bits signed and unsigned
integer division of _rs1_ by _rs2_, rounding towards zero. REM and REMU
provide the remainder of the corresponding division operation. For REM,
-the sign of the result equals the sign of the dividend.
+the sign of a nonzero result equals the sign of the dividend.
[NOTE]
====
-For both signed and unsigned division, it holds that
+For both signed and unsigned division, except in the case of overflow, it holds
+that
latexmath:[$\textrm{dividend} = \textrm{divisor} \times \textrm{quotient} + \textrm{remainder}$].
====