s_copysign.S revision 213337
167754Smsmith/* 267754Smsmith * Copyright (c) 1993,94 Winning Strategies, Inc. 367754Smsmith * All rights reserved. 477424Smsmith * 5167802Sjkim * Redistribution and use in source and binary forms, with or without 667754Smsmith * modification, are permitted provided that the following conditions 767754Smsmith * are met: 867754Smsmith * 1. Redistributions of source code must retain the above copyright 967754Smsmith * notice, this list of conditions and the following disclaimer. 1067754Smsmith * 2. Redistributions in binary form must reproduce the above copyright 1167754Smsmith * notice, this list of conditions and the following disclaimer in the 1267754Smsmith * documentation and/or other materials provided with the distribution. 13167802Sjkim * 3. All advertising materials mentioning features or use of this software 1470243Smsmith * must display the following acknowledgement: 1567754Smsmith * This product includes software developed by Winning Strategies, Inc. 1667754Smsmith * 4. The name of the author may not be used to endorse or promote products 1767754Smsmith * derived from this software without specific prior written permission 1867754Smsmith * 1967754Smsmith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2067754Smsmith * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2167754Smsmith * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2267754Smsmith * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2367754Smsmith * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2467754Smsmith * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2567754Smsmith * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2667754Smsmith * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2767754Smsmith * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2867754Smsmith * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2967754Smsmith */ 3067754Smsmith 3167754Smsmith/* 3267754Smsmith * Written by: 3367754Smsmith * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. 3467754Smsmith */ 3567754Smsmith 3667754Smsmith#include <machine/asm.h> 3767754Smsmith__FBSDID("$FreeBSD: head/lib/msun/i387/s_copysign.S 213337 2010-10-01 20:14:36Z dim $") 3867754Smsmith 3967754SmsmithENTRY(copysign) 4067754Smsmith movl 16(%esp),%edx 4167754Smsmith andl $0x80000000,%edx 4267754Smsmith movl 8(%esp),%eax 4367754Smsmith andl $0x7fffffff,%eax 4467754Smsmith orl %edx,%eax 4567754Smsmith movl %eax,8(%esp) 4667754Smsmith fldl 4(%esp) 4767754Smsmith ret 4867754SmsmithEND(copysign) 4967754Smsmith