import newlib-2000-02-17 snapshot
This commit is contained in:
33
newlib/libc/sys/Makefile.am
Normal file
33
newlib/libc/sys/Makefile.am
Normal file
@ -0,0 +1,33 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
SUBDIRS = $(sys_dir) .
|
||||
|
||||
if HAVE_SYS_DIR
|
||||
SYSLIB = lib.a
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES = $(SYSLIB)
|
||||
noinst_DATA = $(CRT0)
|
||||
|
||||
lib.a: $(sys_dir)/lib.a
|
||||
rm -f $@
|
||||
ln $(sys_dir)/lib.a $@ >/dev/null 2>/dev/null \
|
||||
|| cp $(sys_dir)/lib.a $@
|
||||
|
||||
$(sys_dir)/lib.a: ; @true
|
||||
|
||||
crt0.o: $(sys_dir)/crt0.o
|
||||
rm -f $@
|
||||
ln $(sys_dir)/crt0.o $@ >/dev/null 2>/dev/null \
|
||||
|| cp $(sys_dir)/crt0.o $@
|
||||
|
||||
$(sys_dir)/crt0.o: ; @true
|
||||
|
||||
CLEANFILES = crt0.o
|
||||
|
||||
doc:
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
415
newlib/libc/sys/Makefile.in
Normal file
415
newlib/libc/sys/Makefile.in
Normal file
@ -0,0 +1,415 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 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.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CRT0 = @CRT0@
|
||||
EXEEXT = @EXEEXT@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
machine_dir = @machine_dir@
|
||||
newlib_basedir = @newlib_basedir@
|
||||
sys_dir = @sys_dir@
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
SUBDIRS = $(sys_dir) .
|
||||
|
||||
@HAVE_SYS_DIR_TRUE@SYSLIB = \
|
||||
@HAVE_SYS_DIR_TRUE@lib.a
|
||||
|
||||
noinst_LIBRARIES = $(SYSLIB)
|
||||
noinst_DATA = $(CRT0)
|
||||
|
||||
CLEANFILES = crt0.o
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
lib_a_LIBADD =
|
||||
lib_a_SOURCES = lib.a.c
|
||||
lib_a_OBJECTS = lib.a.o
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(noinst_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = lib.a.c
|
||||
OBJECTS = lib.a.o
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in ../../acinclude.m4 \
|
||||
../../aclocal.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-noinstLIBRARIES:
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
|
||||
check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
rev="$$subdir $$rev"; \
|
||||
test "$$subdir" = "." && dot_seen=yes; \
|
||||
done; \
|
||||
test "$$dot_seen" = "no" && rev=". $$rev"; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
for subdir in $(SUBDIRS); do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
chmod 777 $(distdir)/$$subdir; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
dvi: dvi-recursive
|
||||
check-am:
|
||||
check: check-recursive
|
||||
installcheck-am:
|
||||
installcheck: installcheck-recursive
|
||||
install-info-am:
|
||||
install-info: install-info-recursive
|
||||
install-exec-am:
|
||||
install-exec: install-exec-recursive
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-recursive
|
||||
uninstall-am:
|
||||
uninstall: uninstall-recursive
|
||||
all-am: Makefile $(LIBRARIES) $(DATA)
|
||||
all-redirect: all-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-noinstLIBRARIES distclean-compile \
|
||||
distclean-tags distclean-generic clean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
|
||||
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile install-data-recursive \
|
||||
uninstall-data-recursive install-exec-recursive \
|
||||
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-info-am \
|
||||
install-info install-exec-am install-exec install-data-am install-data \
|
||||
install-am install uninstall-am uninstall all-redirect all-am all \
|
||||
installdirs-am installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
|
||||
|
||||
lib.a: $(sys_dir)/lib.a
|
||||
rm -f $@
|
||||
ln $(sys_dir)/lib.a $@ >/dev/null 2>/dev/null \
|
||||
|| cp $(sys_dir)/lib.a $@
|
||||
|
||||
$(sys_dir)/lib.a: ; @true
|
||||
|
||||
crt0.o: $(sys_dir)/crt0.o
|
||||
rm -f $@
|
||||
ln $(sys_dir)/crt0.o $@ >/dev/null 2>/dev/null \
|
||||
|| cp $(sys_dir)/crt0.o $@
|
||||
|
||||
$(sys_dir)/crt0.o: ; @true
|
||||
|
||||
doc:
|
||||
|
||||
# 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:
|
48
newlib/libc/sys/a29khif/Makefile.am
Normal file
48
newlib/libc/sys/a29khif/Makefile.am
Normal file
@ -0,0 +1,48 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES = \
|
||||
_alloc.s \
|
||||
_close.s \
|
||||
_cycles.s \
|
||||
_exit.s \
|
||||
_getpsiz.s \
|
||||
_gettz.s \
|
||||
_ioctl.s \
|
||||
_iostat.s \
|
||||
_iowait.s \
|
||||
_lseek.s \
|
||||
_open.s \
|
||||
_query.s \
|
||||
_read.s \
|
||||
_setim.s \
|
||||
_settrap.s \
|
||||
_setvec.s \
|
||||
_tmpnam.s \
|
||||
_write.s \
|
||||
alloc.s \
|
||||
clock.s \
|
||||
getargs.s \
|
||||
getenv.s \
|
||||
read.s \
|
||||
remove.s \
|
||||
rename.s \
|
||||
signal.s \
|
||||
_sbrk.s \
|
||||
_fstat.s \
|
||||
_isatty.s \
|
||||
systime.s \
|
||||
vec.s \
|
||||
kill.c \
|
||||
getpid.c \
|
||||
stubs.s
|
||||
|
||||
all: crt0.o
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
337
newlib/libc/sys/a29khif/Makefile.in
Normal file
337
newlib/libc/sys/a29khif/Makefile.in
Normal file
@ -0,0 +1,337 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
EXEEXT = @EXEEXT@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
machine_dir = @machine_dir@
|
||||
newlib_basedir = @newlib_basedir@
|
||||
sys_dir = @sys_dir@
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES = \
|
||||
_alloc.s \
|
||||
_close.s \
|
||||
_cycles.s \
|
||||
_exit.s \
|
||||
_getpsiz.s \
|
||||
_gettz.s \
|
||||
_ioctl.s \
|
||||
_iostat.s \
|
||||
_iowait.s \
|
||||
_lseek.s \
|
||||
_open.s \
|
||||
_query.s \
|
||||
_read.s \
|
||||
_setim.s \
|
||||
_settrap.s \
|
||||
_setvec.s \
|
||||
_tmpnam.s \
|
||||
_write.s \
|
||||
alloc.s \
|
||||
clock.s \
|
||||
getargs.s \
|
||||
getenv.s \
|
||||
read.s \
|
||||
remove.s \
|
||||
rename.s \
|
||||
signal.s \
|
||||
_sbrk.s \
|
||||
_fstat.s \
|
||||
_isatty.s \
|
||||
systime.s \
|
||||
vec.s \
|
||||
kill.c \
|
||||
getpid.c \
|
||||
stubs.s
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
lib_a_LIBADD =
|
||||
lib_a_OBJECTS = _alloc.o _close.o _cycles.o _exit.o _getpsiz.o _gettz.o \
|
||||
_ioctl.o _iostat.o _iowait.o _lseek.o _open.o _query.o _read.o _setim.o \
|
||||
_settrap.o _setvec.o _tmpnam.o _write.o alloc.o clock.o getargs.o \
|
||||
getenv.o read.o remove.o rename.o signal.o _sbrk.o _fstat.o _isatty.o \
|
||||
systime.o vec.o kill.o getpid.o stubs.o
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
SOURCES = $(lib_a_SOURCES)
|
||||
OBJECTS = $(lib_a_OBJECTS)
|
||||
|
||||
all: Makefile $(LIBRARIES)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINT@ configure.in ../../../acinclude.m4 \
|
||||
../../../aclocal.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-noinstLIBRARIES:
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
|
||||
-rm -f lib.a
|
||||
$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
|
||||
$(RANLIB) lib.a
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
info:
|
||||
dvi:
|
||||
check:
|
||||
$(MAKE) $(AM_MAKEFLAGS)
|
||||
installcheck:
|
||||
install-info:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
|
||||
mostlyclean
|
||||
|
||||
distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
|
||||
distclean-generic clean
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-noinstLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
|
||||
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info dvi installcheck \
|
||||
install-info install-exec install-data install uninstall all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
all: crt0.o
|
||||
|
||||
# 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:
|
55
newlib/libc/sys/a29khif/_alloc.s
Normal file
55
newlib/libc/sys/a29khif/_alloc.s
Normal file
@ -0,0 +1,55 @@
|
||||
; @(#)_alloc.s 1.4 90/10/14 21:57:19, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1989, 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; 07/06/89 (JS) Replaced call to const tav,HIF_macro @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1 to syscall macro,
|
||||
; and deleted call to reterr macro as a NULL needs to be
|
||||
; returned on failure.
|
||||
; _alloc.s
|
||||
; void *vp = _sysalloc( int size );
|
||||
;
|
||||
.file "_alloc.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global __sysalloc
|
||||
__sysalloc:
|
||||
const tav,HIF_alloc @ asneq V_SYSCALL,gr1,gr1
|
||||
jmpti tav, lr0
|
||||
const tpc, _errno
|
||||
consth tpc, _errno
|
||||
store 0, 0, tav, tpc
|
||||
jmpi lr0
|
||||
const v0, 0 ; return NULL on error.
|
||||
|
||||
;
|
||||
; int errret = _sysfree( void *addr, int size );
|
||||
;
|
||||
.global __sysfree
|
||||
__sysfree:
|
||||
const tav,HIF_free @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
40
newlib/libc/sys/a29khif/_close.s
Normal file
40
newlib/libc/sys/a29khif/_close.s
Normal file
@ -0,0 +1,40 @@
|
||||
; @(#)_close.s 1.4 90/10/14 21:57:20, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _close.s
|
||||
; int cc = _close( int fd );
|
||||
;
|
||||
.file "_close.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global __close
|
||||
;; syscalls used now -- .global _close
|
||||
|
||||
__close:
|
||||
;; syscalls used now -- _close:
|
||||
const tav,HIF_close @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
39
newlib/libc/sys/a29khif/_cycles.s
Normal file
39
newlib/libc/sys/a29khif/_cycles.s
Normal file
@ -0,0 +1,39 @@
|
||||
; @(#)_cycles.s 1.2 90/10/14 21:57:21, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _cycles.s
|
||||
; struct { unsigned long low_ticks, long hi_ticks } = _cycles( );
|
||||
;
|
||||
.file "_cycles.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00020000 ; Debugger tag word
|
||||
.global __cycles
|
||||
|
||||
__cycles:
|
||||
const tav,HIF_cycles @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
39
newlib/libc/sys/a29khif/_exit.s
Normal file
39
newlib/libc/sys/a29khif/_exit.s
Normal file
@ -0,0 +1,39 @@
|
||||
; @(#)_exit.s 1.2 90/10/14 21:57:22, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _exit.s
|
||||
; _exit( int rc );
|
||||
;
|
||||
.file "_exit.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global __exit
|
||||
|
||||
__exit:
|
||||
const tav,HIF_exit @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
79
newlib/libc/sys/a29khif/_fstat.s
Normal file
79
newlib/libc/sys/a29khif/_fstat.s
Normal file
@ -0,0 +1,79 @@
|
||||
.file "_fstat.c"
|
||||
.sect .lit,lit
|
||||
gcc2_compiled.:
|
||||
.text
|
||||
.align 4
|
||||
.global __fstat
|
||||
;; syscalls used now -- .global _fstat
|
||||
.word 0x40000
|
||||
__fstat:
|
||||
;; syscalls used now -- _fstat:
|
||||
sub gr1,gr1,32
|
||||
asgeu V_SPILL,gr1,gr126
|
||||
add lr1,gr1,48
|
||||
sll lr5,lr10,0
|
||||
const gr116,__iostat
|
||||
consth gr116,__iostat
|
||||
calli lr0,gr116
|
||||
sll lr2,lr5,0
|
||||
sll lr10,gr96,0
|
||||
jmpt lr10,L8
|
||||
sll gr116,lr10,30
|
||||
jmpf gr116,L3
|
||||
add gr116,lr11,12
|
||||
add gr117,lr11,12
|
||||
const gr116,4096
|
||||
store 0,0,gr116,gr117
|
||||
add gr117,lr11,4
|
||||
const gr116,1
|
||||
jmp L4
|
||||
store 0,0,gr116,gr117
|
||||
L3:
|
||||
const gr117,8192
|
||||
store 0,0,gr117,gr116
|
||||
add gr116,lr11,4
|
||||
store 0,0,gr117,gr116
|
||||
L4:
|
||||
add gr117,lr11,20
|
||||
const gr116,0
|
||||
store 0,0,gr116,gr117
|
||||
store 0,0,gr116,lr11
|
||||
const gr116,_time
|
||||
consth gr116,_time
|
||||
calli lr0,gr116
|
||||
const lr2,0
|
||||
add gr116,lr11,16
|
||||
store 0,0,gr96,gr116
|
||||
sll lr2,lr5,0
|
||||
const lr3,0
|
||||
const lr7,__lseek
|
||||
consth lr7,__lseek
|
||||
calli lr0,lr7
|
||||
const lr4,1
|
||||
sll lr10,gr96,0
|
||||
constn lr6,65535
|
||||
cpneq gr116,lr10,lr6
|
||||
jmpf gr116,L7
|
||||
sll lr2,lr5,0
|
||||
const lr3,0
|
||||
calli lr0,lr7
|
||||
const lr4,2
|
||||
add gr116,lr11,8
|
||||
store 0,0,gr96,gr116
|
||||
cpneq gr96,gr96,lr6
|
||||
jmpf gr96,L7
|
||||
sll lr2,lr5,0
|
||||
sll lr3,lr10,0
|
||||
calli lr0,lr7
|
||||
const lr4,0
|
||||
cpneq gr96,gr96,lr6
|
||||
jmpt gr96,L8
|
||||
const gr96,0
|
||||
L7:
|
||||
constn gr96,65535
|
||||
L8:
|
||||
add gr1,gr1,32
|
||||
nop
|
||||
jmpi lr0
|
||||
asleu V_FILL,lr1,gr127
|
||||
|
38
newlib/libc/sys/a29khif/_getpsiz.s
Normal file
38
newlib/libc/sys/a29khif/_getpsiz.s
Normal file
@ -0,0 +1,38 @@
|
||||
; @(#)_getpsiz.s 1.2 90/10/14 21:57:23, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _getpsiz.s
|
||||
; int size = _getpsiz( );
|
||||
;
|
||||
.file "_getpsiz.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00020000 ; Debugger tag word
|
||||
.global __getpsiz
|
||||
|
||||
__getpsiz:
|
||||
const tav,HIF_getpagesize @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
.end
|
39
newlib/libc/sys/a29khif/_gettz.s
Normal file
39
newlib/libc/sys/a29khif/_gettz.s
Normal file
@ -0,0 +1,39 @@
|
||||
; @(#)_gettz.s 2.2 90/10/14 21:57:24, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _gettz.s
|
||||
; _gettz( void );
|
||||
;
|
||||
.file "_gettz.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00020000 ; Debugger tag word
|
||||
.global __gettz
|
||||
|
||||
__gettz:
|
||||
const tav,HIF_gettz @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
39
newlib/libc/sys/a29khif/_ioctl.s
Normal file
39
newlib/libc/sys/a29khif/_ioctl.s
Normal file
@ -0,0 +1,39 @@
|
||||
; @(#)_ioctl.s 1.2 90/10/14 21:57:25, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _ioctl.s
|
||||
; _ioctl( int fd );
|
||||
;
|
||||
.file "_ioctl.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global __ioctl
|
||||
|
||||
__ioctl:
|
||||
const tav,HIF_ioctl @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
43
newlib/libc/sys/a29khif/_iostat.s
Normal file
43
newlib/libc/sys/a29khif/_iostat.s
Normal file
@ -0,0 +1,43 @@
|
||||
;----------------------------------------------------------------------------
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _iostat.s
|
||||
; _iostat( int fd );
|
||||
;
|
||||
.file "_iostat.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global __iostat
|
||||
.global _iostat
|
||||
|
||||
__iostat:
|
||||
_iostat:
|
||||
const tav,HIF_iostat @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
||||
|
39
newlib/libc/sys/a29khif/_iowait.s
Normal file
39
newlib/libc/sys/a29khif/_iowait.s
Normal file
@ -0,0 +1,39 @@
|
||||
; @(#)_iowait.s 1.3 90/10/14 21:57:27, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _iowait.s
|
||||
; _iowait( int fd );
|
||||
;
|
||||
.file "_iowait.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global __iowait
|
||||
|
||||
__iowait:
|
||||
const tav,HIF_iowait @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
22
newlib/libc/sys/a29khif/_isatty.s
Normal file
22
newlib/libc/sys/a29khif/_isatty.s
Normal file
@ -0,0 +1,22 @@
|
||||
.file "isatty.c"
|
||||
.sect .lit,lit
|
||||
gcc2_compiled.:
|
||||
.text
|
||||
.align 4
|
||||
.global __isatty
|
||||
.global _isatty
|
||||
.word 0x30000
|
||||
__isatty:
|
||||
_isatty:
|
||||
sub gr1,gr1,16
|
||||
asgeu V_SPILL,gr1,gr126
|
||||
add lr1,gr1,28
|
||||
const gr116,__iostat
|
||||
consth gr116,__iostat
|
||||
calli lr0,gr116
|
||||
sll lr2,lr6,0
|
||||
sll gr96,gr96,30
|
||||
add gr1,gr1,16
|
||||
srl gr96,gr96,31
|
||||
jmpi lr0
|
||||
asleu V_FILL,lr1,gr127
|
42
newlib/libc/sys/a29khif/_lseek.s
Normal file
42
newlib/libc/sys/a29khif/_lseek.s
Normal file
@ -0,0 +1,42 @@
|
||||
; @(#)_lseek.s 1.4 90/10/14 21:57:28, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _lseek.s
|
||||
; int cc = _lseek( int fd, long offset, int whence );
|
||||
;
|
||||
.file "_lseek.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00050000 ; Debugger tag word
|
||||
.global __lseek
|
||||
;; syscalls used now -- .global _lseek
|
||||
|
||||
|
||||
__lseek:
|
||||
;; syscalls used now -- _lseek:
|
||||
const tav,HIF_lseek @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
39
newlib/libc/sys/a29khif/_open.s
Normal file
39
newlib/libc/sys/a29khif/_open.s
Normal file
@ -0,0 +1,39 @@
|
||||
; @(#)_open.s 1.4 90/10/14 21:57:30, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _open.s
|
||||
; int fd = _open( char *path, int oflag [, int mode ] );
|
||||
;
|
||||
.file "_open.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00050000 ; Debugger tag word
|
||||
.global __open
|
||||
|
||||
__open:
|
||||
const tav,HIF_open @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
39
newlib/libc/sys/a29khif/_query.s
Normal file
39
newlib/libc/sys/a29khif/_query.s
Normal file
@ -0,0 +1,39 @@
|
||||
; @(#)_query.s 2.2 90/10/14 21:57:31, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _query.s
|
||||
; _query( query_code );
|
||||
;
|
||||
.file "_query.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global __query
|
||||
|
||||
__query:
|
||||
const tav,HIF_query @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
38
newlib/libc/sys/a29khif/_read.s
Normal file
38
newlib/libc/sys/a29khif/_read.s
Normal file
@ -0,0 +1,38 @@
|
||||
; @(#)_read.s 1.4 90/10/14 21:57:32, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _read.s
|
||||
; int nread = _read( int fd, char *buf, int count );
|
||||
;
|
||||
.file "_read.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00050000 ; Debugger tag word
|
||||
.global __read
|
||||
|
||||
__read:
|
||||
const tav,HIF_read @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
.end
|
30
newlib/libc/sys/a29khif/_sbrk.s
Normal file
30
newlib/libc/sys/a29khif/_sbrk.s
Normal file
@ -0,0 +1,30 @@
|
||||
.file "sbrk.c"
|
||||
.sect .lit,lit
|
||||
gcc2_compiled.:
|
||||
.text
|
||||
.align 4
|
||||
.global __sbrk
|
||||
.word 0x30000
|
||||
__sbrk:
|
||||
sub gr1,gr1,16
|
||||
asgeu V_SPILL,gr1,gr126
|
||||
add lr1,gr1,28
|
||||
sll lr2,lr6,0
|
||||
jmpt lr2,L4
|
||||
constn gr96,65535
|
||||
const gr116,__sysalloc
|
||||
consth gr116,__sysalloc
|
||||
calli lr0,gr116
|
||||
nop
|
||||
sll gr117,gr96,0
|
||||
cpneq gr116,gr117,0
|
||||
jmpf gr116,L4
|
||||
constn gr96,65535
|
||||
sll gr96,gr117,0
|
||||
L4:
|
||||
add gr1,gr1,16
|
||||
nop
|
||||
jmpi lr0
|
||||
asleu V_FILL,lr1,gr127
|
||||
|
||||
|
39
newlib/libc/sys/a29khif/_setim.s
Normal file
39
newlib/libc/sys/a29khif/_setim.s
Normal file
@ -0,0 +1,39 @@
|
||||
; @(#)_setim.s 2.2 90/10/14 21:57:33, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _setim.s
|
||||
; _setim( im, di );
|
||||
;
|
||||
.file "_setim.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00040000 ; Debugger tag word
|
||||
.global __setim
|
||||
|
||||
__setim:
|
||||
const tav,HIF_setim @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
39
newlib/libc/sys/a29khif/_settrap.s
Normal file
39
newlib/libc/sys/a29khif/_settrap.s
Normal file
@ -0,0 +1,39 @@
|
||||
; @(#)_settrap.s 2.2 90/10/14 21:57:34, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _settrap.s
|
||||
; void *prevaddr = _settrap( int trapno, void *trapaddr );
|
||||
;
|
||||
.file "_settrap.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00040000 ; Debugger tag word
|
||||
.global __settrap
|
||||
|
||||
__settrap:
|
||||
const tav,HIF_settrap @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
38
newlib/libc/sys/a29khif/_setvec.s
Normal file
38
newlib/libc/sys/a29khif/_setvec.s
Normal file
@ -0,0 +1,38 @@
|
||||
; @(#)_setvec.s 1.2 90/10/14 21:57:35, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _setvec.s
|
||||
; int success = _setvec( int trap_no, void (*handler)( void ) );
|
||||
;
|
||||
.file "_setvec.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00040000 ; Debugger tag word
|
||||
.global __setvec
|
||||
|
||||
__setvec:
|
||||
const tav,HIF_setvec @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
.end
|
41
newlib/libc/sys/a29khif/_tmpnam.s
Normal file
41
newlib/libc/sys/a29khif/_tmpnam.s
Normal file
@ -0,0 +1,41 @@
|
||||
; @(#)_tmpnam.s 1.2 90/10/14 21:57:36, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _tmpnam.s
|
||||
; char *cp = _khif_tmpnam( char *bufr );
|
||||
; /* same as ANSI tmpnam(), but NULL arg is not allowed */
|
||||
; NOTE - Will not work on BSD (no tmpnam sys call)
|
||||
;
|
||||
.file "_tmpnam.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global __khif_tmpnam
|
||||
|
||||
__khif_tmpnam:
|
||||
const tav,HIF_tmpnam @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
40
newlib/libc/sys/a29khif/_write.s
Normal file
40
newlib/libc/sys/a29khif/_write.s
Normal file
@ -0,0 +1,40 @@
|
||||
; @(#)_write.s 1.4 90/10/14 21:57:37, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _write.s
|
||||
; int written = _write( int fd, char *buf, int count );
|
||||
;
|
||||
.file "_write.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00050000 ; Debugger tag word
|
||||
.global __write
|
||||
;; syscalls used now -- .global _write
|
||||
|
||||
__write:
|
||||
;; syscalls used now -- _write:
|
||||
const tav,HIF_write @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
.end
|
282
newlib/libc/sys/a29khif/aclocal.m4
vendored
Normal file
282
newlib/libc/sys/a29khif/aclocal.m4
vendored
Normal file
@ -0,0 +1,282 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
dnl This provides configure definitions used by all the newlib
|
||||
dnl configure.in files.
|
||||
|
||||
dnl Basic newlib configury. This calls basic introductory stuff,
|
||||
dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
|
||||
dnl configure.host. The only argument is the relative path to the top
|
||||
dnl newlib directory.
|
||||
|
||||
AC_DEFUN(NEWLIB_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "${enableval}" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
||||
esac], [multilib=yes])dnl
|
||||
|
||||
dnl Support --enable-target-optspace
|
||||
AC_ARG_ENABLE(target-optspace,
|
||||
[ --enable-target-optspace optimize for space],
|
||||
[case "${enableval}" in
|
||||
yes) target_optspace=yes ;;
|
||||
no) target_optspace=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
|
||||
esac], [target_optspace=])dnl
|
||||
|
||||
dnl Support --enable-newlib-mb
|
||||
AC_ARG_ENABLE(newlib-mb,
|
||||
[ --enable-newlib-mb enable multibyte support],
|
||||
[case "${enableval}" in
|
||||
yes) newlib_mb=yes ;;
|
||||
no) newlib_mb=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
|
||||
esac], [newlib_mb=no])dnl
|
||||
|
||||
dnl We may get other options which we don't document:
|
||||
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
|
||||
test -z "[$]{with_target_subdir}" && with_target_subdir=.
|
||||
|
||||
if test "[$]{srcdir}" = "."; then
|
||||
if test "[$]{with_target_subdir}" != "."; then
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
|
||||
fi
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/$1"
|
||||
fi
|
||||
AC_SUBST(newlib_basedir)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(newlib, 1.8.1)
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(LIB_AC_PROG_CC,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
dnl Check whether -g works, even if CFLAGS is set, in case the package
|
||||
dnl plays around with CFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
AC_PROG_CC_G
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
|
||||
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
||||
# run it explicitly here, it will be run implicitly before
|
||||
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
|
||||
# be run before AC_CANONICAL_HOST.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
|
||||
# at least currently, we never actually build a program, so we never
|
||||
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
|
||||
# fails, because we are probably configuring with a cross compiler
|
||||
# which can't create executables. So we include AC_EXEEXT to keep
|
||||
# automake happy, but we don't execute it, since we don't care about
|
||||
# the result.
|
||||
if false; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
. [$]{newlib_basedir}/configure.host
|
||||
|
||||
case [$]{newlib_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
|
||||
*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/cygwin/include -I[$]{newlib_flagbasedir}/../winsup/w32api/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -fno-builtin"
|
||||
|
||||
NEWLIB_CFLAGS=${newlib_cflags}
|
||||
AC_SUBST(NEWLIB_CFLAGS)
|
||||
|
||||
AC_SUBST(machine_dir)
|
||||
AC_SUBST(sys_dir)
|
||||
])
|
||||
|
||||
# Do all the work for Automake. 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
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
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# 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 conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $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" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
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
|
||||
]
|
||||
)
|
||||
|
||||
# Define a conditional.
|
||||
|
||||
AC_DEFUN(AM_CONDITIONAL,
|
||||
[AC_SUBST($1_TRUE)
|
||||
AC_SUBST($1_FALSE)
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi])
|
||||
|
64
newlib/libc/sys/a29khif/alloc.s
Normal file
64
newlib/libc/sys/a29khif/alloc.s
Normal file
@ -0,0 +1,64 @@
|
||||
;
|
||||
;(#)_alloc.s 1.4 90/10/14 21:57:19, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1989, 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; 07/06/89 (JS) Replaced call to const tav,HIF_macro
|
||||
; and deleted call to reterr macro as a NULL needs to be
|
||||
; returned on failure.
|
||||
; _alloc.s
|
||||
; void *vp = _sysalloc( int size );
|
||||
;
|
||||
.file "_alloc.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global __sysalloc
|
||||
__sysalloc:
|
||||
const tav,HIF_alloc
|
||||
asneq V_SYSCALL,gr1,gr1
|
||||
jmpti tav, lr0
|
||||
const tpc, _errno
|
||||
consth tpc, _errno
|
||||
store 0, 0, tav, tpc
|
||||
jmpi lr0
|
||||
const v0, 0 ; return NULL on error.
|
||||
|
||||
;
|
||||
; int errret = _sysfree( void *addr, int size );
|
||||
;
|
||||
.global __sysfree
|
||||
__sysfree:
|
||||
const tav,HIF_free
|
||||
asneq V_SYSCALL,gr1,gr1
|
||||
jmpti tav,lr0
|
||||
const tpc,_errno
|
||||
consth tpc,_errno
|
||||
store 0,0,tav,tpc
|
||||
jmpi lr0
|
||||
constn v0,-1
|
||||
|
||||
.end
|
41
newlib/libc/sys/a29khif/clock.s
Normal file
41
newlib/libc/sys/a29khif/clock.s
Normal file
@ -0,0 +1,41 @@
|
||||
; @(#)clock.s 1.3 90/10/14 21:57:43, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; clock.s
|
||||
; long ticks = clock( );
|
||||
;
|
||||
.file "clock.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00020000 ; Debugger tag word
|
||||
.global _clock
|
||||
.global __clock
|
||||
|
||||
_clock:
|
||||
__clock:
|
||||
const tav,HIF_clock @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
1687
newlib/libc/sys/a29khif/configure
vendored
Executable file
1687
newlib/libc/sys/a29khif/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
12
newlib/libc/sys/a29khif/configure.in
Normal file
12
newlib/libc/sys/a29khif/configure.in
Normal file
@ -0,0 +1,12 @@
|
||||
dnl This is the newlib/libc/sys/a29khif configure.in file.
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.5)
|
||||
AC_INIT(_alloc.s)
|
||||
|
||||
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
|
||||
AC_CONFIG_AUX_DIR(../../../..)
|
||||
|
||||
NEWLIB_CONFIGURE(../../..)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
226
newlib/libc/sys/a29khif/crt0.s
Normal file
226
newlib/libc/sys/a29khif/crt0.s
Normal file
@ -0,0 +1,226 @@
|
||||
; @(#)crt0.s 2.7 90/10/15 13:17:57, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1988, 1989, 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
.file "crt0.s"
|
||||
; crt0.s version 2.1-7
|
||||
;
|
||||
; This module gets control from the OS.
|
||||
; It saves away the Am29027 Mode register settings and
|
||||
; then sets up the pointers to the resident spill and fill
|
||||
; trap handlers. It then establishes argv and argc for passing
|
||||
; to main. It then calls _main. If main returns, it calls _exit.
|
||||
;
|
||||
; void = start( );
|
||||
; NOTE - not C callable (no lead underscore)
|
||||
;
|
||||
.include "sys/sysmac.h"
|
||||
;
|
||||
;
|
||||
.extern V_SPILL, V_FILL
|
||||
.comm __29027Mode, 8 ; A shadow of the mode register
|
||||
.comm __LibInit, 4
|
||||
.comm __environ, 4 ; Environment variables, currently none.
|
||||
.text
|
||||
.extern _main, _exit
|
||||
.extern _memset
|
||||
|
||||
.word 0 ; Terminating tag word
|
||||
.global start
|
||||
start:
|
||||
sub gr1, gr1, 6 * 4
|
||||
asgeu V_SPILL, gr1, rab ; better not ever happen
|
||||
add lr1, gr1, 6 * 4
|
||||
;
|
||||
; Initialize the .bss section to zero by using the memset library function.
|
||||
; The .bss initialization section below has been commented out as it breaks
|
||||
; XRAY29K that has been released. The operators sizeof and startof create
|
||||
; new sections that are not recognized by XRAY29k, but will be implemented
|
||||
; in the next release (2.0).
|
||||
;
|
||||
; const lr4, $sizeof(.bss) ; get size of .bss section to zero out
|
||||
; consth lr4, $sizeof(.bss)
|
||||
; const lr2, $startof(.bss) ; Get start address of .bss section
|
||||
; consth lr2, $startof(.bss)
|
||||
; const lr0, _memset ; address of memset function
|
||||
; consth lr0, _memset
|
||||
; calli lr0, lr0 ; call memset function
|
||||
; const lr3, 0
|
||||
|
||||
; Save the initial value of the Am29027's Mode register
|
||||
; If your const tav,HIF_does @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1 not enter crt0 with value for Am29027's Mode register
|
||||
; in gr96 and gr97, and also if the coprocessor is active uncomment the
|
||||
; next 4 lines.
|
||||
; const gr96, 0xfc00820
|
||||
; consth gr96, 0xfc00820
|
||||
; const gr97, 0x1375
|
||||
; store 1, 3, gr96, gr97
|
||||
;
|
||||
const gr98, __29027Mode
|
||||
consth gr98, __29027Mode
|
||||
store 0, 0, gr96, gr98
|
||||
add gr98, gr98, 4
|
||||
store 0, 0, gr97, gr98
|
||||
;
|
||||
; Now call the const tav,HIF_to @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1 setup the spill and fill trap handlers
|
||||
;
|
||||
const lr3, spill
|
||||
consth lr3, spill
|
||||
const lr2, V_SPILL
|
||||
const tav,HIF_setvec @ asneq V_SYSCALL,gr1,gr1
|
||||
const lr3, fill
|
||||
consth lr3, fill
|
||||
const lr2, V_FILL
|
||||
const tav,HIF_setvec @ asneq V_SYSCALL,gr1,gr1
|
||||
;
|
||||
; Set up dividu handler, since native one don't work?!
|
||||
; Set it up by hand (FIXME) since HIF_settrap doesn't work either!
|
||||
;
|
||||
; const lr3,Edividu
|
||||
; consth lr3,Edividu
|
||||
;
|
||||
; const lr2,35
|
||||
; const tav,HIF_settrap @ asneq V_SYSCALL,gr1,gr1
|
||||
; asge 0x50,gr121,0 ; check whether it failed
|
||||
; const lr2,0x8000008c ; abs addr of dividu trap handler on EB
|
||||
; consth lr2,0x8000008c
|
||||
; store 0,0,lr3,lr2 ; Clobber vector FIXME
|
||||
|
||||
;
|
||||
; Get the argv base address and calculate argc.
|
||||
;
|
||||
const tav,HIF_getargs @ asneq V_SYSCALL,gr1,gr1
|
||||
add lr3, v0, 0 ; argv
|
||||
add lr4, v0, 0
|
||||
constn lr2, -1
|
||||
argcloop: ; scan for NULL terminator
|
||||
load 0, 0, gr97, lr4
|
||||
add lr4, lr4, 4
|
||||
cpeq gr97, gr97, 0
|
||||
jmpf gr97, argcloop
|
||||
add lr2, lr2, 1
|
||||
;
|
||||
; Now call LibInit, if there is one. To aid runtime libraries
|
||||
; that need to do some startup initialization, we have created
|
||||
; a bss variable called LibInit. If the library doesn't need
|
||||
; any run-time initialization, the variable is still 0. If the
|
||||
; library does need run-time initialization, the library will
|
||||
; contain a definition like
|
||||
; void (*_LibInit)(void) = LibInitFunction;
|
||||
; The linker will match up our bss LibInit with this data LibInit
|
||||
; and the variable will not be 0.
|
||||
;
|
||||
const lr0, __LibInit
|
||||
consth lr0, __LibInit
|
||||
load 0, 0, lr0, lr0
|
||||
cpeq gr96, lr0, 0
|
||||
jmpt gr96, NoLibInit
|
||||
nop
|
||||
calli lr0, lr0
|
||||
nop
|
||||
NoLibInit:
|
||||
;
|
||||
; call main, passing it 2 arguments. main( argc, argv )
|
||||
;
|
||||
const lr0, _main
|
||||
consth lr0, _main
|
||||
calli lr0, lr0
|
||||
nop
|
||||
;
|
||||
; call exit
|
||||
;
|
||||
const lr0, _exit
|
||||
consth lr0, _exit
|
||||
calli lr0, lr0
|
||||
add lr2, gr96, 0
|
||||
;
|
||||
; Should never get here, but just in case
|
||||
;
|
||||
loop:
|
||||
const tav,HIF_exit @ asneq V_SYSCALL,gr1,gr1
|
||||
jmp loop
|
||||
nop
|
||||
.sbttl "Spill and Fill trap handlers"
|
||||
.eject
|
||||
;
|
||||
; SPILL, FILL trap handlers
|
||||
;
|
||||
; Note that these Spill and Fill trap handlers allow the OS to
|
||||
; assume that the only registers of use are between gr1 and rfb.
|
||||
; Therefore, if the OS desires to, it may simply preserve from
|
||||
; lr0 for (rfb-gr1)/4 registers when doing a context save.
|
||||
;
|
||||
;
|
||||
; Here is the spill handler
|
||||
;
|
||||
; spill registers from [*gr1..*rab)
|
||||
; and move rab downto where gr1 points
|
||||
;
|
||||
; rab must change before rfb for signals to work
|
||||
;
|
||||
; On entry: rfb - rab = windowsize, gr1 < rab
|
||||
; Near the end: rfb - rab > windowsize, gr1 == rab
|
||||
; On exit: rfb - rab = windowsize, gr1 == rab
|
||||
;
|
||||
.global spill
|
||||
spill:
|
||||
sub tav, rab, gr1 ; tav = number of bytes to spill
|
||||
srl tav, tav, 2 ; change byte count to word count
|
||||
sub tav, tav, 1 ; make count zero based
|
||||
mtsr cr, tav ; set Count Remaining register
|
||||
sub tav, rab, gr1
|
||||
sub tav, rfb, tav ; pull down free bound and save it in rab
|
||||
add rab, gr1, 0 ; first pull down allocate bound
|
||||
storem 0, 0, lr0, tav ; store lr0..lr(tav) into rfb
|
||||
jmpi tpc ; return...
|
||||
add rfb, tav, 0
|
||||
;
|
||||
; Here is the fill handler
|
||||
;
|
||||
; fill registers from [*rfb..*lr1)
|
||||
; and move rfb upto where lr1 points.
|
||||
;
|
||||
; rab must change before rfb for signals to work
|
||||
;
|
||||
; On entry: rfb - rab = windowsize, lr1 > rfb
|
||||
; Near the end: rfb - rab < windowsize, lr1 == rab + windowsize
|
||||
; On exit: rfb - rab = windowsize, lr1 == rfb
|
||||
;
|
||||
.global fill
|
||||
fill:
|
||||
const tav, 0x80 << 2
|
||||
or tav, tav, rfb ; tav = ((rfb>>2) | 0x80)<<2 == [rfb]<<2
|
||||
mtsr ipa, tav ; ipa = [rfb]<<2 == 1st reg to fill
|
||||
; gr0 is now the first reg to spill
|
||||
sub tav, lr1, rfb ; tav = number of bytes to spill
|
||||
add rab, rab, tav ; push up allocate bound
|
||||
srl tav, tav, 2 ; change byte count to word count
|
||||
sub tav, tav, 1 ; make count zero based
|
||||
mtsr cr, tav ; set Count Remaining register
|
||||
loadm 0, 0, gr0, rfb ; load registers
|
||||
jmpi tpc ; return...
|
||||
add rfb, lr1, 0 ; ... first pushing up free bound
|
||||
|
||||
.end
|
38
newlib/libc/sys/a29khif/getargs.s
Normal file
38
newlib/libc/sys/a29khif/getargs.s
Normal file
@ -0,0 +1,38 @@
|
||||
; @(#)getargs.s 1.2 90/10/14 21:57:44, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _getargs.s
|
||||
; void _getargs( void );
|
||||
;
|
||||
.file "_getargs.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00020000 ; Debugger tag word
|
||||
.global __getargs
|
||||
|
||||
__getargs:
|
||||
const tav,HIF_getargs @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
.end
|
48
newlib/libc/sys/a29khif/getenv.s
Normal file
48
newlib/libc/sys/a29khif/getenv.s
Normal file
@ -0,0 +1,48 @@
|
||||
; @(#)getenv.s 1.4 90/10/14 21:57:45, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; getenv.s
|
||||
; char *value = getenv( const char *name );
|
||||
;
|
||||
.file "getenv.s"
|
||||
|
||||
.include "sys/sysmac.h"
|
||||
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global _getenv
|
||||
.global __getenv
|
||||
_getenv:
|
||||
__getenv:
|
||||
const tav,HIF_getenv @ asneq V_SYSCALL,gr1,gr1 ; HIF service trap
|
||||
jmpti tav, lr0 ; If tav is true, were finished, return.
|
||||
const tpc, _errno
|
||||
consth tpc, _errno ; Otherwise,
|
||||
store 0, 0, tav, tpc ; store error code in _errno,
|
||||
jmpi lr0 ; then return
|
||||
const v0, 0 ; with a value of 0 (NULL pointer).
|
||||
|
||||
.end
|
12
newlib/libc/sys/a29khif/getpid.c
Normal file
12
newlib/libc/sys/a29khif/getpid.c
Normal file
@ -0,0 +1,12 @@
|
||||
/* Stub for getpid. */
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
/* This should really return pid_t, but that doesn't seem to be in
|
||||
<sys/types.h>. */
|
||||
|
||||
int
|
||||
_DEFUN_VOID (_getpid)
|
||||
{
|
||||
return 1;
|
||||
}
|
21
newlib/libc/sys/a29khif/kill.c
Normal file
21
newlib/libc/sys/a29khif/kill.c
Normal file
@ -0,0 +1,21 @@
|
||||
/* Stub for kill. */
|
||||
|
||||
#include <_ansi.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* The pid argument should be of type pid_t. */
|
||||
|
||||
int
|
||||
_DEFUN (_kill, (pid, sig),
|
||||
int pid _AND
|
||||
int sig)
|
||||
{
|
||||
if (pid == 1 || pid < 0)
|
||||
{
|
||||
if (sig == 0)
|
||||
return 0;
|
||||
return raise (sig);
|
||||
}
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
54
newlib/libc/sys/a29khif/read.s
Normal file
54
newlib/libc/sys/a29khif/read.s
Normal file
@ -0,0 +1,54 @@
|
||||
; @(#)_read.s 1.4 90/10/14 21:57:32, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _read.s
|
||||
; int nread = _read( int fd, char *buf, int count );
|
||||
;
|
||||
.file "_read.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00050000 ; Debugger tag word
|
||||
.global __read
|
||||
;; syscalls used now -- .global _read
|
||||
|
||||
__read:
|
||||
;; syscalls used now -- _read:
|
||||
.ifdef _BSD_OS
|
||||
; BSD version - uses readv const tav,HIF_call @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
sub msp, msp, 8
|
||||
store 0, 0, lr3, msp
|
||||
add tav, msp, 4
|
||||
add lr3, msp, 0
|
||||
store 0, 0, lr4, tav
|
||||
const lr4, 1
|
||||
const tav,HIF_readv @ asneq V_SYSCALL,gr1,gr1
|
||||
jmpti tav, lr0
|
||||
add msp, msp, 8
|
||||
const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
.else
|
||||
const tav,HIF_read @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
.endif
|
||||
.end
|
43
newlib/libc/sys/a29khif/remove.s
Normal file
43
newlib/libc/sys/a29khif/remove.s
Normal file
@ -0,0 +1,43 @@
|
||||
; @(#)remove.s 1.3 90/10/14 21:57:53, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; remove.s
|
||||
; int cc = remove( char *path );
|
||||
;
|
||||
.file "remove.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global _remove
|
||||
.global __remove
|
||||
.global __unlink
|
||||
|
||||
_remove:
|
||||
__remove:
|
||||
__unlink:
|
||||
const tav,HIF_remove @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
41
newlib/libc/sys/a29khif/rename.s
Normal file
41
newlib/libc/sys/a29khif/rename.s
Normal file
@ -0,0 +1,41 @@
|
||||
; @(#)rename.s 1.3 90/10/14 21:57:54, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; rename.s
|
||||
; int cc = rename( char *from, char *to );
|
||||
;
|
||||
.file "rename.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00040000 ; Debugger tag word
|
||||
.global _rename
|
||||
.global __rename
|
||||
|
||||
_rename:
|
||||
__rename:
|
||||
const tav,HIF_rename @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
|
||||
|
||||
.end
|
452
newlib/libc/sys/a29khif/signal.s
Normal file
452
newlib/libc/sys/a29khif/signal.s
Normal file
@ -0,0 +1,452 @@
|
||||
;@(#)signal.s 2.15 90/10/14 21:57:55, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
.file "signal.s"
|
||||
|
||||
; SigEntry is the address of an array of C-level user code signal handlers.
|
||||
; They must return to the top-level before doing a sigret() return function.
|
||||
; Nested signals are supported.
|
||||
|
||||
.extern V_SPILL, V_FILL
|
||||
.extern fill ; In crt0.s
|
||||
|
||||
.align 4
|
||||
.comm WindowSize, 4
|
||||
.data
|
||||
SigEntry:
|
||||
.word 0 ; reserved
|
||||
.word 0 ; adds. of #2 SIGINT handler
|
||||
.word 0 ; reserved
|
||||
.word 0 ; reserved
|
||||
.word 0 ; reserved
|
||||
.word 0 ; reserved
|
||||
.word 0 ; reserved
|
||||
.word 0 ; adds. of #8 SIGFPE handler
|
||||
|
||||
.text
|
||||
|
||||
.reg v0, gr96
|
||||
.reg v1, gr97
|
||||
.reg v2, gr98
|
||||
.reg v3, gr99
|
||||
|
||||
.reg tav, gr121
|
||||
.reg tpc, gr122
|
||||
.reg lrp, gr123
|
||||
.reg slp, gr124
|
||||
.reg msp, gr125
|
||||
.reg rab, gr126
|
||||
.reg rfb, gr127
|
||||
|
||||
;=================================================================== setjmp()
|
||||
; int
|
||||
; setjmp(label_t jmpbuf)
|
||||
; {
|
||||
; *jmpbuf = {gr1, msp, lr0, lr1};
|
||||
; return 0;
|
||||
; }
|
||||
;
|
||||
.global _setjmp
|
||||
_setjmp:
|
||||
store 0, 0, gr1, lr2
|
||||
add lr2, lr2, 4
|
||||
store 0, 0, msp, lr2
|
||||
add lr2, lr2, 4
|
||||
store 0, 0, lr0, lr2
|
||||
add lr2, lr2, 4
|
||||
store 0, 0, lr1, lr2
|
||||
jmpi lr0
|
||||
const v0, 0
|
||||
;
|
||||
;==================================================================== longjmp()
|
||||
; int
|
||||
; longjmp(label_t jmpbuf, int value)
|
||||
; {
|
||||
; /* BUG: check for this
|
||||
; if (msp > jmpbuf->msp || gr1 > jmpbuf->gr1)
|
||||
; longjmperror();
|
||||
; */
|
||||
;
|
||||
; gr1 = jmpbuf->gr1;
|
||||
; lr2addr = jmpbuf->gr1 + 8;
|
||||
; msp = jmpbuf->msp;
|
||||
;
|
||||
; /* saved lr1 is invalid if saved lr2addr > rfb */
|
||||
; if (lr2addr > rfb) {
|
||||
; /*
|
||||
; * None of the registers are useful.
|
||||
; * Set rfb to lr2addr - 512 & rab to rfb - 512.
|
||||
; * the FILL assert will take care of filling
|
||||
; */
|
||||
; lr1 = jmpbuf->lr1;
|
||||
; rab = lr2addr - windowsize;
|
||||
; rfb = lr2addr;
|
||||
; }
|
||||
;
|
||||
; lr0 = jmpbuf->lr0;
|
||||
; if (rfb < lr1)
|
||||
; raise V_FILL;
|
||||
; return value;
|
||||
; }
|
||||
;
|
||||
.global _longjmp
|
||||
_longjmp:
|
||||
load 0, 0, tav, lr2 ; copy in gr1
|
||||
add v1, lr2, 4 ; v1 points to msp
|
||||
; make sure we return a non-zero value
|
||||
cpeq v0, lr3, 0
|
||||
srl v0, v0, 31
|
||||
or v0, lr3, v0
|
||||
|
||||
add gr1, tav, 0 ; now update gr1
|
||||
add tav, tav, 8 ; calculate lr2addr
|
||||
load 0, 0, msp, v1 ; update msp from jmpbuf
|
||||
cpleu v3, tav, rfb ; if (lr2addr > rfb)
|
||||
jmpt v3, $1 ; {
|
||||
add v1, v1, 4 ; v1 points to lr0
|
||||
add v2, v1, 4 ; v2 points to lr1
|
||||
load 0, 0, lr1, v2 ; lr1 = value from jmpbuf
|
||||
sub v3, rfb, rab ;
|
||||
sub rab, tav, v3 ; rab = lr2addr - windowsize
|
||||
add rfb, tav, 0 ; rfb = lr2addr
|
||||
$1: ; }
|
||||
load 0, 0, lr0, v1
|
||||
jmpi lr0
|
||||
asgeu V_FILL, rfb, lr1 ; may fill from rfb to lr1
|
||||
;
|
||||
;================================================================== sigcode
|
||||
; About to deliver a signal to a user mode signal handler.
|
||||
; msp+(15*4) = signal_number
|
||||
; msp+(14*4) = gr1
|
||||
; msp+(13*4) = rab
|
||||
; msp+(12*4) = PC0
|
||||
; msp+(11*4) = PC1
|
||||
; msp+(10*4) = PC2
|
||||
; msp+( 9*4) = CHA
|
||||
; msp+( 8*4) = CHD
|
||||
; msp+( 7*4) = CHC
|
||||
; msp+( 6*4) = ALU
|
||||
; msp+( 5*4) = OPS
|
||||
; msp+( 4*4) = gr121
|
||||
; msp+( 3*4) = gr99
|
||||
; msp+( 2*4) = gr98
|
||||
; msp+( 1*4) = gr97
|
||||
; msp = gr96
|
||||
; The state of all the registers (except for msp, chc and rab)
|
||||
; is the same as when the process was interrupted.
|
||||
;
|
||||
; We must make the stack and window consistent before calling the handler
|
||||
; The orignal rab value is on the stack. The interrupt handler placed
|
||||
; rfb-Windowsize in rab. This is required to support nested interrupts.
|
||||
;
|
||||
; Note that the window becomes incosistent only during certain
|
||||
; critical sections in spill, fill, longjmp and sigcode.
|
||||
; rfb - rab > windowsize => we are in spill
|
||||
; rfb - rab < windowsize => we are in fill
|
||||
; gr1 + 8 > rfb => we are in long-longjmp case
|
||||
; In case of spill, fill and lonjmp; rab is modified first,
|
||||
; so if we are in one of these critical sections,
|
||||
; we set rab to rfb - WINDOWSIZE.
|
||||
;
|
||||
.equ SIGCTX_SIZE, (16)*4
|
||||
.equ SIGCTX_SIGNUMB, (15)*4
|
||||
.equ SIGCTX_GR1_OFFSET, (14)*4
|
||||
.equ SIGCTX_RAB_OFFSET, (13)*4
|
||||
.equ SIGCTX_PC0_OFFSET, (12)*4
|
||||
.equ SIGCTX_PC1_OFFSET, (11)*4
|
||||
.equ SIGCTX_PC2_OFFSET, (10)*4
|
||||
.equ SIGCTX_CHC_OFFSET, (7)*4
|
||||
.equ SIGCTX_OPS_OFFSET, (5)*4
|
||||
.equ SIGCTX_TAV_OFFSET, (4)*4
|
||||
.global sigcode
|
||||
sigcode:
|
||||
; -------------------------------------------------------- R-Stack fixup
|
||||
const v0, WindowSize ; get register cache size
|
||||
consth v0, WindowSize
|
||||
load 0, 0, v0, v0
|
||||
add v2, msp, SIGCTX_RAB_OFFSET
|
||||
load 0, 0, v2, v2 ; get interrupted rab value
|
||||
sub v1, rfb, v2 ; determine if rfb-rab <= WINDOW_SIZE
|
||||
cpgeu v1, v1, v0 ;
|
||||
jmpt v1, nfill ; jmp if spill or 'normal' interrupt
|
||||
add v1, gr1, 8
|
||||
cpgt v1, v1, rfb ; interrupted longjmp can look like fill
|
||||
jmpf v1, nfill ; test for long-longjmp interruption
|
||||
nop ; jmp if gr1+8 <= rfb
|
||||
; Fixup signal stack to re-start interrupted fill
|
||||
; backup pc1 -- this is needed for the partial fill case.
|
||||
; Clear chc so an interrupted load/store does not restart.
|
||||
; Reset rab to a window distance below rfb, rab shall be
|
||||
; decremented again on re-starting the interrupted fill.
|
||||
; The interrupt handler set rab=rfb-WindowSize.
|
||||
;
|
||||
add v0, msp, SIGCTX_RAB_OFFSET
|
||||
store 0, 0, rab, v0 ; re-store (rfb-WindowSize) for rab
|
||||
const v2, fill
|
||||
consth v2, fill
|
||||
add v0, msp, SIGCTX_PC1_OFFSET
|
||||
store 0, 0, v2, v0
|
||||
sub v2, v2, 4 ; determine pc0
|
||||
add v0, msp, SIGCTX_PC0_OFFSET
|
||||
store 0, 0, v2, v0
|
||||
const v2, 0 ; clear chc
|
||||
add v0, msp, SIGCTX_CHC_OFFSET
|
||||
store 0, 0, v2, v0
|
||||
|
||||
nfill:
|
||||
cpgt v0, gr1, rfb ; if gr1 > rfb then gr1 = rfb
|
||||
jmpt v0, lower
|
||||
cplt v0, gr1, rab ; if gr1 < rab then gr1 = rab
|
||||
jmpt v0, raise
|
||||
nop
|
||||
; -------------------------------------------------------- save_regs
|
||||
sig1: sub msp, msp, (4+2+25)*4 ; reserve space for regs
|
||||
mfsr gr96, ipc
|
||||
mfsr gr97, ipa
|
||||
mfsr gr98, ipb
|
||||
mfsr gr99, q
|
||||
mtsrim cr, 4-1
|
||||
storem 0, 0, gr96, msp
|
||||
; "push" registers stack support
|
||||
add gr96, lr1, 0
|
||||
add gr97, rfb, 0
|
||||
mtsrim cr, 2-1
|
||||
add gr99, msp, 2*4
|
||||
storem 0, 0, gr96, gr99
|
||||
; "push" remaining global registers
|
||||
mtsrim cr, 25-1 ; gr100-gr124
|
||||
add gr96, msp, (4+2)*4
|
||||
storem 0, 0, gr100, gr96
|
||||
;
|
||||
; -------------------------------------------------------- Dummy Call
|
||||
.equ RALLOC, 4*4 ; make space for function calls
|
||||
add v0, rfb, 0 ; store original rfb
|
||||
sub gr1, gr1, RALLOC
|
||||
asgeu V_SPILL, gr1, rab
|
||||
add lr1, v0, 0 ; set lr1 = original rfb
|
||||
add v1, msp, (4+2+25)*4 + SIGCTX_SIGNUMB
|
||||
load 0, 0, lr2, v1 ; restore signal number
|
||||
sub v1, lr2, 1 ; get handler index
|
||||
sll v1, v1, 2 ; point to addresses
|
||||
;
|
||||
; -------------------------------------------------------- call C-level
|
||||
; Handler must not use HIF services other than the _sigret() type.
|
||||
const v0, SigEntry
|
||||
consth v0, SigEntry
|
||||
add v0, v0, v1
|
||||
load 0, 0, v0, v0 ; determine if handler registered
|
||||
cpeq v1, v0, 0
|
||||
jmpt v1, NoHandler
|
||||
nop
|
||||
calli lr0, v0 ; call C-level signal handler
|
||||
nop
|
||||
;
|
||||
; -------------------------------------------------------- default return
|
||||
NoHandler:
|
||||
jmp __sigdfl
|
||||
nop
|
||||
|
||||
; -------------------------------------------------------- support bits
|
||||
lower: sll gr1, rfb, 0
|
||||
jmp sig1
|
||||
nop
|
||||
raise: sll gr1, rab, 0
|
||||
jmp sig1
|
||||
nop
|
||||
/*
|
||||
; -------------------------------------------------------- repair_regs
|
||||
mtsrim cr, 4-1
|
||||
loadm 0, 0, gr96, msp
|
||||
mtsr ipc, gr96
|
||||
mtsr ipa, gr97
|
||||
mtsr ipb, gr98
|
||||
mtsr Q, gr99
|
||||
; "pop" registers stack support
|
||||
mtsrim cr, 2-1
|
||||
add gr99, msp, 2*4
|
||||
loadm 0, 0, gr96, gr99
|
||||
add lr1, gr96, 0
|
||||
add rfb, gr97, 0
|
||||
; "pop" remaining global registers
|
||||
mtsrim cr, 25-1 ; gr100-gr124
|
||||
add gr96, msp, (4+2)*4
|
||||
loadm 0, 0, gr100, gr96
|
||||
add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
|
||||
; -------------------------------------------------------- end repair
|
||||
*/
|
||||
|
||||
; ======================================================== _sigret()
|
||||
.global __sigret
|
||||
__sigret:
|
||||
; repair_regs
|
||||
; -------------------------------------------------------- repair_regs
|
||||
mtsrim cr, 4-1
|
||||
loadm 0, 0, gr96, msp
|
||||
mtsr ipc, gr96
|
||||
mtsr ipa, gr97
|
||||
mtsr ipb, gr98
|
||||
mtsr q, gr99
|
||||
; "pop" registers stack support
|
||||
mtsrim cr, 2-1
|
||||
add gr99, msp, 2*4
|
||||
loadm 0, 0, gr96, gr99
|
||||
add lr1, gr96, 0
|
||||
add rfb, gr97, 0
|
||||
; "pop" remaining global registers
|
||||
mtsrim cr, 25-1 ; gr100-gr124
|
||||
add gr96, msp, (4+2)*4
|
||||
loadm 0, 0, gr100, gr96
|
||||
add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
|
||||
; -------------------------------------------------------- end repair
|
||||
const tav, 323 ; HIF _sigret
|
||||
asneq 69, gr1,gr1
|
||||
halt ; commit suicide if returns
|
||||
|
||||
; ======================================================== _sigdfl()
|
||||
.global __sigdfl
|
||||
__sigdfl:
|
||||
; repair_regs
|
||||
; -------------------------------------------------------- repair_regs
|
||||
mtsrim cr, 4-1
|
||||
loadm 0, 0, gr96, msp
|
||||
mtsr ipc, gr96
|
||||
mtsr ipa, gr97
|
||||
mtsr ipb, gr98
|
||||
mtsr q, gr99
|
||||
; "pop" registers stack support
|
||||
mtsrim cr, 2-1
|
||||
add gr99, msp, 2*4
|
||||
loadm 0, 0, gr96, gr99
|
||||
add lr1, gr96, 0
|
||||
add rfb, gr97, 0
|
||||
; "pop" remaining global registers
|
||||
mtsrim cr, 25-1 ; gr100-gr124
|
||||
add gr96, msp, (4+2)*4
|
||||
loadm 0, 0, gr100, gr96
|
||||
add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
|
||||
; -------------------------------------------------------- end repair
|
||||
const tav, 322 ; HIF _sigdfl
|
||||
asneq 69, gr1,gr1
|
||||
halt ; commit suicide if returns
|
||||
|
||||
; ======================================================== _sigrep()
|
||||
__sigrep:
|
||||
.global __sigrep
|
||||
; repair_regs
|
||||
; -------------------------------------------------------- repair_regs
|
||||
mtsrim cr, 4-1
|
||||
loadm 0, 0, gr96, msp
|
||||
mtsr ipc, gr96
|
||||
mtsr ipa, gr97
|
||||
mtsr ipb, gr98
|
||||
mtsr q, gr99
|
||||
; "pop" registers stack support
|
||||
mtsrim cr, 2-1
|
||||
add gr99, msp, 2*4
|
||||
loadm 0, 0, gr96, gr99
|
||||
add lr1, gr96, 0
|
||||
add rfb, gr97, 0
|
||||
; "pop" remaining global registers
|
||||
mtsrim cr, 25-1 ; gr100-gr124
|
||||
add gr96, msp, (4+2)*4
|
||||
loadm 0, 0, gr100, gr96
|
||||
add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
|
||||
; -------------------------------------------------------- end repair
|
||||
const tav, 324 ; HIF _sigrep
|
||||
asneq 69, gr1,gr1
|
||||
halt ; commit suicide if returns
|
||||
|
||||
; ======================================================== _sigskp()
|
||||
.global __sigskp
|
||||
__sigskp:
|
||||
; repair_regs
|
||||
; -------------------------------------------------------- repair_regs
|
||||
mtsrim cr, 4-1
|
||||
loadm 0, 0, gr96, msp
|
||||
mtsr ipc, gr96
|
||||
mtsr ipa, gr97
|
||||
mtsr ipb, gr98
|
||||
mtsr q, gr99
|
||||
; "pop" registers stack support
|
||||
mtsrim cr, 2-1
|
||||
add gr99, msp, 2*4
|
||||
loadm 0, 0, gr96, gr99
|
||||
add lr1, gr96, 0
|
||||
add rfb, gr97, 0
|
||||
; "pop" remaining global registers
|
||||
mtsrim cr, 25-1 ; gr100-gr124
|
||||
add gr96, msp, (4+2)*4
|
||||
loadm 0, 0, gr100, gr96
|
||||
add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
|
||||
; -------------------------------------------------------- end repair
|
||||
const tav, 325 ; HIF _sigskp
|
||||
asneq 69, gr1,gr1
|
||||
halt ; commit suicide if returns
|
||||
|
||||
; ======================================================== _sendsig()
|
||||
; lr2 = signal number
|
||||
.global _raise
|
||||
.global __sendsig
|
||||
_raise:
|
||||
__sendsig:
|
||||
const tav, 326 ; HIF sendsig
|
||||
asneq 69, gr1,gr1
|
||||
jmpi lr0
|
||||
nop
|
||||
|
||||
;
|
||||
; ======================================================== signal()
|
||||
; lr2 = signal number
|
||||
; lr3 = handler address
|
||||
.global _signal
|
||||
_signal:
|
||||
; the memory variable WindowSize must be initalised at the
|
||||
; start when rfb and rab are a window size apart.
|
||||
const v0, WindowSize ; get register cache size
|
||||
consth v0, WindowSize
|
||||
load 0, 0, v1, v0
|
||||
cpeq v1, v1, 0
|
||||
jmpf v1, WindowSizeOK
|
||||
sub v1, rfb, rab ; rfb-rab = WINDOW_SIZE
|
||||
store 0, 0, v1, v0
|
||||
WindowSizeOK:
|
||||
const v1, SigEntry
|
||||
consth v1, SigEntry
|
||||
sub v3, lr2, 1 ; get handler index
|
||||
sll v3, v3, 2 ; pointer to addresses
|
||||
add v1, v1, v3
|
||||
store 0,0, lr3, v1 ; save new handler
|
||||
|
||||
const lr2, sigcode
|
||||
consth lr2, sigcode
|
||||
;Fall through to __signal
|
||||
; ======================================================== _signal()
|
||||
.global __signal
|
||||
__signal:
|
||||
const tav, 321 ; HIF signal
|
||||
asneq 69, gr1,gr1
|
||||
jmpi lr0
|
||||
nop
|
135
newlib/libc/sys/a29khif/stubs.s
Normal file
135
newlib/libc/sys/a29khif/stubs.s
Normal file
@ -0,0 +1,135 @@
|
||||
;
|
||||
;
|
||||
; File of stubs so that unix applications can link into a HIF monitor
|
||||
;
|
||||
; sac@cygnus.com
|
||||
|
||||
.text
|
||||
|
||||
.global _sysalloc
|
||||
_sysalloc:
|
||||
const gr121,__sysalloc
|
||||
consth gr121,__sysalloc
|
||||
jmpi gr121
|
||||
|
||||
.global _sysfree
|
||||
_sysfree:
|
||||
const gr121,__sysfree
|
||||
consth gr121,__sysfree
|
||||
jmpi gr121
|
||||
|
||||
|
||||
.global _cycles
|
||||
_cycles:
|
||||
const gr121,__cycles
|
||||
consth gr121,__cycles
|
||||
jmpi gr121
|
||||
|
||||
; .global _exit
|
||||
;_exit:
|
||||
; const gr121,__exit
|
||||
; consth gr121,__exit
|
||||
; jmpi gr121
|
||||
|
||||
.global _getpsiz
|
||||
_getpsiz:
|
||||
const gr121,__getpsiz
|
||||
consth gr121,__getpsiz
|
||||
jmpi gr121
|
||||
|
||||
.global _gettz
|
||||
_gettz:
|
||||
const gr121,__gettz
|
||||
consth gr121,__gettz
|
||||
jmpi gr121
|
||||
|
||||
.global _ioctl
|
||||
_ioctl:
|
||||
const gr121,__ioctl
|
||||
consth gr121,__ioctl
|
||||
jmpi gr121
|
||||
|
||||
|
||||
.global _iowait
|
||||
_iowait:
|
||||
const gr121,__iowait
|
||||
consth gr121,__iowait
|
||||
jmpi gr121
|
||||
|
||||
|
||||
;; syscalls used now -- .global _open
|
||||
;; syscalls used now -- _open:
|
||||
;; syscalls used now -- const gr121,__open
|
||||
;; syscalls used now -- consth gr121,__open
|
||||
;; syscalls used now -- jmpi gr121
|
||||
|
||||
.global _query
|
||||
_query:
|
||||
const gr121,__query
|
||||
consth gr121,__query
|
||||
jmpi gr121
|
||||
|
||||
|
||||
.global _setim
|
||||
_setim:
|
||||
const gr121,__setim
|
||||
consth gr121,__setim
|
||||
jmpi gr121
|
||||
|
||||
.global _settrap
|
||||
_settrap:
|
||||
const gr121,__settrap
|
||||
consth gr121,__settrap
|
||||
jmpi gr121
|
||||
|
||||
.global _setvec
|
||||
_setvec:
|
||||
const gr121,__setvec
|
||||
consth gr121,__setvec
|
||||
jmpi gr121
|
||||
|
||||
.global _getargs
|
||||
_getargs:
|
||||
const gr121,__getargs
|
||||
consth gr121,__getargs
|
||||
jmpi gr121
|
||||
|
||||
;; syscalls used now -- .global _unlink
|
||||
;; syscalls used now -- _unlink:
|
||||
;; syscalls used now -- const gr121,__unlink
|
||||
;; syscalls used now -- consth gr121,__unlink
|
||||
;; syscalls used now -- jmpi gr121
|
||||
|
||||
.global _sigret
|
||||
_sigret:
|
||||
const gr121,__sigret
|
||||
consth gr121,__sigret
|
||||
jmpi gr121
|
||||
|
||||
.global _sigdfl
|
||||
_sigdfl:
|
||||
const gr121,__sigdfl
|
||||
consth gr121,__sigdfl
|
||||
jmpi gr121
|
||||
|
||||
.global _sigrep
|
||||
_sigrep:
|
||||
const gr121,__sigrep
|
||||
consth gr121,__sigrep
|
||||
jmpi gr121
|
||||
|
||||
.global _sigskp
|
||||
_sigskp:
|
||||
const gr121,__sigskp
|
||||
consth gr121,__sigskp
|
||||
jmpi gr121
|
||||
|
||||
.global _sendsig
|
||||
_sendsig:
|
||||
const gr121,__sendsig
|
||||
consth gr121,__sendsig
|
||||
jmpi gr121
|
||||
|
||||
; fill this jmpi delay slot
|
||||
; the others are not done since they do not matter
|
||||
constn lr0,-1
|
270
newlib/libc/sys/a29khif/sys/cpudef.h
Normal file
270
newlib/libc/sys/a29khif/sys/cpudef.h
Normal file
@ -0,0 +1,270 @@
|
||||
; @(#)cpudef.h 2.3 90/10/14 20:55:56, Copyright 1989, 1990 AMD
|
||||
;-----------------------------------------------------------------------
|
||||
; Useful equates
|
||||
;-----------------------------------------------------------------------
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1989, 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Processor status registers OPS (sr1) and CPS (sr2)
|
||||
.equ CA,0x8000 ; Coprocessor active
|
||||
.equ IP,0x4000 ; Interrupt pending
|
||||
.equ TE,0x2000 ; Trace enable
|
||||
.equ TP,0x1000 ; Trace pending
|
||||
.equ TU,0x0800 ; Trap unaligned access
|
||||
.equ FZ,0x0400 ; Freeze
|
||||
.equ LK,0x0200 ; Lock
|
||||
.equ RE,0x0100 ; ROM enable
|
||||
.equ WM,0x0080 ; Wait mode
|
||||
.equ PD,0x0040 ; No translation for Data
|
||||
.equ PI,0x0020 ; No translation for Instr
|
||||
.equ SM,0x0010 ; Supervisor mode
|
||||
.equ IM,0x000C ; Interrupt mask
|
||||
.equ IM1,0x0100 ; enable INTR0-1
|
||||
.equ IM2,0x1000 ; enable INTR0-2
|
||||
.equ IM3,0x1100 ; enable INTR0-3
|
||||
.equ DI,0x0002 ; Disable ints
|
||||
.equ DA,0x0001 ; Disable ints and traps
|
||||
|
||||
; Configuration register CFG (sr3)
|
||||
.equ PRL,0xFF000000 ; Processor release level
|
||||
.equ VF,0x10 ; Vector fetch
|
||||
.equ RV,0x08 ; ROM Vector area
|
||||
.equ BO,0x04 ; Byte order
|
||||
.equ CP,0x02 ; Coprocessor present
|
||||
.equ CD,0x01 ; BTC disable
|
||||
|
||||
; Channel control register CHC (sr6)
|
||||
.equ LS,0x8000 ; Load store
|
||||
.equ ML,0x4000 ; Multiple operation
|
||||
.equ ST,0x2000 ; Set
|
||||
.equ LA,0x1000 ; Lock active
|
||||
.equ TF,0x0400 ; Transaction faulted
|
||||
.equ TR,0x03FC ; Target register
|
||||
.equ NN,0x0002 ; Not needed
|
||||
.equ CV,0x0001 ; Contents valid
|
||||
|
||||
; Timer reload register TMR (sr9)
|
||||
.equ IE,0x01000000 ; timer int enable
|
||||
.equ IN,0x02000000 ; timer int pending
|
||||
.equ OV,0x04000000 ; timer Overflow
|
||||
|
||||
; MMU configuration register MMU (sr13)
|
||||
.equ PS,0x300 ; Page size
|
||||
.equ PID,0xFF ; Process identifier
|
||||
|
||||
; ALU status register ALU (sr132)
|
||||
.equ DF,0x800 ; Divide flag
|
||||
.equ V,0x400 ; Overflow
|
||||
.equ N,0x200 ; Negative
|
||||
.equ Z,0x100 ; Zero
|
||||
.equ C,0x080 ; Carry
|
||||
|
||||
; TLB entry
|
||||
.equ VTAG,0xFFFF8000 ; Virtual tag
|
||||
.equ VE,0x4000 ; Valid entry
|
||||
.equ SR,0x2000 ; Supervisor read
|
||||
.equ SW,0x1000 ; Supervisor write
|
||||
.equ SE,0x0800 ; Supervisor execute
|
||||
.equ UR,0x0400 ; User read
|
||||
.equ UW,0x0200 ; User write
|
||||
.equ UE,0x0100 ; User execute
|
||||
.equ TID,0x00FF ; Task identifier
|
||||
.equ RPN,0xFFFFFC00 ; Real page number
|
||||
.equ PGM,0x00C0 ; User programmable
|
||||
.equ U,0x0002 ; Usage
|
||||
.equ F,0x0001 ; Flag
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;Global registers
|
||||
;-----------------------------------------------------------------------
|
||||
|
||||
.reg rsp, gr1 ; local register stack pointer
|
||||
|
||||
; System-wide statics
|
||||
.reg s0, gr64
|
||||
.reg spillreg, s0 ; pointer to user spill handler
|
||||
.reg s1, gr65
|
||||
.reg fillreg, s1 ; pointer to user fill handler
|
||||
.reg s2, gr66
|
||||
.reg heapptr, s2 ; pointer to heap area
|
||||
.reg s3, gr67
|
||||
.reg s4, gr68
|
||||
.reg s5, gr69
|
||||
.reg s6, gr70
|
||||
.reg s7, gr71
|
||||
.reg s8, gr72
|
||||
.reg s9, gr73
|
||||
.reg s10, gr74
|
||||
.reg s11, gr75
|
||||
.reg s12, gr76
|
||||
.reg s13, gr77
|
||||
.reg s14, gr78
|
||||
.reg s15, gr79
|
||||
|
||||
; Interrupt handler temporaries
|
||||
.reg i0, gr80
|
||||
.reg i1, gr81
|
||||
.reg i2, gr82
|
||||
.reg i3, gr83
|
||||
.reg i4, gr84
|
||||
.reg i5, gr85
|
||||
.reg i6, gr86
|
||||
.reg i7, gr87
|
||||
.reg i8, gr88
|
||||
.reg i9, gr89
|
||||
.reg i10, gr90
|
||||
.reg i11, gr91
|
||||
.reg i12, gr92
|
||||
.reg i13, gr93
|
||||
.reg i14, gr94
|
||||
.reg i15, gr95
|
||||
|
||||
; Subroutine/function temporaries
|
||||
; also used for function return values
|
||||
.reg t0, gr96
|
||||
.reg rtn, t0
|
||||
.reg t1, gr97
|
||||
.reg t2, gr98
|
||||
.reg t3, gr99
|
||||
.reg t4, gr100
|
||||
.reg t5, gr101
|
||||
.reg t6, gr102
|
||||
.reg t7, gr103
|
||||
.reg t8, gr104
|
||||
.reg t9, gr105
|
||||
.reg t10, gr106
|
||||
.reg t11, gr107
|
||||
.reg t12, gr108
|
||||
.reg t13, gr109
|
||||
.reg t14, gr110
|
||||
.reg t15, gr111
|
||||
|
||||
; User process statics
|
||||
.reg u0, gr112
|
||||
.reg u1, gr113
|
||||
.reg u2, gr114
|
||||
.reg u3, gr115
|
||||
|
||||
; More subroutine/function temporaries
|
||||
.reg t16, gr116
|
||||
.reg t17, gr117
|
||||
.reg t18, gr118
|
||||
.reg t19, gr119
|
||||
.reg t20, gr120
|
||||
|
||||
; Older names for the same registers
|
||||
.reg tmp0, gr116
|
||||
.reg tmp1, gr117
|
||||
.reg tmp2, gr118
|
||||
.reg tmp3, gr119
|
||||
.reg tmp4, gr120
|
||||
|
||||
; Trap handler temporaries
|
||||
.reg tav, gr121 ; arg/temp
|
||||
.reg tpc, gr122 ; rtn/temp
|
||||
|
||||
; Linkage pointers
|
||||
.reg lrp, gr123 ; large rtn ptr
|
||||
.reg slp, gr124 ; static link ptr
|
||||
.reg msp, gr125 ; memory stack ptr
|
||||
.reg rab, gr126 ; register allocate bound
|
||||
.reg rfb, gr127 ; register free bound
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;Local compiler registers
|
||||
; (only valid if frame has been established)
|
||||
;-----------------------------------------------------------------------
|
||||
|
||||
.reg p15, lr17 ; outgoing arg 16
|
||||
.reg p14, lr16 ; outgoing arg 15
|
||||
.reg p13, lr15 ; outgoing arg 14
|
||||
.reg p12, lr14 ; outgoing arg 13
|
||||
.reg p11, lr13 ; outgoing arg 12
|
||||
.reg p10, lr12 ; outgoing arg 11
|
||||
.reg p9, lr11 ; outgoing arg 10
|
||||
.reg p8, lr10 ; outgoing arg 9
|
||||
.reg p7, lr9 ; outgoing arg 8
|
||||
.reg p6, lr8 ; outgoing arg 7
|
||||
.reg p5, lr7 ; outgoing arg 6
|
||||
.reg p4, lr6 ; outgoing arg 5
|
||||
.reg p3, lr5 ; outgoing arg 4
|
||||
.reg p2, lr4 ; outgoing arg 3
|
||||
.reg p1, lr3 ; outgoing arg 2
|
||||
.reg p0, lr2 ; outgoing arg 1
|
||||
.reg fp, lr1 ; frame pointer
|
||||
.reg raddr, lr0 ; return address
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
; Vectors
|
||||
;-----------------------------------------------------------------------
|
||||
|
||||
.equ V_ILLEG, 0 ; Illegal opcode
|
||||
.equ V_ALIGN, 1 ; Unaligned access
|
||||
.equ V_RANGE, 2 ; Out of range
|
||||
.equ V_COPRE, 3 ; Coprocessor not present
|
||||
.equ V_COEXC, 4 ; Coprocessor exception
|
||||
.equ V_PROT, 5 ; Protection violation
|
||||
.equ V_INSTR, 6 ; Instruction access exception
|
||||
.equ V_DATA, 7 ; Data access exception
|
||||
.equ V_UITLB, 8 ; User-mode instruction TLB miss
|
||||
.equ V_UDTLB, 9 ; User-mode data TLB miss
|
||||
.equ V_SITLB, 10 ; Supervisor-mode instr TLB miss
|
||||
.equ V_SDTLB, 11 ; Supervisor-mode data TLB miss
|
||||
.equ V_ITLB, 12 ; Instruction TLB violation
|
||||
.equ V_DTLB, 13 ; Data TLB violation
|
||||
.equ V_TIMER, 14 ; Timer
|
||||
.equ V_TRACE, 15 ; Trace
|
||||
.equ V_INTR0, 16 ; Interrupt 0
|
||||
.equ V_INTR1, 17 ; Interrupt 1
|
||||
.equ V_INTR2, 18 ; Interrupt 2
|
||||
.equ V_INTR3, 19 ; Interrupt 3
|
||||
.equ V_TRAP0, 20 ; Trap 0
|
||||
.equ V_TRAP1, 21 ; Trap 1
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;constants for LOAD and STORE operations
|
||||
;-----------------------------------------------------------------------
|
||||
|
||||
; CE operand values
|
||||
.equ CE, 0b1 ;coprocessor enable
|
||||
.equ ME, 0b0 ; memory enable
|
||||
|
||||
; CNTL operand values
|
||||
.equ IO, 0b1000000 ;set for I/O
|
||||
.equ PA, 0b0100000 ;force physical addr
|
||||
.equ SB, 0b0010000 ;set for set BP
|
||||
.equ UA, 0b0001000 ;force user mode access
|
||||
.equ ROM, 0b0000100 ;ROM access
|
||||
.equ HWORD, 0b0000010 ;Half word access
|
||||
.equ BYTE, 0b0000001 ;Byte access
|
||||
.equ WORD, 0b0000000 ;Word access
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
; stack alignment value
|
||||
;-----------------------------------------------------------------------
|
||||
.equ STKALIGN, 8 ; double word align
|
||||
|
2970
newlib/libc/sys/a29khif/sys/fpsymbol.h
Normal file
2970
newlib/libc/sys/a29khif/sys/fpsymbol.h
Normal file
File diff suppressed because it is too large
Load Diff
457
newlib/libc/sys/a29khif/sys/intrinsi.h
Normal file
457
newlib/libc/sys/a29khif/sys/intrinsi.h
Normal file
@ -0,0 +1,457 @@
|
||||
; @(#)intrinsi.h 1.4 90/10/14 20:56:06, Copyright 1988, 1989, 1990 AMD
|
||||
; start of file intrinsi.h
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
;
|
||||
.title "QTC Intrinsics Header file"
|
||||
;
|
||||
; Floating point library package for AMD 29000 family
|
||||
;
|
||||
; Copyright 1988 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; All rights reserved
|
||||
;
|
||||
; Developed for AMD by Quantitative Technology Corporation
|
||||
; 8700 SW Creekside Place Suite D
|
||||
; Beaverton OR 97005
|
||||
; (503) 626-3081
|
||||
;
|
||||
; Version information :
|
||||
;
|
||||
; Revision 1.6 89/06/29 16:08:51 jimh
|
||||
; Fixed two bugs regarding compatiblility with the fpsymbol file. The
|
||||
; definitions of ROUND_TO_PLUS/MINUS_INFINITY were reversed. Set_Rounding
|
||||
; _Mode was fixed to set the local copy (29000 resident) of rounding mode
|
||||
; in 29027 mode.
|
||||
;
|
||||
;
|
||||
; Revision 1.5 89/04/17 11:20:49 jim
|
||||
; replaced emfsr and emtsr macro calls with mfsr and mtsr instructions.
|
||||
;
|
||||
; Revision 1.4 89/02/24 15:18:04 jimh
|
||||
; Added the definitions of FP_ENV_MODE_1_DEFAULT, FP_ENV_MODE_2_DEFAULT,
|
||||
; FP_FLAGS_DEFAULT.
|
||||
; Added macro clear_Flags.
|
||||
; Changed the operation of set_Invalid_Op_flag, set_Reserved_Op_flag.
|
||||
;
|
||||
; Revision 1.3 89/02/01 18:30:12 jimh
|
||||
; Changed the way set_Rounding_Mode, extract_Rounding_Mode, set_Invalid_Op_flag
|
||||
; and set_Reserved_Op_flag are done. Changed save_FP_regs.
|
||||
;
|
||||
; Revision 1.2 89/01/31 10:01:54 jimh
|
||||
; Updated to the new standard. This includes moving in register
|
||||
; definitions, changing old symbols to reflect those in fpsymbol.h,
|
||||
; and changing the include file to smartmac.h.
|
||||
;
|
||||
;
|
||||
.include "../traps/fpenv.h" ; RPD 8/21/89
|
||||
.include "sys/smartmac.h"
|
||||
|
||||
.equ DOUBLE_EXP_WIDTH, 11
|
||||
.equ DOUBLE_EXTENDED_WIDTH, 56
|
||||
|
||||
.equ SIGNED, 0
|
||||
.equ UNSIGNED, 1
|
||||
|
||||
.equ ROUND_TO_NEAREST, 0
|
||||
.equ ROUND_TO_MINUS_INFINITY, 1
|
||||
.equ ROUND_TO_PLUS_INFINITY, 2
|
||||
.equ ROUND_TO_ZERO, 3
|
||||
.equ ROUNDING_MODE_POSITION, 14
|
||||
|
||||
.equ FORMAT_INTEGER, 0
|
||||
.equ FORMAT_SINGLE, 1
|
||||
.equ FORMAT_DOUBLE, 2
|
||||
|
||||
.equ DOUBLE_MSB_MASK,0x00080000
|
||||
;
|
||||
; The following are definitions used in the smart macro package, defining
|
||||
; the 29000 shadow registers for the floating-point register file, and
|
||||
; some temporary registers used during the library routines
|
||||
;
|
||||
.reg FP0, gr96
|
||||
.reg FP1, gr98
|
||||
.reg FP2, gr100
|
||||
.reg FP3, gr102
|
||||
.reg FP4, gr104
|
||||
.reg FP5, gr106
|
||||
.reg FP6, gr108
|
||||
.reg FP7, gr110
|
||||
;
|
||||
; GR60 through GR6F are used to return the value of a function
|
||||
;
|
||||
.reg rtn0, gr96
|
||||
.reg rtn1, gr97
|
||||
.reg rtn2, gr98
|
||||
.reg rtn3, gr99
|
||||
.reg rtn4, gr100
|
||||
.reg rtn5, gr101
|
||||
.reg rtn6, gr102
|
||||
.reg rtn7, gr103
|
||||
.reg rtn8, gr104
|
||||
.reg rtn9, gr105
|
||||
.reg rtn10, gr106
|
||||
.reg rtn11, gr107
|
||||
.reg rtn12, gr108
|
||||
.reg rtn13, gr109
|
||||
.reg rtn14, gr110
|
||||
.reg rtn15, gr111
|
||||
;
|
||||
; GR74..GR78 (116-120) - temporaries
|
||||
;
|
||||
.reg t0, gr116
|
||||
.reg t1, gr117
|
||||
.reg t2, gr118
|
||||
.reg t3, gr119
|
||||
.reg t4, gr120
|
||||
;
|
||||
; FP_ENV_MODE_1 and FP_ENV_MODE_2 are based on 64-bit 29027 Mode register,
|
||||
; and thus the fpsymbol.h CP_ constants may be used directly.
|
||||
;
|
||||
; FP_ENV_MODE_1 (Bits 0-31)
|
||||
;
|
||||
; 0-3 - floating-point format select, always 0
|
||||
; 4 - Saturate enable
|
||||
; 5 - IEEE Affine/Projective mode (ignored by traps code)
|
||||
; 6 - IEEE Trap enable
|
||||
; 7 - IEEE Sudden underflow / FP Environment Fast Float Select
|
||||
; 8-10 - ignored
|
||||
; 11 - Integer multiplication signed/unsigned select
|
||||
; 12-13 - Integer multiplication format adjust
|
||||
; 14-16 - Rounding mode select
|
||||
; 17-19 - ignored
|
||||
; 20 - Pipeline mode select
|
||||
; 21 - ignored
|
||||
; 22 - Invalid operation mask bit
|
||||
; 23 - Reserved operand mask bit
|
||||
; 24 - Overflow mask bit
|
||||
; 25 - Underflow mask bit
|
||||
; 26 - Inexact result mask bit
|
||||
; 27 - Zero mask bit
|
||||
; 28-31 - ignored
|
||||
;
|
||||
; FP_ENV_MODE_2 (Bits 32-63) [Hardware configuration register, rarely modified]
|
||||
;
|
||||
; 32-35 - Pipeline timer count
|
||||
; 36-39 - Timer count for multiply-accumulate operation
|
||||
; 40-43 - Timer count for save state transaction request
|
||||
; 44-63 - ignored
|
||||
;
|
||||
; FP_ENV_MODE_1 definitions
|
||||
;
|
||||
.set FP_ENV_MODE_1_DEFAULT, CP_PFF_EQ_IEEE
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_AFF_EQ_IEEE
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_AFFINE_MODE
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_IEEE_TRAPS_DISABLED
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_IEEE_GRADUAL_UFLOW_MODE
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_UNSIGNED_INT_MPY_MODE
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_MF_EQ_LSBS
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_RMS_EQ_NEAREST
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_FLOWTHROUGH_MODE
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_INVALID_OP_EXCP_MASK
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_RESERVED_OP_EXCP_MASK
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_OVERFLOW_EXCP_MASK
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_UNDERFLOW_EXCP_MASK
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_INEXACT_EXCP_MASK
|
||||
.set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_ZERO_EXCP_MASK
|
||||
;
|
||||
; FP_ENV_MODE_2 definitions
|
||||
;
|
||||
.set FP_ENV_MODE_2_DEFAULT, CP_PLTC_EQ_6
|
||||
.set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_MATC_EQ_9
|
||||
.set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_MVTC_EQ_3
|
||||
.set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_NORMAL_DRDY_MODE
|
||||
.set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_HALT_ON_ERROR_DISABLED
|
||||
.set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_EXCP_DISABLED
|
||||
;
|
||||
; FP_FLAGS_DEFAULT definitions
|
||||
;
|
||||
.equ FP_FLAGS_DEFAULT, 0x00000000 ; No flags set
|
||||
;
|
||||
; The following macros are used by transcendentals to access the environment.
|
||||
;
|
||||
; MACRO NAME: clear_Flags
|
||||
;
|
||||
; FUNCTION: to clear the flags on entry to a transcendental routine.
|
||||
;
|
||||
; INPUT PARAMETERS: reg - temporary working register
|
||||
; reg2 - temporary working register
|
||||
;
|
||||
.macro clear_Flags,reg,reg2
|
||||
.endm
|
||||
;
|
||||
; MACRO NAME: set_Invalid_Op_flag
|
||||
;
|
||||
; FUNCTION: to set the Invalid operation flag in the floating-point status
|
||||
; register
|
||||
;
|
||||
; INPUT PARAMETERS: reg - temporary working register
|
||||
; reg2 - 2nd temporary working register
|
||||
;
|
||||
.macro set_Invalid_Op_flag,reg,reg2
|
||||
.endm
|
||||
|
||||
;
|
||||
; MACRO NAME: set_Reserved_Op_flag
|
||||
;
|
||||
; FUNCTION: to set the Reserved Op flag in the floating-point status register
|
||||
;
|
||||
; INPUT PARAMETERS: reg - temporary working register
|
||||
; reg2 - 2nd temporary working register
|
||||
;
|
||||
.macro set_Reserved_Op_flag,reg,reg2
|
||||
.endm
|
||||
|
||||
;
|
||||
; MACRO NAME: extract_Rounding_Mode
|
||||
;
|
||||
; FUNCTION: to extract the Rounding Mode portion of the floating-point
|
||||
; invironment mode register, shift the value to the range of
|
||||
; 0-7, and leave it in a register
|
||||
;
|
||||
; INPUT PARAMETERS: reg - destination for the mode
|
||||
;
|
||||
.macro extract_Rounding_Mode,reg
|
||||
.ifdef _29027_MODE
|
||||
.extern __29027Mode
|
||||
const reg,__29027Mode
|
||||
consth reg,__29027Mode
|
||||
load 0,0,reg,reg
|
||||
srl reg,reg,CP_RMS_POSITION
|
||||
and reg,reg,CP_RMS_MASK >> CP_RMS_POSITION
|
||||
.else
|
||||
mfsr reg,FPE
|
||||
and reg,reg,FPE_FPRND_MASK
|
||||
srl reg,reg,FPE_FPRND_POSITION
|
||||
.endif
|
||||
.endm
|
||||
|
||||
;
|
||||
; MACRO NAME: set_Rounding_Mode
|
||||
;
|
||||
; FUNCTION: to set the 29027 Rounding Mode to a given value
|
||||
;
|
||||
; INPUT PARAMETERS: reg - working register
|
||||
; reg2 - second working register
|
||||
; rounding_mode - value of the rounding mode
|
||||
; 0 - round to nearest
|
||||
; 1 - round to minus infinity
|
||||
; 2 - round to plus infinity
|
||||
; 3 - round to zero
|
||||
;
|
||||
; NOTES: rounding_mode value is not checked
|
||||
; 29027 Mode register is NOT written by this macro
|
||||
;
|
||||
.macro set_Rounding_Mode,reg,reg2,mode
|
||||
.ifdef _29027_MODE
|
||||
.extern __29027Mode
|
||||
const reg2,__29027Mode
|
||||
consth reg2,__29027Mode
|
||||
load 0,0,reg,reg2
|
||||
const reg2,CP_RMS_MASK
|
||||
consth reg2,CP_RMS_MASK
|
||||
andn reg,reg,reg2
|
||||
const reg2,mode
|
||||
sll reg2,reg2,CP_RMS_POSITION
|
||||
or reg,reg,reg2
|
||||
const reg2,__29027Mode
|
||||
consth reg2,__29027Mode
|
||||
store 0,0,reg,reg2
|
||||
add reg2,reg2,4
|
||||
load 0,0,reg2,reg2
|
||||
cp_write_mode reg2,reg
|
||||
.else
|
||||
mfsr reg,FPE
|
||||
andn reg,reg,FPE_FPRND_MASK
|
||||
const reg2,mode
|
||||
sll reg2,reg2,FPE_FPRND_POSITION
|
||||
or reg,reg,reg2
|
||||
mtsr FPE,reg
|
||||
.endif
|
||||
.endm
|
||||
;
|
||||
;
|
||||
; NOTE: The 29027 is the floating point coprocessor for the 29000.
|
||||
; It contains 8 floating point registers FP0 to FP7. Three of
|
||||
; these, FP0, FP1, and FP2, are currently designated as scratch,
|
||||
; that is, they will not be preserved across calls. The other
|
||||
; five contain values that must be saved whenever they are used
|
||||
; in code, and restored before the exit of the routine. The 29027
|
||||
; registers are tagged with a single bit indicating the precision
|
||||
; of the current value. When numbers are read into the 29027,
|
||||
; they are always stored in double precision, so that single
|
||||
; precision values are converted on input. Only the MOVE instruction
|
||||
; fails to do this automatic widening. If the result from calculations
|
||||
; in the 29027 ALU (determined by the result precision bit in the
|
||||
; instruction word) is to be single precision and the result saved in
|
||||
; an FP reg, the result precision bit from the instruction gets copied
|
||||
; into the precision bit for the register. If a single precision
|
||||
; SNaN is saved from the 29027, it will be converted to a double
|
||||
; precision QNaN. Along the way it will cause an unmasked exception
|
||||
; when read off the chip and cause changes to the status register.
|
||||
; So the preservation routine will need to modify the mode register to
|
||||
; mask off the exceptions, save the state of the status register before
|
||||
; saving the FP regs, and restore the status and mode registers to their
|
||||
; original settings when the save is complete.
|
||||
;
|
||||
; REFERENCE: The instructions to drive the Am29027 are described in the
|
||||
; Am29027 manual beginning on page 17. Table 4 describes the
|
||||
; operation codes and table 3 the multiplexer codes. Communication
|
||||
; with the 29000 is described on pages 11 and 12 of the Am29027
|
||||
; manual and chapters 6 and 8 of the Am29000 User's Manual
|
||||
;
|
||||
; MACRO NAME: save_FP_regs
|
||||
;
|
||||
; FUNCTION: to save the AMD 29027 floating point register values in the
|
||||
; 29000 general purpose registers
|
||||
;
|
||||
; INPUT PARAMETERS: fp_register, one of the 29027 registers FP3 - FP7
|
||||
;
|
||||
; REGISTER USAGE: the following registers are used in save_FP_regs
|
||||
;
|
||||
; rtn0 this register is used in setting the mode and status registers
|
||||
; rtn1 this register is used in setting the mode and status registers
|
||||
; rtn6 this register is used to store the MSW when FP3 is saved
|
||||
; rtn7 this register is used to store the LSW when FP3 is saved
|
||||
; rtn8 this register is used to store the MSW when FP4 is saved
|
||||
; rtn9 this register is used to store the LSW when FP4 is saved
|
||||
;
|
||||
|
||||
.macro save_FP_regs,fp_register
|
||||
.ifdef _29027_MODE
|
||||
;
|
||||
; For 29027 mode, expand the macro into 29027 code to preserve FP register
|
||||
;
|
||||
.ifeqs "@fp_register@","FP3"
|
||||
const rtn6,__29027Mode ; Load the address of FP mode
|
||||
consth rtn6,__29027Mode
|
||||
load 0,0,rtn0,rtn6 ; Load MSW of FP mode into rtn0
|
||||
add rtn6,rtn6,4 ; Increment rtn6 + 4
|
||||
load 0,0,rtn1,rtn6 ; Load LSW of FP mode into rtn1
|
||||
const rtn6,CP_RESERVED_OP_EXCP_MASK ; Load mask to disable exception
|
||||
consth rtn6,CP_RESERVED_OP_EXCP_MASK
|
||||
or rtn0,rtn0,rtn6 ; OR in disable of exception mask
|
||||
cp_write_mode rtn1, rtn0 ; Reset mode w/exception disabled
|
||||
cp_read_status rtn0 ; Read status and save in rtn1
|
||||
const rtn6,CP_PASS_P | CP_P_EQ_RF3 ; Instruction is PASS_P from RF3
|
||||
consth rtn6,CP_PASS_P | CP_P_EQ_RF3
|
||||
; Load & execute the instruction
|
||||
;
|
||||
store 1,CP_WRITE_INST | CP_START,rtn6,rtn6
|
||||
load 1,CP_READ_MSBS,rtn6,rtn6 ; Read the MSW to first register
|
||||
load 1,CP_READ_LSBS,rtn7,rtn7 ; Read the LSW to second register
|
||||
cp_write_status rtn0 ; Restore the original status
|
||||
const rtn1,__29027Mode ; Load the address of FP mode
|
||||
consth rtn1,__29027Mode
|
||||
load 0,0,rtn0,rtn1 ; Load MSW of FP mode into rtn0
|
||||
add rtn1,rtn1,4 ; Increment rtn6 to __29027Mode+4
|
||||
load 0,0,rtn1,rtn1 ; Load LSW of FP mode into rtn1
|
||||
cp_write_mode rtn1, rtn0 ; Restore the original write mode
|
||||
.endif
|
||||
.ifeqs "@fp_register@","FP4"
|
||||
const rtn8,__29027Mode ; Load the address of FP mode
|
||||
consth rtn8,__29027Mode
|
||||
load 0,0,rtn0,rtn8 ; Load MSW of FP mode into rtn0
|
||||
add rtn8,rtn8,4 ; Increment rtn6 + 4
|
||||
load 0,0,rtn1,rtn8 ; Load LSW of FP mode into rtn1
|
||||
const rtn8,CP_RESERVED_OP_EXCP_MASK ; Load mask to disable exception
|
||||
consth rtn8,CP_RESERVED_OP_EXCP_MASK
|
||||
or rtn0,rtn0,rtn8 ; OR in disable of exception mask
|
||||
cp_write_mode rtn1, rtn0 ; Reset mode w/exception disabled
|
||||
cp_read_status rtn0 ; Read status and save in rtn1
|
||||
const rtn8,CP_PASS_P | CP_P_EQ_RF4 ; Instruction is PASS_P from RF4
|
||||
consth rtn8,CP_PASS_P | CP_P_EQ_RF4
|
||||
; Load & execute the instruction
|
||||
;
|
||||
store 1,CP_WRITE_INST | CP_START,rtn8,rtn8
|
||||
load 1,CP_READ_MSBS,rtn8,rtn8 ; Read the MSW to first register
|
||||
load 1,CP_READ_LSBS,rtn9,rtn9 ; Read the LSW to second register
|
||||
cp_write_status rtn0 ; Restore the original status
|
||||
const rtn1,__29027Mode ; Load the address of FP mode
|
||||
consth rtn1,__29027Mode
|
||||
load 0,0,rtn0,rtn1 ; Load MSW of FP mode into rtn0
|
||||
add rtn1,rtn1,4 ; Increment rtn6 + 4
|
||||
load 0,0,rtn1,rtn1 ; Load LSW of FP mode into rtn1
|
||||
cp_write_mode rtn1, rtn0 ; Restore the original write mode
|
||||
.endif
|
||||
.else
|
||||
;
|
||||
; For 29000 mode, do nothing
|
||||
;
|
||||
.endif
|
||||
.endm
|
||||
;
|
||||
; MACRO NAME: restore_FP_regs
|
||||
;
|
||||
; FUNCTION: to restore the AMD 29027 floating point register values from the
|
||||
; 29000 general purpose registers
|
||||
;
|
||||
; INPUT PARAMETERS: fp_register, one of the 29027 registers FP3 - FP7
|
||||
;
|
||||
; REGISTER USAGE: the following registers are used in restore_FP_regs
|
||||
;
|
||||
; rtn0 this register is used in setting the mode and status registers
|
||||
; rtn6 the value in this register is stored as the MSW of FP3
|
||||
; rtn7 the value in this register is stored as the LSW of FP3
|
||||
; rtn8 the value in this register is stored as the MSW of FP4
|
||||
; rtn9 the value in this register is stored as the LSW of FP4
|
||||
;
|
||||
.macro restore_FP_regs,fp_register
|
||||
.ifdef _29027_MODE
|
||||
;
|
||||
; For 29027 mode, move data from return registers to the correct FP register
|
||||
;
|
||||
.ifeqs "@fp_register@","FP3"
|
||||
store 1,CP_WRITE_R ,rtn6,rtn7 ; Move the data to the R register
|
||||
; Then create the instruction
|
||||
;
|
||||
const rtn0,CP_MOVE_P|CP_D_D|CP_P_EQ_R|CP_DEST_EQ_RF3
|
||||
consth rtn0,CP_MOVE_P|CP_D_D|CP_P_EQ_R|CP_DEST_EQ_RF3
|
||||
;
|
||||
; Perform the write
|
||||
;
|
||||
store 1,(CP_WRITE_INST | CP_START),rtn0,0
|
||||
.endif
|
||||
.ifeqs "@fp_register@","FP4"
|
||||
store 1,CP_WRITE_R ,rtn8,rtn9 ; Move the data to the R register
|
||||
; Then create the instruction
|
||||
;
|
||||
const rtn0,CP_MOVE_P|CP_D_D|CP_P_EQ_R|CP_DEST_EQ_RF4
|
||||
consth rtn0,CP_MOVE_P|CP_D_D|CP_P_EQ_R|CP_DEST_EQ_RF4
|
||||
;
|
||||
; Perform the write
|
||||
;
|
||||
store 1,(CP_WRITE_INST | CP_START),rtn0,0
|
||||
.endif
|
||||
.else
|
||||
;
|
||||
; For 29000 mode, do nothing.
|
||||
;
|
||||
.endif
|
||||
.endm
|
||||
;
|
||||
; end of file intrinsi.h
|
37
newlib/libc/sys/a29khif/sys/macros.h
Normal file
37
newlib/libc/sys/a29khif/sys/macros.h
Normal file
@ -0,0 +1,37 @@
|
||||
; @(#)macros.h 1.3 90/10/14 20:56:10, Copyright 1989, 1990 AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1989, 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; macros.h
|
||||
; Short macros of general utility
|
||||
|
||||
.macro mov, dest,src
|
||||
add dest, src, 0
|
||||
.endm
|
||||
|
||||
.macro not, dest,src
|
||||
nand dest, src, src
|
||||
.endm
|
60
newlib/libc/sys/a29khif/sys/proreg.h
Normal file
60
newlib/libc/sys/a29khif/sys/proreg.h
Normal file
@ -0,0 +1,60 @@
|
||||
; @(#)proreg.h 1.3 90/10/14 20:56:11, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1989, 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; proreg.h
|
||||
;
|
||||
; 16 function value return regs
|
||||
.reg v0, gr96
|
||||
.reg v1, gr97
|
||||
.reg v2, gr98
|
||||
.reg v3, gr99
|
||||
.reg v4, gr100
|
||||
.reg v5, gr101
|
||||
.reg v6, gr102
|
||||
.reg v7, gr103
|
||||
.reg v8, gr104
|
||||
.reg v9, gr105
|
||||
.reg v10, gr106
|
||||
.reg v11, gr107
|
||||
.reg v12, gr108
|
||||
.reg v13, gr109
|
||||
.reg v14, gr110
|
||||
.reg v15, gr111
|
||||
;
|
||||
.reg rsp, gr1 ; Register Stack Pointer
|
||||
.reg ret, gr96 ; First word of return value
|
||||
.reg rp0, gr112 ; Reserved for Programmer, #0
|
||||
.reg rp1, gr113 ; Reserved for Programmer, #1
|
||||
.reg rp2, gr114 ; Reserved for Programmer, #2
|
||||
.reg rp3, gr115 ; Reserved for Programmer, #3
|
||||
.reg tav, gr121 ; Temporary, Argument for Trap Handlers
|
||||
.reg tpc, gr122 ; Temporary, Return PC for Trap Handlers
|
||||
.reg lrp, gr123 ; Large Return Pointer
|
||||
.reg slp, gr124 ; Static Link Pointer
|
||||
.reg msp, gr125 ; Memory Stack Pointer
|
||||
.reg rab, gr126 ; Register Allocate Bound
|
||||
.reg rfb, gr127 ; Register Free Bound
|
392
newlib/libc/sys/a29khif/sys/romdcl.h
Normal file
392
newlib/libc/sys/a29khif/sys/romdcl.h
Normal file
@ -0,0 +1,392 @@
|
||||
; @(#)romdcl.h 1.4 90/10/14 20:56:12, Copyright 1988, 1989, 1990 AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
.sbttl "Register, Constant and Macro Declarations - v1.4"
|
||||
|
||||
; Copyright 1988, Advanced Micro Devices
|
||||
; Written by Gibbons and Associates, Inc.
|
||||
|
||||
;v1.4 JG correct FUNCTION macro - fault in register padding to even
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;Global registers
|
||||
;-----------------------------------------------------------------------
|
||||
.reg rsp, gr1 ;local reg. var. stack pointer
|
||||
|
||||
.equ SYS_TEMP, 64 ;system temp registers
|
||||
|
||||
.reg st0, gr64
|
||||
.reg st1, gr65
|
||||
.reg st2, gr66
|
||||
.reg st3, gr67
|
||||
.reg st4, gr68
|
||||
.reg st5, gr69
|
||||
.reg st6, gr70
|
||||
.reg st7, gr71
|
||||
.reg st8, gr72
|
||||
.reg st9, gr73
|
||||
.reg st10, gr74
|
||||
.reg st11, gr75
|
||||
.reg st12, gr76
|
||||
.reg st13, gr77
|
||||
.reg st14, gr78
|
||||
.reg st15, gr79
|
||||
|
||||
.equ SYS_STAT, 80 ;system static registers
|
||||
|
||||
.reg ss0, gr80
|
||||
.reg ss1, gr81
|
||||
.reg ss2, gr82
|
||||
.reg ss3, gr83
|
||||
.reg ss4, gr84
|
||||
.reg ss5, gr85
|
||||
.reg ss6, gr86
|
||||
.reg ss7, gr87
|
||||
.reg ss8, gr88
|
||||
.reg ss9, gr89
|
||||
.reg ss10, gr90
|
||||
.reg ss11, gr91
|
||||
.reg ss12, gr92
|
||||
.reg ss13, gr93
|
||||
.reg ss14, gr94
|
||||
.reg ss15, gr95
|
||||
|
||||
.equ RET_VAL, 96 ;return registers
|
||||
|
||||
.reg v0, gr96
|
||||
.reg v1, gr97
|
||||
.reg v2, gr98
|
||||
.reg v3, gr99
|
||||
.reg v4, gr100
|
||||
.reg v5, gr101
|
||||
.reg v6, gr102
|
||||
.reg v7, gr103
|
||||
.reg v8, gr104
|
||||
.reg v9, gr105
|
||||
.reg v10, gr106
|
||||
.reg v11, gr107
|
||||
.reg v12, gr108
|
||||
.reg v13, gr109
|
||||
.reg v14, gr110
|
||||
.reg v15, gr111
|
||||
|
||||
.equ TEMP_REG, 96 ;temp registers
|
||||
|
||||
.reg t0, gr96
|
||||
.reg t1, gr97
|
||||
.reg t2, gr98
|
||||
.reg t3, gr99
|
||||
.reg t4, gr100
|
||||
.reg t5, gr101
|
||||
.reg t6, gr102
|
||||
.reg t7, gr103
|
||||
.reg t8, gr104
|
||||
.reg t9, gr105
|
||||
.reg t10, gr106
|
||||
.reg t11, gr107
|
||||
.reg t12, gr108
|
||||
.reg t13, gr109
|
||||
.reg t14, gr110
|
||||
.reg t15, gr111
|
||||
|
||||
.equ RES_REG, 112 ;reserved (for user)
|
||||
|
||||
.reg r0, gr112
|
||||
.reg r1, gr113
|
||||
.reg r2, gr114
|
||||
.reg r3, gr115
|
||||
|
||||
.equ TEMP_EXT, 116 ;temp extension (and shared)
|
||||
|
||||
.reg x0, gr116
|
||||
.reg x1, gr117
|
||||
.reg x2, gr118
|
||||
.reg x3, gr119
|
||||
.reg x4, gr120
|
||||
.reg x5, gr121
|
||||
.reg x6, gr122
|
||||
.reg x7, gr123
|
||||
.reg x8, gr124
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;Global registers with special calling convention uses
|
||||
;-----------------------------------------------------------------------
|
||||
|
||||
.reg tav, gr121 ;trap handler argument (also x6)
|
||||
.reg tpc, gr122 ;trap handler return (also x7)
|
||||
.reg lsrp, gr123 ;large return pointer (also x8)
|
||||
.reg slp, gr124 ;static link pointer (also x9)
|
||||
.reg msp, gr125 ;memory stack pointer
|
||||
.reg rab, gr126 ;register alloc bound
|
||||
.reg rfb, gr127 ;register frame bound
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;Local compiler registers - output parameters, etc.
|
||||
; (only valid if frame has been established)
|
||||
;-----------------------------------------------------------------------
|
||||
|
||||
.reg p15, lr17 ;parameter registers
|
||||
.reg p14, lr16
|
||||
.reg p13, lr15
|
||||
.reg p12, lr14
|
||||
.reg p11, lr13
|
||||
.reg p10, lr12
|
||||
.reg p9, lr11
|
||||
.reg p8, lr10
|
||||
.reg p7, lr9
|
||||
.reg p6, lr8
|
||||
.reg p5, lr7
|
||||
.reg p4, lr6
|
||||
.reg p3, lr5
|
||||
.reg p2, lr4
|
||||
.reg p1, lr3
|
||||
.reg p0, lr2
|
||||
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;TLB register count
|
||||
;-----------------------------------------------------------------------
|
||||
|
||||
.equ TLB_CNT, 128
|
||||
|
||||
.eject
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;constants for general use
|
||||
;-----------------------------------------------------------------------
|
||||
.equ WRD_SIZ, 4 ;word size
|
||||
.equ TRUE, 0x80000000 ;logical true -- bit 31
|
||||
.equ FALSE, 0x00000000 ;logical false -- 0
|
||||
.equ CHKPAT_a5, 0xa5a5a5a5 ;check pattern
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;constants for data access control
|
||||
;-----------------------------------------------------------------------
|
||||
.equ CE, 0b1 ;coprocessor enable
|
||||
.equ CD, 0b0 ;coprocessor disable
|
||||
|
||||
.equ AS, 0b1000000 ;set for I/O
|
||||
.equ PA, 0b0100000 ;set for physical ad
|
||||
.equ SB, 0b0010000 ;set for set BP
|
||||
.equ UA, 0b0001000 ;set for user access
|
||||
|
||||
.equ ROM_OPT, 0b100 ;OPT values for acc
|
||||
.equ DATA_OPT, 0b000
|
||||
.equ INST_OPT, 0b000
|
||||
|
||||
.equ ROM_CTL, (PA + ROM_OPT) ;control field
|
||||
.equ DATA_CTL, (PA + DATA_OPT)
|
||||
.equ INST_CTL, (PA + INST_OPT)
|
||||
.equ IO_CTL, (AS + PA + DATA_OPT)
|
||||
|
||||
|
||||
.eject
|
||||
|
||||
;-----------------------------------------------------------------------
|
||||
;defined vectors
|
||||
;-----------------------------------------------------------------------
|
||||
|
||||
.equ V_IllegalOp, 0
|
||||
.equ V_Unaligned, 1
|
||||
.equ V_OutOfRange, 2
|
||||
.equ V_NoCoProc, 3
|
||||
.equ V_CoProcExcept, 4
|
||||
.equ V_ProtViol, 5
|
||||
.equ V_InstAccExcept, 6
|
||||
.equ V_DataAccExcept, 7
|
||||
.equ V_UserInstTLB, 8
|
||||
.equ V_UserDataTLB, 9
|
||||
.equ V_SupInstTLB, 10
|
||||
.equ V_SupDataTLB, 11
|
||||
.equ V_InstTLBProt, 12
|
||||
.equ V_DataTLBProt, 13
|
||||
.equ V_Timer, 14
|
||||
.equ V_Trace, 15
|
||||
.equ V_INTR0, 16
|
||||
.equ V_INTR1, 17
|
||||
.equ V_INTR2, 18
|
||||
.equ V_INTR3, 19
|
||||
.equ V_TRAP0, 20
|
||||
.equ V_TRAP1, 21
|
||||
|
||||
; 22 - 31 reserved
|
||||
|
||||
.equ V_MULTIPLY, 32
|
||||
.equ V_DIVIDE, 33
|
||||
.equ V_MULTIPLU, 34
|
||||
.equ V_DIVIDU, 35
|
||||
.equ V_CONVERT, 36
|
||||
|
||||
; 37 - 41 reserved
|
||||
|
||||
.equ V_FEQ, 42
|
||||
.equ V_DEQ, 43
|
||||
.equ V_FGT, 44
|
||||
.equ V_DGT, 45
|
||||
.equ V_FGE, 46
|
||||
.equ V_DGE, 47
|
||||
.equ V_FADD, 48
|
||||
.equ V_DADD, 49
|
||||
.equ V_FSUB, 50
|
||||
.equ V_DSUB, 51
|
||||
.equ V_FMUL, 52
|
||||
.equ V_DMUL, 53
|
||||
.equ V_FDIV, 54
|
||||
.equ V_DDIV, 55
|
||||
|
||||
; 56 - 63 reserved
|
||||
|
||||
.equ V_SPILL, 64
|
||||
.equ V_FILL, 65
|
||||
.equ V_BSDCALL, 66
|
||||
.equ V_SYSVCALL, 67
|
||||
.equ V_BRKPNT, 68
|
||||
.equ V_EPI_OS, 69
|
||||
|
||||
.eject
|
||||
|
||||
.macro R_LEFT,REGVAR
|
||||
|
||||
;Rotate left
|
||||
;
|
||||
; Parameters: REGVAR register to rotate
|
||||
|
||||
add REGVAR, REGVAR, REGVAR ;shift left by 1 bit, C = MSB
|
||||
addc REGVAR, REGVAR, 0 ;add C to LSB
|
||||
|
||||
.endm
|
||||
;----------------------------------------------------------------------
|
||||
|
||||
|
||||
.macro FUNCTION,NAME,INCNT,LOCCNT,OUTCNT
|
||||
|
||||
;Introduces a non-leaf routine.
|
||||
;
|
||||
;This macro defines the standard tag word before the function,
|
||||
;then establishes the statement label with the function's name
|
||||
;and finally allocates a register stack frame. It may not be used
|
||||
;if a memory stack frame is required.
|
||||
;
|
||||
;Note also that the size of the register stack frame is limited.
|
||||
;Neither this nor the lack of a memory frame is considered to be
|
||||
;a severe restriction in an assembly language environment. The
|
||||
;assembler will report errors if the requested frame is too large
|
||||
;for this macro.
|
||||
;
|
||||
;It may be good practice to allocate an even number of both output
|
||||
;registers and local registers. This will help in maintaining
|
||||
;double word alignment within these groups. The macro will assure
|
||||
;double word alignment of the stack frame as a whole as required
|
||||
;for correct linkage.
|
||||
;
|
||||
; Paramters: NAME the function name
|
||||
; INCNT input parameter count
|
||||
; LOCCNT local register count
|
||||
; OUTCNT output parameter count
|
||||
|
||||
.set ALLOC_CNT, ((2 + OUTCNT + LOCCNT) << 2)
|
||||
.set PAD_CNT, (ALLOC_CNT & 4)
|
||||
.set ALLOC_CNT, (ALLOC_CNT + PAD_CNT)
|
||||
.set REG_PAD, (PAD_CNT >> 2)
|
||||
.if (INCNT)
|
||||
.set IN_PRM, (4 + OUTCNT + REG_PAD + LOCCNT + 0x80)
|
||||
.endif
|
||||
.if (LOCCNT)
|
||||
.set LOC_REG, (2 + OUTCNT + REG_PAD + 0x80)
|
||||
.endif
|
||||
.if (OUTCNT)
|
||||
.set OUT_PRM, (2 + 0x80)
|
||||
.endif
|
||||
|
||||
.word ((2 + OUTCNT + LOCCNT) << 16)
|
||||
NAME:
|
||||
sub rsp, rsp, ALLOC_CNT
|
||||
asgeu V_SPILL, rsp, rab
|
||||
add lr1, rsp, ((4 + OUTCNT + LOCCNT + REG_PAD + INCNT) << 2)
|
||||
|
||||
.endm
|
||||
;----------------------------------------------------------------------
|
||||
|
||||
|
||||
.macro LEAF,NAME,INCNT
|
||||
|
||||
;Introduces a leaf routine
|
||||
;
|
||||
;This macro defines the standard tag word before the function,
|
||||
;then establishes the statement label with the function's name.
|
||||
;
|
||||
; Paramters: NAME the function name
|
||||
; INCNT input parameter count
|
||||
|
||||
.if (INCNT)
|
||||
.set IN_PRM, (2 + 0x80)
|
||||
.endif
|
||||
.set ALLOC_CNT, 0
|
||||
|
||||
.word 0
|
||||
NAME:
|
||||
|
||||
.endm
|
||||
;----------------------------------------------------------------------
|
||||
|
||||
|
||||
.macro EPILOGUE
|
||||
|
||||
;De-allocates register stack frame (only and only if necessary).
|
||||
|
||||
.if (ALLOC_CNT)
|
||||
|
||||
add rsp, rsp, ALLOC_CNT
|
||||
nop
|
||||
jmpi lr0
|
||||
asleu V_FILL, lr1, rfb
|
||||
|
||||
.else
|
||||
|
||||
jmpi lr0
|
||||
nop
|
||||
|
||||
.endif
|
||||
|
||||
.set IN_PRM, (1024) ;illegal, to cause err on ref
|
||||
.set LOC_REG, (1024) ;illegal, to cause err on ref
|
||||
.set OUT_PRM, (1024) ;illegal, to cause err on ref
|
||||
.set ALLOC_CNT, (1024) ;illegal, to cause err on ref
|
||||
|
||||
.endm
|
||||
;----------------------------------------------------------------------
|
||||
|
||||
|
||||
;Initial values for macro set variables to guard against misuse
|
||||
|
||||
.set IN_PRM, (1024) ;illegal, to cause err on ref
|
||||
.set LOC_REG, (1024) ;illegal, to cause err on ref
|
||||
.set OUT_PRM, (1024) ;illegal, to cause err on ref
|
||||
.set ALLOC_CNT, (1024) ;illegal, to cause err on ref
|
||||
|
||||
;......................................................................
|
||||
; end of romdcl.h
|
1491
newlib/libc/sys/a29khif/sys/smartmac.h
Normal file
1491
newlib/libc/sys/a29khif/sys/smartmac.h
Normal file
File diff suppressed because it is too large
Load Diff
165
newlib/libc/sys/a29khif/sys/sysmac.h
Normal file
165
newlib/libc/sys/a29khif/sys/sysmac.h
Normal file
@ -0,0 +1,165 @@
|
||||
; @(#)sysmac.h 1.7 90/10/14 20:56:17, Copyright 1988, 1989, 1990 AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1988, 1989, 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; sysmac.h
|
||||
;
|
||||
.include "sys/proreg.h"
|
||||
|
||||
; Supported system call function numbers - BSD emulation
|
||||
|
||||
.equ BSD_exit, 1
|
||||
.equ BSD_open, 5
|
||||
.equ BSD_close, 6
|
||||
.equ BSD_remove, 10
|
||||
.equ BSD_lseek, 19
|
||||
.equ BSD_sbrk, 69
|
||||
.equ BSD_readv, 120
|
||||
.equ BSD_writev, 121
|
||||
.equ BSD_rename, 128
|
||||
; Functions above 0x100 are handled by Am29000 code
|
||||
.equ BSD_alloc, 0x101
|
||||
.equ BSD_free, 0x102
|
||||
.equ BSD_getpagesize, 0x103
|
||||
|
||||
.equ BSD_clock, 0x111
|
||||
|
||||
; Supported system call function numbers - HIF version 2.0
|
||||
|
||||
.equ HIF_exit, 0x01
|
||||
|
||||
.equ HIF_open, 0x11
|
||||
.equ HIF_close, 0x12
|
||||
.equ HIF_read, 0x13
|
||||
.equ HIF_write, 0x14
|
||||
.equ HIF_lseek, 0x15
|
||||
.equ HIF_remove, 0x16
|
||||
.equ HIF_rename, 0x17
|
||||
.equ HIF_ioctl, 0x18
|
||||
.equ HIF_iowait, 0x19
|
||||
.equ HIF_iostat, 0x1a
|
||||
|
||||
.equ HIF_tmpnam, 0x21
|
||||
|
||||
.equ HIF_time, 0x31
|
||||
|
||||
.equ HIF_getenv, 0x41
|
||||
.equ HIF_gettz, 0x43
|
||||
|
||||
.equ HIF_sysalloc, 0x101
|
||||
.equ HIF_alloc, HIF_sysalloc ;Synonym.
|
||||
.equ HIF_sysfree, 0x102
|
||||
.equ HIF_free, HIF_sysfree ;Synonym.
|
||||
.equ HIF_getpsize, 0x103
|
||||
.equ HIF_getpagesize,HIF_getpsize ;Synonym.
|
||||
.equ HIF_getargs, 0x104
|
||||
|
||||
.equ HIF_clock, 0x111
|
||||
.equ HIF_cycles, 0x112
|
||||
|
||||
.equ HIF_setvec, 0x121
|
||||
.equ HIF_settrap, 0x122
|
||||
.equ HIF_setim, 0x123
|
||||
|
||||
.equ HIF_query, 0x131
|
||||
|
||||
.equ HIF_signal, 0x141
|
||||
.equ HIF_sigdfl, 0x142
|
||||
.equ HIF_sigret, 0x143
|
||||
.equ HIF_sigrep, 0x144
|
||||
.equ HIF_sigskp, 0x145
|
||||
.equ HIF_sendsig, 0x146
|
||||
|
||||
;Maintain compatibility with HIF 1.0 code.
|
||||
|
||||
.equ EPI_exit, HIF_exit
|
||||
|
||||
.equ EPI_open, HIF_open
|
||||
.equ EPI_close, HIF_close
|
||||
.equ EPI_read, HIF_read
|
||||
.equ EPI_write, HIF_write
|
||||
.equ EPI_lseek, HIF_lseek
|
||||
.equ EPI_remove, HIF_remove
|
||||
.equ EPI_rename, HIF_rename
|
||||
|
||||
.equ EPI_tmpnam, HIF_tmpnam
|
||||
|
||||
.equ EPI_time, HIF_time
|
||||
|
||||
.equ EPI_getenv, HIF_getenv
|
||||
.equ EPI_gettz, HIF_gettz
|
||||
.equ EPI_alloc, HIF_sysalloc
|
||||
.equ EPI_free, HIF_sysfree
|
||||
.equ EPI_getpagesize, HIF_getpsize
|
||||
.equ EPI_getargs, HIF_getargs
|
||||
|
||||
.equ EPI_clock, HIF_clock
|
||||
.equ EPI_cycles, HIF_cycles
|
||||
|
||||
.equ EPI_setvec, HIF_setvec
|
||||
|
||||
.equ V_SYSCALL, 69
|
||||
|
||||
; System call macros
|
||||
/* Now that source files have been sed'd to avoid these macros, they
|
||||
are just commented out. -- gnu@cygnus.com Oct 90
|
||||
|
||||
.ifdef _BSD_OS
|
||||
.equ V_SYSCALL, 66
|
||||
.else
|
||||
.equ V_SYSCALL, 69
|
||||
.endif
|
||||
|
||||
.macro syscall, name
|
||||
.ifdef _BSD_OS
|
||||
const tav, SYS_@name
|
||||
.else
|
||||
const tav, HIF_@name
|
||||
.endif
|
||||
asneq V_SYSCALL, gr1, gr1
|
||||
.endm
|
||||
|
||||
; error return
|
||||
; set errno to the error value in tav.
|
||||
; return -1
|
||||
;
|
||||
.macro returnerr
|
||||
;; .extern _errno ; rather have undef'd sym than multiple def's
|
||||
const tpc, _errno
|
||||
consth tpc, _errno
|
||||
store 0, 0, tav, tpc
|
||||
jmpi lr0
|
||||
constn v0, -1
|
||||
.endm
|
||||
|
||||
; package the most common case in one macro
|
||||
;
|
||||
.macro system, name
|
||||
syscall name
|
||||
jmpti tav, lr0
|
||||
returnerr
|
||||
.endm
|
||||
*/
|
44
newlib/libc/sys/a29khif/systime.s
Normal file
44
newlib/libc/sys/a29khif/systime.s
Normal file
@ -0,0 +1,44 @@
|
||||
; @(#)systime.s 1.2 90/10/14 21:57:59, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; _time.s
|
||||
; time_t secs = time( time_t *secs );
|
||||
;
|
||||
; NOTE - Will not work on BSD (no time sys call)
|
||||
;
|
||||
.file "systime.s"
|
||||
.include "sys/sysmac.h"
|
||||
.text
|
||||
.word 0x00030000 ; Debugger tag word
|
||||
.global _time
|
||||
_time:
|
||||
const tav,HIF_time @ asneq V_SYSCALL,gr1,gr1
|
||||
cpeq gr97, lr2, 0
|
||||
jmpti gr97, lr0
|
||||
nop
|
||||
jmpi lr0
|
||||
store 0, 0, gr96, lr2
|
||||
.end
|
35
newlib/libc/sys/a29khif/vec.s
Normal file
35
newlib/libc/sys/a29khif/vec.s
Normal file
@ -0,0 +1,35 @@
|
||||
; @(#)vec.s 1.2 90/10/14 21:58:01, AMD
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Copyright 1990 Advanced Micro Devices, Inc.
|
||||
;
|
||||
; This software is the property of Advanced Micro Devices, Inc (AMD) which
|
||||
; specifically grants the user the right to modify, use and distribute this
|
||||
; software provided this notice is not removed or altered. All other rights
|
||||
; are reserved by AMD.
|
||||
;
|
||||
; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
||||
; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
||||
; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
||||
; USE OF THIS SOFTWARE.
|
||||
;
|
||||
; So that all may benefit from your experience, please report any problems
|
||||
; or suggestions about this software to the 29K Technical Support Center at
|
||||
; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
|
||||
; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
|
||||
;
|
||||
; Advanced Micro Devices, Inc.
|
||||
; 29K Support Products
|
||||
; Mail Stop 573
|
||||
; 5900 E. Ben White Blvd.
|
||||
; Austin, TX 78741
|
||||
; 800-292-9263
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
.global V_SPILL, V_FILL
|
||||
.global V_EPI_OS, V_BSD_OS
|
||||
|
||||
.equ V_SPILL, 64
|
||||
.equ V_FILL, 65
|
||||
|
||||
.equ V_BSD_OS, 66
|
||||
.equ V_EPI_OS, 69
|
||||
.end
|
282
newlib/libc/sys/aclocal.m4
vendored
Normal file
282
newlib/libc/sys/aclocal.m4
vendored
Normal file
@ -0,0 +1,282 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
dnl This provides configure definitions used by all the newlib
|
||||
dnl configure.in files.
|
||||
|
||||
dnl Basic newlib configury. This calls basic introductory stuff,
|
||||
dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
|
||||
dnl configure.host. The only argument is the relative path to the top
|
||||
dnl newlib directory.
|
||||
|
||||
AC_DEFUN(NEWLIB_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "${enableval}" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
||||
esac], [multilib=yes])dnl
|
||||
|
||||
dnl Support --enable-target-optspace
|
||||
AC_ARG_ENABLE(target-optspace,
|
||||
[ --enable-target-optspace optimize for space],
|
||||
[case "${enableval}" in
|
||||
yes) target_optspace=yes ;;
|
||||
no) target_optspace=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
|
||||
esac], [target_optspace=])dnl
|
||||
|
||||
dnl Support --enable-newlib-mb
|
||||
AC_ARG_ENABLE(newlib-mb,
|
||||
[ --enable-newlib-mb enable multibyte support],
|
||||
[case "${enableval}" in
|
||||
yes) newlib_mb=yes ;;
|
||||
no) newlib_mb=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
|
||||
esac], [newlib_mb=no])dnl
|
||||
|
||||
dnl We may get other options which we don't document:
|
||||
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
|
||||
test -z "[$]{with_target_subdir}" && with_target_subdir=.
|
||||
|
||||
if test "[$]{srcdir}" = "."; then
|
||||
if test "[$]{with_target_subdir}" != "."; then
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
|
||||
fi
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/$1"
|
||||
fi
|
||||
AC_SUBST(newlib_basedir)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(newlib, 1.8.1)
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(LIB_AC_PROG_CC,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
dnl Check whether -g works, even if CFLAGS is set, in case the package
|
||||
dnl plays around with CFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
AC_PROG_CC_G
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
|
||||
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
||||
# run it explicitly here, it will be run implicitly before
|
||||
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
|
||||
# be run before AC_CANONICAL_HOST.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
|
||||
# at least currently, we never actually build a program, so we never
|
||||
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
|
||||
# fails, because we are probably configuring with a cross compiler
|
||||
# which can't create executables. So we include AC_EXEEXT to keep
|
||||
# automake happy, but we don't execute it, since we don't care about
|
||||
# the result.
|
||||
if false; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
. [$]{newlib_basedir}/configure.host
|
||||
|
||||
case [$]{newlib_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
|
||||
*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/cygwin/include -I[$]{newlib_flagbasedir}/../winsup/w32api/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -fno-builtin"
|
||||
|
||||
NEWLIB_CFLAGS=${newlib_cflags}
|
||||
AC_SUBST(NEWLIB_CFLAGS)
|
||||
|
||||
AC_SUBST(machine_dir)
|
||||
AC_SUBST(sys_dir)
|
||||
])
|
||||
|
||||
# Do all the work for Automake. 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
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
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# 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 conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $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" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
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
|
||||
]
|
||||
)
|
||||
|
||||
# Define a conditional.
|
||||
|
||||
AC_DEFUN(AM_CONDITIONAL,
|
||||
[AC_SUBST($1_TRUE)
|
||||
AC_SUBST($1_FALSE)
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi])
|
||||
|
14
newlib/libc/sys/arm/Makefile.am
Normal file
14
newlib/libc/sys/arm/Makefile.am
Normal file
@ -0,0 +1,14 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES = syscalls.c libcfunc.c trap.S setjmp.S
|
||||
|
||||
all: crt0.o
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
320
newlib/libc/sys/arm/Makefile.in
Normal file
320
newlib/libc/sys/arm/Makefile.in
Normal file
@ -0,0 +1,320 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 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.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
EXEEXT = @EXEEXT@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
machine_dir = @machine_dir@
|
||||
newlib_basedir = @newlib_basedir@
|
||||
sys_dir = @sys_dir@
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES = syscalls.c libcfunc.c trap.S setjmp.S
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
lib_a_LIBADD =
|
||||
lib_a_OBJECTS = syscalls.o libcfunc.o trap.o setjmp.o
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(lib_a_SOURCES)
|
||||
OBJECTS = $(lib_a_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
|
||||
../../../acinclude.m4 ../../../aclocal.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-noinstLIBRARIES:
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
|
||||
-rm -f lib.a
|
||||
$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
|
||||
$(RANLIB) lib.a
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am:
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-info-am:
|
||||
install-info: install-info-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am:
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-noinstLIBRARIES distclean-compile \
|
||||
distclean-tags distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
|
||||
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
|
||||
check-am installcheck-am installcheck install-info-am install-info \
|
||||
install-exec-am install-exec install-data-am install-data install-am \
|
||||
install uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
all: crt0.o
|
||||
|
||||
# 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:
|
282
newlib/libc/sys/arm/aclocal.m4
vendored
Normal file
282
newlib/libc/sys/arm/aclocal.m4
vendored
Normal file
@ -0,0 +1,282 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
dnl This provides configure definitions used by all the newlib
|
||||
dnl configure.in files.
|
||||
|
||||
dnl Basic newlib configury. This calls basic introductory stuff,
|
||||
dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
|
||||
dnl configure.host. The only argument is the relative path to the top
|
||||
dnl newlib directory.
|
||||
|
||||
AC_DEFUN(NEWLIB_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "${enableval}" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
||||
esac], [multilib=yes])dnl
|
||||
|
||||
dnl Support --enable-target-optspace
|
||||
AC_ARG_ENABLE(target-optspace,
|
||||
[ --enable-target-optspace optimize for space],
|
||||
[case "${enableval}" in
|
||||
yes) target_optspace=yes ;;
|
||||
no) target_optspace=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
|
||||
esac], [target_optspace=])dnl
|
||||
|
||||
dnl Support --enable-newlib-mb
|
||||
AC_ARG_ENABLE(newlib-mb,
|
||||
[ --enable-newlib-mb enable multibyte support],
|
||||
[case "${enableval}" in
|
||||
yes) newlib_mb=yes ;;
|
||||
no) newlib_mb=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
|
||||
esac], [newlib_mb=no])dnl
|
||||
|
||||
dnl We may get other options which we don't document:
|
||||
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
|
||||
test -z "[$]{with_target_subdir}" && with_target_subdir=.
|
||||
|
||||
if test "[$]{srcdir}" = "."; then
|
||||
if test "[$]{with_target_subdir}" != "."; then
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
|
||||
fi
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/$1"
|
||||
fi
|
||||
AC_SUBST(newlib_basedir)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(newlib, 1.8.1)
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(LIB_AC_PROG_CC,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
dnl Check whether -g works, even if CFLAGS is set, in case the package
|
||||
dnl plays around with CFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
AC_PROG_CC_G
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
|
||||
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
||||
# run it explicitly here, it will be run implicitly before
|
||||
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
|
||||
# be run before AC_CANONICAL_HOST.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
|
||||
# at least currently, we never actually build a program, so we never
|
||||
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
|
||||
# fails, because we are probably configuring with a cross compiler
|
||||
# which can't create executables. So we include AC_EXEEXT to keep
|
||||
# automake happy, but we don't execute it, since we don't care about
|
||||
# the result.
|
||||
if false; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
. [$]{newlib_basedir}/configure.host
|
||||
|
||||
case [$]{newlib_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
|
||||
*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/cygwin/include -I[$]{newlib_flagbasedir}/../winsup/w32api/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -fno-builtin"
|
||||
|
||||
NEWLIB_CFLAGS=${newlib_cflags}
|
||||
AC_SUBST(NEWLIB_CFLAGS)
|
||||
|
||||
AC_SUBST(machine_dir)
|
||||
AC_SUBST(sys_dir)
|
||||
])
|
||||
|
||||
# Do all the work for Automake. 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
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
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# 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 conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $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" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
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
|
||||
]
|
||||
)
|
||||
|
||||
# Define a conditional.
|
||||
|
||||
AC_DEFUN(AM_CONDITIONAL,
|
||||
[AC_SUBST($1_TRUE)
|
||||
AC_SUBST($1_FALSE)
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi])
|
||||
|
1687
newlib/libc/sys/arm/configure
vendored
Executable file
1687
newlib/libc/sys/arm/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
12
newlib/libc/sys/arm/configure.in
Normal file
12
newlib/libc/sys/arm/configure.in
Normal file
@ -0,0 +1,12 @@
|
||||
dnl This is the newlib/libc/sys/arm configure.in file.
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.5)
|
||||
AC_INIT(trap.S)
|
||||
|
||||
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
|
||||
AC_CONFIG_AUX_DIR(../../../..)
|
||||
|
||||
NEWLIB_CONFIGURE(../../..)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
244
newlib/libc/sys/arm/crt0.S
Normal file
244
newlib/libc/sys/arm/crt0.S
Normal file
@ -0,0 +1,244 @@
|
||||
#include "swi.h"
|
||||
|
||||
/* ANSI concatenation macros. */
|
||||
#define CONCAT(a, b) CONCAT2(a, b)
|
||||
#define CONCAT2(a, b) a ## b
|
||||
|
||||
#ifdef __USER_LABEL_PREFIX__
|
||||
#define FUNCTION( name ) CONCAT (__USER_LABEL_PREFIX__, name)
|
||||
#else
|
||||
#error __USER_LABEL_PREFIX is not defined
|
||||
#endif
|
||||
|
||||
/* .text is used instead of .section .text so it works with arm-aout too. */
|
||||
.text
|
||||
.code 32
|
||||
.align 0
|
||||
|
||||
.global _mainCRTStartup
|
||||
.global _start
|
||||
.global start
|
||||
start:
|
||||
_start:
|
||||
_mainCRTStartup:
|
||||
|
||||
/* Start by setting up a stack */
|
||||
#ifdef ARM_RDP_MONITOR
|
||||
/* Issue Demon SWI to read stack info */
|
||||
swi SWI_GetEnv /* Returns command line in r0 */
|
||||
mov sp,r1 /* and the highest memory address in r1 */
|
||||
ldr sl, .LC2 /* stack limit is at end of data */
|
||||
add sl, sl, #256 /* allow slop for stack overflow handling */
|
||||
/* and small frames */
|
||||
#else
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
/* Issue Angel SWI to read stack info */
|
||||
mov r0, #AngelSWI_Reason_HeapInfo
|
||||
adr r1, .LC0 /* point at ptr to 4 words to receive data */
|
||||
swi AngelSWI_ARM /* We are always in ARM mode for startup */
|
||||
ldr r0, .LC0 /* point at values read */
|
||||
ldr sp, [r0, #8]
|
||||
ldr sl, [r0, #12]
|
||||
add sl, sl, #256 /* allow slop for stack overflow handling */
|
||||
/* and small frames */
|
||||
#else
|
||||
/* Set up the stack pointer to a fixed value */
|
||||
ldr r3, .LC0
|
||||
mov sp, r3
|
||||
/* Setup a default stack-limit in-case the code has been
|
||||
compiled with "-mapcs-stack-check". Hard-wiring this value
|
||||
is not ideal, since there is currently no support for
|
||||
checking that the heap and stack have not collided, or that
|
||||
this default 64k is enough for the program being executed.
|
||||
However, it ensures that this simple crt0 world will not
|
||||
immediately cause an overflow event: */
|
||||
sub sl, sp, #64 << 10 /* Still assumes 256bytes below sl */
|
||||
#endif
|
||||
#endif
|
||||
mov a2, #0 /* Second arg: fill value */
|
||||
mov fp, a2 /* Null frame pointer */
|
||||
mov r7, a2 /* Null frame pointer for Thumb */
|
||||
|
||||
ldr a1, .LC1 /* First arg: start of memory block */
|
||||
ldr a3, .LC2
|
||||
sub a3, a3, a1 /* Third arg: length of block */
|
||||
|
||||
|
||||
#ifdef __thumb__ /* Enter Thumb mode.... */
|
||||
|
||||
add a4, pc, #1 /* Get the address of the Thumb block */
|
||||
bx a4 /* Go there and start Thumb decoding */
|
||||
|
||||
.code 16
|
||||
.global __change_mode
|
||||
.thumb_func
|
||||
__change_mode:
|
||||
#endif
|
||||
|
||||
bl FUNCTION (memset)
|
||||
#if !defined (ARM_RDP_MONITOR) && !defined (ARM_RDI_MONITOR)
|
||||
mov r0, #0 /* no arguments */
|
||||
mov r1, #0 /* no argv either */
|
||||
#else
|
||||
/* Need to set up standard file handles */
|
||||
bl FUNCTION (initialise_monitor_handles)
|
||||
|
||||
#ifdef ARM_RDP_MONITOR
|
||||
swi SWI_GetEnv /* sets r0 to point to the command line */
|
||||
mov r1, r0
|
||||
#else
|
||||
mov r0, #AngelSWI_Reason_GetCmdLine
|
||||
adr r1, .LC30 /* Space for command line */
|
||||
swi AngelSWI
|
||||
ldr r1, .LC30
|
||||
#endif
|
||||
/* Parse string at r1 */
|
||||
mov r0, #0 /* count of arguments so far */
|
||||
.LC10:
|
||||
/* Skip leading blanks */
|
||||
#ifdef __thumb__
|
||||
ldrb r3, [r1]
|
||||
add r1, #1
|
||||
#else
|
||||
ldrb r3, [r1], #1
|
||||
#endif
|
||||
cmp r3, #0
|
||||
beq .LC12
|
||||
cmp r3, #' '
|
||||
beq .LC10
|
||||
|
||||
/* See whether we are scanning a string */
|
||||
cmp r3, #'"'
|
||||
#ifdef __thumb__
|
||||
beq .LC20
|
||||
cmp r3, #'\''
|
||||
bne .LC21
|
||||
.LC20:
|
||||
mov r2, r3
|
||||
b .LC22
|
||||
|
||||
.LC21:
|
||||
mov r2, #' ' /* terminator type */
|
||||
sub r1, r1, #1 /* adjust back to point at start char */
|
||||
.LC22:
|
||||
#else
|
||||
cmpne r3, #'\''
|
||||
moveq r2, r3
|
||||
movne r2, #' ' /* terminator type */
|
||||
subne r1, r1, #1 /* adjust back to point at start char */
|
||||
#endif
|
||||
|
||||
/* Stack a pointer to the current argument */
|
||||
#ifdef __thumb__
|
||||
push {r1}
|
||||
#else
|
||||
stmfd sp!, {r1}
|
||||
#endif
|
||||
add r0, r0, #1
|
||||
.LC11:
|
||||
#ifdef __thumb__
|
||||
ldrb r3, [r1]
|
||||
add r1, #1
|
||||
#else
|
||||
ldrb r3, [r1], #1
|
||||
#endif
|
||||
cmp r3, #0
|
||||
beq .LC12
|
||||
cmp r2, r3 /* reached terminator? */
|
||||
bne .LC11
|
||||
mov r2, #0
|
||||
sub r3, r1, #1
|
||||
strb r2, [r3] /* terminate the arg string */
|
||||
b .LC10
|
||||
|
||||
.LC12:
|
||||
mov r1, sp /* point at stacked arg pointers */
|
||||
/* We've now got the stacked args in order reverse the */
|
||||
#ifdef __thumb__
|
||||
mov r2, r0
|
||||
lsl r2, #2
|
||||
add r2, sp
|
||||
mov r3, sp
|
||||
.LC15: cmp r2, r3
|
||||
bls .LC14
|
||||
sub r2, #4
|
||||
ldr r4, [r2]
|
||||
ldr r5, [r3]
|
||||
str r5, [r2]
|
||||
str r4, [r3]
|
||||
add r3, #4
|
||||
b .LC15
|
||||
.LC14:
|
||||
#else
|
||||
add r2, sp, r0, LSL #2 /* End of args */
|
||||
mov r3, sp /* Start of args */
|
||||
.LC13: cmp r2, r3
|
||||
ldrhi r4,[r2, #-4] /* Reverse ends of list */
|
||||
ldrhi r5, [r3]
|
||||
strhi r5, [r2, #-4]!
|
||||
strhi r4, [r3], #4
|
||||
bhi .LC13
|
||||
#endif
|
||||
|
||||
#endif
|
||||
bl FUNCTION (main)
|
||||
|
||||
bl FUNCTION (exit) /* Should not return */
|
||||
|
||||
#ifdef __thumb__
|
||||
/* Come out of Thumb mode... This code should be redundant... */
|
||||
|
||||
mov a4, pc
|
||||
bx a4
|
||||
|
||||
.code 32
|
||||
.global change_back
|
||||
change_back:
|
||||
/* Halt the execution. This code should never be executed. */
|
||||
/*
|
||||
** With no debug monitor, this probably aborts (eventually).
|
||||
** With a Demon debug monitor, this halts cleanly.
|
||||
** With an Angel debug monitor, this will report 'Unknown SWI'.
|
||||
*/
|
||||
swi SWI_Exit
|
||||
#endif
|
||||
|
||||
/* For Thumb, constants must be after the code since only
|
||||
positive offsets are supported for PC relative addresses. */
|
||||
|
||||
.align 0
|
||||
.LC0:
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
.word HeapBase
|
||||
#else
|
||||
#ifndef ARM_RDP_MONITOR
|
||||
#ifdef __pe__
|
||||
.word 0x800000
|
||||
#else
|
||||
/* .word 0x80000 */ /* Top of RAM on the PIE board */
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
.LC1:
|
||||
.word __bss_start__
|
||||
.LC2:
|
||||
.word __bss_end__
|
||||
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
.LC30: .word CommandLine
|
||||
|
||||
/* Workspace for Angel calls. */
|
||||
.data
|
||||
/* Data returned by monitor SWI */
|
||||
HeapBase: .word 0
|
||||
HeapLimit: .word 0
|
||||
StackBase: .word 0
|
||||
StackLimit: .word 0
|
||||
CommandLine: .space 256,0 /* Maximum length of 255 chars handled */
|
||||
#endif
|
||||
|
||||
#ifdef __pe__
|
||||
.section .idata$3
|
||||
.long 0,0,0,0,0,0,0,0
|
||||
#endif
|
||||
|
40
newlib/libc/sys/arm/libcfunc.c
Normal file
40
newlib/libc/sys/arm/libcfunc.c
Normal file
@ -0,0 +1,40 @@
|
||||
/* Support files for GNU libc. Files in the C namespace go here.
|
||||
Files in the system namespace (ie those that start with an underscore)
|
||||
go in syscalls.c.
|
||||
|
||||
Note: These functions are in a seperate file so that OS providers can
|
||||
overrride the system call stubs (defined in syscalls.c) without having
|
||||
to provide libc funcitons as well. */
|
||||
#include "swi.h"
|
||||
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
|
||||
static inline int
|
||||
do_AngelSWI (int reason, void * arg)
|
||||
{
|
||||
int value;
|
||||
asm volatile ("mov r0, %1; mov r1, %2; swi %a3; mov %0, r0"
|
||||
: "=r" (value) /* Outputs */
|
||||
: "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
|
||||
: "r0", "r1", "lr"
|
||||
/* Clobbers r0 and r1, and lr if in supervisor mode */);
|
||||
return value;
|
||||
}
|
||||
#endif /* ARM_RDI_MONITOR */
|
||||
|
||||
|
||||
void
|
||||
abort (void)
|
||||
{
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
do_AngelSWI (AngelSWI_Reason_ReportException,
|
||||
(void *) ADP_Stopped_RunTimeError);
|
||||
#else
|
||||
asm ("mov r0,#17\nswi %a0" :: "i" (SWI_Exit));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
alarm (void)
|
||||
{
|
||||
}
|
102
newlib/libc/sys/arm/setjmp.S
Normal file
102
newlib/libc/sys/arm/setjmp.S
Normal file
@ -0,0 +1,102 @@
|
||||
/* This is a simple version of setjmp and longjmp.
|
||||
|
||||
Nick Clifton, Cygnus Solutions, 13 June 1997. */
|
||||
|
||||
/* ANSI concatenation macros. */
|
||||
#define CONCAT(a, b) CONCAT2(a, b)
|
||||
#define CONCAT2(a, b) a ## b
|
||||
|
||||
#ifdef __USER_LABEL_PREFIX__
|
||||
#define FUNCTION( name ) CONCAT (__USER_LABEL_PREFIX__, name)
|
||||
#else
|
||||
#error __USER_LABEL_PREFIX__ is not defined
|
||||
#endif
|
||||
|
||||
|
||||
.text
|
||||
.code 32
|
||||
.align 2
|
||||
|
||||
/* int setjmp (jmp_buf); */
|
||||
.globl FUNCTION(setjmp)
|
||||
FUNCTION(setjmp):
|
||||
|
||||
/* Save all the callee-preserved registers into the jump buffer. */
|
||||
stmea a1!, { v1-v7, fp, ip, sp, lr }
|
||||
|
||||
#if 0 /* Simulator does not cope with FP instructions yet.... */
|
||||
#ifndef __SOFTFP__
|
||||
/* Save the floating point registers */
|
||||
sfmea f4, 4, [a1]
|
||||
#endif
|
||||
#endif
|
||||
/* When setting up the jump buffer return 0. */
|
||||
mov a1, #0
|
||||
|
||||
/* Return to caller, see comment in longjmp below */
|
||||
#ifdef __APCS_26__
|
||||
movs pc, lr
|
||||
#else
|
||||
tst lr, #1
|
||||
moveq pc, lr
|
||||
.word 0xe12fff1e /* bx lr */
|
||||
#endif
|
||||
|
||||
|
||||
/* volatile void longjmp (jmp_buf, int); */
|
||||
.globl FUNCTION(longjmp)
|
||||
FUNCTION(longjmp):
|
||||
|
||||
/* If we have stack extension code it ought to be handled here. */
|
||||
|
||||
/* Restore the registers, retrieving the state when setjmp() was called. */
|
||||
ldmfd a1!, { v1-v7, fp, ip, sp, lr }
|
||||
|
||||
#if 0 /* Simulator does not cope with FP instructions yet.... */
|
||||
#ifndef __SOFTFP__
|
||||
/* Restore floating point registers as well */
|
||||
lfmfd f4, 4, [a1]
|
||||
#endif
|
||||
#endif
|
||||
/* Put the return value into the integer result register.
|
||||
But if it is zero then return 1 instead. */
|
||||
movs a1, a2
|
||||
moveq a1, #1
|
||||
|
||||
/* Arm/Thumb interworking support:
|
||||
|
||||
The interworking scheme expects functions to use a BX instruction
|
||||
to return control to their parent. Since we need this code to work
|
||||
in both interworked and non-interworked environments as well as with
|
||||
older processors which do not have the BX instruction we do the
|
||||
following:
|
||||
Test the return address.
|
||||
If the bottom bit is clear perform an "old style" function exit.
|
||||
(We know that we are in ARM mode and returning to an ARM mode caller).
|
||||
Otherwise use the BX instruction to perform the function exit.
|
||||
|
||||
We know that we will never attempt to perform the BX instruction on
|
||||
an older processor, because that kind of processor will never be
|
||||
interworked, and a return address with the bottom bit set will never
|
||||
be generated.
|
||||
|
||||
In addition, we do not actually assemble the BX instruction as this would
|
||||
require us to tell the assembler that the processor is an ARM7TDMI and
|
||||
it would store this information in the binary. We want this binary to be
|
||||
able to be linked with binaries compiled for older processors however, so
|
||||
we do not want such information stored there.
|
||||
|
||||
If we are running using the APCS-26 convention however, then we never
|
||||
test the bottom bit, because this is part of the processor status.
|
||||
Instead we just do a normal return, since we know that we cannot be
|
||||
returning to a Thumb caller - the Thumb doe snot support APCS-26
|
||||
*/
|
||||
|
||||
#ifdef __APCS_26__
|
||||
movs pc, lr
|
||||
#else
|
||||
tst lr, #1
|
||||
moveq pc, lr
|
||||
.word 0xe12fff1e /* bx lr */
|
||||
#endif
|
||||
|
65
newlib/libc/sys/arm/swi.h
Normal file
65
newlib/libc/sys/arm/swi.h
Normal file
@ -0,0 +1,65 @@
|
||||
|
||||
/***************************************************************************\
|
||||
* SWI numbers *
|
||||
\***************************************************************************/
|
||||
|
||||
/* SWI numbers for RDP (Demon) monitor */
|
||||
#define SWI_WriteC 0x0
|
||||
#define SWI_Write0 0x2
|
||||
#define SWI_ReadC 0x4
|
||||
#define SWI_CLI 0x5
|
||||
#define SWI_GetEnv 0x10
|
||||
#define SWI_Exit 0x11
|
||||
#define SWI_EnterOS 0x16
|
||||
|
||||
#define SWI_GetErrno 0x60
|
||||
#define SWI_Clock 0x61
|
||||
#define SWI_Time 0x63
|
||||
#define SWI_Remove 0x64
|
||||
#define SWI_Rename 0x65
|
||||
#define SWI_Open 0x66
|
||||
|
||||
#define SWI_Close 0x68
|
||||
#define SWI_Write 0x69
|
||||
#define SWI_Read 0x6a
|
||||
#define SWI_Seek 0x6b
|
||||
#define SWI_Flen 0x6c
|
||||
|
||||
#define SWI_IsTTY 0x6e
|
||||
#define SWI_TmpNam 0x6f
|
||||
#define SWI_InstallHandler 0x70
|
||||
#define SWI_GenerateError 0x71
|
||||
|
||||
|
||||
/* Now the SWI numbers and reason codes for RDI (Angel) monitors */
|
||||
#define AngelSWI_ARM (0x123456)
|
||||
#ifdef __thumb__
|
||||
#define AngelSWI (0xAB)
|
||||
#else
|
||||
#define AngelSWI AngelSWI_ARM
|
||||
#endif
|
||||
|
||||
/* The reason codes: */
|
||||
#define AngelSWI_Reason_Open (0x01)
|
||||
#define AngelSWI_Reason_Close (0x02)
|
||||
#define AngelSWI_Reason_WriteC (0x03)
|
||||
#define AngelSWI_Reason_Write0 (0x04)
|
||||
#define AngelSWI_Reason_Write (0x05)
|
||||
#define AngelSWI_Reason_Read (0x06)
|
||||
#define AngelSWI_Reason_ReadC (0x07)
|
||||
#define AngelSWI_Reason_IsTTY (0x09)
|
||||
#define AngelSWI_Reason_Seek (0x0A)
|
||||
#define AngelSWI_Reason_FLen (0x0C)
|
||||
#define AngelSWI_Reason_TmpNam (0x0D)
|
||||
#define AngelSWI_Reason_Remove (0x0E)
|
||||
#define AngelSWI_Reason_Rename (0x0F)
|
||||
#define AngelSWI_Reason_Clock (0x10)
|
||||
#define AngelSWI_Reason_Time (0x11)
|
||||
#define AngelSWI_Reason_System (0x12)
|
||||
#define AngelSWI_Reason_Errno (0x13)
|
||||
#define AngelSWI_Reason_GetCmdLine (0x15)
|
||||
#define AngelSWI_Reason_HeapInfo (0x16)
|
||||
#define AngelSWI_Reason_EnterSVC (0x17)
|
||||
#define AngelSWI_Reason_ReportException (0x18)
|
||||
#define ADP_Stopped_ApplicationExit ((2 << 16) + 38)
|
||||
#define ADP_Stopped_RunTimeError ((2 << 16) + 34)
|
10
newlib/libc/sys/arm/sys/param.h
Normal file
10
newlib/libc/sys/arm/sys/param.h
Normal file
@ -0,0 +1,10 @@
|
||||
/* ARM configuration file; HZ is 100 rather than the default 60 */
|
||||
|
||||
#ifndef _SYS_PARAM_H
|
||||
# define _SYS_PARAM_H
|
||||
|
||||
# define HZ (100)
|
||||
# define NOFILE (60)
|
||||
# define PATHSIZE (1024)
|
||||
|
||||
#endif
|
575
newlib/libc/sys/arm/syscalls.c
Normal file
575
newlib/libc/sys/arm/syscalls.c
Normal file
@ -0,0 +1,575 @@
|
||||
/* Support files for GNU libc. Files in the system namespace go here.
|
||||
Files in the C namespace (ie those that do not start with an
|
||||
underscore) go in .c. */
|
||||
|
||||
#include <_ansi.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/times.h>
|
||||
#include <errno.h>
|
||||
#include <reent.h>
|
||||
#include "swi.h"
|
||||
|
||||
/* Forward prototypes. */
|
||||
#ifndef _PARAMS
|
||||
#error UGG
|
||||
#endif
|
||||
int isatty _PARAMS ((int));
|
||||
clock_t _times _PARAMS ((struct tms *));
|
||||
int _gettimeofday _PARAMS ((struct timeval *, struct timezone *));
|
||||
void _raise _PARAMS ((void));
|
||||
int _unlink _PARAMS ((void));
|
||||
int _link _PARAMS ((void));
|
||||
int _fstat _PARAMS ((int, struct stat *));
|
||||
caddr_t _sbrk _PARAMS ((int));
|
||||
int _getpid _PARAMS ((int));
|
||||
int _kill _PARAMS ((int, int));
|
||||
void _exit _PARAMS ((int));
|
||||
int _close _PARAMS ((int));
|
||||
int _swiclose _PARAMS ((int));
|
||||
int _open _PARAMS ((const char *, int, ...));
|
||||
int _swiopen _PARAMS ((const char *, int));
|
||||
int _write _PARAMS ((int, char *, int));
|
||||
int _swiwrite _PARAMS ((int, char *, int));
|
||||
int _lseek _PARAMS ((int, int, int));
|
||||
int _swilseek _PARAMS ((int, int, int));
|
||||
int _read _PARAMS ((int, char *, int));
|
||||
int _swiread _PARAMS ((int, char *, int));
|
||||
void initialise_monitor_handles _PARAMS ((void));
|
||||
|
||||
static int wrap _PARAMS ((int));
|
||||
static int error _PARAMS ((int));
|
||||
static int get_errno _PARAMS ((void));
|
||||
static int remap_handle _PARAMS ((int));
|
||||
static int do_AngelSWI _PARAMS ((int, void *));
|
||||
static int findslot _PARAMS ((int));
|
||||
|
||||
/* Register name faking - works in collusion with the linker. */
|
||||
register char * stack_ptr asm ("sp");
|
||||
|
||||
|
||||
/* following is copied from libc/stdio/local.h to check std streams */
|
||||
extern void _EXFUN(__sinit,(struct _reent *));
|
||||
#define CHECK_INIT(fp) \
|
||||
do \
|
||||
{ \
|
||||
if ((fp)->_data == 0) \
|
||||
(fp)->_data = _REENT; \
|
||||
if (!(fp)->_data->__sdidinit) \
|
||||
__sinit ((fp)->_data); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Adjust our internal handles to stay away from std* handles */
|
||||
#define FILE_HANDLE_OFFSET (0x20)
|
||||
|
||||
static int std_files_checked;
|
||||
static int monitor_stdin;
|
||||
static int monitor_stdout;
|
||||
static int monitor_stderr;
|
||||
|
||||
/* Struct used to keep track of the file position, just so we
|
||||
can implement fseek(fh,x,SEEK_CUR). */
|
||||
typedef struct
|
||||
{
|
||||
int handle;
|
||||
int pos;
|
||||
}
|
||||
poslog;
|
||||
|
||||
#define MAX_OPEN_FILES 20
|
||||
static poslog openfiles [MAX_OPEN_FILES];
|
||||
|
||||
static int
|
||||
findslot (int fh)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < MAX_OPEN_FILES; i ++)
|
||||
if (openfiles[i].handle == fh)
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
|
||||
static inline int
|
||||
do_AngelSWI (int reason, void * arg)
|
||||
{
|
||||
int value;
|
||||
asm volatile ("mov r0, %1; mov r1, %2; swi %a3; mov %0, r0"
|
||||
: "=r" (value) /* Outputs */
|
||||
: "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
|
||||
: "r0", "r1", "lr"
|
||||
/* Clobbers r0 and r1, and lr if in supervisor mode */);
|
||||
return value;
|
||||
}
|
||||
#endif /* ARM_RDI_MONITOR */
|
||||
|
||||
/* Function to convert std(in|out|err) handles to internal versions */
|
||||
static int
|
||||
remap_handle (int fh)
|
||||
{
|
||||
if (!std_files_checked)
|
||||
{
|
||||
CHECK_INIT(stdin);
|
||||
CHECK_INIT(stdout);
|
||||
CHECK_INIT(stderr);
|
||||
std_files_checked = 1;
|
||||
}
|
||||
if (fh == __sfileno (stdin))
|
||||
return monitor_stdin;
|
||||
if (fh == __sfileno (stdout))
|
||||
return monitor_stdout;
|
||||
if (fh == __sfileno (stderr))
|
||||
return monitor_stderr;
|
||||
|
||||
return fh - FILE_HANDLE_OFFSET;
|
||||
}
|
||||
|
||||
void
|
||||
initialise_monitor_handles (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
int volatile block[3];
|
||||
|
||||
block[0] = (int) ":tt";
|
||||
block[2] = 3; /* length of filename */
|
||||
block[1] = 0; /* mode "r" */
|
||||
monitor_stdin = do_AngelSWI (AngelSWI_Reason_Open, (void *) block);
|
||||
|
||||
block[0] = (int) ":tt";
|
||||
block[2] = 3; /* length of filename */
|
||||
block[1] = 4; /* mode "w" */
|
||||
monitor_stdout = monitor_stderr = do_AngelSWI (AngelSWI_Reason_Open, (void *) block);
|
||||
#else
|
||||
int fh;
|
||||
const char * name;
|
||||
|
||||
name = ":tt";
|
||||
asm ("mov r0,%2; mov r1, #0; swi %a1; mov %0, r0"
|
||||
: "=r"(fh)
|
||||
: "i" (SWI_Open),"r"(name)
|
||||
: "r0","r1");
|
||||
monitor_stdin = fh;
|
||||
|
||||
name = ":tt";
|
||||
asm ("mov r0,%2; mov r1, #4; swi %a1; mov %0, r0"
|
||||
: "=r"(fh)
|
||||
: "i" (SWI_Open),"r"(name)
|
||||
: "r0","r1");
|
||||
monitor_stdout = monitor_stderr = fh;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < MAX_OPEN_FILES; i ++)
|
||||
openfiles[i].handle = -1;
|
||||
|
||||
openfiles[0].handle = monitor_stdin;
|
||||
openfiles[0].pos = 0;
|
||||
openfiles[1].handle = monitor_stdout;
|
||||
openfiles[1].pos = 0;
|
||||
}
|
||||
|
||||
static int
|
||||
get_errno (void)
|
||||
{
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
return do_AngelSWI (AngelSWI_Reason_Errno, NULL);
|
||||
#else
|
||||
asm ("swi %a0" :: "i" (SWI_GetErrno));
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
error (int result)
|
||||
{
|
||||
errno = get_errno ();
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
wrap (int result)
|
||||
{
|
||||
if (result == -1)
|
||||
return error (-1);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Returns # chars not! written */
|
||||
|
||||
int
|
||||
_swiread (int file,
|
||||
char * ptr,
|
||||
int len)
|
||||
{
|
||||
int fh = remap_handle (file);
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
int block[3];
|
||||
|
||||
block[0] = fh;
|
||||
block[1] = (int) ptr;
|
||||
block[2] = len;
|
||||
|
||||
return do_AngelSWI (AngelSWI_Reason_Read, block);
|
||||
#else
|
||||
asm ("mov r0, %1; mov r1, %2;mov r2, %3; swi %a0"
|
||||
: /* No outputs */
|
||||
: "i"(SWI_Read), "r"(fh), "r"(ptr), "r"(len)
|
||||
: "r0","r1","r2");
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
_read (int file,
|
||||
char * ptr,
|
||||
int len)
|
||||
{
|
||||
int slot = findslot (remap_handle (file));
|
||||
int x = _swiread (file, ptr, len);
|
||||
|
||||
if (x < 0)
|
||||
return error (-1);
|
||||
|
||||
if (slot != MAX_OPEN_FILES)
|
||||
openfiles [slot].pos += len - x;
|
||||
|
||||
/* x == len is not an error, at least if we want feof() to work */
|
||||
return len - x;
|
||||
}
|
||||
|
||||
int
|
||||
_swilseek (int file,
|
||||
int ptr,
|
||||
int dir)
|
||||
{
|
||||
int res;
|
||||
int fh = remap_handle (file);
|
||||
int slot = findslot (fh);
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
int block[2];
|
||||
#endif
|
||||
|
||||
if (dir == SEEK_CUR)
|
||||
{
|
||||
if (slot == MAX_OPEN_FILES)
|
||||
return -1;
|
||||
ptr = openfiles[slot].pos + ptr;
|
||||
dir = SEEK_SET;
|
||||
}
|
||||
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
if (dir == SEEK_END)
|
||||
{
|
||||
block[0] = fh;
|
||||
ptr += do_AngelSWI (AngelSWI_Reason_FLen, block);
|
||||
}
|
||||
|
||||
/* This code only does absolute seeks */
|
||||
block[0] = remap_handle (file);
|
||||
block[1] = ptr;
|
||||
res = do_AngelSWI (AngelSWI_Reason_Seek, block);
|
||||
#else
|
||||
if (dir == SEEK_END)
|
||||
{
|
||||
asm ("mov r0, %2; swi %a1; mov %0, r0"
|
||||
: "=r" (res)
|
||||
: "i" (SWI_Flen), "r" (fh)
|
||||
: "r0");
|
||||
ptr += res;
|
||||
}
|
||||
|
||||
/* This code only does absolute seeks */
|
||||
asm ("mov r0, %2; mov r1, %3; swi %a1; mov %0, r0"
|
||||
: "=r" (res)
|
||||
: "i" (SWI_Seek), "r" (fh), "r" (ptr)
|
||||
: "r0", "r1");
|
||||
#endif
|
||||
|
||||
if (slot != MAX_OPEN_FILES && res == 0)
|
||||
openfiles[slot].pos = ptr;
|
||||
|
||||
/* This is expected to return the position in the file */
|
||||
return res == 0 ? ptr : -1;
|
||||
}
|
||||
|
||||
int
|
||||
_lseek (int file,
|
||||
int ptr,
|
||||
int dir)
|
||||
{
|
||||
return wrap (_swilseek (file, ptr, dir));
|
||||
}
|
||||
|
||||
/* Returns #chars not! written */
|
||||
int
|
||||
_swiwrite (
|
||||
int file,
|
||||
char * ptr,
|
||||
int len)
|
||||
{
|
||||
int fh = remap_handle (file);
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
int block[3];
|
||||
|
||||
block[0] = fh;
|
||||
block[1] = (int) ptr;
|
||||
block[2] = len;
|
||||
|
||||
return do_AngelSWI (AngelSWI_Reason_Write, block);
|
||||
#else
|
||||
asm ("mov r0, %1; mov r1, %2;mov r2, %3; swi %a0"
|
||||
: /* No outputs */
|
||||
: "i"(SWI_Write), "r"(fh), "r"(ptr), "r"(len)
|
||||
: "r0","r1","r2");
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
_write (int file,
|
||||
char * ptr,
|
||||
int len)
|
||||
{
|
||||
int slot = findslot (remap_handle (file));
|
||||
int x = _swiwrite (file, ptr,len);
|
||||
|
||||
if (x == -1 || x == len)
|
||||
return error (-1);
|
||||
|
||||
if (slot != MAX_OPEN_FILES)
|
||||
openfiles[slot].pos += len - x;
|
||||
|
||||
return len - x;
|
||||
}
|
||||
|
||||
int
|
||||
_swiopen (const char * path,
|
||||
int flags)
|
||||
{
|
||||
int aflags = 0, fh;
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
int block[3];
|
||||
#endif
|
||||
|
||||
int i = findslot (-1);
|
||||
|
||||
if (i == MAX_OPEN_FILES)
|
||||
return -1;
|
||||
|
||||
/* The flags are Unix-style, so we need to convert them */
|
||||
#ifdef O_BINARY
|
||||
if (flags & O_BINARY)
|
||||
aflags |= 1;
|
||||
#endif
|
||||
|
||||
if (flags & O_RDWR)
|
||||
aflags |= 2;
|
||||
|
||||
if (flags & O_CREAT)
|
||||
aflags |= 4;
|
||||
|
||||
if (flags & O_TRUNC)
|
||||
aflags |= 4;
|
||||
|
||||
if (flags & O_APPEND)
|
||||
{
|
||||
aflags &= ~4; /* Can't ask for w AND a; means just 'a' */
|
||||
aflags |= 8;
|
||||
}
|
||||
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
block[0] = (int) path;
|
||||
block[2] = strlen (path);
|
||||
block[1] = aflags;
|
||||
|
||||
fh = do_AngelSWI (AngelSWI_Reason_Open, block);
|
||||
|
||||
#else
|
||||
asm ("mov r0,%2; mov r1, %3; swi %a1; mov %0, r0"
|
||||
: "=r"(fh)
|
||||
: "i" (SWI_Open),"r"(path),"r"(aflags)
|
||||
: "r0","r1");
|
||||
#endif
|
||||
|
||||
if (fh >= 0)
|
||||
{
|
||||
openfiles[i].handle = fh;
|
||||
openfiles[i].pos = 0;
|
||||
}
|
||||
|
||||
return fh >= 0 ? fh + FILE_HANDLE_OFFSET : error (fh);
|
||||
}
|
||||
|
||||
int
|
||||
_open (const char * path,
|
||||
int flags,
|
||||
...)
|
||||
{
|
||||
return wrap (_swiopen (path, flags));
|
||||
}
|
||||
|
||||
int
|
||||
_swiclose (int file)
|
||||
{
|
||||
int myhan = remap_handle (file);
|
||||
int slot = findslot (myhan);
|
||||
|
||||
if (slot != MAX_OPEN_FILES)
|
||||
openfiles[slot].handle = -1;
|
||||
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
return do_AngelSWI (AngelSWI_Reason_Close, & myhan);
|
||||
#else
|
||||
asm ("mov r0, %1; swi %a0" :: "i" (SWI_Close),"r"(myhan):"r0");
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
_close (int file)
|
||||
{
|
||||
return wrap (_swiclose (file));
|
||||
}
|
||||
|
||||
void
|
||||
_exit (int n)
|
||||
{
|
||||
/* FIXME: return code is thrown away. */
|
||||
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
do_AngelSWI (AngelSWI_Reason_ReportException,
|
||||
(void *) ADP_Stopped_ApplicationExit);
|
||||
#else
|
||||
asm ("swi %a0" :: "i" (SWI_Exit));
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
_kill (int n, int m)
|
||||
{
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
return do_AngelSWI (AngelSWI_Reason_ReportException,
|
||||
(void *) ADP_Stopped_ApplicationExit);
|
||||
#else
|
||||
asm ("swi %a0" :: "i" (SWI_Exit));
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
_getpid (int n)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
caddr_t
|
||||
_sbrk (int incr)
|
||||
{
|
||||
extern char end asm ("end"); /* Defined by the linker */
|
||||
static char * heap_end;
|
||||
char * prev_heap_end;
|
||||
|
||||
if (heap_end == NULL)
|
||||
heap_end = & end;
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
|
||||
if (heap_end + incr > stack_ptr)
|
||||
{
|
||||
_write (1, "_sbrk: Heap and stack collision\n", 32);
|
||||
abort ();
|
||||
}
|
||||
|
||||
heap_end += incr;
|
||||
|
||||
return (caddr_t) prev_heap_end;
|
||||
}
|
||||
|
||||
int
|
||||
_fstat (int file, struct stat * st)
|
||||
{
|
||||
memset (st, 0, sizeof (* st));
|
||||
st->st_mode = S_IFCHR;
|
||||
st->st_blksize = 1024;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_link (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
_unlink (void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
void
|
||||
_raise (void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
_gettimeofday (struct timeval * tp, struct timezone * tzp)
|
||||
{
|
||||
|
||||
if (tp)
|
||||
{
|
||||
/* Ask the host for the seconds since the Unix epoch */
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
tp->tv_sec = do_AngelSWI (AngelSWI_Reason_Time,NULL);
|
||||
#else
|
||||
{
|
||||
int value;
|
||||
asm ("swi %a1; mov %0, r0" : "=r" (value): "i" (SWI_Time) : "r0");
|
||||
tp->tv_sec = value;
|
||||
}
|
||||
#endif
|
||||
tp->tv_usec = 0;
|
||||
}
|
||||
|
||||
/* Return fixed data for the timezone */
|
||||
if (tzp)
|
||||
{
|
||||
tzp->tz_minuteswest = 0;
|
||||
tzp->tz_dsttime = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return a clock that ticks at 100Hz. */
|
||||
clock_t
|
||||
_times (struct tms * tp)
|
||||
{
|
||||
clock_t timeval;
|
||||
|
||||
#ifdef ARM_RDI_MONITOR
|
||||
timeval = do_AngelSWI (AngelSWI_Reason_Clock,NULL);
|
||||
#else
|
||||
asm ("swi %a1; mov %0, r0" : "=r" (timeval): "i" (SWI_Clock) : "r0");
|
||||
#endif
|
||||
|
||||
if (tp)
|
||||
{
|
||||
tp->tms_utime = timeval; /* user time */
|
||||
tp->tms_stime = 0; /* system time */
|
||||
tp->tms_cutime = 0; /* user time, children */
|
||||
tp->tms_cstime = 0; /* system time, children */
|
||||
}
|
||||
|
||||
return timeval;
|
||||
};
|
||||
|
||||
|
||||
int
|
||||
isatty (int fd)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
93
newlib/libc/sys/arm/trap.S
Normal file
93
newlib/libc/sys/arm/trap.S
Normal file
@ -0,0 +1,93 @@
|
||||
/* Run-time exception support */
|
||||
#include "swi.h"
|
||||
|
||||
/* .text is used instead of .section .text so it works with arm-aout too. */
|
||||
.text
|
||||
.align 0
|
||||
.global __rt_stkovf_split_big
|
||||
.global __rt_stkovf_split_small
|
||||
|
||||
/* The following functions are provided for software stack checking.
|
||||
If hardware stack-checking is being used then the code can be
|
||||
compiled without the PCS entry checks, and simply rely on VM
|
||||
management to extend the stack for a thread.
|
||||
|
||||
The stack extension event occurs when the PCS function entry code
|
||||
would result in a stack-pointer beneath the stack-limit register
|
||||
value. The system relies on the following map:
|
||||
|
||||
+-----------------------------------+ <-- end of stack block
|
||||
| ... |
|
||||
| ... |
|
||||
| active stack |
|
||||
| ... | <-- sp (stack-pointer) somewhere in here
|
||||
| ... |
|
||||
+-----------------------------------+ <-- sl (stack-limit)
|
||||
| stack-extension handler workspace |
|
||||
+-----------------------------------+ <-- base of stack block
|
||||
|
||||
The "stack-extension handler workspace" is an amount of memory in
|
||||
which the stack overflow support code must execute. It must be
|
||||
large enough to deal with the worst case path through the extension
|
||||
code. At the moment the compiler expects this to be AT LEAST
|
||||
256bytes. It uses this fact to code functions with small local
|
||||
data usage within the overflow space.
|
||||
|
||||
In a true target environment We may need to increase the space
|
||||
between sl and the true limit to allow for the stack extension
|
||||
code, SWI handlers and for undefined instruction handlers of the
|
||||
target environment. */
|
||||
|
||||
__rt_stkovf_split_small:
|
||||
mov ip,sp @ Ensure we can calculate the stack required
|
||||
@ and fall through to...
|
||||
__rt_stkovf_split_big:
|
||||
@ in: sp = current stack-pointer (beneath stack-limit)
|
||||
@ sl = current stack-limit
|
||||
@ ip = low stack point we require for the current function
|
||||
@ lr = return address into the current function
|
||||
@ fp = frame-pointer
|
||||
@ original sp --> +----------------------------------+
|
||||
@ | pc (12 ahead of PCS entry store) |
|
||||
@ current fp ---> +----------------------------------+
|
||||
@ | lr (on entry) pc (on exit) |
|
||||
@ +----------------------------------+
|
||||
@ | sp ("original sp" on entry) |
|
||||
@ +----------------------------------+
|
||||
@ | fp (on entry to function) |
|
||||
@ +----------------------------------+
|
||||
@ | |
|
||||
@ | ..argument and work registers.. |
|
||||
@ | |
|
||||
@ current sp ---> +----------------------------------+
|
||||
@
|
||||
@ The "current sl" is somewhere between "original sp" and "current sp"
|
||||
@ but above "true sl". The "current sl" should be at least 256bytes
|
||||
@ above the "true sl". The 256byte stack guard should be large enough
|
||||
@ to deal with the worst case function entry stacking (160bytes) plus
|
||||
@ the stack overflow handler stacking requirements, plus the stack
|
||||
@ required for the memory allocation routines.
|
||||
@
|
||||
@ Normal PCS entry (before stack overflow check) can stack 16
|
||||
@ standard registers (64bytes) and 8 floating point registers
|
||||
@ (96bytes). This gives a minimum stack guard of 160bytes (excluding
|
||||
@ the stack required for the code). (Actually only a maximum of
|
||||
@ 14standard registers are ever stacked on entry to a function).
|
||||
@
|
||||
@ NOTE: Structure returns are performed by the caller allocating a
|
||||
@ dummy space on the stack and passing in a "phantom" arg1 into
|
||||
@ the function. This means that we do not need to worry about
|
||||
@ preserving the stack under "sp" even on function return.
|
||||
@
|
||||
@ Code should never poke values beneath sp. The sp register
|
||||
@ should always be "dropped" first to cover the data. This
|
||||
@ protects the data against any events that may try and use
|
||||
@ the stack.
|
||||
|
||||
SUB ip, sp, ip @ extra stack required for function
|
||||
@ Add stack extension code here. If desired a new stack chunk
|
||||
@ can be allocated, and the register state updated suitably.
|
||||
|
||||
@ We now know how much extra stack the function requires.
|
||||
@ Terminate the program for the moment:
|
||||
swi SWI_Exit
|
1809
newlib/libc/sys/configure
vendored
Executable file
1809
newlib/libc/sys/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
24
newlib/libc/sys/configure.in
Normal file
24
newlib/libc/sys/configure.in
Normal file
@ -0,0 +1,24 @@
|
||||
dnl This is the newlib/libc/sys configure.in file.
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.5)
|
||||
AC_INIT(a29khif)
|
||||
|
||||
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
|
||||
AC_CONFIG_AUX_DIR(../../..)
|
||||
|
||||
NEWLIB_CONFIGURE(../..)
|
||||
|
||||
if test -n "${sys_dir}"; then
|
||||
AC_CONFIG_SUBDIRS(${sys_dir})
|
||||
fi
|
||||
|
||||
CRT0=
|
||||
if test -n "${sys_dir}"; then
|
||||
CRT0=crt0.o
|
||||
fi
|
||||
AC_SUBST(CRT0)
|
||||
|
||||
AM_CONDITIONAL(HAVE_SYS_DIR, test x${sys_dir} != x)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
19
newlib/libc/sys/cygwin/Makefile.am
Normal file
19
newlib/libc/sys/cygwin/Makefile.am
Normal file
@ -0,0 +1,19 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES =
|
||||
|
||||
# This is a hack to force automake to include a definition for
|
||||
# COMPILE.
|
||||
EXTRA_LIBRARIES = libfoo.a
|
||||
libfoo_a_SOURCES = crt0.c
|
||||
|
||||
all: crt0.o
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
311
newlib/libc/sys/cygwin/Makefile.in
Normal file
311
newlib/libc/sys/cygwin/Makefile.in
Normal file
@ -0,0 +1,311 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
EXEEXT = @EXEEXT@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
machine_dir = @machine_dir@
|
||||
newlib_basedir = @newlib_basedir@
|
||||
sys_dir = @sys_dir@
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES =
|
||||
|
||||
# This is a hack to force automake to include a definition for
|
||||
# COMPILE.
|
||||
EXTRA_LIBRARIES = libfoo.a
|
||||
libfoo_a_SOURCES = crt0.c
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
libfoo_a_LIBADD =
|
||||
libfoo_a_OBJECTS = crt0.o
|
||||
lib_a_LIBADD =
|
||||
lib_a_OBJECTS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
SOURCES = $(libfoo_a_SOURCES) $(lib_a_SOURCES)
|
||||
OBJECTS = $(libfoo_a_OBJECTS) $(lib_a_OBJECTS)
|
||||
|
||||
all: Makefile $(LIBRARIES)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINT@ configure.in ../../../acinclude.m4 \
|
||||
../../../aclocal.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-noinstLIBRARIES:
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
libfoo.a: $(libfoo_a_OBJECTS) $(libfoo_a_DEPENDENCIES)
|
||||
-rm -f libfoo.a
|
||||
$(AR) cru libfoo.a $(libfoo_a_OBJECTS) $(libfoo_a_LIBADD)
|
||||
$(RANLIB) libfoo.a
|
||||
|
||||
lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
|
||||
-rm -f lib.a
|
||||
$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
|
||||
$(RANLIB) lib.a
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
info:
|
||||
dvi:
|
||||
check:
|
||||
$(MAKE) $(AM_MAKEFLAGS)
|
||||
installcheck:
|
||||
install-info:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
|
||||
mostlyclean
|
||||
|
||||
distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
|
||||
distclean-generic clean
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-noinstLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
|
||||
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info dvi installcheck \
|
||||
install-info install-exec install-data install uninstall all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
all: crt0.o
|
||||
|
||||
# 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:
|
282
newlib/libc/sys/cygwin/aclocal.m4
vendored
Normal file
282
newlib/libc/sys/cygwin/aclocal.m4
vendored
Normal file
@ -0,0 +1,282 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
dnl This provides configure definitions used by all the newlib
|
||||
dnl configure.in files.
|
||||
|
||||
dnl Basic newlib configury. This calls basic introductory stuff,
|
||||
dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
|
||||
dnl configure.host. The only argument is the relative path to the top
|
||||
dnl newlib directory.
|
||||
|
||||
AC_DEFUN(NEWLIB_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "${enableval}" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
||||
esac], [multilib=yes])dnl
|
||||
|
||||
dnl Support --enable-target-optspace
|
||||
AC_ARG_ENABLE(target-optspace,
|
||||
[ --enable-target-optspace optimize for space],
|
||||
[case "${enableval}" in
|
||||
yes) target_optspace=yes ;;
|
||||
no) target_optspace=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
|
||||
esac], [target_optspace=])dnl
|
||||
|
||||
dnl Support --enable-newlib-mb
|
||||
AC_ARG_ENABLE(newlib-mb,
|
||||
[ --enable-newlib-mb enable multibyte support],
|
||||
[case "${enableval}" in
|
||||
yes) newlib_mb=yes ;;
|
||||
no) newlib_mb=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
|
||||
esac], [newlib_mb=no])dnl
|
||||
|
||||
dnl We may get other options which we don't document:
|
||||
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
|
||||
test -z "[$]{with_target_subdir}" && with_target_subdir=.
|
||||
|
||||
if test "[$]{srcdir}" = "."; then
|
||||
if test "[$]{with_target_subdir}" != "."; then
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
|
||||
fi
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/$1"
|
||||
fi
|
||||
AC_SUBST(newlib_basedir)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(newlib, 1.8.1)
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(LIB_AC_PROG_CC,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
dnl Check whether -g works, even if CFLAGS is set, in case the package
|
||||
dnl plays around with CFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
AC_PROG_CC_G
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
|
||||
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
||||
# run it explicitly here, it will be run implicitly before
|
||||
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
|
||||
# be run before AC_CANONICAL_HOST.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
|
||||
# at least currently, we never actually build a program, so we never
|
||||
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
|
||||
# fails, because we are probably configuring with a cross compiler
|
||||
# which can't create executables. So we include AC_EXEEXT to keep
|
||||
# automake happy, but we don't execute it, since we don't care about
|
||||
# the result.
|
||||
if false; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
. [$]{newlib_basedir}/configure.host
|
||||
|
||||
case [$]{newlib_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
|
||||
*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/cygwin/include -I[$]{newlib_flagbasedir}/../winsup/w32api/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -fno-builtin"
|
||||
|
||||
NEWLIB_CFLAGS=${newlib_cflags}
|
||||
AC_SUBST(NEWLIB_CFLAGS)
|
||||
|
||||
AC_SUBST(machine_dir)
|
||||
AC_SUBST(sys_dir)
|
||||
])
|
||||
|
||||
# Do all the work for Automake. 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
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
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# 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 conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $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" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
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
|
||||
]
|
||||
)
|
||||
|
||||
# Define a conditional.
|
||||
|
||||
AC_DEFUN(AM_CONDITIONAL,
|
||||
[AC_SUBST($1_TRUE)
|
||||
AC_SUBST($1_FALSE)
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi])
|
||||
|
1687
newlib/libc/sys/cygwin/configure
vendored
Executable file
1687
newlib/libc/sys/cygwin/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
12
newlib/libc/sys/cygwin/configure.in
Normal file
12
newlib/libc/sys/cygwin/configure.in
Normal file
@ -0,0 +1,12 @@
|
||||
dnl This is the newlib/libc/sys/cygwin32 configure.in file.
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.5)
|
||||
AC_INIT(crt0.c)
|
||||
|
||||
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
|
||||
AC_CONFIG_AUX_DIR(../../../..)
|
||||
|
||||
NEWLIB_CONFIGURE(../../..)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
49
newlib/libc/sys/cygwin/crt0.c
Normal file
49
newlib/libc/sys/cygwin/crt0.c
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
#ifdef __PPC__
|
||||
/* For the PowerPC, we want to make this function have its structured
|
||||
exception table exception function point to something we control. */
|
||||
|
||||
extern void __cygwin_exception_handler();
|
||||
extern void mainCRTStartup(void) __attribute__((__exception__(__cygwin_exception_handler)));
|
||||
#endif
|
||||
|
||||
/* In the following ifdef'd i386 code, the FPU precision is set to 80 bits
|
||||
and all FPU exceptions are masked. The former is needed to make long
|
||||
doubles work correctly. The latter causes the FPU to generate NaNs and
|
||||
Infinities instead of signals for certain operations.
|
||||
*/
|
||||
|
||||
#ifdef __i386__
|
||||
#define FPU_RESERVED 0xF0C0
|
||||
#define FPU_DEFAULT 0x033f
|
||||
|
||||
/* For debugging on *#!$@ windbg. bp for breakpoint. */
|
||||
int __cygwin_crt0_bp = 0;
|
||||
#endif
|
||||
|
||||
extern int main (int argc, char **argv);
|
||||
|
||||
void
|
||||
mainCRTStartup ()
|
||||
{
|
||||
#ifdef __i386__
|
||||
if (__cygwin_crt0_bp)
|
||||
asm volatile ("int3");
|
||||
|
||||
{
|
||||
volatile unsigned short cw;
|
||||
|
||||
/* Get Control Word */
|
||||
__asm__ volatile ("fnstcw %0" : "=m" (cw) : );
|
||||
|
||||
/* mask in */
|
||||
cw &= FPU_RESERVED;
|
||||
cw |= FPU_DEFAULT;
|
||||
|
||||
/* set cw */
|
||||
__asm__ volatile ("fldcw %0" :: "m" (cw));
|
||||
}
|
||||
#endif
|
||||
|
||||
cygwin_crt0 (main);
|
||||
}
|
58
newlib/libc/sys/cygwin/sys/dirent.h
Normal file
58
newlib/libc/sys/cygwin/sys/dirent.h
Normal file
@ -0,0 +1,58 @@
|
||||
/* Posix dirent.h for WIN32. */
|
||||
|
||||
/* Including this file should not require any Windows headers. */
|
||||
|
||||
#ifndef _SYS_DIRENT_H
|
||||
#define _SYS_DIRENT_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
struct dirent
|
||||
{
|
||||
long __d_reserved[4];
|
||||
ino_t d_ino; /* Just for compatibility, it's junk */
|
||||
char d_name[256]; /* FIXME: use NAME_MAX? */
|
||||
};
|
||||
|
||||
#define __DIRENT_COOKIE 0xdede4242
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* This is first to set alignment in non _COMPILING_NEWLIB case. */
|
||||
unsigned long __d_cookie;
|
||||
struct dirent *__d_dirent;
|
||||
char *__d_dirname; /* directory name with trailing '*' */
|
||||
off_t __d_position; /* used by telldir/seekdir */
|
||||
unsigned long __d_dirhash; /* hash of directory name for use by
|
||||
readdir */
|
||||
union
|
||||
{
|
||||
#ifdef _COMPILING_NEWLIB
|
||||
struct
|
||||
{
|
||||
HANDLE __handle;
|
||||
char __open_p;
|
||||
} __d_data;
|
||||
#endif
|
||||
char __d_filler[16];
|
||||
} __d_u;
|
||||
} DIR;
|
||||
|
||||
DIR *opendir (const char *);
|
||||
struct dirent *readdir (DIR *);
|
||||
void rewinddir (DIR *);
|
||||
int closedir (DIR *);
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
off_t telldir (DIR *);
|
||||
void seekdir (DIR *, off_t loc);
|
||||
|
||||
int scandir (const char *__dir,
|
||||
struct dirent ***__namelist,
|
||||
int (*select) (const struct dirent *),
|
||||
int (*compar) (const struct dirent **, const struct dirent **));
|
||||
|
||||
int alphasort (const struct dirent **__a, const struct dirent **__b);
|
||||
#endif /* _POSIX_SOURCE */
|
||||
|
||||
#endif
|
43
newlib/libc/sys/cygwin/sys/param.h
Normal file
43
newlib/libc/sys/cygwin/sys/param.h
Normal file
@ -0,0 +1,43 @@
|
||||
#ifndef _SYS_PARAM_H
|
||||
#define _SYS_PARAM_H
|
||||
|
||||
#include <sys/types.h>
|
||||
/* Linux includes limits.h, but this is not universally done. */
|
||||
#include <limits.h>
|
||||
|
||||
/* Max number of open files. The Posix version is OPEN_MAX. */
|
||||
/* Number of fds is virtually unlimited in cygwin, but we must provide
|
||||
some reasonable value for Posix conformance */
|
||||
#define NOFILE 8192
|
||||
|
||||
/* Max number of groups; must keep in sync with NGROUPS_MAX in limits.h */
|
||||
#define NGROUPS 16
|
||||
|
||||
/* Ticks/second for system calls such as times() */
|
||||
/* FIXME: is this the appropriate value? */
|
||||
#define HZ 1000
|
||||
|
||||
/* Max hostname size that can be dealt with */
|
||||
/* FIXME: is this the appropriate value? */
|
||||
#define MAXHOSTNAMELEN 64
|
||||
|
||||
/* This is defined to be the same as MAX_PATH which is used internally.
|
||||
The Posix version is PATH_MAX. */
|
||||
#define MAXPATHLEN (260 - 1 /*NUL*/)
|
||||
|
||||
/* Some autoconf'd packages check for endianness. When cross-building we
|
||||
can't run programs on the target. Fortunately, autoconf supports the
|
||||
definition of byte order in sys/param.h (that's us!).
|
||||
The values here are the same as used in gdb/defs.h (are the more
|
||||
appropriate values?). */
|
||||
#define BIG_ENDIAN 4321
|
||||
#define LITTLE_ENDIAN 1234
|
||||
|
||||
/* All known win32 systems are little endian. */
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0L
|
||||
#endif
|
||||
|
||||
#endif
|
22
newlib/libc/sys/cygwin/sys/utime.h
Normal file
22
newlib/libc/sys/cygwin/sys/utime.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef _SYS_UTIME_H
|
||||
#define _SYS_UTIME_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <_ansi.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
struct utimbuf
|
||||
{
|
||||
time_t actime;
|
||||
time_t modtime;
|
||||
};
|
||||
|
||||
int _EXFUN(utime, (const char *__path, struct utimbuf *__buf));
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_UTIME_H */
|
49
newlib/libc/sys/cygwin/sys/utmp.h
Normal file
49
newlib/libc/sys/cygwin/sys/utmp.h
Normal file
@ -0,0 +1,49 @@
|
||||
#ifndef UTMP_H
|
||||
#define UTMP_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <paths.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UT_LINESIZE 16
|
||||
#define UT_NAMESIZE 16
|
||||
#define UT_HOSTSIZE 256
|
||||
#define ut_name ut_user
|
||||
|
||||
struct utmp
|
||||
{
|
||||
short ut_type;
|
||||
pid_t ut_pid;
|
||||
char ut_line[UT_LINESIZE];
|
||||
char ut_id[2];
|
||||
time_t ut_time;
|
||||
char ut_user[UT_NAMESIZE];
|
||||
char ut_host[UT_HOSTSIZE];
|
||||
long ut_addr;
|
||||
};
|
||||
|
||||
#define INIT_PROCESS 5
|
||||
#define LOGIN_PROCESS 6
|
||||
#define USER_PROCESS 7
|
||||
#define DEAD_PROCESS 8
|
||||
|
||||
extern struct utmp *_getutline (struct utmp *);
|
||||
extern struct utmp *getutent (void);
|
||||
extern struct utmp *getutid (struct utmp *);
|
||||
extern struct utmp *getutline (struct utmp *);
|
||||
extern void endutent (void);
|
||||
extern void pututline (struct utmp *);
|
||||
extern void setutent (void);
|
||||
extern void utmpname (const char *);
|
||||
|
||||
void login (struct utmp *);
|
||||
int logout (char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* UTMP_H */
|
14
newlib/libc/sys/d10v/Makefile.am
Normal file
14
newlib/libc/sys/d10v/Makefile.am
Normal file
@ -0,0 +1,14 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES = syscalls.c trap.S creat.c
|
||||
|
||||
all: crt0.o
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
320
newlib/libc/sys/d10v/Makefile.in
Normal file
320
newlib/libc/sys/d10v/Makefile.in
Normal file
@ -0,0 +1,320 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 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.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
EXEEXT = @EXEEXT@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
machine_dir = @machine_dir@
|
||||
newlib_basedir = @newlib_basedir@
|
||||
sys_dir = @sys_dir@
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES = syscalls.c trap.S creat.c
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
lib_a_LIBADD =
|
||||
lib_a_OBJECTS = syscalls.o trap.o creat.o
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(lib_a_SOURCES)
|
||||
OBJECTS = $(lib_a_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
|
||||
../../../acinclude.m4 ../../../aclocal.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-noinstLIBRARIES:
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
|
||||
-rm -f lib.a
|
||||
$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
|
||||
$(RANLIB) lib.a
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am:
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-info-am:
|
||||
install-info: install-info-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am:
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-noinstLIBRARIES distclean-compile \
|
||||
distclean-tags distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
|
||||
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
|
||||
check-am installcheck-am installcheck install-info-am install-info \
|
||||
install-exec-am install-exec install-data-am install-data install-am \
|
||||
install uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
all: crt0.o
|
||||
|
||||
# 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:
|
282
newlib/libc/sys/d10v/aclocal.m4
vendored
Normal file
282
newlib/libc/sys/d10v/aclocal.m4
vendored
Normal file
@ -0,0 +1,282 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
dnl This provides configure definitions used by all the newlib
|
||||
dnl configure.in files.
|
||||
|
||||
dnl Basic newlib configury. This calls basic introductory stuff,
|
||||
dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
|
||||
dnl configure.host. The only argument is the relative path to the top
|
||||
dnl newlib directory.
|
||||
|
||||
AC_DEFUN(NEWLIB_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "${enableval}" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
||||
esac], [multilib=yes])dnl
|
||||
|
||||
dnl Support --enable-target-optspace
|
||||
AC_ARG_ENABLE(target-optspace,
|
||||
[ --enable-target-optspace optimize for space],
|
||||
[case "${enableval}" in
|
||||
yes) target_optspace=yes ;;
|
||||
no) target_optspace=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
|
||||
esac], [target_optspace=])dnl
|
||||
|
||||
dnl Support --enable-newlib-mb
|
||||
AC_ARG_ENABLE(newlib-mb,
|
||||
[ --enable-newlib-mb enable multibyte support],
|
||||
[case "${enableval}" in
|
||||
yes) newlib_mb=yes ;;
|
||||
no) newlib_mb=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
|
||||
esac], [newlib_mb=no])dnl
|
||||
|
||||
dnl We may get other options which we don't document:
|
||||
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
|
||||
test -z "[$]{with_target_subdir}" && with_target_subdir=.
|
||||
|
||||
if test "[$]{srcdir}" = "."; then
|
||||
if test "[$]{with_target_subdir}" != "."; then
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
|
||||
fi
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/$1"
|
||||
fi
|
||||
AC_SUBST(newlib_basedir)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(newlib, 1.8.1)
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(LIB_AC_PROG_CC,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
dnl Check whether -g works, even if CFLAGS is set, in case the package
|
||||
dnl plays around with CFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
AC_PROG_CC_G
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
|
||||
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
||||
# run it explicitly here, it will be run implicitly before
|
||||
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
|
||||
# be run before AC_CANONICAL_HOST.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
|
||||
# at least currently, we never actually build a program, so we never
|
||||
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
|
||||
# fails, because we are probably configuring with a cross compiler
|
||||
# which can't create executables. So we include AC_EXEEXT to keep
|
||||
# automake happy, but we don't execute it, since we don't care about
|
||||
# the result.
|
||||
if false; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
. [$]{newlib_basedir}/configure.host
|
||||
|
||||
case [$]{newlib_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
|
||||
*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/cygwin/include -I[$]{newlib_flagbasedir}/../winsup/w32api/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -fno-builtin"
|
||||
|
||||
NEWLIB_CFLAGS=${newlib_cflags}
|
||||
AC_SUBST(NEWLIB_CFLAGS)
|
||||
|
||||
AC_SUBST(machine_dir)
|
||||
AC_SUBST(sys_dir)
|
||||
])
|
||||
|
||||
# Do all the work for Automake. 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
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
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# 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 conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $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" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
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
|
||||
]
|
||||
)
|
||||
|
||||
# Define a conditional.
|
||||
|
||||
AC_DEFUN(AM_CONDITIONAL,
|
||||
[AC_SUBST($1_TRUE)
|
||||
AC_SUBST($1_FALSE)
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi])
|
||||
|
1687
newlib/libc/sys/d10v/configure
vendored
Executable file
1687
newlib/libc/sys/d10v/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
12
newlib/libc/sys/d10v/configure.in
Normal file
12
newlib/libc/sys/d10v/configure.in
Normal file
@ -0,0 +1,12 @@
|
||||
dnl This is the newlib/libc/sys/d10v configure.in file.
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.5)
|
||||
AC_INIT(creat.c)
|
||||
|
||||
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
|
||||
AC_CONFIG_AUX_DIR(../../../..)
|
||||
|
||||
NEWLIB_CONFIGURE(../../..)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
7
newlib/libc/sys/d10v/creat.c
Normal file
7
newlib/libc/sys/d10v/creat.c
Normal file
@ -0,0 +1,7 @@
|
||||
int
|
||||
creat(path, mode)
|
||||
const char *path;
|
||||
int mode;
|
||||
{
|
||||
return _creat (path, mode);
|
||||
}
|
63
newlib/libc/sys/d10v/crt0.S
Normal file
63
newlib/libc/sys/d10v/crt0.S
Normal file
@ -0,0 +1,63 @@
|
||||
.text
|
||||
.global _start
|
||||
.type _start,@function
|
||||
.stabs "crt0.S",100,0,0,_start
|
||||
.stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
|
||||
.stabs "_start:F(0,1)",36,0,1,_start
|
||||
|
||||
_start:
|
||||
|
||||
; R14 always contains memory base address (0)
|
||||
|
||||
ldi r14,0
|
||||
|
||||
; Set the USER and SYSTEM stack pointers.
|
||||
|
||||
ldi r0, 0 ; zero arguments
|
||||
ldi r1, 0
|
||||
mvtc r0, psw ; select SPI and set it
|
||||
ldi sp, _stack
|
||||
ldi r10, 0x8000 ; select SPU/FP and set it
|
||||
mvtc r10, psw || ldi r11, 0; clear stack frame
|
||||
ldi sp, _stack - 0x200
|
||||
ldi r13, 0
|
||||
|
||||
; Clear the BSS. Do it in two parts for efficiency: longwords first
|
||||
; for most of it, then the remaining 0 to 3 bytes.
|
||||
|
||||
ldi r2, __bss_start ; R2 = start of BSS
|
||||
ldi r3, _end ; R3 = end of BSS + 1
|
||||
sub r3, r2 ; R3 = BSS size in bytes
|
||||
mv r4, r3
|
||||
srli r4, 2 ; R4 = BSS size in longwords (rounded down)
|
||||
loop1:
|
||||
cmpeqi r4, 0 ; more longords to zero out?
|
||||
brf0t.s endloop1 ; nope
|
||||
st2w r0, @r2+ ; yep, zero out another longword
|
||||
subi r4, 1 ; decrement count
|
||||
bra.l loop1 ; go do some more
|
||||
|
||||
endloop1:
|
||||
and3 r4, r3, 3 ; get no. of remaining BSS bytes to clear
|
||||
loop2:
|
||||
cmpeqi r4, 0 ; more bytes to zero out?
|
||||
brf0t.s endloop2 ; nope
|
||||
stb r0, @r2 ; yep, zero out another byte
|
||||
addi r2, 1 ; bump address
|
||||
subi r4, 1 ; decrement count
|
||||
bra.s loop2 ; go do some more
|
||||
endloop2:
|
||||
; Call main, then stop simulator
|
||||
st r11, @-sp
|
||||
st r13, @-sp
|
||||
mv r11, sp
|
||||
|
||||
bl main
|
||||
bl exit
|
||||
stop
|
||||
.Lstart:
|
||||
.size _start,.Lstart-_start
|
||||
.stabs "",36,0,0,.Lstart-_start
|
||||
|
||||
.section .stack
|
||||
_stack: .long 1
|
38
newlib/libc/sys/d10v/sys/syscall.h
Normal file
38
newlib/libc/sys/d10v/sys/syscall.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* syscall.h - definitions of system calls for D10V.
|
||||
*
|
||||
* This file must contain only pre-processor directives, and no C code,
|
||||
* because it's included by assembly language sources as well as C.
|
||||
*/
|
||||
|
||||
#define SYS_exit 1
|
||||
#define SYS_fork 2
|
||||
|
||||
#define SYS_read 3
|
||||
#define SYS_write 4
|
||||
#define SYS_open 5
|
||||
#define SYS_close 6
|
||||
#define SYS_wait4 7
|
||||
#define SYS_creat 8
|
||||
#define SYS_link 9
|
||||
#define SYS_unlink 10
|
||||
#define SYS_execv 11
|
||||
#define SYS_chdir 12
|
||||
#define SYS_mknod 14
|
||||
#define SYS_chmod 15
|
||||
#define SYS_chown 16
|
||||
#define SYS_lseek 19
|
||||
#define SYS_getpid 20
|
||||
#define SYS_isatty 21
|
||||
#define SYS_fstat 22
|
||||
#define SYS_time 23
|
||||
|
||||
|
||||
#define SYS_ARG 24
|
||||
#define SYS_stat 38
|
||||
|
||||
#define SYS_pipe 42
|
||||
#define SYS_execve 59
|
||||
#define SYS_kill 60
|
||||
|
||||
#define SYS_utime 201 /* not really a system call */
|
||||
#define SYS_wait 202 /* nor is this */
|
216
newlib/libc/sys/d10v/syscalls.c
Normal file
216
newlib/libc/sys/d10v/syscalls.c
Normal file
@ -0,0 +1,216 @@
|
||||
/* syscalls.c - non-trap system calls for D10V
|
||||
*
|
||||
* This file contains system calls that cannot be implemented with
|
||||
* a simple "trap 15" instruction. The ones that can are in trap.S.
|
||||
*/
|
||||
|
||||
#include <_ansi.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#undef errno
|
||||
|
||||
void _exit (int n); /* in trap.S */
|
||||
|
||||
extern int _write (int fd, const void *ptr, size_t len);
|
||||
|
||||
int errno;
|
||||
|
||||
register char *stack_ptr asm ("sp");
|
||||
|
||||
caddr_t
|
||||
_sbrk (int incr)
|
||||
{
|
||||
extern char end; /* Defined by the linker */
|
||||
static char *heap_end;
|
||||
char *prev_heap_end;
|
||||
char *sp = (char *)stack_ptr;
|
||||
|
||||
if (heap_end == 0)
|
||||
{
|
||||
heap_end = (char *)((((unsigned short) &end) + 7) & ~7);
|
||||
}
|
||||
prev_heap_end = heap_end;
|
||||
if (heap_end + incr > sp)
|
||||
{
|
||||
_write (2, "Heap and stack collision\n", sizeof ("Heap and stack collision\n")-1);
|
||||
abort ();
|
||||
}
|
||||
heap_end += incr;
|
||||
if ((unsigned short)heap_end > 0xbfff
|
||||
|| (heap_end < prev_heap_end && incr > 0)
|
||||
|| (heap_end < (char *)((((unsigned short) &end) + 7) & ~7)))
|
||||
{
|
||||
_write (2, "Too much memory was allocated\n", sizeof ("Too much memory was allocated\n")-1);
|
||||
abort ();
|
||||
}
|
||||
|
||||
return (caddr_t) prev_heap_end;
|
||||
}
|
||||
|
||||
int
|
||||
_fstat (int file,
|
||||
struct stat *st)
|
||||
{
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_unlink ()
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
isatty (int fd)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
_raise ()
|
||||
{
|
||||
}
|
||||
|
||||
/* If this library is compiled with -mint32, provide conversion functions for
|
||||
the system call traps. */
|
||||
|
||||
#if __INT__==32
|
||||
extern short _read16 (short fd, void *ptr, short len);
|
||||
int
|
||||
_read (int fd, void *ptr, size_t len)
|
||||
{
|
||||
return _read16 ((short)fd, ptr, (short)len);
|
||||
}
|
||||
|
||||
extern short _write16 (short fd, const void *ptr, short len);
|
||||
int
|
||||
_write (int fd, const void *ptr, size_t len)
|
||||
{
|
||||
return _write16 ((short)fd, ptr, (short)len);
|
||||
}
|
||||
|
||||
extern short _lseek16 (short fd, long offset, short whence);
|
||||
int
|
||||
_lseek (int fd, off_t offset, int whence)
|
||||
{
|
||||
return _lseek16 ((short)fd, offset, (short)whence);
|
||||
}
|
||||
|
||||
extern short _close16 (short fd);
|
||||
int
|
||||
_close (int fd)
|
||||
{
|
||||
return _close16 ((short)fd);
|
||||
}
|
||||
|
||||
extern short _open16 (const char *name, short flags, short mode);
|
||||
int
|
||||
_open (const char *name, int flags, mode_t mode)
|
||||
{
|
||||
return _open16 (name, (short)flags, (short)mode);
|
||||
}
|
||||
|
||||
extern short _creat16 (const char *name, mode_t mode);
|
||||
int
|
||||
_creat (const char *name, mode_t mode)
|
||||
{
|
||||
return _creat16 (name, mode);
|
||||
}
|
||||
|
||||
extern void _exit16 (short status);
|
||||
void
|
||||
_exit (int status)
|
||||
{
|
||||
_exit16 ((short)status);
|
||||
}
|
||||
|
||||
extern short _stat16 (const char *name, struct stat *stat_pkt);
|
||||
int
|
||||
_stat (const char *name, struct stat *stat_pkt)
|
||||
{
|
||||
return _stat16 (name, stat_pkt);
|
||||
}
|
||||
|
||||
extern short _chmod16 (const char *name, short mode);
|
||||
int
|
||||
_chmod (const char *name, mode_t mode)
|
||||
{
|
||||
return _chmod16 (name, (short)mode);
|
||||
}
|
||||
|
||||
extern short _chown16 (const char *name, short uid, short gid);
|
||||
int
|
||||
_chown (const char *name, uid_t uid, gid_t gid)
|
||||
{
|
||||
return _chown16 (name, (short)uid, (short)gid);
|
||||
}
|
||||
|
||||
extern short _fork16 (void);
|
||||
int
|
||||
_fork (void)
|
||||
{
|
||||
return _fork16 ();
|
||||
}
|
||||
|
||||
extern short _wait16 (short *status);
|
||||
int
|
||||
_wait (int *status)
|
||||
{
|
||||
if (status)
|
||||
{
|
||||
short status16;
|
||||
short ret = _wait16 (&status16);
|
||||
if (ret >= 0)
|
||||
*status = status16;
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
return _wait16 ((short *)0);
|
||||
}
|
||||
|
||||
extern short _execve16 (const char *filename, const char *argv [], const char *envp[]);
|
||||
int
|
||||
_execve (const char *filename, const char *argv [], const char *envp[])
|
||||
{
|
||||
return _execve16 (filename, argv, envp);
|
||||
}
|
||||
|
||||
extern short _execv16 (const char *filename, const char *argv []);
|
||||
int
|
||||
_execv (const char *filename, const char *argv [])
|
||||
{
|
||||
return _execv16 (filename, argv);
|
||||
}
|
||||
|
||||
extern short _pipe16 (short fds[]);
|
||||
int
|
||||
_pipe (int fds[])
|
||||
{
|
||||
short fds16[2];
|
||||
short ret = _pipe16 (fds16);
|
||||
if (ret >= 0)
|
||||
{
|
||||
fds[0] = fds16[0];
|
||||
fds[1] = fds16[1];
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern short _getpid16 (void);
|
||||
int
|
||||
_getpid (void)
|
||||
{
|
||||
return _getpid16 ();
|
||||
}
|
||||
|
||||
extern short _kill16 (short pid, short sig);
|
||||
int
|
||||
_kill (int pid, int sig)
|
||||
{
|
||||
return _kill16 ((short)pid, (short)sig);
|
||||
}
|
||||
#endif
|
296
newlib/libc/sys/d10v/trap.S
Normal file
296
newlib/libc/sys/d10v/trap.S
Normal file
@ -0,0 +1,296 @@
|
||||
#include "sys/syscall.h"
|
||||
|
||||
#define SYSCALL(name) \
|
||||
.global name ; \
|
||||
name: ; \
|
||||
ldi r4, SYS ## name ; \
|
||||
bra __trap0
|
||||
|
||||
.text
|
||||
.stabs "trap.S",100,0,0,__trap0
|
||||
.stabs "int:t(0,1)=r(0,1);-65536;65535;",128,0,0,0
|
||||
.stabs "long int:t(0,2)=r(0,1);0020000000000;0017777777777;",128,0,0,0
|
||||
.stabs "_trap0:F(0,1)",36,0,1,__trap0
|
||||
.stabs "arg1:P(0,1)",64,0,1,0
|
||||
.stabs "arg2:P(0,1)",64,0,1,1
|
||||
.stabs "arg3:P(0,1)",64,0,1,2
|
||||
.stabs "arg4:P(0,1)",64,0,1,3
|
||||
.stabs "number:P(0,1)",64,0,1,4
|
||||
.global __trap0
|
||||
.type __trap0,@function
|
||||
__trap0:
|
||||
trap 15 /* trap 15 returns result in r0, error code in r4 */
|
||||
cmpeqi r4,0 /* is error code zero? */
|
||||
brf0t ret /* yes, skip setting errno */
|
||||
#if __INT__==32
|
||||
st r4,@(errno+2,r14) /* no, set errno */
|
||||
srai r4,15 /* sign extend high word */
|
||||
st r4,@(errno,r14)
|
||||
#else
|
||||
st r4,@(errno,r14) /* no, set errno */
|
||||
#endif
|
||||
|
||||
ret:
|
||||
jmp r13 /* return to caller */
|
||||
.Ltrap0:
|
||||
.size __trap0,.Ltrap0-__trap0
|
||||
.stabs "",36,0,0,.Ltrap0-__trap0
|
||||
|
||||
#define CONCAT(a,b) a ## b
|
||||
#define STRING(a) #a
|
||||
#define XSTRING(a) STRING(a)
|
||||
#define XSTRING2(a,b) XSTRING(CONCAT(a,b))
|
||||
|
||||
#if __INT__==32
|
||||
#define _read _read16
|
||||
#define _lseek _lseek16
|
||||
#define _write _write16
|
||||
#define _close _close16
|
||||
#define _open _open16
|
||||
#define _creat _creat16
|
||||
#define _exit _exit16
|
||||
#define _stat _stat16
|
||||
#define _chmod _chmod16
|
||||
#define _chown _chown16
|
||||
#define _fork _fork16
|
||||
#define _wait _wait16
|
||||
#define _execve _execve16
|
||||
#define _execv _execv16
|
||||
#define _pipe _pipe16
|
||||
#define _kill _kill16
|
||||
#define _getpid _getpid16
|
||||
#endif
|
||||
|
||||
/* Until the assembler allows semicolon as a statement separator, */
|
||||
/* we cannot use the SYSCALL macro. So expand it manually for now. */
|
||||
|
||||
/* #SYSCALL(_read) */
|
||||
/* #SYSCALL(_lseek) */
|
||||
/* #SYSCALL(_write) */
|
||||
/* #SYSCALL(_close) */
|
||||
/* #SYSCALL(_open) */
|
||||
/* #SYSCALL(_creat) */
|
||||
/* #SYSCALL(_exit) */
|
||||
/* #SYSCALL(_stat) */
|
||||
/* #SYSCALL(_chmod) */
|
||||
/* #SYSCALL(_chown) */
|
||||
/* #SYSCALL(_fork) */
|
||||
/* #SYSCALL(_wait) */
|
||||
/* #SYSCALL(_execve) */
|
||||
/* #SYSCALL(_execv) */
|
||||
/* #SYSCALL(_pipe) */
|
||||
/* #SYSCALL(_getpid) */
|
||||
/* #SYSCALL(_kill) */
|
||||
|
||||
.global _read
|
||||
.type _read,@function
|
||||
.stabs XSTRING2(_read,:F(0,1)),36,0,2,_read
|
||||
.stabs "fd:P(0,1)",64,0,1,0
|
||||
.stabs "ptr:P(0,1)",64,0,1,1
|
||||
.stabs "len:P(0,1)",64,0,1,2
|
||||
_read:
|
||||
ldi r4, SYS_read
|
||||
bra __trap0
|
||||
.Lread:
|
||||
.size _read,.-_read
|
||||
.stabs "",36,0,0,.Lread-_read
|
||||
|
||||
.global _lseek
|
||||
.type _lseek,@function
|
||||
.stabs XSTRING2(_lseek,:F(0,1)),36,0,3,_lseek
|
||||
.stabs "fd:P(0,1)",64,0,1,0
|
||||
.stabs "offset:P(0,1)",64,0,1,2
|
||||
.stabs "whence:p(0,1)",160,0,1,0
|
||||
_lseek:
|
||||
ldi r4, SYS_lseek
|
||||
bra __trap0
|
||||
.Llseek:
|
||||
.size _lseek,.Llseek-_lseek
|
||||
.stabs "",36,0,0,.Llseek-_lseek
|
||||
|
||||
.global _write
|
||||
.type _write,@function
|
||||
.stabs XSTRING2(_write,:F(0,1)),36,0,4,_write
|
||||
.stabs "fd:P(0,1)",64,0,1,0
|
||||
.stabs "ptr:P(0,1)",64,0,1,1
|
||||
.stabs "len:P(0,1)",64,0,1,2
|
||||
_write:
|
||||
ldi r4, SYS_write
|
||||
bra __trap0
|
||||
.Lwrite:
|
||||
.size _write,.Lwrite-_write
|
||||
.stabs "",36,0,0,.Lwrite-_write
|
||||
|
||||
.global _close
|
||||
.type _close,@function
|
||||
.stabs XSTRING2(_close,:F(0,1)),36,0,5,_close
|
||||
.stabs "fd:P(0,1)",64,0,1,0
|
||||
_close:
|
||||
ldi r4, SYS_close
|
||||
bra __trap0
|
||||
.Lclose:
|
||||
.size _close,.Lclose-_close
|
||||
.stabs "",36,0,0,.Lclose-_close
|
||||
|
||||
.global _open
|
||||
.type _open,@function
|
||||
.stabs XSTRING2(_open,:F(0,1)),36,0,6,_open
|
||||
.stabs "name:P(0,1)",64,0,1,0
|
||||
.stabs "flags:P(0,1)",64,0,1,1
|
||||
.stabs "mode:P(0,1)",64,0,1,2
|
||||
_open:
|
||||
ldi r4, SYS_open
|
||||
bra __trap0
|
||||
.Lopen:
|
||||
.size _open,.Lopen-_open
|
||||
.stabs "",36,0,0,.Lopen-_open
|
||||
|
||||
.global _creat
|
||||
.type _creat,@function
|
||||
.stabs XSTRING2(_creat,:F(0,1)),36,0,7,_creat
|
||||
.stabs "name:P(0,1)",64,0,1,0
|
||||
.stabs "mode:P(0,1)",64,0,1,1
|
||||
_creat:
|
||||
ldi r4, SYS_creat
|
||||
bra __trap0
|
||||
.Lcreat:
|
||||
.size _creat,.Lcreat-_creat
|
||||
.stabs "",36,0,0,.Lcreat-_creat
|
||||
|
||||
.global _exit
|
||||
.type _exit,@function
|
||||
.stabs XSTRING2(_exit,:F(0,1)),36,0,8,_exit
|
||||
.stabs "status:P(0,1)",64,0,1,0
|
||||
_exit:
|
||||
ldi r4, SYS_exit
|
||||
bra __trap0
|
||||
.Lexit:
|
||||
.size _exit,.Lexit-_exit
|
||||
.stabs "",36,0,0,.Lexit-_exit
|
||||
|
||||
.global _stat
|
||||
.type _stat,@function
|
||||
.stabs XSTRING2(_stat,:F(0,1)),36,0,9,_stat
|
||||
.stabs "name:P(0,1)",64,0,1,0
|
||||
.stabs "packet:P(0,1)",64,0,1,1
|
||||
_stat:
|
||||
ldi r4, SYS_stat
|
||||
bra __trap0
|
||||
.Lstat:
|
||||
.size _stat,.Lstat-_stat
|
||||
.stabs "",36,0,0,.Lstat-_stat
|
||||
|
||||
.global _chmod
|
||||
.type _chmod,@function
|
||||
.stabs XSTRING2(_chmod,:F(0,1)),36,0,10,_chmod
|
||||
.stabs "name:P(0,1)",64,0,1,0
|
||||
.stabs "mode:P(0,1)",64,0,1,1
|
||||
_chmod:
|
||||
ldi r4, SYS_chmod
|
||||
bra __trap0
|
||||
.Lchmod:
|
||||
.size _chmod,.Lchmod-_chmod
|
||||
.stabs "",36,0,0,.Lchmod-_chmod
|
||||
|
||||
.global _chown
|
||||
.type _chown,@function
|
||||
.stabs XSTRING2(_chown,:F(0,1)),36,0,11,_chown
|
||||
.stabs "name:P(0,1)",64,0,1,0
|
||||
.stabs "uid:P(0,1)",64,0,1,1
|
||||
.stabs "gid:P(0,1)",64,0,1,2
|
||||
_chown:
|
||||
ldi r4, SYS_chown
|
||||
bra __trap0
|
||||
.Lchown:
|
||||
.size _chown,.Lchown-_chown
|
||||
.stabs "",36,0,0,.Lchown-_chown
|
||||
|
||||
.global _fork
|
||||
.type _fork,@function
|
||||
.stabs XSTRING2(_fork,:F(0,1)),36,0,12,_fork
|
||||
_fork:
|
||||
ldi r4, SYS_fork
|
||||
bra __trap0
|
||||
.Lfork:
|
||||
.size _fork,.Lfork-_fork
|
||||
.stabs "",36,0,0,.Lfork-_fork
|
||||
|
||||
.global _wait
|
||||
.type _wait,@function
|
||||
.stabs "status:P(0,1)",64,0,1,0
|
||||
.stabs XSTRING2(_wait,:F(0,1)),36,0,13,_wait
|
||||
_wait:
|
||||
ldi r4, SYS_wait
|
||||
bra __trap0
|
||||
.Lwait:
|
||||
.size _wait,.Lwait-_wait
|
||||
.stabs "",36,0,0,.Lwait-_wait
|
||||
|
||||
.global _execve
|
||||
.type _execve,@function
|
||||
.stabs "name:P(0,1)",64,0,1,0
|
||||
.stabs "argv:P(0,1)",64,0,1,1
|
||||
.stabs "envp:P(0,1)",64,0,1,2
|
||||
.stabs XSTRING2(_execve,:F(0,1)),36,0,14,_execve
|
||||
_execve:
|
||||
ldi r4, SYS_execve
|
||||
bra __trap0
|
||||
.Lexecve:
|
||||
.size _execve,.Lexecve-_execve
|
||||
.stabs "",36,0,0,.Lexecve-_execve
|
||||
|
||||
.global _execv
|
||||
.type _execv,@function
|
||||
.stabs XSTRING2(_execv,:F(0,1)),36,0,15,_execv
|
||||
.stabs "name:P(0,1)",64,0,1,0
|
||||
.stabs "argv:P(0,1)",64,0,1,1
|
||||
_execv:
|
||||
ldi r4, SYS_execv
|
||||
bra __trap0
|
||||
.Lexecv:
|
||||
.size _execv,.Lexecv-_execv
|
||||
.stabs "",36,0,0,.Lexecv-_execv
|
||||
|
||||
.global _pipe
|
||||
.type _pipe,@function
|
||||
.stabs XSTRING2(_pipe,:F(0,1)),36,0,16,_pipe
|
||||
.stabs "fds:P(0,1)",64,0,1,0
|
||||
_pipe:
|
||||
ldi r4, SYS_pipe
|
||||
bra __trap0
|
||||
.Lpipe:
|
||||
.size _pipe,.Lpipe-_pipe
|
||||
.stabs "",36,0,0,.Lpipe-_pipe
|
||||
|
||||
.global time
|
||||
.type time,@function
|
||||
.stabs XSTRING2(time,:F(0,1)),36,0,17,time
|
||||
.stabs "ptr:P(0,1)",64,0,1,0
|
||||
time:
|
||||
ldi r4, SYS_time
|
||||
bra __trap0
|
||||
.Ltime:
|
||||
.size time,.Ltime-time
|
||||
.stabs "",36,0,0,.Ltime-time
|
||||
|
||||
.global _kill
|
||||
.type _kill,@function
|
||||
.stabs XSTRING2(_kill,:F(0,1)),36,0,18,_kill
|
||||
.stabs "pid:P(0,1)",64,0,1,0
|
||||
.stabs "sig:P(0,1)",64,0,1,1
|
||||
_kill:
|
||||
ldi r4, SYS_kill
|
||||
bra __trap0
|
||||
.Lkill:
|
||||
.size _kill,.Lkill-_kill
|
||||
.stabs "",36,0,0,.Lkill-_kill
|
||||
|
||||
.global _getpid
|
||||
.type _getpid,@function
|
||||
.stabs XSTRING2(_getpid,:F(0,1)),36,0,19,_getpid
|
||||
_getpid:
|
||||
ldi r4, SYS_getpid
|
||||
bra __trap0
|
||||
.Lgetpid:
|
||||
.size _getpid,.Lgetpid-_getpid
|
||||
.stabs "",36,0,0,.Lgetpid-_getpid
|
45
newlib/libc/sys/decstation/Makefile.am
Normal file
45
newlib/libc/sys/decstation/Makefile.am
Normal file
@ -0,0 +1,45 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
COPYOFILES = \
|
||||
read.o \
|
||||
open.o \
|
||||
_exit.o \
|
||||
write.o \
|
||||
lseek.o \
|
||||
close.o \
|
||||
sbrk.o \
|
||||
cerror.o \
|
||||
fork.o \
|
||||
isatty.o \
|
||||
ioctl.o \
|
||||
getpid.o \
|
||||
time.o \
|
||||
kill.o \
|
||||
wait.o \
|
||||
execve.o \
|
||||
gettimeofday.o \
|
||||
link.o \
|
||||
unlink.o \
|
||||
fstat.o \
|
||||
times.o \
|
||||
getrusage.o
|
||||
|
||||
lib_a_SOURCES = _main.c
|
||||
lib_a_LIBADD = $(COPYOFILES)
|
||||
|
||||
$(COPYOFILES):
|
||||
ar x /lib/libc.a $(COPYOFILES)
|
||||
|
||||
all: crt0.o
|
||||
|
||||
crt0.o:
|
||||
cp /lib/crt0.o crt0.o
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
332
newlib/libc/sys/decstation/Makefile.in
Normal file
332
newlib/libc/sys/decstation/Makefile.in
Normal file
@ -0,0 +1,332 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
EXEEXT = @EXEEXT@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
machine_dir = @machine_dir@
|
||||
newlib_basedir = @newlib_basedir@
|
||||
sys_dir = @sys_dir@
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
COPYOFILES = \
|
||||
read.o \
|
||||
open.o \
|
||||
_exit.o \
|
||||
write.o \
|
||||
lseek.o \
|
||||
close.o \
|
||||
sbrk.o \
|
||||
cerror.o \
|
||||
fork.o \
|
||||
isatty.o \
|
||||
ioctl.o \
|
||||
getpid.o \
|
||||
time.o \
|
||||
kill.o \
|
||||
wait.o \
|
||||
execve.o \
|
||||
gettimeofday.o \
|
||||
link.o \
|
||||
unlink.o \
|
||||
fstat.o \
|
||||
times.o \
|
||||
getrusage.o
|
||||
|
||||
lib_a_SOURCES = _main.c
|
||||
lib_a_LIBADD = $(COPYOFILES)
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
lib_a_DEPENDENCIES = read.o open.o _exit.o write.o lseek.o close.o \
|
||||
sbrk.o cerror.o fork.o isatty.o ioctl.o getpid.o time.o kill.o wait.o \
|
||||
execve.o gettimeofday.o link.o unlink.o fstat.o times.o getrusage.o
|
||||
lib_a_OBJECTS = _main.o
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
SOURCES = $(lib_a_SOURCES)
|
||||
OBJECTS = $(lib_a_OBJECTS)
|
||||
|
||||
all: Makefile $(LIBRARIES)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINT@ configure.in ../../../acinclude.m4 \
|
||||
../../../aclocal.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-noinstLIBRARIES:
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
|
||||
-rm -f lib.a
|
||||
$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
|
||||
$(RANLIB) lib.a
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
info:
|
||||
dvi:
|
||||
check:
|
||||
$(MAKE) $(AM_MAKEFLAGS)
|
||||
installcheck:
|
||||
install-info:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
|
||||
mostlyclean
|
||||
|
||||
distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
|
||||
distclean-generic clean
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-noinstLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
|
||||
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info dvi installcheck \
|
||||
install-info install-exec install-data install uninstall all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
$(COPYOFILES):
|
||||
ar x /lib/libc.a $(COPYOFILES)
|
||||
|
||||
all: crt0.o
|
||||
|
||||
crt0.o:
|
||||
cp /lib/crt0.o crt0.o
|
||||
|
||||
# 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:
|
6
newlib/libc/sys/decstation/_main.c
Normal file
6
newlib/libc/sys/decstation/_main.c
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
__main()
|
||||
{
|
||||
|
||||
|
||||
}
|
282
newlib/libc/sys/decstation/aclocal.m4
vendored
Normal file
282
newlib/libc/sys/decstation/aclocal.m4
vendored
Normal file
@ -0,0 +1,282 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
dnl This provides configure definitions used by all the newlib
|
||||
dnl configure.in files.
|
||||
|
||||
dnl Basic newlib configury. This calls basic introductory stuff,
|
||||
dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
|
||||
dnl configure.host. The only argument is the relative path to the top
|
||||
dnl newlib directory.
|
||||
|
||||
AC_DEFUN(NEWLIB_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "${enableval}" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
||||
esac], [multilib=yes])dnl
|
||||
|
||||
dnl Support --enable-target-optspace
|
||||
AC_ARG_ENABLE(target-optspace,
|
||||
[ --enable-target-optspace optimize for space],
|
||||
[case "${enableval}" in
|
||||
yes) target_optspace=yes ;;
|
||||
no) target_optspace=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
|
||||
esac], [target_optspace=])dnl
|
||||
|
||||
dnl Support --enable-newlib-mb
|
||||
AC_ARG_ENABLE(newlib-mb,
|
||||
[ --enable-newlib-mb enable multibyte support],
|
||||
[case "${enableval}" in
|
||||
yes) newlib_mb=yes ;;
|
||||
no) newlib_mb=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
|
||||
esac], [newlib_mb=no])dnl
|
||||
|
||||
dnl We may get other options which we don't document:
|
||||
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
|
||||
test -z "[$]{with_target_subdir}" && with_target_subdir=.
|
||||
|
||||
if test "[$]{srcdir}" = "."; then
|
||||
if test "[$]{with_target_subdir}" != "."; then
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
|
||||
fi
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/$1"
|
||||
fi
|
||||
AC_SUBST(newlib_basedir)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(newlib, 1.8.1)
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(LIB_AC_PROG_CC,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
dnl Check whether -g works, even if CFLAGS is set, in case the package
|
||||
dnl plays around with CFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
AC_PROG_CC_G
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
|
||||
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
||||
# run it explicitly here, it will be run implicitly before
|
||||
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
|
||||
# be run before AC_CANONICAL_HOST.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
|
||||
# at least currently, we never actually build a program, so we never
|
||||
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
|
||||
# fails, because we are probably configuring with a cross compiler
|
||||
# which can't create executables. So we include AC_EXEEXT to keep
|
||||
# automake happy, but we don't execute it, since we don't care about
|
||||
# the result.
|
||||
if false; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
. [$]{newlib_basedir}/configure.host
|
||||
|
||||
case [$]{newlib_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
|
||||
*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/cygwin/include -I[$]{newlib_flagbasedir}/../winsup/w32api/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -fno-builtin"
|
||||
|
||||
NEWLIB_CFLAGS=${newlib_cflags}
|
||||
AC_SUBST(NEWLIB_CFLAGS)
|
||||
|
||||
AC_SUBST(machine_dir)
|
||||
AC_SUBST(sys_dir)
|
||||
])
|
||||
|
||||
# Do all the work for Automake. 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
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
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# 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 conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $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" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
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
|
||||
]
|
||||
)
|
||||
|
||||
# Define a conditional.
|
||||
|
||||
AC_DEFUN(AM_CONDITIONAL,
|
||||
[AC_SUBST($1_TRUE)
|
||||
AC_SUBST($1_FALSE)
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi])
|
||||
|
1687
newlib/libc/sys/decstation/configure
vendored
Executable file
1687
newlib/libc/sys/decstation/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
12
newlib/libc/sys/decstation/configure.in
Normal file
12
newlib/libc/sys/decstation/configure.in
Normal file
@ -0,0 +1,12 @@
|
||||
dnl This is the newlib/libc/sys/decstation configure.in file.
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.5)
|
||||
AC_INIT(_main.c)
|
||||
|
||||
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
|
||||
AC_CONFIG_AUX_DIR(../../../..)
|
||||
|
||||
NEWLIB_CONFIGURE(../../..)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
46
newlib/libc/sys/decstation/sys/dirent.h
Normal file
46
newlib/libc/sys/decstation/sys/dirent.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* FIXME: From sys/sysvi386/sys */
|
||||
#ifndef _SYS_DIRENT_H
|
||||
# define _SYS_DIRENT_H
|
||||
|
||||
/*
|
||||
* This file was written to be compatible with the BSD directory
|
||||
* routines, so it looks like it. But it was written from scratch.
|
||||
* Sean Eric Fagan, sef@Kithrup.COM
|
||||
*
|
||||
* Modified by dje@cygnus.com for sun.
|
||||
* Modified by eichin@cygnus.com for decstation (ultrix 4.2)
|
||||
*/
|
||||
|
||||
typedef struct __dirdesc {
|
||||
int dd_fd;
|
||||
long dd_loc;
|
||||
long dd_size;
|
||||
long dd_bbase;
|
||||
long dd_entno;
|
||||
long dd_bsize;
|
||||
char *dd_buf;
|
||||
} DIR;
|
||||
|
||||
# define __dirfd(dp) ((dp)->dd_fd)
|
||||
|
||||
DIR *opendir (const char *);
|
||||
struct dirent *readdir (DIR *);
|
||||
void rewinddir (DIR *);
|
||||
int closedir (DIR *);
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#define MAXNAMLEN 255
|
||||
|
||||
#define d_ino d_fileno /* compatibility */
|
||||
|
||||
struct dirent {
|
||||
unsigned long d_fileno;
|
||||
unsigned short d_reclen;
|
||||
unsigned short d_namlen;
|
||||
char d_name[MAXNAMLEN + 1];
|
||||
};
|
||||
|
||||
/* FIXME: include definition of DIRSIZ() ? */
|
||||
|
||||
#endif
|
105
newlib/libc/sys/go32/Makefile.am
Normal file
105
newlib/libc/sys/go32/Makefile.am
Normal file
@ -0,0 +1,105 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES = \
|
||||
_exit.s \
|
||||
_main.c \
|
||||
abort.c \
|
||||
access.c \
|
||||
bdos.c \
|
||||
bdosptr.c \
|
||||
brk.s \
|
||||
chdir.s \
|
||||
chmod.c \
|
||||
chown.c \
|
||||
clock.S \
|
||||
close.s \
|
||||
creat.s \
|
||||
crlf2nl.c \
|
||||
dir.c \
|
||||
dosmem.S \
|
||||
dpmi.c \
|
||||
dup.s \
|
||||
dup2.s \
|
||||
exec.c \
|
||||
fchmod.c \
|
||||
findfirs.s \
|
||||
findnext.s \
|
||||
fixpath.c \
|
||||
fstat.s \
|
||||
fsync.s \
|
||||
ftruncat.c \
|
||||
gerrno.s \
|
||||
getcwd.c \
|
||||
getdate.c \
|
||||
getdtabl.c \
|
||||
getgid.c \
|
||||
getkey.s \
|
||||
getpages.c \
|
||||
getpid.c \
|
||||
getrusag.c \
|
||||
gettime.c \
|
||||
gettimeo.c \
|
||||
getuid.c \
|
||||
getwd.s \
|
||||
go32func.c \
|
||||
infoblk.c \
|
||||
inportb.s \
|
||||
inportl.s \
|
||||
inportsb.s \
|
||||
inportsl.s \
|
||||
inportsw.s \
|
||||
inportw.s \
|
||||
int86x.s \
|
||||
intdos.c \
|
||||
intdosx.c \
|
||||
isatty.s \
|
||||
kbhit.s \
|
||||
kill.c \
|
||||
link.s \
|
||||
longjmp.S \
|
||||
lseek.s \
|
||||
lstat.s \
|
||||
mkdir.s \
|
||||
open.s \
|
||||
outportb.s \
|
||||
outportl.s \
|
||||
outportw.s \
|
||||
outprtsb.s \
|
||||
outprtsl.s \
|
||||
outprtsw.s \
|
||||
read.s \
|
||||
readv.c \
|
||||
rename.s \
|
||||
rmdir.s \
|
||||
sbrk.s \
|
||||
screen.S \
|
||||
setjmp.S \
|
||||
setmode.s \
|
||||
setstack.S \
|
||||
settimeo.s \
|
||||
sleep.c \
|
||||
stat.c \
|
||||
stat_ast.s \
|
||||
syserr.c \
|
||||
system.s \
|
||||
tell.s \
|
||||
time.c \
|
||||
truncate.c \
|
||||
turbo.s \
|
||||
umask.c \
|
||||
unlink.s \
|
||||
utime.c \
|
||||
utimes.c \
|
||||
write.s \
|
||||
writev.c
|
||||
|
||||
all: crt0.o
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
402
newlib/libc/sys/go32/Makefile.in
Normal file
402
newlib/libc/sys/go32/Makefile.in
Normal file
@ -0,0 +1,402 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
EXEEXT = @EXEEXT@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
machine_dir = @machine_dir@
|
||||
newlib_basedir = @newlib_basedir@
|
||||
sys_dir = @sys_dir@
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES = \
|
||||
_exit.s \
|
||||
_main.c \
|
||||
abort.c \
|
||||
access.c \
|
||||
bdos.c \
|
||||
bdosptr.c \
|
||||
brk.s \
|
||||
chdir.s \
|
||||
chmod.c \
|
||||
chown.c \
|
||||
clock.S \
|
||||
close.s \
|
||||
creat.s \
|
||||
crlf2nl.c \
|
||||
dir.c \
|
||||
dosmem.S \
|
||||
dpmi.c \
|
||||
dup.s \
|
||||
dup2.s \
|
||||
exec.c \
|
||||
fchmod.c \
|
||||
findfirs.s \
|
||||
findnext.s \
|
||||
fixpath.c \
|
||||
fstat.s \
|
||||
fsync.s \
|
||||
ftruncat.c \
|
||||
gerrno.s \
|
||||
getcwd.c \
|
||||
getdate.c \
|
||||
getdtabl.c \
|
||||
getgid.c \
|
||||
getkey.s \
|
||||
getpages.c \
|
||||
getpid.c \
|
||||
getrusag.c \
|
||||
gettime.c \
|
||||
gettimeo.c \
|
||||
getuid.c \
|
||||
getwd.s \
|
||||
go32func.c \
|
||||
infoblk.c \
|
||||
inportb.s \
|
||||
inportl.s \
|
||||
inportsb.s \
|
||||
inportsl.s \
|
||||
inportsw.s \
|
||||
inportw.s \
|
||||
int86x.s \
|
||||
intdos.c \
|
||||
intdosx.c \
|
||||
isatty.s \
|
||||
kbhit.s \
|
||||
kill.c \
|
||||
link.s \
|
||||
longjmp.S \
|
||||
lseek.s \
|
||||
lstat.s \
|
||||
mkdir.s \
|
||||
open.s \
|
||||
outportb.s \
|
||||
outportl.s \
|
||||
outportw.s \
|
||||
outprtsb.s \
|
||||
outprtsl.s \
|
||||
outprtsw.s \
|
||||
read.s \
|
||||
readv.c \
|
||||
rename.s \
|
||||
rmdir.s \
|
||||
sbrk.s \
|
||||
screen.S \
|
||||
setjmp.S \
|
||||
setmode.s \
|
||||
setstack.S \
|
||||
settimeo.s \
|
||||
sleep.c \
|
||||
stat.c \
|
||||
stat_ast.s \
|
||||
syserr.c \
|
||||
system.s \
|
||||
tell.s \
|
||||
time.c \
|
||||
truncate.c \
|
||||
turbo.s \
|
||||
umask.c \
|
||||
unlink.s \
|
||||
utime.c \
|
||||
utimes.c \
|
||||
write.s \
|
||||
writev.c
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../..
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
lib_a_LIBADD =
|
||||
lib_a_OBJECTS = _exit.o _main.o abort.o access.o bdos.o bdosptr.o brk.o \
|
||||
chdir.o chmod.o chown.o clock.o close.o creat.o crlf2nl.o dir.o \
|
||||
dosmem.o dpmi.o dup.o dup2.o exec.o fchmod.o findfirs.o findnext.o \
|
||||
fixpath.o fstat.o fsync.o ftruncat.o gerrno.o getcwd.o getdate.o \
|
||||
getdtabl.o getgid.o getkey.o getpages.o getpid.o getrusag.o gettime.o \
|
||||
gettimeo.o getuid.o getwd.o go32func.o infoblk.o inportb.o inportl.o \
|
||||
inportsb.o inportsl.o inportsw.o inportw.o int86x.o intdos.o intdosx.o \
|
||||
isatty.o kbhit.o kill.o link.o longjmp.o lseek.o lstat.o mkdir.o open.o \
|
||||
outportb.o outportl.o outportw.o outprtsb.o outprtsl.o outprtsw.o \
|
||||
read.o readv.o rename.o rmdir.o sbrk.o screen.o setjmp.o setmode.o \
|
||||
setstack.o settimeo.o sleep.o stat.o stat_ast.o syserr.o system.o \
|
||||
tell.o time.o truncate.o turbo.o umask.o unlink.o utime.o utimes.o \
|
||||
write.o writev.o
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
SOURCES = $(lib_a_SOURCES)
|
||||
OBJECTS = $(lib_a_OBJECTS)
|
||||
|
||||
all: Makefile $(LIBRARIES)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINT@ configure.in ../../../acinclude.m4 \
|
||||
../../../aclocal.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-noinstLIBRARIES:
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
|
||||
-rm -f lib.a
|
||||
$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
|
||||
$(RANLIB) lib.a
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
info:
|
||||
dvi:
|
||||
check:
|
||||
$(MAKE) $(AM_MAKEFLAGS)
|
||||
installcheck:
|
||||
install-info:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
|
||||
mostlyclean
|
||||
|
||||
distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
|
||||
distclean-generic clean
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-noinstLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
|
||||
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info dvi installcheck \
|
||||
install-info install-exec install-data install uninstall all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
all: crt0.o
|
||||
|
||||
# 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:
|
20
newlib/libc/sys/go32/_exit.s
Normal file
20
newlib/libc/sys/go32/_exit.s
Normal file
@ -0,0 +1,20 @@
|
||||
# /* This is file _EXIT.S */
|
||||
# /*
|
||||
# ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
|
||||
# **
|
||||
# ** This file is distributed under the terms listed in the document
|
||||
# ** "copying.dj", available from DJ Delorie at the address above.
|
||||
# ** A copy of "copying.dj" should accompany this file; if not, a copy
|
||||
# ** should be available from where this file was obtained. This file
|
||||
# ** may not be distributed without a verbatim copy of "copying.dj".
|
||||
# **
|
||||
# ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
# ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# */
|
||||
|
||||
.text
|
||||
.globl __exit
|
||||
__exit:
|
||||
movb 4(%esp),%al
|
||||
movb $0x4c,%ah
|
||||
int $0x21
|
3
newlib/libc/sys/go32/_main.c
Normal file
3
newlib/libc/sys/go32/_main.c
Normal file
@ -0,0 +1,3 @@
|
||||
__main()
|
||||
{
|
||||
}
|
8
newlib/libc/sys/go32/abort.c
Normal file
8
newlib/libc/sys/go32/abort.c
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
void
|
||||
abort()
|
||||
{
|
||||
|
||||
exit(1);
|
||||
|
||||
}
|
34
newlib/libc/sys/go32/access.c
Normal file
34
newlib/libc/sys/go32/access.c
Normal file
@ -0,0 +1,34 @@
|
||||
/* This is file ACCESS.C */
|
||||
/*
|
||||
** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
|
||||
**
|
||||
** This file is distributed under the terms listed in the document
|
||||
** "copying.dj", available from DJ Delorie at the address above.
|
||||
** A copy of "copying.dj" should accompany this file; if not, a copy
|
||||
** should be available from where this file was obtained. This file
|
||||
** may not be distributed without a verbatim copy of "copying.dj".
|
||||
**
|
||||
** This file is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int access(const char *fn, int flags)
|
||||
{
|
||||
struct stat s;
|
||||
if (stat(fn, &s))
|
||||
return -1;
|
||||
if (s.st_mode & S_IFDIR)
|
||||
return 0;
|
||||
if (flags & W_OK)
|
||||
{
|
||||
if (s.st_mode & S_IWRITE)
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
282
newlib/libc/sys/go32/aclocal.m4
vendored
Normal file
282
newlib/libc/sys/go32/aclocal.m4
vendored
Normal file
@ -0,0 +1,282 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
dnl This provides configure definitions used by all the newlib
|
||||
dnl configure.in files.
|
||||
|
||||
dnl Basic newlib configury. This calls basic introductory stuff,
|
||||
dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
|
||||
dnl configure.host. The only argument is the relative path to the top
|
||||
dnl newlib directory.
|
||||
|
||||
AC_DEFUN(NEWLIB_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "${enableval}" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
||||
esac], [multilib=yes])dnl
|
||||
|
||||
dnl Support --enable-target-optspace
|
||||
AC_ARG_ENABLE(target-optspace,
|
||||
[ --enable-target-optspace optimize for space],
|
||||
[case "${enableval}" in
|
||||
yes) target_optspace=yes ;;
|
||||
no) target_optspace=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
|
||||
esac], [target_optspace=])dnl
|
||||
|
||||
dnl Support --enable-newlib-mb
|
||||
AC_ARG_ENABLE(newlib-mb,
|
||||
[ --enable-newlib-mb enable multibyte support],
|
||||
[case "${enableval}" in
|
||||
yes) newlib_mb=yes ;;
|
||||
no) newlib_mb=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
|
||||
esac], [newlib_mb=no])dnl
|
||||
|
||||
dnl We may get other options which we don't document:
|
||||
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
|
||||
test -z "[$]{with_target_subdir}" && with_target_subdir=.
|
||||
|
||||
if test "[$]{srcdir}" = "."; then
|
||||
if test "[$]{with_target_subdir}" != "."; then
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
|
||||
fi
|
||||
else
|
||||
newlib_basedir="[$]{srcdir}/$1"
|
||||
fi
|
||||
AC_SUBST(newlib_basedir)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(newlib, 1.8.1)
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(LIB_AC_PROG_CC,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
dnl Check whether -g works, even if CFLAGS is set, in case the package
|
||||
dnl plays around with CFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
AC_PROG_CC_G
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
|
||||
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
||||
# run it explicitly here, it will be run implicitly before
|
||||
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
|
||||
# be run before AC_CANONICAL_HOST.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
|
||||
# at least currently, we never actually build a program, so we never
|
||||
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
|
||||
# fails, because we are probably configuring with a cross compiler
|
||||
# which can't create executables. So we include AC_EXEEXT to keep
|
||||
# automake happy, but we don't execute it, since we don't care about
|
||||
# the result.
|
||||
if false; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
. [$]{newlib_basedir}/configure.host
|
||||
|
||||
case [$]{newlib_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
|
||||
*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/cygwin/include -I[$]{newlib_flagbasedir}/../winsup/w32api/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
newlib_cflags="[$]{newlib_cflags} -fno-builtin"
|
||||
|
||||
NEWLIB_CFLAGS=${newlib_cflags}
|
||||
AC_SUBST(NEWLIB_CFLAGS)
|
||||
|
||||
AC_SUBST(machine_dir)
|
||||
AC_SUBST(sys_dir)
|
||||
])
|
||||
|
||||
# Do all the work for Automake. 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
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
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# 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 conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $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" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
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
|
||||
]
|
||||
)
|
||||
|
||||
# Define a conditional.
|
||||
|
||||
AC_DEFUN(AM_CONDITIONAL,
|
||||
[AC_SUBST($1_TRUE)
|
||||
AC_SUBST($1_FALSE)
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi])
|
||||
|
12
newlib/libc/sys/go32/bdos.c
Normal file
12
newlib/libc/sys/go32/bdos.c
Normal file
@ -0,0 +1,12 @@
|
||||
#include <errno.h>
|
||||
#include "dos.h"
|
||||
|
||||
bdos(int func, unsigned dx, unsigned al)
|
||||
{
|
||||
union REGS r;
|
||||
r.x.dx = dx;
|
||||
r.h.ah = func;
|
||||
r.h.al = al;
|
||||
int86(0x21, &r, &r);
|
||||
return r.x.ax;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user