(Lgot_result) [S=true]: Only test SIGN and negate for [OP=div].
authorroland <roland>
Tue, 26 Jul 1994 01:20:38 +0000 (01:20 +0000)
committerroland <roland>
Tue, 26 Jul 1994 01:20:38 +0000 (01:20 +0000)
sysdeps/sparc/divrem.m4

index 2f05f8c..3172cfd 100644 (file)
@@ -222,11 +222,12 @@ ifelse(OP, `div',
 ')
 
 Lgot_result:
-ifelse(S, `true',
+ifelse(S, `true', 
+ifelse(OP, `div', dnl Remainder should always be positive, says RMS.
 `      ! check to see if answer should be < 0
        tst     SIGN
        bl,a    1f
        ifelse(OP, `div', `sub %g0, Q, Q', `sub %g0, R, R')
-1:')
+1:'))
        retl
        ifelse(OP, `div', `mov Q, %o0', `mov R, %o0')