Print this page
5261 libm should stop using synonyms.h


  22  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  23  */
  24 /*
  25  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29         .file   "__reduction.s"
  30 
  31 /
  32 /    After argument reduction which returns n:
  33 /       n mod 4     sin(x)      cos(x)        tan(x)
  34 /     ----------------------------------------------------------
  35 /          0          S           C             S/C
  36 /          1          C          -S            -C/S
  37 /          2         -S          -C             S/C
  38 /          3         -C           S            -C/S
  39 /     ----------------------------------------------------------
  40 
  41 #include "libm.h"
  42 #include "libm_synonyms.h"
  43 #include "libm_protos.h"
  44 #undef fabs
  45 
  46         ENTRY(__reduction)
  47 #ifndef PIC
  48         movl    12(%esp),%eax           / load the high part of arg
  49 #else
  50         movl    16(%esp),%eax           / load the high part of arg
  51 #endif
  52         andl    $0x7fffffff,%eax        / clear sign
  53         cmpl    $0x3fe921fb,%eax        / Is |x| < pi/4 (= 0x3fe921fb54...) ?
  54         jbe     .L0
  55         cmpl    $0x7ff00000,%eax        / Is arg a NaN or an Inf ?
  56         jb      .L1
  57 .L0:
  58 #ifndef PIC
  59         fldl    8(%esp)                 / push arg
  60 #else
  61         fldl    12(%esp)                / push arg
  62 #endif




  22  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  23  */
  24 /*
  25  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29         .file   "__reduction.s"
  30 
  31 /
  32 /    After argument reduction which returns n:
  33 /       n mod 4     sin(x)      cos(x)        tan(x)
  34 /     ----------------------------------------------------------
  35 /          0          S           C             S/C
  36 /          1          C          -S            -C/S
  37 /          2         -S          -C             S/C
  38 /          3         -C           S            -C/S
  39 /     ----------------------------------------------------------
  40 
  41 #include "libm.h"

  42 #include "libm_protos.h"
  43 #undef fabs
  44 
  45         ENTRY(__reduction)
  46 #ifndef PIC
  47         movl    12(%esp),%eax           / load the high part of arg
  48 #else
  49         movl    16(%esp),%eax           / load the high part of arg
  50 #endif
  51         andl    $0x7fffffff,%eax        / clear sign
  52         cmpl    $0x3fe921fb,%eax        / Is |x| < pi/4 (= 0x3fe921fb54...) ?
  53         jbe     .L0
  54         cmpl    $0x7ff00000,%eax        / Is arg a NaN or an Inf ?
  55         jb      .L1
  56 .L0:
  57 #ifndef PIC
  58         fldl    8(%esp)                 / push arg
  59 #else
  60         fldl    12(%esp)                / push arg
  61 #endif