1998-10-09  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/i386/i686/pt-machine.h: Remove unused inline
	definitions.
This commit is contained in:
Ulrich Drepper 1998-10-09 11:04:04 +00:00
parent ea1dfb4a9a
commit a5d1d72670
8 changed files with 136 additions and 89 deletions

View File

@ -1,3 +1,8 @@
1998-10-09 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/i386/i686/pt-machine.h: Remove unused inline
definitions.
1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* semaphore.h: Include <sys/types.h> so that _pthread_descr

View File

@ -58,21 +58,5 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
}
extern inline int
get_eflags (void)
{
int res;
__asm__ __volatile__ ("pushfl; popl %0" : "=r" (res) : );
return res;
}
extern inline void
set_eflags (int newflags)
{
__asm__ __volatile__ ("pushl %0; popfl" : : "r" (newflags) : "cc");
}
/* Use the LDT implementation only if the kernel is fixed. */
//#include "../useldt.h"

View File

@ -66,7 +66,7 @@
{ 1, 2, "\\$a", "$a", },
{ 3, 3, "\\$$", "ab$", },
{ 2, 6, "A\\([34]$[34]\\)B", "XA4$3BY", },
{ 0, 0, "2.8.3.1.3 Perios in BREs", NULL, },
{ 0, 0, "2.8.3.1.3 Periods in BREs", NULL, },
{ 0, 0, "GA116", NULL, },
{ 1, 1, ".", "abc", },
{ -1, -1, ".ab", "abc", },

View File

@ -5570,7 +5570,8 @@ re_exec (s)
REG_EXTENDED bit in CFLAGS is set; otherwise, to
RE_SYNTAX_POSIX_BASIC;
`newline_anchor' to REG_NEWLINE being set in CFLAGS;
`fastmap' and `fastmap_accurate' to zero;
`fastmap' to an allocated space for the fastmap;
`fastmap_accurate' to zero;
`re_nsub' to the number of subexpressions in PATTERN.
PATTERN is the address of the pattern string.
@ -5609,11 +5610,8 @@ regcomp (preg, pattern, cflags)
preg->allocated = 0;
preg->used = 0;
/* Don't bother to use a fastmap when searching. This simplifies the
REG_NEWLINE case: if we used a fastmap, we'd have to put all the
characters after newlines into the fastmap. This way, we just try
every character. */
preg->fastmap = 0;
/* Try to allocate space for the fastmap. */
preg->fastmap = (char *) malloc (1 << BYTEWIDTH);
if (cflags & REG_ICASE)
{
@ -5653,6 +5651,19 @@ regcomp (preg, pattern, cflags)
unmatched close-group: both are REG_EPAREN. */
if (ret == REG_ERPAREN) ret = REG_EPAREN;
if (ret == REG_NOERROR && preg->fastmap)
{
/* Compute the fastmap now, since regexec cannot modify the pattern
buffer. */
if (re_compile_fastmap (preg) == -2)
{
/* Some error occured while computing the fastmap, just forget
about it. */
free (preg->fastmap);
preg->fastmap = NULL;
}
}
return (int) ret;
}
#ifdef _LIBC
@ -5701,10 +5712,10 @@ regexec (preg, string, nmatch, pmatch, eflags)
if (want_reg_info)
{
regs.num_regs = nmatch;
regs.start = TALLOC (nmatch, regoff_t);
regs.end = TALLOC (nmatch, regoff_t);
if (regs.start == NULL || regs.end == NULL)
regs.start = TALLOC (nmatch * 2, regoff_t);
if (regs.start == NULL)
return (int) REG_NOMATCH;
regs.end = regs.start + nmatch;
}
/* Perform the searching operation. */
@ -5728,7 +5739,6 @@ regexec (preg, string, nmatch, pmatch, eflags)
/* If we needed the temporary register info, free the space now. */
free (regs.start);
free (regs.end);
}
/* We want zero return to mean success, unlike `re_search'. */

View File

@ -0,0 +1,59 @@
/* Definition of `struct sigcontext' for Linux/ARM
Copyright (C) 1996, 1997, 1998 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
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* The format of struct sigcontext changed between 2.0 and 2.1 kernels.
Fortunately 2.0 puts a magic number in the first word and this is not
a legal value for `trap_no', so we can tell them apart. */
union k_sigcontext
{
struct
{
unsigned long int trap_no;
unsigned long int error_code;
unsigned long int oldmask;
unsigned long int arm_r0;
unsigned long int arm_r1;
unsigned long int arm_r2;
unsigned long int arm_r3;
unsigned long int arm_r4;
unsigned long int arm_r5;
unsigned long int arm_r6;
unsigned long int arm_r7;
unsigned long int arm_r8;
unsigned long int arm_r9;
unsigned long int arm_r10;
unsigned long int arm_fp;
unsigned long int arm_ip;
unsigned long int arm_sp;
unsigned long int arm_lr;
unsigned long int arm_pc;
unsigned long int arm_cpsr;
} v21;
struct
{
unsigned long int magic;
struct pt_regs reg;
unsigned long int trap_no;
unsigned long int error_code;
unsigned long int oldmask;
} v20;
};
#define SIGCONTEXT_2_0_MAGIC 0x4B534154

View File

@ -19,51 +19,13 @@
#include <signal.h>
#include <asm/ptrace.h>
union k_sigcontext
{
struct
{
unsigned long int trap_no;
unsigned long int error_code;
unsigned long int oldmask;
unsigned long int arm_r0;
unsigned long int arm_r1;
unsigned long int arm_r2;
unsigned long int arm_r3;
unsigned long int arm_r4;
unsigned long int arm_r5;
unsigned long int arm_r6;
unsigned long int arm_r7;
unsigned long int arm_r8;
unsigned long int arm_r9;
unsigned long int arm_r10;
unsigned long int arm_fp;
unsigned long int arm_ip;
unsigned long int arm_sp;
unsigned long int arm_lr;
unsigned long int arm_pc;
unsigned long int arm_cpsr;
} v21;
struct
{
unsigned long int magic;
struct pt_regs reg;
unsigned long int trap_no;
unsigned long int error_code;
unsigned long int oldmask;
} v20;
};
#include <bits/armsigctx.h>
void
profil_counter (int signo, int _a2, int _a3, int _a4, union k_sigcontext sc)
{
/* The format of struct sigcontext changed between 2.0 and 2.1 kernels.
Fortunately 2.0 puts a magic number in the first word and this is not
a legal value for `trap_no', so we can tell them apart. */
void *pc;
if (sc.v20.magic == 0x4B534154)
if (sc.v20.magic == SIGCONTEXT_2_0_MAGIC)
pc = (void *) sc.v20.reg.ARM_pc;
else
pc = (void *) sc.v21.arm_pc;

View File

@ -20,6 +20,7 @@
#include <sys/uio.h>
#include <stdio-common/_itoa.h>
#include <bits/armsigctx.h>
/* We will print the register dump in this format:
@ -43,7 +44,7 @@ hexvalue (unsigned long int value, char *buf, size_t len)
}
static void
register_dump (int fd, struct sigcontext *ctx)
register_dump (int fd, union k_sigcontext *ctx)
{
char regs[20][8];
struct iovec iov[97];
@ -59,26 +60,52 @@ register_dump (int fd, struct sigcontext *ctx)
++nr
/* Generate strings of register contents. */
hexvalue (ctx->arm_r0, regs[0], 8);
hexvalue (ctx->arm_r1, regs[1], 8);
hexvalue (ctx->arm_r2, regs[2], 8);
hexvalue (ctx->arm_r3, regs[3], 8);
hexvalue (ctx->arm_r4, regs[4], 8);
hexvalue (ctx->arm_r5, regs[5], 8);
hexvalue (ctx->arm_r6, regs[6], 8);
hexvalue (ctx->arm_r7, regs[7], 8);
hexvalue (ctx->arm_r8, regs[8], 8);
hexvalue (ctx->arm_r9, regs[9], 8);
hexvalue (ctx->arm_r10, regs[10], 4);
hexvalue (ctx->arm_fp, regs[11], 4);
hexvalue (ctx->arm_ip, regs[12], 4);
hexvalue (ctx->arm_sp, regs[13], 4);
hexvalue (ctx->arm_lr, regs[14], 4);
hexvalue (ctx->arm_pc, regs[15], 4);
hexvalue (ctx->arm_cpsr, regs[16], 8);
hexvalue (ctx->trap_no, regs[17], 8);
hexvalue (ctx->error_code, regs[18], 8);
hexvalue (ctx->old_mask, regs[19], 8);
if (ctx->v20.magic == SIGCONTEXT_2_0_MAGIC)
{
hexvalue (ctx->v20.reg.ARM_r0, regs[0], 8);
hexvalue (ctx->v20.reg.ARM_r1, regs[1], 8);
hexvalue (ctx->v20.reg.ARM_r2, regs[2], 8);
hexvalue (ctx->v20.reg.ARM_r3, regs[3], 8);
hexvalue (ctx->v20.reg.ARM_r4, regs[4], 8);
hexvalue (ctx->v20.reg.ARM_r5, regs[5], 8);
hexvalue (ctx->v20.reg.ARM_r6, regs[6], 8);
hexvalue (ctx->v20.reg.ARM_r7, regs[7], 8);
hexvalue (ctx->v20.reg.ARM_r8, regs[8], 8);
hexvalue (ctx->v20.reg.ARM_r9, regs[9], 8);
hexvalue (ctx->v20.reg.ARM_r10, regs[10], 4);
hexvalue (ctx->v20.reg.ARM_fp, regs[11], 4);
hexvalue (ctx->v20.reg.ARM_ip, regs[12], 4);
hexvalue (ctx->v20.reg.ARM_sp, regs[13], 4);
hexvalue (ctx->v20.reg.ARM_lr, regs[14], 4);
hexvalue (ctx->v20.reg.ARM_pc, regs[15], 4);
hexvalue (ctx->v20.reg.ARM_cpsr, regs[16], 8);
hexvalue (ctx->v20.trap_no, regs[17], 8);
hexvalue (ctx->v20.error_code, regs[18], 8);
hexvalue (ctx->v20.oldmask, regs[19], 8);
}
else
{
hexvalue (ctx->v21.arm_r0, regs[0], 8);
hexvalue (ctx->v21.arm_r1, regs[1], 8);
hexvalue (ctx->v21.arm_r2, regs[2], 8);
hexvalue (ctx->v21.arm_r3, regs[3], 8);
hexvalue (ctx->v21.arm_r4, regs[4], 8);
hexvalue (ctx->v21.arm_r5, regs[5], 8);
hexvalue (ctx->v21.arm_r6, regs[6], 8);
hexvalue (ctx->v21.arm_r7, regs[7], 8);
hexvalue (ctx->v21.arm_r8, regs[8], 8);
hexvalue (ctx->v21.arm_r9, regs[9], 8);
hexvalue (ctx->v21.arm_r10, regs[10], 4);
hexvalue (ctx->v21.arm_fp, regs[11], 4);
hexvalue (ctx->v21.arm_ip, regs[12], 4);
hexvalue (ctx->v21.arm_sp, regs[13], 4);
hexvalue (ctx->v21.arm_lr, regs[14], 4);
hexvalue (ctx->v21.arm_pc, regs[15], 4);
hexvalue (ctx->v21.arm_cpsr, regs[16], 8);
hexvalue (ctx->v21.trap_no, regs[17], 8);
hexvalue (ctx->v21.error_code, regs[18], 8);
hexvalue (ctx->v21.oldmask, regs[19], 8);
}
/* Generate the output. */
ADD_STRING ("Register dump:\n\n R0: ");

View File

@ -227,7 +227,7 @@ enum
SCM_CREDENTIALS = 0x02, /* Credentials passing. */
# define SCM_CREDENTIALS SCM_CREDENTIALS
#endif
__SCM_CONNECT = 0x03, /* Data array is `struct scm_connect'. */
__SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */
};
/* User visible structure for SCM_CREDENTIALS message */