"Fossies" - the Fresh Open Source Software Archive

Member "go/src/math/acosh_s390x.s" (9 Sep 2020, 4423 Bytes) of package /windows/misc/go1.14.9.windows-386.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PowerPC Assembler source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 // Copyright 2017 The Go Authors. All rights reserved.
    2 // Use of this source code is governed by a BSD-style
    3 // license that can be found in the LICENSE file.
    4 
    5 #include "textflag.h"
    6 
    7 // Minimax polynomial coefficients and other constants
    8 DATA ·acoshrodataL11<> + 0(SB)/8, $-1.0
    9 DATA ·acoshrodataL11<> + 8(SB)/8, $.41375273347623353626
   10 DATA ·acoshrodataL11<> + 16(SB)/8, $.51487302528619766235E+04
   11 DATA ·acoshrodataL11<> + 24(SB)/8, $-1.67526912689208984375
   12 DATA ·acoshrodataL11<> + 32(SB)/8, $0.181818181818181826E+00
   13 DATA ·acoshrodataL11<> + 40(SB)/8, $-.165289256198351540E-01
   14 DATA ·acoshrodataL11<> + 48(SB)/8, $0.200350613573012186E-02
   15 DATA ·acoshrodataL11<> + 56(SB)/8, $-.273205381970859341E-03
   16 DATA ·acoshrodataL11<> + 64(SB)/8, $0.397389654305194527E-04
   17 DATA ·acoshrodataL11<> + 72(SB)/8, $0.938370938292558173E-06
   18 DATA ·acoshrodataL11<> + 80(SB)/8, $-.602107458843052029E-05
   19 DATA ·acoshrodataL11<> + 88(SB)/8, $0.212881813645679599E-07
   20 DATA ·acoshrodataL11<> + 96(SB)/8, $-.148682720127920854E-06
   21 DATA ·acoshrodataL11<> + 104(SB)/8, $-5.5
   22 DATA ·acoshrodataL11<> + 112(SB)/8, $0x7ff8000000000000      //Nan
   23 GLOBL ·acoshrodataL11<> + 0(SB), RODATA, $120
   24 
   25 // Table of log correction terms
   26 DATA ·acoshtab2068<> + 0(SB)/8, $0.585235384085551248E-01
   27 DATA ·acoshtab2068<> + 8(SB)/8, $0.412206153771168640E-01
   28 DATA ·acoshtab2068<> + 16(SB)/8, $0.273839003221648339E-01
   29 DATA ·acoshtab2068<> + 24(SB)/8, $0.166383778368856480E-01
   30 DATA ·acoshtab2068<> + 32(SB)/8, $0.866678223433169637E-02
   31 DATA ·acoshtab2068<> + 40(SB)/8, $0.319831684989627514E-02
   32 DATA ·acoshtab2068<> + 48(SB)/8, $0.0
   33 DATA ·acoshtab2068<> + 56(SB)/8, $-.113006378583725549E-02
   34 DATA ·acoshtab2068<> + 64(SB)/8, $-.367979419636602491E-03
   35 DATA ·acoshtab2068<> + 72(SB)/8, $0.213172484510484979E-02
   36 DATA ·acoshtab2068<> + 80(SB)/8, $0.623271047682013536E-02
   37 DATA ·acoshtab2068<> + 88(SB)/8, $0.118140812789696885E-01
   38 DATA ·acoshtab2068<> + 96(SB)/8, $0.187681358930914206E-01
   39 DATA ·acoshtab2068<> + 104(SB)/8, $0.269985148668178992E-01
   40 DATA ·acoshtab2068<> + 112(SB)/8, $0.364186619761331328E-01
   41 DATA ·acoshtab2068<> + 120(SB)/8, $0.469505379381388441E-01
   42 GLOBL ·acoshtab2068<> + 0(SB), RODATA, $128
   43 
   44 // Acosh returns the inverse hyperbolic cosine of the argument.
   45 //
   46 // Special cases are:
   47 //      Acosh(+Inf) = +Inf
   48 //      Acosh(x) = NaN if x < 1
   49 //      Acosh(NaN) = NaN
   50 // The algorithm used is minimax polynomial approximation
   51 // with coefficients determined with a Remez exchange algorithm.
   52 
   53 TEXT    ·acoshAsm(SB), NOSPLIT, $0-16
   54     FMOVD   x+0(FP), F0
   55     MOVD    $·acoshrodataL11<>+0(SB), R9
   56     LGDR    F0, R1
   57     WORD    $0xC0295FEF //iilf  %r2,1609564159
   58     BYTE    $0xFF
   59     BYTE    $0xFF
   60     SRAD    $32, R1
   61     CMPW    R1, R2
   62     BGT L2
   63     WORD    $0xC0293FEF //iilf  %r2,1072693247
   64     BYTE    $0xFF
   65     BYTE    $0xFF
   66     CMPW    R1, R2
   67     BGT L10
   68 L3:
   69     WFCEDBS V0, V0, V2
   70     BVS L1
   71     FMOVD   112(R9), F0
   72 L1:
   73     FMOVD   F0, ret+8(FP)
   74     RET
   75 L2:
   76     WORD    $0xC0297FEF //iilf  %r2,2146435071
   77     BYTE    $0xFF
   78     BYTE    $0xFF
   79     MOVW    R1, R6
   80     MOVW    R2, R7
   81     CMPBGT  R6, R7, L1
   82     FMOVD   F0, F8
   83     FMOVD   $0, F0
   84     WFADB   V0, V8, V0
   85     WORD    $0xC0398006 //iilf  %r3,2147909631
   86     BYTE    $0x7F
   87     BYTE    $0xFF
   88     LGDR    F0, R5
   89     SRAD    $32, R5
   90     MOVH    $0x0, R1
   91     SUBW    R5, R3
   92     FMOVD   $0, F10
   93     RISBGZ  $32, $47, $0, R3, R4
   94     RISBGZ  $57, $60, $51, R3, R3
   95     BYTE    $0x18   //lr    %r2,%r4
   96     BYTE    $0x24
   97     RISBGN  $0, $31, $32, R4, R1
   98     SUBW    $0x100000, R2
   99     SRAW    $8, R2, R2
  100     ORW $0x45000000, R2
  101 L5:
  102     LDGR    R1, F0
  103     FMOVD   104(R9), F2
  104     FMADD   F8, F0, F2
  105     FMOVD   96(R9), F4
  106     WFMADB  V10, V0, V2, V0
  107     FMOVD   88(R9), F6
  108     FMOVD   80(R9), F2
  109     WFMADB  V0, V6, V4, V6
  110     FMOVD   72(R9), F1
  111     WFMDB   V0, V0, V4
  112     WFMADB  V0, V1, V2, V1
  113     FMOVD   64(R9), F2
  114     WFMADB  V6, V4, V1, V6
  115     FMOVD   56(R9), F1
  116     RISBGZ  $57, $60, $0, R3, R3
  117     WFMADB  V0, V2, V1, V2
  118     FMOVD   48(R9), F1
  119     WFMADB  V4, V6, V2, V6
  120     FMOVD   40(R9), F2
  121     WFMADB  V0, V1, V2, V1
  122     VLVGF   $0, R2, V2
  123     WFMADB  V4, V6, V1, V4
  124     LDEBR   F2, F2
  125     FMOVD   32(R9), F6
  126     WFMADB  V0, V4, V6, V4
  127     FMOVD   24(R9), F1
  128     FMOVD   16(R9), F6
  129     MOVD    $·acoshtab2068<>+0(SB), R1
  130     WFMADB  V2, V1, V6, V2
  131     FMOVD   0(R3)(R1*1), F3
  132     WFMADB  V0, V4, V3, V0
  133     FMOVD   8(R9), F4
  134     FMADD   F4, F2, F0
  135     FMOVD   F0, ret+8(FP)
  136     RET
  137 L10:
  138     FMOVD   F0, F8
  139     FMOVD   0(R9), F0
  140     FMADD   F8, F8, F0
  141     LTDBR   F0, F0
  142     FSQRT   F0, F10
  143 L4:
  144     WFADB   V10, V8, V0
  145     WORD    $0xC0398006 //iilf  %r3,2147909631
  146     BYTE    $0x7F
  147     BYTE    $0xFF
  148     LGDR    F0, R5
  149     SRAD    $32, R5
  150     MOVH    $0x0, R1
  151     SUBW    R5, R3
  152     SRAW    $8, R3, R2
  153     RISBGZ  $32, $47, $0, R3, R4
  154     ANDW    $0xFFFFFF00, R2
  155     RISBGZ  $57, $60, $51, R3, R3
  156     ORW $0x45000000, R2
  157     RISBGN  $0, $31, $32, R4, R1
  158     BR  L5