From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id B4CF83858D3C; Sat, 20 Jan 2024 03:47:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4CF83858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705722436; bh=57XOnvZ642ieNF6t1y/EF16lqheqy+80JB5b6tvrDx0=; h=From:To:Subject:Date:From; b=DJdWw1GkkAHLe2vOBZJUDfD2+9O3g8QN6wh/58tUeQgRA4i0AaTTQGCsTM4/UnXdg HJerpkfMVn/dZ9dfqXSqIVWmorDBLnN/O9WFox+ApRRHGZfgbb7zoxSLIGWRbbyINI o1lQtlH2kW3MzVxXXmwGUm7GJVsv5YV1lOkuelIk= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/main] libgloss: xc16x: drop old stub port X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/main X-Git-Oldrev: 2f0cd375f325a15b599fe1d71a811a3edc186d4d X-Git-Newrev: 40b1b5c7a95dd7bf8b729420cec6e3c48dea204e Message-Id: <20240120034716.B4CF83858D3C@sourceware.org> Date: Sat, 20 Jan 2024 03:47:16 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D40b1b5c7a95= dd7bf8b729420cec6e3c48dea204e commit 40b1b5c7a95dd7bf8b729420cec6e3c48dea204e Author: Mike Frysinger Date: Fri Dec 29 21:29:44 2023 -0500 libgloss: xc16x: drop old stub port =20 First off, afaict, xc16x support has never been merged into gcc. Upstream merge isn't strictly required for new ports, but it seems like people should merge eventually in some shape, and considering the libgloss port was merged in 2009, ~14 years seems like plenty of leeway. Which is to say, no one else can seem to build this which makes updating & testing things very difficult. =20 Ignoring that, from what I can tell, this port has only ever built and installed a crt0.o file. It defines libeval.a & libcygmon.a targets, but nothing depends on them. The SCRIPTS & BSP variables are always empty. The original port merge define these in the configure script as substitutes, but never set the vars, so they were always replaced with nothing. =20 I actually broke this build 2 years ago when merging the configure up a level in commit 30f244155b8e82aa948ddcb8f2350654fc1adb92 ("libgloss: merge subdirs that have unique makefile_frags up a level"). I saw that it was exporting a bunch of vars in the configure script, but never set them, so I incorrectly assumed they weren't used. Which means the Makefile has been setting them to invalid values like literal @bsp_list@ and @script_list@. =20 Considering no one has complained, I have to assume no one cares about this port, and we can all stop wasting time on it. Diff: --- libgloss/Makefile.in | 6 +- libgloss/config/xc16x.mt | 3 - libgloss/configure | 7 --- libgloss/configure.ac | 5 -- libgloss/xc16x/Makefile.in | 145 ---------------------------------------= ---- libgloss/xc16x/close.S | 20 ------ libgloss/xc16x/create.c | 39 ------------ libgloss/xc16x/crt0.S | 41 ------------ libgloss/xc16x/fstat.S | 20 ------ libgloss/xc16x/getchar1.c | 19 ------ libgloss/xc16x/isatty.c | 26 -------- libgloss/xc16x/lseek.c | 21 ------- libgloss/xc16x/mem-layout.c | 29 --------- libgloss/xc16x/misc.c | 37 ----------- libgloss/xc16x/open.c | 38 ------------ libgloss/xc16x/read.c | 29 --------- libgloss/xc16x/sbrk.c | 36 ----------- libgloss/xc16x/sys/syscall.h | 1 - libgloss/xc16x/syscalls.c | 33 ---------- libgloss/xc16x/trap_handle.c | 67 -------------------- libgloss/xc16x/write.c | 25 -------- 21 files changed, 2 insertions(+), 645 deletions(-) diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in index c4d931dea..9b845538a 100644 --- a/libgloss/Makefile.in +++ b/libgloss/Makefile.in @@ -481,8 +481,8 @@ mkinstalldirs =3D $(SHELL) $(top_srcdir)/../mkinstalldi= rs CONFIG_HEADER =3D config.h CONFIG_CLEAN_FILES =3D m68hc11/Makefile m68k/Makefile pa/Makefile \ mips/Makefile rs6000/Makefile cr16/Makefile cris/Makefile \ - crx/Makefile mep/Makefile mt/Makefile xc16x/Makefile \ - m32c/Makefile spu/Makefile pru/Makefile sparc/libsys/Makefile + crx/Makefile mep/Makefile mt/Makefile m32c/Makefile \ + spu/Makefile pru/Makefile sparc/libsys/Makefile CONFIG_CLEAN_VPATH_FILES =3D am__vpath_adj_setup =3D srcdirstrip=3D`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj =3D case $$p in \ @@ -2912,8 +2912,6 @@ mep/Makefile: $(top_builddir)/config.status $(top_src= dir)/mep/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ mt/Makefile: $(top_builddir)/config.status $(top_srcdir)/mt/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ -xc16x/Makefile: $(top_builddir)/config.status $(top_srcdir)/xc16x/Makefile= .in - cd $(top_builddir) && $(SHELL) ./config.status $@ m32c/Makefile: $(top_builddir)/config.status $(top_srcdir)/m32c/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ spu/Makefile: $(top_builddir)/config.status $(top_srcdir)/spu/Makefile.in diff --git a/libgloss/config/xc16x.mt b/libgloss/config/xc16x.mt deleted file mode 100644 index 2ac79cebc..000000000 --- a/libgloss/config/xc16x.mt +++ /dev/null @@ -1,3 +0,0 @@ -# Dummy target-specific Makefile fragment for XC16X. We can't -# use default.mt because it refers to generic source files whose -# names conflict with the XC16X-specific sources. diff --git a/libgloss/configure b/libgloss/configure index c58633244..fd5d9416b 100755 --- a/libgloss/configure +++ b/libgloss/configure @@ -2946,12 +2946,6 @@ case "${target}" in config_visium=3Dtrue config_testsuite=3Dfalse ;; - xc16x-*-*) - ac_config_files=3D"$ac_config_files xc16x/Makefile" - - subdirs=3D"$subdirs xc16x" - target_makefile_frag=3D${srcdir}/config/xc16x.mt - ;; xstormy16-*-*) config_xstormy16=3Dtrue ;; @@ -6599,7 +6593,6 @@ do "crx/Makefile") CONFIG_FILES=3D"$CONFIG_FILES crx/Makefile" ;; "mep/Makefile") CONFIG_FILES=3D"$CONFIG_FILES mep/Makefile" ;; "mt/Makefile") CONFIG_FILES=3D"$CONFIG_FILES mt/Makefile" ;; - "xc16x/Makefile") CONFIG_FILES=3D"$CONFIG_FILES xc16x/Makefile" ;; "m32c/Makefile") CONFIG_FILES=3D"$CONFIG_FILES m32c/Makefile" ;; "spu/Makefile") CONFIG_FILES=3D"$CONFIG_FILES spu/Makefile" ;; "pru/Makefile") CONFIG_FILES=3D"$CONFIG_FILES pru/Makefile" ;; diff --git a/libgloss/configure.ac b/libgloss/configure.ac index 17e98a2fa..55f4261d1 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -166,11 +166,6 @@ case "${target}" in config_visium=3Dtrue config_testsuite=3Dfalse ;; - xc16x-*-*) - AC_CONFIG_FILES([xc16x/Makefile]) - subdirs=3D"$subdirs xc16x" - target_makefile_frag=3D${srcdir}/config/xc16x.mt - ;; xstormy16-*-*) config_xstormy16=3Dtrue ;; diff --git a/libgloss/xc16x/Makefile.in b/libgloss/xc16x/Makefile.in deleted file mode 100644 index 5e2584e00..000000000 --- a/libgloss/xc16x/Makefile.in +++ /dev/null @@ -1,145 +0,0 @@ -# -# Copyright (C) 2006 KPIT Cummins -# Copyright (C) 2009 Conny Marco Menebr=C3=B6cker -# All rights reserved. -# -# Redistribution and use in source and binary forms is permitted -# provided that the above copyright notice and following paragraph are -# duplicated in all such forms. -# -# This file is distributed WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# - -DESTDIR =3D -VPATH =3D @srcdir@ -srcdir =3D @srcdir@ -objdir =3D . -srcroot =3D $(srcdir)/../.. -objroot =3D $(objdir)/../.. - -prefix =3D @prefix@ -exec_prefix =3D @exec_prefix@ - -host_alias =3D @host_alias@ -target_alias =3D @target_alias@ -program_transform_name =3D @program_transform_name@ - -bindir =3D @bindir@ -libdir =3D @libdir@ -tooldir =3D $(exec_prefix)/$(target_alias) - -# Multilib support variables. -# TOP is used instead of MULTI{BUILD,SRC}TOP. -MULTIDIRS =3D -MULTISUBDIR =3D -MULTIDO =3D true -MULTICLEAN =3D true - -INSTALL =3D @INSTALL@ -INSTALL_PROGRAM =3D @INSTALL_PROGRAM@ -INSTALL_DATA =3D @INSTALL_DATA@ - -SHELL =3D /bin/sh - -mkinstalldirs =3D $(SHELL) $(srcroot)/mkinstalldirs - -CC =3D @CC@ - -#AS =3D @AS@ -AS =3D `if [ -f ${objroot}/../gas/as.new ] ; \ - then echo ${objroot}/../gas/as.new ; \ - else echo as ; fi` - -AR =3D @AR@ - -#LD =3D @LD@ -LD =3D `if [ -f ${objroot}/../ld/ld.new ] ; \ - then echo ${objroot}/../ld/ld.new ; \ - else echo ld ; fi` - -RANLIB =3D @RANLIB@ - -OBJDUMP =3D `if [ -f ${objroot}/../binutils/objdump ] ; \ - then echo ${objroot}/../binutils/objdump ; \ - else t=3D'$(program_transform_name)'; echo objdump | sed -e $$t ; fi` -OBJCOPY =3D `if [ -f ${objroot}/../binutils/objcopy ] ; \ - then echo ${objroot}/../binutils/objcopy ; \ - else t=3D'$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` - -CRT0 =3D crt0.o - -# Generic object files common to all targets. -GENOBJS_NO_TRAP =3D close.o create.o crt0.o fstat.o getchar1.o \ - isatty.o lseek.o mem-layout.o misc.o open.o \ - read.o sbrk.o syscalls.o write.o -GENOBJS =3D ${GENOBJS_NO_TRAP} trap_handle.o - -# Object files specific to particular targets. -EVALOBJS =3D ${GENOBJS} -CYGMONOBJS =3D ${GENOBJS_NO_TRAP} - -CFLAGS =3D -g=20 - -GCC_LDFLAGS =3D `if [ -d ${objroot}/../gcc ] ; \ - then echo -L${objroot}/../gcc ; fi` - -SCRIPTS =3D @script_list@ -BSP =3D @bsp_list@ - -# Host specific makefile fragment comes in here. -@host_makefile_frag@ - -# -# build a test program for each target board. Just trying to get -# it to link is a good test, so we ignore all the errors for now. -# - -all: ${CRT0} ${BSP} - -# -# here's where we build the board support packages for each target -# - -libeval.a: $(EVALOBJS) - ${AR} ${ARFLAGS} $@ $(EVALOBJS) - ${RANLIB} $@ - -libcygmon.a: $(CYGMONOBJS) - ${AR} ${ARFLAGS} $@ $(CYGMONOBJS) - ${RANLIB} $@ - - -doc:=09 - -clean mostlyclean: - rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x - -distclean maintainer-clean realclean: clean - rm -f Makefile config.status a.out - -.PHONY: install info install-info clean-info -install: - ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} - @for crt in ${CRT0}; do \ - $(INSTALL_PROGRAM) $${crt} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${crt}= ; \ - done - @for bsp in ${BSP}; do \ - $(INSTALL_PROGRAM) $${bsp} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \ - done - @for script in ${SCRIPTS}; do \ - $(INSTALL_DATA) ${srcdir}/$${script}.ld $(DESTDIR)$(tooldir)/lib${MULTIS= UBDIR}/$${script}.ld; \ - done - -info: -install-info: -clean-info: - -# these are for the BSPs -crt0.o: ${srcdir}/crt0.S - -# target specific makefile fragment comes in here. -@target_makefile_frag@ - -Makefile: Makefile.in ../config.status - cd .. && $(SHELL) config.status diff --git a/libgloss/xc16x/close.S b/libgloss/xc16x/close.S deleted file mode 100644 index 9b2f76f8d..000000000 --- a/libgloss/xc16x/close.S +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -.section .text -.global __close -__close: -#ifdef __xc16xL__ -rets -#else -ret -#endif diff --git a/libgloss/xc16x/create.c b/libgloss/xc16x/create.c deleted file mode 100644 index 33f4e0b20..000000000 --- a/libgloss/xc16x/create.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -#include -#include -/*volatile int creatsys(char *name,int perms) -{ - #ifndef __xc16xL__ - asm volatile("push r10\n" - " mov r10,r9 \n" - " mov r9,#0x300 \n" - ); - = =20 - #endif - -asm volatile("trap #7"); -#ifndef __xc16xL__ -asm volatile("pop r10"); -#endif -} -*/ -volatile int _creat(char *name,int perms) -{ - int temp; - - temp=3Dcreatsys(name,perms); =20 -// putchar((char)temp); -//printf("%d\n",temp); =09 -return temp; =20 -} diff --git a/libgloss/xc16x/crt0.S b/libgloss/xc16x/crt0.S deleted file mode 100644 index 0186f4740..000000000 --- a/libgloss/xc16x/crt0.S +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ - .section .text - .global _start - .align 2 -_start: - #if __xc16xL__ - mov dpp0,#0x2 - #else - mov dpp0,#0x300 - #endif - mov dpp1,#1 - mov dpp2,#2 - mov dpp3,#3 - mov sp,#0xfc00 - mov r0,#0xc000 - #if __xc16x__ - mov csp,#0x0 - mov dpp0,#0x0 - #else - mov csp,#0xc0 - #endif - =20 -#if __xc16xL__ -calls #SEG:_main,#SOF:_main -#else -calla cc_UC,_main -#endif - mov r8,#0x0=09 - trap #0=09 -ret diff --git a/libgloss/xc16x/fstat.S b/libgloss/xc16x/fstat.S deleted file mode 100644 index 292303e3b..000000000 --- a/libgloss/xc16x/fstat.S +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -.section .text -.global __fstat -__fstat: -#ifdef __xc16xL__ -rets -#else -ret -#endif diff --git a/libgloss/xc16x/getchar1.c b/libgloss/xc16x/getchar1.c deleted file mode 100644 index 4ba5959c4..000000000 --- a/libgloss/xc16x/getchar1.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -signed char getchar (void) -{ - = =20 - asm(" trap #2"); - = =20 -} - diff --git a/libgloss/xc16x/isatty.c b/libgloss/xc16x/isatty.c deleted file mode 100644 index 30e6a5327..000000000 --- a/libgloss/xc16x/isatty.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -/* isatty.c */ - -/* Dumb implementation so programs will at least run. */ - -#include - -int -isatty (int fd) -{ - - - - return 1; -} diff --git a/libgloss/xc16x/lseek.c b/libgloss/xc16x/lseek.c deleted file mode 100644 index ff3057d25..000000000 --- a/libgloss/xc16x/lseek.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -#include -#include - - -int -_lseek (int file, int ptr, int dir) -{ - return trap_lseek (file,(unsigned long)ptr, dir); -} diff --git a/libgloss/xc16x/mem-layout.c b/libgloss/xc16x/mem-layout.c deleted file mode 100644 index 4619ed290..000000000 --- a/libgloss/xc16x/mem-layout.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -/* Ideally this kind of stuff is specified in a linker script. It's not c= lear - what the default linker script should do, so for now we have this. */ - -#ifndef STACK_SIZE -/* Cache lines recycle at 4096 I think, and 4096 is listed as the page siz= e, - so we make the stack size a multiple of it. Not that it's relevant or - anything, but why not base it on *something*? */ -#define STACK_SIZE (4096 * 4) -#endif - -int stack_size asm ("stack_size") =3D STACK_SIZE; - -#ifndef SBRK_SIZE -#define SBRK_SIZE (4096 * 32) -#endif - -int sbrk_size asm ("sbrk_size") =3D SBRK_SIZE; diff --git a/libgloss/xc16x/misc.c b/libgloss/xc16x/misc.c deleted file mode 100644 index d96550129..000000000 --- a/libgloss/xc16x/misc.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -#include <_ansi.h> -#include -#include - -/* _raise(), getpid(), and kill() are required by abort(). - getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES. */ - -int _raise (int sig) -{ - errno =3D ENOSYS; - return -1; -} - -int _getpid (void) -{ - errno =3D ENOSYS; - return -1; -} - -int _kill (int pid, - int sig) -{ - errno =3D ENOSYS; - return -1; -} diff --git a/libgloss/xc16x/open.c b/libgloss/xc16x/open.c deleted file mode 100644 index 4dd0d070d..000000000 --- a/libgloss/xc16x/open.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -#include -#include -/*volatile int opensys(char *name,int flags,int perms) -{ - #ifndef __xc16xL__ - asm volatile("push r11\n" - "mov r11,r10 \n" - " mov r10,r9 \n" - " mov r9,#0x300 \n" - ); - = =20 - #endif - -asm volatile("trap #5"); -#ifndef __xc16xL__ -asm volatile("pop r11"); -#endif -}*/ - -int _open(char *name,int flags,int perms) -{ - int temp; - - temp=3Dopensys(name,flags,perms); =20 -return temp; =20 -} diff --git a/libgloss/xc16x/read.c b/libgloss/xc16x/read.c deleted file mode 100644 index b117af946..000000000 --- a/libgloss/xc16x/read.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -#include -#include - = =20 -/*int trap1(int file, unsigned long ptr,int len) -{ - asm volatile("TRAP #4"); - -}*/ - = =20 -int _read(int file, char *ptr,int len) -{ - =09 - return trap1(file,(unsigned long)ptr,1); -=20 -} - - diff --git a/libgloss/xc16x/sbrk.c b/libgloss/xc16x/sbrk.c deleted file mode 100644 index deb2df26c..000000000 --- a/libgloss/xc16x/sbrk.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include -#include - - char *stack_ptr ; - -caddr_t - _sbrk(incr) - int incr; -{ - extern char end; /* Defined by the linker */ - static char *heap_end=3D&end; - char *prev_heap_end; - - - - prev_heap_end =3D heap_end; - - - heap_end +=3D incr; - return (caddr_t)prev_heap_end; -} - diff --git a/libgloss/xc16x/sys/syscall.h b/libgloss/xc16x/sys/syscall.h deleted file mode 100644 index 8b1378917..000000000 --- a/libgloss/xc16x/sys/syscall.h +++ /dev/null @@ -1 +0,0 @@ - diff --git a/libgloss/xc16x/syscalls.c b/libgloss/xc16x/syscalls.c deleted file mode 100644 index 03b6368cb..000000000 --- a/libgloss/xc16x/syscalls.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -#include -#include -#include -#include <_ansi.h> -#include -#include -#include -#include - - - -void _exit(int n) -{ -asm volatile("trap #0"); -} - -int isatty(file) - int file; -{ - return 1; -} diff --git a/libgloss/xc16x/trap_handle.c b/libgloss/xc16x/trap_handle.c deleted file mode 100644 index 899cdc20d..000000000 --- a/libgloss/xc16x/trap_handle.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -int trap0(int file, unsigned long ptr,int len) -{ -asm volatile("TRAP #3"); -return len; -} - - -int trap1(int file, unsigned long ptr,int len) -{ - asm volatile("TRAP #4"); - = =20 -} - = =20 -int trap_lseek(int file, unsigned long ptr,int len) -{ - asm volatile("TRAP #8"); - = =20 -} - = =20 - - -volatile int opensys(char *name,int flags,int perms) -{ - #ifndef __xc16xL__ - asm volatile("push r11\n" - "mov r11,r10 \n" - " mov r10,r9 \n" - " mov r9,#0x300 \n" - ); - = =20 - #endif - = =20 -asm volatile("trap #5"); -#ifndef __xc16xL__ -asm volatile("pop r11"); -#endif -} - = =20 -volatile int creatsys(char *name,int perms) -{ - #ifndef __xc16xL__ - asm volatile("push r10\n" - " mov r10,r9 \n" - " mov r9,#0x300 \n" - ); - = =20 - #endif - = =20 -asm volatile("trap #7"); -#ifndef __xc16xL__ -asm volatile("pop r10"); -#endif -} - = =20 - diff --git a/libgloss/xc16x/write.c b/libgloss/xc16x/write.c deleted file mode 100644 index 10b1b556a..000000000 --- a/libgloss/xc16x/write.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2006 KPIT Cummins - * Copyright (C) 2009 Conny Marco Menebr=C3=B6cker - * All rights reserved. - * - * Redistribution and use in source and binary forms is permitted - * provided that the above copyright notice and following paragraph are - * duplicated in all such forms. - * - * This file is distributed WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -#include -#include - -/*int trap0(int file, unsigned long ptr,int len) -{ -asm volatile("TRAP #3"); -return len; -} -*/ -int _write(int file, char *ptr,int len) -{ - return trap0(file,(unsigned long)ptr,len); -}