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 | |
parent | 6faa6645c7a15dbddad859508e1f766bf1cef639 (diff) | |
download | illumos-gate-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')
-rw-r--r-- | usr/src/lib/libc/amd64/Makefile | 48 | ||||
-rw-r--r-- | usr/src/lib/libc/amd64/threads/amd64.il | 83 | ||||
-rw-r--r-- | usr/src/lib/libc/i386/Makefile.com | 47 | ||||
-rw-r--r-- | usr/src/lib/libc/i386/threads/i386.il | 94 | ||||
-rw-r--r-- | usr/src/lib/libc/inc/base_inlines.h | 6 | ||||
-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 | ||||
-rw-r--r-- | usr/src/lib/libc/sparcv9/Makefile.com | 80 | ||||
-rw-r--r-- | usr/src/lib/libc/sparcv9/fp/base.il | 62 | ||||
-rw-r--r-- | usr/src/lib/libc/sparcv9/threads/sparcv9.il | 117 |
13 files changed, 4 insertions, 960 deletions
diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile index d70eeae879..65f78e3089 100644 --- a/usr/src/lib/libc/amd64/Makefile +++ b/usr/src/lib/libc/amd64/Makefile @@ -1121,50 +1121,6 @@ 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 \ - 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 \ - synch.o \ - tdb_agent.o \ - thr.o \ - thread_interface.o \ - thread_pool.o \ - thrp_unwind.o \ - tls.o \ - tmem.o \ - tsd.o - -$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/amd64.il - -# pics/mul64.o := CFLAGS64 += crt/mul64.il - # large-file-aware components that should be built large #$(COMSYSOBJS64:%=pics/%) := \ @@ -1212,10 +1168,6 @@ STACKPROTECT = none all: $(LIBS) $(LIB_PIC) -# object files that depend on inline template -$(TIL:%=pics/%): $(LIBCBASE)/threads/amd64.il -# pics/mul64.o: crt/mul64.il - # include common libc targets include ../Makefile.targ diff --git a/usr/src/lib/libc/amd64/threads/amd64.il b/usr/src/lib/libc/amd64/threads/amd64.il deleted file mode 100644 index c0b81e0c4b..0000000000 --- a/usr/src/lib/libc/amd64/threads/amd64.il +++ /dev/null @@ -1,83 +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 - movq %fs:0, %rax - .end - - .inline __curthread, 0 - movq %fs:0, %rax - .end - - .inline stkptr, 0 - movq %rsp, %rax - .end - - .inline gethrtime, 0 - movl $3, %eax - int $0xd2 - .end - - .inline set_lock_byte, 0 - movl $1, %eax - xchgb %al, (%rdi) - .end - - .inline atomic_cas_32, 0 - movl %esi, %eax - lock - cmpxchgl %edx, (%rdi) - .end - - .inline atomic_swap_32, 0 - movl %esi, %eax - xchgl (%rdi), %eax - .end - - .inline atomic_inc_32, 0 - lock - incl (%rdi) - .end - - .inline atomic_dec_32, 0 - lock - decl (%rdi) - .end - - .inline atomic_and_32, 0 - lock - andl %esi, (%rdi) - .end - - .inline atomic_or_32, 0 - lock - orl %esi, (%rdi) - .end - - .inline ht_pause, 0 - rep / "rep nop" is equivalent to "pause" - nop - .end diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com index d10a97b984..74a3f63cc0 100644 --- a/usr/src/lib/libc/i386/Makefile.com +++ b/usr/src/lib/libc/i386/Makefile.com @@ -1182,49 +1182,6 @@ 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 \ - 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 \ - synch.o \ - tdb_agent.o \ - thr.o \ - thread_interface.o \ - thread_pool.o \ - tls.o \ - tsd.o \ - tmem.o \ - unwind.o - -THREADS_INLINES = $(LIBCBASE)/threads/i386.il -$(TIL:%=pics/%) := CFLAGS += $(THREADS_INLINES) - # pics/mul64.o := CFLAGS += $(LIBCBASE)/crt/mul64.il # large-file-aware components that should be built large @@ -1277,10 +1234,6 @@ STACKPROTECT = none all: $(LIBS) $(LIB_PIC) -# object files that depend on inline template -$(TIL:%=pics/%): $(LIBCBASE)/threads/i386.il -# pics/mul64.o: $(LIBCBASE)/crt/mul64.il - # include common libc targets include $(LIBCDIR)/Makefile.targ diff --git a/usr/src/lib/libc/i386/threads/i386.il b/usr/src/lib/libc/i386/threads/i386.il deleted file mode 100644 index 9ce94d452a..0000000000 --- a/usr/src/lib/libc/i386/threads/i386.il +++ /dev/null @@ -1,94 +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 - movl %gs:0, %eax - .end - - .inline __curthread, 0 - movl %gs:0, %eax - .end - - .inline stkptr, 0 - movl %esp, %eax - .end - - .inline gethrtime, 0 - movl $3, %eax - int $0xd2 - .end - - .inline set_lock_byte, 0 - movl $1, %eax - movl (%esp), %ecx - xchgb %al, (%ecx) - .end - - .inline atomic_cas_32, 0 - movl 0(%esp), %edx - movl 4(%esp), %eax - movl 8(%esp), %ecx - lock - cmpxchgl %ecx, (%edx) - .end - - .inline atomic_swap_32, 0 - movl 0(%esp), %ecx - movl 4(%esp), %eax - xchgl (%ecx), %eax - .end - - .inline atomic_inc_32, 0 - movl 0(%esp), %eax - lock - incl (%eax) - .end - - .inline atomic_dec_32, 0 - movl 0(%esp), %eax - lock - decl (%eax) - .end - - .inline atomic_and_32, 0 - movl 0(%esp), %ecx - movl 4(%esp), %eax - lock - andl %eax, (%ecx) - .end - - .inline atomic_or_32, 0 - movl 0(%esp), %ecx - movl 4(%esp), %eax - lock - orl %eax, (%ecx) - .end - - .inline ht_pause, 0 - rep / "rep nop" is equivalent to "pause" - nop - .end diff --git a/usr/src/lib/libc/inc/base_inlines.h b/usr/src/lib/libc/inc/base_inlines.h index c9bf36a90c..982db18299 100644 --- a/usr/src/lib/libc/inc/base_inlines.h +++ b/usr/src/lib/libc/inc/base_inlines.h @@ -33,10 +33,8 @@ #if !defined(__lint) && defined(__GNUC__) /* - * This file is intended to contain gcc-style inline assembly that corresponds - * to base.il for all architectures. At the moment these inlines exist only - * for sparc and sparcv9 and these functions are implemented in C for x86. - * They should be inlined here for gcc if a new x86 base.il is created. + * At the moment these inlines exist only for sparc and sparcv9 and these + * functions are implemented in C for x86. */ #if defined(__sparc) 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 diff --git a/usr/src/lib/libc/sparcv9/Makefile.com b/usr/src/lib/libc/sparcv9/Makefile.com index 4986856504..ec8b35c83a 100644 --- a/usr/src/lib/libc/sparcv9/Makefile.com +++ b/usr/src/lib/libc/sparcv9/Makefile.com @@ -1133,83 +1133,9 @@ 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/%) := CFLAGS64 += $(LIBCBASE)/threads/sparcv9.il - -# Files in fp, port/fp subdirectories that need base.il inline template -IL= \ - __flt_decim.o \ - decimal_bin.o - -$(IL:%=pics/%) := CFLAGS64 += $(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 \ - _Qp_qtox.o \ - _Qp_qtoux.o - -$(QIL:%=pics/%) := CFLAGS64 += $(LIBCDIR)/$(MACH)/fp/__quad.il pics/_Qp%.o := CFLAGS64 += -I$(LIBCDIR)/$(MACH)/fp pics/_Q%.o := sparcv9_COPTFLAG = -xO4 -xchip=ultra -# Files in crt subdirectory which need muldiv64.il inline template -#CIL= mul64.o divrem64.o -#$(CIL:%=pics/%) := CFLAGS += $(LIBCBASE)/crt/mul64.il - # large-file-aware components that should be built large #$(COMSYSOBJS64:%=pics/%) := \ @@ -1251,12 +1177,6 @@ STACKPROTECT = none all: $(LIBS) $(LIB_PIC) -# object files that depend on inline template -$(TIL:%=pics/%): $(LIBCBASE)/threads/sparcv9.il -$(IL:%=pics/%): $(LIBCBASE)/fp/base.il -$(QIL:%=pics/%): $(LIBCDIR)/$(MACH)/fp/__quad.il -#$(CIL:%=pics/%): $(LIBCBASE)/crt/muldiv64.il - # include common libc targets include $(LIBCDIR)/Makefile.targ diff --git a/usr/src/lib/libc/sparcv9/fp/base.il b/usr/src/lib/libc/sparcv9/fp/base.il deleted file mode 100644 index 8bdab78f32..0000000000 --- a/usr/src/lib/libc/sparcv9/fp/base.il +++ /dev/null @@ -1,62 +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,0 - .volatile - fmuld %f0,%f2,%f0 ! compute result and leave it for return - st %fsr,[%sp+0x87f] - .nonvolatile - ld [%sp+0x87f],%o0 - and %o0,1,%o0 - st %o0,[%o2] ! store eround - .end - - .inline __div_set,0 - .volatile - fdivd %f0,%f2,%f0 - st %fsr,[%sp+0x87f] - .nonvolatile - ld [%sp+0x87f],%o0 - and %o0,1,%o0 - st %o0,[%o2] ! store eround - .end - - .inline __dabs,0 - ldd [%o0],%f0 - fabsd %f0,%f0 - .end - - .inline __get_ieee_flags,0 - .volatile - st %fsr,[%o0] - st %g0,[%sp+0x87f] - ld [%sp+0x87f],%fsr - .nonvolatile - .end - - .inline __set_ieee_flags,0 - ld [%o0],%fsr - .end diff --git a/usr/src/lib/libc/sparcv9/threads/sparcv9.il b/usr/src/lib/libc/sparcv9/threads/sparcv9.il deleted file mode 100644 index 4f1d543f6c..0000000000 --- a/usr/src/lib/libc/sparcv9/threads/sparcv9.il +++ /dev/null @@ -1,117 +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 - ldx [%g7 + 80], %o0 ! ul_self - .end - - .inline stkptr, 0 - mov %sp, %o0 - .end - - .inline gethrtime, 0 - .volatile - ta 0x24 - sllx %o0, 32, %o0 - or %o1, %o0, %o0 - .nonvolatile - .end - - .inline set_lock_byte, 0 - ldstub [%o0], %o0 - membar #LoadLoad - .end - - .inline atomic_cas_32, 0 - cas [%o0], %o1, %o2 - mov %o2, %o0 - .end - - .inline atomic_swap_32, 0 - ld [%o0], %o2 -1: - mov %o1, %o3 - cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a,pn %icc, 1b - mov %o3, %o2 - mov %o3, %o0 - .end - - .inline atomic_inc_32, 0 - ld [%o0], %o2 -1: - add %o2, 1, %o3 - cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a,pn %icc, 1b - mov %o3, %o2 - .end - - .inline atomic_dec_32, 0 - ld [%o0], %o2 -1: - sub %o2, 1, %o3 - cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a,pn %icc, 1b - mov %o3, %o2 - .end - - .inline atomic_and_32, 0 - ld [%o0], %o2 -1: - and %o2, %o1, %o3 - cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a,pn %icc, 1b - mov %o3, %o2 - .end - - .inline atomic_or_32, 0 - ld [%o0], %o2 -1: - or %o2, %o1, %o3 - cas [%o0], %o2, %o3 - cmp %o2, %o3 - bne,a,pn %icc, 1b - mov %o3, %o2 - .end - - .inline caller, 0 - mov %i7, %o0 - .end - - .inline getfp, 0 - mov %fp, %o0 - .end |