* sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags):

Add "java" and "iwmmxt".
	* sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Use <sysdep.h> for
	HWCAP values.
	(_DL_HWCAP_COUNT): Increase to 10.
	* sysdeps/unix/sysv/linux/arm/sysdep.h (HWCAP_ARM_SWP,
	HWCAP_ARM_HALF, HWCAP_ARM_THUMB, HWCAP_ARM_26BIT,
	HWCAP_ARM_FAST_MULT, HWCAP_ARM_FPA, HWCAP_ARM_VFP, HWCAP_ARM_EDSP,
	HWCAP_ARM_JAVA, HWCAP_ARM_IWMMXT): Define.
	* sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Save iWMMXt registers
	if HWCAP_ARM_IWMMXT set.  Don't include <asm/procinfo.h>.  Use
	HWCAP_ARM_VFP instead of HWCAP_VFP.
	* sysdeps/arm/eabi/__longjmp.S (__longjmp): Restore iWMMXt
	registers if HWCAP_ARM_IWMMXT set.  Don't include
	<asm/procinfo.h>.  Use HWCAP_ARM_VFP instead of HWCAP_VFP.
This commit is contained in:
Daniel Jacobowitz 2006-09-21 18:39:51 +00:00
parent 56865130d0
commit 4b860fb9c0
6 changed files with 67 additions and 25 deletions

View File

@ -1,3 +1,21 @@
2006-09-21 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags):
Add "java" and "iwmmxt".
* sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Use <sysdep.h> for
HWCAP values.
(_DL_HWCAP_COUNT): Increase to 10.
* sysdeps/unix/sysv/linux/arm/sysdep.h (HWCAP_ARM_SWP,
HWCAP_ARM_HALF, HWCAP_ARM_THUMB, HWCAP_ARM_26BIT,
HWCAP_ARM_FAST_MULT, HWCAP_ARM_FPA, HWCAP_ARM_VFP, HWCAP_ARM_EDSP,
HWCAP_ARM_JAVA, HWCAP_ARM_IWMMXT): Define.
* sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Save iWMMXt registers
if HWCAP_ARM_IWMMXT set. Don't include <asm/procinfo.h>. Use
HWCAP_ARM_VFP instead of HWCAP_VFP.
* sysdeps/arm/eabi/__longjmp.S (__longjmp): Restore iWMMXt
registers if HWCAP_ARM_IWMMXT set. Don't include
<asm/procinfo.h>. Use HWCAP_ARM_VFP instead of HWCAP_VFP.
2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/arm/dl-machine.h (elf_machine_rel): Handle undefined

View File

@ -1,5 +1,5 @@
/* longjmp for ARM.
Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
Copyright (C) 1997, 1998, 2005, 2006 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
@ -21,8 +21,6 @@
#define _SETJMP_H
#define _ASM
#include <bits/setjmp.h>
#define __ASSEMBLY__
#include <asm/procinfo.h>
#include <rtld-global-offsets.h>
/* __longjmp(jmpbuf, val) */
@ -53,7 +51,7 @@ ENTRY (__longjmp)
#endif
#endif
tst a2, #HWCAP_VFP
tst a2, #HWCAP_ARM_VFP
beq Lno_vfp
/* Restore the VFP registers. */
@ -65,6 +63,19 @@ ENTRY (__longjmp)
mcr p10, 7, r1, cr1, cr0, 0
Lno_vfp:
tst a2, #HWCAP_ARM_IWMMXT
beq Lno_iwmmxt
/* Restore the call-preserved iWMMXt registers. */
/* Following instructions are wldrd wr10, [ip], #8 (etc.) */
ldcl p1, cr10, [r12], #8
ldcl p1, cr11, [r12], #8
ldcl p1, cr12, [r12], #8
ldcl p1, cr13, [r12], #8
ldcl p1, cr14, [r12], #8
ldcl p1, cr15, [r12], #8
Lno_iwmmxt:
DO_RET(lr)
#ifdef IS_IN_rtld

View File

@ -1,5 +1,5 @@
/* setjmp for ARM.
Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
Copyright (C) 1997, 1998, 2005, 2006 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
@ -21,8 +21,6 @@
#define _SETJMP_H
#define _ASM
#include <bits/setjmp.h>
#define __ASSEMBLY__
#include <asm/procinfo.h>
#include <rtld-global-offsets.h>
ENTRY (__sigsetjmp)
@ -51,7 +49,7 @@ ENTRY (__sigsetjmp)
#endif
#endif
tst a3, #HWCAP_VFP
tst a3, #HWCAP_ARM_VFP
beq Lno_vfp
/* Store the VFP registers. */
@ -63,6 +61,19 @@ ENTRY (__sigsetjmp)
str r2, [ip], #4
Lno_vfp:
tst a3, #HWCAP_ARM_IWMMXT
beq Lno_iwmmxt
/* Save the call-preserved iWMMXt registers. */
/* Following instructions are wstrd wr10, [ip], #8 (etc.) */
stcl p1, cr10, [r12], #8
stcl p1, cr11, [r12], #8
stcl p1, cr12, [r12], #8
stcl p1, cr13, [r12], #8
stcl p1, cr14, [r12], #8
stcl p1, cr15, [r12], #8
Lno_iwmmxt:
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))

View File

@ -1,5 +1,5 @@
/* Data for Linux/ARM version of processor capability information.
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@ -47,11 +47,12 @@
#if !defined PROCINFO_DECL && defined SHARED
._dl_arm_cap_flags
#else
PROCINFO_CLASS const char _dl_arm_cap_flags[8][10]
PROCINFO_CLASS const char _dl_arm_cap_flags[10][10]
#endif
#ifndef PROCINFO_DECL
= {
"swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp",
"java", "iwmmxt",
}
#endif
#if !defined SHARED || defined PROCINFO_DECL

View File

@ -1,5 +1,5 @@
/* Linux/ARM version of processor capability information handling macros.
Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@ -22,8 +22,9 @@
#define _DL_PROCINFO_H 1
#include <ldsodefs.h>
#include <sysdep.h>
#define _DL_HWCAP_COUNT 8
#define _DL_HWCAP_COUNT 10
/* The kernel provides platform data but it is not interesting. */
#define _DL_HWCAP_PLATFORM 0
@ -53,19 +54,7 @@ _dl_hwcap_string (int idx)
return GLRO(dl_arm_cap_flags)[idx];
};
enum
{
HWCAP_ARM_SWP = 1 << 0,
HWCAP_ARM_HALF = 1 << 1,
HWCAP_ARM_THUMB = 1 << 2,
HWCAP_ARM_26BIT = 1 << 3,
HWCAP_ARM_FAST_MULT = 1 << 4,
HWCAP_ARM_FPA = 1 << 5,
HWCAP_ARM_VFP = 1 << 6,
HWCAP_ARM_EDSP = 1 << 7,
HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
};
#define HWCAP_IMPORTANT (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
static inline int
__attribute__ ((unused))

View File

@ -37,6 +37,18 @@
#define SYS_ify(syscall_name) (__NR_##syscall_name)
/* The following must match the kernel's <asm/procinfo.h>. */
#define HWCAP_ARM_SWP 1
#define HWCAP_ARM_HALF 2
#define HWCAP_ARM_THUMB 4
#define HWCAP_ARM_26BIT 8
#define HWCAP_ARM_FAST_MULT 16
#define HWCAP_ARM_FPA 32
#define HWCAP_ARM_VFP 64
#define HWCAP_ARM_EDSP 128
#define HWCAP_ARM_JAVA 256
#define HWCAP_ARM_IWMMXT 512
#ifdef __ASSEMBLER__
/* Linux uses a negative return value to indicate syscall errors,