-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathqtmdb.s
More file actions
112 lines (93 loc) · 1.66 KB
/
Copy pathqtmdb.s
File metadata and controls
112 lines (93 loc) · 1.66 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*
// QuickThreads -- Threads-building toolkit.
// Copyright (c) 2013 by Frankie Onuonga
//
// Permission to use, copy, modify and distribute this software and
// its documentation for any purpose and without fee is hereby
// granted, provided that the above copyright notice and this notice
// appear in all copies. This software is provided as a
// proof-of-concept and for demonstration purposes; there is no
// representation about the suitability of this software for any
// purpose. */
.globl b_null
b_null:
ret
.globl _b_call_reg
.globl b_call_reg
_b_call_reg:
b_call_reg:
mov $b_null, %ebx
b_call_reg_inner:
call *%ebx
call *%ebx
call *%ebx
call *%ebx
call *%ebx
call *%ebx
call *%ebx
call *%ebx
call *%ebx
call *%ebx
addl $-10, 4(%esp)
jg b_call_reg_inner
ret
.globl _b_call_imm
.globl b_call_imm
_b_call_imm:
b_call_imm:
mov $b_null, %ebx
b_call_imm_inner:
call b_null
call b_null
call b_null
call b_null
call b_null
call b_null
call b_null
call b_null
call b_null
call b_null
addl $-10, 4(%esp)
jg b_call_imm_inner
ret
.globl _b_add
.globl b_add
_b_add:
b_add:
clr %eax
clr %ebx
clr %ecx
clr %edx
clr %esi
b_add_inner:
addl $5, %eax
addl $5, %ebx
addl $5, %ecx
addl $5, %edx
addl $5, %esi
addl $5, %eax
addl $5, %ebx
addl $5, %ecx
addl $5, %edx
addl $5, %esi
addl $-10, 4(%esp)
jg b_add_inner
ret
.globl _b_load
.globl b_load
b_load_inner:
movl 4(%esp), %ebx
movl 8(%esp), %ebx
movl 12(%esp), %ebx
movl 16(%esp), %ebx
movl 20(%esp), %ebx
movl 4(%esp), %ebx
movl 8(%esp), %ebx
movl 12(%esp), %ebx
movl 16(%esp), %ebx
movl 20(%esp), %ebx
addl $-10, 4(%esp)
jg b_load_inner
ret
_b_load:
b_load: