s_copysign.S revision 2116
1162922Sariff/* 2162922Sariff * Copyright (c) 1993,94 Winning Strategies, Inc. 3162922Sariff * All rights reserved. 4162922Sariff * 5162922Sariff * Redistribution and use in source and binary forms, with or without 6162922Sariff * modification, are permitted provided that the following conditions 7162922Sariff * are met: 8162922Sariff * 1. Redistributions of source code must retain the above copyright 9162922Sariff * notice, this list of conditions and the following disclaimer. 10162922Sariff * 2. Redistributions in binary form must reproduce the above copyright 11162922Sariff * notice, this list of conditions and the following disclaimer in the 12162922Sariff * documentation and/or other materials provided with the distribution. 13162922Sariff * 3. All advertising materials mentioning features or use of this software 14162922Sariff * must display the following acknowledgement: 15162922Sariff * This product includes software developed by Winning Strategies, Inc. 16162922Sariff * 4. The name of the author may not be used to endorse or promote products 17162922Sariff * derived from this software without specific prior written permission 18162922Sariff * 19162922Sariff * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20162922Sariff * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21162922Sariff * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22162922Sariff * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23162922Sariff * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24162922Sariff * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25162922Sariff * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26162922Sariff * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27162922Sariff * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28162922Sariff * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29162922Sariff */ 30162922Sariff 31162922Sariff/* 32162922Sariff * Written by: 33162922Sariff * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. 34162922Sariff */ 35162922Sariff 36162922Sariff#include <machine/asm.h> 37162922Sariff 38162922SariffRCSID("$Id: s_copysign.S,v 1.2 1994/03/12 01:30:36 jtc Exp $") 39162922Sariff 40162922SariffENTRY(copysign) 41162922Sariff movl 16(%esp),%edx 42162922Sariff andl $0x80000000,%edx 43162922Sariff movl 8(%esp),%eax 44162922Sariff andl $0x7fffffff,%eax 45162922Sariff orl %edx,%eax 46162922Sariff movl %eax,8(%esp) 47162922Sariff fldl 4(%esp) 48162922Sariff ret 49162922Sariff