|
|
1.1 ! root 1: /* Kfrexpf.s 1.3 86/01/05 */ ! 2: ! 3: #include "../tahoe/SYS.h" ! 4: ! 5: .text ! 6: ENTRY(Kfrexpf, 0) ! 7: subl3 $60,fp,sp ! 8: clrl -60(fp) # j=0; ! 9: clrl -56(fp) # neg=0; ! 10: tstl 4(fp) # if(x<0){ ! 11: jgeq 1f ! 12: lnd 4(fp) ! 13: std 4(fp) # x = -x; ! 14: movl $1,-56(fp) # neg=1;} ! 15: 1: ! 16: cmpd2 4(fp),one # if (x>1){ ! 17: jleq 1f ! 18: 2: ! 19: cmpd2 4(fp),one # while(x>1){ ! 20: jleq 3f ! 21: addl2 $1,-60(fp) # j=j+1; ! 22: pushl 16(fp) # hfs ! 23: ldd two ! 24: pushd ! 25: ldd 4(fp) ! 26: pushd ! 27: callf $24,_Kdivd ! 28: ldd r0 ! 29: std 4(fp) # x= x/2; ! 30: jbr 2b ! 31: 1: ! 32: cmpd2 4(fp),half # if(x<0.5){ ! 33: jlss 2f ! 34: jbr 3f ! 35: 0: ! 36: subl2 $1,-60(fp) # j = j-1; ! 37: pushl 16(fp) # hfs ! 38: ldd 4(fp) ! 39: pushd ! 40: ldd two ! 41: pushd ! 42: callf $24,_Kmuld ! 43: ldd r0 ! 44: std 4(fp) # x = 2*x; ! 45: 2: ! 46: cmpd2 4(fp),half # while (x<0.5){ ! 47: jlss 0b ! 48: 3: ! 49: movl -60(fp),*12(fp) # *i=j; ! 50: tstl -56(fp) # if (neg) ! 51: jeql 1f ! 52: lnd 4(fp) ! 53: std 4(fp) ! 54: 1: ! 55: ldd 4(fp) ! 56: cvdf ! 57: stf r0 ! 58: ret ! 59: ! 60: .data ! 61: .align 2 ! 62: one: .long 0x40800000, 0x00000000 # .double 1 ! 63: two: .long 0x41000000, 0x00000000 # .double 2 ! 64: half: .long 0x40000000, 0x00000000 # .double .5
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.