Non-working Quickthreads port
[charm.git] / src / QuickThreads / md / t3e_b.s
1 /*
2  * QuickThreads -- Threads-building toolkit.
3  * Copyright (c) 1993 by David Keppel
4  *
5  * Permission to use, copy, modify and distribute this software and
6  * its documentation for any purpose and without fee is hereby
7  * granted, provided that the above copyright notice and this notice
8  * appear in all copies.  This software is provided as a
9  * proof-of-concept and for demonstration purposes; there is no
10  * representation about the suitability of this software for any
11  * purpose.
12  */
13
14         .text
15         .globl b_call_reg
16         .globl b_call_imm
17         .globl b_add
18         .globl b_load
19
20         .ent b_null
21 b_null:
22         ret $31,($18),1
23         .end b_null
24
25         .ent b_call_reg
26 b_call_reg:
27         lda $27,b_null
28 $L0:
29         jsr $18,($27)
30         jsr $18,($27)
31         jsr $18,($27)
32         jsr $18,($27)
33         jsr $18,($27)
34
35         jsr $18,($27)
36         jsr $18,($27)
37         jsr $18,($27)
38         jsr $18,($27)
39         jsr $18,($27)
40
41         subq $16,1,$16
42         bgt $16,$L0
43
44         ret $31,($26),1
45         .end
46
47
48         .ent b_call_imm
49 b_call_imm:
50 $L1:
51         jsr $18,b_null
52         jsr $18,b_null
53         jsr $18,b_null
54         jsr $18,b_null
55         jsr $18,b_null
56
57         jsr $18,b_null
58         jsr $18,b_null
59         jsr $18,b_null
60         jsr $18,b_null
61         jsr $18,b_null
62
63         subq $16,1,$16
64         bgt $16,$L1
65
66         ret $31,($26),1
67         .end
68
69
70         .ent b_add
71 b_add:
72 $L2:
73         addq $31,$31,$31
74         addq $31,$31,$31
75         addq $31,$31,$31
76         addq $31,$31,$31
77         addq $31,$31,$31
78
79         addq $31,$31,$31
80         addq $31,$31,$31
81         addq $31,$31,$31
82         addq $31,$31,$31
83         addq $31,$31,$31
84
85         subq $16,1,$16
86         bgt $16,$L2
87
88         ret $31,($26),1
89         .end
90
91
92         .ent b_load
93 b_load:
94 $L3:
95         ldq $31,0($30)
96         ldq $31,8($30)
97         ldq $31,16($30)
98         ldq $31,24($30)
99         ldq $31,32($30)
100
101         ldq $31,0($30)
102         ldq $31,8($30)
103         ldq $31,16($30)
104         ldq $31,24($30)
105         ldq $31,32($30)
106
107         subq $16,1,$16
108         bgt $16,$L3
109
110         ret $31,($26),1
111         .end