diff options
author | Richard Lowe <richlowe@richlowe.net> | 2022-10-03 19:50:13 -0500 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2022-10-10 16:02:34 -0500 |
commit | 564d52366b33ac17bebd5b441ac47b668dfcb6cd (patch) | |
tree | f61fbde92eebd0c863d76d2e18b70deb149f7018 /usr/src/lib/libc/sparc | |
parent | 6faa6645c7a15dbddad859508e1f766bf1cef639 (diff) | |
download | illumos-joyent-564d52366b33ac17bebd5b441ac47b668dfcb6cd.tar.gz |
15040 remove support for unused sun studio inline asm
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
Approved by: Patrick Mooney <pmooney@pfmooney.com>
Diffstat (limited to 'usr/src/lib/libc/sparc')
-rw-r--r-- | usr/src/lib/libc/sparc/Makefile.com | 73 | ||||
-rw-r--r-- | usr/src/lib/libc/sparc/fp/__quad.il | 156 | ||||
-rw-r--r-- | usr/src/lib/libc/sparc/fp/__quad.s | 7 | ||||
-rw-r--r-- | usr/src/lib/libc/sparc/fp/base.il | 71 | ||||
-rw-r--r-- | usr/src/lib/libc/sparc/threads/sparc.il | 120 |
5 files changed, 2 insertions, 425 deletions
diff --git a/usr/src/lib/libc/sparc/Makefile.com b/usr/src/lib/libc/sparc/Makefile.com index e7aef5c09d..14a833bcc6 100644 --- a/usr/src/lib/libc/sparc/Makefile.com +++ b/usr/src/lib/libc/sparc/Makefile.com @@ -1202,78 +1202,10 @@ CLOBBERFILES += $(LIB_PIC) $(DYNLIB) := CRTI = crti.o $(DYNLIB) := CRTN = crtn.o -# Files which need the threads .il inline template -TIL= \ - aio.o \ - alloc.o \ - assfail.o \ - atexit.o \ - atfork.o \ - cancel.o \ - door_calls.o \ - err.o \ - errno.o \ - getctxt.o \ - lwp.o \ - ma.o \ - machdep.o \ - posix_aio.o \ - pthr_attr.o \ - pthr_barrier.o \ - pthr_cond.o \ - pthr_mutex.o \ - pthr_rwlock.o \ - pthread.o \ - rand.o \ - rwlock.o \ - scalls.o \ - sched.o \ - sema.o \ - sigaction.o \ - sigev_thread.o \ - spawn.o \ - stack.o \ - swapctxt.o \ - synch.o \ - tdb_agent.o \ - thr.o \ - thread_interface.o \ - thread_pool.o \ - tls.o \ - tsd.o \ - unwind.o - -$(TIL:%=pics/%) := CFLAGS += $(LIBCBASE)/threads/sparc.il - # special kludge for inlines with 'cas': pics/rwlock.o pics/synch.o pics/lwp.o pics/door_calls.o := \ sparc_CFLAGS += -_gcc=-Wa,-xarch=v8plus -# Files in port/fp subdirectory that need base.il inline template -IL= \ - __flt_decim.o \ - decimal_bin.o - -$(IL:%=pics/%) := CFLAGS += $(LIBCBASE)/fp/base.il - -# Files in fp subdirectory which need __quad.il inline template -QIL= \ - _Q_add.o \ - _Q_cmp.o \ - _Q_cmpe.o \ - _Q_div.o \ - _Q_dtoq.o \ - _Q_fcc.o \ - _Q_mul.o \ - _Q_qtod.o \ - _Q_qtoi.o \ - _Q_qtos.o \ - _Q_qtou.o \ - _Q_sqrt.o \ - _Q_stoq.o \ - _Q_sub.o - -$(QIL:%=pics/%) := CFLAGS += $(LIBCDIR)/$(MACH)/fp/__quad.il pics/_Q%.o := sparc_COPTFLAG = -xO4 -dalign pics/__quad%.o := sparc_COPTFLAG = -xO4 -dalign @@ -1328,11 +1260,6 @@ STACKPROTECT = none all: $(LIBS) $(LIB_PIC) -# object files that depend on inline template -$(TIL:%=pics/%): $(LIBCBASE)/threads/sparc.il -$(IL:%=pics/%): $(LIBCBASE)/fp/base.il -$(QIL:%=pics/%): $(LIBCDIR)/$(MACH)/fp/__quad.il - # include common libc targets include $(LIBCDIR)/Makefile.targ diff --git a/usr/src/lib/libc/sparc/fp/__quad.il b/usr/src/lib/libc/sparc/fp/__quad.il deleted file mode 100644 index 6750aea28f..0000000000 --- a/usr/src/lib/libc/sparc/fp/__quad.il +++ /dev/null @@ -1,156 +0,0 @@ -! -! Copyright 2005 Sun Microsystems, Inc. All rights reserved. -! Use is subject to license terms. -! -! 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 -! -! -! .ident "%Z%%M% %I% %E% SMI" -! -! This file contains inline templates for the internal routines used -! by the quad precision emulation code for SPARC. It should be used -! in preference to __quad.s whenever possible. - - .inline __quad_getfsrp,1 - st %fsr,[%o0] - .end - - .inline __quad_setfsrp,1 - ld [%o0],%fsr - .end - - .inline __quad_dp_sqrt,1 - ldd [%o0],%f0 - fsqrtd %f0,%f0 - .end - - .inline __quad_faddq,3 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - ldd [%o1],%f4 - ldd [%o1+8],%f6 - faddq %f0,%f4,%f8 - std %f8,[%o2] - std %f10,[%o2+8] - .end - - .inline __quad_fsubq,3 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - ldd [%o1],%f4 - ldd [%o1+8],%f6 - fsubq %f0,%f4,%f8 - std %f8,[%o2] - std %f10,[%o2+8] - .end - - .inline __quad_fmulq,3 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - ldd [%o1],%f4 - ldd [%o1+8],%f6 - fmulq %f0,%f4,%f8 - std %f8,[%o2] - std %f10,[%o2+8] - .end - - .inline __quad_fdivq,3 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - ldd [%o1],%f4 - ldd [%o1+8],%f6 - fdivq %f0,%f4,%f8 - std %f8,[%o2] - std %f10,[%o2+8] - .end - - .inline __quad_fsqrtq,2 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - fsqrtq %f0,%f4 - std %f4,[%o1] - std %f6,[%o1+8] - .end - - .inline __quad_fcmpq,3 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - ldd [%o1],%f4 - ldd [%o1+8],%f6 - .volatile - fcmpq %f0,%f4 - st %fsr,[%o2] - .nonvolatile - .end - - .inline __quad_fcmpeq,3 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - ldd [%o1],%f4 - ldd [%o1+8],%f6 - .volatile - fcmpeq %f0,%f4 - st %fsr,[%o2] - .nonvolatile - .end - - .inline __quad_fstoq,2 - ld [%o0],%f0 - fstoq %f0,%f4 - std %f4,[%o1] - std %f6,[%o1+8] - .end - - .inline __quad_fdtoq,2 - ldd [%o0],%f0 - fdtoq %f0,%f4 - std %f4,[%o1] - std %f6,[%o1+8] - .end - - .inline __quad_fqtoi,2 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - fqtoi %f0,%f4 - st %f4,[%o1] - .end - - .inline __quad_fqtos,2 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - fqtos %f0,%f4 - st %f4,[%o1] - .end - - .inline __quad_fqtod,2 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - fqtod %f0,%f4 - std %f4,[%o1] - .end - -! only used in V9 code - .inline __quad_fqtox,2 - ldd [%o0],%f0 - ldd [%o0+8],%f2 - fqtox %f0,%f4 - std %f4,[%o1] - .end diff --git a/usr/src/lib/libc/sparc/fp/__quad.s b/usr/src/lib/libc/sparc/fp/__quad.s index 7954bcd4ca..c448a2defc 100644 --- a/usr/src/lib/libc/sparc/fp/__quad.s +++ b/usr/src/lib/libc/sparc/fp/__quad.s @@ -26,13 +26,10 @@ */ /* - * These are functions corresponding to the inlines in __quad.il - * They are compiled as functions only when building sparc libc with gcc. - * Someone may want to make them into gcc inlines (__inline__ + __asm__). + * These are functions corresponding to some which used to be inline, with Sun + * Studio. Someone may want to make them into gcc inline asm. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/asm_linkage.h> ENTRY_NP(__quad_getfsrp) diff --git a/usr/src/lib/libc/sparc/fp/base.il b/usr/src/lib/libc/sparc/fp/base.il deleted file mode 100644 index e13b3e6447..0000000000 --- a/usr/src/lib/libc/sparc/fp/base.il +++ /dev/null @@ -1,71 +0,0 @@ -! .ident "%Z%%M% %I% %E% SMI" -! -! Copyright 2005 Sun Microsystems, Inc. All rights reserved. -! Use is subject to license terms. -! -! 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 -! - - .inline __mul_set,3 - std %o0,[%sp+0x48] ! save x - ldd [%sp+0x48],%f0 - std %o2,[%sp+0x50] ! save y - ldd [%sp+0x50],%f2 - .volatile - fmuld %f0,%f2,%f0 ! compute result and leave it for return - st %fsr,[%sp+0x44] - .nonvolatile - ld [%sp+0x44],%o0 - and %o0,1,%o0 - st %o0,[%o4] ! store eround - .end - - .inline __div_set,3 - std %o0,[%sp+0x48] ! save x - ldd [%sp+0x48],%f0 - std %o2,[%sp+0x50] ! save y - ldd [%sp+0x50],%f2 - .volatile - fdivd %f0,%f2,%f0 ! compute result and leave it for return - st %fsr,[%sp+0x44] - .nonvolatile - ld [%sp+0x44],%o0 - and %o0,1,%o0 - st %o0,[%o4] ! store eround - .end - - .inline __dabs,2 - ld [%o0],%f0 - ld [%o0+4],%f1 - fabss %f0,%f0 - .end - - .inline __get_ieee_flags,1 - .volatile - st %fsr,[%o0] - st %g0,[%sp+0x44] - ld [%sp+0x44],%fsr - .nonvolatile - .end - - .inline __set_ieee_flags,1 - ld [%o0],%fsr - .end diff --git a/usr/src/lib/libc/sparc/threads/sparc.il b/usr/src/lib/libc/sparc/threads/sparc.il deleted file mode 100644 index 57d351ae6d..0000000000 --- a/usr/src/lib/libc/sparc/threads/sparc.il +++ /dev/null @@ -1,120 +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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - - .inline _curthread, 0 - .register %g7, #scratch - mov %g7, %o0 - .end - - .inline __curthread, 0 - .register %g7, #scratch - ld [%g7 + 80], %o0 ! ul_self - .end - - .inline stkptr, 0 - mov %sp, %o0 - .end - - .inline gethrtime, 0 - ta 0x24 - .end - - .inline set_lock_byte, 0 - ldstub [%o0], %o0 - .end - - /* - * When compiling with -xarch=v8, the compiler refuses to - * accept the 'cas' instruction, so we encode it in hex below. - * We can't compile the 32-bit libc with -xarch=v8plus because - * then %g5 would become a scratch register and we would break - * 32-bit applications that use %g5 as an invariant register. - */ - - .inline atomic_cas_32, 0 - .word 0xd5e21009 ! cas [%o0], %o1, %o2 - mov %o2, %o0 - .end - - .inline atomic_swap_32, 0 - ld [%o0], %o2 -1: - mov %o1, %o3 - .word 0xd7e2100a ! cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a 1b - mov %o3, %o2 - mov %o3, %o0 - .end - - .inline atomic_inc_32, 0 - ld [%o0], %o2 -1: - add %o2, 1, %o3 - .word 0xd7e2100a ! cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a 1b - mov %o3, %o2 - .end - - .inline atomic_dec_32, 0 - ld [%o0], %o2 -1: - sub %o2, 1, %o3 - .word 0xd7e2100a ! cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a 1b - mov %o3, %o2 - .end - - .inline atomic_and_32, 0 - ld [%o0], %o2 -1: - and %o2, %o1, %o3 - .word 0xd7e2100a ! cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a 1b - mov %o3, %o2 - .end - - .inline atomic_or_32, 0 - ld [%o0], %o2 -1: - or %o2, %o1, %o3 - .word 0xd7e2100a ! cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a 1b - mov %o3, %o2 - .end - - .inline caller, 0 - mov %i7, %o0 - .end - - .inline getfp, 0 - mov %fp, %o0 - .end |