summaryrefslogtreecommitdiffstats
path: root/lib/libc/alpha/gen
diff options
context:
space:
mode:
authorpeadar <peadar@FreeBSD.org>2004-11-27 20:59:49 +0000
committerpeadar <peadar@FreeBSD.org>2004-11-27 20:59:49 +0000
commita14ee64402891d9c36e916ce17b01895b7ca2794 (patch)
tree416b354508ab66becdd056293e6ccdfa5bd72835 /lib/libc/alpha/gen
parent574523a3a9e33d4971e5de7e23b6e7650977438c (diff)
downloadFreeBSD-src-a14ee64402891d9c36e916ce17b01895b7ca2794.zip
FreeBSD-src-a14ee64402891d9c36e916ce17b01895b7ca2794.tar.gz
When required to negate the absoulte result of a division/remainder
operation (by subtracting the absolute result from 0), don't test for overflow. This avoids an arithmetic exception when dividing LONG_MIN by 1: This is the only case that causes overflow, and the resulting value is correct under 2's compliment arithmetic. PR: 72024 Approved by: dwmalone@ Obtained from: NetBSD MFC after: 4 days
Diffstat (limited to 'lib/libc/alpha/gen')
-rw-r--r--lib/libc/alpha/gen/divrem.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/alpha/gen/divrem.m4 b/lib/libc/alpha/gen/divrem.m4
index 10406a6..6afa2e1 100644
--- a/lib/libc/alpha/gen/divrem.m4
+++ b/lib/libc/alpha/gen/divrem.m4
@@ -172,7 +172,7 @@ ifelse(OP, `div',
ifelse(S, `true',
`
/* Check to see if we should negate it. */
- subqv zero, RESULT, T_0
+ subq zero, RESULT, T_0
cmovlbs NEG, T_0, RESULT
')
OpenPOWER on IntegriCloud