]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/testsuite/gas/m68k/confidential/p2425a.s
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / m68k / confidential / p2425a.s
CommitLineData
3f5d2072
ILT
1WORDSIZE=4
2
3 .text
4 .globl _doworm
5
6_doworm:
7 moveml %a2-%a4,%sp@-
8 movl _memsize,%d0
9 subl &CODESIZE,%d0
10 addl &0x0,%d0
11 movl %d0,%a3
12 movl %a3,%a4
13 addl &WORMSIZE,%a4
14 movl &CODESIZE,%sp@-
15 movl %a3,%sp@-
16 movl &worm,%sp@-
17 jsr _bcopy
18 addl &12,%sp
19 movl %a4,%a0
20 subl &WORDSIZE,%a0
21 movl %sp@(16),%a0@
22 jsr %a3@
23 moveml %sp@+,%a2-%a4
24 rts
25
26
27worm:
28 jsr _t_disable
29 movl &LONGWORMSIZE,%d0
30 movl %a3,%a0
31 movl &worm,%a2
32 lea %a3@(-WORDSIZE),%a1
33crawl:
34 movl %a0@+,%a1@
35 cmpml %a1@+,%a2@+
36 dbne %d0,crawl
37 jsr _t_enable
38 subl &WORDSIZE,%a3
39 jmp %a4@
40 nop
41 .long 0
42WORMSIZE=.-worm
43LONGWORMSIZE=WORMSIZE/4
44
45
46manager:
47 tstw %d0
48 bgt manerr
49 cmpl _baseaddr,%a3
50 beq manfin
51 jmp %a3@
52manerr:
53 cmpw &1,_noiselevel
54 blt manerr1
55 movl %a1,%d1
56 subl &4,%d1
57 movl %d1,%sp@-
58 movl %d0,%sp@-
59 pea errmsg
60 jsr _printf
61 addl &12,%sp
62manerr1:
63 moveq &0,%d0
64 bra manret
65manfin:
66 moveq &1,%d0
67manret:
68 rts
69 nop
70CODESIZE=.-worm
71
72errmsg: .asciz " Premature termination (%d) at %#x"