public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/RFC] libgloss: xc16x: drop old stub port
@ 2023-12-30  2:39 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2023-12-30  2:39 UTC (permalink / raw)
  To: newlib

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=8bit, Size: 23738 bytes --]

RFC: I could delete all the unused non-crt0 logic to greatly simplify
the build and save it from the dumpster ...

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.

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.

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@.

Considering no one has complained, I have to assume no one cares
about this port, and we can all stop wasting time on it.
---
 libgloss/Makefile.in         |   8 +-
 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, 3 insertions(+), 646 deletions(-)
 delete mode 100644 libgloss/config/xc16x.mt
 delete mode 100644 libgloss/xc16x/Makefile.in
 delete mode 100644 libgloss/xc16x/close.S
 delete mode 100644 libgloss/xc16x/create.c
 delete mode 100644 libgloss/xc16x/crt0.S
 delete mode 100644 libgloss/xc16x/fstat.S
 delete mode 100644 libgloss/xc16x/getchar1.c
 delete mode 100644 libgloss/xc16x/isatty.c
 delete mode 100644 libgloss/xc16x/lseek.c
 delete mode 100644 libgloss/xc16x/mem-layout.c
 delete mode 100644 libgloss/xc16x/misc.c
 delete mode 100644 libgloss/xc16x/open.c
 delete mode 100644 libgloss/xc16x/read.c
 delete mode 100644 libgloss/xc16x/sbrk.c
 delete mode 100644 libgloss/xc16x/sys/syscall.h
 delete mode 100644 libgloss/xc16x/syscalls.c
 delete mode 100644 libgloss/xc16x/trap_handle.c
 delete mode 100644 libgloss/xc16x/write.c

diff --git a/libgloss/config/xc16x.mt b/libgloss/config/xc16x.mt
deleted file mode 100644
index 2ac79cebce48..000000000000
--- 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.ac b/libgloss/configure.ac
index 268d86c518a2..ed585347ad45 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -186,11 +186,6 @@ case "${target}" in
 	subdirs="$subdirs visium"
 	config_testsuite=false
 	;;
-  xc16x-*-*)
-	AC_CONFIG_FILES([xc16x/Makefile])
-	subdirs="$subdirs xc16x"
-	target_makefile_frag=${srcdir}/config/xc16x.mt
-	;;
   xstormy16-*-*)
 	AC_CONFIG_FILES([xstormy16/Makefile])
 	subdirs="$subdirs xstormy16"
diff --git a/libgloss/xc16x/Makefile.in b/libgloss/xc16x/Makefile.in
deleted file mode 100644
index 5e2584e004d5..000000000000
--- a/libgloss/xc16x/Makefile.in
+++ /dev/null
@@ -1,145 +0,0 @@
-#
-# Copyright (C) 2006 KPIT Cummins
-# Copyright (C) 2009 Conny Marco Menebröcker
-# 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 =
-VPATH = @srcdir@
-srcdir = @srcdir@
-objdir = .
-srcroot = $(srcdir)/../..
-objroot = $(objdir)/../..
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-host_alias = @host_alias@
-target_alias = @target_alias@
-program_transform_name = @program_transform_name@
-
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
-
-# Multilib support variables.
-# TOP is used instead of MULTI{BUILD,SRC}TOP.
-MULTIDIRS =
-MULTISUBDIR =
-MULTIDO = true
-MULTICLEAN = true
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SHELL =	/bin/sh
-
-mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs
-
-CC = @CC@
-
-#AS = @AS@
-AS = `if [ -f ${objroot}/../gas/as.new ] ; \
-	then echo ${objroot}/../gas/as.new ; \
-	else echo as ; fi`
-
-AR = @AR@
-
-#LD = @LD@
-LD = `if [ -f ${objroot}/../ld/ld.new ] ; \
-	then echo ${objroot}/../ld/ld.new ; \
-	else echo ld ; fi`
-
-RANLIB = @RANLIB@
-
-OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
-	then echo ${objroot}/../binutils/objdump ; \
-	else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
-OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
-	then echo ${objroot}/../binutils/objcopy ; \
-	else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
-
-CRT0 = crt0.o
-
-# Generic object files common to all targets.
-GENOBJS_NO_TRAP = 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 = ${GENOBJS_NO_TRAP} trap_handle.o
-
-# Object files specific to particular targets.
-EVALOBJS = ${GENOBJS}
-CYGMONOBJS = ${GENOBJS_NO_TRAP}
-
-CFLAGS = -g 
-
-GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
-	then echo -L${objroot}/../gcc ; fi`
-
-SCRIPTS = @script_list@
-BSP = @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:	
-
-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${MULTISUBDIR}/$${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 9b2f76f8d5c8..000000000000
--- a/libgloss/xc16x/close.S
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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 33f4e0b20622..000000000000
--- a/libgloss/xc16x/create.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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<sys/stat.h>
-#include<sys/types.h>
-/*volatile int creatsys(char *name,int perms)
-{
- #ifndef __xc16xL__
-        asm volatile("push r10\n"
-		     " mov r10,r9  \n"
-                     " mov r9,#0x300 \n"
-		     );
-                                                                                
-  #endif
-
-asm volatile("trap #7");
-#ifndef __xc16xL__
-asm volatile("pop r10");
-#endif
-}
-*/
-volatile int _creat(char *name,int perms)
-{
- int temp;
-
-  temp=creatsys(name,perms);    
-// putchar((char)temp);
-//printf("%d\n",temp);					
-return temp;  
-}
diff --git a/libgloss/xc16x/crt0.S b/libgloss/xc16x/crt0.S
deleted file mode 100644
index 0186f4740691..000000000000
--- a/libgloss/xc16x/crt0.S
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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
-        
-#if __xc16xL__
-calls #SEG:_main,#SOF:_main
-#else
-calla cc_UC,_main
-#endif
- 	mov r8,#0x0	
-	trap #0	
-ret
diff --git a/libgloss/xc16x/fstat.S b/libgloss/xc16x/fstat.S
deleted file mode 100644
index 292303e3b51e..000000000000
--- a/libgloss/xc16x/fstat.S
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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 4ba5959c4a36..000000000000
--- a/libgloss/xc16x/getchar1.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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)
-{
-                                                                               
-  asm(" trap #2");
-                                                                                
-}
-
diff --git a/libgloss/xc16x/isatty.c b/libgloss/xc16x/isatty.c
deleted file mode 100644
index 30e6a53270fd..000000000000
--- a/libgloss/xc16x/isatty.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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 <sys/stat.h>
-
-int
-isatty (int fd)
-{
-
-
-
-  return 1;
-}
diff --git a/libgloss/xc16x/lseek.c b/libgloss/xc16x/lseek.c
deleted file mode 100644
index ff3057d2573f..000000000000
--- a/libgloss/xc16x/lseek.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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 <sys/types.h>
-#include <sys/stat.h>
-
-
-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 4619ed2903de..000000000000
--- a/libgloss/xc16x/mem-layout.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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 clear
-   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 size,
-   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") = STACK_SIZE;
-
-#ifndef SBRK_SIZE
-#define SBRK_SIZE (4096 * 32)
-#endif
-
-int sbrk_size asm ("sbrk_size") = SBRK_SIZE;
diff --git a/libgloss/xc16x/misc.c b/libgloss/xc16x/misc.c
deleted file mode 100644
index d96550129c75..000000000000
--- a/libgloss/xc16x/misc.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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 <sys/types.h>
-#include <sys/stat.h>
-
-/* _raise(), getpid(), and kill() are required by abort().
-   getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES.  */
-
-int _raise (int sig)
-{
-  errno = ENOSYS;
-  return -1;
-}
-
-int _getpid (void)
-{
-  errno = ENOSYS;
-  return -1;
-}
-
-int _kill (int pid,
-	   int sig)
-{
-  errno = ENOSYS;
-  return -1;
-}
diff --git a/libgloss/xc16x/open.c b/libgloss/xc16x/open.c
deleted file mode 100644
index 4dd0d070de42..000000000000
--- a/libgloss/xc16x/open.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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<sys/types.h>
-#include<sys/stat.h>
-/*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"
-		     );
-                                                                                
-  #endif
-
-asm volatile("trap #5");
-#ifndef __xc16xL__
-asm volatile("pop r11");
-#endif
-}*/
-
-int _open(char *name,int flags,int perms)
-{
- int temp;
-
-  temp=opensys(name,flags,perms);    
-return temp;  
-}
diff --git a/libgloss/xc16x/read.c b/libgloss/xc16x/read.c
deleted file mode 100644
index b117af946239..000000000000
--- a/libgloss/xc16x/read.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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<sys/types.h>
-#include<sys/stat.h>
-                                                                                
-/*int trap1(int file, unsigned long ptr,int len)
-{
- asm volatile("TRAP #4");
-
-}*/
-                                                                                
-int _read(int file, char *ptr,int len)
-{
- 	
- return trap1(file,(unsigned long)ptr,1);
- 
-}
-
-
diff --git a/libgloss/xc16x/sbrk.c b/libgloss/xc16x/sbrk.c
deleted file mode 100644
index deb2df26cb2b..000000000000
--- a/libgloss/xc16x/sbrk.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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 <sys/types.h>
-#include <sys/stat.h>
-
- char *stack_ptr ;
-
-caddr_t
-  _sbrk(incr)
-     int incr;
-{
-  extern char end;		/* Defined by the linker */
-  static char *heap_end=&end;
-  char *prev_heap_end;
-
-
-
-  prev_heap_end = heap_end;
-
-
-  heap_end += 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 8b137891791f..000000000000
--- 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 03b6368cb367..000000000000
--- a/libgloss/xc16x/syscalls.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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 <sys/types.h>
-#include <sys/stat.h>
-#include <sys/syscall.h>
-#include <_ansi.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <reent.h>
-
-
-
-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 899cdc20daf3..000000000000
--- a/libgloss/xc16x/trap_handle.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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");
-                                                                                
-}
-                                                                                
-int trap_lseek(int file, unsigned long ptr,int len)
-{
- asm volatile("TRAP #8");
-                                                                                
-}
-                                                                                
-
-
-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"
-                     );
-                                                                                
-  #endif
-                                                                                
-asm volatile("trap #5");
-#ifndef __xc16xL__
-asm volatile("pop r11");
-#endif
-}
-                                                                                
-volatile int creatsys(char *name,int perms)
-{
- #ifndef __xc16xL__
-        asm volatile("push r10\n"
-                     " mov r10,r9  \n"
-                     " mov r9,#0x300 \n"
-                     );
-                                                                                
-  #endif
-                                                                                
-asm volatile("trap #7");
-#ifndef __xc16xL__
-asm volatile("pop r10");
-#endif
-}
-                                                                                
-
diff --git a/libgloss/xc16x/write.c b/libgloss/xc16x/write.c
deleted file mode 100644
index 10b1b556a3e9..000000000000
--- a/libgloss/xc16x/write.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2006 KPIT Cummins
- * Copyright (C) 2009 Conny Marco Menebröcker
- * 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<sys/types.h>
-#include<sys/stat.h>
-
-/*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);
-}
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-30  2:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-30  2:39 [PATCH/RFC] libgloss: xc16x: drop old stub port Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).