Date: Wed, 14 Oct 2009 09:01:24 +0000 (UTC) From: Roman Divacky <rdivacky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r198072 - in projects/clangbsd/lib/libc: . amd64/gen i386/gen Message-ID: <200910140901.n9E91OME030888@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rdivacky Date: Wed Oct 14 09:01:24 2009 New Revision: 198072 URL: http://svn.freebsd.org/changeset/base/198072 Log: Change ldexp.c to ldexp.s to workaround llvm bug this let libc to be compiled with clang. Added: projects/clangbsd/lib/libc/amd64/gen/ldexp.s projects/clangbsd/lib/libc/i386/gen/ldexp.s Modified: projects/clangbsd/lib/libc/Makefile projects/clangbsd/lib/libc/amd64/gen/Makefile.inc projects/clangbsd/lib/libc/i386/gen/Makefile.inc Modified: projects/clangbsd/lib/libc/Makefile ============================================================================== --- projects/clangbsd/lib/libc/Makefile Wed Oct 14 08:49:38 2009 (r198071) +++ projects/clangbsd/lib/libc/Makefile Wed Oct 14 09:01:24 2009 (r198072) @@ -5,11 +5,6 @@ SHLIBDIR?= /lib .include <bsd.own.mk> -# XXX: LLVM PR879 in ldexp.c -.if ${MK_CLANG_IS_CC} != "no" && ${CC} == "cc" && ${MACHINE_ARCH} == "i386" -CC= gcc -.endif - # All library objects contain FreeBSD revision strings by default; they may be # excluded as a space-saving measure. To produce a library that does # not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS Modified: projects/clangbsd/lib/libc/amd64/gen/Makefile.inc ============================================================================== --- projects/clangbsd/lib/libc/amd64/gen/Makefile.inc Wed Oct 14 08:49:38 2009 (r198071) +++ projects/clangbsd/lib/libc/amd64/gen/Makefile.inc Wed Oct 14 09:01:24 2009 (r198072) @@ -1,8 +1,10 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # $FreeBSD$ +# XXX: the ldexp.s should be ldexp.c see +# http://llvm.org/bugs/show_bug.cgi?id=879 SRCS+= _setjmp.S _set_tp.c rfork_thread.S setjmp.S sigsetjmp.S \ fabs.S modf.S \ - infinity.c ldexp.c makecontext.c signalcontext.c \ + infinity.c ldexp.s makecontext.c signalcontext.c \ flt_rounds.c fpgetmask.c fpsetmask.c fpgetprec.c fpsetprec.c \ fpgetround.c fpsetround.c fpgetsticky.c Added: projects/clangbsd/lib/libc/amd64/gen/ldexp.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clangbsd/lib/libc/amd64/gen/ldexp.s Wed Oct 14 09:01:24 2009 (r198072) @@ -0,0 +1,53 @@ + .file "ldexp.c" +#APP + .ident "$FreeBSD$" +#NO_APP + .text + .p2align 4,,15 +.globl ldexp + .type ldexp, @function +ldexp: +.LFB2: + cvtsi2sd %edi, %xmm1 + movsd %xmm0, -16(%rsp) + movsd %xmm1, -8(%rsp) + fldl -8(%rsp) + fldl -16(%rsp) +#APP + fscale +#NO_APP + fstp %st(1) + fstpl -16(%rsp) + movsd -16(%rsp), %xmm0 + ret +.LFE2: + .size ldexp, .-ldexp + .section .eh_frame,"a",@progbits +.Lframe1: + .long .LECIE1-.LSCIE1 +.LSCIE1: + .long 0x0 + .byte 0x1 + .string "zR" + .uleb128 0x1 + .sleb128 -8 + .byte 0x10 + .uleb128 0x1 + .byte 0x3 + .byte 0xc + .uleb128 0x7 + .uleb128 0x8 + .byte 0x90 + .uleb128 0x1 + .align 8 +.LECIE1: +.LSFDE1: + .long .LEFDE1-.LASFDE1 +.LASFDE1: + .long .LASFDE1-.Lframe1 + .long .LFB2 + .long .LFE2-.LFB2 + .uleb128 0x0 + .align 8 +.LEFDE1: + .ident "GCC: (GNU) 4.2.1 20070719 [FreeBSD]" Modified: projects/clangbsd/lib/libc/i386/gen/Makefile.inc ============================================================================== --- projects/clangbsd/lib/libc/i386/gen/Makefile.inc Wed Oct 14 08:49:38 2009 (r198071) +++ projects/clangbsd/lib/libc/i386/gen/Makefile.inc Wed Oct 14 09:01:24 2009 (r198072) @@ -1,6 +1,8 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # $FreeBSD$ +# XXX: the ldexp.s should be ldexp.c see +# http://llvm.org/bugs/show_bug.cgi?id=879 SRCS+= _ctx_start.S _setjmp.S _set_tp.c fabs.S \ - flt_rounds.c infinity.c ldexp.c makecontext.c modf.S \ + flt_rounds.c infinity.c ldexp.s makecontext.c modf.S \ rfork_thread.S setjmp.S signalcontext.c sigsetjmp.S Added: projects/clangbsd/lib/libc/i386/gen/ldexp.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clangbsd/lib/libc/i386/gen/ldexp.s Wed Oct 14 09:01:24 2009 (r198072) @@ -0,0 +1,22 @@ + .file "ldexp.c" +#APP + .ident "$FreeBSD$" +#NO_APP + .text + .p2align 4,,15 +.globl ldexp + .type ldexp, @function +ldexp: + pushl %ebp + movl %esp, %ebp + fldl 8(%ebp) + fildl 16(%ebp) + fxch %st(1) + popl %ebp +#APP + fscale +#NO_APP + fstp %st(1) + ret + .size ldexp, .-ldexp + .ident "GCC: (GNU) 4.2.1 20070719 [FreeBSD]"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910140901.n9E91OME030888>