Deleted Added
full compact
sbrk.S (217106) sbrk.S (240152)
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(SYSLIBC_SCCS) && !defined(lint)
34 .asciz "@(#)sbrk.s 5.1 (Berkeley) 4/23/90"
35#endif /* SYSLIBC_SCCS and not lint */
36#include <machine/asm.h>
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(SYSLIBC_SCCS) && !defined(lint)
34 .asciz "@(#)sbrk.s 5.1 (Berkeley) 4/23/90"
35#endif /* SYSLIBC_SCCS and not lint */
36#include <machine/asm.h>
37__FBSDID("$FreeBSD: head/lib/libc/i386/sys/sbrk.S 217106 2011-01-07 16:08:40Z kib $");
37__FBSDID("$FreeBSD: head/lib/libc/i386/sys/sbrk.S 240152 2012-09-05 21:41:05Z jilles $");
38
39#include "SYS.h"
40
41 .globl CNAME(_end)
42 .globl HIDENAME(minbrk)
43 .globl HIDENAME(curbrk)
44
45 .data

--- 8 unchanged lines hidden (view full) ---

54 movl PIC_GOT(HIDENAME(curbrk)),%edx
55 movl (%edx),%eax
56 PIC_EPILOGUE
57 testl %ecx,%ecx
58 jz back
59 addl %eax,4(%esp)
60 mov $SYS_break,%eax
61 KERNCALL
38
39#include "SYS.h"
40
41 .globl CNAME(_end)
42 .globl HIDENAME(minbrk)
43 .globl HIDENAME(curbrk)
44
45 .data

--- 8 unchanged lines hidden (view full) ---

54 movl PIC_GOT(HIDENAME(curbrk)),%edx
55 movl (%edx),%eax
56 PIC_EPILOGUE
57 testl %ecx,%ecx
58 jz back
59 addl %eax,4(%esp)
60 mov $SYS_break,%eax
61 KERNCALL
62 jb err
62 jb HIDENAME(cerror)
63 PIC_PROLOGUE
64 movl PIC_GOT(HIDENAME(curbrk)),%edx
65 movl (%edx),%eax
66 addl %ecx,(%edx)
67 PIC_EPILOGUE
68back:
69 ret
63 PIC_PROLOGUE
64 movl PIC_GOT(HIDENAME(curbrk)),%edx
65 movl (%edx),%eax
66 addl %ecx,(%edx)
67 PIC_EPILOGUE
68back:
69 ret
70err:
71 PIC_PROLOGUE
72 jmp PIC_PLT(HIDENAME(cerror))
73
74#else /* !PIC */
75
76 movl 4(%esp),%ecx
77 movl HIDENAME(curbrk),%eax
78 testl %ecx,%ecx
79 jz back
80 addl %eax,4(%esp)
81 mov $SYS_break,%eax
82 KERNCALL
70
71#else /* !PIC */
72
73 movl 4(%esp),%ecx
74 movl HIDENAME(curbrk),%eax
75 testl %ecx,%ecx
76 jz back
77 addl %eax,4(%esp)
78 mov $SYS_break,%eax
79 KERNCALL
83 jb err
80 jb HIDENAME(cerror)
84 movl HIDENAME(curbrk),%eax
85 addl %ecx,HIDENAME(curbrk)
86back:
87 ret
81 movl HIDENAME(curbrk),%eax
82 addl %ecx,HIDENAME(curbrk)
83back:
84 ret
88err:
89 jmp HIDENAME(cerror)
90#endif /* PIC */
91END(sbrk)
92
93 .section .note.GNU-stack,"",%progbits
85#endif /* PIC */
86END(sbrk)
87
88 .section .note.GNU-stack,"",%progbits