# 2.11BSD#431 - /usr/src/lib/libc/pdp/gen/ldexp.s

##### Functions

    _ldexp            X

##### Variables

    _errno            X

       1: /*
       2:  * Copyright (c) 1987 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  */
       6:
       7: #ifdef LIBC_SCCS
       8:         <@(#)ldexp.s	2.3 (Berkeley) 6/12/88\0>
       9:         .even
      10: #endif LIBC_SCCS
      11:
      12: /*
      13:  * double
      14:  * ldexp (value, exp)
      15:  *	double value;
      16:  *	int exp;
      17:  *
      18:  * Ldexp returns value*2**exp, if that result is in range.
      19:  * If underflow occurs, it returns zero.  If overflow occurs,
      20:  * it returns a value of appropriate sign and largest
      21:  * possible magnitude.  In case of either overflow or underflow,
      22:  * errno is set to ERANGE.  Note that errno is not modified if
      23:  * no error occurs.  Note also that the code assumes that both
      24:  * FIV and FIU are disabled in the floating point processor:
      25:  * FIV disabled prevents a trap from ocurring on floating overflow;
      26:  * FIU disabled cause a floating zero to be generated on floating underflow.
      27:  */
      28:
      29: #include "DEFS.h"
      30:
      31: ERANGE  = 34.                   / can't include <errno.h> because of the
      32: .comm   _errno,2                /   comments on each line ... (sigh)
      33:
      34: .data
      35: huge:   077777; 0177777; 0177777; 0177777
      36: .text
      37:
      38: ENTRY(ldexp)
      39:         movf    2(sp),fr0       / fr0 = value
      40:         cfcc
      41:         beq     2f              / done if zero
      42:         movei   fr0,r0          / r0 = log2(value)
      43:         add     10.(sp),r0      / add exp to log2(value) and stuff result
      44:         movie   r0,fr0          /   back as new exponent for fr0
      45:         cfcc                    / Overflow?
      46:         bvc     2f
      47:         movf    huge,fr0        / yes, fr0 = (value < 0.0) ? -huge : huge;
      48:         bpl     1f
      49:         negf    fr0
      50: 1:
      51:         mov     $ERANGE,_errno  /   and errno = ERANGE
      52: 2:
      53:         rts     pc

#### Defined functions

ERANGE defined in line 31; used 1 times

- in line 51

_ldexp defined in line 38; used 17 times

- in /usr/include/math.h line 9
- in /usr/src/include/math.h line 9
- in /usr/src/lib/libc/pdp/gen/atof.c line 25, 104
- in /usr/src/new/PORT/B/src/bint/b1fun.c line 557, 585, 620-621(2)
- in /usr/src/new/PORT/B/src/bint/b1nuA.c line 53, 72, 87, 145, 155, 240-242(2)
- in /usr/src/new/PORT/B/src/bint/b1num.c line 240
- in /usr/src/usr.lib/libom/exp.c line 46

#### Defined variables

_errno defined in line 32; used 890 times

- in line 51
- in /usr/src/bin/chflags/chflags.c line 184
- in /usr/src/bin/tcsh/ed.inputl.c line 482, 516
- in /usr/src/bin/tcsh/sh.c line 581, 601, 622-625(2), 760, 1540
- in /usr/src/bin/tcsh/sh.lex.c line 1421, 1480, 1598
- in /usr/src/bin/tcsh/sh.proc.c line 213, 281-284(3), 426, 1433, 1446, 1665, 1745, 1767
- in /usr/src/bin/tcsh/tc.func.c line 277, 1176
- in /usr/src/bin/tcsh/tc.os.c line 200, 217, 294, 358, 388, 394, 402, 466, 755, 766, 787, 796
- in /usr/src/games/backgammon/save.c line 63
- in /usr/src/games/hunt/playit.c line 55-61(4), 188, 196
- in /usr/src/games/mille/save.c line 80
- in /usr/src/lib/libc/gen/err.c line 78, 148
- in /usr/src/lib/libc/pdp/sys/_exit.s line 23
- in /usr/src/lib/libc/pdp/sys/ptrace.s line 15
- in /usr/src/lib/libc/pdp/sys/vfork.s line 42
- in /usr/src/new/kermit5.188/ckcfn3.c line 1230-1233(2)
- in /usr/src/new/kermit5.188/ckcnet.c line 48, 378, 392, 425-427(3), 433, 489-491(2), 522-524(2), 553-558(2), 568-579(5)
- in /usr/src/new/kermit5.188/ckucmd.c line 1613
- in /usr/src/new/kermit5.188/ckucon.c line 1017
- in /usr/src/new/kermit5.188/ckufio.c line 672, 807, 817, 823, 920, 989, 1073, 1697-1701(2)
- in /usr/src/new/kermit5.188/ckustr.c line 132-135(2), 143
- in /usr/src/new/kermit5.188/ckutio.c line 1224-1226(2), 1250, 1724, 1743-1747(2), 1755, 1769, 1883-1886(2), 2173, 2179, 2378-2379(2), 2418-2419(2), 2435-2439(3), 2449, 3527, 3533, 3571, 4340, 4410, 4535-4537(2), 4665, 4704, 5543, 5569, 5580, 5608-5610(2), 6084
- in /usr/src/new/kermit5.188/ckuus7.c line 2083
- in /usr/src/new/nntp/xmit/get_tcp_conn.c line 311-316(3)
- in /usr/src/old/shortc/shortc.c line 109
- in /usr/src/sbin/dcheck/dcheck.c line 279-283(2), 296-300(2)
- in /usr/src/sbin/routed/main.c line 161
- in /usr/src/sbin/routed/tables.c line 159
- in /usr/src/sys/autoconfig/rlauto.c line 21
- in /usr/src/sys/netinet/in_pcb.c line 287, 311, 324
- in /usr/src/sys/netinet/tcp_subr.c line 202-204(2), 214
- in /usr/src/sys/netinet/udp_usrreq.c line 164-169(3)
- in /usr/src/sys/netns/idp_usrreq.c line 96-98(2), 111
- in /usr/src/sys/netns/ns_pcb.c line 234-237(2), 250-251(2)
- in /usr/src/sys/netns/spp_usrreq.c line 1512-1514(2), 1529
- in /usr/src/sys/pdpstand/maketape.c line 65
- in /usr/src/sys/sys/uipc_socket.c line 319(2)
- in /usr/src/sys/sys/uipc_usrreq.c line 466-472(3)
- in /usr/src/ucb/Mail/fio.c line 241
- in /usr/src/ucb/Mail/lex.c line 66, 72, 87, 96
- in /usr/src/ucb/PORT/pascal/pdx/library.c line 347-352(4)
- in /usr/src/ucb/ex/ex_io.c line 239(2), 320, 771-775(2)
- in /usr/src/ucb/ex/ex_subr.c line 149-152(2), 652
- in /usr/src/ucb/ex/ex_temp.c line 58
- in /usr/src/ucb/ex/ex_vget.c line 117
- in /usr/src/ucb/ex/exrecover.c line 762
- in /usr/src/ucb/ftp/ftp.c line 130-134(2), 585, 610, 645, 746(2), 763, 770, 892, 912, 978
- in /usr/src/ucb/ftp/glob.c line 211
- in /usr/src/ucb/ftp/ruserpass.c line 72, 80
- in /usr/src/ucb/more/more.c line 1544
- in /usr/src/ucb/msgs/msgs.c line 230, 283, 298, 306, 379
- in /usr/src/ucb/quota.c line 40-42(2)
- in /usr/src/ucb/rdist/docmd.c line 313, 325, 384, 418, 469-473(2)
- in /usr/src/ucb/rdist/expand.c line 272, 292
- in /usr/src/ucb/rdist/server.c line 281, 316, 429, 632-635(2), 748-749(2), 755, 790, 811, 839, 862, 894, 903, 956-961(2), 986, 1058, 1167, 1189, 1267, 1277, 1299
- in /usr/src/ucb/rlogin.c line 276, 423, 526, 539
- in /usr/src/ucb/rsh.c line 173, 181, 191, 208, 215-218(2), 224-227(2)
- in /usr/src/ucb/sccs.c line 1188-1194(4), 1277, 1301-1302(2), 1468-1473(2)
- in /usr/src/ucb/tail.c line 83
- in /usr/src/ucb/talk/ctl_transact.c line 48, 55, 68
- in /usr/src/ucb/talk/invite.c line 58
- in /usr/src/ucb/talk/io.c line 55, 95-97(2)
- in /usr/src/ucb/talk/look_up.c line 35-39(3)
- in /usr/src/ucb/tcopy.c line 70
- in /usr/src/ucb/telnet.c line 293, 339(2), 791, 860, 876, 896, 2096-2101(2)
- in /usr/src/ucb/tftp/tftp.c line 99, 259
- in /usr/src/ucb/tn3270/tn3270.c line 585, 603, 1212(2)
- in /usr/src/ucb/tset/tset.c line 686(2)
- in /usr/src/ucb/w.c line 377, 393
- in /usr/src/ucb/window/ttoutput.c line 24, 32
- in /usr/src/ucb/window/wwchild.c line 16, 22, 32
- in /usr/src/ucb/window/wwerror.c line 16, 22
- in /usr/src/usr.bin/f77/driver.c line 647-651(2), 657
- in /usr/src/usr.bin/file.c line 89, 124
- in /usr/src/usr.bin/fstat/fstat.c line 325, 435, 448, 461, 479, 516, 537, 696, 711
- in /usr/src/usr.bin/m4/eval.c line 188, 199
- in /usr/src/usr.bin/m4/main.c line 198
- in /usr/src/usr.bin/m4/misc.c line 182, 192
- in /usr/src/usr.bin/printf/printf.c line 361, 367
- in /usr/src/usr.bin/ranlib/misc.c line 93, 101
- in /usr/src/usr.bin/renice/renice.c line 84-85(2)
- in /usr/src/usr.bin/tip/cmds.c line 162
- in /usr/src/usr.bin/tip/tip.c line 522, 530
- in /usr/src/usr.bin/tip/tipout.c line 89, 104
- in /usr/src/usr.bin/uucp/acucntrl.c line 185, 211, 244, 251-261(3), 289, 308, 320-325(2), 352-355(2), 371, 386-389(2), 412, 419, 438, 459, 501, 507, 542, 575, 581, 589, 650-655(2)
- in /usr/src/usr.bin/uucp/aculib/bsdtcp.c line 26, 79-80(2)
- in /usr/src/usr.bin/uucp/aculib/cds224.c line 23
- in /usr/src/usr.bin/uucp/aculib/df12.c line 42
- in /usr/src/usr.bin/uucp/aculib/df2.c line 39-44(2)
- in /usr/src/usr.bin/uucp/aculib/dn.c line 33, 46, 93-96(2)
- in /usr/src/usr.bin/uucp/aculib/hys.c line 49
- in /usr/src/usr.bin/uucp/aculib/hys24.c line 41
- in /usr/src/usr.bin/uucp/aculib/mic.c line 17
- in /usr/src/usr.bin/uucp/aculib/nov.c line 24
- in /usr/src/usr.bin/uucp/aculib/pen.c line 35-37(2)
- in /usr/src/usr.bin/uucp/aculib/rvmacs.c line 144
- in /usr/src/usr.bin/uucp/aculib/sy.c line 21
- in /usr/src/usr.bin/uucp/aculib/unet.c line 41
- in /usr/src/usr.bin/uucp/aculib/va212.c line 15, 36-39(2)
- in /usr/src/usr.bin/uucp/aculib/va811.c line 53-57(2)
- in /usr/src/usr.bin/uucp/aculib/va820.c line 53, 70, 139
- in /usr/src/usr.bin/uucp/aculib/vad.c line 22
- in /usr/src/usr.bin/uucp/aculib/vent.c line 32-34(2)
- in /usr/src/usr.bin/uucp/aculib/vmacs.c line 139
- in /usr/src/usr.bin/uucp/cico.c line 783, 854, 864
- in /usr/src/usr.bin/uucp/cntrl.c line 679-681(2)
- in /usr/src/usr.bin/uucp/condevs.c line 202, 229-231(2), 436-444(3), 452-459(3), 465
- in /usr/src/usr.bin/uucp/conn.c line 273, 809
- in /usr/src/usr.bin/uucp/pk1.c line 295, 312, 422
- in /usr/src/usr.bin/uucp/ulockf.c line 33, 59-67(3), 118, 126, 133
- in /usr/src/usr.bin/uucp/uucpd.c line 54, 103, 129
- in /usr/src/usr.bin/whereis/whereis.c line 86-88(2)
- in /usr/src/usr.bin/xargs/xargs.c line 133, 169, 281-285(2), 291
- in /usr/src/usr.bin/xinstall/xinstall.c line 141, 179, 207-211(2), 224-229(2), 240, 247, 266, 272, 291-296(3)
- in /usr/src/usr.lib/libF77/signal_.c line 44
- in /usr/src/usr.lib/libI77/close.c line 84-86(2)
- in /usr/src/usr.lib/libI77/dofio.c line 160
- in /usr/src/usr.lib/libI77/douio.c line 71
- in /usr/src/usr.lib/libI77/due.c line 23, 33
- in /usr/src/usr.lib/libI77/f77_abort.c line 61-66(3)
- in /usr/src/usr.lib/libI77/fio.h line 16
- in /usr/src/usr.lib/libI77/lread.c line 64, 134
- in /usr/src/usr.lib/libI77/lwrite.c line 31
- in /usr/src/usr.lib/libI77/open.c line 94-101(3), 107, 117
- in /usr/src/usr.lib/libI77/rdfe.c line 25, 58
- in /usr/src/usr.lib/libI77/rdfmt.c line 48-53(2), 90, 98, 114, 136, 156-158(2), 194, 204, 226, 251, 259
- in /usr/src/usr.lib/libI77/rsfe.c line 26
- in /usr/src/usr.lib/libI77/rsnmle.c line 75
- in /usr/src/usr.lib/libI77/sue.c line 25, 33, 41
- in /usr/src/usr.lib/libI77/util.c line 34
- in /usr/src/usr.lib/libI77/wdfe.c line 26
- in /usr/src/usr.lib/libI77/wrtfmt.c line 50, 83, 91
- in /usr/src/usr.lib/libI77/wsfe.c line 27
- in /usr/src/usr.lib/libI77/wsnmle.c line 38
- in /usr/src/usr.lib/libU77/access_.c line 36-41(3), 57
- in /usr/src/usr.lib/libU77/chdir_.c line 33-36(2)
- in /usr/src/usr.lib/libU77/chmod_.c line 32-42(4)
- in /usr/src/usr.lib/libU77/fgetc_.c line 32-42(4)
- in /usr/src/usr.lib/libU77/fork_.c line 33
- in /usr/src/usr.lib/libU77/fputc_.c line 32-41(4)
- in /usr/src/usr.lib/libU77/fseek_.c line 33-39(4)
- in /usr/src/usr.lib/libU77/fstat_.c line 32-34(2), 51
- in /usr/src/usr.lib/libU77/ftell_.c line 31-33(2)
- in /usr/src/usr.lib/libU77/gerror_.c line 33-36(4)
- in /usr/src/usr.lib/libU77/getc_.c line 33-40(3)
- in /usr/src/usr.lib/libU77/getcwd_.c line 41
- in /usr/src/usr.lib/libU77/hostnm_.c line 38
- in /usr/src/usr.lib/libU77/ierrno_.c line 22
- in /usr/src/usr.lib/libU77/kill_.c line 26-28(2)
- in /usr/src/usr.lib/libU77/link_.c line 34-40(3)
- in /usr/src/usr.lib/libU77/lstat_.c line 34, 52
- in /usr/src/usr.lib/libU77/perror_.c line 35-38(4)
- in /usr/src/usr.lib/libU77/putc_.c line 33-39(3)
- in /usr/src/usr.lib/libU77/rename_.c line 35-41(3)
- in /usr/src/usr.lib/libU77/stat_.c line 33, 51
- in /usr/src/usr.lib/libU77/symlnk_.c line 35-41(3)
- in /usr/src/usr.lib/libU77/system_.c line 35
- in /usr/src/usr.lib/libU77/tapeio.c line 77, 86, 121, 154, 160-164(2), 207, 213-217(2), 255, 261, 285, 297, 323, 329-333(2), 340, 369, 402, 408
- in /usr/src/usr.lib/libU77/test/serrno_.c line 4
- in /usr/src/usr.lib/libU77/unlink_.c line 34-37(2)
- in /usr/src/usr.lib/libU77/wait_.c line 30
- in /usr/src/usr.lib/libident/id_open.c line 107-109(2), 141, 155-158(2)
- in /usr/src/usr.lib/libident/id_parse.c line 53, 86, 102
- in /usr/src/usr.lib/libident/id_query.c line 69
- in /usr/src/usr.lib/libident/ident-tester.c line 78-80(2), 87, 100-105(3), 112, 136-143(3), 153-156(2), 169-172(2), 186-189(2), 199-202(2)
- in /usr/src/usr.lib/libident/ident.c line 74
- in /usr/src/usr.lib/libom/asin.c line 28, 45
- in /usr/src/usr.lib/libom/exp.c line 37
- in /usr/src/usr.lib/libom/gamma.c line 94
- in /usr/src/usr.lib/libom/j0.c line 156-158(2)
- in /usr/src/usr.lib/libom/j1.c line 161-164(2)
- in /usr/src/usr.lib/libom/jn.c line 90
- in /usr/src/usr.lib/libom/log.c line 36
- in /usr/src/usr.lib/libom/pow.c line 39
- in /usr/src/usr.lib/libom/sqrt.c line 25
- in /usr/src/usr.lib/libom/tan.c line 67
- in /usr/src/usr.lib/libvmf/vmf.c line 65
- in /usr/src/usr.sbin/accton/accton.c line 66, 181
- in /usr/src/usr.sbin/arp/arp.c line 186, 237
- in /usr/src/usr.sbin/cron/crontab.c line 232, 255, 288
- in /usr/src/usr.sbin/cron/misc.c line 184, 208, 258, 265
- in /usr/src/usr.sbin/cron/popen.c line 166
- in /usr/src/usr.sbin/edquota/edquota.c line 176, 199, 207, 318-324(3)
- in /usr/src/usr.sbin/htable/htable.c line 324-328(2), 353-357(2)
- in /usr/src/usr.sbin/inetd/inetd.c line 318, 335, 613, 631, 986
- in /usr/src/usr.sbin/lpr/cmds.c line 80, 368, 444, 756
- in /usr/src/usr.sbin/lpr/common.c line 102-109(4)
- in /usr/src/usr.sbin/lpr/lpd.c line 105, 128, 189, 201
- in /usr/src/usr.sbin/lpr/printjob.c line 102, 1124
- in /usr/src/usr.sbin/lpr/rmjob.c line 115
- in /usr/src/usr.sbin/lpr/startdaemon.c line 32-34(2), 89
- in /usr/src/usr.sbin/named/named/ns_forw.c line 136, 429
- in /usr/src/usr.sbin/named/named/ns_main.c line 646, 666, 698, 714, 777, 840
- in /usr/src/usr.sbin/named/named/ns_maint.c line 130, 169, 205, 234, 333, 355
- in /usr/src/usr.sbin/named/named/ns_req.c line 563, 589, 610
- in /usr/src/usr.sbin/named/named/ns_resp.c line 640, 1050, 1208
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 260
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 157, 170, 189, 209, 247, 279, 510, 517-521(3)
- in /usr/src/usr.sbin/ntp/ntpd.c line 402
- in /usr/src/usr.sbin/ntp/ntpdc.c line 213
- in /usr/src/usr.sbin/repquota/repquota.c line 153, 165
- in /usr/src/usr.sbin/rmt/rmt.c line 60, 156
- in /usr/src/usr.sbin/sendmail.MX/aux/bbn_daemon.c line 86-88(2)
- in /usr/src/usr.sbin/sendmail.MX/src/alias.c line 194, 246, 330, 337, 347
- in /usr/src/usr.sbin/sendmail.MX/src/collect.c line 244
- in /usr/src/usr.sbin/sendmail.MX/src/conf.c line 262, 269
- in /usr/src/usr.sbin/sendmail.MX/src/daemon.c line 170-173(2), 311, 337, 381, 397-401(2)
- in /usr/src/usr.sbin/sendmail.MX/src/deliver.c line 80, 479, 741, 797, 809, 931-932(4), 1012-1016(2), 1071, 1205-1210(2), 1266
- in /usr/src/usr.sbin/sendmail.MX/src/err.c line 55, 80, 105-110(2), 137, 164, 313-314(2), 329-333(2), 365
- in /usr/src/usr.sbin/sendmail.MX/src/extract.c line 99-103(3), 113-117(3)
- in /usr/src/usr.sbin/sendmail.MX/src/main.c line 146, 238, 694, 882, 933, 1046, 1055
- in /usr/src/usr.sbin/sendmail.MX/src/parseaddr.c line 269-272(2)
- in /usr/src/usr.sbin/sendmail.MX/src/queue.c line 241, 439-441(2), 660, 771, 832, 844, 966
- in /usr/src/usr.sbin/sendmail.MX/src/recipient.c line 164
- in /usr/src/usr.sbin/sendmail.MX/src/savemail.c line 488, 526
- in /usr/src/usr.sbin/sendmail.MX/src/srvrsmtp.c line 574
- in /usr/src/usr.sbin/sendmail.MX/src/stats.c line 80
- in /usr/src/usr.sbin/sendmail.MX/src/usersmtp.c line 103, 111, 122, 408-412(3)
- in /usr/src/usr.sbin/sendmail.MX/src/util.c line 416, 473-480(4), 581, 622, 634-636(2), 805-807(2)
- in /usr/src/usr.sbin/sendmail/aux/4.1a_daemon.c line 222, 232, 347
- in /usr/src/usr.sbin/sendmail/aux/bbn_daemon.c line 86-88(2)
- in /usr/src/usr.sbin/sendmail/src/alias.c line 191, 243, 328, 336, 346
- in /usr/src/usr.sbin/sendmail/src/collect.c line 238
- in /usr/src/usr.sbin/sendmail/src/conf.c line 262, 269
- in /usr/src/usr.sbin/sendmail/src/daemon.c line 170-173(2), 311, 337, 381, 397-401(2)
- in /usr/src/usr.sbin/sendmail/src/deliver.c line 66, 421, 683, 731, 743, 870-874(5), 954-958(2), 1016, 1150-1155(2), 1211, 1316
- in /usr/src/usr.sbin/sendmail/src/err.c line 46, 71, 96-101(2), 128, 155, 304-305(2), 320-324(2), 356
- in /usr/src/usr.sbin/sendmail/src/extract.c line 99-103(3), 113-117(3)
- in /usr/src/usr.sbin/sendmail/src/main.c line 141, 233, 698, 886, 937, 1050, 1059
- in /usr/src/usr.sbin/sendmail/src/parseaddr.c line 263-266(2)
- in /usr/src/usr.sbin/sendmail/src/queue.c line 230, 426-428(2), 647, 758, 819, 831, 953, 972
- in /usr/src/usr.sbin/sendmail/src/recipient.c line 171
- in /usr/src/usr.sbin/sendmail/src/savemail.c line 482, 520
- in /usr/src/usr.sbin/sendmail/src/srvrsmtp.c line 565
- in /usr/src/usr.sbin/sendmail/src/stats.c line 74
- in /usr/src/usr.sbin/sendmail/src/usersmtp.c line 99, 107, 118, 404-408(3)
- in /usr/src/usr.sbin/sendmail/src/util.c line 416, 473-480(4), 581, 622, 634-636(2), 805-807(2)
- in /usr/src/usr.sbin/syslogd/syslogd.c line 248, 257, 275, 297, 305, 314, 327, 338, 566-569(2), 591, 604, 776-780(3), 1022
- in /usr/src/usr.sbin/timed/cmds.c line 347(2)
- in /usr/src/usr.sbin/timed/timed.c line 194
- in /usr/src/usr.sbin/vipw/vipw.c line 62-66(2), 72, 81-86(2), 248

huge defined in line 35; used 1 times

- in line 47

Last modified: 1988-07-04 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1813 |