~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to rtl/openbsd/i386/prt0.as

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
        .file   "crt0.c"
2
 
gcc2_compiled.:
3
 
.data
4
 
        .align 32
5
 
        .type    rcsid , @object
6
 
        .size   rcsid , 58
7
 
rcsid:
8
 
        .string "$OpenBSD: crt0.c,v 1.11 2003/06/27 22:30:38 deraadt Exp $"
9
 
.globl __progname
10
 
.section        .rodata
11
 
.LC0:
12
 
        .string ""
13
 
.data
14
 
        .align 4
15
 
        .type    __progname , @object
16
 
        .size   __progname , 4
17
 
__progname:
18
 
        .long .LC0
19
 
        .align  4
20
 
___fpucw:
21
 
        .long   0x1332
22
 
 
23
 
        .globl  ___fpc_brk_addr         /* heap management */
24
 
        .type   ___fpc_brk_addr,@object
25
 
        .size   ___fpc_brk_addr,4
26
 
___fpc_brk_addr:
27
 
        .long   0
28
 
 
29
 
#APP
30
 
        
31
 
        .text
32
 
        .align  4
33
 
        .globl  __start
34
 
        .globl  _start
35
 
_start:
36
 
__start:
37
 
        pushl   %ebx                    #ps_strings
38
 
        pushl   %ecx                    # obj
39
 
        pushl   %edx                    # cleanup
40
 
        movl    12(%esp),%eax
41
 
        leal    20(%esp,%eax,4),%ecx
42
 
        leal    16(%esp),%edx
43
 
        pushl   %ecx
44
 
        pushl   %edx
45
 
        pushl   %eax
46
 
        call    ___start
47
 
 
48
 
#NO_APP
49
 
.text
50
 
        .align 4
51
 
.globl ___start
52
 
        .type   ___start , @function
53
 
___start:
54
 
        pushl %ebp
55
 
        movl %esp,%ebp
56
 
        subl $16,%esp
57
 
        pushl %esi
58
 
        pushl %ebx
59
 
        movl 12(%ebp),%esi
60
 
        movl 16(%ebp),%eax
61
 
        movl %eax,environ
62
 
        movl %eax,U_SYSTEM_ENVP
63
 
        movl (%esi),%ebx
64
 
        testl %ebx,%ebx
65
 
        je .L3
66
 
        addl $-8,%esp
67
 
        pushl $47
68
 
        pushl %ebx
69
 
        call _strrchr
70
 
        movl %eax,__progname
71
 
        addl $16,%esp
72
 
        testl %eax,%eax
73
 
        jne .L4
74
 
        movl %ebx,__progname
75
 
        jmp .L5
76
 
        .p2align 4,,7
77
 
.L4:
78
 
        incl %eax
79
 
        movl %eax,__progname
80
 
.L5:
81
 
        movl $__progname_storage,%edx
82
 
        jmp .L12
83
 
        .p2align 4,,7
84
 
.L9:
85
 
        movb (%eax),%al
86
 
        movb %al,(%edx)
87
 
        incl __progname
88
 
        incl %edx
89
 
.L12:
90
 
        movl __progname,%eax
91
 
        cmpb $0,(%eax)
92
 
        je .L7
93
 
        cmpl $__progname_storage+255,%edx
94
 
        jb .L9
95
 
.L7:
96
 
        movb $0,(%edx)
97
 
        movl $__progname_storage,__progname
98
 
.L3:
99
 
#       call __init
100
 
        subl $16,%esp
101
 
        pushl %eax
102
 
        movl 8(%ebp),%eax
103
 
        movl %eax,U_SYSTEM_ARGC
104
 
        movl %esi,U_SYSTEM_ARGV
105
 
        popl %eax
106
 
#       pushl environ
107
 
#       pushl %esi
108
 
#       pushl 8(%ebp)
109
 
        finit
110
 
        fwait
111
 
        fldcw __fpucw
112
 
        xorl  %ebp,%ebp
113
 
        call main
114
 
#       pushl %eax
115
 
#       call exit
116
 
        jmp _haltproc
117
 
        .p2align 2,0x90
118
 
 
119
 
.globl _haltproc
120
 
.type _haltproc,@function
121
 
 
122
 
_haltproc:
123
 
           mov $1,%eax 
124
 
           movzwl U_SYSTEM_EXITCODE,%ebx
125
 
           pushl %ebx
126
 
           call .Lactualsyscall
127
 
           addl  $4,%esp
128
 
           jmp   _haltproc
129
 
 
130
 
.Lactualsyscall:
131
 
         int $0x80
132
 
         jb .LErrorcode
133
 
         xor %ebx,%ebx
134
 
         ret
135
 
.LErrorcode:
136
 
         mov %eax,%ebx
137
 
         mov $-1,%eax
138
 
         ret
139
 
        .p2align 2,0x90
140
 
.Lfe1:
141
 
 
142
 
        .size   ___start , . - ___start
143
 
        .align 4
144
 
        .type   _strrchr , @function
145
 
_strrchr:
146
 
        pushl %ebp
147
 
        movl %esp,%ebp
148
 
        pushl %ebx
149
 
        movl 8(%ebp),%eax
150
 
        movb 12(%ebp),%bl
151
 
        xorl %ecx,%ecx
152
 
        .p2align 4,,7
153
 
.L14:
154
 
        movb (%eax),%dl
155
 
        cmpb %bl,%dl
156
 
        jne .L17
157
 
        movl %eax,%ecx
158
 
.L17:
159
 
        testb %dl,%dl
160
 
        je .L16
161
 
        incl %eax
162
 
        jmp .L14
163
 
        .p2align 4,,7
164
 
.L16:
165
 
        movl %ecx,%eax
166
 
        popl %ebx
167
 
        leave
168
 
        ret
169
 
        .size   _strrchr , . - _strrchr
170
 
        .comm   environ,4,4
171
 
        .comm   __progname_storage,256,32