Update.
2001-03-23 Jes Sorensen <jes@linuxcare.com> * sysdeps/unix/sysv/linux/ia64/sysdep.h (ENTRY): Moved to ... * sysdeps/ia64/sysdep.h: ...here. * sysdeps/ia64/sysdep.h (LOCAL_ENTRY): Define. * sysdeps/ia64/sysdep.h (LOCAL_LEAF): Define. * sysdeps/ia64/_mcount.S (_mcount_ret_helper): Use LOCAL_LEAF() to declare instead of LEAF(). Suggestion from David Mosberger. 2001-03-21 David Mosberger <davidm@hpl.hp.com> * sysdeps/unix/sysv/linux/ia64/sysdep.h (CALL_MCOUNT): Add unwind directives. (PSEUDO): Drop .psr and .lsb directives. * sysdeps/unix/sysv/linux/ia64/setjmp.S: Ditto. Add unwind directives. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Ditto. * sysdeps/ia64/elf/start.S: Misc cleanup: remove .psr and .lsb directives etc. * sysdeps/unix/sysv/linux/ia64/brk.S: Ditto. * sysdeps/unix/sysv/linux/ia64/__longjmp.S: Ditto. * sysdeps/ia64/_mcount.S: Remove .psr and .lsb directives (no longer needed). Add unwind directives. * sysdeps/ia64/sysdep.h: Define ASM_UNW_PRLG_RP, ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_PSP, ASM_UNW_PRLG_PR, and ASM_UNW_PRLG_GRSAVE. 2001-03-21 Paul Eggert <eggert@twinsun.com> * posix/regex.h (RE_INVALID_INTERVAL_ORD): New macro. (RE_SYNTAX_POSIX_EGREP): Use it. * posix/regex.c (regex_compile): Implement it. 2001-03-21 Paul Eggert <eggert@twinsun.com> * posix/regex.c (GET_UNSIGNED_NUMBER): Check for overflow. Rewrite to avoid duplicate code. 2001-03-21 H.J. Lu <hjl@gnu.org> * elf/Makefile (tests): Don't depend on $(objpfx)tst-pathopt.out for cross-compiling. ($(objpfx)tst-pathopt.out): Undo the last change.
This commit is contained in:
parent
8c0fe29004
commit
0a45b76c62
48
ChangeLog
48
ChangeLog
|
@ -1,3 +1,51 @@
|
||||||
|
2001-03-23 Jes Sorensen <jes@linuxcare.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/ia64/sysdep.h (ENTRY): Moved to ...
|
||||||
|
* sysdeps/ia64/sysdep.h: ...here.
|
||||||
|
|
||||||
|
* sysdeps/ia64/sysdep.h (LOCAL_ENTRY): Define.
|
||||||
|
* sysdeps/ia64/sysdep.h (LOCAL_LEAF): Define.
|
||||||
|
|
||||||
|
* sysdeps/ia64/_mcount.S (_mcount_ret_helper): Use LOCAL_LEAF() to
|
||||||
|
declare instead of LEAF(). Suggestion from David Mosberger.
|
||||||
|
|
||||||
|
2001-03-21 David Mosberger <davidm@hpl.hp.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/ia64/sysdep.h (CALL_MCOUNT): Add unwind
|
||||||
|
directives.
|
||||||
|
(PSEUDO): Drop .psr and .lsb directives.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/ia64/setjmp.S: Ditto. Add unwind
|
||||||
|
directives.
|
||||||
|
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Ditto.
|
||||||
|
|
||||||
|
* sysdeps/ia64/elf/start.S: Misc cleanup: remove .psr and .lsb
|
||||||
|
directives etc.
|
||||||
|
* sysdeps/unix/sysv/linux/ia64/brk.S: Ditto.
|
||||||
|
* sysdeps/unix/sysv/linux/ia64/__longjmp.S: Ditto.
|
||||||
|
* sysdeps/ia64/_mcount.S: Remove .psr and .lsb directives (no
|
||||||
|
longer needed). Add unwind directives.
|
||||||
|
|
||||||
|
* sysdeps/ia64/sysdep.h: Define ASM_UNW_PRLG_RP, ASM_UNW_PRLG_PFS,
|
||||||
|
ASM_UNW_PRLG_PSP, ASM_UNW_PRLG_PR, and ASM_UNW_PRLG_GRSAVE.
|
||||||
|
|
||||||
|
2001-03-21 Paul Eggert <eggert@twinsun.com>
|
||||||
|
|
||||||
|
* posix/regex.h (RE_INVALID_INTERVAL_ORD): New macro.
|
||||||
|
(RE_SYNTAX_POSIX_EGREP): Use it.
|
||||||
|
* posix/regex.c (regex_compile): Implement it.
|
||||||
|
|
||||||
|
2001-03-21 Paul Eggert <eggert@twinsun.com>
|
||||||
|
|
||||||
|
* posix/regex.c (GET_UNSIGNED_NUMBER): Check for overflow.
|
||||||
|
Rewrite to avoid duplicate code.
|
||||||
|
|
||||||
|
2001-03-21 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
|
* elf/Makefile (tests): Don't depend on $(objpfx)tst-pathopt.out
|
||||||
|
for cross-compiling.
|
||||||
|
($(objpfx)tst-pathopt.out): Undo the last change.
|
||||||
|
|
||||||
2001-03-24 Mark Kettenis <kettenis@gnu.org>
|
2001-03-24 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* sysdeps/mach/hurd/i386/bits/sigcontext.h (sc_sp, sc_fp, sc_pc,
|
* sysdeps/mach/hurd/i386/bits/sigcontext.h (sc_sp, sc_fp, sc_pc,
|
||||||
|
|
|
@ -2139,17 +2139,17 @@ typedef struct
|
||||||
|
|
||||||
/* Get the next unsigned number in the uncompiled pattern. */
|
/* Get the next unsigned number in the uncompiled pattern. */
|
||||||
#define GET_UNSIGNED_NUMBER(num) \
|
#define GET_UNSIGNED_NUMBER(num) \
|
||||||
{ if (p != pend) \
|
{ \
|
||||||
|
while (p != pend) \
|
||||||
{ \
|
{ \
|
||||||
PATFETCH (c); \
|
PATFETCH (c); \
|
||||||
while ('0' <= c && c <= '9') \
|
if (c < '0' || c > '9') \
|
||||||
|
break; \
|
||||||
|
if (num <= RE_DUP_MAX) \
|
||||||
{ \
|
{ \
|
||||||
if (num < 0) \
|
if (num < 0) \
|
||||||
num = 0; \
|
num = 0; \
|
||||||
num = num * 10 + c - '0'; \
|
num = num * 10 + c - '0'; \
|
||||||
if (p == pend) \
|
|
||||||
break; \
|
|
||||||
PATFETCH (c); \
|
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -2326,14 +2326,6 @@ regex_compile (pattern, size, syntax, bufp)
|
||||||
/* Address of beginning of regexp, or inside of last group. */
|
/* Address of beginning of regexp, or inside of last group. */
|
||||||
US_CHAR_TYPE *begalt;
|
US_CHAR_TYPE *begalt;
|
||||||
|
|
||||||
/* Place in the uncompiled pattern (i.e., the {) to
|
|
||||||
which to go back if the interval is invalid. */
|
|
||||||
#ifdef MBS_SUPPORT
|
|
||||||
const US_CHAR_TYPE *beg_interval;
|
|
||||||
#else
|
|
||||||
const char *beg_interval;
|
|
||||||
#endif /* MBS_SUPPORT */
|
|
||||||
|
|
||||||
/* Address of the place where a forward jump should go to the end of
|
/* Address of the place where a forward jump should go to the end of
|
||||||
the containing expression. Each alternative of an `or' -- except the
|
the containing expression. Each alternative of an `or' -- except the
|
||||||
last -- ends with a forward jump of this sort. */
|
last -- ends with a forward jump of this sort. */
|
||||||
|
@ -3827,25 +3819,19 @@ regex_compile (pattern, size, syntax, bufp)
|
||||||
|
|
||||||
/* At least (most) this many matches must be made. */
|
/* At least (most) this many matches must be made. */
|
||||||
int lower_bound = -1, upper_bound = -1;
|
int lower_bound = -1, upper_bound = -1;
|
||||||
beg_interval = p - 1;
|
|
||||||
|
/* Place in the uncompiled pattern (i.e., just after
|
||||||
|
the '{') to go back to if the interval is invalid. */
|
||||||
|
const CHAR_TYPE *beg_interval = p;
|
||||||
|
|
||||||
if (p == pend)
|
if (p == pend)
|
||||||
{
|
goto invalid_interval;
|
||||||
if (!(syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
|
|
||||||
goto unfetch_interval;
|
|
||||||
else
|
|
||||||
FREE_STACK_RETURN (REG_EBRACE);
|
|
||||||
}
|
|
||||||
|
|
||||||
GET_UNSIGNED_NUMBER (lower_bound);
|
GET_UNSIGNED_NUMBER (lower_bound);
|
||||||
|
|
||||||
if (c == ',')
|
if (c == ',')
|
||||||
{
|
{
|
||||||
GET_UNSIGNED_NUMBER (upper_bound);
|
GET_UNSIGNED_NUMBER (upper_bound);
|
||||||
if ((!(syntax & RE_NO_BK_BRACES) && c != '\\')
|
|
||||||
|| ((syntax & RE_NO_BK_BRACES) && c != '}'))
|
|
||||||
FREE_STACK_RETURN (REG_BADBR);
|
|
||||||
|
|
||||||
if (upper_bound < 0)
|
if (upper_bound < 0)
|
||||||
upper_bound = RE_DUP_MAX;
|
upper_bound = RE_DUP_MAX;
|
||||||
}
|
}
|
||||||
|
@ -3853,36 +3839,24 @@ regex_compile (pattern, size, syntax, bufp)
|
||||||
/* Interval such as `{1}' => match exactly once. */
|
/* Interval such as `{1}' => match exactly once. */
|
||||||
upper_bound = lower_bound;
|
upper_bound = lower_bound;
|
||||||
|
|
||||||
if (lower_bound < 0 || upper_bound > RE_DUP_MAX
|
if (! (0 <= lower_bound && lower_bound <= upper_bound))
|
||||||
|| lower_bound > upper_bound)
|
goto invalid_interval;
|
||||||
{
|
|
||||||
if (!(syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
|
|
||||||
goto unfetch_interval;
|
|
||||||
else
|
|
||||||
FREE_STACK_RETURN (REG_BADBR);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(syntax & RE_NO_BK_BRACES))
|
if (!(syntax & RE_NO_BK_BRACES))
|
||||||
{
|
{
|
||||||
if (c != '\\') FREE_STACK_RETURN (REG_EBRACE);
|
if (c != '\\' || p == pend)
|
||||||
|
goto invalid_interval;
|
||||||
PATFETCH (c);
|
PATFETCH (c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c != '}')
|
if (c != '}')
|
||||||
{
|
goto invalid_interval;
|
||||||
if (!(syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
|
|
||||||
goto unfetch_interval;
|
|
||||||
else
|
|
||||||
FREE_STACK_RETURN (REG_BADBR);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We just parsed a valid interval. */
|
|
||||||
|
|
||||||
/* If it's invalid to have no preceding re. */
|
/* If it's invalid to have no preceding re. */
|
||||||
if (!laststart)
|
if (!laststart)
|
||||||
{
|
{
|
||||||
if (syntax & RE_CONTEXT_INVALID_OPS)
|
if (syntax & RE_CONTEXT_INVALID_OPS
|
||||||
|
&& !(syntax & RE_INVALID_INTERVAL_ORD))
|
||||||
FREE_STACK_RETURN (REG_BADRPT);
|
FREE_STACK_RETURN (REG_BADRPT);
|
||||||
else if (syntax & RE_CONTEXT_INDEP_OPS)
|
else if (syntax & RE_CONTEXT_INDEP_OPS)
|
||||||
laststart = b;
|
laststart = b;
|
||||||
|
@ -3890,6 +3864,11 @@ regex_compile (pattern, size, syntax, bufp)
|
||||||
goto unfetch_interval;
|
goto unfetch_interval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We just parsed a valid interval. */
|
||||||
|
|
||||||
|
if (RE_DUP_MAX < upper_bound)
|
||||||
|
FREE_STACK_RETURN (REG_BADBR);
|
||||||
|
|
||||||
/* If the upper bound is zero, don't want to succeed at
|
/* If the upper bound is zero, don't want to succeed at
|
||||||
all; jump from `laststart' to `b + 3', which will be
|
all; jump from `laststart' to `b + 3', which will be
|
||||||
the end of the buffer after we insert the jump. */
|
the end of the buffer after we insert the jump. */
|
||||||
|
@ -3975,25 +3954,20 @@ regex_compile (pattern, size, syntax, bufp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pending_exact = 0;
|
pending_exact = 0;
|
||||||
beg_interval = NULL;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
invalid_interval:
|
||||||
|
if (!(syntax & RE_INVALID_INTERVAL_ORD))
|
||||||
|
FREE_STACK_RETURN (p == pend ? REG_EBRACE : REG_BADBR);
|
||||||
unfetch_interval:
|
unfetch_interval:
|
||||||
/* If an invalid interval, match the characters as literals. */
|
/* Match the characters as literals. */
|
||||||
assert (beg_interval);
|
|
||||||
p = beg_interval;
|
p = beg_interval;
|
||||||
beg_interval = NULL;
|
c = '{';
|
||||||
|
if (syntax & RE_NO_BK_BRACES)
|
||||||
/* normal_char and normal_backslash need `c'. */
|
goto normal_char;
|
||||||
PATFETCH (c);
|
else
|
||||||
|
|
||||||
if (!(syntax & RE_NO_BK_BRACES))
|
|
||||||
{
|
|
||||||
if (p > pattern && p[-1] == '\\')
|
|
||||||
goto normal_backslash;
|
goto normal_backslash;
|
||||||
}
|
}
|
||||||
goto normal_char;
|
|
||||||
|
|
||||||
#ifdef emacs
|
#ifdef emacs
|
||||||
/* There is no way to specify the before_dot and after_dot
|
/* There is no way to specify the before_dot and after_dot
|
||||||
|
|
|
@ -160,6 +160,11 @@ typedef unsigned long int reg_syntax_t;
|
||||||
this bit set, and it won't affect anything in the normal case. */
|
this bit set, and it won't affect anything in the normal case. */
|
||||||
#define RE_DEBUG (RE_NO_GNU_OPS << 1)
|
#define RE_DEBUG (RE_NO_GNU_OPS << 1)
|
||||||
|
|
||||||
|
/* If this bit is set, a syntactically invalid interval is treated as
|
||||||
|
a string of ordinary characters. For example, the ERE 'a{1' is
|
||||||
|
treated as 'a\{1'. */
|
||||||
|
#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
|
||||||
|
|
||||||
/* This global variable defines the particular regexp syntax to use (for
|
/* This global variable defines the particular regexp syntax to use (for
|
||||||
some interfaces). When a regexp is compiled, the syntax used is
|
some interfaces). When a regexp is compiled, the syntax used is
|
||||||
stored in the pattern buffer, so changing this does not affect
|
stored in the pattern buffer, so changing this does not affect
|
||||||
|
@ -199,7 +204,8 @@ extern reg_syntax_t re_syntax_options;
|
||||||
| RE_NO_BK_VBAR)
|
| RE_NO_BK_VBAR)
|
||||||
|
|
||||||
#define RE_SYNTAX_POSIX_EGREP \
|
#define RE_SYNTAX_POSIX_EGREP \
|
||||||
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
|
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
|
||||||
|
| RE_INVALID_INTERVAL_ORD)
|
||||||
|
|
||||||
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
|
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
|
||||||
#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
|
#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
|
||||||
|
|
|
@ -48,13 +48,11 @@
|
||||||
|
|
||||||
#undef ret
|
#undef ret
|
||||||
|
|
||||||
.psr abi64
|
|
||||||
.psr lsb
|
|
||||||
.lsb
|
|
||||||
|
|
||||||
LEAF(_mcount)
|
LEAF(_mcount)
|
||||||
alloc loc0 = ar.pfs, 4, 4, 3, 0
|
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(4)
|
||||||
mov loc1 = rp
|
alloc loc1 = ar.pfs, 4, 4, 3, 0
|
||||||
|
mov loc0 = rp
|
||||||
|
.body
|
||||||
mov loc2 = r8 // gcc uses r8 to pass pointer to return structure
|
mov loc2 = r8 // gcc uses r8 to pass pointer to return structure
|
||||||
;;
|
;;
|
||||||
mov loc3 = r15 // gcc uses r15 to pass the static link to nested functions
|
mov loc3 = r15 // gcc uses r15 to pass the static link to nested functions
|
||||||
|
@ -67,21 +65,27 @@ LEAF(_mcount)
|
||||||
.mii
|
.mii
|
||||||
mov gp = in1
|
mov gp = in1
|
||||||
mov r2 = ip
|
mov r2 = ip
|
||||||
mov ar.pfs = loc0
|
mov ar.pfs = loc1
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
adds r2 = 1f - .here, r2
|
adds r2 = _mcount_ret_helper - .here, r2
|
||||||
mov b7 = loc1
|
mov b7 = loc0
|
||||||
mov rp = in2
|
mov rp = in2
|
||||||
;;
|
;;
|
||||||
mov r8 = loc2
|
mov r8 = loc2
|
||||||
mov r15 = loc3
|
mov r15 = loc3
|
||||||
mov b6 = r2
|
mov b6 = r2
|
||||||
br.ret.sptk.few b6
|
br.ret.sptk.few b6
|
||||||
|
|
||||||
1: alloc r2 = ar.pfs, 0, 0, 9, 0
|
|
||||||
mov ar.pfs = r40
|
|
||||||
br b7
|
|
||||||
END(_mcount)
|
END(_mcount)
|
||||||
|
|
||||||
|
LOCAL_LEAF(_mcount_ret_helper)
|
||||||
|
.prologue
|
||||||
|
.altrp b7
|
||||||
|
.save ar.pfs, r40
|
||||||
|
.body
|
||||||
|
alloc r2 = ar.pfs, 0, 0, 9, 0
|
||||||
|
mov ar.pfs = r40
|
||||||
|
br b7
|
||||||
|
END(_mcount_ret_helper)
|
||||||
|
|
||||||
weak_alias (_mcount, mcount)
|
weak_alias (_mcount, mcount)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
|
Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
|
||||||
|
|
||||||
|
@ -31,14 +31,8 @@
|
||||||
* out6: stack_end
|
* out6: stack_end
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.psr abi64
|
.global _start
|
||||||
.psr lsb
|
.proc _start
|
||||||
.lsb
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
.global _start#
|
|
||||||
.proc _start#
|
|
||||||
|
|
||||||
_start:
|
_start:
|
||||||
{ .mlx
|
{ .mlx
|
||||||
|
@ -59,11 +53,11 @@ _start:
|
||||||
}
|
}
|
||||||
{ .mfi
|
{ .mfi
|
||||||
mov ar.fpsr = r3
|
mov ar.fpsr = r3
|
||||||
addl out0 = @ltoff(@fptr(main#)), gp
|
addl out0 = @ltoff(@fptr(main)), gp
|
||||||
}
|
}
|
||||||
{ .mfi
|
{ .mfi
|
||||||
addl out4 = @ltoff(@fptr(_fini#)), gp
|
addl out4 = @ltoff(@fptr(_fini)), gp
|
||||||
addl out3 = @ltoff(@fptr(_init#)), gp
|
addl out3 = @ltoff(@fptr(_init)), gp
|
||||||
;;
|
;;
|
||||||
}
|
}
|
||||||
{ .mmi
|
{ .mmi
|
||||||
|
@ -74,14 +68,14 @@ _start:
|
||||||
{ .mib
|
{ .mib
|
||||||
ld8 out4 = [out4] /* pointer to `fini' function descriptor */
|
ld8 out4 = [out4] /* pointer to `fini' function descriptor */
|
||||||
mov out5 = ret0 /* dynamic linker destructor */
|
mov out5 = ret0 /* dynamic linker destructor */
|
||||||
br.call.sptk.few rp = __libc_start_main#
|
br.call.sptk.few rp = __libc_start_main
|
||||||
}
|
}
|
||||||
{ .mib
|
{ .mib
|
||||||
mov rp = r0
|
mov rp = r0
|
||||||
br.ret.sptk.few rp /* break miserably if we ever return */
|
br.ret.sptk.few rp /* break miserably if we ever return */
|
||||||
;;
|
;;
|
||||||
}
|
}
|
||||||
.endp _start#
|
.endp _start
|
||||||
|
|
||||||
/* Define a symbol for the first piece of initialized data. */
|
/* Define a symbol for the first piece of initialized data. */
|
||||||
.data
|
.data
|
||||||
|
|
|
@ -21,6 +21,28 @@
|
||||||
|
|
||||||
#ifdef __ASSEMBLER__
|
#ifdef __ASSEMBLER__
|
||||||
|
|
||||||
|
/* Macros to help writing .prologue directives in assembly code. */
|
||||||
|
#define ASM_UNW_PRLG_RP 0x8
|
||||||
|
#define ASM_UNW_PRLG_PFS 0x4
|
||||||
|
#define ASM_UNW_PRLG_PSP 0x2
|
||||||
|
#define ASM_UNW_PRLG_PR 0x1
|
||||||
|
#define ASM_UNW_PRLG_GRSAVE(ninputs) (32+(ninputs))
|
||||||
|
|
||||||
|
#define ENTRY(name) \
|
||||||
|
.text; \
|
||||||
|
.align 32; \
|
||||||
|
.proc C_SYMBOL_NAME(name); \
|
||||||
|
.global C_SYMBOL_NAME(name); \
|
||||||
|
C_LABEL(name) \
|
||||||
|
CALL_MCOUNT
|
||||||
|
|
||||||
|
#define LOCAL_ENTRY(name) \
|
||||||
|
.text; \
|
||||||
|
.align 32; \
|
||||||
|
.proc C_SYMBOL_NAME(name); \
|
||||||
|
C_LABEL(name) \
|
||||||
|
CALL_MCOUNT
|
||||||
|
|
||||||
#define LEAF(name) \
|
#define LEAF(name) \
|
||||||
.text; \
|
.text; \
|
||||||
.align 32; \
|
.align 32; \
|
||||||
|
@ -28,6 +50,12 @@
|
||||||
.global name; \
|
.global name; \
|
||||||
C_LABEL(name)
|
C_LABEL(name)
|
||||||
|
|
||||||
|
#define LOCAL_LEAF(name) \
|
||||||
|
.text; \
|
||||||
|
.align 32; \
|
||||||
|
.proc C_SYMBOL_NAME(name); \
|
||||||
|
C_LABEL(name)
|
||||||
|
|
||||||
/* Mark the end of function SYM. */
|
/* Mark the end of function SYM. */
|
||||||
#undef END
|
#undef END
|
||||||
#define END(sym) .endp C_SYMBOL_NAME(sym)
|
#define END(sym) .endp C_SYMBOL_NAME(sym)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -39,16 +39,9 @@
|
||||||
# define pNeg p7 /* is rotate count negative? */
|
# define pNeg p7 /* is rotate count negative? */
|
||||||
|
|
||||||
|
|
||||||
.psr abi64
|
|
||||||
.psr lsb
|
|
||||||
.lsb
|
|
||||||
|
|
||||||
/* __longjmp(__jmp_buf buf, int val) */
|
/* __longjmp(__jmp_buf buf, int val) */
|
||||||
.text
|
|
||||||
.align 32
|
LEAF(__longjmp)
|
||||||
.global __longjmp
|
|
||||||
.proc __longjmp
|
|
||||||
__longjmp:
|
|
||||||
alloc r8=ar.pfs,2,1,0,0
|
alloc r8=ar.pfs,2,1,0,0
|
||||||
mov r27=ar.rsc
|
mov r27=ar.rsc
|
||||||
add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr
|
add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr
|
||||||
|
@ -164,5 +157,4 @@ __longjmp:
|
||||||
invala // virt. -> phys. regnum mapping may change
|
invala // virt. -> phys. regnum mapping may change
|
||||||
mov pr=r24,-1
|
mov pr=r24,-1
|
||||||
ret
|
ret
|
||||||
.endp __longjmp
|
END(__longjmp)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* brk system call for Linux/ia64
|
/* brk system call for Linux/ia64
|
||||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Written by Stephane Eranian <eranian@hpl.hp.com> and
|
Written by Stephane Eranian <eranian@hpl.hp.com> and
|
||||||
Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
|
Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
|
||||||
|
@ -19,31 +19,26 @@
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#include <sysdep.h>
|
||||||
|
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
.text
|
|
||||||
.psr abi64
|
|
||||||
.psr lsb
|
|
||||||
.lsb
|
|
||||||
|
|
||||||
.global __curbrk
|
.global __curbrk
|
||||||
.data
|
.data
|
||||||
.align 8
|
.align 8
|
||||||
__curbrk:
|
__curbrk:
|
||||||
data8 0
|
data8 0
|
||||||
.weak ___brk_addr
|
|
||||||
___brk_addr = __curbrk
|
weak_alias (__curbrk, ___brk_addr)
|
||||||
.text
|
|
||||||
.align 16
|
LEAF(__brk)
|
||||||
.global __brk
|
|
||||||
.proc __brk
|
|
||||||
__brk:
|
|
||||||
mov r15=__NR_brk
|
mov r15=__NR_brk
|
||||||
break.i __BREAK_SYSCALL
|
break.i __BREAK_SYSCALL
|
||||||
;;
|
;;
|
||||||
cmp.ltu p6,p0=ret0,r32 /* r32 is the input register, even though we
|
cmp.ltu p6,p0=ret0,r32 /* r32 is the input register, even though we
|
||||||
haven't allocated a frame */
|
haven't allocated a frame */
|
||||||
addl r9=@ltoff(__curbrk#),gp
|
addl r9=@ltoff(__curbrk),gp
|
||||||
;;
|
;;
|
||||||
ld8 r9=[r9]
|
ld8 r9=[r9]
|
||||||
(p6) mov ret0=ENOMEM
|
(p6) mov ret0=ENOMEM
|
||||||
|
@ -51,8 +46,7 @@ __brk:
|
||||||
;;
|
;;
|
||||||
st8 [r9]=ret0
|
st8 [r9]=ret0
|
||||||
mov ret0=0
|
mov ret0=0
|
||||||
br.ret.sptk.few rp
|
ret
|
||||||
.endp __brk
|
END(__brk)
|
||||||
|
|
||||||
.weak brk
|
weak_alias (__brk, brk)
|
||||||
brk = __brk
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -67,34 +67,25 @@
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
|
|
||||||
.text
|
|
||||||
.psr abi64
|
|
||||||
.psr lsb
|
|
||||||
.lsb
|
|
||||||
|
|
||||||
/* The following two entry points are the traditional entry points: */
|
/* The following two entry points are the traditional entry points: */
|
||||||
|
|
||||||
.global setjmp
|
LEAF(setjmp)
|
||||||
.proc setjmp
|
alloc r8=ar.pfs,2,0,0,0
|
||||||
setjmp: alloc r8=ar.pfs,2,0,0,0
|
|
||||||
mov in1=1
|
mov in1=1
|
||||||
br.cond.sptk.many __sigsetjmp
|
br.cond.sptk.many __sigsetjmp
|
||||||
.endp setjmp
|
END(setjmp)
|
||||||
|
|
||||||
.global _setjmp
|
LEAF(_setjmp)
|
||||||
.proc _setjmp
|
|
||||||
_setjmp:
|
|
||||||
alloc r8=ar.pfs,2,0,0,0
|
alloc r8=ar.pfs,2,0,0,0
|
||||||
mov in1=0
|
mov in1=0
|
||||||
br.cond.sptk.many __sigsetjmp
|
br.cond.sptk.many __sigsetjmp
|
||||||
.endp _setjmp
|
END(_setjmp)
|
||||||
|
|
||||||
/* __sigsetjmp(__jmp_buf buf, int savemask) */
|
/* __sigsetjmp(__jmp_buf buf, int savemask) */
|
||||||
.align 32
|
|
||||||
.global __sigsetjmp
|
ENTRY(__sigsetjmp)
|
||||||
.proc __sigsetjmp
|
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
|
||||||
__sigsetjmp:
|
alloc loc1=ar.pfs,2,2,2,0
|
||||||
alloc loc0=ar.pfs,2,2,2,0
|
|
||||||
mov r16=ar.unat
|
mov r16=ar.unat
|
||||||
;;
|
;;
|
||||||
mov r17=ar.fpsr
|
mov r17=ar.fpsr
|
||||||
|
@ -114,7 +105,8 @@ __sigsetjmp:
|
||||||
;;
|
;;
|
||||||
stf.spill.nta [r8]=f2,32
|
stf.spill.nta [r8]=f2,32
|
||||||
stf.spill.nta [r9]=f3,32
|
stf.spill.nta [r9]=f3,32
|
||||||
mov loc1=rp
|
mov loc0=rp
|
||||||
|
.body
|
||||||
;;
|
;;
|
||||||
stf.spill.nta [r8]=f4,32
|
stf.spill.nta [r8]=f4,32
|
||||||
stf.spill.nta [r9]=f5,32
|
stf.spill.nta [r9]=f5,32
|
||||||
|
@ -157,7 +149,7 @@ __sigsetjmp:
|
||||||
mov r25=ar.unat
|
mov r25=ar.unat
|
||||||
mov out0=in0
|
mov out0=in0
|
||||||
|
|
||||||
st8.nta [r2]=loc1,16 // b0
|
st8.nta [r2]=loc0,16 // b0
|
||||||
st8.nta [r3]=r17,16 // b1
|
st8.nta [r3]=r17,16 // b1
|
||||||
mov out1=in1
|
mov out1=in1
|
||||||
;;
|
;;
|
||||||
|
@ -167,7 +159,7 @@ __sigsetjmp:
|
||||||
st8.nta [r2]=r20,16 // b4
|
st8.nta [r2]=r20,16 // b4
|
||||||
st8.nta [r3]=r21,16 // b5
|
st8.nta [r3]=r21,16 // b5
|
||||||
;;
|
;;
|
||||||
st8.nta [r2]=loc0,16 // ar.pfs
|
st8.nta [r2]=loc1,16 // ar.pfs
|
||||||
st8.nta [r3]=r22,16 // ar.lc
|
st8.nta [r3]=r22,16 // ar.lc
|
||||||
;;
|
;;
|
||||||
st8.nta [r2]=r24,16 // pr
|
st8.nta [r2]=r24,16 // pr
|
||||||
|
@ -178,10 +170,10 @@ __sigsetjmp:
|
||||||
br.call.dpnt.few rp=__sigjmp_save
|
br.call.dpnt.few rp=__sigjmp_save
|
||||||
.ret0: // force a new bundle ::q
|
.ret0: // force a new bundle ::q
|
||||||
mov r8=0
|
mov r8=0
|
||||||
mov rp=loc1
|
mov rp=loc0
|
||||||
mov ar.pfs=loc0
|
mov ar.pfs=loc1
|
||||||
ret
|
ret
|
||||||
.endp __sigsetjmp
|
END(__sigsetjmp)
|
||||||
|
|
||||||
weak_extern(_setjmp)
|
weak_extern(_setjmp)
|
||||||
weak_extern(setjmp)
|
weak_extern(setjmp)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -19,10 +19,6 @@
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
|
|
||||||
.psr abi64
|
|
||||||
.psr lsb
|
|
||||||
.lsb
|
|
||||||
|
|
||||||
.global errno
|
.global errno
|
||||||
.common errno,4,4
|
.common errno,4,4
|
||||||
.type errno, @object
|
.type errno, @object
|
||||||
|
@ -34,16 +30,11 @@ __errno = errno
|
||||||
.global _errno
|
.global _errno
|
||||||
_errno = errno
|
_errno = errno
|
||||||
|
|
||||||
.text
|
ENTRY(__syscall_error)
|
||||||
|
|
||||||
.align 8
|
|
||||||
|
|
||||||
.global __syscall_error
|
|
||||||
.proc __syscall_error
|
|
||||||
__syscall_error:
|
|
||||||
#ifdef _LIBC_REENTRANT
|
#ifdef _LIBC_REENTRANT
|
||||||
|
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(0)
|
||||||
alloc r35=ar.pfs, 0, 4, 0, 0
|
alloc r35=ar.pfs, 0, 4, 0, 0
|
||||||
mov r32=b0
|
mov r32=rp
|
||||||
mov r33=r8
|
mov r33=r8
|
||||||
mov r34=r1
|
mov r34=r1
|
||||||
;;
|
;;
|
||||||
|
@ -51,7 +42,7 @@ __syscall_error:
|
||||||
.Lret0: /* force new bundle */
|
.Lret0: /* force new bundle */
|
||||||
st4 [r8]=r33
|
st4 [r8]=r33
|
||||||
mov r1=r34
|
mov r1=r34
|
||||||
mov b0=r32
|
mov rp=r32
|
||||||
mov r8=-1
|
mov r8=-1
|
||||||
mov ar.pfs=r35
|
mov ar.pfs=r35
|
||||||
#else /* _LIBC_REENTRANT */
|
#else /* _LIBC_REENTRANT */
|
||||||
|
@ -71,8 +62,7 @@ __syscall_error:
|
||||||
st4 [r2]=r3
|
st4 [r2]=r3
|
||||||
#endif /* _LIBC_REENTRANT */
|
#endif /* _LIBC_REENTRANT */
|
||||||
ret // ret is #define'd in syscall.h!
|
ret // ret is #define'd in syscall.h!
|
||||||
.endp __syscall_error
|
END(__syscall_error)
|
||||||
|
|
||||||
|
|
||||||
ENTRY(__ia64_syscall)
|
ENTRY(__ia64_syscall)
|
||||||
mov r15=r37 /* syscall number */
|
mov r15=r37 /* syscall number */
|
||||||
|
|
|
@ -38,11 +38,15 @@
|
||||||
#ifdef PROF
|
#ifdef PROF
|
||||||
# define CALL_MCOUNT \
|
# define CALL_MCOUNT \
|
||||||
.data; \
|
.data; \
|
||||||
1: data8 0; \
|
1: data8 0; /* XXX fixme: use .xdata8 once labels work */ \
|
||||||
.previous; \
|
.previous; \
|
||||||
|
.prologue; \
|
||||||
|
.save ar.pfs, r40; \
|
||||||
alloc out0 = ar.pfs, 8, 0, 4, 0; \
|
alloc out0 = ar.pfs, 8, 0, 4, 0; \
|
||||||
mov out1 = gp; \
|
mov out1 = gp; \
|
||||||
|
.save rp, out2; \
|
||||||
mov out2 = rp; \
|
mov out2 = rp; \
|
||||||
|
.body; \
|
||||||
;; \
|
;; \
|
||||||
addl out3 = @ltoff(1b), gp; \
|
addl out3 = @ltoff(1b), gp; \
|
||||||
br.call.sptk.many rp = _mcount \
|
br.call.sptk.many rp = _mcount \
|
||||||
|
@ -72,17 +76,6 @@
|
||||||
cmp.eq p6,p0=-1,r10;; \
|
cmp.eq p6,p0=-1,r10;; \
|
||||||
(p6) br.cond.spnt.few __syscall_error;
|
(p6) br.cond.spnt.few __syscall_error;
|
||||||
|
|
||||||
#define ENTRY(name) \
|
|
||||||
.psr abi64; \
|
|
||||||
.psr lsb; \
|
|
||||||
.lsb; \
|
|
||||||
.text; \
|
|
||||||
.align 32; \
|
|
||||||
.proc C_SYMBOL_NAME(name); \
|
|
||||||
.global C_SYMBOL_NAME(name); \
|
|
||||||
C_LABEL(name) \
|
|
||||||
CALL_MCOUNT
|
|
||||||
|
|
||||||
#define DO_CALL(num) \
|
#define DO_CALL(num) \
|
||||||
mov r15=num; \
|
mov r15=num; \
|
||||||
break __BREAK_SYSCALL;
|
break __BREAK_SYSCALL;
|
||||||
|
|
Loading…
Reference in New Issue