fixup commit for branch 'unlabeled-2.1.1'
authorcvs2hg <none@none>
Thu, 7 Feb 1985 22:06:33 +0000 (22:06 +0000)
committercvs2hg <none@none>
Thu, 7 Feb 1985 22:06:33 +0000 (22:06 +0000)
--HG--
branch : unlabeled-2.1.1

mach/m68k4/libem/dvi.s [new file with mode: 0644]

diff --git a/mach/m68k4/libem/dvi.s b/mach/m68k4/libem/dvi.s
new file mode 100644 (file)
index 0000000..fc74fb4
--- /dev/null
@@ -0,0 +1,42 @@
+.define .dvi
+
+ ! signed long divide
+       .text
+.dvi:
+       movem.l d0/d4,.savdvi
+       move.l  (sp)+,.retdvi
+       move.l  (sp)+,d0
+       move.l  (sp)+,d1
+       clr.l   d4
+       tst.l   d0      ! divisor
+       bpl     1f
+       neg.l   d0
+       not     d4
+1:
+       tst.l   d1      ! dividend
+       bpl     2f
+       neg.l   d1
+       not     d4
+       swap    d4
+       not     d4
+       swap    d4
+2:
+       move.l  d1,-(sp)
+       move.l  d0,-(sp)
+       jsr     .dvu
+       tst     d4
+       beq     5f
+       neg.l   d1      ! quotient
+5:
+       tst.l   d4
+       bpl     6f
+       neg.l   d2      ! remainder
+6:
+       movem.l .savdvi,d0/d4
+       move.l  .retdvi,-(sp)
+       rts
+.data
+.savdvi:       .space 12
+.retdvi:       .long 0
+.text
+.align 2