newlib:
* configure.host: Add support for RX architecture. * libc/include/machine/ieeefp.h: Likewise. * libc/include/machine/setjmp.h: Likewise. * libc/include/machine/configure.in: Likewise. * libc/include/machine/configure: Regenerate. * libc/machine/rx: New directory. * libc/machine/rx/*: New files to support RX architecture. libgloss: * configure.in: Add support for RX sub-directory. * configure: Regenerate. * rx: New directory. * rx/*: New files to support RX architecture.
This commit is contained in:
parent
f7e0cae24b
commit
fd6942ab42
@ -1,3 +1,10 @@
|
|||||||
|
2009-10-26 DJ Delorie <dj@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Add support for RX sub-directory.
|
||||||
|
* configure: Regenerate.
|
||||||
|
* rx: New directory.
|
||||||
|
* rx/*: New files to support RX architecture.
|
||||||
|
|
||||||
2009-10-26 Nick Clifton <nickc@redhat.com>
|
2009-10-26 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* arm/linux-syscalls0.S (SYSCALL0, SYSCALL3, SYSCALL6, SYSCALL4):
|
* arm/linux-syscalls0.S (SYSCALL0, SYSCALL3, SYSCALL6, SYSCALL4):
|
||||||
|
7
libgloss/configure
vendored
7
libgloss/configure
vendored
@ -298,6 +298,7 @@ ac_subdirs_all="$ac_subdirs_all moxie"
|
|||||||
ac_subdirs_all="$ac_subdirs_all mt"
|
ac_subdirs_all="$ac_subdirs_all mt"
|
||||||
ac_subdirs_all="$ac_subdirs_all xstormy16"
|
ac_subdirs_all="$ac_subdirs_all xstormy16"
|
||||||
ac_subdirs_all="$ac_subdirs_all m32c"
|
ac_subdirs_all="$ac_subdirs_all m32c"
|
||||||
|
ac_subdirs_all="$ac_subdirs_all rx"
|
||||||
ac_subdirs_all="$ac_subdirs_all arm"
|
ac_subdirs_all="$ac_subdirs_all arm"
|
||||||
ac_subdirs_all="$ac_subdirs_all spu"
|
ac_subdirs_all="$ac_subdirs_all spu"
|
||||||
ac_subdirs_all="$ac_subdirs_all iq2000"
|
ac_subdirs_all="$ac_subdirs_all iq2000"
|
||||||
@ -1978,6 +1979,12 @@ subdirs="$subdirs xstormy16"
|
|||||||
|
|
||||||
subdirs="$subdirs m32c"
|
subdirs="$subdirs m32c"
|
||||||
|
|
||||||
|
;;
|
||||||
|
rx*-*-elf)
|
||||||
|
|
||||||
|
|
||||||
|
subdirs="$subdirs rx"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
strongarm-*-elf | strongarm-*-coff | arm*-*-elf | arm*-*-coff | ep9312-*-elf | ep9312-*-coff | xscale-*-elf | xscale-*-coff | *arm-*-*)
|
strongarm-*-elf | strongarm-*-coff | arm*-*-elf | arm*-*-coff | ep9312-*-elf | ep9312-*-coff | xscale-*-elf | xscale-*-coff | *arm-*-*)
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ case "${target}" in
|
|||||||
m32c-*-*)
|
m32c-*-*)
|
||||||
AC_CONFIG_SUBDIRS([m32c])
|
AC_CONFIG_SUBDIRS([m32c])
|
||||||
;;
|
;;
|
||||||
|
rx*-*-elf)
|
||||||
|
AC_CONFIG_SUBDIRS([rx])
|
||||||
|
;;
|
||||||
strongarm-*-elf | strongarm-*-coff | arm*-*-elf | arm*-*-coff | ep9312-*-elf | ep9312-*-coff | xscale-*-elf | xscale-*-coff | *arm-*-*)
|
strongarm-*-elf | strongarm-*-coff | arm*-*-elf | arm*-*-coff | ep9312-*-elf | ep9312-*-coff | xscale-*-elf | xscale-*-coff | *arm-*-*)
|
||||||
AC_CONFIG_SUBDIRS([arm])
|
AC_CONFIG_SUBDIRS([arm])
|
||||||
;;
|
;;
|
||||||
|
164
libgloss/rx/Makefile.in
Normal file
164
libgloss/rx/Makefile.in
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
# Copyright (c) 2008, 2009 Red Hat Inc
|
||||||
|
#
|
||||||
|
# The authors hereby grant permission to use, copy, modify, distribute,
|
||||||
|
# and license this software and its documentation for any purpose, provided
|
||||||
|
# that existing copyright notices are retained in all copies and that this
|
||||||
|
# notice is included verbatim in any distributions. No written agreement,
|
||||||
|
# license, or royalty fee is required for any of the authorized uses.
|
||||||
|
# Modifications to this software may be copyrighted by their authors
|
||||||
|
# and need not follow the licensing terms described here, provided that
|
||||||
|
# the new terms are clearly indicated on the first page of each file where
|
||||||
|
# they apply.
|
||||||
|
|
||||||
|
# Makefile for libgloss/rx.
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
objdir = .
|
||||||
|
srcroot = $(srcdir)/../..
|
||||||
|
objroot = $(objdir)/../..
|
||||||
|
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
|
||||||
|
host_alias = @host_alias@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
|
||||||
|
bindir = @bindir@
|
||||||
|
libdir = @libdir@
|
||||||
|
tooldir = $(exec_prefix)/$(target_alias)
|
||||||
|
|
||||||
|
# Multilib support variables.
|
||||||
|
# TOP is used instead of MULTI{BUILD,SRC}TOP.
|
||||||
|
MULTIDIRS =
|
||||||
|
MULTISUBDIR =
|
||||||
|
MULTIDO = true
|
||||||
|
MULTICLEAN = true
|
||||||
|
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
CC = @CC@
|
||||||
|
|
||||||
|
AS = @AS@
|
||||||
|
AR = @AR@
|
||||||
|
LD = @LD@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
AR_FLAGS = rc
|
||||||
|
|
||||||
|
OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
|
||||||
|
then echo ${objroot}/../binutils/objdump ; \
|
||||||
|
else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
|
||||||
|
OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
|
||||||
|
then echo ${objroot}/../binutils/objcopy ; \
|
||||||
|
else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
|
||||||
|
|
||||||
|
SCRIPTS = $(srcdir)/rx.ld $(srcdir)/rx-sim.ld
|
||||||
|
CRT = gcrt0.o crt0.o crtn.o
|
||||||
|
SIM_BSP = libsim.a
|
||||||
|
LIBNOSYS = ../libnosys/libnosys.a
|
||||||
|
SIM_OBJS = \
|
||||||
|
sbrk.o \
|
||||||
|
heaptop.o \
|
||||||
|
exit.o \
|
||||||
|
open.o \
|
||||||
|
close.o \
|
||||||
|
read.o \
|
||||||
|
write.o \
|
||||||
|
lseek.o \
|
||||||
|
unlink.o \
|
||||||
|
getpid.o \
|
||||||
|
kill.o \
|
||||||
|
fstat.o \
|
||||||
|
argvlen.o \
|
||||||
|
argv.o \
|
||||||
|
chdir.o \
|
||||||
|
stat.o \
|
||||||
|
chmod.o \
|
||||||
|
utime.o \
|
||||||
|
time.o \
|
||||||
|
gettimeofday.o \
|
||||||
|
times.o \
|
||||||
|
link.o \
|
||||||
|
isatty.o \
|
||||||
|
abort.o \
|
||||||
|
mcount.o \
|
||||||
|
sigprocmask.o \
|
||||||
|
sleep.o
|
||||||
|
|
||||||
|
#### Host specific Makefile fragment comes in here.
|
||||||
|
@host_makefile_frag@
|
||||||
|
|
||||||
|
|
||||||
|
# Override .S.o rule to pass assembler debugging flags
|
||||||
|
.S.o:
|
||||||
|
$(CC) -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<
|
||||||
|
|
||||||
|
all: $(CRT) $(SIM_BSP) copy_scripts_to_objdir
|
||||||
|
|
||||||
|
$(SIM_BSP): $(SIM_OBJS)
|
||||||
|
$(AR) $(ARFLAGS) $@ $?
|
||||||
|
$(RANLIB) $@
|
||||||
|
|
||||||
|
copy_scripts_to_objdir: $(SCRIPTS)
|
||||||
|
cp $(SCRIPTS) $(objdir)
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
|
||||||
|
SDEPS = $(srcdir)/rxsys.h $(srcdir)/../syscall.h
|
||||||
|
|
||||||
|
abort.o : $(SDEPS)
|
||||||
|
argv.o : $(SDEPS)
|
||||||
|
argvlen.o : $(SDEPS)
|
||||||
|
chdir.o : $(SDEPS)
|
||||||
|
chmod.o : $(SDEPS)
|
||||||
|
close.o : $(SDEPS)
|
||||||
|
exit.o : $(SDEPS)
|
||||||
|
fstat.o : $(SDEPS)
|
||||||
|
getpid.o : $(SDEPS)
|
||||||
|
gettimeofday.o : $(SDEPS)
|
||||||
|
gcrt0.o: gcrt0.S crt0.S
|
||||||
|
heaptop.o : $(SDEPS)
|
||||||
|
kill.o : $(SDEPS)
|
||||||
|
link.o : $(SDEPS)
|
||||||
|
lseek.o : $(SDEPS)
|
||||||
|
mcount.o : $(SDEPS)
|
||||||
|
open.o : $(SDEPS)
|
||||||
|
read.o : $(SDEPS)
|
||||||
|
sigprocmask.o : $(SDEPS)
|
||||||
|
sleep.o : $(SDEPS)
|
||||||
|
stat.o : $(SDEPS)
|
||||||
|
time.o : $(SDEPS)
|
||||||
|
times.o : $(SDEPS)
|
||||||
|
unlink.o : $(SDEPS)
|
||||||
|
utime.o : $(SDEPS)
|
||||||
|
write.o : $(SDEPS)
|
||||||
|
|
||||||
|
install: $(CRT) $(SIM_BSP) $(SCRIPTS)
|
||||||
|
for c in $(CRT) $(SIM_BSP); do \
|
||||||
|
$(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$c ;\
|
||||||
|
done
|
||||||
|
for c in $(SCRIPTS); do \
|
||||||
|
b=`basename $$c`; \
|
||||||
|
$(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$b ;\
|
||||||
|
done
|
||||||
|
|
||||||
|
clean mostlyclean:
|
||||||
|
rm -f *.o *.a
|
||||||
|
|
||||||
|
distclean maintainer-clean realclean: clean
|
||||||
|
rm -f Makefile config.cache config.log config.status
|
||||||
|
|
||||||
|
.PHONY: info dvi doc install-info clean-info
|
||||||
|
info doc dvi:
|
||||||
|
install-info:
|
||||||
|
clean-info:
|
||||||
|
|
||||||
|
Makefile: Makefile.in config.status @host_makefile_frag_path@
|
||||||
|
$(SHELL) config.status
|
||||||
|
|
||||||
|
config.status: configure
|
||||||
|
$(SHELL) config.status --recheck
|
45
libgloss/rx/abort.S
Normal file
45
libgloss/rx/abort.S
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
.global _abort
|
||||||
|
_abort:
|
||||||
|
/* This is for debuggers. The simulator stops here too. */
|
||||||
|
brk
|
||||||
|
|
||||||
|
mov #42, r1
|
||||||
|
|
||||||
|
SYSCALL(SYS_kill)
|
||||||
|
|
||||||
|
/* Else, exit. */
|
||||||
|
bra.w __exit
|
35
libgloss/rx/argv.S
Normal file
35
libgloss/rx/argv.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(argv)
|
35
libgloss/rx/argvlen.S
Normal file
35
libgloss/rx/argvlen.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(argvlen)
|
35
libgloss/rx/chdir.S
Normal file
35
libgloss/rx/chdir.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(chdir)
|
35
libgloss/rx/chmod.S
Normal file
35
libgloss/rx/chmod.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(chmod)
|
35
libgloss/rx/close.S
Normal file
35
libgloss/rx/close.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(close)
|
3948
libgloss/rx/configure
vendored
Normal file
3948
libgloss/rx/configure
vendored
Normal file
File diff suppressed because it is too large
Load Diff
55
libgloss/rx/configure.in
Normal file
55
libgloss/rx/configure.in
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
AC_PREREQ(2.59)
|
||||||
|
AC_INIT(crt0.S)
|
||||||
|
|
||||||
|
if test "${enable_shared}" = "yes" ; then
|
||||||
|
echo "Shared libraries not supported for cross compiling, ignored"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$srcdir" = "." ; then
|
||||||
|
if test "${with_target_subdir}" != "." ; then
|
||||||
|
libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
|
||||||
|
else
|
||||||
|
libgloss_topdir="${srcdir}/${with_multisrctop}../.."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
libgloss_topdir="${srcdir}/../.."
|
||||||
|
fi
|
||||||
|
AC_CONFIG_AUX_DIR($libgloss_topdir)
|
||||||
|
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
AC_ARG_PROGRAM
|
||||||
|
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
|
LIB_AC_PROG_CC
|
||||||
|
|
||||||
|
AS=${AS-as}
|
||||||
|
AC_SUBST(AS)
|
||||||
|
AR=${AR-ar}
|
||||||
|
AC_SUBST(AR)
|
||||||
|
LD=${LD-ld}
|
||||||
|
AC_SUBST(LD)
|
||||||
|
AC_PROG_RANLIB
|
||||||
|
LIB_AM_PROG_AS
|
||||||
|
|
||||||
|
host_makefile_frag=${srcdir}/../config/default.mh
|
||||||
|
|
||||||
|
dnl We have to assign the same value to other variables because autoconf
|
||||||
|
dnl doesn't provide a mechanism to substitute a replacement keyword with
|
||||||
|
dnl arbitrary data or pathnames.
|
||||||
|
dnl
|
||||||
|
host_makefile_frag_path=$host_makefile_frag
|
||||||
|
AC_SUBST(host_makefile_frag_path)
|
||||||
|
AC_SUBST_FILE(host_makefile_frag)
|
||||||
|
|
||||||
|
AC_CONFIG_FILES(Makefile,
|
||||||
|
. ${libgloss_topdir}/config-ml.in,
|
||||||
|
srcdir=${srcdir}
|
||||||
|
target=${target}
|
||||||
|
with_multisubdir=${with_multisubdir}
|
||||||
|
ac_configure_args="${ac_configure_args} --enable-multilib"
|
||||||
|
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
||||||
|
libgloss_topdir=${libgloss_topdir}
|
||||||
|
)
|
||||||
|
AC_OUTPUT
|
176
libgloss/rx/crt0.S
Normal file
176
libgloss/rx/crt0.S
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
/* Copyright (c) 2008, 2009 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
This software is provided by the copyright holders and 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 Red Hat
|
||||||
|
incorporated 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. */
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
.global _start
|
||||||
|
_start:
|
||||||
|
.LFB2:
|
||||||
|
mvtc #0, psw
|
||||||
|
/* Enable the DN bit - this should have been done for us by
|
||||||
|
the CPU reset, but it is best to make sure for ourselves. */
|
||||||
|
mvtc #0x100, fpsw
|
||||||
|
mov #__stack, r0
|
||||||
|
mvtc #__vectors, intb
|
||||||
|
|
||||||
|
mov #__datastart, r1
|
||||||
|
mov #__romdatastart, r2
|
||||||
|
mov #__romdatacopysize, r3
|
||||||
|
smovf
|
||||||
|
|
||||||
|
mov #__bssstart, r1
|
||||||
|
mov #0, r2
|
||||||
|
mov #__bsssize, r3
|
||||||
|
sstr.l
|
||||||
|
|
||||||
|
/* Initialise the small data area pointer.
|
||||||
|
The register used here must agree with the definition of
|
||||||
|
GP_BASE_REGNUM in gcc/config/rx/rx.h. */
|
||||||
|
mov #__gp, r13
|
||||||
|
|
||||||
|
bsr.a __rx_init
|
||||||
|
|
||||||
|
#ifdef PROFILE_SUPPORT /* Defined in gcrt0.S. */
|
||||||
|
mov # _start, r1
|
||||||
|
mov # _etext, r2
|
||||||
|
bsr.a __monstartup
|
||||||
|
#endif
|
||||||
|
|
||||||
|
mov #0, r1 /* argc */
|
||||||
|
mov #0, r2 /* argv */
|
||||||
|
mov #0, r3 /* envv */
|
||||||
|
bsr.a _main
|
||||||
|
.LFE2:
|
||||||
|
|
||||||
|
#ifdef PROFILE_SUPPORT
|
||||||
|
mov r1, r13 ; Save return code.
|
||||||
|
bsr.a __mcleanup
|
||||||
|
mov r13, r1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bsr.a _exit
|
||||||
|
|
||||||
|
.global _rx_run_preinit_array
|
||||||
|
.type _rx_run_preinit_array,@function
|
||||||
|
_rx_run_preinit_array:
|
||||||
|
mov #__preinit_array_start,r1
|
||||||
|
mov #__preinit_array_end,r2
|
||||||
|
bra.a _rx_run_inilist
|
||||||
|
|
||||||
|
.global _rx_run_init_array
|
||||||
|
.type _rx_run_init_array,@function
|
||||||
|
_rx_run_init_array:
|
||||||
|
mov #__init_array_start,r1
|
||||||
|
mov #__init_array_end,r2
|
||||||
|
mov #4, r3
|
||||||
|
bra.a _rx_run_inilist
|
||||||
|
|
||||||
|
.global _rx_run_fini_array
|
||||||
|
.type _rx_run_fini_array,@function
|
||||||
|
_rx_run_fini_array:
|
||||||
|
mov #__fini_array_start,r2
|
||||||
|
mov #__fini_array_end,r1
|
||||||
|
mov #-4, r3
|
||||||
|
/* fall through */
|
||||||
|
|
||||||
|
_rx_run_inilist:
|
||||||
|
next_inilist:
|
||||||
|
cmp r1,r2
|
||||||
|
beq.b done_inilist
|
||||||
|
mov.l [r1],r4
|
||||||
|
cmp #-1, r4
|
||||||
|
beq.b skip_inilist
|
||||||
|
cmp #0, r4
|
||||||
|
beq.b skip_inilist
|
||||||
|
pushm r1-r3
|
||||||
|
jsr r4
|
||||||
|
popm r1-r3
|
||||||
|
skip_inilist:
|
||||||
|
add r3,r1
|
||||||
|
bra.b next_inilist
|
||||||
|
done_inilist:
|
||||||
|
rts
|
||||||
|
|
||||||
|
.section .init,"ax"
|
||||||
|
|
||||||
|
.global __rx_init
|
||||||
|
__rx_init:
|
||||||
|
|
||||||
|
.section .fini,"ax"
|
||||||
|
|
||||||
|
.global __rx_fini
|
||||||
|
__rx_fini:
|
||||||
|
bsr.a _rx_run_fini_array
|
||||||
|
|
||||||
|
.section .sdata
|
||||||
|
.balign 4
|
||||||
|
.global __gp
|
||||||
|
.weak __gp
|
||||||
|
__gp:
|
||||||
|
|
||||||
|
.section .data
|
||||||
|
.global ___dso_handle
|
||||||
|
.weak ___dso_handle
|
||||||
|
___dso_handle:
|
||||||
|
.long 0
|
||||||
|
|
||||||
|
;;; Provide Dwarf unwinding information that will help GDB stop
|
||||||
|
;;; backtraces at the right place. This is stolen from assembly
|
||||||
|
;;; code generated by GCC with -dA.
|
||||||
|
.section .debug_frame,"",@progbits
|
||||||
|
.Lframe0:
|
||||||
|
.4byte .LECIE0-.LSCIE0 ; Length of Common Information Entry
|
||||||
|
.LSCIE0:
|
||||||
|
.4byte 0xffffffff ; CIE Identifier Tag
|
||||||
|
.byte 0x1 ; CIE Version
|
||||||
|
.ascii "\0" ; CIE Augmentation
|
||||||
|
.uleb128 0x1 ; CIE Code Alignment Factor
|
||||||
|
.sleb128 -1 ; CIE Data Alignment Factor
|
||||||
|
.byte 0xd ; CIE RA Column
|
||||||
|
.byte 0xc ; DW_CFA_def_cfa
|
||||||
|
.uleb128 0xc
|
||||||
|
.uleb128 0x3
|
||||||
|
.byte 0x8d ; DW_CFA_offset, column 0xd
|
||||||
|
.uleb128 0x3
|
||||||
|
.p2align 2
|
||||||
|
.LECIE0:
|
||||||
|
.LSFDE0:
|
||||||
|
.4byte .LEFDE0-.LASFDE0 ; FDE Length
|
||||||
|
.LASFDE0:
|
||||||
|
.4byte .Lframe0 ; FDE CIE offset
|
||||||
|
.4byte .LFB2 ; FDE initial location
|
||||||
|
.4byte .LFE2-.LFB2 ; FDE address range
|
||||||
|
.byte 0xf ; DW_CFA_def_cfa_expression
|
||||||
|
.uleb128 1 ; length of expression
|
||||||
|
.byte 0x30 ; DW_OP_lit0
|
||||||
|
.p2align 2
|
||||||
|
.LEFDE0:
|
||||||
|
|
||||||
|
.text
|
47
libgloss/rx/crtn.S
Normal file
47
libgloss/rx/crtn.S
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
.section .init,"ax"
|
||||||
|
bsr.a _rx_run_preinit_array
|
||||||
|
bsr.a _rx_run_init_array
|
||||||
|
rts
|
||||||
|
.global __rx_init_end
|
||||||
|
__rx_init_end:
|
||||||
|
|
||||||
|
.section .fini,"ax"
|
||||||
|
|
||||||
|
rts
|
||||||
|
.global __rx_fini_end
|
||||||
|
__rx_fini_end:
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
40
libgloss/rx/exit.S
Normal file
40
libgloss/rx/exit.S
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
.global __exit
|
||||||
|
__exit:
|
||||||
|
pushm r1-r2
|
||||||
|
bsr.a __rx_fini
|
||||||
|
popm r1-r2
|
||||||
|
SYSCALL(SYS_exit)
|
35
libgloss/rx/fstat.S
Normal file
35
libgloss/rx/fstat.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(fstat)
|
25
libgloss/rx/gcrt0.S
Normal file
25
libgloss/rx/gcrt0.S
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#define PROFILE_SUPPORT 1
|
||||||
|
|
||||||
|
#include "crt0.S"
|
||||||
|
|
||||||
|
.global __mcount
|
||||||
|
__mcount:
|
||||||
|
;; When a function is compiled for profiling, gcc creates code
|
||||||
|
;; like this at the start of each profiled function:
|
||||||
|
;;
|
||||||
|
;; .global <func_name>
|
||||||
|
;; <func_name>:
|
||||||
|
;; bsr __mcount
|
||||||
|
;; <...function's prologue...>
|
||||||
|
;; <...function's body...>
|
||||||
|
;;
|
||||||
|
;; We must save all of the argument registers, extract the
|
||||||
|
;; address of <func_name>, call _mcount_internal to do the
|
||||||
|
;; real work and then restore the argument registers before
|
||||||
|
;; returning.
|
||||||
|
|
||||||
|
pushm r1-r4
|
||||||
|
mov.l 16[r0], r1
|
||||||
|
bsr __mcount_internal
|
||||||
|
rtsd #16, r1-r4
|
||||||
|
|
35
libgloss/rx/getpid.S
Normal file
35
libgloss/rx/getpid.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(getpid)
|
35
libgloss/rx/gettimeofday.S
Normal file
35
libgloss/rx/gettimeofday.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(gettimeofday)
|
36
libgloss/rx/heaptop.S
Normal file
36
libgloss/rx/heaptop.S
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
#define SYS__set_heaptop 11
|
||||||
|
|
||||||
|
S(_set_heaptop)
|
35
libgloss/rx/isatty.S
Normal file
35
libgloss/rx/isatty.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/* Copyright (c) 2008, 2009 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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. */
|
||||||
|
|
||||||
|
.global __isatty
|
||||||
|
__isatty:
|
||||||
|
.weak _isatty
|
||||||
|
_isatty:
|
||||||
|
mov #1,r1
|
||||||
|
rts
|
||||||
|
|
35
libgloss/rx/kill.S
Normal file
35
libgloss/rx/kill.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(kill)
|
35
libgloss/rx/link.S
Normal file
35
libgloss/rx/link.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(link)
|
35
libgloss/rx/lseek.S
Normal file
35
libgloss/rx/lseek.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(lseek)
|
422
libgloss/rx/mcount.c
Normal file
422
libgloss/rx/mcount.c
Normal file
@ -0,0 +1,422 @@
|
|||||||
|
/*-
|
||||||
|
* Copyright (c) 1983, 1992, 1993
|
||||||
|
* The Regents of the University of California. 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. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* 4. Neither the name of the University nor the names of its contributors
|
||||||
|
* may be used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND 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 REGENTS OR 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* This file implements a subset of the profiling support functions.
|
||||||
|
It has been copied and adapted from mcount.c, gmon.c and gmon.h in
|
||||||
|
the glibc sources.
|
||||||
|
Since we do not have access to a timer interrupt in the simulator
|
||||||
|
the histogram and basic block information is not generated. */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
/* Fraction of text space to allocate for histogram counters here, 1/2. */
|
||||||
|
#define HISTFRACTION 2
|
||||||
|
|
||||||
|
/* Fraction of text space to allocate for from hash buckets.
|
||||||
|
The value of HASHFRACTION is based on the minimum number of bytes
|
||||||
|
of separation between two subroutine call points in the object code.
|
||||||
|
Given MIN_SUBR_SEPARATION bytes of separation the value of
|
||||||
|
HASHFRACTION is calculated as:
|
||||||
|
|
||||||
|
HASHFRACTION = MIN_SUBR_SEPARATION / (2 * sizeof (short) - 1);
|
||||||
|
|
||||||
|
For example, on the VAX, the shortest two call sequence is:
|
||||||
|
|
||||||
|
calls $0,(r0)
|
||||||
|
calls $0,(r0)
|
||||||
|
|
||||||
|
which is separated by only three bytes, thus HASHFRACTION is
|
||||||
|
calculated as:
|
||||||
|
|
||||||
|
HASHFRACTION = 3 / (2 * 2 - 1) = 1
|
||||||
|
|
||||||
|
Note that the division above rounds down, thus if MIN_SUBR_FRACTION
|
||||||
|
is less than three, this algorithm will not work!
|
||||||
|
|
||||||
|
In practice, however, call instructions are rarely at a minimal
|
||||||
|
distance. Hence, we will define HASHFRACTION to be 2 across all
|
||||||
|
architectures. This saves a reasonable amount of space for
|
||||||
|
profiling data structures without (in practice) sacrificing
|
||||||
|
any granularity. */
|
||||||
|
#define HASHFRACTION 2
|
||||||
|
|
||||||
|
/* Percent of text space to allocate for tostructs.
|
||||||
|
This is a heuristic; we will fail with a warning when profiling
|
||||||
|
programs with a very large number of very small functions, but
|
||||||
|
that's normally OK.
|
||||||
|
2 is probably still a good value for normal programs.
|
||||||
|
Profiling a test case with 64000 small functions will work if
|
||||||
|
you raise this value to 3 and link statically (which bloats the
|
||||||
|
text size, thus raising the number of arcs expected by the heuristic). */
|
||||||
|
#define ARCDENSITY 3
|
||||||
|
|
||||||
|
/* Always allocate at least this many tostructs. This hides the
|
||||||
|
inadequacy of the ARCDENSITY heuristic, at least for small programs. */
|
||||||
|
#define MINARCS 50
|
||||||
|
|
||||||
|
/* Maximum number of arcs we want to allow.
|
||||||
|
Used to be max representable value of ARCINDEX minus 2, but now
|
||||||
|
that ARCINDEX is a long, that's too large; we don't really want
|
||||||
|
to allow a 48 gigabyte table.
|
||||||
|
The old value of 1<<16 wasn't high enough in practice for large C++
|
||||||
|
programs; will 1<<20 be adequate for long? FIXME */
|
||||||
|
#define MAXARCS (1 << 20)
|
||||||
|
|
||||||
|
#define SCALE_1_TO_1 0x10000L
|
||||||
|
|
||||||
|
#define GMON_MAGIC "gmon" /* Magic cookie. */
|
||||||
|
#define GMON_VERSION 1 /* Version number. */
|
||||||
|
|
||||||
|
|
||||||
|
/* General rounding functions. */
|
||||||
|
#define ROUNDDOWN(x ,y) (((x) / (y)) * (y))
|
||||||
|
#define ROUNDUP(x, y) ((((x) + (y) - 1) / (y)) * (y))
|
||||||
|
|
||||||
|
struct tostruct
|
||||||
|
{
|
||||||
|
unsigned long selfpc;
|
||||||
|
unsigned long count;
|
||||||
|
unsigned long link;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Possible states of profiling. */
|
||||||
|
enum profiling_state
|
||||||
|
{
|
||||||
|
GMON_PROF_OFF,
|
||||||
|
GMON_PROF_ON,
|
||||||
|
GMON_PROF_BUSY,
|
||||||
|
GMON_PROF_ERROR
|
||||||
|
};
|
||||||
|
|
||||||
|
/* The profiling data structures are housed in this structure. */
|
||||||
|
struct gmonparam
|
||||||
|
{
|
||||||
|
enum profiling_state state;
|
||||||
|
unsigned short * kcount;
|
||||||
|
unsigned long kcountsize;
|
||||||
|
unsigned long * froms;
|
||||||
|
unsigned long fromssize;
|
||||||
|
struct tostruct * tos;
|
||||||
|
unsigned long tossize;
|
||||||
|
long tolimit;
|
||||||
|
unsigned long lowpc;
|
||||||
|
unsigned long highpc;
|
||||||
|
unsigned long textsize;
|
||||||
|
unsigned long hashfraction;
|
||||||
|
long log_hashfraction;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Raw header as it appears in the gmon.out file (without padding).
|
||||||
|
This header always comes first and is then followed by a series
|
||||||
|
records defined below. */
|
||||||
|
struct gmon_hdr
|
||||||
|
{
|
||||||
|
char cookie[4];
|
||||||
|
char version[4];
|
||||||
|
char spare[3 * 4];
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Types of records in this file. */
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
GMON_TAG_TIME_HIST = 0,
|
||||||
|
GMON_TAG_CG_ARC = 1,
|
||||||
|
} GMON_Record_Tag;
|
||||||
|
|
||||||
|
struct gmon_cg_arc_record
|
||||||
|
{
|
||||||
|
char tag; /* Set to GMON_TAG_CG_ARC. */
|
||||||
|
char from_pc[sizeof (char *)]; /* Address within caller's body. */
|
||||||
|
char self_pc[sizeof (char *)]; /* Address within callee's body. */
|
||||||
|
char count[4]; /* Number of arc traversals. */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* Forward declarations. */
|
||||||
|
void _mcount_internal (unsigned long);
|
||||||
|
void _monstartup (unsigned long, unsigned long);
|
||||||
|
void _mcleanup (void);
|
||||||
|
|
||||||
|
static struct gmonparam _gmonparam;
|
||||||
|
|
||||||
|
void
|
||||||
|
_mcount_internal (unsigned long frompc)
|
||||||
|
{
|
||||||
|
unsigned long selfpc = frompc;
|
||||||
|
unsigned long * frompcindex;
|
||||||
|
struct tostruct * top;
|
||||||
|
struct tostruct * prevtop;
|
||||||
|
struct gmonparam * p;
|
||||||
|
unsigned long toindex;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
p = & _gmonparam;
|
||||||
|
|
||||||
|
/* Check that we are profiling and that we aren't recursively invoked.
|
||||||
|
NB/ This version is not thread-safe. */
|
||||||
|
if (p->state != GMON_PROF_ON)
|
||||||
|
return;
|
||||||
|
p->state = GMON_PROF_BUSY;
|
||||||
|
|
||||||
|
/* Check that frompcindex is a reasonable pc value.
|
||||||
|
For example: signal catchers get called from the stack,
|
||||||
|
not from text space. Too bad. */
|
||||||
|
frompc -= p->lowpc;
|
||||||
|
if (frompc > p->textsize)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
i = frompc >> p->log_hashfraction;
|
||||||
|
|
||||||
|
frompcindex = p->froms + i;
|
||||||
|
toindex = * frompcindex;
|
||||||
|
|
||||||
|
if (toindex == 0)
|
||||||
|
{
|
||||||
|
/* First time traversing this arc. */
|
||||||
|
toindex = ++ p->tos[0].link;
|
||||||
|
if (toindex >= p->tolimit)
|
||||||
|
/* Halt further profiling. */
|
||||||
|
goto overflow;
|
||||||
|
|
||||||
|
* frompcindex = toindex;
|
||||||
|
top = p->tos + toindex;
|
||||||
|
top->selfpc = selfpc;
|
||||||
|
top->count = 1;
|
||||||
|
top->link = 0;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
top = p->tos + toindex;
|
||||||
|
|
||||||
|
if (top->selfpc == selfpc)
|
||||||
|
{
|
||||||
|
/* Arc at front of chain: usual case. */
|
||||||
|
top->count ++;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Have to go looking down chain for it.
|
||||||
|
Top points to what we are looking at,
|
||||||
|
prevtop points to previous top.
|
||||||
|
We know it is not at the head of the chain. */
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
if (top->link == 0)
|
||||||
|
{
|
||||||
|
/* Top is end of the chain and none of the chain
|
||||||
|
had top->selfpc == selfpc. So we allocate a
|
||||||
|
new tostruct and link it to the head of the
|
||||||
|
chain. */
|
||||||
|
toindex = ++ p->tos[0].link;
|
||||||
|
if (toindex >= p->tolimit)
|
||||||
|
goto overflow;
|
||||||
|
|
||||||
|
top = p->tos + toindex;
|
||||||
|
top->selfpc = selfpc;
|
||||||
|
top->count = 1;
|
||||||
|
top->link = * frompcindex;
|
||||||
|
* frompcindex = toindex;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Otherwise, check the next arc on the chain. */
|
||||||
|
prevtop = top;
|
||||||
|
top = p->tos + top->link;
|
||||||
|
|
||||||
|
if (top->selfpc == selfpc)
|
||||||
|
{
|
||||||
|
/* There it is. Increment its count
|
||||||
|
move it to the head of the chain. */
|
||||||
|
top->count ++;
|
||||||
|
toindex = prevtop->link;
|
||||||
|
prevtop->link = top->link;
|
||||||
|
top->link = * frompcindex;
|
||||||
|
* frompcindex = toindex;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
|
p->state = GMON_PROF_ON;
|
||||||
|
return;
|
||||||
|
|
||||||
|
overflow:
|
||||||
|
p->state = GMON_PROF_ERROR;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_monstartup (unsigned long lowpc, unsigned long highpc)
|
||||||
|
{
|
||||||
|
char * cp;
|
||||||
|
struct gmonparam * p = & _gmonparam;
|
||||||
|
|
||||||
|
/* If the calloc() function has been instrumented we must make sure
|
||||||
|
that it is not profiled until we are ready. */
|
||||||
|
p->state = GMON_PROF_BUSY;
|
||||||
|
|
||||||
|
/* Round lowpc and highpc to multiples of the density we're using
|
||||||
|
so the rest of the scaling (here and in gprof) stays in ints. */
|
||||||
|
p->lowpc = ROUNDDOWN (lowpc, HISTFRACTION * sizeof (* p->kcount));
|
||||||
|
p->highpc = ROUNDUP (highpc, HISTFRACTION * sizeof (* p->kcount));
|
||||||
|
p->textsize = p->highpc - p->lowpc;
|
||||||
|
p->kcountsize = ROUNDUP (p->textsize / HISTFRACTION, sizeof (*p->froms));
|
||||||
|
p->hashfraction = HASHFRACTION;
|
||||||
|
p->log_hashfraction = -1;
|
||||||
|
p->log_hashfraction = ffs (p->hashfraction * sizeof (*p->froms)) - 1;
|
||||||
|
p->fromssize = p->textsize / HASHFRACTION;
|
||||||
|
p->tolimit = p->textsize * ARCDENSITY / 100;
|
||||||
|
|
||||||
|
if (p->tolimit < MINARCS)
|
||||||
|
p->tolimit = MINARCS;
|
||||||
|
else if (p->tolimit > MAXARCS)
|
||||||
|
p->tolimit = MAXARCS;
|
||||||
|
|
||||||
|
p->tossize = p->tolimit * sizeof (struct tostruct);
|
||||||
|
|
||||||
|
cp = calloc (p->kcountsize + p->fromssize + p->tossize, 1);
|
||||||
|
if (cp == NULL)
|
||||||
|
{
|
||||||
|
write (2, "monstartup: out of memory\n", 26);
|
||||||
|
p->tos = NULL;
|
||||||
|
p->state = GMON_PROF_ERROR;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
p->tos = (struct tostruct *) cp;
|
||||||
|
cp += p->tossize;
|
||||||
|
p->kcount = (unsigned short *) cp;
|
||||||
|
cp += p->kcountsize;
|
||||||
|
p->froms = (unsigned long *) cp;
|
||||||
|
|
||||||
|
p->tos[0].link = 0;
|
||||||
|
p->state = GMON_PROF_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
write_call_graph (int fd)
|
||||||
|
{
|
||||||
|
#define NARCS_PER_WRITE 32
|
||||||
|
|
||||||
|
struct gmon_cg_arc_record raw_arc[NARCS_PER_WRITE]
|
||||||
|
__attribute__ ((aligned (__alignof__ (char *))));
|
||||||
|
unsigned long from_index;
|
||||||
|
unsigned long to_index;
|
||||||
|
unsigned long from_len;
|
||||||
|
unsigned long frompc;
|
||||||
|
int nfilled;
|
||||||
|
|
||||||
|
for (nfilled = 0; nfilled < NARCS_PER_WRITE; ++ nfilled)
|
||||||
|
raw_arc[nfilled].tag = GMON_TAG_CG_ARC;
|
||||||
|
|
||||||
|
nfilled = 0;
|
||||||
|
from_len = _gmonparam.fromssize / sizeof (*_gmonparam.froms);
|
||||||
|
|
||||||
|
for (from_index = 0; from_index < from_len; ++from_index)
|
||||||
|
{
|
||||||
|
if (_gmonparam.froms[from_index] == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
frompc = _gmonparam.lowpc;
|
||||||
|
frompc += (from_index * _gmonparam.hashfraction
|
||||||
|
* sizeof (*_gmonparam.froms));
|
||||||
|
|
||||||
|
for (to_index = _gmonparam.froms[from_index];
|
||||||
|
to_index != 0;
|
||||||
|
to_index = _gmonparam.tos[to_index].link)
|
||||||
|
{
|
||||||
|
struct gmon_cg_arc_record * arc = raw_arc + nfilled;
|
||||||
|
|
||||||
|
memcpy (arc->from_pc, & frompc, sizeof (arc->from_pc));
|
||||||
|
memcpy (arc->self_pc, & _gmonparam.tos[to_index].selfpc, sizeof (arc->self_pc));
|
||||||
|
memcpy (arc->count, & _gmonparam.tos[to_index].count, sizeof (arc->count));
|
||||||
|
|
||||||
|
if (++ nfilled == NARCS_PER_WRITE)
|
||||||
|
{
|
||||||
|
write (fd, raw_arc, sizeof raw_arc);
|
||||||
|
nfilled = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nfilled > 0)
|
||||||
|
write (fd, raw_arc, nfilled * sizeof (raw_arc[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
static void
|
||||||
|
write_gmon (void)
|
||||||
|
{
|
||||||
|
struct gmon_hdr ghdr __attribute__ ((aligned (__alignof__ (int))));
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
fd = open ("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
|
||||||
|
if (fd < 0)
|
||||||
|
{
|
||||||
|
write (2, "_mcleanup: could not create gmon.out\n", 37);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Write gmon.out header: */
|
||||||
|
memset (& ghdr, '\0', sizeof (ghdr));
|
||||||
|
memcpy (ghdr.cookie, GMON_MAGIC, sizeof (ghdr.cookie));
|
||||||
|
* (unsigned long *) ghdr.version = GMON_VERSION;
|
||||||
|
write (fd, & ghdr, sizeof (ghdr));
|
||||||
|
|
||||||
|
/* We do not have histogram or basic block information,
|
||||||
|
so we do not generate these parts of the gmon.out file. */
|
||||||
|
|
||||||
|
/* Write call-graph. */
|
||||||
|
write_call_graph (fd);
|
||||||
|
|
||||||
|
close (fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_mcleanup (void)
|
||||||
|
{
|
||||||
|
if (_gmonparam.state != GMON_PROF_ERROR)
|
||||||
|
{
|
||||||
|
_gmonparam.state = GMON_PROF_OFF;
|
||||||
|
write_gmon ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Free the memory. */
|
||||||
|
if (_gmonparam.tos != NULL)
|
||||||
|
{
|
||||||
|
free (_gmonparam.tos);
|
||||||
|
_gmonparam.tos = NULL;
|
||||||
|
}
|
||||||
|
}
|
35
libgloss/rx/open.S
Normal file
35
libgloss/rx/open.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(open)
|
35
libgloss/rx/read.S
Normal file
35
libgloss/rx/read.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(read)
|
225
libgloss/rx/rx-sim.ld
Normal file
225
libgloss/rx/rx-sim.ld
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005,2008,2009 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Default linker script, for normal executables */
|
||||||
|
OUTPUT_ARCH(rx)
|
||||||
|
ENTRY(_start)
|
||||||
|
|
||||||
|
/* Do we need any of these for elf?
|
||||||
|
__DYNAMIC = 0; */
|
||||||
|
|
||||||
|
/* This memory layout is larger than the largest predicted RX600 chip,
|
||||||
|
but gives us more memory for benchmarks. */
|
||||||
|
|
||||||
|
MEMORY {
|
||||||
|
RAM (w) : ORIGIN = 0x01000000, LENGTH = 0x07000000 /* 112 Mb "external" address space. */
|
||||||
|
STACK (w) : ORIGIN = 0x08000000, LENGTH = 16 /* Top of RAM. */
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
PROVIDE (_start = .);
|
||||||
|
*(.text P .stub .text.* .gnu.linkonce.t.*)
|
||||||
|
KEEP (*(.text.*personality*))
|
||||||
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||||
|
*(.gnu.warning)
|
||||||
|
*(.interp .hash .dynsym .dynstr .gnu.version*)
|
||||||
|
PROVIDE (__etext = .);
|
||||||
|
PROVIDE (_etext = .);
|
||||||
|
PROVIDE (etext = .);
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP (*(.init))
|
||||||
|
KEEP (*(.fini))
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
.rodata : {
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.plt)
|
||||||
|
*(.rodata C C_2 C_1 .rodata.* .gnu.linkonce.r.*)
|
||||||
|
*(.rodata1)
|
||||||
|
*(.eh_frame_hdr)
|
||||||
|
KEEP (*(.eh_frame))
|
||||||
|
KEEP (*(.gcc_except_table)) *(.gcc_except_table.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE(__romdatastart = .);
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
.data : {
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE (__datastart = .);
|
||||||
|
PROVIDE (__preinit_array_start = .);
|
||||||
|
KEEP (*(.preinit_array))
|
||||||
|
PROVIDE (__preinit_array_end = .);
|
||||||
|
PROVIDE (__init_array_start = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE (__init_array_end = .);
|
||||||
|
PROVIDE (__fini_array_start = .);
|
||||||
|
KEEP (*(.fini_array))
|
||||||
|
KEEP (*(SORT(.fini_array.*)))
|
||||||
|
PROVIDE (__fini_array_end = .);
|
||||||
|
LONG(0); /* Sentinel. */
|
||||||
|
|
||||||
|
/* gcc uses crtbegin.o to find the start of the constructors, so
|
||||||
|
we make sure it is first. Because this is a wildcard, it
|
||||||
|
doesn't matter if the user does not actually link against
|
||||||
|
crtbegin.o; the linker won't look for a file to match a
|
||||||
|
wildcard. The wildcard also means that it doesn't matter which
|
||||||
|
directory crtbegin.o is in. */
|
||||||
|
KEEP (*crtbegin*.o(.ctors))
|
||||||
|
|
||||||
|
/* We don't want to include the .ctor section from from the
|
||||||
|
crtend.o file until after the sorted ctors. The .ctor section
|
||||||
|
from the crtend file contains the end of ctors marker and it
|
||||||
|
must be last */
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
|
||||||
|
KEEP (*(SORT(.ctors.*)))
|
||||||
|
KEEP (*(.ctors))
|
||||||
|
|
||||||
|
KEEP (*crtbegin*.o(.dtors))
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
|
||||||
|
KEEP (*(SORT(.dtors.*)))
|
||||||
|
KEEP (*(.dtors))
|
||||||
|
|
||||||
|
KEEP (*(.jcr))
|
||||||
|
*(.data.rel.ro.local) *(.data.rel.ro*)
|
||||||
|
*(.dynamic)
|
||||||
|
|
||||||
|
*(.data D .data.* .gnu.linkonce.d.*)
|
||||||
|
KEEP (*(.gnu.linkonce.d.*personality*))
|
||||||
|
SORT(CONSTRUCTORS)
|
||||||
|
*(.data1)
|
||||||
|
*(.got.plt) *(.got)
|
||||||
|
|
||||||
|
/* We want the small data sections together, so single-instruction offsets
|
||||||
|
can access them all, and initialized data all before uninitialized, so
|
||||||
|
we can shorten the on-disk segment size. */
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.sdata .sdata.* .gnu.linkonce.s.* D_2 D_1)
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
_edata = .;
|
||||||
|
PROVIDE (edata = .);
|
||||||
|
PROVIDE (__dataend = .);
|
||||||
|
} > RAM
|
||||||
|
|
||||||
|
/* Note that crt0 assumes this is a multiple of four; all the
|
||||||
|
start/stop symbols are also assumed long-aligned. */
|
||||||
|
/* PROVIDE (__romdatacopysize = __dataend - __datastart); */
|
||||||
|
/* We're loading into simulator ram, no need to copy */
|
||||||
|
PROVIDE (__romdatacopysize = 0);
|
||||||
|
|
||||||
|
.bss : {
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE (__bssstart = .);
|
||||||
|
*(.dynbss)
|
||||||
|
*(.bss B B_2 B_1 .bss.* .gnu.linkonce.b.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE (__bssend = .);
|
||||||
|
_end = .;
|
||||||
|
PROVIDE (end = .);
|
||||||
|
} > RAM
|
||||||
|
PROVIDE (__bsssize = SIZEOF(.bss) / 4);
|
||||||
|
|
||||||
|
.stack (ORIGIN (STACK)) :
|
||||||
|
{
|
||||||
|
PROVIDE (__stack = .);
|
||||||
|
*(.stack)
|
||||||
|
} > STACK
|
||||||
|
|
||||||
|
/* Providing one of these symbols in your code is sufficient to have
|
||||||
|
it linked in to the fixed vector table. */
|
||||||
|
|
||||||
|
PROVIDE (__rx_priviledged_exception_handler = 0x00000000);
|
||||||
|
PROVIDE (__rx_access_exception_handler = 0x00000000);
|
||||||
|
PROVIDE (__rx_undefined_exception_handler = 0x00000000);
|
||||||
|
PROVIDE (__rx_floating_exception_handler = 0x00000000);
|
||||||
|
PROVIDE (__rx_nonmaskable_exception_handler = 0x00000000);
|
||||||
|
|
||||||
|
.vectors (0xFFFFFFD0) :
|
||||||
|
{
|
||||||
|
PROVIDE (__vectors = .);
|
||||||
|
LONG (__rx_priviledged_exception_handler);
|
||||||
|
LONG (__rx_access_exception_handler);
|
||||||
|
LONG (0);
|
||||||
|
LONG (__rx_undefined_exception_handler);
|
||||||
|
LONG (0);
|
||||||
|
LONG (__rx_floating_exception_handler);
|
||||||
|
LONG (0);
|
||||||
|
LONG (0);
|
||||||
|
LONG (0);
|
||||||
|
LONG (0);
|
||||||
|
LONG (__rx_nonmaskable_exception_handler);
|
||||||
|
LONG (_start);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The rest are all not normally part of the runtime image. */
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
/* DWARF debug sections.
|
||||||
|
Symbols in the DWARF debugging sections are relative to the beginning
|
||||||
|
of the section so we begin them at 0. */
|
||||||
|
/* DWARF 1 */
|
||||||
|
.debug 0 : { *(.debug) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
/* SGI/MIPS DWARF 2 extensions */
|
||||||
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
/DISCARD/ : { *(.note.GNU-stack) }
|
||||||
|
}
|
229
libgloss/rx/rx.ld
Normal file
229
libgloss/rx/rx.ld
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005,2008,2009 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Default linker script, for normal executables */
|
||||||
|
OUTPUT_ARCH(rx)
|
||||||
|
ENTRY(_start)
|
||||||
|
|
||||||
|
/* Do we need any of these for elf?
|
||||||
|
__DYNAMIC = 0; */
|
||||||
|
|
||||||
|
/* This memory layout corresponds to the smallest predicted RX600 chip. */
|
||||||
|
MEMORY {
|
||||||
|
RAM (w) : ORIGIN = 0x00000000, LENGTH = 0x00020000 /* 128k */
|
||||||
|
STACK (w) : ORIGIN = 0x00020000, LENGTH = 16 /* top of RAM */
|
||||||
|
|
||||||
|
ROM (w) : ORIGIN = 0xfff40000, LENGTH = 0x000bffd0 /* 768k */
|
||||||
|
/* This is the largest RX6000: */
|
||||||
|
/* ROM (w) : ORIGIN = 0xffe00000, LENGTH = 0x001fffd0 */ /* 2Mb */
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
PROVIDE (_start = .);
|
||||||
|
*(.text P .stub .text.* .gnu.linkonce.t.*)
|
||||||
|
KEEP (*(.text.*personality*))
|
||||||
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||||
|
*(.gnu.warning)
|
||||||
|
*(.interp .hash .dynsym .dynstr .gnu.version*)
|
||||||
|
PROVIDE (__etext = .);
|
||||||
|
PROVIDE (_etext = .);
|
||||||
|
PROVIDE (etext = .);
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP (*(.init))
|
||||||
|
KEEP (*(.fini))
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
.rodata : {
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.plt)
|
||||||
|
*(.rodata C C_2 C_1 .rodata.* .gnu.linkonce.r.*)
|
||||||
|
*(.rodata1)
|
||||||
|
*(.eh_frame_hdr)
|
||||||
|
KEEP (*(.eh_frame))
|
||||||
|
KEEP (*(.gcc_except_table)) *(.gcc_except_table.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE(__romdatastart = .);
|
||||||
|
} > ROM
|
||||||
|
|
||||||
|
.data : {
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE (__datastart = .); /* IF_ROROM */
|
||||||
|
PROVIDE (__preinit_array_start = .);
|
||||||
|
KEEP (*(.preinit_array))
|
||||||
|
PROVIDE (__preinit_array_end = .);
|
||||||
|
PROVIDE (__init_array_start = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE (__init_array_end = .);
|
||||||
|
PROVIDE (__fini_array_start = .);
|
||||||
|
KEEP (*(.fini_array))
|
||||||
|
KEEP (*(SORT(.fini_array.*)))
|
||||||
|
PROVIDE (__fini_array_end = .);
|
||||||
|
LONG(0); /* Sentinel. */
|
||||||
|
|
||||||
|
/* gcc uses crtbegin.o to find the start of the constructors, so
|
||||||
|
we make sure it is first. Because this is a wildcard, it
|
||||||
|
doesn't matter if the user does not actually link against
|
||||||
|
crtbegin.o; the linker won't look for a file to match a
|
||||||
|
wildcard. The wildcard also means that it doesn't matter which
|
||||||
|
directory crtbegin.o is in. */
|
||||||
|
KEEP (*crtbegin*.o(.ctors))
|
||||||
|
|
||||||
|
/* We don't want to include the .ctor section from from the
|
||||||
|
crtend.o file until after the sorted ctors. The .ctor section
|
||||||
|
from the crtend file contains the end of ctors marker and it
|
||||||
|
must be last */
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
|
||||||
|
KEEP (*(SORT(.ctors.*)))
|
||||||
|
KEEP (*(.ctors))
|
||||||
|
|
||||||
|
KEEP (*crtbegin*.o(.dtors))
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
|
||||||
|
KEEP (*(SORT(.dtors.*)))
|
||||||
|
KEEP (*(.dtors))
|
||||||
|
|
||||||
|
KEEP (*(.jcr))
|
||||||
|
*(.data.rel.ro.local) *(.data.rel.ro*)
|
||||||
|
*(.dynamic)
|
||||||
|
|
||||||
|
*(.data D .data.* .gnu.linkonce.d.*)
|
||||||
|
KEEP (*(.gnu.linkonce.d.*personality*))
|
||||||
|
SORT(CONSTRUCTORS)
|
||||||
|
*(.data1)
|
||||||
|
*(.got.plt) *(.got)
|
||||||
|
|
||||||
|
/* We want the small data sections together, so single-instruction offsets
|
||||||
|
can access them all, and initialized data all before uninitialized, so
|
||||||
|
we can shorten the on-disk segment size. */
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.sdata .sdata.* .gnu.linkonce.s.* D_2 D_1)
|
||||||
|
|
||||||
|
. = ALIGN(4);
|
||||||
|
_edata = .;
|
||||||
|
PROVIDE (edata = .);
|
||||||
|
PROVIDE (__dataend = .);
|
||||||
|
} > RAM AT> ROM
|
||||||
|
|
||||||
|
/* Note that __romdatacopysize may be ZERO for the simulator, which
|
||||||
|
knows how to intialize RAM directly. It should ONLY be used for
|
||||||
|
copying data from ROM to RAM; if you need to know the size of the
|
||||||
|
data section, subtract the end symbol from the start symbol. */
|
||||||
|
/* Note that crt0 assumes this is a multiple of four; all the
|
||||||
|
start/stop symbols are also assumed long-aligned. */
|
||||||
|
PROVIDE (__romdatacopysize = SIZEOF(.data));
|
||||||
|
|
||||||
|
.bss : {
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE (__bssstart = .);
|
||||||
|
*(.dynbss)
|
||||||
|
*(.bss B B_2 B_1 .bss.* .gnu.linkonce.b.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE (__bssend = .);
|
||||||
|
_end = .;
|
||||||
|
PROVIDE (end = .);
|
||||||
|
} > RAM
|
||||||
|
PROVIDE (__bsssize = SIZEOF(.bss) / 4);
|
||||||
|
|
||||||
|
.stack (ORIGIN (STACK)) :
|
||||||
|
{
|
||||||
|
PROVIDE (__stack = .);
|
||||||
|
*(.stack)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Providing one of these symbols in your code is sufficient to have
|
||||||
|
it linked in to the fixed vector table. */
|
||||||
|
|
||||||
|
PROVIDE (__rx_priviledged_exception_handler = 0x00000000);
|
||||||
|
PROVIDE (__rx_access_exception_handler = 0x00000000);
|
||||||
|
PROVIDE (__rx_undefined_exception_handler = 0x00000000);
|
||||||
|
PROVIDE (__rx_floating_exception_handler = 0x00000000);
|
||||||
|
PROVIDE (__rx_nonmaskable_exception_handler = 0x00000000);
|
||||||
|
|
||||||
|
.vectors (0xFFFFFFD0) :
|
||||||
|
{
|
||||||
|
PROVIDE (__vectors = .);
|
||||||
|
LONG (__rx_priviledged_exception_handler);
|
||||||
|
LONG (__rx_access_exception_handler);
|
||||||
|
LONG (0);
|
||||||
|
LONG (__rx_undefined_exception_handler);
|
||||||
|
LONG (0);
|
||||||
|
LONG (__rx_floating_exception_handler);
|
||||||
|
LONG (0);
|
||||||
|
LONG (0);
|
||||||
|
LONG (0);
|
||||||
|
LONG (0);
|
||||||
|
LONG (__rx_nonmaskable_exception_handler);
|
||||||
|
LONG (_start);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The rest are all not normally part of the runtime image. */
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
/* DWARF debug sections.
|
||||||
|
Symbols in the DWARF debugging sections are relative to the beginning
|
||||||
|
of the section so we begin them at 0. */
|
||||||
|
/* DWARF 1 */
|
||||||
|
.debug 0 : { *(.debug) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
/* SGI/MIPS DWARF 2 extensions */
|
||||||
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
/DISCARD/ : { *(.note.GNU-stack) }
|
||||||
|
}
|
60
libgloss/rx/rxsys.h
Normal file
60
libgloss/rx/rxsys.h
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005, 2009 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "syscall.h"
|
||||||
|
|
||||||
|
/* This mixture of C pre-processor macros and assembler
|
||||||
|
macros is to get around the fact that the RX assembler
|
||||||
|
does not support a line separator character. */
|
||||||
|
|
||||||
|
#define SYS__exit SYS_exit
|
||||||
|
|
||||||
|
.macro syscall_body number
|
||||||
|
/* We use interrupt 255 as a system call,
|
||||||
|
with the call number in r5. */
|
||||||
|
mov # \number, r5
|
||||||
|
int # 255
|
||||||
|
rts
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
.macro do_syscall name number
|
||||||
|
__\name:
|
||||||
|
.global __\name
|
||||||
|
_\name:
|
||||||
|
.weak _\name
|
||||||
|
syscall_body \number
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
#define S(name) do_syscall name SYS_##name
|
||||||
|
#define SYSCALL(number) syscall_body number
|
47
libgloss/rx/sbrk.c
Normal file
47
libgloss/rx/sbrk.c
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005, 2009 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern void __set_heaptop (void * ptr);
|
||||||
|
|
||||||
|
char *
|
||||||
|
_sbrk (int adj)
|
||||||
|
{
|
||||||
|
extern char end;
|
||||||
|
static char * heap = & end;
|
||||||
|
char * rv = heap;
|
||||||
|
|
||||||
|
heap += adj;
|
||||||
|
__set_heaptop (heap);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
char * sbrk (int) __attribute__((weak, alias ("_sbrk")));
|
37
libgloss/rx/sigprocmask.S
Normal file
37
libgloss/rx/sigprocmask.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2009 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
#define SYS_sigprocmask 127
|
||||||
|
|
||||||
|
S(sigprocmask)
|
37
libgloss/rx/sleep.S
Normal file
37
libgloss/rx/sleep.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2009 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
#define SYS_sleep 127
|
||||||
|
|
||||||
|
S(sleep)
|
35
libgloss/rx/stat.S
Normal file
35
libgloss/rx/stat.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(stat)
|
35
libgloss/rx/time.S
Normal file
35
libgloss/rx/time.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(time)
|
35
libgloss/rx/times.S
Normal file
35
libgloss/rx/times.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(times)
|
35
libgloss/rx/unlink.S
Normal file
35
libgloss/rx/unlink.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(unlink)
|
35
libgloss/rx/utime.S
Normal file
35
libgloss/rx/utime.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(utime)
|
35
libgloss/rx/write.S
Normal file
35
libgloss/rx/write.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (c) 2005 Red Hat Incorporated.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
The name of Red Hat Incorporated may not be used to endorse
|
||||||
|
or promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 RED HAT INCORPORATED 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 "rxsys.h"
|
||||||
|
|
||||||
|
S(write)
|
@ -1,3 +1,13 @@
|
|||||||
|
2009-10-26 DJ Delorie <dj@redhat.com>
|
||||||
|
|
||||||
|
* configure.host: Add support for RX architecture.
|
||||||
|
* libc/include/machine/ieeefp.h: Likewise.
|
||||||
|
* libc/include/machine/setjmp.h: Likewise.
|
||||||
|
* libc/include/machine/configure.in: Likewise.
|
||||||
|
* libc/include/machine/configure: Regenerate.
|
||||||
|
* libc/machine/rx: New directory.
|
||||||
|
* libc/machine/rx/*: New files to support RX architecture.
|
||||||
|
|
||||||
2009-10-24 Eric Blake <ebb9@byu.net>
|
2009-10-24 Eric Blake <ebb9@byu.net>
|
||||||
|
|
||||||
* libc/include/ctype.h (__ctype_lookup): New macro.
|
* libc/include/ctype.h (__ctype_lookup): New macro.
|
||||||
|
@ -223,6 +223,11 @@ case "${host_cpu}" in
|
|||||||
powerpc*)
|
powerpc*)
|
||||||
machine_dir=powerpc
|
machine_dir=powerpc
|
||||||
;;
|
;;
|
||||||
|
rx)
|
||||||
|
machine_dir=rx
|
||||||
|
default_newlib_io_long_long="yes"
|
||||||
|
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
|
||||||
|
;;
|
||||||
sh | sh64)
|
sh | sh64)
|
||||||
machine_dir=sh
|
machine_dir=sh
|
||||||
;;
|
;;
|
||||||
|
@ -326,6 +326,24 @@
|
|||||||
#define __IEEE_BIG_ENDIAN
|
#define __IEEE_BIG_ENDIAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __RX__
|
||||||
|
|
||||||
|
#ifdef __RX_BIG_ENDIAN__
|
||||||
|
#define __IEEE_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
#define __IEEE_LITTLE_ENDIAN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __RX_64BIT_DOUBLES__
|
||||||
|
#define _DOUBLE_IS_32BITS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __RX_16BIT_INTS__
|
||||||
|
#define __SMALL_BITFIELDS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __IEEE_BIG_ENDIAN
|
#ifndef __IEEE_BIG_ENDIAN
|
||||||
#ifndef __IEEE_LITTLE_ENDIAN
|
#ifndef __IEEE_LITTLE_ENDIAN
|
||||||
#error Endianess not declared!!
|
#error Endianess not declared!!
|
||||||
|
@ -254,6 +254,10 @@ _BEGIN_STD_C
|
|||||||
#define _JBTYPE unsigned short
|
#define _JBTYPE unsigned short
|
||||||
#endif /* __m32c__ */
|
#endif /* __m32c__ */
|
||||||
|
|
||||||
|
#ifdef __RX__
|
||||||
|
#define _JBLEN 0x44
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _JBLEN
|
#ifdef _JBLEN
|
||||||
#ifdef _JBTYPE
|
#ifdef _JBTYPE
|
||||||
typedef _JBTYPE jmp_buf[_JBLEN];
|
typedef _JBTYPE jmp_buf[_JBLEN];
|
||||||
|
66
newlib/libc/machine/configure
vendored
66
newlib/libc/machine/configure
vendored
@ -488,6 +488,7 @@ ac_subdirs_all="$ac_subdirs_all moxie"
|
|||||||
ac_subdirs_all="$ac_subdirs_all mt"
|
ac_subdirs_all="$ac_subdirs_all mt"
|
||||||
ac_subdirs_all="$ac_subdirs_all necv70"
|
ac_subdirs_all="$ac_subdirs_all necv70"
|
||||||
ac_subdirs_all="$ac_subdirs_all powerpc"
|
ac_subdirs_all="$ac_subdirs_all powerpc"
|
||||||
|
ac_subdirs_all="$ac_subdirs_all rx"
|
||||||
ac_subdirs_all="$ac_subdirs_all sh"
|
ac_subdirs_all="$ac_subdirs_all sh"
|
||||||
ac_subdirs_all="$ac_subdirs_all sparc"
|
ac_subdirs_all="$ac_subdirs_all sparc"
|
||||||
ac_subdirs_all="$ac_subdirs_all spu"
|
ac_subdirs_all="$ac_subdirs_all spu"
|
||||||
@ -4811,13 +4812,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
|
|||||||
else
|
else
|
||||||
lt_cv_nm_interface="BSD nm"
|
lt_cv_nm_interface="BSD nm"
|
||||||
echo "int some_variable = 0;" > conftest.$ac_ext
|
echo "int some_variable = 0;" > conftest.$ac_ext
|
||||||
(eval echo "\"\$as_me:4813: $ac_compile\"" >&5)
|
(eval echo "\"\$as_me:4814: $ac_compile\"" >&5)
|
||||||
(eval "$ac_compile" 2>conftest.err)
|
(eval "$ac_compile" 2>conftest.err)
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
(eval echo "\"\$as_me:4816: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
(eval echo "\"\$as_me:4817: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||||
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
|
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
(eval echo "\"\$as_me:4819: output\"" >&5)
|
(eval echo "\"\$as_me:4820: output\"" >&5)
|
||||||
cat conftest.out >&5
|
cat conftest.out >&5
|
||||||
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
|
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
|
||||||
lt_cv_nm_interface="MS dumpbin"
|
lt_cv_nm_interface="MS dumpbin"
|
||||||
@ -5268,7 +5269,7 @@ irix5* | irix6* | nonstopux*)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# This must be Linux ELF.
|
# This must be Linux ELF.
|
||||||
linux* | k*bsd*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||||
lt_cv_deplibs_check_method=pass_all
|
lt_cv_deplibs_check_method=pass_all
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -5972,7 +5973,7 @@ ia64-*-hpux*)
|
|||||||
;;
|
;;
|
||||||
*-*-irix6*)
|
*-*-irix6*)
|
||||||
# Find out which ABI we are using.
|
# Find out which ABI we are using.
|
||||||
echo '#line 5974 "configure"' > conftest.$ac_ext
|
echo '#line 5975 "configure"' > conftest.$ac_ext
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
(eval $ac_compile) 2>&5
|
(eval $ac_compile) 2>&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
@ -7749,11 +7750,11 @@ else
|
|||||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||||
-e 's:$: $lt_compiler_flag:'`
|
-e 's:$: $lt_compiler_flag:'`
|
||||||
(eval echo "\"\$as_me:7751: $lt_compile\"" >&5)
|
(eval echo "\"\$as_me:7752: $lt_compile\"" >&5)
|
||||||
(eval "$lt_compile" 2>conftest.err)
|
(eval "$lt_compile" 2>conftest.err)
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
echo "$as_me:7755: \$? = $ac_status" >&5
|
echo "$as_me:7756: \$? = $ac_status" >&5
|
||||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
# So say no if there are warnings other than the usual output.
|
# So say no if there are warnings other than the usual output.
|
||||||
@ -7918,7 +7919,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
|
|||||||
lt_prog_compiler_static='-non_shared'
|
lt_prog_compiler_static='-non_shared'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
linux* | k*bsd*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
# old Intel for x86_64 which still supported -KPIC.
|
# old Intel for x86_64 which still supported -KPIC.
|
||||||
ecc*)
|
ecc*)
|
||||||
@ -8088,11 +8089,11 @@ else
|
|||||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||||
-e 's:$: $lt_compiler_flag:'`
|
-e 's:$: $lt_compiler_flag:'`
|
||||||
(eval echo "\"\$as_me:8090: $lt_compile\"" >&5)
|
(eval echo "\"\$as_me:8091: $lt_compile\"" >&5)
|
||||||
(eval "$lt_compile" 2>conftest.err)
|
(eval "$lt_compile" 2>conftest.err)
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
echo "$as_me:8094: \$? = $ac_status" >&5
|
echo "$as_me:8095: \$? = $ac_status" >&5
|
||||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
# So say no if there are warnings other than the usual output.
|
# So say no if there are warnings other than the usual output.
|
||||||
@ -8193,11 +8194,11 @@ else
|
|||||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||||
-e 's:$: $lt_compiler_flag:'`
|
-e 's:$: $lt_compiler_flag:'`
|
||||||
(eval echo "\"\$as_me:8195: $lt_compile\"" >&5)
|
(eval echo "\"\$as_me:8196: $lt_compile\"" >&5)
|
||||||
(eval "$lt_compile" 2>out/conftest.err)
|
(eval "$lt_compile" 2>out/conftest.err)
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
cat out/conftest.err >&5
|
cat out/conftest.err >&5
|
||||||
echo "$as_me:8199: \$? = $ac_status" >&5
|
echo "$as_me:8200: \$? = $ac_status" >&5
|
||||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||||
then
|
then
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
@ -8248,11 +8249,11 @@ else
|
|||||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||||
-e 's:$: $lt_compiler_flag:'`
|
-e 's:$: $lt_compiler_flag:'`
|
||||||
(eval echo "\"\$as_me:8250: $lt_compile\"" >&5)
|
(eval echo "\"\$as_me:8251: $lt_compile\"" >&5)
|
||||||
(eval "$lt_compile" 2>out/conftest.err)
|
(eval "$lt_compile" 2>out/conftest.err)
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
cat out/conftest.err >&5
|
cat out/conftest.err >&5
|
||||||
echo "$as_me:8254: \$? = $ac_status" >&5
|
echo "$as_me:8255: \$? = $ac_status" >&5
|
||||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||||
then
|
then
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
@ -8479,7 +8480,7 @@ _LT_EOF
|
|||||||
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gnu* | linux* | tpf* | k*bsd*-gnu)
|
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||||
tmp_diet=no
|
tmp_diet=no
|
||||||
if test "$host_os" = linux-dietlibc; then
|
if test "$host_os" = linux-dietlibc; then
|
||||||
case $cc_basename in
|
case $cc_basename in
|
||||||
@ -9414,6 +9415,9 @@ x|xyes)
|
|||||||
# to ld, don't add -lc before -lgcc.
|
# to ld, don't add -lc before -lgcc.
|
||||||
echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
|
echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
|
||||||
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
|
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
|
||||||
|
if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
$RM conftest*
|
$RM conftest*
|
||||||
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
|
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
|
||||||
|
|
||||||
@ -9441,17 +9445,20 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&
|
|||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }
|
(exit $ac_status); }
|
||||||
then
|
then
|
||||||
archive_cmds_need_lc=no
|
lt_cv_archive_cmds_need_lc=no
|
||||||
else
|
else
|
||||||
archive_cmds_need_lc=yes
|
lt_cv_archive_cmds_need_lc=yes
|
||||||
fi
|
fi
|
||||||
allow_undefined_flag=$lt_save_allow_undefined_flag
|
allow_undefined_flag=$lt_save_allow_undefined_flag
|
||||||
else
|
else
|
||||||
cat conftest.err 1>&5
|
cat conftest.err 1>&5
|
||||||
fi
|
fi
|
||||||
$RM conftest*
|
$RM conftest*
|
||||||
echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
|
|
||||||
echo "${ECHO_T}$archive_cmds_need_lc" >&6
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
|
||||||
|
echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
|
||||||
|
archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -10022,7 +10029,7 @@ linux*oldld* | linux*aout* | linux*coff*)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# This must be Linux ELF.
|
# This must be Linux ELF.
|
||||||
linux* | k*bsd*-gnu)
|
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||||
version_type=linux
|
version_type=linux
|
||||||
need_lib_prefix=no
|
need_lib_prefix=no
|
||||||
need_version=no
|
need_version=no
|
||||||
@ -10031,7 +10038,12 @@ linux* | k*bsd*-gnu)
|
|||||||
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
shlibpath_overrides_runpath=no
|
shlibpath_overrides_runpath=no
|
||||||
|
|
||||||
# Some binutils ld are patched to set DT_RUNPATH
|
# Some binutils ld are patched to set DT_RUNPATH
|
||||||
|
if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
lt_cv_shlibpath_overrides_runpath=no
|
||||||
save_LDFLAGS=$LDFLAGS
|
save_LDFLAGS=$LDFLAGS
|
||||||
save_libdir=$libdir
|
save_libdir=$libdir
|
||||||
eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
|
eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
|
||||||
@ -10074,7 +10086,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
|
if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
|
||||||
shlibpath_overrides_runpath=yes
|
lt_cv_shlibpath_overrides_runpath=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -10087,6 +10099,10 @@ rm -f conftest.err conftest.$ac_objext \
|
|||||||
LDFLAGS=$save_LDFLAGS
|
LDFLAGS=$save_LDFLAGS
|
||||||
libdir=$save_libdir
|
libdir=$save_libdir
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
|
||||||
|
|
||||||
# This implies no fast_install, which is unacceptable.
|
# This implies no fast_install, which is unacceptable.
|
||||||
# Some rework will be needed to allow for fast_install
|
# Some rework will be needed to allow for fast_install
|
||||||
# before this can be enabled.
|
# before this can be enabled.
|
||||||
@ -11045,7 +11061,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11047 "configure"
|
#line 11063 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -11141,7 +11157,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11143 "configure"
|
#line 11159 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -11491,6 +11507,10 @@ subdirs="$subdirs necv70"
|
|||||||
powerpc)
|
powerpc)
|
||||||
|
|
||||||
subdirs="$subdirs powerpc"
|
subdirs="$subdirs powerpc"
|
||||||
|
;;
|
||||||
|
rx)
|
||||||
|
|
||||||
|
subdirs="$subdirs rx"
|
||||||
;;
|
;;
|
||||||
sh)
|
sh)
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ if test -n "${machine_dir}"; then
|
|||||||
mt) AC_CONFIG_SUBDIRS(mt) ;;
|
mt) AC_CONFIG_SUBDIRS(mt) ;;
|
||||||
necv70) AC_CONFIG_SUBDIRS(necv70) ;;
|
necv70) AC_CONFIG_SUBDIRS(necv70) ;;
|
||||||
powerpc) AC_CONFIG_SUBDIRS(powerpc) ;;
|
powerpc) AC_CONFIG_SUBDIRS(powerpc) ;;
|
||||||
|
rx) AC_CONFIG_SUBDIRS(rx) ;;
|
||||||
sh) AC_CONFIG_SUBDIRS(sh) ;;
|
sh) AC_CONFIG_SUBDIRS(sh) ;;
|
||||||
sparc) AC_CONFIG_SUBDIRS(sparc) ;;
|
sparc) AC_CONFIG_SUBDIRS(sparc) ;;
|
||||||
spu) AC_CONFIG_SUBDIRS(spu) ;;
|
spu) AC_CONFIG_SUBDIRS(spu) ;;
|
||||||
|
18
newlib/libc/machine/rx/Makefile.am
Normal file
18
newlib/libc/machine/rx/Makefile.am
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
## Process this file with automake to generate Makefile.in
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = cygnus
|
||||||
|
|
||||||
|
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||||
|
|
||||||
|
AM_CCASFLAGS = $(INCLUDES)
|
||||||
|
|
||||||
|
noinst_LIBRARIES = lib.a
|
||||||
|
|
||||||
|
lib_a_SOURCES = setjmp.S \
|
||||||
|
strncmp.S strcmp.S strncpy.S strcpy.S strlen.S strcat.S strncat.S \
|
||||||
|
memset.S mempcpy.S memcpy.S memmove.S memchr.S
|
||||||
|
lib_a_CCASFLAGS=$(AM_CCASFLAGS)
|
||||||
|
lib_a_CFLAGS=$(AM_CFLAGS)
|
||||||
|
|
||||||
|
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
|
||||||
|
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
472
newlib/libc/machine/rx/Makefile.in
Normal file
472
newlib/libc/machine/rx/Makefile.in
Normal file
@ -0,0 +1,472 @@
|
|||||||
|
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
top_builddir = .
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
DIST_COMMON = $(srcdir)/../../../../config.guess \
|
||||||
|
$(srcdir)/../../../../config.sub $(srcdir)/Makefile.in \
|
||||||
|
$(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||||
|
$(am__configure_deps) $(srcdir)/../../../../mkinstalldirs
|
||||||
|
subdir = .
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
|
||||||
|
$(top_srcdir)/configure.in
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
|
configure.lineno configure.status.lineno
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
LIBRARIES = $(noinst_LIBRARIES)
|
||||||
|
ARFLAGS = cru
|
||||||
|
lib_a_AR = $(AR) $(ARFLAGS)
|
||||||
|
lib_a_LIBADD =
|
||||||
|
am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-strncmp.$(OBJEXT) \
|
||||||
|
lib_a-strcmp.$(OBJEXT) lib_a-strncpy.$(OBJEXT) \
|
||||||
|
lib_a-strcpy.$(OBJEXT) lib_a-strlen.$(OBJEXT) \
|
||||||
|
lib_a-strcat.$(OBJEXT) lib_a-strncat.$(OBJEXT) \
|
||||||
|
lib_a-memset.$(OBJEXT) lib_a-mempcpy.$(OBJEXT) \
|
||||||
|
lib_a-memcpy.$(OBJEXT) lib_a-memmove.$(OBJEXT) \
|
||||||
|
lib_a-memchr.$(OBJEXT)
|
||||||
|
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
|
||||||
|
DEFAULT_INCLUDES = -I. -I$(srcdir)
|
||||||
|
depcomp =
|
||||||
|
am__depfiles_maybe =
|
||||||
|
CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
|
||||||
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
CCLD = $(CC)
|
||||||
|
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||||
|
SOURCES = $(lib_a_SOURCES)
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMDEP_FALSE = @AMDEP_FALSE@
|
||||||
|
AMDEP_TRUE = @AMDEP_TRUE@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCAS = @CCAS@
|
||||||
|
CCASFLAGS = @CCASFLAGS@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
ELIX_LEVEL_0_FALSE = @ELIX_LEVEL_0_FALSE@
|
||||||
|
ELIX_LEVEL_0_TRUE = @ELIX_LEVEL_0_TRUE@
|
||||||
|
ELIX_LEVEL_1_FALSE = @ELIX_LEVEL_1_FALSE@
|
||||||
|
ELIX_LEVEL_1_TRUE = @ELIX_LEVEL_1_TRUE@
|
||||||
|
ELIX_LEVEL_2_FALSE = @ELIX_LEVEL_2_FALSE@
|
||||||
|
ELIX_LEVEL_2_TRUE = @ELIX_LEVEL_2_TRUE@
|
||||||
|
ELIX_LEVEL_3_FALSE = @ELIX_LEVEL_3_FALSE@
|
||||||
|
ELIX_LEVEL_3_TRUE = @ELIX_LEVEL_3_TRUE@
|
||||||
|
ELIX_LEVEL_4_FALSE = @ELIX_LEVEL_4_FALSE@
|
||||||
|
ELIX_LEVEL_4_TRUE = @ELIX_LEVEL_4_TRUE@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||||
|
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MAY_SUPPLY_SYSCALLS_FALSE = @MAY_SUPPLY_SYSCALLS_FALSE@
|
||||||
|
MAY_SUPPLY_SYSCALLS_TRUE = @MAY_SUPPLY_SYSCALLS_TRUE@
|
||||||
|
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
READELF = @READELF@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USE_LIBTOOL_FALSE = @USE_LIBTOOL_FALSE@
|
||||||
|
USE_LIBTOOL_TRUE = @USE_LIBTOOL_TRUE@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
aext = @aext@
|
||||||
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
libm_machine_dir = @libm_machine_dir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
lpfx = @lpfx@
|
||||||
|
machine_dir = @machine_dir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
newlib_basedir = @newlib_basedir@
|
||||||
|
oext = @oext@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
sys_dir = @sys_dir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
AUTOMAKE_OPTIONS = cygnus
|
||||||
|
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||||
|
AM_CCASFLAGS = $(INCLUDES)
|
||||||
|
noinst_LIBRARIES = lib.a
|
||||||
|
lib_a_SOURCES = setjmp.S \
|
||||||
|
strncmp.S strcmp.S strncpy.S strcpy.S strlen.S strcat.S strncat.S \
|
||||||
|
memset.S mempcpy.S memcpy.S memmove.S memchr.S
|
||||||
|
|
||||||
|
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
|
||||||
|
lib_a_CFLAGS = $(AM_CFLAGS)
|
||||||
|
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
|
||||||
|
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .S .o .obj
|
||||||
|
am--refresh:
|
||||||
|
@:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
|
||||||
|
cd $(srcdir) && $(AUTOMAKE) --cygnus \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
|
||||||
|
cd $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --cygnus Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
echo ' $(SHELL) ./config.status'; \
|
||||||
|
$(SHELL) ./config.status;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
$(SHELL) ./config.status --recheck
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(srcdir) && $(AUTOCONF)
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
|
|
||||||
|
clean-noinstLIBRARIES:
|
||||||
|
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||||
|
lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
|
||||||
|
-rm -f lib.a
|
||||||
|
$(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
|
||||||
|
$(RANLIB) lib.a
|
||||||
|
|
||||||
|
mostlyclean-compile:
|
||||||
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
|
distclean-compile:
|
||||||
|
-rm -f *.tab.c
|
||||||
|
|
||||||
|
.S.o:
|
||||||
|
$(CCASCOMPILE) -c $<
|
||||||
|
|
||||||
|
.S.obj:
|
||||||
|
$(CCASCOMPILE) -c `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
|
lib_a-setjmp.o: setjmp.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.o `test -f 'setjmp.S' || echo '$(srcdir)/'`setjmp.S
|
||||||
|
|
||||||
|
lib_a-setjmp.obj: setjmp.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
|
||||||
|
|
||||||
|
lib_a-strncmp.o: strncmp.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncmp.o `test -f 'strncmp.S' || echo '$(srcdir)/'`strncmp.S
|
||||||
|
|
||||||
|
lib_a-strncmp.obj: strncmp.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncmp.obj `if test -f 'strncmp.S'; then $(CYGPATH_W) 'strncmp.S'; else $(CYGPATH_W) '$(srcdir)/strncmp.S'; fi`
|
||||||
|
|
||||||
|
lib_a-strcmp.o: strcmp.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.o `test -f 'strcmp.S' || echo '$(srcdir)/'`strcmp.S
|
||||||
|
|
||||||
|
lib_a-strcmp.obj: strcmp.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.obj `if test -f 'strcmp.S'; then $(CYGPATH_W) 'strcmp.S'; else $(CYGPATH_W) '$(srcdir)/strcmp.S'; fi`
|
||||||
|
|
||||||
|
lib_a-strncpy.o: strncpy.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncpy.o `test -f 'strncpy.S' || echo '$(srcdir)/'`strncpy.S
|
||||||
|
|
||||||
|
lib_a-strncpy.obj: strncpy.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncpy.obj `if test -f 'strncpy.S'; then $(CYGPATH_W) 'strncpy.S'; else $(CYGPATH_W) '$(srcdir)/strncpy.S'; fi`
|
||||||
|
|
||||||
|
lib_a-strcpy.o: strcpy.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.o `test -f 'strcpy.S' || echo '$(srcdir)/'`strcpy.S
|
||||||
|
|
||||||
|
lib_a-strcpy.obj: strcpy.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.obj `if test -f 'strcpy.S'; then $(CYGPATH_W) 'strcpy.S'; else $(CYGPATH_W) '$(srcdir)/strcpy.S'; fi`
|
||||||
|
|
||||||
|
lib_a-strlen.o: strlen.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.S' || echo '$(srcdir)/'`strlen.S
|
||||||
|
|
||||||
|
lib_a-strlen.obj: strlen.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.S'; then $(CYGPATH_W) 'strlen.S'; else $(CYGPATH_W) '$(srcdir)/strlen.S'; fi`
|
||||||
|
|
||||||
|
lib_a-strcat.o: strcat.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcat.o `test -f 'strcat.S' || echo '$(srcdir)/'`strcat.S
|
||||||
|
|
||||||
|
lib_a-strcat.obj: strcat.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcat.obj `if test -f 'strcat.S'; then $(CYGPATH_W) 'strcat.S'; else $(CYGPATH_W) '$(srcdir)/strcat.S'; fi`
|
||||||
|
|
||||||
|
lib_a-strncat.o: strncat.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncat.o `test -f 'strncat.S' || echo '$(srcdir)/'`strncat.S
|
||||||
|
|
||||||
|
lib_a-strncat.obj: strncat.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncat.obj `if test -f 'strncat.S'; then $(CYGPATH_W) 'strncat.S'; else $(CYGPATH_W) '$(srcdir)/strncat.S'; fi`
|
||||||
|
|
||||||
|
lib_a-memset.o: memset.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.o `test -f 'memset.S' || echo '$(srcdir)/'`memset.S
|
||||||
|
|
||||||
|
lib_a-memset.obj: memset.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.obj `if test -f 'memset.S'; then $(CYGPATH_W) 'memset.S'; else $(CYGPATH_W) '$(srcdir)/memset.S'; fi`
|
||||||
|
|
||||||
|
lib_a-mempcpy.o: mempcpy.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-mempcpy.o `test -f 'mempcpy.S' || echo '$(srcdir)/'`mempcpy.S
|
||||||
|
|
||||||
|
lib_a-mempcpy.obj: mempcpy.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-mempcpy.obj `if test -f 'mempcpy.S'; then $(CYGPATH_W) 'mempcpy.S'; else $(CYGPATH_W) '$(srcdir)/mempcpy.S'; fi`
|
||||||
|
|
||||||
|
lib_a-memcpy.o: memcpy.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.S' || echo '$(srcdir)/'`memcpy.S
|
||||||
|
|
||||||
|
lib_a-memcpy.obj: memcpy.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.obj `if test -f 'memcpy.S'; then $(CYGPATH_W) 'memcpy.S'; else $(CYGPATH_W) '$(srcdir)/memcpy.S'; fi`
|
||||||
|
|
||||||
|
lib_a-memmove.o: memmove.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memmove.o `test -f 'memmove.S' || echo '$(srcdir)/'`memmove.S
|
||||||
|
|
||||||
|
lib_a-memmove.obj: memmove.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memmove.obj `if test -f 'memmove.S'; then $(CYGPATH_W) 'memmove.S'; else $(CYGPATH_W) '$(srcdir)/memmove.S'; fi`
|
||||||
|
|
||||||
|
lib_a-memchr.o: memchr.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memchr.o `test -f 'memchr.S' || echo '$(srcdir)/'`memchr.S
|
||||||
|
|
||||||
|
lib_a-memchr.obj: memchr.S
|
||||||
|
$(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memchr.obj `if test -f 'memchr.S'; then $(CYGPATH_W) 'memchr.S'; else $(CYGPATH_W) '$(srcdir)/memchr.S'; fi`
|
||||||
|
uninstall-info-am:
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
mkid -fID $$unique
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$tags $$unique; \
|
||||||
|
fi
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$tags $$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& cd $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) $$here
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
check-am:
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(LIBRARIES)
|
||||||
|
installdirs:
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
`test -z '$(STRIP)' || \
|
||||||
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
|
distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||||
|
clean-generic clean-noinstLIBRARIES ctags distclean \
|
||||||
|
distclean-compile distclean-generic distclean-tags dvi dvi-am \
|
||||||
|
html html-am info info-am install install-am install-data \
|
||||||
|
install-data-am install-exec install-exec-am install-info \
|
||||||
|
install-info-am install-man install-strip installcheck \
|
||||||
|
installcheck-am installdirs maintainer-clean \
|
||||||
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
|
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||||
|
uninstall-am uninstall-info-am
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
880
newlib/libc/machine/rx/aclocal.m4
vendored
Normal file
880
newlib/libc/machine/rx/aclocal.m4
vendored
Normal file
@ -0,0 +1,880 @@
|
|||||||
|
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
|
# 2005 Free Software Foundation, Inc.
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_AUTOMAKE_VERSION(VERSION)
|
||||||
|
# ----------------------------
|
||||||
|
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||||
|
# generated from the m4 files accompanying Automake X.Y.
|
||||||
|
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||||
|
|
||||||
|
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||||
|
# -------------------------------
|
||||||
|
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||||
|
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||||
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
|
[AM_AUTOMAKE_VERSION([1.9.6])])
|
||||||
|
|
||||||
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||||
|
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||||
|
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||||
|
#
|
||||||
|
# Of course, Automake must honor this variable whenever it calls a
|
||||||
|
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||||
|
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||||
|
# depending on how configure is run. This is pretty annoying, since
|
||||||
|
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||||
|
# source directory, any form will work fine, but in subdirectories a
|
||||||
|
# relative path needs to be adjusted first.
|
||||||
|
#
|
||||||
|
# $ac_aux_dir/missing
|
||||||
|
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||||
|
# $top_srcdir/$ac_aux_dir/missing
|
||||||
|
# fails if $ac_aux_dir is absolute,
|
||||||
|
# fails when called from a subdirectory in a VPATH build with
|
||||||
|
# a relative $ac_aux_dir
|
||||||
|
#
|
||||||
|
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||||
|
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||||
|
# harmless because $srcdir is `.', but things will broke when you
|
||||||
|
# start a VPATH build or use an absolute $srcdir.
|
||||||
|
#
|
||||||
|
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||||
|
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||||
|
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||||
|
# and then we would define $MISSING as
|
||||||
|
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||||
|
# This will work as long as MISSING is not called from configure, because
|
||||||
|
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||||
|
# However there are other variables, like CC, which are often used in
|
||||||
|
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||||
|
#
|
||||||
|
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||||
|
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||||
|
# configured tree to be moved without reconfiguration.
|
||||||
|
|
||||||
|
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||||
|
[dnl Rely on autoconf to set up CDPATH properly.
|
||||||
|
AC_PREREQ([2.50])dnl
|
||||||
|
# expand $ac_aux_dir to an absolute path
|
||||||
|
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||||
|
])
|
||||||
|
|
||||||
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 7
|
||||||
|
|
||||||
|
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||||
|
# -------------------------------------
|
||||||
|
# Define a conditional.
|
||||||
|
AC_DEFUN([AM_CONDITIONAL],
|
||||||
|
[AC_PREREQ(2.52)dnl
|
||||||
|
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||||
|
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||||
|
AC_SUBST([$1_TRUE])
|
||||||
|
AC_SUBST([$1_FALSE])
|
||||||
|
if $2; then
|
||||||
|
$1_TRUE=
|
||||||
|
$1_FALSE='#'
|
||||||
|
else
|
||||||
|
$1_TRUE='#'
|
||||||
|
$1_FALSE=
|
||||||
|
fi
|
||||||
|
AC_CONFIG_COMMANDS_PRE(
|
||||||
|
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||||
|
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
|
fi])])
|
||||||
|
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 8
|
||||||
|
|
||||||
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||||
|
# written in clear, in which case automake, when reading aclocal.m4,
|
||||||
|
# will think it sees a *use*, and therefore will trigger all it's
|
||||||
|
# C support machinery. Also note that it means that autoscan, seeing
|
||||||
|
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||||
|
|
||||||
|
|
||||||
|
# _AM_DEPENDENCIES(NAME)
|
||||||
|
# ----------------------
|
||||||
|
# See how the compiler implements dependency checking.
|
||||||
|
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||||
|
# We try a few techniques and use that to set a single cache variable.
|
||||||
|
#
|
||||||
|
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||||
|
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||||
|
# dependency, and given that the user is not expected to run this macro,
|
||||||
|
# just rely on AC_PROG_CC.
|
||||||
|
AC_DEFUN([_AM_DEPENDENCIES],
|
||||||
|
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||||
|
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||||
|
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||||
|
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||||
|
|
||||||
|
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||||
|
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||||
|
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||||
|
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||||
|
[depcc="$$1" am_compiler_list=])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([dependency style of $depcc],
|
||||||
|
[am_cv_$1_dependencies_compiler_type],
|
||||||
|
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||||
|
# We make a subdir and do the tests there. Otherwise we can end up
|
||||||
|
# making bogus files that we don't know about and never remove. For
|
||||||
|
# instance it was reported that on HP-UX the gcc test will end up
|
||||||
|
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||||
|
# in D'.
|
||||||
|
mkdir conftest.dir
|
||||||
|
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||||
|
# using a relative directory.
|
||||||
|
cp "$am_depcomp" conftest.dir
|
||||||
|
cd conftest.dir
|
||||||
|
# We will build objects and dependencies in a subdirectory because
|
||||||
|
# it helps to detect inapplicable dependency modes. For instance
|
||||||
|
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||||
|
# side effect of compilation, but ICC will put the dependencies in
|
||||||
|
# the current directory while Tru64 will put them in the object
|
||||||
|
# directory.
|
||||||
|
mkdir sub
|
||||||
|
|
||||||
|
am_cv_$1_dependencies_compiler_type=none
|
||||||
|
if test "$am_compiler_list" = ""; then
|
||||||
|
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||||
|
fi
|
||||||
|
for depmode in $am_compiler_list; do
|
||||||
|
# Setup a source with many dependencies, because some compilers
|
||||||
|
# like to wrap large dependency lists on column 80 (with \), and
|
||||||
|
# we should not choose a depcomp mode which is confused by this.
|
||||||
|
#
|
||||||
|
# We need to recreate these files for each test, as the compiler may
|
||||||
|
# overwrite some of them when testing with obscure command lines.
|
||||||
|
# This happens at least with the AIX C compiler.
|
||||||
|
: > sub/conftest.c
|
||||||
|
for i in 1 2 3 4 5 6; do
|
||||||
|
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||||
|
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||||
|
# Solaris 8's {/usr,}/bin/sh.
|
||||||
|
touch sub/conftst$i.h
|
||||||
|
done
|
||||||
|
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||||
|
|
||||||
|
case $depmode in
|
||||||
|
nosideeffect)
|
||||||
|
# after this tag, mechanisms are not by side-effect, so they'll
|
||||||
|
# only be used when explicitly requested
|
||||||
|
if test "x$enable_dependency_tracking" = xyes; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
none) break ;;
|
||||||
|
esac
|
||||||
|
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||||
|
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||||
|
# handle `-M -o', and we need to detect this.
|
||||||
|
if depmode=$depmode \
|
||||||
|
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||||
|
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||||
|
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||||
|
>/dev/null 2>conftest.err &&
|
||||||
|
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
|
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
|
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||||
|
# icc doesn't choke on unknown options, it will just issue warnings
|
||||||
|
# or remarks (even with -Werror). So we grep stderr for any message
|
||||||
|
# that says an option was ignored or not supported.
|
||||||
|
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||||
|
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||||
|
# The diagnosis changed in icc 8.0:
|
||||||
|
# icc: Command line remark: option '-MP' not supported
|
||||||
|
if (grep 'ignoring option' conftest.err ||
|
||||||
|
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||||
|
am_cv_$1_dependencies_compiler_type=$depmode
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf conftest.dir
|
||||||
|
else
|
||||||
|
am_cv_$1_dependencies_compiler_type=none
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||||
|
AM_CONDITIONAL([am__fastdep$1], [
|
||||||
|
test "x$enable_dependency_tracking" != xno \
|
||||||
|
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# AM_SET_DEPDIR
|
||||||
|
# -------------
|
||||||
|
# Choose a directory name for dependency files.
|
||||||
|
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||||
|
AC_DEFUN([AM_SET_DEPDIR],
|
||||||
|
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||||
|
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# AM_DEP_TRACK
|
||||||
|
# ------------
|
||||||
|
AC_DEFUN([AM_DEP_TRACK],
|
||||||
|
[AC_ARG_ENABLE(dependency-tracking,
|
||||||
|
[ --disable-dependency-tracking speeds up one-time build
|
||||||
|
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||||
|
if test "x$enable_dependency_tracking" != xno; then
|
||||||
|
am_depcomp="$ac_aux_dir/depcomp"
|
||||||
|
AMDEPBACKSLASH='\'
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||||
|
AC_SUBST([AMDEPBACKSLASH])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
#serial 3
|
||||||
|
|
||||||
|
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
# ------------------------------
|
||||||
|
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[for mf in $CONFIG_FILES; do
|
||||||
|
# Strip MF so we end up with the name of the file.
|
||||||
|
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||||
|
# Check whether this is an Automake generated Makefile or not.
|
||||||
|
# We used to match only the files named `Makefile.in', but
|
||||||
|
# some people rename them; so instead we look at the file content.
|
||||||
|
# Grep'ing the first line is not enough: some people post-process
|
||||||
|
# each Makefile.in and add a new line on top of each file to say so.
|
||||||
|
# So let's grep whole file.
|
||||||
|
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||||
|
dirpart=`AS_DIRNAME("$mf")`
|
||||||
|
else
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||||
|
# from the Makefile without running `make'.
|
||||||
|
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||||
|
test -z "$DEPDIR" && continue
|
||||||
|
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||||
|
test -z "am__include" && continue
|
||||||
|
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||||
|
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||||
|
U=`sed -n 's/^U = //p' < "$mf"`
|
||||||
|
# Find all dependency output files, they are included files with
|
||||||
|
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||||
|
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||||
|
# expansion.
|
||||||
|
for file in `sed -n "
|
||||||
|
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||||
|
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||||
|
# Make sure the directory exists.
|
||||||
|
test -f "$dirpart/$file" && continue
|
||||||
|
fdir=`AS_DIRNAME(["$file"])`
|
||||||
|
AS_MKDIR_P([$dirpart/$fdir])
|
||||||
|
# echo "creating $dirpart/$file"
|
||||||
|
echo '# dummy' > "$dirpart/$file"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
|
||||||
|
|
||||||
|
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
# -----------------------------
|
||||||
|
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||||
|
#
|
||||||
|
# This code is only required when automatic dependency tracking
|
||||||
|
# is enabled. FIXME. This creates each `.P' file that we will
|
||||||
|
# need in order to bootstrap the dependency handling code.
|
||||||
|
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[AC_CONFIG_COMMANDS([depfiles],
|
||||||
|
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 12
|
||||||
|
|
||||||
|
# This macro actually does too much. Some checks are only needed if
|
||||||
|
# your package does certain things. But this isn't really a big deal.
|
||||||
|
|
||||||
|
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||||
|
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||||
|
# -----------------------------------------------
|
||||||
|
# The call with PACKAGE and VERSION arguments is the old style
|
||||||
|
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||||
|
# and VERSION should now be passed to AC_INIT and removed from
|
||||||
|
# the call to AM_INIT_AUTOMAKE.
|
||||||
|
# We support both call styles for the transition. After
|
||||||
|
# the next Automake release, Autoconf can make the AC_INIT
|
||||||
|
# arguments mandatory, and then we can depend on a new Autoconf
|
||||||
|
# release and drop the old call support.
|
||||||
|
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||||
|
[AC_PREREQ([2.58])dnl
|
||||||
|
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||||
|
dnl the ones we care about.
|
||||||
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||||
|
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||||
|
# test to see if srcdir already configured
|
||||||
|
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||||
|
test -f $srcdir/config.status; then
|
||||||
|
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# test whether we have cygpath
|
||||||
|
if test -z "$CYGPATH_W"; then
|
||||||
|
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||||
|
CYGPATH_W='cygpath -w'
|
||||||
|
else
|
||||||
|
CYGPATH_W=echo
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([CYGPATH_W])
|
||||||
|
|
||||||
|
# Define the identity of the package.
|
||||||
|
dnl Distinguish between old-style and new-style calls.
|
||||||
|
m4_ifval([$2],
|
||||||
|
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||||
|
AC_SUBST([PACKAGE], [$1])dnl
|
||||||
|
AC_SUBST([VERSION], [$2])],
|
||||||
|
[_AM_SET_OPTIONS([$1])dnl
|
||||||
|
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||||
|
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||||
|
|
||||||
|
_AM_IF_OPTION([no-define],,
|
||||||
|
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||||
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||||
|
|
||||||
|
# Some tools Automake needs.
|
||||||
|
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||||
|
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||||
|
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||||
|
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||||
|
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||||
|
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||||
|
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||||
|
AM_PROG_INSTALL_SH
|
||||||
|
AM_PROG_INSTALL_STRIP
|
||||||
|
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||||
|
# We need awk for the "check" target. The system "awk" is bad on
|
||||||
|
# some platforms.
|
||||||
|
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
|
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||||
|
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||||
|
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||||
|
[_AM_PROG_TAR([v7])])])
|
||||||
|
_AM_IF_OPTION([no-dependencies],,
|
||||||
|
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||||
|
[_AM_DEPENDENCIES(CC)],
|
||||||
|
[define([AC_PROG_CC],
|
||||||
|
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||||
|
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||||
|
[_AM_DEPENDENCIES(CXX)],
|
||||||
|
[define([AC_PROG_CXX],
|
||||||
|
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# When config.status generates a header, we must update the stamp-h file.
|
||||||
|
# This file resides in the same directory as the config header
|
||||||
|
# that is generated. The stamp files are numbered to have different names.
|
||||||
|
|
||||||
|
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||||
|
# loop where config.status creates the headers, so we can generate
|
||||||
|
# our stamp files there.
|
||||||
|
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||||
|
[# Compute $1's index in $config_headers.
|
||||||
|
_am_stamp_count=1
|
||||||
|
for _am_header in $config_headers :; do
|
||||||
|
case $_am_header in
|
||||||
|
$1 | $1:* )
|
||||||
|
break ;;
|
||||||
|
* )
|
||||||
|
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_PROG_INSTALL_SH
|
||||||
|
# ------------------
|
||||||
|
# Define $install_sh.
|
||||||
|
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||||
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
|
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||||
|
AC_SUBST(install_sh)])
|
||||||
|
|
||||||
|
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 2
|
||||||
|
|
||||||
|
# Check whether the underlying file-system supports filenames
|
||||||
|
# with a leading dot. For instance MS-DOS doesn't.
|
||||||
|
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||||
|
[rm -rf .tst 2>/dev/null
|
||||||
|
mkdir .tst 2>/dev/null
|
||||||
|
if test -d .tst; then
|
||||||
|
am__leading_dot=.
|
||||||
|
else
|
||||||
|
am__leading_dot=_
|
||||||
|
fi
|
||||||
|
rmdir .tst 2>/dev/null
|
||||||
|
AC_SUBST([am__leading_dot])])
|
||||||
|
|
||||||
|
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||||
|
# From Jim Meyering
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 4
|
||||||
|
|
||||||
|
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||||
|
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||||
|
dnl maintainer-mode is disabled by default
|
||||||
|
AC_ARG_ENABLE(maintainer-mode,
|
||||||
|
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
||||||
|
(and sometimes confusing) to the casual installer],
|
||||||
|
USE_MAINTAINER_MODE=$enableval,
|
||||||
|
USE_MAINTAINER_MODE=no)
|
||||||
|
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||||
|
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
|
||||||
|
MAINT=$MAINTAINER_MODE_TRUE
|
||||||
|
AC_SUBST(MAINT)dnl
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
||||||
|
|
||||||
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 3
|
||||||
|
|
||||||
|
# AM_MAKE_INCLUDE()
|
||||||
|
# -----------------
|
||||||
|
# Check to see how make treats includes.
|
||||||
|
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||||
|
[am_make=${MAKE-make}
|
||||||
|
cat > confinc << 'END'
|
||||||
|
am__doit:
|
||||||
|
@echo done
|
||||||
|
.PHONY: am__doit
|
||||||
|
END
|
||||||
|
# If we don't find an include directive, just comment out the code.
|
||||||
|
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||||
|
am__include="#"
|
||||||
|
am__quote=
|
||||||
|
_am_result=none
|
||||||
|
# First try GNU make style include.
|
||||||
|
echo "include confinc" > confmf
|
||||||
|
# We grep out `Entering directory' and `Leaving directory'
|
||||||
|
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||||
|
# In particular we don't look at `^make:' because GNU make might
|
||||||
|
# be invoked under some other name (usually "gmake"), in which
|
||||||
|
# case it prints its new name instead of `make'.
|
||||||
|
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||||
|
am__include=include
|
||||||
|
am__quote=
|
||||||
|
_am_result=GNU
|
||||||
|
fi
|
||||||
|
# Now try BSD make style include.
|
||||||
|
if test "$am__include" = "#"; then
|
||||||
|
echo '.include "confinc"' > confmf
|
||||||
|
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||||
|
am__include=.include
|
||||||
|
am__quote="\""
|
||||||
|
_am_result=BSD
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([am__include])
|
||||||
|
AC_SUBST([am__quote])
|
||||||
|
AC_MSG_RESULT([$_am_result])
|
||||||
|
rm -f confinc confmf
|
||||||
|
])
|
||||||
|
|
||||||
|
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 4
|
||||||
|
|
||||||
|
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||||
|
# ------------------------------
|
||||||
|
AC_DEFUN([AM_MISSING_PROG],
|
||||||
|
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||||
|
$1=${$1-"${am_missing_run}$2"}
|
||||||
|
AC_SUBST($1)])
|
||||||
|
|
||||||
|
|
||||||
|
# AM_MISSING_HAS_RUN
|
||||||
|
# ------------------
|
||||||
|
# Define MISSING if not defined so far and test if it supports --run.
|
||||||
|
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||||
|
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||||
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
|
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||||
|
# Use eval to expand $SHELL
|
||||||
|
if eval "$MISSING --run true"; then
|
||||||
|
am_missing_run="$MISSING --run "
|
||||||
|
else
|
||||||
|
am_missing_run=
|
||||||
|
AC_MSG_WARN([`missing' script is too old or missing])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_PROG_MKDIR_P
|
||||||
|
# ---------------
|
||||||
|
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
||||||
|
#
|
||||||
|
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
||||||
|
# created by `make install' are always world readable, even if the
|
||||||
|
# installer happens to have an overly restrictive umask (e.g. 077).
|
||||||
|
# This was a mistake. There are at least two reasons why we must not
|
||||||
|
# use `-m 0755':
|
||||||
|
# - it causes special bits like SGID to be ignored,
|
||||||
|
# - it may be too restrictive (some setups expect 775 directories).
|
||||||
|
#
|
||||||
|
# Do not use -m 0755 and let people choose whatever they expect by
|
||||||
|
# setting umask.
|
||||||
|
#
|
||||||
|
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
|
||||||
|
# Some implementations (such as Solaris 8's) are not thread-safe: if a
|
||||||
|
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
|
||||||
|
# concurrently, both version can detect that a/ is missing, but only
|
||||||
|
# one can create it and the other will error out. Consequently we
|
||||||
|
# restrict ourselves to GNU make (using the --version option ensures
|
||||||
|
# this.)
|
||||||
|
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||||
|
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||||
|
# We used to keeping the `.' as first argument, in order to
|
||||||
|
# allow $(mkdir_p) to be used without argument. As in
|
||||||
|
# $(mkdir_p) $(somedir)
|
||||||
|
# where $(somedir) is conditionally defined. However this is wrong
|
||||||
|
# for two reasons:
|
||||||
|
# 1. if the package is installed by a user who cannot write `.'
|
||||||
|
# make install will fail,
|
||||||
|
# 2. the above comment should most certainly read
|
||||||
|
# $(mkdir_p) $(DESTDIR)$(somedir)
|
||||||
|
# so it does not work when $(somedir) is undefined and
|
||||||
|
# $(DESTDIR) is not.
|
||||||
|
# To support the latter case, we have to write
|
||||||
|
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
|
||||||
|
# so the `.' trick is pointless.
|
||||||
|
mkdir_p='mkdir -p --'
|
||||||
|
else
|
||||||
|
# On NextStep and OpenStep, the `mkdir' command does not
|
||||||
|
# recognize any option. It will interpret all options as
|
||||||
|
# directories to create, and then abort because `.' already
|
||||||
|
# exists.
|
||||||
|
for d in ./-p ./--version;
|
||||||
|
do
|
||||||
|
test -d $d && rmdir $d
|
||||||
|
done
|
||||||
|
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
||||||
|
if test -f "$ac_aux_dir/mkinstalldirs"; then
|
||||||
|
mkdir_p='$(mkinstalldirs)'
|
||||||
|
else
|
||||||
|
mkdir_p='$(install_sh) -d'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([mkdir_p])])
|
||||||
|
|
||||||
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 3
|
||||||
|
|
||||||
|
# _AM_MANGLE_OPTION(NAME)
|
||||||
|
# -----------------------
|
||||||
|
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||||
|
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||||
|
|
||||||
|
# _AM_SET_OPTION(NAME)
|
||||||
|
# ------------------------------
|
||||||
|
# Set option NAME. Presently that only means defining a flag for this option.
|
||||||
|
AC_DEFUN([_AM_SET_OPTION],
|
||||||
|
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||||
|
|
||||||
|
# _AM_SET_OPTIONS(OPTIONS)
|
||||||
|
# ----------------------------------
|
||||||
|
# OPTIONS is a space-separated list of Automake options.
|
||||||
|
AC_DEFUN([_AM_SET_OPTIONS],
|
||||||
|
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||||
|
|
||||||
|
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||||
|
# -------------------------------------------
|
||||||
|
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||||
|
AC_DEFUN([_AM_IF_OPTION],
|
||||||
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||||
|
|
||||||
|
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 4
|
||||||
|
|
||||||
|
# AM_SANITY_CHECK
|
||||||
|
# ---------------
|
||||||
|
AC_DEFUN([AM_SANITY_CHECK],
|
||||||
|
[AC_MSG_CHECKING([whether build environment is sane])
|
||||||
|
# Just in case
|
||||||
|
sleep 1
|
||||||
|
echo timestamp > conftest.file
|
||||||
|
# Do `set' in a subshell so we don't clobber the current shell's
|
||||||
|
# arguments. Must try -L first in case configure is actually a
|
||||||
|
# symlink; some systems play weird games with the mod time of symlinks
|
||||||
|
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||||
|
# directory).
|
||||||
|
if (
|
||||||
|
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||||
|
if test "$[*]" = "X"; then
|
||||||
|
# -L didn't work.
|
||||||
|
set X `ls -t $srcdir/configure conftest.file`
|
||||||
|
fi
|
||||||
|
rm -f conftest.file
|
||||||
|
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||||
|
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||||
|
|
||||||
|
# If neither matched, then we have a broken ls. This can happen
|
||||||
|
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||||
|
# broken ls alias from the environment. This has actually
|
||||||
|
# happened. Such a system could not be considered "sane".
|
||||||
|
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||||
|
alias in your environment])
|
||||||
|
fi
|
||||||
|
|
||||||
|
test "$[2]" = conftest.file
|
||||||
|
)
|
||||||
|
then
|
||||||
|
# Ok.
|
||||||
|
:
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||||
|
Check your system clock])
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT(yes)])
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_PROG_INSTALL_STRIP
|
||||||
|
# ---------------------
|
||||||
|
# One issue with vendor `install' (even GNU) is that you can't
|
||||||
|
# specify the program used to strip binaries. This is especially
|
||||||
|
# annoying in cross-compiling environments, where the build's strip
|
||||||
|
# is unlikely to handle the host's binaries.
|
||||||
|
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||||
|
# always use install-sh in `make install-strip', and initialize
|
||||||
|
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||||
|
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||||
|
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||||
|
# Installed binaries are usually stripped using `strip' when the user
|
||||||
|
# run `make install-strip'. However `strip' might not be the right
|
||||||
|
# tool to use in cross-compilation environments, therefore Automake
|
||||||
|
# will honor the `STRIP' environment variable to overrule this program.
|
||||||
|
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||||
|
if test "$cross_compiling" != no; then
|
||||||
|
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||||
|
fi
|
||||||
|
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||||
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||||
|
|
||||||
|
# Check how to create a tarball. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 2
|
||||||
|
|
||||||
|
# _AM_PROG_TAR(FORMAT)
|
||||||
|
# --------------------
|
||||||
|
# Check how to create a tarball in format FORMAT.
|
||||||
|
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||||
|
#
|
||||||
|
# Substitute a variable $(am__tar) that is a command
|
||||||
|
# writing to stdout a FORMAT-tarball containing the directory
|
||||||
|
# $tardir.
|
||||||
|
# tardir=directory && $(am__tar) > result.tar
|
||||||
|
#
|
||||||
|
# Substitute a variable $(am__untar) that extract such
|
||||||
|
# a tarball read from stdin.
|
||||||
|
# $(am__untar) < result.tar
|
||||||
|
AC_DEFUN([_AM_PROG_TAR],
|
||||||
|
[# Always define AMTAR for backward compatibility.
|
||||||
|
AM_MISSING_PROG([AMTAR], [tar])
|
||||||
|
m4_if([$1], [v7],
|
||||||
|
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||||
|
[m4_case([$1], [ustar],, [pax],,
|
||||||
|
[m4_fatal([Unknown tar format])])
|
||||||
|
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||||
|
# Loop over all known methods to create a tar archive until one works.
|
||||||
|
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||||
|
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||||
|
# Do not fold the above two line into one, because Tru64 sh and
|
||||||
|
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||||
|
for _am_tool in $_am_tools
|
||||||
|
do
|
||||||
|
case $_am_tool in
|
||||||
|
gnutar)
|
||||||
|
for _am_tar in tar gnutar gtar;
|
||||||
|
do
|
||||||
|
AM_RUN_LOG([$_am_tar --version]) && break
|
||||||
|
done
|
||||||
|
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||||
|
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||||
|
am__untar="$_am_tar -xf -"
|
||||||
|
;;
|
||||||
|
plaintar)
|
||||||
|
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||||
|
# ustar tarball either.
|
||||||
|
(tar --version) >/dev/null 2>&1 && continue
|
||||||
|
am__tar='tar chf - "$$tardir"'
|
||||||
|
am__tar_='tar chf - "$tardir"'
|
||||||
|
am__untar='tar xf -'
|
||||||
|
;;
|
||||||
|
pax)
|
||||||
|
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||||
|
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||||
|
am__untar='pax -r'
|
||||||
|
;;
|
||||||
|
cpio)
|
||||||
|
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||||
|
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||||
|
am__untar='cpio -i -H $1 -d'
|
||||||
|
;;
|
||||||
|
none)
|
||||||
|
am__tar=false
|
||||||
|
am__tar_=false
|
||||||
|
am__untar=false
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If the value was cached, stop now. We just wanted to have am__tar
|
||||||
|
# and am__untar set.
|
||||||
|
test -n "${am_cv_prog_tar_$1}" && break
|
||||||
|
|
||||||
|
# tar/untar a dummy directory, and stop if the command works
|
||||||
|
rm -rf conftest.dir
|
||||||
|
mkdir conftest.dir
|
||||||
|
echo GrepMe > conftest.dir/file
|
||||||
|
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||||
|
rm -rf conftest.dir
|
||||||
|
if test -s conftest.tar; then
|
||||||
|
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||||
|
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm -rf conftest.dir
|
||||||
|
|
||||||
|
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||||
|
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||||
|
AC_SUBST([am__tar])
|
||||||
|
AC_SUBST([am__untar])
|
||||||
|
]) # _AM_PROG_TAR
|
||||||
|
|
||||||
|
m4_include([../../../acinclude.m4])
|
4918
newlib/libc/machine/rx/configure
vendored
Executable file
4918
newlib/libc/machine/rx/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
14
newlib/libc/machine/rx/configure.in
Normal file
14
newlib/libc/machine/rx/configure.in
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
dnl This is the newlib/libc/machine/mt configure.in file.
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ(2.59)
|
||||||
|
AC_INIT([newlib],[NEWLIB_VERSION])
|
||||||
|
AC_CONFIG_SRCDIR([Makefile.am])
|
||||||
|
|
||||||
|
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
|
||||||
|
AC_CONFIG_AUX_DIR(../../../..)
|
||||||
|
|
||||||
|
NEWLIB_CONFIGURE(../../..)
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
AC_OUTPUT
|
13
newlib/libc/machine/rx/memchr.S
Normal file
13
newlib/libc/machine/rx/memchr.S
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
.file "memchr.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
|
||||||
|
.global _memchr
|
||||||
|
.type _memchr,@function
|
||||||
|
_memchr:
|
||||||
|
cmp #0, r3 ; If r3 is 0 suntil.b will do nothing and not set any flags...
|
||||||
|
stz #1, r1 ; ...so store 1 into r1. It will be decremented by the SUB later.
|
||||||
|
suntil.b ; Search until *r1 == r2 or r3 bytes have been examined.
|
||||||
|
stnz #1, r1 ; If no match was found return NULL.
|
||||||
|
sub #1, r1 ; suntil.b leaves r1 pointing at the address *after* the match.
|
||||||
|
rts
|
10
newlib/libc/machine/rx/memcpy.S
Normal file
10
newlib/libc/machine/rx/memcpy.S
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
.file "memcpy.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.global _memcpy
|
||||||
|
.type _memcpy,@function
|
||||||
|
_memcpy:
|
||||||
|
mov r1, r4 ; Save a copy of DEST
|
||||||
|
smovf ; Copy R2 (source) to R1 (dest). Stop after R3 bytes.
|
||||||
|
mov r4, r1 ; Return DEST
|
||||||
|
rts
|
20
newlib/libc/machine/rx/memmove.S
Normal file
20
newlib/libc/machine/rx/memmove.S
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
.file "memmove.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.global _memmove
|
||||||
|
.type _memmove,@function
|
||||||
|
_memmove:
|
||||||
|
mov r1, r4 ; Save a copy of DEST
|
||||||
|
cmp r1, r2
|
||||||
|
blt 2f ; If SRC (r2) is less than DEST (r1) then copy backwards
|
||||||
|
smovf
|
||||||
|
1:
|
||||||
|
mov r4, r1 ; Return DEST
|
||||||
|
rts
|
||||||
|
2:
|
||||||
|
add r3, r1 ; The SMOVB instructions requires the DEST in r1 and the
|
||||||
|
add r3, r2 ; SRC in r2 but it needs them to point the last bytes of
|
||||||
|
sub #1, r2 ; the regions involved not the first bytes, hence these
|
||||||
|
sub #1, r1 ; additions and subtractions.
|
||||||
|
smovb
|
||||||
|
bra 1b
|
8
newlib/libc/machine/rx/mempcpy.S
Normal file
8
newlib/libc/machine/rx/mempcpy.S
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.file "mempcpy.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.global _mempcpy
|
||||||
|
.type _mempcpy,@function
|
||||||
|
_mempcpy:
|
||||||
|
smovf
|
||||||
|
rts
|
10
newlib/libc/machine/rx/memset.S
Normal file
10
newlib/libc/machine/rx/memset.S
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
.file "memset.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.global _memset
|
||||||
|
.type _memset,@function
|
||||||
|
_memset:
|
||||||
|
mov r1, r4
|
||||||
|
sstr.b
|
||||||
|
mov r4, r1
|
||||||
|
rts
|
89
newlib/libc/machine/rx/setjmp.S
Normal file
89
newlib/libc/machine/rx/setjmp.S
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
# setjmp/longjmp for Renesas RX.
|
||||||
|
#
|
||||||
|
# The jmpbuf looks like this:
|
||||||
|
#
|
||||||
|
# Register jmpbuf offset
|
||||||
|
# R0 0x0
|
||||||
|
# R1 0x4
|
||||||
|
# R2 0x8
|
||||||
|
# R3 0xc
|
||||||
|
# R4 0x10
|
||||||
|
# R5 0x14
|
||||||
|
# R6 0x18
|
||||||
|
# R7 0x1c
|
||||||
|
# R8 0x20
|
||||||
|
# R9 0x24
|
||||||
|
# R10 0x28
|
||||||
|
# R11 0x2c
|
||||||
|
# R12 0x30
|
||||||
|
# R13 0x34
|
||||||
|
# R14 0x38
|
||||||
|
# R15 0x3c
|
||||||
|
# PC 0x40
|
||||||
|
#
|
||||||
|
# R1 contains the pointer to jmpbuf:
|
||||||
|
#
|
||||||
|
# int R1 = setjmp (jmp_buf R1)
|
||||||
|
# void longjmp (jmp_buf R1, int R2)
|
||||||
|
#
|
||||||
|
# The ABI allows for R1-R5 to be clobbered by functions. We must be
|
||||||
|
# careful to always leave the stack in a usable state in case an
|
||||||
|
# interrupt happens.
|
||||||
|
|
||||||
|
.text
|
||||||
|
.global _setjmp
|
||||||
|
.type _setjmp, @function
|
||||||
|
_setjmp:
|
||||||
|
mov.l r0, [r1] ; save all the general registers
|
||||||
|
mov.l r1, 0x4[r1] ; longjmp won't use this, but someone else might.
|
||||||
|
mov.l r2, 0x8[r1]
|
||||||
|
mov.l r3, 0xc[r1]
|
||||||
|
mov.l r4, 0x10[r1]
|
||||||
|
mov.l r5, 0x14[r1]
|
||||||
|
mov.l r6, 0x18[r1]
|
||||||
|
mov.l r7, 0x1c[r1]
|
||||||
|
mov.l r8, 0x20[r1]
|
||||||
|
mov.l r9, 0x24[r1]
|
||||||
|
mov.l r10, 0x28[r1]
|
||||||
|
mov.l r11, 0x2c[r1]
|
||||||
|
mov.l r12, 0x30[r1]
|
||||||
|
mov.l r13, 0x34[r1]
|
||||||
|
mov.l r14, 0x38[r1]
|
||||||
|
mov.l r15, 0x3c[r1]
|
||||||
|
mov.l [r0], r2 ; get return address off the stack
|
||||||
|
mov.l r2, 0x40[r1] ; PC
|
||||||
|
mov #0, r1 ; Return 0.
|
||||||
|
rts
|
||||||
|
.Lend1:
|
||||||
|
.size _setjmp, .Lend1 - _setjmp
|
||||||
|
|
||||||
|
|
||||||
|
.global _longjmp
|
||||||
|
.type _longjmp, @function
|
||||||
|
_longjmp:
|
||||||
|
tst r2, r2 ; Set the Z flag if r2 is 0.
|
||||||
|
stz #1, r2 ; If the Z flag was set put 1 into the return register.
|
||||||
|
mov r2, 4[r1] ; Put r2 (our return value) into the setjmp buffer as r1.
|
||||||
|
|
||||||
|
mov.l [r1], r0 ; Restore the stack - there's a slot for PC
|
||||||
|
mov.l 0x40[r1], r2 ; Get the saved PC
|
||||||
|
mov.l r2, [r0] ; Overwrite the old return address
|
||||||
|
|
||||||
|
mov.l 0x3c[r1], r15
|
||||||
|
mov.l 0x38[r1], r14
|
||||||
|
mov.l 0x34[r1], r13
|
||||||
|
mov.l 0x30[r1], r12
|
||||||
|
mov.l 0x2c[r1], r11
|
||||||
|
mov.l 0x28[r1], r10
|
||||||
|
mov.l 0x24[r1], r9
|
||||||
|
mov.l 0x20[r1], r8
|
||||||
|
mov.l 0x1c[r1], r7
|
||||||
|
mov.l 0x18[r1], r6
|
||||||
|
mov.l 0x14[r1], r5
|
||||||
|
mov.l 0x10[r1], r4
|
||||||
|
mov.l 0xc[r1], r3
|
||||||
|
mov.l 0x8[r1], r2
|
||||||
|
mov.l 0x4[r1], r1 ; This sets up the new return value
|
||||||
|
rts
|
||||||
|
.Lend2:
|
||||||
|
.size _longjmp, .Lend2 - _longjmp
|
22
newlib/libc/machine/rx/strcat.S
Normal file
22
newlib/libc/machine/rx/strcat.S
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.file "strcat.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.global _strcat
|
||||||
|
.type _strcat,@function
|
||||||
|
_strcat:
|
||||||
|
;; On entry: r1 => Destination
|
||||||
|
;; r2 => Source
|
||||||
|
mov r1, r4 ; Save a copy of the dest pointer.
|
||||||
|
mov r2, r5 ; Save a copy of the source pointer.
|
||||||
|
|
||||||
|
mov #0, r2 ; Search for the NUL byte.
|
||||||
|
mov #-1, r3 ; Limit on the number of bytes examined.
|
||||||
|
suntil.b ; Find the end of the destination string.
|
||||||
|
sub #1, r1 ; suntil.b leaves r1 pointing to the byte beyond the match.
|
||||||
|
|
||||||
|
mov #-1, r3 ; Set a limit on the number of bytes copied.
|
||||||
|
mov r5, r2 ; Restore the source pointer.
|
||||||
|
smovu ; Copy source to destination
|
||||||
|
|
||||||
|
mov r4, r1 ; Return the original dest pointer.
|
||||||
|
rts
|
15
newlib/libc/machine/rx/strcmp.S
Normal file
15
newlib/libc/machine/rx/strcmp.S
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
.file "strcmp.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
|
||||||
|
.global _strcmp
|
||||||
|
.type _strcmp,@function
|
||||||
|
_strcmp:
|
||||||
|
mov #-1, r3 ; Strictly speaking this is incorrect, but I doubt if anyone will ever know.
|
||||||
|
scmpu ; Perform the string comparison
|
||||||
|
bnc 1f ; If Carry is not set skip over
|
||||||
|
scne.L r1 ; Set result based on Z flag
|
||||||
|
rts ;
|
||||||
|
1: ;
|
||||||
|
mov #-1,r1 ; Carry not set, result should be negative
|
||||||
|
rts ;
|
11
newlib/libc/machine/rx/strcpy.S
Normal file
11
newlib/libc/machine/rx/strcpy.S
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
.file "strcpy.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.global _strcpy
|
||||||
|
.type _strcpy,@function
|
||||||
|
_strcpy:
|
||||||
|
mov r1, r4
|
||||||
|
mov #-1, r3 ; Strictly speaking this is incorrect, but I doubt if anyone will ever know.
|
||||||
|
smovu
|
||||||
|
mov r4, r1
|
||||||
|
rts
|
16
newlib/libc/machine/rx/strlen.S
Normal file
16
newlib/libc/machine/rx/strlen.S
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
.file "strlen.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
|
||||||
|
.global _strlen
|
||||||
|
.type _strlen,@function
|
||||||
|
_strlen:
|
||||||
|
add #0, r1, r4 ; Save a copy of the string start address and set the condition flags.
|
||||||
|
beq null_string ; Test for a NULL pointer.
|
||||||
|
mov #-1, r3 ; Set a limit on the number of bytes examined.
|
||||||
|
mov #0, r2 ; Stop searching when we find a NUL byte.
|
||||||
|
suntil.b ; Search until *r1 == r2
|
||||||
|
sub #1, r1 ; suntil.b leaves r1 pointing to the byte beyond the match.
|
||||||
|
null_string:
|
||||||
|
sub r4, r1 ; Compute the length.
|
||||||
|
rts
|
35
newlib/libc/machine/rx/strncat.S
Normal file
35
newlib/libc/machine/rx/strncat.S
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
.file "strncat.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.global _strncat
|
||||||
|
.type _strncat,@function
|
||||||
|
_strncat:
|
||||||
|
;; On entry: r1 => Destination
|
||||||
|
;; r2 => Source
|
||||||
|
;; r3 => Max number of bytes to copy
|
||||||
|
|
||||||
|
mov r1, r4 ; Save a copy of the dest pointer.
|
||||||
|
mov r2, r5 ; Save a copy of the source pointer.
|
||||||
|
mov r3, r6 ; Save a copy of the byte count.
|
||||||
|
|
||||||
|
mov #0, r2 ; Search for the NUL byte.
|
||||||
|
mov #-1, r3 ; Search until we run out of memory.
|
||||||
|
suntil.b ; Find the end of the destination string.
|
||||||
|
sub #1, r1 ; suntil.b leaves r1 pointing to the byte beyond the NUL.
|
||||||
|
|
||||||
|
mov r6, r3 ; Restore the limit on the number of bytes copied.
|
||||||
|
mov r5, r2 ; Restore the source pointer.
|
||||||
|
mov r1, r5 ; Save a copy of the dest pointer.
|
||||||
|
smovu ; Copy source to destination.
|
||||||
|
|
||||||
|
add #0, r6, r3 ; Restore the number of bytes to copy (again), but this time set the Z flag as well.
|
||||||
|
beq 1f ; If we copied 0 bytes then we already know that the dest string is NUL terminated, so we do not have to do anything.
|
||||||
|
mov #0, r2 ; Otherwise we must check to see if a NUL byte
|
||||||
|
mov r5, r1 ; was included in the bytes that were copied.
|
||||||
|
suntil.b
|
||||||
|
beq 1f ; Z flag is set if a match was found.
|
||||||
|
add r6, r5 ; Point at byte after end of copied bytes.
|
||||||
|
mov.b #0, [r5] ; Store a NUL there.
|
||||||
|
1:
|
||||||
|
mov r4, r1 ; Return the original dest pointer.
|
||||||
|
rts
|
13
newlib/libc/machine/rx/strncmp.S
Normal file
13
newlib/libc/machine/rx/strncmp.S
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
.file "strncmp.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.global _strncmp
|
||||||
|
.type _strncmp,@function
|
||||||
|
_strncmp:
|
||||||
|
scmpu ; Perform the string comparison
|
||||||
|
bnc 1f ; If Carry is not set skip over
|
||||||
|
scne.L r1 ; Set result based on Z flag
|
||||||
|
rts ;
|
||||||
|
1: ;
|
||||||
|
mov #-1,r1 ; Carry not set, result should be negative
|
||||||
|
rts ;
|
18
newlib/libc/machine/rx/strncpy.S
Normal file
18
newlib/libc/machine/rx/strncpy.S
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
.file "strncpy.S"
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.global _strncpy
|
||||||
|
.type _strncpy,@function
|
||||||
|
_strncpy:
|
||||||
|
mov r1, r4 ; Save a copy of the dest pointer.
|
||||||
|
mov r3, r5 ; Save a copy of the byte count
|
||||||
|
smovu ; Copy the bytes
|
||||||
|
cmp #0, r3 ; If we have copied the number of bytes requested
|
||||||
|
beq 1f ; then skip the next bit:
|
||||||
|
add r4, r5, r1 ; Point to the last byte that we are supposed to write.
|
||||||
|
sub r3, r1 ; Subtract the number of bytes left to be written.
|
||||||
|
mov #0, r2 ; Fill the remaining bytes with NULs,
|
||||||
|
sstr.b
|
||||||
|
1:
|
||||||
|
mov r4, r1 ; Return the destination pointer
|
||||||
|
rts
|
Loading…
x
Reference in New Issue
Block a user