--- cci/sys/tahoe/Kdivd.x 2019/07/28 12:24:19 1.1 +++ cci/sys/tahoe/Kdivd.x 2019/07/28 12:30:06 1.1.1.2 @@ -15,7 +15,7 @@ _Kdivd: .word 0xffc movl $1,r3 1: movl 12(fp),r2 jgeq 2f - bbc $0,r3,1f # seconed operand is negative. + bbc $0,r3,1f # second operand is negative. clrl r3 # if first was negative, make result positive. jmp 2f 1: movl $1,r3 # if first was positive, make result negative. @@ -23,7 +23,7 @@ _Kdivd: .word 0xffc jeql retz shrl $EXPSHIFT,r0,r0 subl2 $BIAS,r0 - andl2 $EXPMASK,r2 # compute seconed 'pure'exponent. + andl2 $EXPMASK,r2 # compute second 'pure'exponent. jeql retz2 shrl $EXPSHIFT,r2,r2 subl2 $BIAS,r2 @@ -70,7 +70,7 @@ _Kdivd: .word 0xffc jneq 2b over: - pushl 20(fp) + pushal 20(fp) callf $8,Kfnorm sign: 1: bbc $0,r3,done @@ -88,7 +88,11 @@ retz2: bbc $31,12(fp),z_div ret underf: orl2 $HFS_UNDF,*20(fp) + movl $0x800000,r0 + bbc $0,r3,1f + orl2 $SIGNBIT,r0 +1: clrl r1 ret z_div: orl2 $HFS_DIVZ,*20(fp) - ret + jmp retz