diff options
62 files changed, 73 insertions, 5990 deletions
diff --git a/usr/src/common/crypto/md5/md5_byteswap.h b/usr/src/common/crypto/md5/md5_byteswap.h index 672dd4d538..02d6b54576 100644 --- a/usr/src/common/crypto/md5/md5_byteswap.h +++ b/usr/src/common/crypto/md5/md5_byteswap.h @@ -33,9 +33,6 @@ * This file has special definitions for UltraSPARC architectures, * which have a special address space identifier for loading 32 and 16 bit * integers in little-endian byte order. - * - * This file and common/crypto/md5/sparc/sun4[uv]/byteswap.il implement the - * same thing and must be changed together. */ #include <sys/types.h> @@ -197,6 +194,7 @@ load_little_32_##__off(uint32_t *addr) \ return (value); \ } +/* BEGIN CSTYLED */ LL_TEMPLATE(0) LL_TEMPLATE(1) LL_TEMPLATE(2) @@ -213,6 +211,7 @@ LL_TEMPLATE(c) LL_TEMPLATE(d) LL_TEMPLATE(e) LL_TEMPLATE(f) +/* END CSTYLED */ #undef LL_TEMPLATE #endif /* !__lint && __GNUC__ */ diff --git a/usr/src/common/crypto/md5/sparc/sun4u/byteswap.il b/usr/src/common/crypto/md5/sparc/sun4u/byteswap.il deleted file mode 100644 index c9fd1fb59b..0000000000 --- a/usr/src/common/crypto/md5/sparc/sun4u/byteswap.il +++ /dev/null @@ -1,49 +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 1998 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * byteswap.il -- definitions for .inline functions for little-endian loads. - * - * right now, this file is only used on UltraSPARC architectures, - * which have a special address space identifier for loading 32 and 16 bit - * integers in little-endian byte order. - * - * note: apparently these files are not preprocessed, so we cannot - * use `ASI_PL'. - * - * This file and common/crypto/md5/md5_byteswap.h implement the - * same thing and must be changed together. - */ - - .inline load_little_32, 4 - lduwa [%o0]0x88, %o0 - .end - - .inline load_little_16, 4 - lduha [%o0]0x88, %o0 - .end diff --git a/usr/src/common/crypto/md5/sparc/sun4v/byteswap.il b/usr/src/common/crypto/md5/sparc/sun4v/byteswap.il deleted file mode 100644 index fc6dea58db..0000000000 --- a/usr/src/common/crypto/md5/sparc/sun4v/byteswap.il +++ /dev/null @@ -1,122 +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 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * byteswap.il -- definitions for .inline functions for little-endian loads. - * - * right now, this file is only used on UltraSPARC architectures, - * which have a special address space identifier for loading 32 and 16 bit - * integers in little-endian byte order. - * - * note: apparently these files are not preprocessed, so we cannot - * use `ASI_PL'. - * - * This file and common/crypto/md5/md5_byteswap.h implement the - * same thing and must be changed together. - */ - - .inline load_little_32, 4 - lduwa [%o0]0x88, %o0 - .end - - .inline load_little_16, 4 - lduha [%o0]0x88, %o0 - .end - - .inline set_little,4 - wr %g0, %o0, %asi - .end - - .inline get_little,0 - rd %asi, %o0 - .end - - .inline load_little_32_0, 4 - lduwa [%o0]%asi, %o0 - .end - - .inline load_little_32_1, 4 - lduwa [%o0 + 4]%asi, %o0 - .end - - .inline load_little_32_2, 4 - lduwa [%o0 + 8]%asi, %o0 - .end - - .inline load_little_32_3, 4 - lduwa [%o0 + 12]%asi, %o0 - .end - - .inline load_little_32_4, 4 - lduwa [%o0 + 16]%asi, %o0 - .end - - .inline load_little_32_5, 4 - lduwa [%o0 + 20]%asi, %o0 - .end - - .inline load_little_32_6, 4 - lduwa [%o0 + 24]%asi, %o0 - .end - - .inline load_little_32_7, 4 - lduwa [%o0 + 28]%asi, %o0 - .end - - .inline load_little_32_8, 4 - lduwa [%o0 + 32]%asi, %o0 - .end - - .inline load_little_32_9, 4 - lduwa [%o0 + 36]%asi, %o0 - .end - - .inline load_little_32_a, 4 - lduwa [%o0 + 40]%asi, %o0 - .end - - .inline load_little_32_b, 4 - lduwa [%o0 + 44]%asi, %o0 - .end - - .inline load_little_32_c, 4 - lduwa [%o0 + 48]%asi, %o0 - .end - - .inline load_little_32_d, 4 - lduwa [%o0 + 52]%asi, %o0 - .end - - .inline load_little_32_e, 4 - lduwa [%o0 + 56]%asi, %o0 - .end - - .inline load_little_32_f, 4 - lduwa [%o0 + 60]%asi, %o0 - .end - diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile index ddb61be40f..369df1cbc0 100644 --- a/usr/src/lib/libc/amd64/Makefile +++ b/usr/src/lib/libc/amd64/Makefile @@ -1122,50 +1122,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/%) := \ @@ -1213,10 +1169,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 7c07578141..f49b58b058 100644 --- a/usr/src/lib/libc/i386/Makefile.com +++ b/usr/src/lib/libc/i386/Makefile.com @@ -1183,49 +1183,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 @@ -1278,10 +1235,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 24c31e4c02..ea813fb1b1 100644 --- a/usr/src/lib/libc/sparc/Makefile.com +++ b/usr/src/lib/libc/sparc/Makefile.com @@ -1203,78 +1203,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 @@ -1329,11 +1261,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 eaa772040b..b7c3b49703 100644 --- a/usr/src/lib/libc/sparcv9/Makefile.com +++ b/usr/src/lib/libc/sparcv9/Makefile.com @@ -1134,83 +1134,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/%) := \ @@ -1252,12 +1178,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 diff --git a/usr/src/lib/libm/Makefile.com b/usr/src/lib/libm/Makefile.com index 217d7a360a..1d720b04b6 100644 --- a/usr/src/lib/libm/Makefile.com +++ b/usr/src/lib/libm/Makefile.com @@ -505,8 +505,6 @@ LIBS = $(DYNLIB) CFLAGS += $(C_BIGPICFLAGS) CFLAGS64 += $(C_BIGPICFLAGS) -m9x_IL = $(LIBMDIR)/common/m9x/__fenv_$(TARGET_ARCH).il - SRCS_LD_i386_amd64 = \ ../common/LD/finitel.c \ ../common/LD/isnanl.c \ @@ -1013,5 +1011,3 @@ SRCS = \ .KEEP_STATE: all: $(LIBS) - - diff --git a/usr/src/lib/libm/Makefile.libm.com b/usr/src/lib/libm/Makefile.libm.com index f282d4ee4d..f61ddb2557 100644 --- a/usr/src/lib/libm/Makefile.libm.com +++ b/usr/src/lib/libm/Makefile.libm.com @@ -44,10 +44,8 @@ LDBLDIR_sparc = Q LDBLDIR_i386 = LD LDBLDIR = $(LDBLDIR_$(MACH)) -LM_IL = $(LIBMDIR)/$(TARGET_ARCH)/src/locallibm.il - -CFLAGS += $(C_PICFLAGS) $(XSTRCONST) $(LM_IL) -CFLAGS64 += $(C_PICFLAGS) $(XSTRCONST) $(LM_IL) +CFLAGS += $(C_PICFLAGS) $(XSTRCONST) +CFLAGS64 += $(C_PICFLAGS) $(XSTRCONST) sparc_CFLAGS += -Wa,-xarch=v8plus CPPFLAGS += -I$(LIBMSRC)/C \ diff --git a/usr/src/lib/libm/Makefile.targ b/usr/src/lib/libm/Makefile.targ index e2d96834f8..5a656af8c8 100644 --- a/usr/src/lib/libm/Makefile.targ +++ b/usr/src/lib/libm/Makefile.targ @@ -19,24 +19,24 @@ pics/%.o: $(LIBMDIR)/$(TARGETMACH)/src/%.$(ASSUFFIX) $(COMPILE.s) -o $@ $< $(POST_PROCESS_S_O) -pics/%.o: $(SRCDIR)/C/%.c $(LM_IL) +pics/%.o: $(SRCDIR)/C/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%.o: $(SRCDIR)/$(LDBLDIR)/%.c $(LM_IL) +pics/%.o: $(SRCDIR)/$(LDBLDIR)/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%.o: $(SRCDIR)/R/%.c $(LM_IL) +pics/%.o: $(SRCDIR)/R/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%.o: $(SRCDIR)/complex/%.c $(LM_IL) +pics/%.o: $(SRCDIR)/complex/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%.o: $(SRCDIR)/m9x/%.c $(LM_IL) $(m9x_IL) - $(COMPILE.c) $(m9x_IL) -o $@ $< +pics/%.o: $(SRCDIR)/m9x/%.c + $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) $(ROOTLIBDIR): $(ROOTFS_LIBDIR) diff --git a/usr/src/lib/libm/amd64/src/libm_inlines.h b/usr/src/lib/libm/amd64/src/libm_inlines.h index b0dee03bdf..e8e692d4dd 100644 --- a/usr/src/lib/libm/amd64/src/libm_inlines.h +++ b/usr/src/lib/libm/amd64/src/libm_inlines.h @@ -31,8 +31,6 @@ * Copyright 2011, Richard Lowe. */ -/* Functions in this file are duplicated in locallibm.il. Keep them in sync */ - #ifndef _LIBM_INLINES_H #define _LIBM_INLINES_H diff --git a/usr/src/lib/libm/amd64/src/locallibm.il b/usr/src/lib/libm/amd64/src/locallibm.il deleted file mode 100644 index 375720c84d..0000000000 --- a/usr/src/lib/libm/amd64/src/locallibm.il +++ /dev/null @@ -1,178 +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, this CDDL HEADER in each -/ file and 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 2011 Nexenta Systems, Inc. All rights reserved. -/ -/ Copyright 2006 Sun Microsystems, Inc. All rights reserved. -/ Use is subject to license terms. -/ - -/ Portions of this file are duplicated as GCC inline assembly in -/ libm_inlines.h. Keep them in sync. - - .inline __ieee754_sqrt,0 - sqrtsd %xmm0,%xmm0 - .end - - .inline __inline_sqrtf,0 - sqrtss %xmm0,%xmm0 - .end - - .inline __inline_sqrt,0 - sqrtsd %xmm0,%xmm0 - .end - -/ -/ 00 - 24 bits -/ 01 - reserved -/ 10 - 53 bits -/ 11 - 64 bits -/ - .inline __swapRP,0 - subq $16,%rsp - fstcw (%rsp) - movw (%rsp),%ax - movw %ax,%cx - andw $0xfcff,%cx - andl $0x3,%edi - shlw $8,%di - orw %di,%cx - movl %ecx,(%rsp) - fldcw (%rsp) - shrw $8,%ax - andq $0x3,%rax - addq $16,%rsp - .end - -/ -/ 00 - Round to nearest, with even preferred -/ 01 - Round down -/ 10 - Round up -/ 11 - Chop -/ - .inline __swap87RD,0 - subq $16,%rsp - fstcw (%rsp) - movw (%rsp),%ax - movw %ax,%cx - andw $0xf3ff,%cx - andl $0x3,%edi - shlw $10,%di - orw %di,%cx - movl %ecx,(%rsp) - fldcw (%rsp) - shrw $10,%ax - andq $0x3,%rax - addq $16,%rsp - .end - - .inline abs,0 - cmpl $0,%edi - jge 1f - negl %edi -1: movl %edi,%eax - .end - - .inline copysign,0 - movq $0x7fffffffffffffff,%rax - movdq %rax,%xmm2 - andpd %xmm2,%xmm0 - andnpd %xmm1,%xmm2 - orpd %xmm2,%xmm0 - .end - - .inline fabs,0 - movq $0x7fffffffffffffff,%rax - movdq %rax,%xmm1 - andpd %xmm1,%xmm0 - .end - - .inline fabsf,0 - movl $0x7fffffff,%eax - movdl %eax,%xmm1 - andps %xmm1,%xmm0 - .end - - .inline finite,0 - subq $16,%rsp - movlpd %xmm0,(%rsp) - movq (%rsp),%rcx - movq $0x7fffffffffffffff,%rax - andq %rcx,%rax - movq $0x7ff0000000000000,%rcx - subq %rcx,%rax - shrq $63,%rax - addq $16,%rsp - .end - - .inline signbit,0 - movmskpd %xmm0,%eax - andq $1,%rax - .end - - .inline sqrt,0 - sqrtsd %xmm0,%xmm0 - .end - - .inline sqrtf,0 - sqrtss %xmm0,%xmm0 - .end - - .inline __f95_signf,0 - movl (%rdi),%eax - movl (%rsi),%ecx - andl $0x7fffffff,%eax - andl $0x80000000,%ecx - orl %ecx,%eax - movdl %eax,%xmm0 - .end - - .inline __f95_sign,0 - movq (%rsi),%rax - movq $0x7fffffffffffffff,%rdx - shrq $63,%rax - shlq $63,%rax - andq (%rdi),%rdx - orq %rdx,%rax - movdq %rax,%xmm0 - .end - - .inline __r_sign,0 - movl $0x7fffffff,%eax - movl $0x80000000,%edx - andl (%rdi),%eax - cmpl (%rsi),%edx - cmovel %eax,%edx - andl (%rsi),%edx - orl %edx,%eax - movdl %eax,%xmm0 - .end - - .inline __d_sign,0 - movq $0x7fffffffffffffff,%rax - movq $0x8000000000000000,%rdx - andq (%rdi),%rax - cmpq (%rsi),%rdx - cmoveq %rax,%rdx - andq (%rsi),%rdx - orq %rdx,%rax - movdq %rax,%xmm0 - .end diff --git a/usr/src/lib/libm/common/m9x/__fenv_amd64.il b/usr/src/lib/libm/common/m9x/__fenv_amd64.il deleted file mode 100644 index f28fe47661..0000000000 --- a/usr/src/lib/libm/common/m9x/__fenv_amd64.il +++ /dev/null @@ -1,349 +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 2011 Nexenta Systems, Inc. All rights reserved. -/ -/ Copyright 2006 Sun Microsystems, Inc. All rights reserved. -/ Use is subject to license terms. -/ - .inline __fenv_getcwsw,1 - fstsw (%rdi) - fstcw 2(%rdi) - .end - - .inline __fenv_setcwsw,1 - movw (%rdi),%dx - movw 2(%rdi),%cx - subq $32,%rsp - fstenv (%rsp) - movw %cx,(%rsp) - movw %dx,4(%rsp) - fldenv (%rsp) - fwait - addq $32,%rsp - .end - - .inline __fenv_getmxcsr,1 - stmxcsr (%rdi) - .end - - .inline __fenv_setmxcsr,1 - ldmxcsr (%rdi) - .end - - .inline f2xm1,1 - fldt (%rsp) - f2xm1 - .end - - .inline fyl2x,2 - fldt (%rsp) - fldt 16(%rsp) - fyl2x - .end - - .inline fptan,1 - fldt (%rsp) - fptan - fstpt (%rsp) - .end - - .inline fpatan,2 - fldt (%rsp) - fldt 16(%rsp) - fpatan - .end - - .inline fxtract,1 - fldt (%rsp) - fxtract - .end - - .inline fprem1,2 - fldt (%rsp) - fldt 16(%rsp) - fprem1 - fstp %st(1) - .end - - .inline fprem,2 - fldt (%rsp) - fldt 16(%rsp) - fprem - fstp %st(1) - .end - - .inline fyl2xp1,2 - fldt (%rsp) - fldt 16(%rsp) - fyl2xp1 - .end - - .inline fsqrt,1 - fldt (%rsp) - fsqrt - .end - - .inline fsincos,1 - fldt (%rsp) - fsincos - .end - - .inline frndint,1 - fldt (%rsp) - frndint - .end - - .inline fscale,2 - fldt (%rsp) - fldt 16(%rsp) - fscale - fstp %st(1) - .end - - .inline fsin,1 - fldt (%rsp) - fsin - .end - - .inline fcos,1 - fldt (%rsp) - fcos - .end - - .inline sse_cmpeqss,3 - movss (%rdi),%xmm0 - cmpeqss (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_cmpltss,3 - movss (%rdi),%xmm0 - cmpltss (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_cmpless,3 - movss (%rdi),%xmm0 - cmpless (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_cmpunordss,3 - movss (%rdi),%xmm0 - cmpunordss (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_minss,3 - movss (%rdi),%xmm0 - minss (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_maxss,3 - movss (%rdi),%xmm0 - maxss (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_addss,3 - movss (%rdi),%xmm0 - addss (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_subss,3 - movss (%rdi),%xmm0 - subss (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_mulss,3 - movss (%rdi),%xmm0 - mulss (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_divss,3 - movss (%rdi),%xmm0 - divss (%rsi),%xmm0 - movss %xmm0,(%rdx) - .end - - .inline sse_sqrtss,2 - sqrtss (%rdi),%xmm0 - movss %xmm0,(%rsi) - .end - - .inline sse_ucomiss,2 - movss (%rdi),%xmm0 - ucomiss (%rsi),%xmm0 - .end - - .inline sse_comiss,2 - movss (%rdi),%xmm0 - comiss (%rsi),%xmm0 - .end - - .inline sse_cvtss2sd,2 - cvtss2sd (%rdi),%xmm0 - movsd %xmm0,(%rsi) - .end - - .inline sse_cvtsi2ss,2 - cvtsi2ss (%rdi),%xmm0 - movss %xmm0,(%rsi) - .end - - .inline sse_cvttss2si,2 - cvttss2si (%rdi),%ecx - movl %ecx,(%rsi) - .end - - .inline sse_cvtss2si,2 - cvtss2si (%rdi),%ecx - movl %ecx,(%rsi) - .end - - .inline sse_cvtsi2ssq,2 - cvtsi2ssq (%rdi),%xmm0 - movss %xmm0,(%rsi) - .end - - .inline sse_cvttss2siq,2 - cvttss2siq (%rdi),%rcx - movq %rcx,(%rsi) - .end - - .inline sse_cvtss2siq,2 - cvtss2siq (%rdi),%rcx - movq %rcx,(%rsi) - .end - - .inline sse_cmpeqsd,3 - movsd (%rdi),%xmm0 - cmpeqsd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_cmpltsd,3 - movsd (%rdi),%xmm0 - cmpltsd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_cmplesd,3 - movsd (%rdi),%xmm0 - cmplesd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_cmpunordsd,3 - movsd (%rdi),%xmm0 - cmpunordsd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_minsd,3 - movsd (%rdi),%xmm0 - minsd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_maxsd,3 - movsd (%rdi),%xmm0 - maxsd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_addsd,3 - movsd (%rdi),%xmm0 - addsd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_subsd,3 - movsd (%rdi),%xmm0 - subsd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_mulsd,3 - movsd (%rdi),%xmm0 - mulsd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_divsd,3 - movsd (%rdi),%xmm0 - divsd (%rsi),%xmm0 - movsd %xmm0,(%rdx) - .end - - .inline sse_sqrtsd,2 - sqrtsd (%rdi),%xmm0 - movsd %xmm0,(%rsi) - .end - - .inline sse_ucomisd,2 - movsd (%rdi),%xmm0 - ucomisd (%rsi),%xmm0 - .end - - .inline sse_comisd,2 - movsd (%rdi),%xmm0 - comisd (%rsi),%xmm0 - .end - - .inline sse_cvtsd2ss,2 - cvtsd2ss (%rdi),%xmm0 - movss %xmm0,(%rsi) - .end - - .inline sse_cvtsi2sd,2 - cvtsi2sd (%rdi),%xmm0 - movsd %xmm0,(%rsi) - .end - - .inline sse_cvttsd2si,2 - cvttsd2si (%rdi),%ecx - movl %ecx,(%rsi) - .end - - .inline sse_cvtsd2si,2 - cvtsd2si (%rdi),%ecx - movl %ecx,(%rsi) - .end - - .inline sse_cvtsi2sdq,2 - cvtsi2sdq (%rdi),%xmm0 - movsd %xmm0,(%rsi) - .end - - .inline sse_cvttsd2siq,2 - cvttsd2siq (%rdi),%rcx - movq %rcx,(%rsi) - .end - - .inline sse_cvtsd2siq,2 - cvtsd2siq (%rdi),%rcx - movq %rcx,(%rsi) - .end diff --git a/usr/src/lib/libm/common/m9x/__fenv_i386.il b/usr/src/lib/libm/common/m9x/__fenv_i386.il deleted file mode 100644 index aabc3e6f99..0000000000 --- a/usr/src/lib/libm/common/m9x/__fenv_i386.il +++ /dev/null @@ -1,411 +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 2011 Nexenta Systems, Inc. All rights reserved. -/ -/ Copyright 2006 Sun Microsystems, Inc. All rights reserved. -/ Use is subject to license terms. -/ - .inline __fenv_getcwsw,1 - movl (%esp),%eax - fstsw (%eax) - fstcw 2(%eax) - .end - - .inline __fenv_setcwsw,1 - movl (%esp),%eax - movw (%eax),%dx - movw 2(%eax),%cx - subl $28,%esp - fstenv (%esp) - movw %cx,(%esp) - movw %dx,4(%esp) - fldenv (%esp) - fwait - addl $28,%esp - .end - - .inline __fenv_getmxcsr,1 - movl (%esp),%eax - stmxcsr (%eax) - .end - - .inline __fenv_setmxcsr,1 - movl (%esp),%eax - ldmxcsr (%eax) - .end - - .inline f2xm1,1 - fldt (%esp) - f2xm1 - .end - - .inline fyl2x,2 - fldt (%esp) - fldt 12(%esp) - fyl2x - .end - - .inline fptan,1 - fldt (%esp) - fptan - fstpt (%esp) - .end - - .inline fpatan,2 - fldt (%esp) - fldt 12(%esp) - fpatan - .end - - .inline fxtract,1 - fldt (%esp) - fxtract - .end - - .inline fprem1,2 - fldt (%esp) - fldt 12(%esp) - fprem1 - fstp %st(1) - .end - - .inline fprem,2 - fldt (%esp) - fldt 12(%esp) - fprem - fstp %st(1) - .end - - .inline fyl2xp1,2 - fldt (%esp) - fldt 12(%esp) - fyl2xp1 - .end - - .inline fsqrt,1 - fldt (%esp) - fsqrt - .end - - .inline fsincos,1 - fldt (%esp) - fsincos - .end - - .inline frndint,1 - fldt (%esp) - frndint - .end - - .inline fscale,2 - fldt (%esp) - fldt 12(%esp) - fscale - fstp %st(1) - .end - - .inline fsin,1 - fldt (%esp) - fsin - .end - - .inline fcos,1 - fldt (%esp) - fcos - .end - - .inline sse_cmpeqss,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - cmpeqss (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_cmpltss,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - cmpltss (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_cmpless,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - cmpless (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_cmpunordss,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - cmpunordss (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_minss,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - minss (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_maxss,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - maxss (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_addss,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - addss (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_subss,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - subss (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_mulss,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - mulss (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_divss,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movss (%eax),%xmm0 - divss (%edx),%xmm0 - movss %xmm0,(%ecx) - .end - - .inline sse_sqrtss,2 - movl (%esp),%eax - movl 4(%esp),%edx - sqrtss (%eax),%xmm0 - movss %xmm0,(%edx) - .end - - .inline sse_ucomiss,2 - movl (%esp),%eax - movl 4(%esp),%edx - movss (%eax),%xmm0 - ucomiss (%edx),%xmm0 - .end - - .inline sse_comiss,2 - movl (%esp),%eax - movl 4(%esp),%edx - movss (%eax),%xmm0 - comiss (%edx),%xmm0 - .end - - .inline sse_cvtss2sd,2 - movl (%esp),%eax - movl 4(%esp),%edx - cvtss2sd (%eax),%xmm0 - movsd %xmm0,(%edx) - .end - - .inline sse_cvtsi2ss,2 - movl (%esp),%eax - movl 4(%esp),%edx - cvtsi2ss (%eax),%xmm0 - movss %xmm0,(%edx) - .end - - .inline sse_cvttss2si,2 - movl (%esp),%eax - movl 4(%esp),%edx - cvttss2si (%eax),%ecx - movl %ecx,(%edx) - .end - - .inline sse_cvtss2si,2 - movl (%esp),%eax - movl 4(%esp),%edx - cvtss2si (%eax),%ecx - movl %ecx,(%edx) - .end - - .inline sse_cmpeqsd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - cmpeqsd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_cmpltsd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - cmpltsd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_cmplesd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - cmplesd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_cmpunordsd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - cmpunordsd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_minsd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - minsd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_maxsd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - maxsd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_addsd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - addsd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_subsd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - subsd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_mulsd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - mulsd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_divsd,3 - movl (%esp),%eax - movl 4(%esp),%edx - movl 8(%esp),%ecx - movsd (%eax),%xmm0 - divsd (%edx),%xmm0 - movsd %xmm0,(%ecx) - .end - - .inline sse_sqrtsd,2 - movl (%esp),%eax - movl 4(%esp),%edx - sqrtsd (%eax),%xmm0 - movsd %xmm0,(%edx) - .end - - .inline sse_ucomisd,2 - movl (%esp),%eax - movl 4(%esp),%edx - movsd (%eax),%xmm0 - ucomisd (%edx),%xmm0 - .end - - .inline sse_comisd,2 - movl (%esp),%eax - movl 4(%esp),%edx - movsd (%eax),%xmm0 - comisd (%edx),%xmm0 - .end - - .inline sse_cvtsd2ss,2 - movl (%esp),%eax - movl 4(%esp),%edx - cvtsd2ss (%eax),%xmm0 - movss %xmm0,(%edx) - .end - - .inline sse_cvtsi2sd,2 - movl (%esp),%eax - movl 4(%esp),%edx - cvtsi2sd (%eax),%xmm0 - movsd %xmm0,(%edx) - .end - - .inline sse_cvttsd2si,2 - movl (%esp),%eax - movl 4(%esp),%edx - cvttsd2si (%eax),%ecx - movl %ecx,(%edx) - .end - - .inline sse_cvtsd2si,2 - movl (%esp),%eax - movl 4(%esp),%edx - cvtsd2si (%eax),%ecx - movl %ecx,(%edx) - .end diff --git a/usr/src/lib/libm/common/m9x/__fenv_sparc.il b/usr/src/lib/libm/common/m9x/__fenv_sparc.il deleted file mode 100644 index fd27dcf647..0000000000 --- a/usr/src/lib/libm/common/m9x/__fenv_sparc.il +++ /dev/null @@ -1,41 +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 2011 Nexenta Systems, Inc. All rights reserved. -! -! Copyright 2006 Sun Microsystems, Inc. All rights reserved. -! Use is subject to license terms. -! -! - .inline __fenv_getfsr,1 - st %fsr,[%o0] - .end - - .inline __fenv_setfsr,1 - ld [%o0],%fsr - .end - - .inline __fenv_getfsr32,1 - st %fsr,[%o0] - .end - - .inline __fenv_setfsr32,1 - ld [%o0],%fsr - .end diff --git a/usr/src/lib/libm/common/m9x/__fenv_sparcv9.il b/usr/src/lib/libm/common/m9x/__fenv_sparcv9.il deleted file mode 100644 index b460587a0a..0000000000 --- a/usr/src/lib/libm/common/m9x/__fenv_sparcv9.il +++ /dev/null @@ -1,41 +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 2011 Nexenta Systems, Inc. All rights reserved. -! -! Copyright 2006 Sun Microsystems, Inc. All rights reserved. -! Use is subject to license terms. -! -! - .inline __fenv_getfsr,1 - stx %fsr,[%o0] - .end - - .inline __fenv_setfsr,1 - ldx [%o0],%fsr - .end - - .inline __fenv_getfsr32,1 - st %fsr,[%o0] - .end - - .inline __fenv_setfsr32,1 - ld [%o0],%fsr - .end diff --git a/usr/src/lib/libm/i386/src/libm_inlines.h b/usr/src/lib/libm/i386/src/libm_inlines.h index 309d40460e..3569196f89 100644 --- a/usr/src/lib/libm/i386/src/libm_inlines.h +++ b/usr/src/lib/libm/i386/src/libm_inlines.h @@ -28,8 +28,6 @@ * Copyright 2011, Richard Lowe */ -/* Functions in this file are duplicated in locallibm.il. Keep them in sync */ - #ifndef _LIBM_INLINES_H #define _LIBM_INLINES_H @@ -261,8 +259,9 @@ isnanf(float f) } extern __GNU_INLINE double -rint(double a) { - return (__inline_rint(a)); +rint(double a) +{ + return (__inline_rint(a)); } extern __GNU_INLINE double diff --git a/usr/src/lib/libm/i386/src/locallibm.il b/usr/src/lib/libm/i386/src/locallibm.il deleted file mode 100644 index bca43cb8e5..0000000000 --- a/usr/src/lib/libm/i386/src/locallibm.il +++ /dev/null @@ -1,370 +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, this CDDL HEADER in each -/ file and 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 2011 Nexenta Systems, Inc. All rights reserved. -/ -/ Copyright 2006 Sun Microsystems, Inc. All rights reserved. -/ Use is subject to license terms. -/ - -/ Portions of this file are duplicated as GCC inline assembly in -/ libm_inlines.h. Keep them in sync. - - .inline __ieee754_sqrt,0 - fldl (%esp) - fsqrt - .end - - .inline __inline_rint,0 - fldl (%esp) - movl 4(%esp),%eax - andl $0x7fffffff,%eax - cmpl $0x43300000,%eax - jae 1f - frndint -1: - fwait / in case we jumped around the frndint - .end - - .inline __inline_sqrtf,0 - flds (%esp) - fsqrt - .end - - .inline __inline_sqrt,0 - fldl (%esp) - fsqrt - .end - - .inline __inline_fstsw,0 - fstsw %ax - .end - -/ -/ 00 - 24 bits -/ 01 - reserved -/ 10 - 53 bits -/ 11 - 64 bits -/ - .inline __swapRP,0 - subl $4,%esp - fstcw (%esp) - movw (%esp),%ax - movw %ax,%cx - andw $0xfcff,%cx - movl 4(%esp),%edx /// - andl $0x3,%edx - shlw $8,%dx - orw %dx,%cx - movl %ecx,(%esp) - fldcw (%esp) - shrw $8,%ax - andl $0x3,%eax - addl $4,%esp - .end - -/ -/ 00 - Round to nearest, with even preferred -/ 01 - Round down -/ 10 - Round up -/ 11 - Chop -/ - .inline __swap87RD,0 - subl $4,%esp - fstcw (%esp) - movw (%esp),%ax - movw %ax,%cx - andw $0xf3ff,%cx - movl 4(%esp),%edx - andl $0x3,%edx - shlw $10,%dx - orw %dx,%cx - movl %ecx,(%esp) - fldcw (%esp) - shrw $10,%ax - andl $0x3,%eax - addl $4,%esp - .end - -/ -/ Convert Top-of-Stack to long -/ - .inline __xtol,0 - subl $8,%esp / 8 bytes of stack space - fstcw 2(%esp) / byte[2:3] = old_cw - movw 2(%esp),%ax - andw $0xf3ff,%ax - orw $0x0c00,%ax / RD set to Chop - movw %ax,(%esp) / byte[0:1] = new_cw - fldcw (%esp) / set new_cw - fistpl 4(%esp) / byte[4:7] = converted long - fstcw (%esp) / restore old RD - movw (%esp),%ax - andw $0xf3ff,%ax - movw 2(%esp),%dx - andw $0x0c00,%dx - orw %ax,%dx - movw %dx,2(%esp) - fldcw 2(%esp) - movl 4(%esp),%eax - addl $8,%esp - .end - - .inline ceil,0 - subl $8,%esp - fstcw (%esp) - fldl 8(%esp) /// - movw (%esp),%cx - orw $0x0c00,%cx - xorw $0x0400,%cx - movw %cx,4(%esp) - fldcw 4(%esp) / set RD = up - frndint - fstcw 4(%esp) / restore RD - movw 4(%esp),%dx - andw $0xf3ff,%dx - movw (%esp),%cx - andw $0x0c00,%cx - orw %dx,%cx - movw %cx,(%esp) - fldcw (%esp) - addl $8,%esp - .end - - .inline copysign,0 - movl 4(%esp),%eax /// eax <-- hi_32(x) - movl 12(%esp),%ecx /// ecx <-- hi_32(y) - andl $0x7fffffff,%eax / eax <-- hi_32(abs(x)) - andl $0x80000000,%ecx / ecx[31] <-- sign_bit(y) - orl %ecx,%eax / eax <-- hi_32(__copysign(x,y)) - movl (%esp),%ecx /// ecx <-- lo_32(x) - / = lo_32(__copysign(x,y)) - subl $8,%esp / set up loading dock for result - movl %ecx,(%esp) / copy lo_32(result) to loading dock - movl %eax,4(%esp) / copy hi_32(result) to loading dock - fldl (%esp) / load __copysign(x,y) - fwait / in case fldl causes exception - addl $8,%esp / restore stack-pointer - .end - - .inline __d_sqrt_,0 - movl (%esp),%eax - fldl (%eax) - fsqrt - .end - - .inline fabs,0 - fldl (%esp) /// - fabs - .end - - .inline fabsf,0 - flds (%esp) - fabs - .end - - .inline fabsl,0 - fldt (%esp) - fabs - .end - -/ -/ branchless _finite -/ - .inline finite,0 - movl 4(%esp),%eax /// eax <-- hi_32(x) - notl %eax / not(bexp) = 0 iff bexp = all 1's - andl $0x7ff00000,%eax - negl %eax - shrl $31,%eax - .end - - .inline floor,0 - subl $8,%esp - fstcw (%esp) - fldl 8(%esp) /// - movw (%esp),%cx - orw $0x0c00,%cx - xorw $0x0800,%cx - movw %cx,4(%esp) - fldcw 4(%esp) / set RD = down - frndint - fstcw 4(%esp) / restore RD - movw 4(%esp),%dx - andw $0xf3ff,%dx - movw (%esp),%cx - andw $0x0c00,%cx - orw %dx,%cx - movw %cx,(%esp) - fldcw (%esp) / restore RD - addl $8,%esp - .end - - .inline isnanf,0 - movl (%esp),%eax - andl $0x7fffffff,%eax - negl %eax - addl $0x7f800000,%eax - shrl $31,%eax - .end - - - .inline __isnormal,0 - / TRUE iff (x is _finite, but - / neither subnormal nor +/-0) - / iff (0 < bexp(x) < 0x7ff) - movl 4(%esp),%eax / eax <-- hi_32(x) - andl $0x7ff00000,%eax / eax[20..30] <-- bexp(x), - / rest_of(eax) <-- 0 - pushfl - popl %ecx / bit 6 of ecx <-- not bexp(x) - subl $0x7ff00000,%eax - pushfl - popl %eax / bit 6 of eax <-- not bexp(x) - orl %ecx,%eax - andl $0x40,%eax - xorl $0x40,%eax - shrl $6,%eax - .end - - .inline __issubnormal,0 - / TRUE iff (bexp(x) = 0 and - / frac(x) /= 0) - movl $0,%eax - movl 4(%esp),%ecx / ecx <-- hi_32(x) - andl $0x7fffffff,%ecx / ecx <-- hi_32(abs(x)) - cmpl $0x00100000,%ecx / is bexp(x) = 0? - adcl $0,%eax / jump if bexp(x) = 0 - orl (%esp),%ecx / = 0 iff sgnfcnd(x) = 0 - / iff x = +/- 0.0 here - pushfl - popl %ecx - andl $0x40,%ecx - xorl $0x40,%ecx - shrl $6,%ecx - andl %ecx,%eax - .end - - .inline __iszero,0 - movl 4(%esp),%eax / eax <-- hi_32(x) - andl $0x7fffffff,%eax / eax <-- hi_32(abs(x)) - orl (%esp),%eax / = 0 iff x = +/- 0.0 - pushfl - popl %eax - andl $0x40,%eax - shrl $6,%eax - .end - - .inline __r_sqrt_,0 - movl (%esp),%eax - flds (%eax) - fsqrt - .end - - .inline rint,0 - fldl (%esp) - movl 4(%esp),%eax - andl $0x7fffffff,%eax - cmpl $0x43300000,%eax - jae 1f - frndint -1: - fwait / in case we jumped around frndint - .end - - .inline scalbn,0 - fildl 8(%esp) /// convert N to extended - fldl (%esp) /// push x - fscale - fstp %st(1) - .end - - .inline signbit,0 - movl 4(%esp),%eax /// high part of x - shrl $31,%eax - .end - - .inline signbitf,0 - movl (%esp),%eax - shrl $31,%eax - .end - - .inline sqrt,0 - fldl (%esp) - fsqrt - .end - - .inline sqrtf,0 - flds (%esp) - fsqrt - .end - - .inline sqrtl,0 - fldt (%esp) - fsqrt - .end - - .inline isnanl,0 - movl 8(%esp),%eax / ax <-- sign bit and __exp - andl $0x00007fff,%eax - jz 1f / jump if __exp is all 0 - xorl $0x00007fff,%eax - jz 2f / jump if __exp is all 1 - testl $0x80000000,4(%esp) - jz 3f / jump if leading bit is 0 - movl $0,%eax - jmp 1f -2: / note that %eax = 0 from before - cmpl $0x80000000,4(%esp) / what is first half of __significand? - jnz 3f / jump if not equal to 0x80000000 - testl $0xffffffff,(%esp) / is second half of __significand 0? - jnz 3f / jump if not equal to 0 - jmp 1f -3: - movl $1,%eax -1: - .end - - .inline __f95_signf,0 - sub $4,%esp - mov 4(%esp),%edx - mov (%edx),%eax - and $0x7fffffff,%eax - mov 8(%esp),%edx - mov (%edx),%ecx - and $0x80000000,%ecx - or %ecx,%eax - mov %eax,(%esp) - flds (%esp) - add $4,%esp - .end - - .inline __f95_sign,0 - mov (%esp),%edx - fldl (%edx) - fabs - mov 4(%esp),%edx - mov 4(%edx),%eax - test %eax,%eax - jns 1f - fchs -1: - .end - diff --git a/usr/src/lib/libm/sparc/src/libm_inlines.h b/usr/src/lib/libm/sparc/src/libm_inlines.h index 964bf3d88a..bd4a463e7a 100644 --- a/usr/src/lib/libm/sparc/src/libm_inlines.h +++ b/usr/src/lib/libm/sparc/src/libm_inlines.h @@ -28,8 +28,6 @@ * Copyright 2011, Richard Lowe. */ -/* Functions in this file are duplicated in locallibm.il. Keep them in sync */ - #ifndef _LIBM_INLINES_H #define _LIBM_INLINES_H @@ -119,6 +117,7 @@ fp_class(double d) enum fp_class_type ret; uint32_t tmp; + /* BEGIN CSTYLED */ __asm__ __volatile__( "sethi %%hi(0x80000000),%1\n\t" /* %1 gets 80000000 */ "andn %2,%1,%0\n\t" /* %2-%0 gets abs(x) */ @@ -165,6 +164,7 @@ fp_class(double d) : "=&r" (ret), "=&r" (tmp) : "r" (_HI_WORD(d)), "r" (_LO_WORD(d)) : "cc"); + /* END CSTYLED */ return (ret); } @@ -241,6 +241,7 @@ __swapTE(int i) int ret; uint32_t fsr, tmp1, tmp2; + /* BEGIN CSTYLED */ __asm__ __volatile__( "and %4,0x1f,%0\n\t" "sll %0,23,%2\n\t" /* shift input to TEM bit location */ @@ -258,6 +259,7 @@ __swapTE(int i) : "=r" (ret), "=m" (fsr), "=r" (tmp1), "=r" (tmp2) : "r" (i) : "cc"); + /* END CSTYLED */ return (ret); } diff --git a/usr/src/lib/libm/sparc/src/locallibm.il b/usr/src/lib/libm/sparc/src/locallibm.il deleted file mode 100644 index b6fa0adfc5..0000000000 --- a/usr/src/lib/libm/sparc/src/locallibm.il +++ /dev/null @@ -1,2034 +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, this CDDL HEADER in each -! file and 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 2011 Nexenta Systems, Inc. All rights reserved. -! -! Copyright 2006 Sun Microsystems, Inc. All rights reserved. -! Use is subject to license terms. -! - -! Portions of this file are duplicated as GCC inline assembly in -! libm_inlines.h. Keep them in sync. - - .inline __r_hypot_,2 - ld [%o0],%o4 - sethi 0x1fffff,%o5 - or %o5,1023,%o5 - and %o4,%o5,%o4 - sethi 0x1fe000,%o3 - cmp %o4,%o3 - ld [%o0],%f0 ! load result with first argument - bne 2f - nop - fabss %f0,%f0 - ld [%o1],%f1 - .volatile - fcmps %f0,%f1 ! generate invalid for Snan - .nonvolatile - nop - fba 5f - nop -2: - ld [%o1],%o4 - sethi 0x1fffff,%o5 - or %o5,1023,%o5 - and %o4,%o5,%o4 - sethi 0x1fe000,%o3 - cmp %o4,%o3 - bne 4f - nop - ld [%o1],%f0 ! second argument inf - fabss %f0,%f0 - ld [%o0],%f1 - .volatile - fcmps %f0,%f1 ! generate invalid for Snan - .nonvolatile - nop - fba 5f - nop -4: - ld [%o1],%f3 - fsmuld %f0,%f0,%f0 - fsmuld %f3,%f3,%f2 - faddd %f2,%f0,%f0 - fsqrtd %f0,%f0 - fdtos %f0,%f0 -5: - .end - - .inline __c_abs,1 - ld [%o0],%o4 - sethi 0x1fffff,%o5 - or %o5,1023,%o5 - and %o4,%o5,%o4 - sethi 0x1fe000,%o3 - cmp %o4,%o3 - ld [%o0],%f0 - bne 2f - nop - fabss %f0,%f0 - ld [%o0+4],%f1 - .volatile - fcmps %f0,%f1 ! generate invalid for Snan - .nonvolatile - nop - fba 5f - nop -2: - ld [%o0+4],%o4 - sethi 0x1fffff,%o5 - or %o5,1023,%o5 - and %o4,%o5,%o4 - sethi 0x1fe000,%o3 - cmp %o4,%o3 - bne 4f - nop - ld [%o0+4],%f0 - fabss %f0,%f0 - ld [%o0],%f1 - .volatile - fcmps %f0,%f1 ! generate invalid for Snan - .nonvolatile - nop - fba 5f - nop -! store to 8-aligned address -4: - ld [%o0+4],%f3 - fsmuld %f0,%f0,%f0 - fsmuld %f3,%f3,%f2 - faddd %f2,%f0,%f0 - fsqrtd %f0,%f0 - fdtos %f0,%f0 -5: - .end -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! void -! __Fc_mult(c, a, b) -! complex *c, *a, *b; -! { - - .inline __Fc_mult,3 -! 21 c->real = (a->real * b->real) - (a->imag * b->imag) - ld [%o1+4],%f0 ! f0 = a->imag - ld [%o2+4],%f1 ! f1 = b->imag - ld [%o1],%f2 ! f2 = a->real - fsmuld %f0,%f1,%f4 ! f4 = (a->imag * b->imag) - ld [%o2],%f3 ! f3 = b->real - fsmuld %f2,%f1,%f6 ! f6 = a->real * b->imag - fsmuld %f2,%f3,%f8 ! f8 = a->real * b->real - fsmuld %f0,%f3,%f10 ! f10 = a->imag * b->real - fsubd %f8,%f4,%f0 ! f0 = ar*br - ai*bi - faddd %f6,%f10,%f2 ! f2 = ai*br + ar*bi - fdtos %f0,%f4 - fdtos %f2,%f6 - st %f4,[%o0] - st %f6,[%o0+4] - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! void -! __Fc_div(c, a, b) -! complex *c, *a, *b; -! { - .inline __Fc_div,3 - ld [%o2+4],%o3 - sethi %hi(0x7fffffff),%o4 - or %o4,%lo(0x7fffffff),%o4 ! [internal] - andcc %o3,%o4,%g0 - ld [%o2],%f6 ! f6 gets reb - bne 1f - nop - ld [%o1],%f0 - ld [%o2],%f1 - fdivs %f0,%f1,%f0 - st %f0,[%o0] - ld [%o1+4],%f3 - fdivs %f3,%f1,%f3 - st %f3,[%o0+4] - ba 2f - nop -1: ! [internal] - sethi %hi(0x3ff00000),%o4 - or %g0,0,%o5 - std %o4,[%sp+0x48] - ldd [%sp+0x48],%f8 - ld [%o2+4],%f10 ! f10 gets imb - fsmuld %f6,%f6,%f16 ! f16/17 gets reb**2 - ld [%o1+4],%f4 ! f4 gets ima - fsmuld %f10,%f10,%f12 ! f12/13 gets imb**2 - ld [%o1],%f19 ! f19 gets rea - fsmuld %f4,%f10,%f0 ! f0/f1 gets ima*imb - fsmuld %f19,%f6,%f2 ! f2/3 gets rea*reb - faddd %f12,%f16,%f12 ! f12/13 gets reb**2+imb**2 - fdivd %f8,%f12,%f12 ! f12/13 gets 1/(reb**2+imb**2) - faddd %f2,%f0,%f2 ! f2/3 gets rea*reb+ima*imb - fsmuld %f4,%f6,%f24 ! f24/5 gets ima*reb - fmuld %f2,%f12,%f2 ! f2/3 gets rec - fsmuld %f19,%f10,%f10 ! f10/11 gets rea*imb - fsubd %f24,%f10,%f10 ! f10/11 gets ima*reb-rea*imb - fmuld %f10,%f12,%f12 ! f12 gets imc - fdtos %f2,%f7 ! f7 gets rec - fdtos %f12,%f15 ! f15 gets imc - st %f7,[%o0] - st %f15,[%o0+4] -2: - .end -! } - - .inline .mul,2 - .volatile - smul %o0,%o1,%o0 - rd %y,%o1 - sra %o0,31,%o2 - cmp %o1,%o2 - .nonvolatile - .end - - .inline .umul,2 - .volatile - umul %o0,%o1,%o0 - rd %y,%o1 - tst %o1 - .nonvolatile - .end - - .inline .div,2 - sra %o0,31,%o4 ! extend sign - .volatile - wr %o4,%g0,%y - cmp %o1,0xffffffff ! is divisor -1? - be,a 1f ! if yes - .volatile - subcc %g0,%o0,%o0 ! simply negate dividend - nop ! RT620 FABs A.0/A.1 - sdiv %o0,%o1,%o0 ! o0 contains quotient a/b - .nonvolatile -1: - .end - - .inline .udiv,2 - .volatile - wr %g0,%g0,%y - nop - nop - nop - udiv %o0,%o1,%o0 ! o0 contains quotient a/b - .nonvolatile - .end - - .inline .rem,2 - sra %o0,31,%o4 ! extend sign - .volatile - wr %o4,%g0,%y - cmp %o1,0xffffffff ! is divisor -1? - be,a 1f ! if yes - .volatile - or %g0,%g0,%o0 ! simply return 0 - nop ! RT620 FABs A.0/A.1 - sdiv %o0,%o1,%o2 ! o2 contains quotient a/b - .nonvolatile - smul %o2,%o1,%o4 ! o4 contains q*b - sub %o0,%o4,%o0 ! o0 gets a-q*b -1: - .end - - .inline .urem,2 - .volatile - wr %g0,%g0,%y - nop - nop - nop - udiv %o0,%o1,%o2 ! o2 contains quotient a/b - .nonvolatile - umul %o2,%o1,%o4 ! o4 contains q*b - sub %o0,%o4,%o0 ! o0 gets a-q*b - .end - - .inline .div_o3,2 - sra %o0,31,%o4 ! extend sign - .volatile - wr %o4,%g0,%y - cmp %o1,0xffffffff ! is divisor -1? - be,a 1f ! if yes - .volatile - subcc %g0,%o0,%o0 ! simply negate dividend - mov %o0,%o3 ! o3 gets __remainder - sdiv %o0,%o1,%o0 ! o0 contains quotient a/b - .nonvolatile - smul %o0,%o1,%o4 ! o4 contains q*b - ba 2f - sub %o3,%o4,%o3 ! o3 gets a-q*b -1: - mov %g0,%o3 ! __remainder is 0 -2: - .end - - .inline .udiv_o3,2 - .volatile - wr %g0,%g0,%y - mov %o0,%o3 ! o3 gets __remainder - nop - nop - udiv %o0,%o1,%o0 ! o0 contains quotient a/b - .nonvolatile - umul %o0,%o1,%o4 ! o4 contains q*b - sub %o3,%o4,%o3 ! o3 gets a-q*b - .end - - .inline __ieee754_sqrt,2 - std %o0,[%sp+0x48] ! store to 8-aligned address - ldd [%sp+0x48],%f0 - fsqrtd %f0,%f0 - .end - - .inline __inline_sqrtf,1 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - fsqrts %f0,%f0 - .end - - .inline __inline_sqrt,2 - std %o0,[%sp+0x48] ! store to 8-aligned address - ldd [%sp+0x48],%f0 - fsqrtd %f0,%f0 - .end - - .inline sqrtf,1 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - fsqrts %f0,%f0 - .end - - .inline sqrt,2 - std %o0,[%sp+0x48] ! store to 8-aligned address - ldd [%sp+0x48],%f0 - fsqrtd %f0,%f0 - .end - - .inline __r_sqrt_,1 - ld [%o0],%f0 - fsqrts %f0,%f0 - .end - - .inline __d_sqrt_,1 - ld [%o0],%f0 - ld [%o0+4],%f1 - fsqrtd %f0,%f0 - .end - - .inline __ceil,2 - std %o0,[%sp+0x48] - sethi %hi(0x80000000),%o5 - andn %o0,%o5,%o2 - sethi %hi(0x43300000),%o3 - st %g0,[%sp+0x54] - subcc %o2,%o3,%g0 - bl 1f - nop - sethi %hi(0x3ff00000),%o2 - st %o2,[%sp+0x50] - ldd [%sp+0x48],%f0 - ldd [%sp+0x50],%f2 - fmuld %f0,%f2,%f0 - ba 4f - nop -1: - tst %o0 - st %o3,[%sp+0x50] - ldd [%sp+0x50],%f2 - bge 2f - nop - fnegs %f2,%f2 -2: - ldd [%sp+0x48],%f4 - faddd %f4,%f2,%f0 - fsubd %f0,%f2,%f0 - fcmpd %f0,%f4 - sethi %hi(0x3ff00000),%o2 - st %o2,[%sp+0x50] - and %o0,%o5,%o4 - fbge 3f - nop - ldd [%sp+0x50],%f4 - faddd %f0,%f4,%f0 -3: - st %f0,[%sp+0x48] - ld [%sp+0x48],%o3 - andn %o3,%o5,%o3 - or %o4,%o3,%o3 - st %o3,[%sp+0x48] - ld [%sp+0x48],%f0 -4: - .end - - .inline __floor,2 - std %o0,[%sp+0x48] - sethi %hi(0x80000000),%o5 - andn %o0,%o5,%o2 - sethi %hi(0x43300000),%o3 - st %g0,[%sp+0x54] - subcc %o2,%o3,%g0 - bl 1f - nop - sethi %hi(0x3ff00000),%o2 - st %o2,[%sp+0x50] - ldd [%sp+0x48],%f0 - ldd [%sp+0x50],%f2 - fmuld %f0,%f2,%f0 - ba 4f - nop -1: - tst %o0 - st %o3,[%sp+0x50] - ldd [%sp+0x50],%f2 - bge 2f - nop - fnegs %f2,%f2 -2: - ldd [%sp+0x48],%f4 - faddd %f4,%f2,%f0 - fsubd %f0,%f2,%f0 - fcmpd %f0,%f4 - sethi %hi(0x3ff00000),%o2 - st %o2,[%sp+0x50] - ldd [%sp+0x50],%f4 - and %o0,%o5,%o4 - fble 3f - nop - fsubd %f0,%f4,%f0 -3: - st %f0,[%sp+0x48] - ld [%sp+0x48],%o3 - andn %o3,%o5,%o3 - or %o4,%o3,%o3 - st %o3,[%sp+0x48] - ld [%sp+0x48],%f0 -4: - .end - - .inline __ilogb,2 - sethi %hi(0x7ff00000),%o4 - andcc %o4,%o0,%o2 - bne 1f - nop - sethi %hi(0x43500000),%o3 - std %o0,[%sp+0x48] - st %o3,[%sp+0x50] - st %g0,[%sp+0x54] - ldd [%sp+0x48],%f0 - ldd [%sp+0x50],%f2 - fmuld %f0,%f2,%f0 - sethi %hi(0x80000001),%o0 - or %o0,%lo(0x80000001),%o0 - st %f0,[%sp+0x48] - ld [%sp+0x48],%o2 - andcc %o2,%o4,%o2 - srl %o2,20,%o2 - be 2f - nop - sub %o2,0x435,%o0 - ba 2f - nop -1: - subcc %o4,%o2,%g0 - srl %o2,20,%o3 - bne 0f - nop - sethi %hi(0x7fffffff),%o0 - or %o0,%lo(0x7fffffff),%o0 - ba 2f - nop -0: - sub %o3,0x3ff,%o0 -2: - .end - - .inline __rint,2 - std %o0,[%sp+0x48] - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o2 - ldd [%sp+0x48],%f0 - sethi %hi(0x43300000),%o3 - st %g0,[%sp+0x50] - st %g0,[%sp+0x54] - subcc %o2,%o3,%g0 - bl 1f - nop - sethi %hi(0x3ff00000),%o2 - st %o2,[%sp+0x50] - ldd [%sp+0x50],%f2 - fmuld %f0,%f2,%f0 - ba 3f - nop -1: - tst %o0 - st %o3,[%sp+0x48] - st %g0,[%sp+0x4c] - ldd [%sp+0x48],%f2 - bge 2f - nop - fnegs %f2,%f2 -2: - faddd %f0,%f2,%f0 - fcmpd %f0,%f2 - fbne 0f - nop - ldd [%sp+0x50],%f0 - bge 3f - nop - fnegs %f0,%f0 - ba 3f - nop -0: - fsubd %f0,%f2,%f0 -3: - .end - - .inline __rintf,1 - st %o0,[%sp+0x48] - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o2 - ld [%sp+0x48],%f0 - sethi %hi(0x4b000000),%o3 - st %g0,[%sp+0x50] - subcc %o2,%o3,%g0 - bl 1f - nop - sethi %hi(0x3f800000),%o2 - st %o2,[%sp+0x50] - ld [%sp+0x50],%f2 - fmuls %f0,%f2,%f0 - ba 3f - nop -1: - tst %o0 - st %o3,[%sp+0x48] - ld [%sp+0x48],%f2 - bge 2f - nop - fnegs %f2,%f2 -2: - fadds %f0,%f2,%f0 - fcmps %f0,%f2 - fbne 0f - nop - ld [%sp+0x50],%f0 - bge 3f - nop - fnegs %f0,%f0 - ba 3f - nop -0: - fsubs %f0,%f2,%f0 -3: - .end - - .inline __min_subnormal,0 - set 0x0,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0x1,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __d_min_subnormal_,0 - set 0x0,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0x1,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __min_subnormalf,0 - set 0x1,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __r_min_subnormal_,0 - set 0x1,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __max_subnormal,0 - set 0x000fffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0xffffffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __d_max_subnormal_,0 - set 0x000fffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0xffffffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __max_subnormalf,0 - set 0x007fffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __r_max_subnormal_,0 - set 0x007fffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __min_normal,0 - set 0x00100000,%o0 - set 0x0,%o1 - std %o0,[%sp+0x48] - ldd [%sp+0x48],%f0 - .end - - .inline __d_min_normal_,0 - set 0x00100000,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0x0,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __min_normalf,0 - set 0x00800000,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __r_min_normal_,0 - set 0x00800000,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __max_normal,0 - set 0x7fefffff,%o0 - set 0xffffffff,%o1 - std %o0,[%sp+0x48] - ldd [%sp+0x48],%f0 - .end - - .inline __d_max_normal_,0 - set 0x7fefffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0xffffffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __max_normalf,0 - set 0x7f7fffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __r_max_normal_,0 - set 0x7f7fffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __infinity,0 - set 0x7ff00000,%o0 - set 0x0,%o1 - std %o0,[%sp+0x48] - ldd [%sp+0x48],%f0 - .end - - .inline __infinity,0 - set 0x7ff00000,%o0 - set 0x0,%o1 - std %o0,[%sp+0x48] - ldd [%sp+0x48],%f0 - .end - - .inline __d_infinity_,0 - set 0x7ff00000,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0x0,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __infinityf,0 - set 0x7f800000,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __r_infinity_,0 - set 0x7f800000,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __signaling_nan,0 - set 0x7ff00000,%o0 - set 0x1,%o1 - std %o0,[%sp+0x48] - ldd [%sp+0x48],%f0 - .end - - .inline __d_signaling_nan_,0 - set 0x7ff00000,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0x1,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __signaling_nanf,0 - set 0x7f800001,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __r_signaling_nan_,0 - set 0x7f800001,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __quiet_nan,0 - set 0x7fffffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0xffffffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __d_quiet_nan_,0 - set 0x7fffffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - set 0xffffffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f1 - .end - - .inline __quiet_nanf,0 - set 0x7fffffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __r_quiet_nan_,0 - set 0x7fffffff,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __swapEX,1 - and %o0,0x1f,%o1 - sll %o1,5,%o1 ! shift input to aexc bit location - .volatile - st %fsr,[%sp+0x44] - ld [%sp+0x44],%o0 ! o0 = fsr - andn %o0,0x3e0,%o2 - or %o1,%o2,%o1 ! o1 = new fsr - st %o1,[%sp+0x44] - ld [%sp+0x44],%fsr - srl %o0,5,%o0 - and %o0,0x1f,%o0 - .nonvolatile - .end - - .inline _QgetRD,0 - st %fsr,[%sp+0x44] - ld [%sp+0x44],%o0 ! o0 = fsr - srl %o0,30,%o0 ! return __round control value - .end - - .inline _QgetRP,0 - or %g0,%g0,%o0 - .end - - .inline __swapRD,1 - and %o0,0x3,%o0 - sll %o0,30,%o1 ! shift input to RD bit location - .volatile - st %fsr,[%sp+0x44] - ld [%sp+0x44],%o0 ! o0 = fsr - set 0xc0000000,%o4 ! mask of rounding direction bits - andn %o0,%o4,%o2 - or %o1,%o2,%o1 ! o1 = new fsr - st %o1,[%sp+0x44] - ld [%sp+0x44],%fsr - srl %o0,30,%o0 - and %o0,0x3,%o0 - .nonvolatile - .end -! -! On the SPARC, __swapRP is a no-op; always return 0 for backward compatibility -! - - .inline __swapRP,1 - or %g0,%g0,%o0 - .end - - .inline __swapTE,1 - and %o0,0x1f,%o0 - sll %o0,23,%o1 ! shift input to TEM bit location - .volatile - st %fsr,[%sp+0x44] - ld [%sp+0x44],%o0 ! o0 = fsr - set 0x0f800000,%o4 ! mask of TEM (Trap Enable Mode bits) - andn %o0,%o4,%o2 - or %o1,%o2,%o1 ! o1 = new fsr - st %o1,[%sp+0x48] - ld [%sp+0x48],%fsr - srl %o0,23,%o0 - and %o0,0x1f,%o0 - .nonvolatile - .end - - .inline fp_class,2 - sethi %hi(0x80000000),%o2 ! o2 gets 80000000 - andn %o0,%o2,%o0 ! o0-o1 gets abs(x) - orcc %o0,%o1,%g0 ! set cc as x is zero/nonzero - bne 1f ! branch if x is nonzero - nop - mov 0,%o0 - ba 2f ! x is 0 - nop -1: - sethi %hi(0x7ff00000),%o2 ! o2 gets 7ff00000 - andcc %o0,%o2,%g0 ! cc set by __exp field of x - bne 1f ! branch if normal or max __exp - nop - mov 1,%o0 - ba 2f ! x is subnormal - nop -1: - cmp %o0,%o2 - bge 1f ! branch if x is max __exp - nop - mov 2,%o0 - ba 2f ! x is normal - nop -1: - andn %o0,%o2,%o0 ! o0 gets msw __significand field - orcc %o0,%o1,%g0 ! set cc by OR __significand - bne 1f ! Branch if __nan - nop - mov 3,%o0 - ba 2f ! x is __infinity - nop -1: - sethi %hi(0x00080000),%o2 - andcc %o0,%o2,%g0 ! set cc by quiet/sig bit - be 1f ! Branch if signaling - nop - mov 4,%o0 ! x is quiet NaN - ba 2f - nop -1: - mov 5,%o0 ! x is signaling NaN -2: - .end - - .inline fp_classf,1 - sethi %hi(0x80000000),%o2 - andncc %o0,%o2,%o0 - bne 1f - nop - mov 0,%o0 - ba 2f ! x is 0 - nop -1: - sethi %hi(0x7f800000),%o2 - andcc %o0,%o2,%g0 - bne 1f - nop - mov 1,%o0 - ba 2f ! x is subnormal - nop -1: - cmp %o0,%o2 - bge 1f - nop - mov 2,%o0 - ba 2f ! x is normal - nop -1: - bg 1f - nop - mov 3,%o0 - ba 2f ! x is __infinity - nop -1: - sethi %hi(0x00400000),%o2 - andcc %o0,%o2,%g0 - mov 4,%o0 ! x is quiet NaN - bne 2f - nop - mov 5,%o0 ! x is signaling NaN -2: - .end - - .inline __ir_fp_class_,1 - ld [%o0],%o0 - sethi %hi(0x80000000),%o2 - andncc %o0,%o2,%o0 - bne 1f - nop - mov 0,%o0 - ba 2f ! x is 0 - nop -1: - sethi %hi(0x7f800000),%o2 - andcc %o0,%o2,%g0 - bne 1f - nop - mov 1,%o0 - ba 2f ! x is subnormal - nop -1: - cmp %o0,%o2 - bge 1f - nop - mov 2,%o0 - ba 2f ! x is normal - nop -1: - bg 1f - nop - mov 3,%o0 - ba 2f ! x is __infinity - nop -1: - sethi %hi(0x00400000),%o2 - andcc %o0,%o2,%g0 - mov 4,%o0 ! x is quiet NaN - bne 2f - nop - mov 5,%o0 ! x is signaling NaN -2: - .end - - .inline __copysign,4 - set 0x80000000,%o3 - and %o2,%o3,%o2 - andn %o0,%o3,%o0 - or %o0,%o2,%o0 - std %o0,[%sp+0x48] - ldd [%sp+0x48],%f0 - .end - - .inline __copysignf,2 - set 0x80000000,%o2 - andn %o0,%o2,%o0 - and %o1,%o2,%o1 - or %o0,%o1,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline __r_copysign_,2 - ld [%o0],%o0 - ld [%o1],%o1 - set 0x80000000,%o2 - andn %o0,%o2,%o0 - and %o1,%o2,%o1 - or %o0,%o1,%o0 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - .end - - .inline _finite,2 - set 0x7ff00000,%o1 - and %o0,%o1,%o0 - cmp %o0,%o1 - mov 1,%o0 - bne 1f - nop - mov 0,%o0 -1: - .end - - .inline __finitef,2 - set 0x7f800000,%o1 - and %o0,%o1,%o0 - cmp %o0,%o1 - mov 1,%o0 - bne 1f - nop - mov 0,%o0 -1: - .end - - .inline __ir_finite_,1 - ld [%o0],%o0 - set 0x7f800000,%o1 - and %o0,%o1,%o0 - cmp %o0,%o1 - mov 1,%o0 - bne 1f - nop - mov 0,%o0 -1: - .end - - .inline __signbit,1 - srl %o0,31,%o0 - .end - - .inline __signbitf,1 - srl %o0,31,%o0 - .end - - .inline __ir_signbit_,1 - ld [%o0],%o0 - srl %o0,31,%o0 - .end - - .inline __isinf,2 - tst %o1 - sethi %hi(0x80000000),%o2 - bne 1f - nop - andn %o0,%o2,%o0 - sethi %hi(0x7ff00000),%o2 - cmp %o0,%o2 - mov 1,%o0 - be 2f - nop -1: - mov 0,%o0 -2: - .end - - .inline __isinff,1 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 ! o0 gets abs(x) - sethi %hi(0x7f800000),%o2 - cmp %o0,%o2 - mov 0,%o0 - bne 1f ! Branch if not inf. - nop - mov 1,%o0 -1: - .end - - .inline __ir_isinf_,1 - ld [%o0],%o0 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 ! o0 gets abs(x) - sethi %hi(0x7f800000),%o2 - cmp %o0,%o2 - mov 0,%o0 - bne 1f ! Branch if not inf. - nop - mov 1,%o0 -1: - .end - - .inline __isnan,2 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 - sub %g0,%o1,%o3 - or %o1,%o3,%o1 - srl %o1,31,%o1 - or %o0,%o1,%o0 - sethi %hi(0x7ff00000),%o4 - sub %o4,%o0,%o0 - srl %o0,31,%o0 - .end - - .inline __isnanf,1 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 - sethi %hi(0x7f800000),%o1 - sub %o1,%o0,%o0 - srl %o0,31,%o0 - .end - - .inline __ir_isnan_,1 - ld [%o0],%o0 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 - sethi %hi(0x7f800000),%o1 - sub %o1,%o0,%o0 - srl %o0,31,%o0 - .end - - .inline __isnormal,2 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 - sethi %hi(0x7ff00000),%o2 - cmp %o0,%o2 - sethi %hi(0x00100000),%o2 - bge 1f - nop - cmp %o0,%o2 - mov 1,%o0 - bge 2f - nop -1: - mov 0,%o0 -2: - .end - - .inline __isnormalf,1 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 - sethi %hi(0x7f800000),%o2 - cmp %o0,%o2 - sethi %hi(0x00800000),%o2 - bge 1f - nop - cmp %o0,%o2 - mov 1,%o0 - bge 2f - nop -1: - mov 0,%o0 -2: - .end - - .inline __ir_isnormal_,1 - ld [%o0],%o0 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 - sethi %hi(0x7f800000),%o2 - cmp %o0,%o2 - sethi %hi(0x00800000),%o2 - bge 1f - nop - cmp %o0,%o2 - mov 1,%o0 - bge 2f - nop -1: - mov 0,%o0 -2: - .end - - .inline __issubnormal,2 - sethi %hi(0x80000000),%o2 ! o2 gets 80000000 - andn %o0,%o2,%o0 ! o0/o1 gets abs(x) - sethi %hi(0x00100000),%o2 ! o2 gets 00100000 - cmp %o0,%o2 - bge 1f ! branch if x norm or max __exp - nop - orcc %o0,%o1,%g0 - be 1f ! Branch if x zero - nop - mov 1,%o0 ! x is subnormal - ba 2f - nop -1: - mov 0,%o0 -2: - .end - - .inline __issubnormalf,1 - sethi %hi(0x80000000),%o2 ! o2 gets 80000000 - andn %o0,%o2,%o0 ! o0 gets abs(x) - sethi %hi(0x00800000),%o2 ! o2 gets 00800000 - cmp %o0,%o2 - bge 1f ! branch if x norm or max __exp - nop - orcc %o0,%g0,%g0 - be 1f ! Branch if x zero - nop - mov 1,%o0 ! x is subnormal - ba 2f - nop -1: - mov 0,%o0 -2: - .end - - .inline __ir_issubnormal_,1 - ld [%o0],%o0 - sethi %hi(0x80000000),%o2 ! o2 gets 80000000 - andn %o0,%o2,%o0 ! o0 gets abs(x) - sethi %hi(0x00800000),%o2 ! o2 gets 00800000 - cmp %o0,%o2 - bge 1f ! branch if x norm or max __exp - nop - orcc %o0,%g0,%g0 - be 1f ! Branch if x zero - nop - mov 1,%o0 ! x is subnormal - ba 2f - nop -1: - mov 0,%o0 -2: - .end - - .inline __iszero,2 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 - orcc %o0,%o1,%g0 - mov 1,%o0 - be 1f - nop - mov 0,%o0 -1: - .end - - .inline __iszerof,1 - sethi %hi(0x80000000),%o2 - andncc %o0,%o2,%o0 - mov 1,%o0 - be 1f - nop - mov 0,%o0 -1: - .end - - .inline __ir_iszero_,1 - ld [%o0],%o0 - sethi %hi(0x80000000),%o2 - andncc %o0,%o2,%o0 - mov 1,%o0 - be 1f - nop - mov 0,%o0 -1: - .end - - .inline abs,1 - sra %o0,31,%o1 - xor %o0,%o1,%o0 - sub %o0,%o1,%o0 - .end - - .inline fabs,2 - st %o0,[%sp+0x48] - st %o1,[%sp+0x4c] - ldd [%sp+0x48],%f0 - fabsd %f0,%f0 - .end - - .inline fabsf,1 - st %o0,[%sp+0x44] - ld [%sp+0x44],%f0 - fabss %f0,%f0 - .end - - .inline __r_fabs_,1 - ld [%o0],%f0 - fabss %f0,%f0 - .end -! -! __nintf - f77 NINT(REAL*4) -! - - .inline __nintf,1 - srl %o0,30-7,%g1 - sethi %hi(0x7fffff),%o2 - st %o0,[%sp+0x44] - and %g1,0xff,%g1 - or %o2,%lo(0x7fffff),%o2 - sethi %hi(1<<22),%o4 - subcc %g1,127+31,%g0 - and %o0,%o2,%o3 - bl 0f - nop - sethi %hi(0xcf000000),%o2 - sethi %hi(0x80000000),%g1 - subcc %o0,%o2,%g0 - or %g1,%g0,%o0 - be 9f - nop - ld [%sp+0x44],%f0 - fstoi %f0,%f0 - st %f0,[%sp+0x44] - ld [%sp+0x44],%o0 - ba 9f - nop -0: - add %o4,%o4,%o5 - or %o3,%o5,%o3 - sra %o0,31-0,%o2 - subcc %g1,127,%g1 - srl %o4,%g1,%o4 - bge 1f - nop - subcc %g1,-1,%g0 - or %g0,0,%o0 - bne 2f - nop - or %g0,1,%o0 - ba 2f - nop -1: - add %o3,%o4,%o3 - or %g0,23,%o0 - subcc %o0,%g1,%o0 - bl 1f - nop - srl %o3,%o0,%o0 - ba 2f - nop -1: - sub %g0,%o0,%o0 - sll %o3,%o0,%o0 -2: - xor %o0,%o2,%o0 - and %o2,1,%o2 - add %o0,%o2,%o0 -9: - .end - - .inline __il_nint,1 - ld [%o0],%o0 - sra %o0,0,%o0 - srlx %o0,31-8,%g1 - or %g0,1,%o2 - sllx %o2,23-1,%o4 - and %g1,0xff,%g1 - sllx %o2,63-0,%o2 - subcc %g1,127+63,%g0 - bl 0f - nop - st %o0,[%sp+0x48] - ld [%sp+0x48],%f0 - fstox %f0,%f0 - std %f0,[%sp+0x48] - ldx [%sp+0x48],%o1 - ba 9f - nop -0: - add %o4,%o4,%o5 - srax %o2,63-23,%o2 - sub %g1,127+23,%o1 - xnor %o2,%g0,%o2 - and %o0,%o2,%o3 - or %o3,%o5,%o3 - srax %o0,63-0,%o2 - subcc %g1,127,%g1 - bge 1f - nop - subcc %g1,-1,%g0 - or %g0,0,%o0 - bne 2f - nop - or %g0,1,%o0 - ba 2f - nop -1: - brlz,pt %o1,3f - nop - sub %g1,23,%o0 - sllx %o3,%o0,%o0 - ba 2f - nop -3: - srlx %o4,%g1,%o4 - add %o3,%o4,%o3 - or %g0,23,%o0 - sub %o0,%g1,%o0 - srlx %o3,%o0,%o0 -2: - xor %o0,%o2,%o0 - sub %o0,%o2,%o1 -9: - srlx %o1,32,%o0 - .end -! -! __i_dnnt - f77 NINT(REAL*8) -! - - .inline __i_dnnt,1 - ld [%o0],%o1 - sllx %o1,32,%o1 - ld [%o0+4],%o0 - or %o0,%o1,%o0 - srlx %o0,63-11,%g1 - or %g0,1,%o2 - stx %o0,[%sp+0x48] - sllx %o2,52-1,%o4 - and %g1,0x7ff,%g1 - sllx %o2,63-0,%o2 - subcc %g1,1023+32,%g0 - bl 0f - nop - ldd [%sp+0x48],%f0 - ba 8f - nop -0: - add %o4,%o4,%o5 - srax %o2,63-52,%o2 - sub %g1,1023+30,%o1 - xnor %o2,%g0,%o2 - and %o0,%o2,%o3 - or %o3,%o5,%o3 - srax %o0,63-0,%o2 - subcc %g1,1023,%g1 - bge 1f - nop - subcc %g1,-1,%g0 - or %g0,0,%o0 - bne 2f - nop - or %g0,1,%o0 - ba 2f - nop -1: - srlx %o4,%g1,%o4 - add %o3,%o4,%o3 - or %g0,52,%o0 - sub %o0,%g1,%o0 - srlx %o3,%o0,%o0 -2: - xor %o0,%o2,%o0 - sub %o0,%o2,%o0 - brlz,pt %o1,9f - nop - stx %o0,[%sp+0x48] - ldd [%sp+0x48],%f0 - fxtod %f0,%f0 -8: - fdtoi %f0,%f0 - st %f0,[%sp+0x44] - ld [%sp+0x44],%o0 -9: - .end - - .inline __il_dnnt,1 - ld [%o0],%o1 - sllx %o1,32,%o1 - ld [%o0+4],%o0 - or %o0,%o1,%o0 - srlx %o0,63-11,%g1 - or %g0,1,%o2 - sllx %o2,52-1,%o4 - and %g1,0x7ff,%g1 - sllx %o2,63-0,%o2 - subcc %g1,1023+63,%g0 - bl 0f - nop - stx %o0,[%sp+0x48] - ldd [%sp+0x48],%f0 - fdtox %f0,%f0 - std %f0,[%sp+0x48] - ldx [%sp+0x48],%o1 - ba 9f - nop -0: - add %o4,%o4,%o5 - srax %o2,63-52,%o2 - sub %g1,1023+52,%o1 - xnor %o2,%g0,%o2 - and %o0,%o2,%o3 - or %o3,%o5,%o3 - srax %o0,63-0,%o2 - subcc %g1,1023,%g1 - bge 1f - nop - subcc %g1,-1,%g0 - or %g0,0,%o0 - bne 2f - nop - or %g0,1,%o0 - ba 2f - nop -1: - brlz,pt %o1,3f - nop - sub %g1,52,%o0 - sllx %o3,%o0,%o0 - ba 2f - nop -3: - srlx %o4,%g1,%o4 - add %o3,%o4,%o3 - or %g0,52,%o0 - sub %o0,%g1,%o0 - srlx %o3,%o0,%o0 -2: - xor %o0,%o2,%o0 - sub %o0,%o2,%o1 -9: - srlx %o1,32,%o0 - .end - - .inline __anintf,1 - or %g0,1,%o1 - srl %o0,23,%g1 - and %g1,0xff,%g1 - sub %g0,%g1,%g1 - add %g1,0x95,%g1 - subcc %g1,23,%g0 - sll %o1,%g1,%o1 - sub %o1,1,%o2 - bcs 1f - nop - be 2f - nop - bl 3f - nop - sethi %hi(0x80000000),%o1 - and %o0,%o1,%o0 - ba 3f - nop -1: - and %o0,%o1,%o1 -2: - add %o0,%o1,%o0 - andn %o0,%o2,%o0 -3: - st %o0,[%sp+0x48] - ld [%sp+0x48],%f0 - .end - - .inline __anint,2 - sllx %o0,32,%o0 - or %o0,%o1,%o0 - or %g0,1,%o1 - srlx %o0,52,%g1 - and %g1,0x7ff,%g1 - sub %g0,%g1,%g1 - add %g1,0x432,%g1 - subcc %g1,52,%g0 - sllx %o1,%g1,%o1 - sub %o1,1,%o2 - bcs,pt %icc,1f - nop - be,pt %icc,2f - nop - bl,pt %icc,3f - nop - srlx %o0,63,%o0 - sllx %o0,63,%o0 - ba 3f - nop -1: - and %o0,%o1,%o1 -2: - add %o0,%o1,%o0 - andn %o0,%o2,%o0 -3: - stx %o0,[%sp+0x48] - ldd [%sp+0x48],%f0 - .end - - .inline __Fz_minus,3 - ld [%o1],%f0 - ld [%o1+0x4],%f1 - ld [%o2],%f4 - ld [%o2+0x4],%f5 - fsubd %f0,%f4,%f0 - ld [%o1+8],%f2 - ld [%o1+0xc],%f3 - ld [%o2+8],%f6 - ld [%o2+0xc],%f7 - fsubd %f2,%f6,%f2 - st %f0,[%o0+0x0] - st %f1,[%o0+0x4] - st %f2,[%o0+0x8] - st %f3,[%o0+0xc] - .end - - .inline __Fz_add,3 - ld [%o1],%f0 - ld [%o1+0x4],%f1 - ld [%o2],%f4 - ld [%o2+0x4],%f5 - faddd %f0,%f4,%f0 - ld [%o1+8],%f2 - ld [%o1+0xc],%f3 - ld [%o2+8],%f6 - ld [%o2+0xc],%f7 - faddd %f2,%f6,%f2 - st %f0,[%o0+0x0] - st %f1,[%o0+0x4] - st %f2,[%o0+0x8] - st %f3,[%o0+0xc] - .end - - .inline __Fz_neg,2 - ld [%o1],%f0 - fnegs %f0,%f0 - ld [%o1+0x4],%f1 - st %f1,[%o0+0x4] - ld [%o1+8],%f2 - fnegs %f2,%f2 - ld [%o1+0xc],%f3 - st %f3,[%o0+0xc] - st %f0,[%o0] - st %f2,[%o0+0x8] - .end - - .inline __Ff_conv_z,2 - st %o1,[%sp+0x44] - ld [%sp+0x44],%f0 - fstod %f0,%f0 - st %g0,[%o0+0x8] - st %g0,[%o0+0xc] - st %f1,[%o0+0x4] - st %f0,[%o0] - .end - - .inline __Fz_conv_f,1 - ld [%o0],%f0 - ld [%o0+4],%f1 - fdtos %f0,%f0 - .end - - .inline __Fz_conv_i,1 - ld [%o0],%f0 - ld [%o0+4],%f1 - fdtoi %f0,%f0 - st %f0,[%sp+0x44] - ld [%sp+0x44],%o0 - .end - - .inline __Fi_conv_z,2 - st %o1,[%sp+0x44] - ld [%sp+0x44],%f0 - fitod %f0,%f0 - st %g0,[%o0+0x8] - st %g0,[%o0+0xc] - st %f1,[%o0+0x4] - st %f0,[%o0] - .end - - .inline __Fz_conv_d,1 - ld [%o0],%f0 - ld [%o0+4],%f1 - .end - - .inline __Fd_conv_z,3 - st %o1,[%o0] - st %o2,[%o0+0x4] - st %g0,[%o0+0x8] - st %g0,[%o0+0xc] - .end - - .inline __Fz_conv_c,2 - ldd [%o1],%f0 - fdtos %f0,%f0 - st %f0,[%o0] - ldd [%o1+0x8],%f2 - fdtos %f2,%f1 - st %f1,[%o0+0x4] - .end - - .inline __Fz_eq,2 - ld [%o0],%f0 - ld [%o0+4],%f1 - ld [%o1],%f2 - ld [%o1+4],%f3 - fcmpd %f0,%f2 - mov %o0,%o2 - mov 0,%o0 - fbne 1f - nop - ld [%o2+8],%f0 - ld [%o2+12],%f1 - ld [%o1+8],%f2 - ld [%o1+12],%f3 - fcmpd %f0,%f2 - nop - fbne 1f - nop - mov 1,%o0 -1: - .end - - .inline __Fz_ne,2 - ld [%o0],%f0 - ld [%o0+4],%f1 - ld [%o1],%f2 - ld [%o1+4],%f3 - fcmpd %f0,%f2 - mov %o0,%o2 - mov 1,%o0 - fbne 1f - nop - ld [%o2+8],%f0 - ld [%o2+12],%f1 - ld [%o1+8],%f2 - ld [%o1+12],%f3 - fcmpd %f0,%f2 - nop - fbne 1f - nop - mov 0,%o0 -1: - .end - - .inline __c_cmplx,3 - ld [%o1],%o1 - st %o1,[%o0] - ld [%o2],%o2 - st %o2,[%o0+4] - .end - - .inline __d_cmplx,3 - ld [%o1],%f0 - st %f0,[%o0] - ld [%o1+4],%f1 - st %f1,[%o0+4] - ld [%o2],%f0 - st %f0,[%o0+0x8] - ld [%o2+4],%f1 - st %f1,[%o0+0xc] - .end - - .inline __r_cnjg,2 - ld [%o1+0x4],%f1 - fnegs %f1,%f1 - ld [%o1],%f0 - st %f0,[%o0] - st %f1,[%o0+4] - .end - - .inline __d_cnjg,2 - ld [%o1+0x8],%f0 - fnegs %f0,%f0 - ld [%o1+0xc],%f1 - st %f1,[%o0+0xc] - ld [%o1+0x0],%f1 - st %f1,[%o0+0x0] - ld [%o1+0x4],%f1 - st %f1,[%o0+0x4] - st %f0,[%o0+0x8] - .end - - .inline __r_dim,2 - st %g0,[%sp+0x48] - ld [%sp+0x48],%f4 - ld [%o0],%f0 - ld [%o1],%f2 - fcmps %fcc0,%f0,%f2 - fmovsule %fcc0,%f4,%f2 - fsubs %f0,%f2,%f0 - fmovsule %fcc0,%f4,%f0 - .end - - .inline __d_dim,2 - stx %g0,[%sp+0x48] - ldd [%sp+0x48],%f4 - ld [%o0],%f0 - ld [%o0+4],%f1 - ld [%o1],%f2 - ld [%o1+4],%f3 - fcmpd %fcc0,%f0,%f2 - fmovdule %fcc0,%f4,%f2 - fsubd %f0,%f2,%f0 - fmovdule %fcc0,%f4,%f0 - .end - - .inline __r_imag,1 - ld [%o0+4],%f0 - .end - - .inline __d_imag,1 - ld [%o0+8],%f0 - ld [%o0+0xc],%f1 - .end - - .inline __f95_signf,2 - ld [%o0],%f0 - ld [%o1],%o1 - fabss %f0,%f0 - fnegs %f0,%f1 - sra %o1,0,%o1 - fmovrslz %o1,%f1,%f0 - .end - - .inline __f95_sign,2 - ld [%o0],%f0 - ld [%o0+4],%f1 - ld [%o1],%o1 - fabsd %f0,%f0 - fnegd %f0,%f2 - sra %o1,0,%o1 - fmovrdlz %o1,%f2,%f0 - .end - - .inline __r_sign,2 - ld [%o0],%f0 - ld [%o1],%o1 - fabss %f0,%f0 - fnegs %f0,%f1 - sub %o1,1,%o0 - and %o1,%o0,%o1 - sra %o1,0,%o1 - fmovrslz %o1,%f1,%f0 - .end - - .inline __d_sign,2 - ld [%o0],%f0 - ld [%o0+4],%f1 - ld [%o1],%o0 - sllx %o0,32,%o0 - ld [%o1+4],%o1 - or %o1,%o0,%o1 - fabsd %f0,%f0 - fnegd %f0,%f2 - sub %o1,1,%o0 - and %o1,%o0,%o1 - fmovrdlz %o1,%f2,%f0 - .end - - .inline __Fz_mult,3 - ld [%o1],%f0 - ld [%o1+0x4],%f1 - ld [%o2],%f4 - ld [%o2+0x4],%f5 - fmuld %f0,%f4,%f8 ! f8 = r1*r2 - ld [%o1+0x8],%f2 - ld [%o1+0xc],%f3 - ld [%o2+0x8],%f6 - ld [%o2+0xc],%f7 - fmuld %f2,%f6,%f10 ! f10= i1*i2 - fsubd %f8,%f10,%f12 ! f12= r1*r2-i1*i2 - st %f12,[%o0] - st %f13,[%o0+4] - fmuld %f0,%f6,%f14 ! f14= r1*i2 - fmuld %f2,%f4,%f16 ! f16= r2*i1 - faddd %f14,%f16,%f2 ! f2 = r1*i2+r2*i1 - st %f2,[%o0+8] - st %f3,[%o0+12] - .end -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! void -! __Fc_minus(c, a, b) -! complex *c, *a, *b; -! { - - .inline __Fc_minus,3 -! 30 c->real = a->real - b->real - ld [%o1],%f0 - ld [%o2],%f1 - fsubs %f0,%f1,%f2 -! 31 c->imag = a->imag - b->imag - ld [%o1+4],%f3 - ld [%o2+4],%f4 - fsubs %f3,%f4,%f5 - st %f2,[%o0] - st %f5,[%o0+4] - .end - } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! void -! __Fc_add(c, a, b) -! complex *c, *a, *b; -! { - - .inline __Fc_add,3 -! 39 c->real = a->real + b->real - ld [%o1],%f0 - ld [%o2],%f1 - fadds %f0,%f1,%f2 -! 40 c->imag = a->imag + b->imag - ld [%o1+4],%f3 - ld [%o2+4],%f4 - fadds %f3,%f4,%f5 - st %f2,[%o0] - st %f5,[%o0+4] - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! void -! __Fc_neg(c, a) -! complex *c, *a; -! { - - .inline __Fc_neg,2 -! 48 c->real = - a->real - ld [%o1],%f0 - fnegs %f0,%f1 -! 49 c->imag = - a->imag - ld [%o1+4],%f2 - fnegs %f2,%f3 - st %f1,[%o0] - st %f3,[%o0+4] - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! void -! __Ff_conv_c(c, x) -! complex *c; -! FLOATPARAMETER x; -! { - - .inline __Ff_conv_c,2 -! 59 c->real = x - st %o1,[%o0] -! 60 c->imag = 0.0 - st %g0,[%o0+4] - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! FLOATFUNCTIONTYPE -! __Fc_conv_f(c) -! complex *c; -! { - - .inline __Fc_conv_f,1 -! 69 RETURNFLOAT(c->real) - ld [%o0],%f0 - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! int -! __Fc_conv_i(c) -! complex *c; -! { - - .inline __Fc_conv_i,1 -! 78 return (int)c->real - ld [%o0],%f0 - fstoi %f0,%f1 - st %f1,[%sp+68] - ld [%sp+68],%o0 - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! void -! __Fi_conv_c(c, i) -! complex *c; -! int i; -! { - - .inline __Fi_conv_c,2 -! 88 c->real = (float)i - st %o1,[%sp+68] - ld [%sp+68],%f0 - fitos %f0,%f1 - st %f1,[%o0] -! 89 c->imag = 0.0 - st %g0,[%o0+4] - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! double -! __Fc_conv_d(c) -! complex *c; -! { - - .inline __Fc_conv_d,1 -! 98 return (double)c->real - ld [%o0],%f2 - fstod %f2,%f0 - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! void -! __Fd_conv_c(c, x) -! complex *c; -! double x; -! { - - .inline __Fd_conv_c,2 - st %o1,[%sp+72] - st %o2,[%sp+76] -! 109 c->real = (float)(x) - ldd [%sp+72],%f0 - fdtos %f0,%f1 - st %f1,[%o0] -! 110 c->imag = 0.0 - st %g0,[%o0+4] - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! void -! __Fc_conv_z(result, c) -! dcomplex *result; -! complex *c; -! { - - .inline __Fc_conv_z,2 -! 120 result->dreal = (double)c->real - ld [%o1],%f0 - fstod %f0,%f2 - st %f2,[%o0] - st %f3,[%o0+4] -! 121 result->dimag = (double)c->imag - ld [%o1+4],%f3 - fstod %f3,%f4 - st %f4,[%o0+8] - st %f5,[%o0+12] - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! int -! __Fc_eq(x, y) -! complex *x, *y; -! { - - .inline __Fc_eq,2 -! return (x->real == y->real) && (x->imag == y->imag); - ld [%o0],%f0 - ld [%o1],%f2 - mov %o0,%o2 - fcmps %f0,%f2 - mov 0,%o0 - fbne 1f - nop - ld [%o2+4],%f0 - ld [%o1+4],%f2 - fcmps %f0,%f2 - nop - fbne 1f - nop - mov 1,%o0 -1: - .end -! } -!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! int -! __Fc_ne(x, y) -! complex *x, *y; -! { - - .inline __Fc_ne,2 -! return (x->real != y->real) || (x->imag != y->imag); - ld [%o0],%f0 - ld [%o1],%f2 - mov %o0,%o2 - fcmps %f0,%f2 - mov 1,%o0 - fbne 1f - nop - ld [%o2+4],%f0 - ld [%o1+4],%f2 - fcmps %f0,%f2 - nop - fbne 1f - nop - mov 0,%o0 -1: - .end -! } diff --git a/usr/src/lib/libm/sparcv9/src/libm_inlines.h b/usr/src/lib/libm/sparcv9/src/libm_inlines.h index 74dba0b301..cd482e5ab2 100644 --- a/usr/src/lib/libm/sparcv9/src/libm_inlines.h +++ b/usr/src/lib/libm/sparcv9/src/libm_inlines.h @@ -28,8 +28,6 @@ * Copyright 2011, Richard Lowe. */ -/* Functions in this file are duplicated in locallibm.il. Keep them in sync */ - #ifndef _LIBM_INLINES_H #define _LIBM_INLINES_H diff --git a/usr/src/lib/libm/sparcv9/src/locallibm.il b/usr/src/lib/libm/sparcv9/src/locallibm.il deleted file mode 100644 index 2cd9e21470..0000000000 --- a/usr/src/lib/libm/sparcv9/src/locallibm.il +++ /dev/null @@ -1,1075 +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, this CDDL HEADER in each -! file and 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 2011 Nexenta Systems, Inc. All rights reserved. -! -! Copyright 2006 Sun Microsystems, Inc. All rights reserved. -! Use is subject to license terms. -! - -! Portions of this file are duplicated as GCC inline assembly in -! libm_inlines.h. Keep them in sync. - - .inline __ieee754_sqrt,1 - fsqrtd %f0,%f0 - .end - - .inline __inline_sqrtf,1 - fsqrts %f1,%f0 - .end - - .inline __inline_sqrt,1 - fsqrtd %f0,%f0 - .end - - .inline sqrtf,1 - fsqrts %f1,%f0 - .end - - .inline sqrt,1 - fsqrtd %f0,%f0 - .end - - .inline __ceil,1 - sethi %hi(0x43300000),%o0 - sllx %o0,32,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f2 - fabsd %f0,%f4 - fsubd %f2,%f2,%f6 - fcmpd %fcc0,%f4,%f2 - fbl,pt %fcc0,1f - nop - sethi %hi(0x3ff00000),%o0 - sllx %o0,32,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f6 - fmuld %f0,%f6,%f0 - ba 4f - nop -1: - fcmpd %fcc1,%f0,%f6 - fbg,pt %fcc1,2f - nop - fbe,pn %fcc1,4f - nop - fnegd %f2,%f2 -2: - faddd %f0,%f2,%f4 - fsubd %f4,%f2,%f4 - fcmpd %fcc0,%f4,%f0 - fbge,pt %fcc0,3f - nop - sethi %hi(0x3ff00000),%o0 - st %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f2 - faddd %f4,%f2,%f4 -3: - fabsd %f4,%f0 - fbge,pt %fcc1,4f - nop - fnegd %f0,%f0 -4: - .end - - .inline __floor,1 - sethi %hi(0x43300000),%o0 - sllx %o0,32,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f2 - fabsd %f0,%f4 - fsubd %f2,%f2,%f6 - fcmpd %fcc0,%f4,%f2 - fbl,pt %fcc0,1f - nop - sethi %hi(0x3ff00000),%o0 - sllx %o0,32,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f6 - fmuld %f0,%f6,%f0 - ba 4f - nop -1: - fcmpd %fcc1,%f0,%f6 - fbg,pt %fcc1,2f - nop - fbe,pn %fcc1,4f - nop - fnegd %f2,%f2 -2: - faddd %f0,%f2,%f4 - fsubd %f4,%f2,%f4 - fcmpd %fcc0,%f4,%f0 - fble,pt %fcc0,3f - nop - sethi %hi(0x3ff00000),%o0 - st %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f2 - fsubd %f4,%f2,%f4 -3: - fabsd %f4,%f0 - fbge,pt %fcc1,4f - nop - fnegd %f0,%f0 -4: - .end - - .inline __ilogb,1 - st %f0,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x7ff00000),%o1 - andcc %o0,%o1,%o0 - bne,pt %icc,2f - nop - sethi %hi(0x43500000),%o0 - sllx %o0,32,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f2 - fmuld %f0,%f2,%f0 - st %f0,[%sp+0x87f] - ld [%sp+0x87f],%o0 - andcc %o0,%o1,%o0 - bne,pt %icc,1f - nop - sethi %hi(0x80000001),%o0 - or %o0,%lo(0x80000001),%o0 - ba 4f - nop -1: - srl %o0,20,%o0 - sub %o0,0x435,%o0 - ba 4f - nop -2: - subcc %o1,%o0,%g0 - bne,pt %icc,3f - nop - sethi %hi(0x7fffffff),%o0 - or %o0,%lo(0x7fffffff),%o0 - ba 4f - nop -3: - srl %o0,20,%o0 - sub %o0,0x3ff,%o0 -4: - .end - - .inline __rint,1 - std %f0,[%sp+0x87f] - ldx [%sp+0x87f],%o0 - sethi %hi(0x80000000),%o2 - sllx %o2,32,%o2 - andn %o0,%o2,%o2 - sethi %hi(0x43300000),%o3 - sllx %o3,32,%o3 - stx %g0,[%sp+0x887] - subcc %o2,%o3,%g0 - bl,pt %xcc,1f - nop - sethi %hi(0x3ff00000),%o2 - sllx %o2,32,%o2 - stx %o2,[%sp+0x887] - ldd [%sp+0x887],%f2 - fmuld %f0,%f2,%f0 - ba 3f - nop -1: - orcc %o0,0,%g0 - stx %o3,[%sp+0x87f] - ldd [%sp+0x87f],%f2 - bge,pt %xcc,2f - nop - fnegd %f2,%f2 -2: - faddd %f0,%f2,%f0 - fcmpd %f0,%f2 - fbne,pt %fcc0,0f - nop - ldd [%sp+0x887],%f0 - bge,pt %xcc,3f - nop - fnegd %f0,%f0 - ba 3f - nop -0: - fsubd %f0,%f2,%f0 -3: - .end - - .inline __rintf,1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o2 - sethi %hi(0x4b000000),%o3 - st %g0,[%sp+0x887] - subcc %o2,%o3,%g0 - bl 1f - nop - sethi %hi(0x3f800000),%o2 - st %o2,[%sp+0x887] - ld [%sp+0x887],%f2 - fmuls %f1,%f2,%f0 - ba 3f - nop -1: - tst %o0 - st %o3,[%sp+0x87f] - ld [%sp+0x87f],%f2 - bge 2f - nop - fnegs %f2,%f2 -2: - fadds %f1,%f2,%f0 - fcmps %f0,%f2 - fbne 0f - nop - ld [%sp+0x887],%f0 - bge 3f - nop - fnegs %f0,%f0 - ba 3f - nop -0: - fsubs %f0,%f2,%f0 -3: - .end - - .inline __min_subnormal,1 - or %g0,1,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - .end - - .inline __min_subnormalf,1 - or %g0,1,%o0 - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline __max_subnormal,1 - xnor %g0,%g0,%o0 - srlx %o0,12,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - .end - - .inline __max_subnormalf,1 - xnor %g0,%g0,%o0 - srl %o0,9,%o0 - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline __min_normal,1 - sethi %hi(0x00100000),%o0 - sllx %o0,32,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - .end - - .inline __min_normalf,1 - sethi %hi(0x00800000),%o0 - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline __max_normal,1 - sethi %hi(0x80100000),%o1 - sllx %o1,32,%o1 - xnor %g0,%g0,%o0 - andn %o0,%o1,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - .end - - .inline __max_normalf,1 - sethi %hi(0x7f7ffc00),%o0 - or %o0,0x3ff,%o0 - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline __infinity,1 - sethi %hi(0x7ff00000),%o0 - sllx %o0,32,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - .end - - .inline __infinity,1 - sethi %hi(0x7ff00000),%o0 - sllx %o0,32,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - .end - - .inline __infinityf,1 - sethi %hi(0x7f800000),%o0 - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline __signaling_nan,1 - sethi %hi(0x7ff00000),%o0 - sllx %o0,32,%o0 - or %o0,0x1,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - .end - - .inline __signaling_nanf,1 - sethi %hi(0x7f800000),%o0 - or %o0,1,%o0 - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline __quiet_nan,1 - xnor %g0,%g0,%o0 - srlx %o0,1,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - .end - - .inline __quiet_nanf,1 - xnor %g0,%g0,%o0 - srl %o0,1,%o0 - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline __swapEX,1 - and %o0,0x1f,%o1 - sll %o1,5,%o1 - .volatile - st %fsr,[%sp+0x87f] - ld [%sp+0x87f],%o0 - andn %o0,0x3e0,%o2 - or %o1,%o2,%o1 - st %o1,[%sp+0x87f] - ld [%sp+0x87f],%fsr - srl %o0,5,%o0 - and %o0,0x1f,%o0 - .nonvolatile - .end - - .inline _QgetRD,0 - st %fsr,[%sp+0x87f] - ld [%sp+0x87f],%o0 - srl %o0,30,%o0 - .end - - .inline _QgetRP,0 - or %g0,%g0,%o0 - .end - - .inline __swapRD,1 - and %o0,0x3,%o0 - sll %o0,30,%o1 - .volatile - st %fsr,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0xc0000000),%o4 - andn %o0,%o4,%o2 - or %o1,%o2,%o1 - st %o1,[%sp+0x87f] - ld [%sp+0x87f],%fsr - srl %o0,30,%o0 - and %o0,0x3,%o0 - .nonvolatile - .end -! -! On the SPARC, __swapRP is a no-op; always return 0 for backward compatibility -! - - .inline __swapRP,1 - or %g0,%g0,%o0 - .end - - .inline __swapTE,1 - and %o0,0x1f,%o0 - sll %o0,23,%o1 - .volatile - st %fsr,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x0f800000),%o4 - andn %o0,%o4,%o2 - or %o1,%o2,%o1 - st %o1,[%sp+0x87f] - ld [%sp+0x87f],%fsr - srl %o0,23,%o0 - and %o0,0x1f,%o0 - .nonvolatile - .end - - .inline fp_class,1 - fabsd %f0,%f0 - std %f0,[%sp+0x87f] - ldx [%sp+0x87f],%o0 - orcc %g0,%o0,%g0 - be,pn %xcc,2f - nop - sethi %hi(0x7ff00000),%o1 - sllx %o1,32,%o1 - andcc %o0,%o1,%g0 - bne,pt %xcc,1f - nop - or %g0,1,%o0 - ba 2f - nop -1: - subcc %o0,%o1,%g0 - bge,pn %xcc,1f - nop - or %g0,2,%o0 - ba 2f - nop -1: - andncc %o0,%o1,%o0 - bne,pn %xcc,1f - nop - or %g0,3,%o0 - ba 2f - nop -1: - sethi %hi(0x00080000),%o1 - sllx %o1,32,%o1 - andcc %o0,%o1,%g0 - or %g0,4,%o0 - bne,pt %xcc,2f - nop - or %g0,5,%o0 -2: - .end - - .inline fp_classf,1 - fabss %f1,%f1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - orcc %g0,%o0,%g0 - be,pn %icc,2f - nop -1: - sethi %hi(0x7f800000),%o1 - andcc %o0,%o1,%g0 - bne,pt %icc,1f - nop - or %g0,1,%o0 - ba 2f - nop -1: - subcc %o0,%o1,%g0 - bge,pn %icc,1f - nop - or %g0,2,%o0 - ba 2f - nop -1: - bg,pn %icc,1f - nop - or %g0,3,%o0 - ba 2f - nop -1: - sethi %hi(0x00400000),%o1 - andcc %o0,%o1,%g0 - or %g0,4,%o0 - bne,pt %icc,2f - nop - or %g0,5,%o0 -2: - .end - - .inline __copysign,2 - fabsd %f0,%f0 - st %f0,[%sp+0x87f] - ld [%sp+0x87f],%o0 - st %f2,[%sp+0x887] - ld [%sp+0x887],%o1 - srl %o1,31,%o1 - sll %o1,31,%o1 - or %o0,%o1,%o0 - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline __copysignf,2 - fabss %f1,%f1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - st %f3,[%sp+0x887] - ld [%sp+0x887],%o1 - srl %o1,31,%o1 - sll %o1,31,%o1 - or %o0,%o1,%o0 - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline _finite,1 - fabsd %f0,%f0 - st %f0,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x7ff00000),%o1 - sub %o0,%o1,%o0 - srl %o0,31,%o0 - .end - - .inline __finitef,1 - fabss %f1,%f1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x7f800000),%o1 - sub %o0,%o1,%o0 - srl %o0,31,%o0 - .end - - .inline __signbit,1 - st %f0,[%sp+0x87f] - ld [%sp+0x87f],%o0 - srl %o0,31,%o0 - .end - - .inline __signbitf,1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - srl %o0,31,%o0 - .end - - .inline __isinf,1 - fabsd %f0,%f0 - std %f0,[%sp+0x87f] - ldx [%sp+0x87f],%o0 - sethi %hi(0x7ff00000),%o1 - sllx %o1,32,%o1 - sub %o0,%o1,%o0 - sub %g0,%o0,%o1 - or %o0,%o1,%o0 - xnor %o0,%g0,%o0 - srlx %o0,63,%o0 - .end - - .inline __isinff,1 - fabss %f1,%f1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x7f800000),%o1 - sub %o0,%o1,%o0 - sub %g0,%o0,%o1 - or %o0,%o1,%o0 - xnor %o0,%g0,%o0 - srl %o0,31,%o0 - .end - - .inline __isnan,1 - std %f0,[%sp+0x87f] - ldx [%sp+0x87f],%o0 - sllx %o0,1,%o0 - srlx %o0,1,%o0 - sethi %hi(0x7ff00000),%o1 - sllx %o1,32,%o1 - sub %o1,%o0,%o0 - srlx %o0,63,%o0 - .end - - .inline __isnanf,1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x80000000),%o2 - andn %o0,%o2,%o0 - sethi %hi(0x7f800000),%o1 - sub %o1,%o0,%o0 - srl %o0,31,%o0 - .end - - .inline __isnormal,1 - fabsd %f0,%f0 - st %f0,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x7ff00000),%o1 - sub %o0,%o1,%o2 - sethi %hi(0x00100000),%o1 - sub %o0,%o1,%o1 - andn %o2,%o1,%o0 - srl %o0,31,%o0 - .end - - .inline __isnormalf,1 - fabss %f1,%f1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x7f800000),%o1 - sub %o0,%o1,%o2 - sethi %hi(0x00800000),%o1 - sub %o0,%o1,%o1 - andn %o2,%o1,%o0 - srl %o0,31,%o0 - .end - - .inline __issubnormal,1 - fabsd %f0,%f0 - std %f0,[%sp+0x87f] - ldx [%sp+0x87f],%o0 - sethi %hi(0x00100000),%o1 - sllx %o1,32,%o1 - sub %o0,%o1,%o1 - sub %g0,%o0,%o2 - or %o0,%o2,%o0 - and %o0,%o1,%o0 - srlx %o0,63,%o0 - .end - - .inline __issubnormalf,1 - fabss %f1,%f1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sethi %hi(0x00800000),%o1 - sub %o0,%o1,%o1 - sub %g0,%o0,%o2 - or %o0,%o2,%o0 - and %o0,%o1,%o0 - srl %o0,31,%o0 - .end - - .inline __iszero,1 - fabsd %f0,%f0 - std %f0,[%sp+0x87f] - ldx [%sp+0x87f],%o0 - sub %g0,%o0,%o1 - or %o0,%o1,%o0 - xnor %o0,%g0,%o0 - srlx %o0,63,%o0 - .end - - .inline __iszerof,1 - fabss %f1,%f1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sub %g0,%o0,%o1 - or %o0,%o1,%o0 - xnor %o0,%g0,%o0 - srl %o0,31,%o0 - .end - - .inline abs,1 - sra %o0,31,%o1 - xor %o0,%o1,%o0 - sub %o0,%o1,%o0 - sra %o0,0,%o0 - .end - - .inline fabs,1 - fabsd %f0,%f0 - .end - - .inline fabsf,1 - fabss %f1,%f0 - .end -! -! __nintf - f77 NINT(REAL*4) -! - - .inline __nintf,1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - srl %o0,30-7,%g1 - sethi %hi(0x7fffff),%o2 - and %g1,0xff,%g1 - or %o2,%lo(0x7fffff),%o2 - sethi %hi(1<<22),%o4 - subcc %g1,127+31,%g0 - and %o0,%o2,%o3 - bl 1f - nop - sethi %hi(0xcf000000),%o2 - sethi %hi(0x80000000),%g1 - subcc %o0,%o2,%g0 - or %g1,%g0,%o0 - be 0f - nop - fstoi %f1,%f0 - st %f0,[%sp+0x87f] - ld [%sp+0x87f],%o0 -0: - sra %o0,0,%o0 - ba 9f - nop -1: - add %o4,%o4,%o5 - or %o3,%o5,%o3 - sra %o0,31-0,%o2 - subcc %g1,127,%g1 - srl %o4,%g1,%o4 - bge 1f - nop - subcc %g1,-1,%g0 - or %g0,0,%o0 - bne 2f - nop - or %g0,1,%o0 - ba 2f - nop -1: - add %o3,%o4,%o3 - or %g0,23,%o0 - subcc %o0,%g1,%o0 - bl 1f - nop - srl %o3,%o0,%o0 - ba 2f - nop -1: - sub %g0,%o0,%o0 - sll %o3,%o0,%o0 -2: - xor %o0,%o2,%o0 - sra %o0,0,%o0 - and %o2,1,%o2 - add %o0,%o2,%o0 -9: - .end - - .inline __il_nint,1 - ld [%o0],%o0 - sra %o0,0,%o0 - srlx %o0,31-8,%g1 - or %g0,1,%o2 - sllx %o2,23-1,%o4 - and %g1,0xff,%g1 - sllx %o2,63-0,%o2 - subcc %g1,127+63,%g0 - bl 0f - nop - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - fstox %f0,%f0 - std %f0,[%sp+0x87f] - ldx [%sp+0x87f],%o0 - ba 9f - nop -0: - add %o4,%o4,%o5 - srax %o2,63-23,%o2 - sub %g1,127+23,%o1 - xnor %o2,%g0,%o2 - and %o0,%o2,%o3 - or %o3,%o5,%o3 - srax %o0,63-0,%o2 - subcc %g1,127,%g1 - bge 1f - nop - subcc %g1,-1,%g0 - or %g0,0,%o0 - bne 2f - nop - or %g0,1,%o0 - ba 2f - nop -1: - brlz,pt %o1,3f - nop - sub %g1,23,%o0 - sllx %o3,%o0,%o0 - ba 2f - nop -3: - srlx %o4,%g1,%o4 - add %o3,%o4,%o3 - or %g0,23,%o0 - sub %o0,%g1,%o0 - srlx %o3,%o0,%o0 -2: - xor %o0,%o2,%o0 - sub %o0,%o2,%o0 -9: - .end -! -! __i_dnnt - f77 NINT(REAL*8) -! - - .inline __i_dnnt,1 - ldx [%o0],%o0 - srlx %o0,63-11,%g1 - or %g0,1,%o2 - stx %o0,[%sp+0x87f] - sllx %o2,52-1,%o4 - and %g1,0x7ff,%g1 - sllx %o2,63-0,%o2 - subcc %g1,1023+32,%g0 - bl 0f - nop - ldd [%sp+0x87f],%f0 - ba 8f - nop -0: - add %o4,%o4,%o5 - srax %o2,63-52,%o2 - sub %g1,1023+30,%o1 - xnor %o2,%g0,%o2 - and %o0,%o2,%o3 - or %o3,%o5,%o3 - srax %o0,63-0,%o2 - subcc %g1,1023,%g1 - bge 1f - nop - subcc %g1,-1,%g0 - or %g0,0,%o0 - bne 2f - nop - or %g0,1,%o0 - ba 2f - nop -1: - srlx %o4,%g1,%o4 - add %o3,%o4,%o3 - or %g0,52,%o0 - sub %o0,%g1,%o0 - srlx %o3,%o0,%o0 -2: - xor %o0,%o2,%o0 - sub %o0,%o2,%o0 - brlz,pt %o1,9f - nop - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - fxtod %f0,%f0 -8: - fdtoi %f0,%f0 - st %f0,[%sp+0x87f] - ld [%sp+0x87f],%o0 - sra %o0,0,%o0 -9: - .end - - .inline __il_dnnt,1 - ldx [%o0],%o0 - srlx %o0,63-11,%g1 - or %g0,1,%o2 - sllx %o2,52-1,%o4 - and %g1,0x7ff,%g1 - sllx %o2,63-0,%o2 - subcc %g1,1023+63,%g0 - bl 0f - nop - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - fdtox %f0,%f0 - std %f0,[%sp+0x87f] - ldx [%sp+0x87f],%o0 - ba 9f - nop -0: - add %o4,%o4,%o5 - srax %o2,63-52,%o2 - sub %g1,1023+52,%o1 - xnor %o2,%g0,%o2 - and %o0,%o2,%o3 - or %o3,%o5,%o3 - srax %o0,63-0,%o2 - subcc %g1,1023,%g1 - bge 1f - nop - subcc %g1,-1,%g0 - or %g0,0,%o0 - bne 2f - nop - or %g0,1,%o0 - ba 2f - nop -1: - brlz,pt %o1,3f - nop - sub %g1,52,%o0 - sllx %o3,%o0,%o0 - ba 2f - nop -3: - srlx %o4,%g1,%o4 - add %o3,%o4,%o3 - or %g0,52,%o0 - sub %o0,%g1,%o0 - srlx %o3,%o0,%o0 -2: - xor %o0,%o2,%o0 - sub %o0,%o2,%o0 -9: - .end - - .inline __anintf,1 - st %f1,[%sp+0x87f] - ld [%sp+0x87f],%o0 - or %g0,1,%o1 - srl %o0,23,%g1 - and %g1,0xff,%g1 - sub %g0,%g1,%g1 - add %g1,0x95,%g1 - subcc %g1,23,%g0 - sll %o1,%g1,%o1 - sub %o1,1,%o2 - bcs 1f - nop - be 2f - nop - bl 3f - nop - sethi %hi(0x80000000),%o1 - and %o0,%o1,%o0 - ba 3f - nop -1: - and %o0,%o1,%o1 -2: - add %o0,%o1,%o0 - andn %o0,%o2,%o0 -3: - st %o0,[%sp+0x87f] - ld [%sp+0x87f],%f0 - .end - - .inline __anint,1 - std %f0,[%sp+0x87f] - ldx [%sp+0x87f],%o0 - or %g0,1,%o1 - srlx %o0,52,%g1 - and %g1,0x7ff,%g1 - sub %g0,%g1,%g1 - add %g1,0x432,%g1 - subcc %g1,52,%g0 - sllx %o1,%g1,%o1 - sub %o1,1,%o2 - bcs,pt %icc,1f - nop - be,pt %icc,2f - nop - bl,pt %icc,3f - nop - srlx %o0,63,%o0 - sllx %o0,63,%o0 - ba 3f - nop -1: - and %o0,%o1,%o1 -2: - add %o0,%o1,%o0 - andn %o0,%o2,%o0 -3: - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f0 - .end - - .inline __r_dim,2 - st %g0,[%sp+0x87f] - ld [%sp+0x87f],%f4 - ld [%o0],%f0 - ld [%o1],%f2 - fcmps %fcc0,%f0,%f2 - fmovsule %fcc0,%f4,%f2 - fsubs %f0,%f2,%f0 - fmovsule %fcc0,%f4,%f0 - .end - - .inline __d_dim,2 - stx %g0,[%sp+0x87f] - ldd [%sp+0x87f],%f4 - ld [%o0],%f0 - ld [%o0+4],%f1 - ld [%o1],%f2 - ld [%o1+4],%f3 - fcmpd %fcc0,%f0,%f2 - fmovdule %fcc0,%f4,%f2 - fsubd %f0,%f2,%f0 - fmovdule %fcc0,%f4,%f0 - .end - - .inline __f95_signf,2 - ld [%o0],%f0 - ld [%o1],%o1 - fabss %f0,%f0 - fnegs %f0,%f1 - sra %o1,0,%o1 - fmovrslz %o1,%f1,%f0 - .end - - .inline __f95_sign,2 - ld [%o0],%f0 - ld [%o0+4],%f1 - ld [%o1],%o1 - fabsd %f0,%f0 - fnegd %f0,%f2 - sra %o1,0,%o1 - fmovrdlz %o1,%f2,%f0 - .end - - .inline __r_sign,2 - ld [%o0],%f0 - ld [%o1],%o1 - fabss %f0,%f0 - fnegs %f0,%f1 - sub %o1,1,%o0 - and %o1,%o0,%o1 - sra %o1,0,%o1 - fmovrslz %o1,%f1,%f0 - .end - - .inline __d_sign,2 - ldd [%o0],%f0 - ldx [%o1],%o1 - fabsd %f0,%f0 - fnegd %f0,%f2 - sub %o1,1,%o0 - and %o1,%o0,%o1 - fmovrdlz %o1,%f2,%f0 - .end -! -! complex __Fc_div_f(complex a, complex b); -! - - .inline __Fc_div_f,0 - st %g0,[%sp+0x87f] - ld [%sp+0x87f],%f4 - fcmps %fcc0,%f3,%f4 - fbne,pn %fcc0,1f - nop - fdivs %f0,%f2,%f0 - fdivs %f1,%f2,%f1 - ba 2f - nop -1: - sethi %hi(0x3ff00000),%o0 - sllx %o0,32,%o0 - stx %o0,[%sp+0x87f] - ldd [%sp+0x87f],%f16 - fsmuld %f2,%f2,%f4 - fsmuld %f3,%f3,%f6 - fsmuld %f1,%f3,%f8 - fsmuld %f0,%f2,%f10 - faddd %f6,%f4,%f6 - fdivd %f16,%f6,%f6 - faddd %f10,%f8,%f10 - fsmuld %f1,%f2,%f12 - fmuld %f10,%f6,%f10 - fsmuld %f0,%f3,%f14 - fsubd %f12,%f14,%f14 - fmuld %f14,%f6,%f6 - fdtos %f10,%f0 - fdtos %f6,%f1 -2: - .end diff --git a/usr/src/lib/libmd/Makefile.targ b/usr/src/lib/libmd/Makefile.targ index f15dc83396..053b721c78 100644 --- a/usr/src/lib/libmd/Makefile.targ +++ b/usr/src/lib/libmd/Makefile.targ @@ -36,7 +36,7 @@ pics/%.o: $(COMDIR)/md4/%.c $(POST_PROCESS_O) pics/%.o: $(COMDIR)/md5/%.c - $(COMPILE.c) -I$(COMDIR)/md5 $(INLINES) -o $@ $< + $(COMPILE.c) -I$(COMDIR)/md5 -o $@ $< $(POST_PROCESS_O) pics/%.o: $(COMDIR)/sha1/%.c diff --git a/usr/src/lib/libmd/capabilities/sun4u/Makefile.com b/usr/src/lib/libmd/capabilities/sun4u/Makefile.com index 8622e03cb4..090e4db2f3 100644 --- a/usr/src/lib/libmd/capabilities/sun4u/Makefile.com +++ b/usr/src/lib/libmd/capabilities/sun4u/Makefile.com @@ -31,8 +31,6 @@ OBJECTS = md5.o sha1.o sha1_asm.o include $(SRC)/lib/Makefile.lib -INLINES = $(COMDIR)/md5/$(MACH)/$(PLATFORM)/byteswap.il - AS_CPPFLAGS += -D__STDC__ -D_ASM -DPIC -D_REENTRANT -D$(MACH) ASFLAGS += $(AS_PICFLAGS) -P CFLAGS += $(CCVERBOSE) -xarch=sparcvis diff --git a/usr/src/lib/libmd/capabilities/sun4v/Makefile.com b/usr/src/lib/libmd/capabilities/sun4v/Makefile.com index 2b1b457197..503940ac82 100644 --- a/usr/src/lib/libmd/capabilities/sun4v/Makefile.com +++ b/usr/src/lib/libmd/capabilities/sun4v/Makefile.com @@ -30,8 +30,6 @@ OBJECTS = md5.o include $(SRC)/lib/Makefile.lib -INLINES = $(COMDIR)/md5/$(MACH)/$(PLATFORM)/byteswap.il - AS_CPPFLAGS += -D__STDC__ -D_ASM -DPIC -D_REENTRANT -D$(MACH) ASFLAGS += $(AS_PICFLAGS) -P CFLAGS += $(CCVERBOSE) -xarch=sparcvis diff --git a/usr/src/lib/udapl/udapl_tavor/amd64/Makefile b/usr/src/lib/udapl/udapl_tavor/amd64/Makefile index 03b2fd8afa..e655f005e5 100644 --- a/usr/src/lib/udapl/udapl_tavor/amd64/Makefile +++ b/usr/src/lib/udapl/udapl_tavor/amd64/Makefile @@ -27,8 +27,4 @@ include ../Makefile.com include $(SRC)/lib/Makefile.lib.64 -amd64_XARCH += amd64.il - -pics/%.o: amd64.il - install: all $(ROOTLIBS64) diff --git a/usr/src/lib/udapl/udapl_tavor/amd64/amd64.il b/usr/src/lib/udapl/udapl_tavor/amd64/amd64.il deleted file mode 100644 index 2768d31053..0000000000 --- a/usr/src/lib/udapl/udapl_tavor/amd64/amd64.il +++ /dev/null @@ -1,43 +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. - */ - -/ -/ In-line functions for amd64 udapl library. -/ - -/ -/ Device registers are in Big Endian byte order, so use bswap* instructions. -/ - - .inline dapls_byteswap64,8 - movq %rdi, %rax - bswapq %rax - .end - - .inline dapls_byteswap32,4 - movl %edi, %eax - bswap %eax - .end diff --git a/usr/src/lib/udapl/udapl_tavor/i386/Makefile b/usr/src/lib/udapl/udapl_tavor/i386/Makefile index edc427ff0d..1b671bce45 100644 --- a/usr/src/lib/udapl/udapl_tavor/i386/Makefile +++ b/usr/src/lib/udapl/udapl_tavor/i386/Makefile @@ -26,8 +26,4 @@ include ../Makefile.com -i386_XARCH += i386.il - -pics/%.o: i386.il - install: all $(ROOTLIBS) diff --git a/usr/src/lib/udapl/udapl_tavor/i386/i386.il b/usr/src/lib/udapl/udapl_tavor/i386/i386.il deleted file mode 100644 index 8dad3607fa..0000000000 --- a/usr/src/lib/udapl/udapl_tavor/i386/i386.il +++ /dev/null @@ -1,45 +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. - */ - -/ -/ In-line functions for i386 udapl library. -/ - -/ -/ Device registers are in Big Endian byte order, so use bswap instructions. -/ - - .inline dapls_byteswap64,8 - movl (%esp), %edx - movl 4(%esp), %eax - bswap %edx - bswap %eax - .end - - .inline dapls_byteswap32,4 - movl (%esp), %eax - bswap %eax - .end diff --git a/usr/src/lib/udapl/udapl_tavor/include/dapl.h b/usr/src/lib/udapl/udapl_tavor/include/dapl.h index 048bf4bd5e..45c5004b5b 100644 --- a/usr/src/lib/udapl/udapl_tavor/include/dapl.h +++ b/usr/src/lib/udapl/udapl_tavor/include/dapl.h @@ -106,12 +106,6 @@ extern "C" { return (v.u); } #endif - -#else /* !defined(__lint) && defined(__GNUC__) */ -/* use SUN inline with .il files */ -uint64_t dapls_byteswap64(uint64_t); -uint32_t dapls_byteswap32(uint32_t); - #endif /* !defined(__lint) && defined(__GNUC__) */ #define HTOBE_64(x) dapls_byteswap64(x) @@ -1054,12 +1048,12 @@ dapl_pz_free(IN DAT_PZ_HANDLE); /* pz_handle */ extern DAT_RETURN dapl_lmr_sync_rdma_read( IN DAT_IA_HANDLE, /* ia_handle */ - IN const DAT_LMR_TRIPLET *, /* local_segments */ + IN const DAT_LMR_TRIPLET *, /* local_segments */ IN DAT_VLEN); /* num_segments */ extern DAT_RETURN dapl_lmr_sync_rdma_write( IN DAT_IA_HANDLE, /* ia_handle */ - IN const DAT_LMR_TRIPLET *, /* local_segments */ + IN const DAT_LMR_TRIPLET *, /* local_segments */ IN DAT_VLEN); /* num_segments */ /* @@ -1071,7 +1065,7 @@ extern DAT_RETURN dapl_ep_create_with_srq( IN DAT_EVD_HANDLE, /* recv_evd_handle */ IN DAT_EVD_HANDLE, /* request_evd_handle */ IN DAT_EVD_HANDLE, /* connect_evd_handle */ - IN DAT_SRQ_HANDLE, /* srq_handle */ + IN DAT_SRQ_HANDLE, /* srq_handle */ IN const DAT_EP_ATTR *, /* ep_attributes */ OUT DAT_EP_HANDLE *); /* ep_handle */ diff --git a/usr/src/psm/stand/boot/sparc/common/sparc.il b/usr/src/psm/stand/boot/sparc/common/sparc.il deleted file mode 100644 index 0065a5f9b4..0000000000 --- a/usr/src/psm/stand/boot/sparc/common/sparc.il +++ /dev/null @@ -1,33 +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) 1995 by Sun Microsystems, Inc. All Rights Reserved. - */ -#pragma ident "%Z%%M% %I% %E% SMI" -! -! In-line functions for sparc kernels. -! - -! stub function for now - .inline sync_instruction_memory,8 - nop - .end diff --git a/usr/src/psm/stand/boot/sparcv9/Makefile.com b/usr/src/psm/stand/boot/sparcv9/Makefile.com index 977df470d7..c42ed04306 100644 --- a/usr/src/psm/stand/boot/sparcv9/Makefile.com +++ b/usr/src/psm/stand/boot/sparcv9/Makefile.com @@ -92,7 +92,6 @@ CPPINCS += -I$(BOOT_DIR)/sparc/common CPPFLAGS = $(CPPDEFS) $(CPPINCS) CPPFLAGS += $(CCYFLAG)$(STANDDIR) ASFLAGS += $(CPPDEFS) -P -D_ASM $(CPPINCS) -CFLAGS64 += ../../sparc/common/sparc.il # # Where to look for libraries. diff --git a/usr/src/tools/cw/cw.c b/usr/src/tools/cw/cw.c index 91e014c966..22e086820e 100644 --- a/usr/src/tools/cw/cw.c +++ b/usr/src/tools/cw/cw.c @@ -21,12 +21,10 @@ */ /* - * Copyright 2018, Richard Lowe. - */ -/* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * + * Copyright 2018 Richard Lowe. * Copyright 2019 Joyent, Inc. */ @@ -39,7 +37,7 @@ */ /* If you modify this file, you must increment CW_VERSION */ -#define CW_VERSION "6.1" +#define CW_VERSION "7.1" /* * -# Verbose mode @@ -666,13 +664,6 @@ do_gcc(cw_ictx_t *ctx) if (*arg == '-') { arglen--; } else { - /* - * Discard inline files that gcc doesn't grok - */ - if (!in_output && arglen > 3 && - strcmp(arg + arglen - 3, ".il") == 0) - continue; - if (!in_output && is_source_file(arg)) c_files++; diff --git a/usr/src/tools/scripts/nightly b/usr/src/tools/scripts/nightly index 72bc1f2c3e..03a0b0da0a 100755 --- a/usr/src/tools/scripts/nightly +++ b/usr/src/tools/scripts/nightly @@ -23,7 +23,7 @@ # # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2008, 2010, Richard Lowe -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# Copyright 2022 Tintri by DDN, Inc. All rights reserved. # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> # Copyright (c) 2017 by Delphix. All rights reserved. # Copyright 2020 Joyent, Inc. @@ -378,11 +378,11 @@ function bootstrap_tools { } # -# Build and install the onbld tools. +# Build and install the tools. # # usage: build_tools DESTROOT # -# returns non-zero status if the build was successful. +# returns zero status if the build was successful. # function build_tools { DESTROOT=$1 @@ -1550,12 +1550,12 @@ fi if [[ "$t_FLAG" == "y" ]]; then set_non_debug_build_flags - bootstrap_tools || fatal_error "Error: could not bootstrap tools" - # Switch ONBLD_TOOLS early if -t is specified so that # we could use bootstrapped cw for compiler checks. ONBLD_TOOLS=${TOOLS_PROTO}/opt/onbld export ONBLD_TOOLS + + bootstrap_tools || fatal_error "Error: could not bootstrap tools" fi echo "\n==== Build environment ====\n" | tee -a $build_environ_file >> $LOGFILE @@ -1633,31 +1633,32 @@ if [[ "$t_FLAG" == "y" ]]; then build_tools ${TOOLS_PROTO} if (( $? != 0 )); then build_ok=n - else - STABS=${TOOLS_PROTO}/opt/onbld/bin/${MACH}/stabs - export STABS - CTFSTABS=${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfstabs - export CTFSTABS - GENOFFSETS=${TOOLS_PROTO}/opt/onbld/bin/genoffsets - export GENOFFSETS - - CTFCONVERT=${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfconvert - export CTFCONVERT - CTFMERGE=${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfmerge - export CTFMERGE - - PATH="${TOOLS_PROTO}/opt/onbld/bin/${MACH}:${PATH}" - PATH="${TOOLS_PROTO}/opt/onbld/bin:${PATH}" - export PATH - - echo "\n==== New environment settings. ====\n" >> $LOGFILE - echo "STABS=${STABS}" >> $LOGFILE - echo "CTFSTABS=${CTFSTABS}" >> $LOGFILE - echo "CTFCONVERT=${CTFCONVERT}" >> $LOGFILE - echo "CTFMERGE=${CTFMERGE}" >> $LOGFILE - echo "PATH=${PATH}" >> $LOGFILE - echo "ONBLD_TOOLS=${ONBLD_TOOLS}" >> $LOGFILE + exit 1 fi + + STABS=${TOOLS_PROTO}/opt/onbld/bin/${MACH}/stabs + export STABS + CTFSTABS=${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfstabs + export CTFSTABS + GENOFFSETS=${TOOLS_PROTO}/opt/onbld/bin/genoffsets + export GENOFFSETS + + CTFCONVERT=${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfconvert + export CTFCONVERT + CTFMERGE=${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfmerge + export CTFMERGE + + PATH="${TOOLS_PROTO}/opt/onbld/bin/${MACH}:${PATH}" + PATH="${TOOLS_PROTO}/opt/onbld/bin:${PATH}" + export PATH + + echo "\n==== New environment settings. ====\n" >> $LOGFILE + echo "STABS=${STABS}" >> $LOGFILE + echo "CTFSTABS=${CTFSTABS}" >> $LOGFILE + echo "CTFCONVERT=${CTFCONVERT}" >> $LOGFILE + echo "CTFMERGE=${CTFMERGE}" >> $LOGFILE + echo "PATH=${PATH}" >> $LOGFILE + echo "ONBLD_TOOLS=${ONBLD_TOOLS}" >> $LOGFILE fi # timestamp the start of the normal build; the findunref tool uses it. diff --git a/usr/src/uts/Makefile.targ b/usr/src/uts/Makefile.targ index 7e6896a508..c7d771d6e5 100644 --- a/usr/src/uts/Makefile.targ +++ b/usr/src/uts/Makefile.targ @@ -33,17 +33,6 @@ # # -# All C objects depend on inline files. However, cc(1) doesn't generate -# the correct dependency info. Also, these Makefiles don't contain a -# separate list of C-derived object files (but it is light weight to -# let the assembler files think they depend upon this when they don't). -# Fortunately, the inline files won't change very often. So, for now, -# all objects depend on the inline files. Remove this when the inliner -# is fixed to drop correct dependency information. -# -$(OBJECTS): $(INLINES) - -# # Partially link .o files to generate the kmod. The fake dependency # on modstubs simplifies things... # diff --git a/usr/src/uts/common/io/1394/inc.flg b/usr/src/uts/common/io/1394/inc.flg index 5c0ff64f53..1763c679cf 100644 --- a/usr/src/uts/common/io/1394/inc.flg +++ b/usr/src/uts/common/io/1394/inc.flg @@ -25,7 +25,7 @@ # Use is subject to license terms. # -# This file brings down all that is needed to build just +# This file brings down all that is needed to build just # 1394 drivers. # @@ -36,22 +36,22 @@ find_files "s.*.h" \ usr/src/uts/common/sys find_files "s.*.h" \ - usr/src/uts/sparc/sys + usr/src/uts/sparc/sys find_files "s.*.h" \ - usr/src/uts/sparc/v7/sys + usr/src/uts/sparc/v7/sys find_files "s.*.h" \ - usr/src/uts/sparc/v9/sys + usr/src/uts/sparc/v9/sys find_files "s.*.h" \ - usr/src/uts/sun/sys + usr/src/uts/sun/sys find_files "s.*.h" \ - usr/src/uts/sun4u/sys + usr/src/uts/sun4u/sys find_files "s.*.h" \ - usr/src/uts/common/vm + usr/src/uts/common/vm find_files "s.*" \ usr/src/uts/sparc/hci1394 \ @@ -75,6 +75,4 @@ echo_file usr/src/uts/sparc/Makefile.files echo_file usr/src/uts/sparc/Makefile.rules echo_file usr/src/uts/sparc/Makefile.sparc echo_file usr/src/uts/sparc/Makefile.targ -echo_file usr/src/uts/sparc/ml/sparc.il echo_file usr/src/uts/sparc/req.flg - diff --git a/usr/src/uts/common/io/ib/inc.flg b/usr/src/uts/common/io/ib/inc.flg index 4fca0e4d50..0e76d857f3 100644 --- a/usr/src/uts/common/io/ib/inc.flg +++ b/usr/src/uts/common/io/ib/inc.flg @@ -65,7 +65,7 @@ find_files "s.*" \ usr/src/uts/intel/ibmf \ usr/src/uts/intel/ibtl \ usr/src/uts/intel/ibp \ - usr/src/uts/intel/rpcib + usr/src/uts/intel/rpcib # packaging files find_files "s.*" usr/src/pkg/license_files @@ -96,7 +96,6 @@ echo_file usr/src/uts/sparc/Makefile.files echo_file usr/src/uts/sparc/Makefile.rules echo_file usr/src/uts/sparc/Makefile.sparc echo_file usr/src/uts/sparc/Makefile.targ -echo_file usr/src/uts/sparc/ml/sparc.il echo_file usr/src/uts/sparc/req.flg echo_file usr/src/uts/intel/Makefile echo_file usr/src/uts/intel/Makefile.files diff --git a/usr/src/uts/intel/ml/i86_subr.s b/usr/src/uts/intel/ml/i86_subr.s index 2a1a183026..61c457135d 100644 --- a/usr/src/uts/intel/ml/i86_subr.s +++ b/usr/src/uts/intel/ml/i86_subr.s @@ -745,7 +745,7 @@ str_valid: /* * Replacement functions for ones that are normally inlined. - * In addition to the copy in i86.il, they are defined here just in case. + * In addition to the inline copies, they are defined here just in case. */ ENTRY(intr_clear) diff --git a/usr/src/uts/sparc/Makefile.files b/usr/src/uts/sparc/Makefile.files index bb662117a5..09c47476c4 100644 --- a/usr/src/uts/sparc/Makefile.files +++ b/usr/src/uts/sparc/Makefile.files @@ -117,8 +117,3 @@ INC_PATH += -I$(UTSBASE)/sparc/krtld # all files including this file. # ASSYM_DEPS += sparc_ddi.o - -# -# Inlined assembler routines. -# -INLINES += $(UTSBASE)/sparc/ml/sparc.il diff --git a/usr/src/uts/sparc/Makefile.sparc b/usr/src/uts/sparc/Makefile.sparc index b35e264e71..210d2b512a 100644 --- a/usr/src/uts/sparc/Makefile.sparc +++ b/usr/src/uts/sparc/Makefile.sparc @@ -119,7 +119,7 @@ CFLAGS += $(XARCH) CFLAGS += $(COPTIMIZE) CFLAGS += $(EXTRA_CFLAGS) CFLAGS += $(XAOPT) -CFLAGS += $(INLINES) -D_ASM_INLINES +CFLAGS += -D_ASM_INLINES CFLAGS += $(CCMODE) CFLAGS += $(SPACEFLAG) CFLAGS += $(CERRWARN) diff --git a/usr/src/uts/sparc/ml/sparc.il b/usr/src/uts/sparc/ml/sparc.il deleted file mode 100644 index 8337c30728..0000000000 --- a/usr/src/uts/sparc/ml/sparc.il +++ /dev/null @@ -1,70 +0,0 @@ -! -! Copyright 2009 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 (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 -! -! -! In-line functions for sparc kernels. -! - -! return current thread pointer - - .inline threadp,0 - .register %g7, #scratch - mov %g7, %o0 - .end - -! return caller - - .inline caller,0 - mov %i7, %o0 - .end - -! return callee - - .inline callee,0 - mov %o7, %o0 - .end - -! needed by krtld - - .inline doflush,0 - andn %o0, 3, %o0 - flush %o0 - .end - -! prefetch 64 bytes into L2-cache - - .inline prefetch_read_many,8 - prefetch [%o0], #n_reads - .end - - .inline prefetch_read_once,8 - prefetch [%o0], #one_read - .end - - .inline prefetch_write_many,8 - prefetch [%o0], #n_writes - .end - - .inline prefetch_write_once,8 - prefetch [%o0], #one_write - .end diff --git a/usr/src/uts/sparc/req.flg b/usr/src/uts/sparc/req.flg index b2dd456328..c909e3508a 100644 --- a/usr/src/uts/sparc/req.flg +++ b/usr/src/uts/sparc/req.flg @@ -36,7 +36,3 @@ echo_file usr/src/uts/sun/Makefile.rules echo_file usr/src/uts/common/Makefile.files echo_file usr/src/uts/common/Makefile.rules - -# uts/Makefile.targ (version 1.17) says "All C objects depend on -# inline files". -echo_file usr/src/uts/sparc/ml/sparc.il diff --git a/usr/src/uts/sun/io/scsi/inc.flg b/usr/src/uts/sun/io/scsi/inc.flg index 6dcd7cc954..4aa2e3d758 100644 --- a/usr/src/uts/sun/io/scsi/inc.flg +++ b/usr/src/uts/sun/io/scsi/inc.flg @@ -72,7 +72,6 @@ echo_file usr/src/uts/sparc/Makefile.files echo_file usr/src/uts/sparc/Makefile.rules echo_file usr/src/uts/sparc/Makefile.sparc echo_file usr/src/uts/sparc/Makefile.targ -echo_file usr/src/uts/sparc/ml/sparc.il echo_file usr/src/uts/sparc/req.flg echo_file usr/src/uts/sun/Makefile.files echo_file usr/src/uts/sun/Makefile.rules diff --git a/usr/src/uts/sun4u/Makefile.sun4u b/usr/src/uts/sun4u/Makefile.sun4u index 0979312bb1..947e17625f 100644 --- a/usr/src/uts/sun4u/Makefile.sun4u +++ b/usr/src/uts/sun4u/Makefile.sun4u @@ -187,7 +187,7 @@ CFLAGS += $(CC_XARCH) CFLAGS += $(COPTIMIZE) CFLAGS += $(EXTRA_CFLAGS) CFLAGS += $(XAOPT) -CFLAGS += $(INLINES) -D_ASM_INLINES +CFLAGS += -D_ASM_INLINES CFLAGS += $(CCMODE) CFLAGS += $(SPACEFLAG) CFLAGS += $(CERRWARN) diff --git a/usr/src/uts/sun4u/db21554/Makefile b/usr/src/uts/sun4u/db21554/Makefile index b59bcd53c8..e6ae7826fe 100644 --- a/usr/src/uts/sun4u/db21554/Makefile +++ b/usr/src/uts/sun4u/db21554/Makefile @@ -54,9 +54,6 @@ include $(UTSBASE)/sun4u/Makefile.sun4u ALL_TARGET = $(BINARY) INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# Turn this on once compiler understands v9 in it's backend -#INLINES += $(UTSBASE)/sun4u/io/pci.il - # # Turn on doubleword alignment for 64 bit registers # diff --git a/usr/src/uts/sun4u/md5/Makefile b/usr/src/uts/sun4u/md5/Makefile index 6b220c54a2..67739996b8 100644 --- a/usr/src/uts/sun4u/md5/Makefile +++ b/usr/src/uts/sun4u/md5/Makefile @@ -61,11 +61,6 @@ CFLAGS += $(CCVERBOSE) LDFLAGS += -Nmisc/kcf # -# need extra inline file for here. -# -INLINES += $(SRC)/common/crypto/md5/sparc/sun4u/byteswap.il - -# # Default build targets. # .KEEP_STATE: diff --git a/usr/src/uts/sun4u/md5/inc.flg b/usr/src/uts/sun4u/md5/inc.flg index b7893b0dec..f2ba849728 100644 --- a/usr/src/uts/sun4u/md5/inc.flg +++ b/usr/src/uts/sun4u/md5/inc.flg @@ -24,7 +24,5 @@ # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" echo_file usr/src/common/crypto/md5/md5.c -echo_file usr/src/common/crypto/md5/sparc/sun4u/byteswap.il diff --git a/usr/src/uts/sun4u/opl/Makefile.rules b/usr/src/uts/sun4u/opl/Makefile.rules index 3c3bc09263..842f5a874b 100644 --- a/usr/src/uts/sun4u/opl/Makefile.rules +++ b/usr/src/uts/sun4u/opl/Makefile.rules @@ -64,10 +64,9 @@ $(SBDGENERR): $(DR_IO)/sbdgenerr.pl IL_CPP=$(CPP) -P -DINLINE -D_ASM $(AS_INC_PATH) \ $(CPP_DEFS) $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS) -DRMACH_IL= $(OBJS_DIR)/drmach.il $(OBJS_DIR)/drmach.o := CC_XARCH_32 = -xarch=v8plusa -$(OBJS_DIR)/drmach.o: $(UTSBASE)/sun4u/opl/io/drmach.c $(DRMACH_IL) - $(COMPILE.c) $(DRMACH_IL) -o $@ $(UTSBASE)/sun4u/opl/io/drmach.c +$(OBJS_DIR)/drmach.o: $(UTSBASE)/sun4u/opl/io/drmach.c + $(COMPILE.c) -o $@ $(UTSBASE)/sun4u/opl/io/drmach.c $(CTFCONVERT_O) $(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/opl/io/%.c @@ -101,9 +100,4 @@ $(OPL_IO)/drmach_err.c: $(SBDGENERR) $(SBD_IOCTL) $(RM) $@ $(SBDGENERR) EOPL < $(SBD_IOCTL) > $@ -CLEANFILES += $(DRMACH_IL) - -$(DRMACH_IL): $(UTSBASE)/sun4u/opl/ml/drmach.il.cpp - $(IL_CPP) $(UTSBASE)/sun4u/opl/ml/drmach.il.cpp > $@ - .KEEP_STATE: diff --git a/usr/src/uts/sun4u/sbbc/Makefile b/usr/src/uts/sun4u/sbbc/Makefile index 69d3b24876..554104627b 100644 --- a/usr/src/uts/sun4u/sbbc/Makefile +++ b/usr/src/uts/sun4u/sbbc/Makefile @@ -53,9 +53,6 @@ include $(UTSBASE)/sun4u/Makefile.sun4u ALL_TARGET = $(BINARY) INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# Turn this on once compiler understands v9 in it's backend -#INLINES += $(UTSBASE)/sun4u/io/sbbc.il - # # Turn on doubleword alignment for 64 bit registers # diff --git a/usr/src/uts/sun4u/sbus/Makefile b/usr/src/uts/sun4u/sbus/Makefile index f950751b24..93301f25a0 100644 --- a/usr/src/uts/sun4u/sbus/Makefile +++ b/usr/src/uts/sun4u/sbus/Makefile @@ -54,9 +54,6 @@ include $(UTSBASE)/sun4u/Makefile.sun4u ALL_TARGET = $(BINARY) INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# Turn this on once compiler understands v9 in it's backend -#INLINES += $(UTSBASE)/sun4u/io/iommu.il - # # Turn on doubleword alignment for 64 bit registers # diff --git a/usr/src/uts/sun4u/serengeti/Makefile.rules b/usr/src/uts/sun4u/serengeti/Makefile.rules index 2d386e2e41..708b511fba 100644 --- a/usr/src/uts/sun4u/serengeti/Makefile.rules +++ b/usr/src/uts/sun4u/serengeti/Makefile.rules @@ -38,11 +38,9 @@ # # Section 1a: C object build rules # -SBDP_IL=$(OBJS_DIR)/sbdp.il - $(OBJS_DIR)/sbdp_mem.o := CC_XARCH_32 = -xarch=v8plusa -$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/serengeti/io/%.c $(SBDP_IL) - $(COMPILE.c) $(SBDP_IL) -o $@ $< +$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/serengeti/io/%.c + $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) $(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/serengeti/ml/%.s @@ -51,13 +49,3 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/serengeti/ml/%.s $(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/serengeti/os/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) - - -# inline stuff - -IL_CPP=$(CPP) -P -DINLINE -D_ASM $(AS_INC_PATH) \ - $(CPP_DEFS) $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS) -CLEANFILES += $(SBDP_IL) - -$(SBDP_IL): $(UTSBASE)/sun4u/serengeti/ml/sbdp.il.cpp - $(IL_CPP) $(UTSBASE)/sun4u/serengeti/ml/sbdp.il.cpp >$@ diff --git a/usr/src/uts/sun4v/Makefile.sun4v b/usr/src/uts/sun4v/Makefile.sun4v index ecc3f509db..abb9c9bc9f 100644 --- a/usr/src/uts/sun4v/Makefile.sun4v +++ b/usr/src/uts/sun4v/Makefile.sun4v @@ -169,7 +169,7 @@ CFLAGS += $(CC_XARCH) CFLAGS += $(COPTIMIZE) CFLAGS += $(EXTRA_CFLAGS) CFLAGS += $(XAOPT) -CFLAGS += $(INLINES) -D_ASM_INLINES +CFLAGS += -D_ASM_INLINES CFLAGS += $(CCMODE) CFLAGS += $(SPACEFLAG) CFLAGS += $(CERRWARN) diff --git a/usr/src/uts/sun4v/md5/Makefile b/usr/src/uts/sun4v/md5/Makefile index 4d85f10c8f..658f3b834d 100644 --- a/usr/src/uts/sun4v/md5/Makefile +++ b/usr/src/uts/sun4v/md5/Makefile @@ -66,11 +66,6 @@ sparc_SPACEFLAG = -W0,-Lt LDFLAGS += -Nmisc/kcf # -# need extra inline file for here. -# -INLINES += $(SRC)/common/crypto/md5/sparc/sun4v/byteswap.il - -# # Default build targets. # .KEEP_STATE: |