Floating Point-The Results Are In!
Ed G.
edgee at cyberpass.net
Fri May 8 14:14:03 AEST 1998
> I'll believe this when you pinpoint the instructions.
Your skepticism spurred me to examine a Unix utility in depth to see
whether my results hold up. They do.
According to my count, tar uses 106 floating point operations. Here
are the first few. The complete list, tar3.txt, is attached as
well for your perusal. If you'd like to look at the complete
disassembled code for tar, let me know.
[root at oskar uv7]# ../dis/disuv7.pl < tar | grep ';17'
file header: 410 37400 4254 27422 20270 0 0 1
read 16128 bytes
prog string is 16128 bytes
0: SETD ;170011
20532: STCFD F0,(R1) ;176011
20562: STF F0,(R1) ;174011
22406: LDF F0,(R4)+ ;172424
22410: STF F0,-(SP) ;174046
22460: LDF F0,(R4)+ ;172424
22462: STF F0,-(SP) ;174046
22620: LDF F0,(R4)+ ;172424
22622: STF F0,-(SP) ;174046
24124: LDF F0,4(R5) ;172465 000004
24130: STF F0,-(SP) ;174046
26616: LDF F0,#56200 ;172427 056200
I chose tar as an example because it is an important utility and
because it is a relatively heavy user of floating point (as guaged
by the number of floating point ops contained in tar).
The following routines in 7th Edition tar appear to use floating
point:
~_filbuf
~_innum
~atof
~cvt
~ecvt
~fcvt
~gcvt
~isatty
~main
~mktemp
The addresses of these routines, as listed in tar's symbol
table--see attached file symlisttar.txt--correspond to those of the
disassembled floating point ops in tar.
I've learned a lot while responding to the criticisms offered by you
and others on this list. Thank you.
Ed
-------------- next part --------------
[root at oskar uv7]# ../dis/disuv7.pl < tar | grep ';17'
file header: 410 37400 4254 27422 20270 0 0 1
read 16128 bytes
prog string is 16128 bytes
0: SETD ;170011
20532: STCFD F0,(R1) ;176011
20562: STF F0,(R1) ;174011
22406: LDF F0,(R4)+ ;172424
22410: STF F0,-(SP) ;174046
22460: LDF F0,(R4)+ ;172424
22462: STF F0,-(SP) ;174046
22620: LDF F0,(R4)+ ;172424
22622: STF F0,-(SP) ;174046
24124: LDF F0,4(R5) ;172465 000004
24130: STF F0,-(SP) ;174046
26616: LDF F0,#56200 ;172427 056200
26622: STF F0,177732(R5) ;174065 177732
26676: CLRF 177762(R5) ;170465 177762
26710: LDF F0,177762(R5) ;172465 177762
26714: CMPF F0,177732(R5) ;173465 177732
26720: CFCC ;170000
26724: LDF F0,#41040 ;172427 041040
26730: MULF F0,177762(R5) ;171065 177762
26742: LDCIF F1,R1 ;177101
26744: ADDF F0,F1 ;172001
26746: STF F0,177762(R5) ;174065 177762
27006: LDF F0,177762(R5) ;172465 177762
27012: CMPF F0,177732(R5) ;173465 177732
27016: CFCC ;170000
27022: LDF F0,#41040 ;172427 041040
27026: MULF F0,177762(R5) ;171065 177762
27040: LDCIF F1,R1 ;177101
27042: ADDF F0,F1 ;172001
27044: STF F0,177762(R5) ;174065 177762
27304: CLRF 177762(R5) ;170465 177762
27314: LDF F0,#40200 ;172427 040200
27320: STF F0,177752(R5) ;174065 177752
27324: LDF F0,#40640 ;172427 040640
27330: STF F0,177742(R5) ;174065 177742
27344: LDF F0,177742(R5) ;172465 177742
27350: MULF F0,F0 ;171000
27352: STF F0,177742(R5) ;174065 177742
27366: LDF F0,177752(R5) ;172465 177752
27372: MULF F0,177742(R5) ;171065 177742
27376: STF F0,177752(R5) ;174065 177752
27422: LDF F0,177762(R5) ;172465 177762
27426: DIVF F0,177752(R5) ;174465 177752
27434: LDF F0,177762(R5) ;172465 177762
27440: MULF F0,177752(R5) ;171065 177752
27444: STF F0,177762(R5) ;174065 177762
27462: LDF F0,177762(R5) ;172465 177762
27466: STF F0,-(SP) ;174046
27500: STF F0,177762(R5) ;174065 177762
27512: NEGF F0 ;170700
27514: STF F0,177762(R5) ;174065 177762
27520: LDF F0,177762(R5) ;172465 177762
32720: LDF F0,4(R5) ;172465 000004
32724: STF F0,-(SP) ;174046
32764: LDF F0,4(R5) ;172465 000004
32770: STF F0,-(SP) ;174046
33060: CLRF F0 ;170400
33062: CMPF F0,4(R5) ;173465 000004
33066: CFCC ;170000
33100: LDF F0,4(R5) ;172465 000004
33104: NEGF F0 ;170700
33106: STF F0,4(R5) ;174065 000004
33120: LDF F0,4(R5) ;172465 000004
33124: STF F0,-(SP) ;174046
33136: STF F0,4(R5) ;174065 000004
33146: CLRF F0 ;170400
33150: CMPF F0,177762(R5) ;173465 177762
33154: CFCC ;170000
33160: CLRF F0 ;170400
33162: CMPF F0,4(R5) ;173465 000004
33166: CFCC ;170000
33202: LDF F0,177762(R5) ;172465 177762
33206: DIVF F0,#41040 ;174427 041040
33212: STF F0,-(SP) ;174046
33224: STF F0,177752(R5) ;174065 177752
33230: ADDF F0,43662 ;172067 010426
33234: MULF F0,#41040 ;171027 041040
33240: STCFI F0,R0 ;175400
33252: CLRF F0 ;170400
33254: CMPF F0,177762(R5) ;173465 177762
33260: CFCC ;170000
33276: LDF F0,177752(R5) ;172465 177752
33302: STF F0,4(R5) ;174065 000004
33310: LDF F0,4(R5) ;172465 000004
33314: MULF F0,#41040 ;171027 041040
33320: STF F0,177752(R5) ;174065 177752
33324: CMPF F0,#40200 ;173427 040200
33330: CFCC ;170000
33414: LDF F0,4(R5) ;172465 000004
33420: MULF F0,#41040 ;171027 041040
33424: STF F0,4(R5) ;174065 000004
33436: LDF F0,4(R5) ;172465 000004
33442: STF F0,-(SP) ;174046
33454: STF F0,4(R5) ;174065 000004
33460: LDF F0,177752(R5) ;172465 177752
33464: STCFI F0,R0 ;175400
33666: LDF F0,4(R5) ;172465 000004
33672: STEXP F0,R0 ;175000
33700: LDEXP F0,R0 ;176400
33702: CFCC ;170000
33710: LDF F0,43672 ;172467 007756
33716: LDF F0,43672 ;172467 007750
33722: NEGF F0 ;170700
34112: LDF F0,4(R5) ;172465 000004
34116: MODF F0,#40200 ;171427 040200
34122: STF F1, at 14(R5) ;174175 000014
[root at oskar uv7]#
-------------- next part --------------
~main~usage~dorep~endtape=003004
~getdir~passtap=003414
~putfile=003566
~doxtrac=005656
~dotable=006776
~putempt=007126
~longt~pmode~select~checkdi=007506
~onintr~onquit~onhup~onterm~tomodes=010132
~checksu=010344
~checkw~respons=010560
~checkup=010750
~done~prefix~getwdir=011302
~lookup~bsrch~cmp~readtap=012704
~writeta=013350
~backtap=013644
~flushta=014044
~copy~freopen=014146
~fseek~rewind~fread~fwrite~system~fopen~scanf~fscanf~sscanf~_doscan=016056
~_innum~_instr~_getccl=021242
~fprintf=021376
~printf~sprintf=021532
~ungetc~_filbuf=022002
~gcvt~_strout=024570
~_flsbuf=025130
~fflush~_cleanu=025702
~fclose~_endope=026072
~create~_findio=026516
~atof~atoi~ctime~localti=027716
~sunday~gmtime~asctime=031220
~dysize~ct_numb=031560
~malloc~free~realloc=032422
~ecvt~fcvt~cvt~isatty~mktemp~stty~gtty~strcat~strcmp~strcpy
More information about the TUHS
mailing list