annotate loader/wrapper.S @ 23105:e06073016699

Move misplaced res_comment to where it actually takes effect.
author diego
date Thu, 26 Apr 2007 12:09:20 +0000
parents c3eb28f300d0
children 0f1b5b68af32
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8269
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
1 .section .data
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
2 .globl caller_return
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
3 caller_return:
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
4 .long 0
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
5 .globl report_entry
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
6 report_entry:
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
7 .long null_call
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
8 .globl report_ret
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
9 report_ret:
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
10 .long null_call
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
11 .global wrapper_target
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
12 wrapper_target:
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
13 .long null_call
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
14
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
15 .section .text
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
16 .globl null_call
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
17 .type null_call, @function
8287
c3eb28f300d0 .align -> .balign
arpi
parents: 8269
diff changeset
18 .balign 16,0x90
8269
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
19 null_call:
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
20 ret
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
21 .globl wrapper
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
22 .type wrapper, @function
8287
c3eb28f300d0 .align -> .balign
arpi
parents: 8269
diff changeset
23 .balign 16,0x90
8269
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
24 wrapper:
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
25 pusha # store registers (EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI)
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
26 pushf # store flags
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
27
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
28 push %ebp # set up a stack frame
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
29 movl %esp, %ebp
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
30
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
31 leal 4(%ebp), %eax # push flags addr
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
32 push %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
33 leal 8(%ebp), %eax # push registers addr
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
34 push %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
35
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
36 leal 40(%ebp), %edx
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
37 movl (%ebp), %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
38 subl %edx, %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
39 push %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
40 push %edx
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
41
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
42 call *report_entry # report entry
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
43
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
44 test %eax, %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
45 jnz .Ldone
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
46
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
47 leave # restore %esp, %ebp
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
48 popf # restore flags
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
49 popa # restore registers
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
50
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
51 popl caller_return # switch return addresses
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
52 pushl $.Lwrapper_return
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
53
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
54 jmp *wrapper_target # wrapper_target should return at .Lwrapper_return
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
55
8287
c3eb28f300d0 .align -> .balign
arpi
parents: 8269
diff changeset
56 .balign 16, 0x90
8269
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
57 .Lwrapper_return:
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
58 pushl caller_return # restore the original return address
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
59 pusha # more for reference sake here
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
60 pushf
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
61
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
62 push %ebp # set up a stack frame
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
63 movl %esp, %ebp
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
64
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
65 leal 4(%ebp), %eax # push flags addr
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
66 push %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
67 leal 8(%ebp), %eax # push registers addr
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
68 push %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
69
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
70 leal 40(%ebp), %edx # push stack top address (relative to our entry)
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
71 movl (%ebp), %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
72 subl %edx, %eax # calculate difference between entry and previous frame
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
73 push %eax
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
74 push %edx
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
75
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
76 call *report_ret # report the return information (same args)
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
77 .Ldone:
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
78
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
79 leave
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
80 popf
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
81 popa
8b905703a450 - qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
diff changeset
82 ret
8287
c3eb28f300d0 .align -> .balign
arpi
parents: 8269
diff changeset
83