Define PSEUDO_NOERRNO, PSEUDO_END_NOERRNO, and ret_NOERRNO.

This commit is contained in:
Ulrich Drepper 2003-03-23 19:42:23 +00:00
parent fad367110e
commit 98f7320f07
5 changed files with 70 additions and 4 deletions

View File

@ -119,6 +119,21 @@ $syscall_error: \
END(sym)
#endif
#define PSEUDO_NOERRNO(name, syscall_name, args) \
.globl name; \
.align 4; \
.ent name,0; \
__LABEL(name) \
PSEUDO_PROLOGUE; \
PSEUDO_PREPARE_ARGS \
lda v0, SYS_ify(syscall_name); \
call_pal PAL_callsys;
#undef PSEUDO_END_NOERRNO
#define PSEUDO_END_NOERRNO(sym) END(sym)
#define ret_NOERRNO ret
#define r0 v0
#define r1 a4
@ -167,8 +182,8 @@ $syscall_error: \
/* If TLS is in use, we have a conflict between the PAL_rduniq primitive,
as modeled within GCC, and explicit use of the R0 register. If we use
the register via the asm, the scheduler may place the PAL_rduniq insn
before we've copied the data from R0 into _sc_ret. If this happens
we'll get a reload abort, since R0 is live at the same time it is
before we've copied the data from R0 into _sc_ret. If this happens
we'll get a reload abort, since R0 is live at the same time it is
needed for the PAL_rduniq.
Solve this by using the "v" constraint instead of an asm for the syscall

View File

@ -64,6 +64,22 @@
SYSCALL_ERROR_HANDLER \
END (name)
#undef PSEUDO_NOERRNO
#define PSEUDO_NOERRNO(name, syscall_name, args) \
.text; \
ENTRY (name); \
DO_CALL (syscall_name, args);
#define PSEUDO_RET_NOERRNO \
RETINSTR(movcc, pc, lr); \
nop
#undef ret_NOERRNO
#define ret_NOERRNO PSEUDO_RET_NOERRNO
#undef PSEUDO_END_NOERRNO
#define PSEUDO_END_NOERRNO(name) \
END (name)
#if NOT_IN_libc
# define SYSCALL_ERROR __local_syscall_error
# define SYSCALL_ERROR_HANDLER \

View File

@ -1,5 +1,5 @@
/* Assembler macros for CRIS.
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -106,6 +106,18 @@
PLTJUMP (syscall_error) @ \
END (name)
#define PSEUDO_NOERRNO(name, syscall_name, args) \
ENTRY (name) @ \
DOARGS_##args @ \
movu.w SYS_ify (syscall_name),$r9 @ \
break 13 @ \
UNDOARGS_return_##args
#define ret_NOERRNO
#define PSEUDO_END_NOERRNO(name) \
END (name)
#define DOARGS_0
#define DOARGS_1
#define DOARGS_2

View File

@ -1,5 +1,5 @@
/* Assembler macros for PA-RISC.
Copyright (C) 1999,2001,02 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
@ -84,6 +84,10 @@
bv 0(2) ASM_LINE_SEP \
nop
#define ret_NOERRNO \
bv 0(2) ASM_LINE_SEP \
nop
#undef END
#define END(name) \
1: .size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name)
@ -115,6 +119,15 @@
#define PSEUDO_END(name) \
END (name)
#define PSEUDO_NOERRNO(name, syscall_name, args) \
ENTRY (name) \
DO_CALL(syscall_name, args) ASM_LINE_SEP \
nop
#undef PSEUDO_END_NOERRNO
#define PSEUDO_END_NOERRNO(name) \
END (name)
#define JUMPTARGET(name) name
#define SYSCALL_PIC_SETUP /* Nothing. */

View File

@ -68,6 +68,16 @@
SYSCALL_ERROR_HANDLER; \
END (name)
#undef PSEUDO_NOERRNO
#define PSEUDO_NOERRNO(name, syscall_name, args) \
.text; \
ENTRY (name) \
DO_CALL (syscall_name, args)
#undef PSEUDO_END_NOERRNO
#define PSEUDO_END_NOERRNO(name) \
END (name)
#ifdef PIC
# if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_HANDLER \