2018-01-01 00:32:25 +00:00
|
|
|
/* Copyright (C) 2011-2018 Free Software Foundation, Inc.
|
2011-12-04 02:14:25 +00:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 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
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-03-09 23:56:38 +00:00
|
|
|
License along with the GNU C Library. If not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
2011-12-04 02:14:25 +00:00
|
|
|
|
|
|
|
#include <sysdeps/generic/sysdep.h>
|
|
|
|
#include <bits/wordsize.h>
|
|
|
|
#include <arch/abi.h>
|
|
|
|
|
|
|
|
#if defined __ASSEMBLER__ || defined REQUEST_ASSEMBLER_MACROS
|
|
|
|
|
2012-01-31 16:26:00 +00:00
|
|
|
#include <feedback.h>
|
2011-12-04 02:14:25 +00:00
|
|
|
|
2012-08-02 19:48:14 +00:00
|
|
|
/* Make use of .size directive. */
|
2011-12-04 02:14:25 +00:00
|
|
|
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
|
|
|
|
|
|
|
|
/* Define an entry point visible from C. */
|
|
|
|
#define ENTRY(name) \
|
2012-07-10 14:33:04 +00:00
|
|
|
.globl C_SYMBOL_NAME(name); \
|
2012-08-04 13:57:37 +00:00
|
|
|
.type C_SYMBOL_NAME(name),@function; \
|
2011-12-04 02:14:25 +00:00
|
|
|
.align 8; \
|
|
|
|
C_LABEL(name) \
|
|
|
|
cfi_startproc; \
|
|
|
|
CALL_MCOUNT
|
|
|
|
|
|
|
|
#undef END
|
|
|
|
#define END(name) \
|
|
|
|
cfi_endproc; \
|
|
|
|
ASM_SIZE_DIRECTIVE(name)
|
|
|
|
|
|
|
|
/* Since C identifiers are not normally prefixed with an underscore
|
|
|
|
on this system, the asm identifier `syscall_error' intrudes on the
|
|
|
|
C name space. Make sure we use an innocuous name. */
|
|
|
|
#define syscall_error __syscall_error
|
|
|
|
#define mcount __mcount
|
|
|
|
|
|
|
|
/* If compiled for profiling, call `mcount' at the start of each function.
|
|
|
|
The mcount code requires the caller PC in r10. The `mcount' function
|
|
|
|
sets lr back to the value r10 had on entry when it returns. */
|
|
|
|
#ifdef PROF
|
|
|
|
#define CALL_MCOUNT { move r10, lr; jal mcount }
|
|
|
|
#else
|
|
|
|
#define CALL_MCOUNT /* Do nothing. */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Local label name for asm code. */
|
|
|
|
#define L(name) .L##name
|
|
|
|
|
|
|
|
/* Specify the size in bytes of a machine register. */
|
|
|
|
#define REGSIZE 8
|
|
|
|
|
|
|
|
/* Provide "pointer-oriented" instruction variants. These differ not
|
2012-09-24 20:03:33 +00:00
|
|
|
just for tilepro vs tilegx, but also for tilegx -m64 vs -m32. */
|
Remove tilepro-*-linux-gnu support
As from previous discussions [1] this patch removes tileprox-*-linux-gnu
support from GLIBC. This patch is a straigthfoward one, which just remove
tilepro specific implementation and configurations (no sysdep simplfication
or reorganization is done).
* README: Remove tilepro-*-linux-gnu from supported architecture.
* scripts/build-many-glibcs.py: Likewise.
* sysdeps/tile/__tls_get_addr.S (__tls_get_addr): Likewise.
* sysdeps/tile/crti.S (PREINIT_FUNCTION): Likewise.
* sysdeps/tile/dl-machine.h (ELF_MACHINE_NAME,
elf_machine_matches_host, elf_machine_dynamic,
elf_machine_load_address, elf_machine_runtime_setup, reloc_howto
howto, elf_machine_rela): Likewise
* sysdeps/tile/dl-start.S (_start): Likewise.
* sysdeps/tile/memcmp.c (DBLALIGN, REVBYTES): Likewise.
* sysdeps/tile/memcopy.h (MEMCPY_OK_FOR_FWD_MEMMOVE,
MEMCPY_OK_FOR_FWD_MEMMOVE, op_t): Likewise.
* sysdeps/tile/nptl/pthread_spin_lock.c (TNS, CMPTNS): Likewise.
* sysdeps/tile/nptl/pthread_spin_trylock.c (TNS): Likewise.
* sysdeps/tile/nptl/pthread_spin_unlock.c (pthread_spin_unlock):
Likewise.
* sysdeps/tile/nptl/tls.h (DB_THREAD_SELF): Likewise.
* sysdeps/tile/preconfigure: Likewise.
* sysdeps/tile/stackguard-macros.h (STACK_CHK_GUARD,
POINTER_CHK_GUARD): Likewise.
* sysdeps/tile/stackinfo.h (__stackinfo_sub): Likewise.
* sysdeps/tile/start.S (_start): Likewise.
* sysdeps/tile/tls-macros.h (TLS_GD_OFFSET, TLS_IE_OFFSET, _TLS_LE):
Likewise.
* sysdeps/tile/sysdep.h (REGSIZE): Likewise.
(LD, LD4U, ST, ST4, BNEZ, BEQZ, BEQZT, BGTZ, CMPEQI, CMPEQ, CMOVEQZ,
CMOVNEZ): Remove.
* sysdeps/unix/sysv/linux/tile/bits/environments.h
(__ILP32_OFF32_CFLAGS, __ILP32_OFFBIG_CFLAGS, __ILP32_OFF32_LDFLAGS,
__ILP32_OFFBIG_LDFLAGS, __LP64_OFF64_CFLAGS, __LP64_OFF64_LDFLAGS):
Likewise.
* sysdeps/tile/wordcopy.c (DBLALIGN): Likewise.
* sysdeps/tile/tilepro/Implies: Remove file.
* sysdeps/tile/tilepro/atomic-machine.h: Likewise.
* sysdeps/tile/tilepro/bits/wordsize.h: Likewise.
* sysdeps/tile/tilepro/memchr.c: Likewise.
* sysdeps/tile/tilepro/memcpy.S: Likewise.
* sysdeps/tile/tilepro/memset.c: Likewise.
* sysdeps/tile/tilepro/memusage.h: Likewise.
* sysdeps/tile/tilepro/rawmemchr.c: Likewise.
* sysdeps/tile/tilepro/strchr.c: Likewise.
* sysdeps/tile/tilepro/strchrnul.c: Likewise.
* sysdeps/tile/tilepro/strlen.c: Likewise.
* sysdeps/tile/tilepro/strrchr.c: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/Implies: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/c++-types.data: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/jmp_buf-macros.h: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/ld.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/ldconfig.h: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libBrokenLocale.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libanl.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libcrypt.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libdl.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libnsl.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libresolv.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/librt.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libthread_db.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libutil.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/register-dump.h: Likewise.
* sysdeps/unix/sysv/linux/tile/sysconf.c (linux_sysconf): Remove
tilepro mention in comment.
[1] https://sourceware.org/ml/libc-alpha/2017-12/msg00038.html
2017-12-12 21:15:45 +00:00
|
|
|
#if __WORDSIZE == 32
|
2011-12-04 02:14:25 +00:00
|
|
|
#define ADD_PTR addx
|
|
|
|
#define ADDI_PTR addxi
|
|
|
|
#define ADDLI_PTR addxli
|
|
|
|
#define LD_PTR ld4s
|
|
|
|
#define ST_PTR st4
|
|
|
|
#define SHL_PTR_ADD shl2add
|
|
|
|
#else
|
|
|
|
#define ADD_PTR add
|
|
|
|
#define ADDI_PTR addi
|
|
|
|
#define ADDLI_PTR addli
|
|
|
|
#define LD_PTR LD
|
|
|
|
#define ST_PTR ST
|
|
|
|
#define SHL_PTR_ADD shl3add
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __ASSEMBLER__ */
|