Print this page
5261 libm should stop using synonyms.h


  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  23  */
  24 /*
  25  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29         .file   "__swapFLAGS.s"
  30 
  31 #include "libm.h"
  32 #include "libm_synonyms.h"
  33 
  34 /*
  35  * swap exception masks
  36  *
  37  * Put the complement of bits 5-0 of the argument into FPCW bits 5-0
  38  * and MXCSR bits 12-7, return the complement of the previous FPCW
  39  * bits 5-0.
  40  */
  41         ENTRY(__swapTE)         / di <-- NOT(desired xcptn_masks)
  42         subq    $8,%rsp
  43         fstcw   (%rsp)          / push current_cw on '86 stack
  44         movq    (%rsp),%rcx     / cx <-- current_cw
  45         movw    %cx,%ax         / ax <-- current_cw
  46         orw     $0x3f,%cx       / cx <-- current_cw, but masking all xcptns
  47         andw    $0x3f,%di       / make sure bits > B5 are all zero
  48         xorw    %di,%cx         / cx <-- present_cw, with new xcptn_masks
  49         movw    %cx,(%rsp)
  50         fldcw   (%rsp)          / load new cw 
  51         stmxcsr (%rsp)
  52         movq    (%rsp),%rcx




  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  23  */
  24 /*
  25  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29         .file   "__swapFLAGS.s"
  30 
  31 #include "libm.h"

  32 
  33 /*
  34  * swap exception masks
  35  *
  36  * Put the complement of bits 5-0 of the argument into FPCW bits 5-0
  37  * and MXCSR bits 12-7, return the complement of the previous FPCW
  38  * bits 5-0.
  39  */
  40         ENTRY(__swapTE)         / di <-- NOT(desired xcptn_masks)
  41         subq    $8,%rsp
  42         fstcw   (%rsp)          / push current_cw on '86 stack
  43         movq    (%rsp),%rcx     / cx <-- current_cw
  44         movw    %cx,%ax         / ax <-- current_cw
  45         orw     $0x3f,%cx       / cx <-- current_cw, but masking all xcptns
  46         andw    $0x3f,%di       / make sure bits > B5 are all zero
  47         xorw    %di,%cx         / cx <-- present_cw, with new xcptn_masks
  48         movw    %cx,(%rsp)
  49         fldcw   (%rsp)          / load new cw 
  50         stmxcsr (%rsp)
  51         movq    (%rsp),%rcx