# 2.11BSD#431 - /usr/ingres/source/gutil/bmove.s

##### Functions

    _bmove            X

       1: /
       2: /  BMOVE -- block move
       3: /
       4: /	This is a highly optimized version of the old C-language
       5: /	bmove routine; it's function (should be) identical.
       6: /	It uses a fancy algorithm to move words instead of bytes
       7: /	whenever possible.
       8: /
       9: /	In C the routine is:
      10: /		char *bmove(a, b, l)
      11: /		char	*a, *b;
      12: /		int	l;
      13: /		{
      14: /			register int	n;
      15: /			register char	*p, *q;
      16: /			p = a;
      17: /			q = b;
      18: /			n = l;
      19: /			while (n--)
      20: /				*q++ = *p++;
      21: /			return (q);
      22: /		}
      23: /
      24: /	Parameters:
      25: /		a [4(sp)] -- source area
      26: /		b [6(sp)] -- target area
      27: /		l [10(sp)] -- byte count
      28: /
      29: /	Returns:
      30: /		Pointer to end of target area.
      31: /
      32: /	History:
      33: /		3/14/79 [rse] -- added odd to odd case
      34: /		2/9/78 [bob] -- converted from "C"
      35: /
      36: /
      37:
      38: .globl  _bmove
      39:
      40: _bmove:
      41:         mov     r2,-(sp)        / save r2
      42:         mov     4(sp),r1        / get src address
      43:         mov     6(sp),r0        / get dst address
      44:
      45:         / determine whether to use word or byte move
      46:         mov     r0,r2           / r2 will reflect the three cases
      47:         bic     $177776,r2      / keep only last bit of dst
      48:         ror     4(sp)           / get least significant bit of src
      49:         adc     r2              / add it in.
      50:         beq     wordm           / both on even boundary
      51:         dec     r2              / check for odd case
      52:         bgt     wordodd         / both on odd boundary
      53:
      54:         mov     10(sp),r2       / get count
      55:         beq     done
      56: bytem:
      57:         movb    (r1)+,(r0)+     / copy next byte
      58:         sob     r2,bytem        / branch until done
      59:         br      done
      60:
      61: wordm:
      62:         mov     10(sp),r2       / get count
      63: wordt:
      64:         beq     done
      65:         asr     r2              / get word count
      66:         bcs     odd             / count was odd
      67: even:
      68:         mov     (r1)+,(r0)+     / copy word
      69:         sob     r2,even         / more to do if non-zero
      70:         br      done
      71:
      72: wordodd:
      73:         mov     10(sp),r2       / get count
      74:         beq     done
      75:         movb    (r1)+,(r0)+     / copy byte
      76:         dec     r2              / dec count
      77:         br      wordt           / now treat as an even word move
      78:
      79: odd:
      80:         beq     odd2            / special case of count = 1
      81: odd1:
      82:         mov     (r1)+,(r0)+     / copy word
      83:         sob     r2,odd1         / continue
      84: odd2:
      85:         movb    (r1)+,(r0)+     / count was odd. do last one
      86:
      87: done:
      88:         mov     (sp)+,r2        / restore r2
      89:         rts     pc              / return

#### Defined functions

_bmove declared in line 38; defined in line 40; used 149 times

- in line 38
- in /usr/ingres/source/access/accbuf.c line 110
- in /usr/ingres/source/access/batch.c line 58-59(2)
- in /usr/ingres/source/access/compare.c line 18-19(2)
- in /usr/ingres/source/access/find.c line 129
- in /usr/ingres/source/access/findbest.c line 108
- in /usr/ingres/source/access/get_tuple.c line 32
- in /usr/ingres/source/access/opencatalog.c line 122
- in /usr/ingres/source/access/put_tuple.c line 34
- in /usr/ingres/source/access/readadmin.c line 144, 150
- in /usr/ingres/source/access/replace.c line 157
- in /usr/ingres/source/access/setkey.c line 80
- in /usr/ingres/source/access/writebatch.c line 29
- in /usr/ingres/source/dbu/convert.c line 40, 137
- in /usr/ingres/source/dbu/copy.c line 421, 429, 435, 442, 459, 491-495(2), 504, 511, 697
- in /usr/ingres/source/dbu/create.c line 252
- in /usr/ingres/source/dbu/destroy.c line 126
- in /usr/ingres/source/dbu/get_p_tid.c line 65-68(2)
- in /usr/ingres/source/dbu/get_seq_atts.c line 80, 105
- in /usr/ingres/source/dbu/help.c line 184, 205-206(2), 215, 264
- in /usr/ingres/source/dbu/index.c line 170-174(2), 188
- in /usr/ingres/source/dbu/ksort.c line 212, 486-487(2)
- in /usr/ingres/source/dbu/main.c line 117
- in /usr/ingres/source/dbu/modify.c line 149, 739, 873, 893, 971-974(2)
- in /usr/ingres/source/dbu/modupdate.c line 90, 101
- in /usr/ingres/source/dbu/pr_prot.c line 218-220(3)
- in /usr/ingres/source/dbu/pr_tree.c line 555
- in /usr/ingres/source/dbu/rdwrbatch.c line 32, 64
- in /usr/ingres/source/dbu/readtree.c line 205, 284-285(2), 424-425(2)
- in /usr/ingres/source/dbu/userdestroy.c line 62-63(2)
- in /usr/ingres/source/decomp/call_ovqp70.c line 358
- in /usr/ingres/source/decomp/makenode.c line 29, 61
- in /usr/ingres/source/decomp/openrs.c line 348
- in /usr/ingres/source/decomp/rnum.c line 34, 86
- in /usr/ingres/source/decomp/tempvar.c line 60
- in /usr/ingres/source/equel/main.c line 259(2)
- in /usr/ingres/source/iutil/cslocks.c line 25, 54
- in /usr/ingres/source/iutil/ingresname.c line 25
- in /usr/ingres/source/iutil/initucode.c line 576, 719
- in /usr/ingres/source/iutil/paramd.c line 49
- in /usr/ingres/source/iutil/pglocks.c line 28-29(2), 54-56(2)
- in /usr/ingres/source/iutil/printup.c line 58, 82
- in /usr/ingres/source/iutil/rllocks.c line 25, 50
- in /usr/ingres/source/ovqp/interp.c line 182-186(2), 526
- in /usr/ingres/source/ovqp/interp1.c line 73, 82, 139, 157-160(2), 167
- in /usr/ingres/source/ovqp/prsym.c line 35
- in /usr/ingres/source/ovqp/scan.c line 160, 201
- in /usr/ingres/source/ovqp/strategy.c line 119, 151-152(2)
- in /usr/ingres/source/ovqp/string.c line 36, 53-54(2)
- in /usr/ingres/source/ovqp/support.c line 150
- in /usr/ingres/source/ovqp/typecheck.c line 115
- in /usr/ingres/source/parser/attfcn.c line 103
- in /usr/ingres/source/parser/call_tree.c line 96
- in /usr/ingres/source/parser/control.c line 237
- in /usr/ingres/source/parser/master.grammar line 247
- in /usr/ingres/source/parser/norml.c line 315
- in /usr/ingres/source/parser/rngfcn.c line 129
- in /usr/ingres/source/parser/tree.c line 84, 145, 174
- in /usr/ingres/source/qrymod/d_integ.c line 159-160(2)
- in /usr/ingres/source/qrymod/define.c line 321-322(2), 359
- in /usr/ingres/source/qrymod/fillprotup.c line 71-76(2), 84, 98
- in /usr/ingres/source/qrymod/range.c line 178-179(2)
- in /usr/ingres/source/qrymod/readtree.c line 184, 298-299(2)
- in /usr/ingres/source/qrymod/util.c line 507
- in /usr/ingres/source/qrymod/writetree.c line 127
- in /usr/ingres/source/scanner/symtab.c line 20
- in /usr/ingres/source/support/creatdb.c line 495-496(2), 1047, 1130
- in /usr/ingres/source/support/ingres.c line 293
- in /usr/ingres/source/support/purge.c line 165
- in /usr/ingres/source/support/restore.c line 200, 219, 235, 241, 276, 356
- in /usr/ingres/source/support/sysmod.c line 163

bytem defined in line 56; used 1 times

- in line 58

done defined in line 87; used 5 times

- in line 55-64(3), 70-74(2)

even defined in line 67; used 1 times

- in line 69

odd defined in line 79; used 1 times

- in line 66

odd1 defined in line 81; used 1 times

- in line 83

odd2 defined in line 84; used 1 times

- in line 80

wordm defined in line 61; used 1 times

- in line 50

wordodd defined in line 72; used 1 times

- in line 52

wordt defined in line 63; used 1 times

- in line 77

Last modified: 1980-12-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 584 |