diff options
Diffstat (limited to 'libc')
28 files changed, 0 insertions, 2075 deletions
diff --git a/libc/string/sh64/Makefile b/libc/string/sh64/Makefile deleted file mode 100644 index 0a95346fd..000000000 --- a/libc/string/sh64/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# Makefile for uClibc -# -# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> -# -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -# - -top_srcdir:=../../../ -top_builddir:=../../../ -all: objs -include $(top_builddir)Rules.mak -include ../Makefile.in -include $(top_srcdir)Makerules diff --git a/libc/string/sh64/memcpy.S b/libc/string/sh64/memcpy.S deleted file mode 100644 index 470784ecd..000000000 --- a/libc/string/sh64/memcpy.S +++ /dev/null @@ -1,205 +0,0 @@ -/* Cloned and hacked for uClibc by Paul Mundt, December 2003 */ -/* Modified by SuperH, Inc. September 2003 */ -! -! Fast SH memcpy -! -! by Toshiyasu Morita (tm@netcom.com) -! hacked by J"orn Rernnecke (joern.rennecke@superh.com) ("o for o-umlaut) -! SH5 code Copyright 2002 SuperH Ltd. -! -! Entry: ARG0: destination pointer -! ARG1: source pointer -! ARG2: byte count -! -! Exit: RESULT: destination pointer -! any other registers in the range r0-r7: trashed -! -! Notes: Usually one wants to do small reads and write a longword, but -! unfortunately it is difficult in some cases to concatanate bytes -! into a longword on the SH, so this does a longword read and small -! writes. -! -! This implementation makes two assumptions about how it is called: -! -! 1.: If the byte count is nonzero, the address of the last byte to be -! copied is unsigned greater than the address of the first byte to -! be copied. This could be easily swapped for a signed comparison, -! but the algorithm used needs some comparison. -! -! 2.: When there are two or three bytes in the last word of an 11-or-more -! bytes memory chunk to b copied, the rest of the word can be read -! without side effects. -! This could be easily changed by increasing the minumum size of -! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, -! however, this would cost a few extra cyles on average. -! For SHmedia, the assumption is that any quadword can be read in its -! enirety if at least one byte is included in the copy. -! - -#include <features.h> - - .section .text..SHmedia32,"ax" - .globl memcpy - .type memcpy, @function - .align 5 - -memcpy: - -#define LDUAQ(P,O,D0,D1) ldlo.q P,O,D0; ldhi.q P,O+7,D1 -#define STUAQ(P,O,D0,D1) stlo.q P,O,D0; sthi.q P,O+7,D1 -#define LDUAL(P,O,D0,D1) ldlo.l P,O,D0; ldhi.l P,O+3,D1 -#define STUAL(P,O,D0,D1) stlo.l P,O,D0; sthi.l P,O+3,D1 - - ld.b r3,0,r63 - pta/l Large,tr0 - movi 25,r0 - bgeu/u r4,r0,tr0 - nsb r4,r0 - shlli r0,5,r0 - movi (L1-L0+63*32 + 1) & 0xffff,r1 - sub r1, r0, r0 -L0: ptrel r0,tr0 - add r2,r4,r5 - ptabs r18,tr1 - add r3,r4,r6 - blink tr0,r63 - -/* Rearranged to make cut2 safe */ - .balign 8 -L4_7: /* 4..7 byte memcpy cntd. */ - stlo.l r2, 0, r0 - or r6, r7, r6 - sthi.l r5, -1, r6 - stlo.l r5, -4, r6 - blink tr1,r63 - - .balign 8 -L1: /* 0 byte memcpy */ - nop - blink tr1,r63 - nop - nop - nop - nop - -L2_3: /* 2 or 3 byte memcpy cntd. */ - st.b r5,-1,r6 - blink tr1,r63 - - /* 1 byte memcpy */ - ld.b r3,0,r0 - st.b r2,0,r0 - blink tr1,r63 - -L8_15: /* 8..15 byte memcpy cntd. */ - stlo.q r2, 0, r0 - or r6, r7, r6 - sthi.q r5, -1, r6 - stlo.q r5, -8, r6 - blink tr1,r63 - - /* 2 or 3 byte memcpy */ - ld.b r3,0,r0 - ld.b r2,0,r63 - ld.b r3,1,r1 - st.b r2,0,r0 - pta/l L2_3,tr0 - ld.b r6,-1,r6 - st.b r2,1,r1 - blink tr0, r63 - - /* 4 .. 7 byte memcpy */ - LDUAL (r3, 0, r0, r1) - pta L4_7, tr0 - ldlo.l r6, -4, r7 - or r0, r1, r0 - sthi.l r2, 3, r0 - ldhi.l r6, -1, r6 - blink tr0, r63 - - /* 8 .. 15 byte memcpy */ - LDUAQ (r3, 0, r0, r1) - pta L8_15, tr0 - ldlo.q r6, -8, r7 - or r0, r1, r0 - sthi.q r2, 7, r0 - ldhi.q r6, -1, r6 - blink tr0, r63 - - /* 16 .. 24 byte memcpy */ - LDUAQ (r3, 0, r0, r1) - LDUAQ (r3, 8, r8, r9) - or r0, r1, r0 - sthi.q r2, 7, r0 - or r8, r9, r8 - sthi.q r2, 15, r8 - ldlo.q r6, -8, r7 - ldhi.q r6, -1, r6 - stlo.q r2, 8, r8 - stlo.q r2, 0, r0 - or r6, r7, r6 - sthi.q r5, -1, r6 - stlo.q r5, -8, r6 - blink tr1,r63 - -Large: - ld.b r2, 0, r63 - pta/l Loop_ua, tr1 - ori r3, -8, r7 - sub r2, r7, r22 - sub r3, r2, r6 - add r2, r4, r5 - ldlo.q r3, 0, r0 - addi r5, -16, r5 - movi 64+8, r27 /* could subtract r7 from that. */ - stlo.q r2, 0, r0 - sthi.q r2, 7, r0 - ldx.q r22, r6, r0 - bgtu/l r27, r4, tr1 - - addi r5, -48, r27 - pta/l Loop_line, tr0 - addi r6, 64, r36 - addi r6, -24, r19 - addi r6, -16, r20 - addi r6, -8, r21 - -Loop_line: - ldx.q r22, r36, r63 - alloco r22, 32 - addi r22, 32, r22 - ldx.q r22, r19, r23 - sthi.q r22, -25, r0 - ldx.q r22, r20, r24 - ldx.q r22, r21, r25 - stlo.q r22, -32, r0 - ldx.q r22, r6, r0 - sthi.q r22, -17, r23 - sthi.q r22, -9, r24 - sthi.q r22, -1, r25 - stlo.q r22, -24, r23 - stlo.q r22, -16, r24 - stlo.q r22, -8, r25 - bgeu r27, r22, tr0 - -Loop_ua: - addi r22, 8, r22 - sthi.q r22, -1, r0 - stlo.q r22, -8, r0 - ldx.q r22, r6, r0 - bgtu/l r5, r22, tr1 - - add r3, r4, r7 - ldlo.q r7, -8, r1 - sthi.q r22, 7, r0 - ldhi.q r7, -1, r7 - ptabs r18,tr1 - stlo.q r22, 0, r0 - or r1, r7, r1 - sthi.q r5, 15, r1 - stlo.q r5, 8, r1 - blink tr1, r63 - - .size memcpy,.-memcpy - -libc_hidden_def(memcpy) diff --git a/libc/string/sh64/memset.S b/libc/string/sh64/memset.S deleted file mode 100644 index 1b8812cd6..000000000 --- a/libc/string/sh64/memset.S +++ /dev/null @@ -1,97 +0,0 @@ -/* Cloned and hacked for uClibc by Paul Mundt, December 2003 */ -/* Modified by SuperH, Inc. September 2003 */ -! -! Fast SH memset -! -! by Toshiyasu Morita (tm@netcom.com) -! -! SH5 code by J"orn Rennecke (joern.rennecke@superh.com) -! Copyright 2002 SuperH Ltd. -! - -#include <features.h> -#include <endian.h> - -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define SHHI shlld -#define SHLO shlrd -#else -#define SHHI shlrd -#define SHLO shlld -#endif - - .section .text..SHmedia32,"ax" - .globl memset - .type memset, @function - - .align 5 - -memset: - pta/l multiquad, tr0 - andi r2, 7, r22 - ptabs r18, tr2 - mshflo.b r3,r3,r3 - add r4, r22, r23 - mperm.w r3, r63, r3 /* Fill pattern now in every byte of r3 */ - - movi 8, r9 - bgtu/u r23, r9, tr0 /* multiquad */ - - beqi/u r4, 0, tr2 /* Return with size 0 - ensures no mem accesses */ - ldlo.q r2, 0, r7 - shlli r4, 2, r4 - movi -1, r8 - SHHI r8, r4, r8 - SHHI r8, r4, r8 - mcmv r7, r8, r3 - stlo.q r2, 0, r3 - blink tr2, r63 - -multiquad: - pta/l lastquad, tr0 - stlo.q r2, 0, r3 - shlri r23, 3, r24 - add r2, r4, r5 - beqi/u r24, 1, tr0 /* lastquad */ - pta/l loop, tr1 - sub r2, r22, r25 - andi r5, -8, r20 /* calculate end address and */ - addi r20, -7*8, r8 /* loop end address; This might overflow, so we need - to use a different test before we start the loop - */ - bge/u r24, r9, tr1 /* loop */ - st.q r25, 8, r3 - st.q r20, -8, r3 - shlri r24, 1, r24 - beqi/u r24, 1, tr0 /* lastquad */ - st.q r25, 16, r3 - st.q r20, -16, r3 - beqi/u r24, 2, tr0 /* lastquad */ - st.q r25, 24, r3 - st.q r20, -24, r3 -lastquad: - sthi.q r5, -1, r3 - blink tr2,r63 - -loop: -!!! alloco r25, 32 /* QQQ comment out for short-term fix to SHUK #3895. - QQQ commenting out is locically correct, but sub-optimal - QQQ Sean McGoogan - 4th April 2003. */ - st.q r25, 8, r3 - st.q r25, 16, r3 - st.q r25, 24, r3 - st.q r25, 32, r3 - addi r25, 32, r25 - bgeu/l r8, r25, tr1 /* loop */ - - st.q r20, -40, r3 - st.q r20, -32, r3 - st.q r20, -24, r3 - st.q r20, -16, r3 - st.q r20, -8, r3 - sthi.q r5, -1, r3 - blink tr2,r63 - - .size memset,.-memset - -libc_hidden_def(memset) diff --git a/libc/string/sh64/strcpy.S b/libc/string/sh64/strcpy.S deleted file mode 100644 index f317707b7..000000000 --- a/libc/string/sh64/strcpy.S +++ /dev/null @@ -1,102 +0,0 @@ -/* Cloned and hacked for uClibc by Paul Mundt, December 2003 */ -/* Modified by SuperH, Inc. September 2003 */ -! Entry: arg0: destination -! arg1: source -! Exit: result: destination -! -! SH5 code Copyright 2002 SuperH Ltd. - -#include <features.h> -#include <endian.h> - -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define SHHI shlld -#define SHLO shlrd -#else -#define SHHI shlrd -#define SHLO shlld -#endif - - .section .text..SHmedia32,"ax" - .globl strcpy - .type strcpy, @function - .align 5 - -strcpy: - - pta/l shortstring,tr1 - ldlo.q r3,0,r4 - ptabs r18,tr4 - shlli r3,3,r7 - addi r2, 8, r0 - mcmpeq.b r4,r63,r6 - SHHI r6,r7,r6 - bnei/u r6,0,tr1 /* shortstring */ - pta/l no_lddst, tr2 - ori r3,-8,r23 - sub r2, r23, r0 - sub r3, r2, r21 - addi r21, 8, r20 - ldx.q r0, r21, r5 - pta/l loop, tr0 - ori r2,-8,r22 - mcmpeq.b r5, r63, r6 - bgt/u r22, r23, tr2 /* no_lddst */ - - /* r22 < r23 : Need to do a load from the destination. */ - /* r22 == r23 : Doesn't actually need to load from destination, */ - /* but still can be handled here. */ - ldlo.q r2, 0, r9 - movi -1, r8 - SHLO r8, r7, r8 - mcmv r4, r8, r9 - stlo.q r2, 0, r9 - beqi/l r6, 0, tr0 /* loop */ - - add r5, r63, r4 - addi r0, 8, r0 - blink tr1, r63 /* shortstring */ -no_lddst: - /* r22 > r23: note that for r22 == r23 the sthi.q would clobber */ - /* bytes before the destination region. */ - stlo.q r2, 0, r4 - SHHI r4, r7, r4 - sthi.q r0, -1, r4 - beqi/l r6, 0, tr0 /* loop */ - - add r5, r63, r4 - addi r0, 8, r0 -shortstring: -#if __BYTE_ORDER != __LITTLE_ENDIAN - pta/l shortstring2,tr1 - byterev r4,r4 -#endif -shortstring2: - st.b r0,-8,r4 - andi r4,0xff,r5 - shlri r4,8,r4 - addi r0,1,r0 - bnei/l r5,0,tr1 - blink tr4,r63 /* return */ - - .balign 8 -loop: - stlo.q r0, 0, r5 - ldx.q r0, r20, r4 - addi r0, 16, r0 - sthi.q r0, -9, r5 - mcmpeq.b r4, r63, r6 - bnei/u r6, 0, tr1 /* shortstring */ - ldx.q r0, r21, r5 - stlo.q r0, -8, r4 - sthi.q r0, -1, r4 - mcmpeq.b r5, r63, r6 - beqi/l r6, 0, tr0 /* loop */ - - add r5, r63, r4 - addi r0, 8, r0 - blink tr1, r63 /* shortstring */ - - .size strcpy,.-strcpy - -libc_hidden_def(strcpy) diff --git a/libc/string/sh64/strlen.S b/libc/string/sh64/strlen.S deleted file mode 100644 index 18f4164ff..000000000 --- a/libc/string/sh64/strlen.S +++ /dev/null @@ -1,63 +0,0 @@ -/* vi: set sw=8 ts=8: */ -/* - * libc/string/sh64/strlen.S - * - * Simplistic strlen() implementation for SHmedia. - * - * Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org> - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. The name of the above contributors may not be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <features.h> - - .section .text..SHmedia32,"ax" - .globl strlen - .type strlen,@function - - .balign 16 -strlen: - ptabs r18, tr4 - - /* - * Note: We could easily deal with the NULL case here with a simple - * sanity check, though it seems that the behavior we want is to fault - * in the event that r2 == NULL, so we don't bother. - */ -/* beqi r2, 0, tr4 */ ! Sanity check - - movi -1, r0 - pta/l loop, tr0 -loop: - ld.b r2, 0, r1 - addi r2, 1, r2 - addi r0, 1, r0 - bnei/l r1, 0, tr0 - - or r0, r63, r2 - blink tr4, r63 - - .size strlen,.-strlen - -libc_hidden_def(strlen) diff --git a/libc/sysdeps/linux/sh64/Makefile b/libc/sysdeps/linux/sh64/Makefile deleted file mode 100644 index ecbf14228..000000000 --- a/libc/sysdeps/linux/sh64/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# Makefile for uClibc -# -# Copyright (C) 2001 SuperH (UK) Ltd. -# Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org> -# -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - -top_srcdir=../../../../ -top_builddir=../../../../ -all: objs -include $(top_builddir)Rules.mak -include Makefile.arch -include $(top_srcdir)Makerules -TOPDIR=../../../../ -include $(TOPDIR)Rules.mak diff --git a/libc/sysdeps/linux/sh64/Makefile.arch b/libc/sysdeps/linux/sh64/Makefile.arch deleted file mode 100644 index 02fcd0b18..000000000 --- a/libc/sysdeps/linux/sh64/Makefile.arch +++ /dev/null @@ -1,10 +0,0 @@ -# Makefile for uClibc -# -# Copyright (C) 2008 Paul Mundt <lethal@linux-sh.org> -# -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -# - -CSRC-y := __init_brk.c brk.c sbrk.c syscall.c - -SSRC-y := setjmp.S __longjmp.S diff --git a/libc/sysdeps/linux/sh64/__init_brk.c b/libc/sysdeps/linux/sh64/__init_brk.c deleted file mode 100644 index 8a41eb3c4..000000000 --- a/libc/sysdeps/linux/sh64/__init_brk.c +++ /dev/null @@ -1,26 +0,0 @@ -/* From libc-5.3.12 */ - -#include <errno.h> -#include <unistd.h> -#include <sys/syscall.h> - -void * __curbrk attribute_hidden = 0; - -#define __NR__brk __NR_brk -attribute_hidden _syscall1(void *, _brk, void *, ptr) - -extern int __init_brk (void) attribute_hidden; -int -__init_brk (void) -{ - if (__curbrk == 0) - { - __curbrk = _brk(0); - if (__curbrk == 0) - { - __set_errno(ENOMEM); - return -1; - } - } - return 0; -} diff --git a/libc/sysdeps/linux/sh64/__longjmp.S b/libc/sysdeps/linux/sh64/__longjmp.S deleted file mode 100644 index 84343d1bf..000000000 --- a/libc/sysdeps/linux/sh64/__longjmp.S +++ /dev/null @@ -1,140 +0,0 @@ -/* __longjmp for SH-5. - Copyright (C) 1999, 2000 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, - see <http://www.gnu.org/licenses/>. */ - - -#define _SETJMP_H -#define _ASM -#include <bits/setjmp.h> - - -#define INTEGER(reg,offset) ld.q r2, offset*8, reg -#define DOUBLE(reg,offset) fld.d r2, offset*8, reg - - - .file "__longjmp.S" - - .section .text64,"xa" - .align 2 - - .global __longjmp - .type __longjmp,@function - -__longjmp: - /* - * extern void __longjmp(jmp_buf env, int val); - * - * r2 == env - * r3 == val - * r4 == temporary - */ - - /* callee-save registers R10-R16 */ - INTEGER(r10, __SETJMP_INT(0)) - INTEGER(r11, __SETJMP_INT(1)) - INTEGER(r12, __SETJMP_INT(2)) - INTEGER(r13, __SETJMP_INT(3)) - INTEGER(r14, __SETJMP_INT(4)) - INTEGER(r15, __SETJMP_INT(5)) - INTEGER(r16, __SETJMP_INT(6)) - - /* callee-save registers R28-R35 */ - INTEGER(r28, __SETJMP_INT(7)) - INTEGER(r29, __SETJMP_INT(8)) - INTEGER(r30, __SETJMP_INT(9)) - INTEGER(r31, __SETJMP_INT(10)) - INTEGER(r32, __SETJMP_INT(11)) - INTEGER(r33, __SETJMP_INT(12)) - INTEGER(r34, __SETJMP_INT(13)) - INTEGER(r35, __SETJMP_INT(14)) - - /* callee-save registers R44-R59 */ - INTEGER(r44, __SETJMP_INT(15)) - INTEGER(r45, __SETJMP_INT(16)) - INTEGER(r46, __SETJMP_INT(17)) - INTEGER(r47, __SETJMP_INT(18)) - INTEGER(r48, __SETJMP_INT(19)) - INTEGER(r49, __SETJMP_INT(20)) - INTEGER(r50, __SETJMP_INT(21)) - INTEGER(r51, __SETJMP_INT(22)) - INTEGER(r52, __SETJMP_INT(23)) - INTEGER(r53, __SETJMP_INT(24)) - INTEGER(r54, __SETJMP_INT(25)) - INTEGER(r55, __SETJMP_INT(26)) - INTEGER(r56, __SETJMP_INT(27)) - INTEGER(r57, __SETJMP_INT(28)) - INTEGER(r58, __SETJMP_INT(29)) - INTEGER(r59, __SETJMP_INT(30)) - - #if __SETJMP_NUM_INT != 31 - #error __SETJMP_NUM_INT does agree with expected value - #endif - -#if __SETJMP_NUM_DBL > 0 - /* callee-save registers FR12-FR15 */ - DOUBLE(d12, __SETJMP_DBL(0)) - DOUBLE(d14, __SETJMP_DBL(1)) - - /* callee-save registers FR36-FR63 */ - DOUBLE(d36, __SETJMP_DBL(2)) - DOUBLE(d38, __SETJMP_DBL(3)) - DOUBLE(d40, __SETJMP_DBL(4)) - DOUBLE(d42, __SETJMP_DBL(5)) - DOUBLE(d44, __SETJMP_DBL(6)) - DOUBLE(d46, __SETJMP_DBL(7)) - DOUBLE(d48, __SETJMP_DBL(8)) - DOUBLE(d50, __SETJMP_DBL(9)) - DOUBLE(d52, __SETJMP_DBL(10)) - DOUBLE(d54, __SETJMP_DBL(11)) - DOUBLE(d56, __SETJMP_DBL(12)) - DOUBLE(d58, __SETJMP_DBL(13)) - DOUBLE(d60, __SETJMP_DBL(14)) - DOUBLE(d62, __SETJMP_DBL(15)) - - #if __SETJMP_NUM_DBL != 16 - #error __SETJMP_NUM_DBL does agree with expected value - #endif - -#endif /* __SETJMP_NUM_DBL > 0 */ - - /* callee-save registers TR5-TR7 */ - INTEGER(r4, __SETJMP_TRG(0)) - ptabs r4, tr5 - INTEGER(r4, __SETJMP_TRG(1)) - ptabs r4, tr6 - INTEGER(r4, __SETJMP_TRG(2)) - ptabs r4, tr7 - - #if __SETJMP_NUM_TRG != 3 - #error __SETJMP_NUM_TRG does agree with expected value - #endif - - /* restore Linkage Register (LR) for __longjmp return */ - INTEGER(r18, __SETJMP_LR) - ptabs/l r18, tr0 - - /* - * must ensure __longjmp() never returns 0. - * if 'val' == 0, then return 1. - */ - cmpeq r3, r63, r2 /* r2 = (r3==0) ? 1 : 0; */ - add.l r3, r2, r2 /* return value */ - - /* return to caller */ - blink tr0, r63 - -libc_hidden_def(__longjmp) diff --git a/libc/sysdeps/linux/sh64/bits/endian.h b/libc/sysdeps/linux/sh64/bits/endian.h deleted file mode 100644 index ae7e3bb2d..000000000 --- a/libc/sysdeps/linux/sh64/bits/endian.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * libc/sysdeps/linux/sh64/bits/endian.h - * - * Copyright (C) 2003 Paul Mundt - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License. See the file COPYING.LIB in the main - * directory of this archive for more details. - */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#ifdef __LITTLE_ENDIAN__ -# define __BYTE_ORDER __LITTLE_ENDIAN -#else -# define __BYTE_ORDER __BIG_ENDIAN -#endif - diff --git a/libc/sysdeps/linux/sh64/bits/fcntl.h b/libc/sysdeps/linux/sh64/bits/fcntl.h deleted file mode 100644 index b319e8bcd..000000000 --- a/libc/sysdeps/linux/sh64/bits/fcntl.h +++ /dev/null @@ -1,218 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998, 2000 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 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 - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _FCNTL_H -# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." -#endif - - -#include <sys/types.h> - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 - -#ifdef __USE_GNU -# define O_DIRECT 040000 /* Direct disk access. */ -# define O_DIRECTORY 0200000 /* Must be a directory. */ -# define O_NOFOLLOW 0400000 /* Do not follow links. */ -# define O_NOATIME 01000000 /* Do not set atime. */ -# define O_CLOEXEC 02000000 /* set close_on_exec */ -#endif - -/* For now Linux has synchronisity options for data and read operations. - We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ -#endif - -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 0100000 -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#ifndef __USE_FILE_OFFSET64 -# define F_GETLK 5 /* Get record locking info. */ -# define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ -#else -# define F_GETLK F_GETLK64 /* Get record locking info. */ -# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ -# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ -#endif -#define F_GETLK64 12 /* Get record locking info. */ -#define F_SETLK64 13 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 14 /* Set record locking info (blocking). */ - -#if defined __USE_BSD || defined __USE_XOPEN2K -# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ -#endif - -#ifdef __USE_GNU -# define F_SETSIG 10 /* Set number of signal to be sent. */ -# define F_GETSIG 11 /* Get number of signal to be sent. */ -#endif - -#ifdef __USE_GNU -# define F_SETLEASE 1024 /* Set a lease. */ -# define F_GETLEASE 1025 /* Enquire what lease is active. */ -# define F_NOTIFY 1026 /* Request notfications on a directory. */ -# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with - close-on-exit set on new fd. */ -# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */ -# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */ -#endif - -/* For F_[GET|SET]FL. */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ -#define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ - -/* For old implementation of bsd flock(). */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -#ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation. */ -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ -#ifndef __USE_FILE_OFFSET64 - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#else - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ -#endif - __pid_t l_pid; /* Process holding the lock. */ - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; -#endif - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ - -/* Advise to `posix_fadvise'. */ -#ifdef __USE_XOPEN2K -# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ -#endif - - -#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__ -/* Flags for SYNC_FILE_RANGE. */ -# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages - in the range before performing the - write. */ -# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those - dirty pages in the range which are - not presently under writeback. */ -# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in - the range after performing the - write. */ - -/* Flags for SPLICE and VMSPLICE. */ -# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ -# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing - (but we may still block on the fd - we splice from/to). */ -# define SPLICE_F_MORE 4 /* Expect more data. */ -# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ -#endif - -__BEGIN_DECLS - -#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__ - < |