Cross Reference: sbrk.s
xref
: /
illumos-gate
/
usr
/
src
/
lib
/
libbc
/
libc
/
sys
/
common
/
sparc
/
sbrk.s
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
2
N/A
!
2
N/A
!
CDDL
HEADER
START
2
N/A
!
2
N/A
!
The
contents
of
this
file
are
subject
to
the
terms
of
the
2
N/A
!
Common
Development
and
Distribution
License
,
Version
1.0
only
2
N/A
! (
the
"License"
).
You
may
not
use
this
file
except
in
compliance
2
N/A
!
with
the
License
.
2
N/A
!
2
N/A
!
You
can
obtain
a
copy
of
the
license
at
usr
/
src
/
OPENSOLARIS
.
LICENSE
2
N/A
!
or
http
:
//
www.opensolaris.org
/
os
/
licensing
.
2
N/A
!
See
the
License
for
the
specific
language
governing
permissions
2
N/A
!
and
limitations
under
the
License
.
2
N/A
!
2
N/A
!
When
distributing
Covered
Code
,
include
this
CDDL
HEADER
in
each
2
N/A
!
file
and
include
the
License
file
at
usr
/
src
/
OPENSOLARIS
.
LICENSE
.
2
N/A
!
If
applicable
,
add
the
following
below
this
CDDL
HEADER
,
with
the
2
N/A
!
fields
enclosed
by
brackets
"[]"
replaced
with
your
own
identifying
2
N/A
!
information
:
Portions
Copyright
[
yyyy
] [
name
of
copyright
owner
]
2
N/A
!
2
N/A
!
CDDL
HEADER
END
2
N/A
!
2
N/A
!
"%Z%%M% %I% %E% SMI"
2
N/A
!
Copyright
(c)
1986
by
Sun
Microsystems
,
Inc
.
2
N/A
!
2
N/A
! .
seg
"text"
2
N/A
2
N/A
.
file
"
sbrk.s
"
2
N/A
2
N/A
#
include
"
SYS.h
"
2
N/A
#
include
<
sys
/
syscall.h
>
2
N/A
2
N/A
#
define
ALIGNSIZE
8
2
N/A
2
N/A
.
global
.
curbrk
2
N/A
.
type
.
curbrk
,#
object
2
N/A
.
size
.
curbrk
,
4
2
N/A
2
N/A
.
global
end
2
N/A
.
section
".data"
2
N/A
.
align
4
2
N/A
.
curbrk
:
2
N/A
.
word
end
2
N/A
2
N/A
ENTRY
(
sbrk
)
2
N/A
add
%
o0
, (
ALIGNSIZE
-
1
), %
o0
!
round
up
request
to
align
size
2
N/A
andn
%
o0
, (
ALIGNSIZE
-
1
), %
o0
2
N/A
#
ifdef
PIC
2
N/A
PIC_SETUP
(
o5
)
2
N/A
ld
[%
o5
+ .
curbrk
], %
g1
2
N/A
ld
[%
g1
], %
o3
2
N/A
#
else
2
N/A
sethi
%
hi
(.
curbrk
), %
o2
2
N/A
ld
[%
o2
+ %
lo
(.
curbrk
)], %
o3
2
N/A
#
endif
2
N/A
add
%
o3
, (
ALIGNSIZE
-
1
), %
o3
!
round
up
.
curbrk
to
align
size
2
N/A
andn
%
o3
, (
ALIGNSIZE
-
1
), %
o3
2
N/A
add
%
o3
, %
o0
, %
o0
!
new
break
setting
=
request
+ .
curbrk
2
N/A
mov
%
o0
, %
o4
!
save
it
2
N/A
mov
SYS_brk
, %
g1
2
N/A
t
8
2
N/A
CERROR
(
o5
)
2
N/A
#
ifdef
PIC
2
N/A
PIC_SETUP
(
o5
)
2
N/A
ld
[%
o5
+ .
curbrk
], %
g1
2
N/A
st
%
o4
, [%
g1
]
2
N/A
#
else
2
N/A
st
%
o4
, [%
o2
+ %
lo
(.
curbrk
)] !
store
new
break
in
.
curbrk
2
N/A
#
endif
2
N/A
retl
2
N/A
mov
%
o3
, %
o0
!
return
old
break
2
N/A
SET_SIZE
(
sbrk
)
2
N/A