diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-03-19 11:28:04 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-03-19 11:28:04 +0000 |
| commit | 9f9bdc6d9964c15e63aa7abeb78eff3f478b0cfc (patch) | |
| tree | afc22e4ff8117865a8e7f2ab56a74396fc154f63 /usr/src/lib/libbc/sparc | |
| parent | bfe191c490dc33e77e134e9bb5e2c8a3da737a29 (diff) | |
| parent | 97b5374547d500fded52d886ceba8a9962af0527 (diff) | |
| download | illumos-joyent-9f9bdc6d9964c15e63aa7abeb78eff3f478b0cfc.tar.gz | |
[illumos-gate merge]
commit 97b5374547d500fded52d886ceba8a9962af0527
12292 retire libbc
Diffstat (limited to 'usr/src/lib/libbc/sparc')
| -rw-r--r-- | usr/src/lib/libbc/sparc/Makefile | 476 | ||||
| -rw-r--r-- | usr/src/lib/libbc/sparc/inc/PIC.h | 38 | ||||
| -rw-r--r-- | usr/src/lib/libbc/sparc/inc/SYS.h | 127 | ||||
| -rw-r--r-- | usr/src/lib/libbc/sparc/inc/sparc/asm_linkage.h | 332 |
4 files changed, 0 insertions, 973 deletions
diff --git a/usr/src/lib/libbc/sparc/Makefile b/usr/src/lib/libbc/sparc/Makefile deleted file mode 100644 index a15a6356b1..0000000000 --- a/usr/src/lib/libbc/sparc/Makefile +++ /dev/null @@ -1,476 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2019 Peter Tribble. -# - -# -# This builds all objects needed for libbc. -# - -LIBRARY= libc.a -# Default rules in ../../Makefile.targ not used. -VERS= bogus -DYNLIB4X= libc.so.1.9 -DYNLIBS5= libc.so.2.9 -#DYNLIBS5 is also defined in ../Makefile - -M4= m4 -ECHO= echo - -# objects are grouped by source directory. - -COMPATCOM= \ -gtty.o lockf.o pause.o stty.o tell.o ulimit.o \ -utime.o - -COMPAT4.1=\ -ftime.o nice.o rand.o vlimit.o vtimes.o getpw.o times.o - -COMPATSYS5=\ -nice.o rand.o getpw.o times.o - -CRTSPARC =\ -_ftou.o misalign.o ptr_call.o \ -start_float.o \ -alloc_pbuf.o mon.o muldiv.o - -GENCOM=\ -_crypt.o _nlist.o _perror.o _psignal.o a64l.o abs.o alarm.o\ -asctime.o atof.o atoi.o atol.o bcmp.o bsearch.o\ -clock.o closedir.o crypt.o ctime.o ctype_.o\ -drand48.o dysize.o errlst.o execvp.o exit.o exportent.o ecvt.o\ -fabs.o fmod.o frexp.o\ -fstab.o ftok.o ftw.o getauid.o getauditflags.o \ -getcwd.o getenv.o getgraent.o getlogin.o \ -getopt.o getsubopt.o getpwaent.o getttyent.o\ -getttynam.o getusershell.o grpauth.o hsearch.o\ -ieee_globals.o index.o isatty.o \ -issecure.o jcsetpgrp.o\ -l64a.o labeltostring.o ldexp.o lfind.o lsearch.o\ -madvise.o mallopt.o \ -euc.multibyte.o iso.multibyte.o xccs.multibyte.o \ -mblib.o mbstowcs.o mbtowc.o wcstombs.o wctomb.o \ -memalign.o memccpy.o memchr.o memcmp.o\ -mkstemp.o mktemp.o mlock.o mlockall.o\ -mntent.o modf.o msync.o munlock.o munlockall.o\ -nl_cxtime.o nl_strncmp.o ndbm.o on_exit.o\ -opendir.o optind.o perror.o plock.o \ -posix_sig.o posix_tty.o popen.o psignal.o putenv.o \ -pwdauth.o pwdnm.o qsort.o\ -random.o readdir.o realpath.o regex.o rindex.o scandir.o seekdir.o\ -setlocale.o setregid.o setreuid.o setrgid.o setruid.o sigfpe.o siglist.o\ -ssignal.o strchr.o stricmp.o \ -strftime.o strncat.o \ -strpbrk.o strptime.o strrchr.o strspn.o strstr.o \ -strtod.o strtok.o strtol.o swab.o syslog.o\ -telldir.o tfind.o time.o tsearch.o \ -ualarm.o usleep.o valloc.o string_decim.o \ -file_decim.o func_decim.o econvert.o seconvert.o gconvert.o \ -decimal_bin.o float_decim.o double_decim.o \ -pack_float.o _unpack_dble.o unpack_float.o \ -_base_S.o _base_il.o _base_sup.o _big_power.o _small_power.o \ -_sprintf_sup.o _times_power.o qeconvert.o \ -_Q_neg.o _Q_add.o _Q_sub.o _Q_mul.o _Q_div.o _Q_cmp.o \ -_Q_cmpe.o _Q_stoq.o _Q_dtoq.o _Q_itoq.o _Q_utoq.o _Q_qtos.o _Q_qtod.o \ -_Q_qtoi.o _Q_qtou.o _Q_sqrt.o _Qfaddsub.o _Qfcompare.o _Qfdiv.o \ -_Qfmul.o _Qfpack.o _Qfunpack.o _Qfutility.o _Q_fcc.o _Q_get_rp_rd.o \ -calloc.o malloc.o \ -getpass.o localtime.o ttyslot.o - -GENCOMSPARC=\ -alloca.o ffs.o insque.o remque.o isinf.o base_conv.o - -GEN4.2=\ -nlist.o timezone.o sleep.o system.o - -GENSYS5=\ -assert.o nlist.o sgetl.o sleep.o sputl.o system.o \ -sighold.o - -STDIOCOM=\ -clrerr.o ctermid.o cuserid.o doprnt.o doscan.o fdopen.o \ -feof.o ferror.o fgetc.o fgets.o fileno.o findiop.o \ -fputc.o fputs.o fread.o fseek.o ftell.o \ -fwrite.o getc.o getchar.o gets.o getw.o iob.o \ -putc.o putchar.o puts.o putw.o remove.o \ -rew.o scanf.o setbuffer.o setvbuf.o tmpnam.o tempnam.o \ -tmpfile.o ungetc.o - -STDIO4.2=\ -filbuf.o fopen.o fprintf.o printf.o flsbuf.o setbuf.o \ -sprintf.o vfprintf.o vprintf.o vsprintf.o - -STDIOSYS5=\ -filbuf.o fopen.o fprintf.o flsbuf.o printf.o setbuf.o \ -sprintf.o vfprintf.o vprintf.o vsprintf.o - -SYSCOM=\ -_access.o acct.o adjtime.o close.o _creat.o dup.o dup2.o \ -fchdir.o fchroot.o \ -fdlist.o flock.o fpathconf.o fsync.o ftruncate.o getdents.o \ -getdtablesize.o getgid.o getitimer.o getpid.o gettimeofday.o \ -getuid.o ioctl.o kill.o lseek.o mincore.o mprotect.o munmap.o\ -_open.o profil.o setitimer.o \ -rlimit.o _statfs.o sync.o umask.o uname.o\ -execl.o execle.o execv.o mkfifo.o msgsys.o\ -pathconf.o semsys.o shmsys.o unmount.o wait.o setuid.o\ -setgid.o _stat.o seteuid.o setegid.o signalmap.o syscall.o \ -maperror.o sigsetjmp.o accept.o bind.o connect.o getpeername.o \ -getsockname.o getsockopt.o listen.o recv.o send.o \ -setsockopt.o shutdown.o socket.o socketpair.o setsid.o sigaction.o - -SYSCOMSPARC=\ -_exit.o brk.o cerror.o errno.o \ -getegid.o geteuid.o getppid.o mmap.o pipe.o putmsg.o \ -sbrk.o _syscall.o getmsg.o _read.o _write.o \ -_readv.o _writev.o sendsig.o - -SYS4.2=\ -access.o chdir.o chmod.o chown.o chroot.o \ -creat.o execve.o getpgrp.o link.o mkdir.o \ -mknod.o open.o readlink.o rename.o rmdir.o \ -setpgrp.o stat.o symlink.o truncate.o unlink.o \ -statfs.o fcntl.o read.o write.o readv.o \ -writev.o setjmp.o mount.o - -SYS4.2SPARC=\ -getgroups.o setgroups.o - -SYSSYS5=\ -access.o chdir.o chmod.o chown.o chroot.o \ -creat.o execve.o getgroups.o getpgrp.o link.o \ -mkdir.o mknod.o open.o readlink.o rename.o \ -rmdir.o setgroups.o setpgrp.o stat.o statfs.o \ -stime.o symlink.o truncate.o unlink.o fcntl.o \ -read.o write.o readv.o writev.o setjmp.o \ -mount.o - -#SSYSSPARC=\ -#_getpgrp.o _kill.o _lseek.o _mknod.o _mount.o _setpgrp.o \ -#umount.o - -INET=\ -inet_addr.o inet_lnaof.o inet_makeaddr.o inet_netof.o \ -inet_network.o inet_ntoa.o - -NET=\ -ether_addr.o bindresvport.o getrpcport.o rcmd.o \ -rexec.o ruserpass.o authunix.o - -NETSPARC= htonl.o htons.o ntohl.o ntohs.o - -YP= yp_bind.o - -YP= yp_bind.o -PSEUDO_SRCS= adjtime.s fchdir.s \ -fchroot.s \ -fpathconf.s getitimer.s getpid.s \ -mincore.s mprotect.s munmap.s \ -profil.s setitimer.s \ -sync.s sysconf.s umask.s ustat.s \ -acct.s stime.s - -# -# libbc build rules -pics/%.o s5pics/%.o : ../libc/compat/common/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o : ../libc/compat/4.1/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -s5pics/%.o : ../libc/compat/sys5/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/crt/sparc/%.s - $(BUILD.s) - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/crt/sparc/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../csu/common/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/gen/common/%.S - $(BUILD.s) - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/gen/common/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/gen/common/sparc/%.s - $(BUILD.s) - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/gen/common/sparc/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o : ../libc/gen/4.2/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -s5pics/%.o : ../libc/gen/sys5/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/inet/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/net/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/net/sparc/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/stdio/common/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o : ../libc/stdio/4.2/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -s5pics/%.o : ../libc/stdio/sys5/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/sys/common/%.s - $(BUILD.s) - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/sys/common/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/sys/common/sparc/%.s - $(BUILD.s) - $(POST_PROCESS_O) - -pics/%.o : ../libc/sys/4.2/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o : ../libc/sys/4.2/sparc/%.s - $(BUILD.s) - $(POST_PROCESS_O) - -s5pics/%.o : ../libc/sys/sys5/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -s5pics/%.o : ../libc/sys/sys5/sparc/%.s - $(BUILD.s) - $(POST_PROCESS_O) - -s5pics/%.o : ../libc/stdio/sys5/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/rpc/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -pics/%.o s5pics/%.o : ../libc/yp/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - - -# include common library definitions -include ../../Makefile.lib - -# There should be a mapfile here -MAPFILES = - -CSTD= $(CSTD_GNU89) - -# -# The BCP include files depend on old preprocessor semantics. -# -CCMODE = -Xt - -# the bcp libraries go in /usr/4lib. override ROOTLIBDIR from ../../Makefile.lib -# and save it so we can find the libraries with which to link -ROOTLIBDIR= $(ROOT)/usr/4lib - -CPPFLAGS= -Dsparc \ - -I. -Iinc -I../inc/include -I../inc/include/sys $(CPPFLAGS.master) -# -# contents of CPPFLAGS copied to ASFLAGS so it's immune to CPPFLAGS -# being changed later -# -ASFLAGS= -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM -Dsparc \ - -I. -Iinc -I../inc/include -I../inc/include/sys $(CPPFLAGS.master) -LDLIBS= -t -R/usr/ucblib -L$(ROOT)/usr/ucblib $(LDLIBS.lib) \ - -lucb -lc -lnsl -lsocket - -CERRWARN += -_gcc=-Wno-implicit-function-declaration -CERRWARN += -_gcc=-Wno-char-subscripts -CERRWARN += -_gcc=-Wno-extra -CERRWARN += -_gcc=-Wno-parentheses -CERRWARN += $(CNOWARN_UNINIT) -CERRWARN += -_gcc=-Wno-unused -CERRWARN += -_gcc=-Wno-switch -CERRWARN += -_gcc=-Wno-address - -# SONAME is used by DYNFLAGS -$(DYNLIB4X) := SONAME = $(DYNLIB4X) -$(DYNLIBS5) := SONAME = $(DYNLIBS5) - -pics/%.o:= ASFLAGS += $(AS_PICFLAGS) -DPIC -pics/%.o:= CPPFLAGS += $(C_PICFLAGS) -DPIC -DYNFLAGS += $(ZINTERPOSE) - -BUILD.s= $(AS) $(ASFLAGS) $< -o $@ - -# libbc method of building an archive -BUILD.AR= $(RM) $@ ; \ - $(AR) q $@ $(OBJECTS:%=$(DIR)/%) - -# the TXTS macro is used for NSE bootstrapping. -TXTS= inc/SYS.h inc/PIC.h inc/machine/asm_linkage.h - -LIBS = $(DYNLIB4X) $(DYNLIBS5) - -OBJECTS= $(COMPATCOM) $(COMPAT4.1) $(CRTSPARC) $(GENCOM) \ -$(GENCOMSPARC) $(GEN4.2) $(STDIOCOM) $(STDIO4.2) \ -$(INET) $(NET) $(NETSPARC) $(YP) \ -$(SYSCOM) $(SYSCOMSPARC) $(SYS4.2) - -# -# Since this library is strictly for binary compability with ancient -# applications, we deactivate CTF to avoid kicking up dust. -# -CTFCONVERT_POST = : -CTFMERGE_LIB = : - -S5OBJECTS= $(COMPATCOM) $(COMPATSYS5) $(CRTSPARC) $(GENCOM) \ -$(GENCOMSPARC) $(GENSYS5) $(STDIOCOM) $(STDIOSYS5) \ -$(SYSCOM) $(SYSCOMSPARC) $(SYSSYS5) $(SSYS5SPARC) \ -$(INET) $(NET) $(NETSPARC) $(YP) - -S5PICOBJS= $(S5OBJECTS:%=s5pics/%) - -CLEANFILES= ../libc/yp/ypupdate_prot.c ../inc/include/rpcsvc/ypupdate_prot.h \ - ../libc/compat/sys5/epoch.h \ - $(S5PICOBJS) -CLOBBERFILES= ../libc/compat/sys5/mkepoch - -# conditional assignments -s5pics/%.o:= CPPFLAGS = -Dsparc -DS5EMUL $(C_PICFLAGS) -DPIC -I. -Iinc \ - -I../inc/5include -I../inc/include -I../inc/include/sys \ - $(CPPFLAGS.master) -s5pics/%.o:= ASFLAGS = -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM \ - -Dsparc -DS5EMUL $(AS_PICFLAGS) -DPIC -I. -Iinc \ - -I../inc/5include -I../inc/include -I../inc/include/sys \ - $(CPPFLAGS.master) - -s5pics/%.o := CFLAGS += -xregs=no%appl -pics/%.o := CFLAGS += -xregs=no%appl - -$(DYNLIB4X):= DIR = pics -$(DYNLIBS5):= DIR = s5pics - -.KEEP_STATE: - -# Declare that all .o's can be made in parallel. -.PARALLEL: $(PICS) $(S5PICOBJS) - -all: $(TXTS) $(LIBS) - -$(DYNLIB4X): pics .WAIT $(PICS) - $(CC) -o $@ -G $(DYNFLAGS) $(PICS) $(LDLIBS) - $(POST_PROCESS_SO) - -$(DYNLIBS5): s5pics .WAIT $(S5PICOBJS) - $(CC) -o $@ -G $(DYNFLAGS) $(S5PICOBJS) $(LDLIBS) - $(POST_PROCESS_SO) - -# include common library targets -include ../../Makefile.targ - -s5pics: - -@mkdir -p $@ - -# special cases -PSEUDO_POBJS= $(PSEUDO_SRCS:%.s=pics/%.o) -PSEUDO_PS5OBJS= $(PSEUDO_SRCS:%.s=s5pics/%.o) - -$(PSEUDO_POBJS) $(PSEUDO_PS5OBJS): - @(echo '#include "SYS.h"'; \ - echo ' SYSCALL($(@F:.o=))'; \ - echo ' RET'; \ - echo ' SET_SIZE($(@F:.o=))') > tmp.$(@F:.o=).s - $(AS) $(ASFLAGS) -o $@ tmp.$(@F:.o=).s - $(POST_PROCESS_O) - @$(RM) tmp.$(@F:.o=).s - -s5pics/times.o : ../libc/compat/sys5/epoch.h ../libc/compat/sys5/times.c - $(COMPILE.c) -o $@ ../libc/compat/sys5/times.c - $(POST_PROCESS_O) - -../libc/compat/sys5/epoch.h: ../libc/compat/sys5/mkepoch - ../libc/compat/sys5/mkepoch > $@ - -../libc/compat/sys5/mkepoch: ../libc/compat/sys5/mkepoch.c - $(NATIVECC) -O -o $@ ../libc/compat/sys5/mkepoch.c - -pics/maperror.o s5pics/maperror.o: ../libc/sys/common/maperror.c - $(CC) -I../libc/sys/common $(CPPFLAGS) $(CFLAGS) -c -o $@ ../libc/sys/common/maperror.c - -# -# The following rules generate the .h file and XDR routines from the -# rpcgen source. Objects built here, look for it here. Further, when -# building ypupdated it should look here too, but doesn't at the moment. -# -# It would be nice to use a ".x.h" rule for this, but that causes problems. -# -pics/yp_update.o \ -s5pics/yp_update.o : ../inc/include/rpcsvc/ypupdate_prot.h ../libc/yp/yp_update.c - $(COMPILE.c) -o $@ ../libc/yp/yp_update.c - $(POST_PROCESS_O) - -pics/ypupdate_prot.o s5pics/ypupdate_prot.o : ../inc/include/rpcsvc/ypupdate_prot.h\ - ../libc/yp/ypupdate_prot.c - $(COMPILE.c) -o $@ ../libc/yp/ypupdate_prot.c - $(POST_PROCESS_O) - -../libc/yp/ypupdate_prot.c: ../libc/yp/ypupdate_prot.x - $(RM) $@ - $(RPCGEN) -c -o $@ ../libc/yp/ypupdate_prot.x - -../libc/yp/ypupdate_prot.h: ../libc/yp/ypupdate_prot.x - $(RM) $@ ../libc/yp/ypupdate_prot.h - $(RPCGEN) -h -o ../libc/yp/ypupdate_prot.h ../libc/yp/ypupdate_prot.x - -../inc/include/rpcsvc/ypupdate_prot.h: ../libc/yp/ypupdate_prot.h - cp ../libc/yp/ypupdate_prot.h $@ diff --git a/usr/src/lib/libbc/sparc/inc/PIC.h b/usr/src/lib/libbc/sparc/inc/PIC.h deleted file mode 100644 index b8b14ae32f..0000000000 --- a/usr/src/lib/libbc/sparc/inc/PIC.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef PIC -#define PIC_SETUP(r) \ - or %g0,%o7,%g1; \ -1: \ - call 2f; \ - nop; \ -2: \ - sethi %hi(_GLOBAL_OFFSET_TABLE_ - (1b-.)), %r; \ - or %r, %lo(_GLOBAL_OFFSET_TABLE_ - (1b-.)),%r; \ - add %r, %o7, %r; \ - or %g0,%g1,%o7 -#else -#define PIC_SETUP() -#endif - diff --git a/usr/src/lib/libbc/sparc/inc/SYS.h b/usr/src/lib/libbc/sparc/inc/SYS.h deleted file mode 100644 index 4586eded56..0000000000 --- a/usr/src/lib/libbc/sparc/inc/SYS.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -! -! "@(#)SYS.h 1.14 88/02/08" -! Copyright (c) 1986, 1996 by Sun Microsystems, Inc. -! All rights reserved. -! - -#include <sys/syscall.h> -#include <machine/asm_linkage.h> -#include "PIC.h" - -#define SV_ERESTART 91 /* ERESTART is returned by the kernel for - restartable system calls */ - -#define WINDOWSIZE (16*4) - - .global .cerror - -#define SYSCALL(x) \ - ENTRY(x); \ - mov SYS_/**/x, %g1; \ - t 8; \ - CERROR(o5) - -#define BSDSYSCALL(x) \ - ENTRY(_/**/x); \ - mov SYS_/**/x, %g1; \ - t 8; \ - CERROR(o5) - -/* - * SYSREENTRY provides the entry sequence for restartable system calls. - */ -#define SYSREENTRY(x) \ - ENTRY(x); \ - st %o0,[%sp+68]; \ -.restart_/**/x: - -#define PSEUDO(x, y) \ - ENTRY(x); \ - mov SYS_/**/y, %g1; \ - t 8; - -/* - * SYSCALL_RESTART provides the most common restartable system call sequence. - */ -#define SYSCALL_RESTART(x) \ - SYSREENTRY(x); \ - mov SYS_/**/x, %g1; \ - t 8; \ - SYSRESTART(.restart_/**/x) - -/* - * SYSREENTRY provides the entry sequence for restartable system calls. - */ -#define SYSREENTRY(x) \ - ENTRY(x); \ - st %o0,[%sp+68]; \ -.restart_/**/x: - -/* - * SYSRESTART provides the error handling sequence for restartable - * system calls. - */ -#ifdef PIC -#define SYSRESTART(x) \ - bcc noerr; \ - cmp %o0, SV_ERESTART; \ - be,a x; \ - ld [%sp+68], %o0; \ - PIC_SETUP(o5); \ - ld [%o5 + .cerror], %o5; \ - jmp %o5; \ - .empty; \ -noerr: nop ; -#else -#define SYSRESTART(x) \ - bcc noerr; \ - cmp %o0, SV_ERESTART; \ - be,a x; \ - ld [%sp+68], %o0; \ - ba .cerror; \ - .empty; \ -noerr: nop ; -#endif - -#define RET retl; nop; - -#ifdef PIC -#define CERROR(free_reg) \ - bcc noerr; \ - PIC_SETUP(free_reg); \ - .empty; \ - ld [%free_reg+ .cerror],%free_reg; \ - jmp %free_reg; \ - .empty; \ -noerr: nop; -#else -#define CERROR(free_reg) \ - bcc noerr; \ - .empty; \ - sethi %hi(.cerror), %free_reg;\ - or %free_reg, %lo(.cerror), %free_reg;\ - jmp %free_reg;\ - .empty;\ -noerr: nop; -#endif diff --git a/usr/src/lib/libbc/sparc/inc/sparc/asm_linkage.h b/usr/src/lib/libbc/sparc/inc/sparc/asm_linkage.h deleted file mode 100644 index 426cede7d9..0000000000 --- a/usr/src/lib/libbc/sparc/inc/sparc/asm_linkage.h +++ /dev/null @@ -1,332 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1987 by Sun Microsystems, Inc. - */ - -#ifndef _SYS_ASM_LINKAGE_H -#define _SYS_ASM_LINKAGE_H - -#pragma ident "%Z%%M% %I% %E% SMI" - /* from SunOS 4.0 1.4 */ - -/* allow word aligned user stacks */ -#define PARTIAL_ALIGN - -/* - * A stack frame looks like: - * - * %fp->| | - * |-------------------------------| - * | Locals, temps, saved floats | - * |-------------------------------| - * | outgoing parameters past 6 | - * |-------------------------------|-\ - * | 6 words for callee to dump | | - * | register arguments | | - * |-------------------------------| > minimum stack frame - * | One word struct-ret address | | - * |-------------------------------| | - * | 16 words to save IN and | | - * %sp->| LOCAL register on overflow | | - * |-------------------------------|-/ - */ - -/* - * Constants defining a stack frame. - */ -#define WINDOWSIZE (16*4) /* size of window save area */ -#define ARGPUSHSIZE (6*4) /* size of arg dump area */ -#define ARGPUSH (WINDOWSIZE+4) /* arg dump area offset */ -#define MINFRAME (WINDOWSIZE+ARGPUSHSIZE+4) /* min frame */ - -/* - * Stack alignment macros. - */ -#define STACK_ALIGN 8 -#define SA(X) (((X)+(STACK_ALIGN-1)) & ~(STACK_ALIGN-1)) - -#ifdef _ASM /* The remainder of this file is only for assembly files */ - -/* - * Symbolic section definitions. - */ -#define RODATA ".rodata" - -/* - * profiling causes defintions of the MCOUNT and RTMCOUNT - * particular to the type - */ -#ifdef GPROF - -#define MCOUNT(x) \ - save %sp, -SA(MINFRAME), %sp; \ - call mcount; \ - nop ; \ - restore ; - -#endif /* GPROF */ - -#ifdef PROF - -#define MCOUNT(x) \ - save %sp, -SA(MINFRAME), %sp; \ - sethi %hi(.L_/**/x/**/1), %o0; \ - call mcount; \ - or %o0, %lo(.L_/**/x/**/1), %o0; \ - restore; \ - .common .L_/**/x/**/1, 4, ".bss"; - -#endif /* PROF */ - -/* - * if we are not profiling, MCOUNT should be defined to nothing - */ -#if !defined(PROF) && !defined(GPROF) -#define MCOUNT(x) -#endif /* !defined(PROF) && !defined(GPROF) */ - -#define RTMCOUNT(x) MCOUNT(x) - -/* - * Pre-ansi compiler versions prepended an underscore to function names. - * This macro provides this function. - */ -#ifndef __STDC__ -#define NAME(x) _/**/x -#endif /* __STDC__ */ - -/* - * Macro to define weak symbol aliases. These are similar to the ANSI-C - * #pragma weak name = _name - * except a compiler can determine type. The assembler must be told. Hence, - * the second parameter must be the type of the symbol (i.e.: function,...) - */ -#ifdef __STDC__ -#define ANSI_PRAGMA_WEAK(sym,stype) \ - .weak sym; \ - .type sym,#stype; \ -sym = _/**/sym -#endif /* __STDC__ */ - -/* - * ENTRY provides a way to insert the calls to mcount for profiling. - */ -#ifdef __STDC__ - -#define ENTRY(x) \ - .section ".text"; \ - .align 4; \ - .global x; \ - .type x,#function; \ -x: MCOUNT(x) - -#define RTENTRY(x) \ - .global x; x: RTMCOUNT(x) - -#else /* __STDC__ */ - -#define ENTRY(x) \ - .global NAME(x); \ - NAME(x): MCOUNT(x) - -#define RTENTRY(x) \ - .global x; x: RTMCOUNT(x) - -#endif /* __STDC__ */ - -/* - * ENTRY2 is identical to ENTRY but provides two labels for the entry point. - */ -#ifdef __STDC__ - -#define ENTRY2(x,y) \ - .section ".text"; \ - .align 4; \ - .global x, y; \ - .type x,#function; \ - .type y,#function; \ -x: ; \ -y: MCOUNT(x) - -#else /* __STDC__ */ - -#define ENTRY2(x,y) \ - .global NAME(x), NAME(y); \ - NAME(x): ; \ - NAME(y): MCOUNT(x) - -#endif /* __STDC__ */ - -/* - * ALTENTRY provides for additional entry points. - */ -#ifdef __STDC__ - -#define ALTENTRY(x) \ - .global x; \ - .type x,#function; \ -x: - -#else /* __STDC__ */ - -#define ALTENTRY(x) \ - .global NAME(x); \ - NAME(x): - -#endif /* __STDC__ */ - -/* - * DGDEF and DGDEF2 provide global data declarations. - */ -#ifdef __STDC__ - -#define DGDEF2(name,sz) \ - .section ".data"; \ - .global name; \ - .type name,#object; \ - .size name,sz; \ -name: - -#else /* __STDC__ */ - -#define DGDEF2(name,sz) \ - .section ".data"; \ - .global name; \ -name: - -#endif /* __STDC__ */ - -#define DGDEF(name) DGDEF2(name,4) - -/* - * SET_SIZE trails a function and set the size for the ELF symbol table. - */ -#ifdef __STDC__ - -#define SET_SIZE(x) \ - .size x,(.-x) - -#else /* __STDC__ */ - -#define SET_SIZE(x) - -#endif /* __STDC__ */ - -#ifdef _KERNEL -/* - * Macros for saving/restoring registers. - */ - -#define SAVE_GLOBALS(RP) \ - st %g1, [RP + G1*4]; \ - std %g2, [RP + G2*4]; \ - std %g4, [RP + G4*4]; \ - std %g6, [RP + G6*4]; \ - mov %y, %g1; \ - st %g1, [RP + Y*4] - -#define RESTORE_GLOBALS(RP) \ - ld [RP + Y*4], %g1; \ - mov %g1, %y; \ - ld [RP + G1*4], %g1; \ - ldd [RP + G2*4], %g2; \ - ldd [RP + G4*4], %g4; \ - ldd [RP + G6*4], %g6; - -#define SAVE_OUTS(RP) \ - std %i0, [RP + O0*4]; \ - std %i2, [RP + O2*4]; \ - std %i4, [RP + O4*4]; \ - std %i6, [RP + O6*4]; - -#define RESTORE_OUTS(RP) \ - ldd [RP + O0*4], %i0; \ - ldd [RP + O2*4], %i2; \ - ldd [RP + O4*4], %i4; \ - ldd [RP + O6*4], %i6; - -#define SAVE_WINDOW(SBP) \ - std %l0, [SBP + (0*4)]; \ - std %l2, [SBP + (2*4)]; \ - std %l4, [SBP + (4*4)]; \ - std %l6, [SBP + (6*4)]; \ - std %i0, [SBP + (8*4)]; \ - std %i2, [SBP + (10*4)]; \ - std %i4, [SBP + (12*4)]; \ - std %i6, [SBP + (14*4)]; - -#define RESTORE_WINDOW(SBP) \ - ldd [SBP + (0*4)], %l0; \ - ldd [SBP + (2*4)], %l2; \ - ldd [SBP + (4*4)], %l4; \ - ldd [SBP + (6*4)], %l6; \ - ldd [SBP + (8*4)], %i0; \ - ldd [SBP + (10*4)], %i2; \ - ldd [SBP + (12*4)], %i4; \ - ldd [SBP + (14*4)], %i6; - -#ifdef PARTIAL_ALIGN - -#define SAVE_WINDOW_S(SBP) \ - st %l0, [SBP + (0*4)]; \ - st %l1, [SBP + (1*4)]; \ - st %l2, [SBP + (2*4)]; \ - st %l3, [SBP + (3*4)]; \ - st %l4, [SBP + (4*4)]; \ - st %l5, [SBP + (5*4)]; \ - st %l6, [SBP + (6*4)]; \ - st %l7, [SBP + (7*4)]; \ - st %i0, [SBP + (8*4)]; \ - st %i1, [SBP + (9*4)]; \ - st %i2, [SBP + (10*4)]; \ - st %i3, [SBP + (11*4)]; \ - st %i4, [SBP + (12*4)]; \ - st %i5, [SBP + (13*4)]; \ - st %i6, [SBP + (14*4)]; \ - st %i7, [SBP + (15*4)] - -#define RESTORE_WINDOW_S(SBP) \ - ld [SBP + (0*4)], %l0; \ - ld [SBP + (1*4)], %l1; \ - ld [SBP + (2*4)], %l2; \ - ld [SBP + (3*4)], %l3; \ - ld [SBP + (4*4)], %l4; \ - ld [SBP + (5*4)], %l5; \ - ld [SBP + (6*4)], %l6; \ - ld [SBP + (7*4)], %l7; \ - ld [SBP + (8*4)], %i0; \ - ld [SBP + (9*4)], %i1; \ - ld [SBP + (10*4)], %i2; \ - ld [SBP + (11*4)], %i3; \ - ld [SBP + (12*4)], %i4; \ - ld [SBP + (13*4)], %i5; \ - ld [SBP + (14*4)], %i6; \ - ld [SBP + (15*4)], %i7 - -#endif /* PARTIAL_ALIGN */ - -#endif /* _KERNEL */ - -#endif /* _ASM */ - -#endif /* _SYS_ASM_LINKAGE_H */ |
