aboutsummaryrefslogtreecommitdiff
path: root/unix/as.vax/aclr.s
blob: 5cbb161749c501bbc0a3f5e18e58740a492d7f52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# ACLR -- Zero a block of memory.

	.set	MASK,	07400
	.set	A,	4
	.set	NPIX,	8

.data
LZB:
	.quad	0
	.quad	0
	.quad	0
	.quad	0
	.quad	0
	.quad	0
	.quad	0
	.quad	0
	.align	2
.text
	.globl	_aclrb_				# aclr_ (a, npix)
	.globl	_aclrc_
	.globl	_aclrs_
	.globl	_aclri_
	.globl	_aclrl_
	.globl	_aclrr_
	.globl	_aclrd_
	.globl	_aclrx_
_aclrb_:
	.word	MASK
	movl	*NPIX(ap), r11
	jbr	L10
_aclrc_:
_aclrs_:
	.word	MASK
	mull3	$2, *NPIX(ap), r11
	jbr	L10
_aclri_:
_aclrl_:
_aclrr_:
	.word	MASK
	mull3	$4, *NPIX(ap), r11
	jbr	L10
_aclrd_:
_aclrx_:
	.word	MASK
	mull3	$8, *NPIX(ap), r11
L10:
	jleq	L20
	moval	LZB, r8
	movl	A(ap), r9
	ashl	$-6, r11, r10
	bleq	L12

	# Clear successive 64 byte blocks.
L11:
	movc3	$64, (r8), (r9)
	addl2	$64, r9
	sobgtr	r10, L11
L12:
	# Clear the remaining bytes.

	bicl2	$-64, r11
	movc3	r11, (r8), (r9)
L20:
	ret