...
Run Format

Text file src/math/asinh_s390x.s

Documentation: math

     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 ·asinhrodataL18<> + 0(SB)/8, $0.749999999977387502E-01
     9	DATA ·asinhrodataL18<> + 8(SB)/8, $-.166666666666657082E+00
    10	DATA ·asinhrodataL18<> + 16(SB)/8, $0.303819368237360639E-01
    11	DATA ·asinhrodataL18<> + 24(SB)/8, $-.446428569571752982E-01
    12	DATA ·asinhrodataL18<> + 32(SB)/8, $0.173500047922695924E-01
    13	DATA ·asinhrodataL18<> + 40(SB)/8, $-.223719767210027185E-01
    14	DATA ·asinhrodataL18<> + 48(SB)/8, $0.113655037946822130E-01
    15	DATA ·asinhrodataL18<> + 56(SB)/8, $0.579747490622448943E-02
    16	DATA ·asinhrodataL18<> + 64(SB)/8, $-.139372433914359122E-01
    17	DATA ·asinhrodataL18<> + 72(SB)/8, $-.218674325255800840E-02
    18	DATA ·asinhrodataL18<> + 80(SB)/8, $-.891074277756961157E-02
    19	DATA ·asinhrodataL18<> + 88(SB)/8, $.41375273347623353626
    20	DATA ·asinhrodataL18<> + 96(SB)/8, $.51487302528619766235E+04
    21	DATA ·asinhrodataL18<> + 104(SB)/8, $-1.67526912689208984375
    22	DATA ·asinhrodataL18<> + 112(SB)/8, $0.181818181818181826E+00
    23	DATA ·asinhrodataL18<> + 120(SB)/8, $-.165289256198351540E-01
    24	DATA ·asinhrodataL18<> + 128(SB)/8, $0.200350613573012186E-02
    25	DATA ·asinhrodataL18<> + 136(SB)/8, $-.273205381970859341E-03
    26	DATA ·asinhrodataL18<> + 144(SB)/8, $0.397389654305194527E-04
    27	DATA ·asinhrodataL18<> + 152(SB)/8, $0.938370938292558173E-06
    28	DATA ·asinhrodataL18<> + 160(SB)/8, $0.212881813645679599E-07
    29	DATA ·asinhrodataL18<> + 168(SB)/8, $-.602107458843052029E-05
    30	DATA ·asinhrodataL18<> + 176(SB)/8, $-.148682720127920854E-06
    31	DATA ·asinhrodataL18<> + 184(SB)/8, $-5.5
    32	DATA ·asinhrodataL18<> + 192(SB)/8, $1.0
    33	DATA ·asinhrodataL18<> + 200(SB)/8, $1.0E-20
    34	GLOBL ·asinhrodataL18<> + 0(SB), RODATA, $208
    35	
    36	// Table of log correction terms
    37	DATA ·asinhtab2080<> + 0(SB)/8, $0.585235384085551248E-01
    38	DATA ·asinhtab2080<> + 8(SB)/8, $0.412206153771168640E-01
    39	DATA ·asinhtab2080<> + 16(SB)/8, $0.273839003221648339E-01
    40	DATA ·asinhtab2080<> + 24(SB)/8, $0.166383778368856480E-01
    41	DATA ·asinhtab2080<> + 32(SB)/8, $0.866678223433169637E-02
    42	DATA ·asinhtab2080<> + 40(SB)/8, $0.319831684989627514E-02
    43	DATA ·asinhtab2080<> + 48(SB)/8, $0.0
    44	DATA ·asinhtab2080<> + 56(SB)/8, $-.113006378583725549E-02
    45	DATA ·asinhtab2080<> + 64(SB)/8, $-.367979419636602491E-03
    46	DATA ·asinhtab2080<> + 72(SB)/8, $0.213172484510484979E-02
    47	DATA ·asinhtab2080<> + 80(SB)/8, $0.623271047682013536E-02
    48	DATA ·asinhtab2080<> + 88(SB)/8, $0.118140812789696885E-01
    49	DATA ·asinhtab2080<> + 96(SB)/8, $0.187681358930914206E-01
    50	DATA ·asinhtab2080<> + 104(SB)/8, $0.269985148668178992E-01
    51	DATA ·asinhtab2080<> + 112(SB)/8, $0.364186619761331328E-01
    52	DATA ·asinhtab2080<> + 120(SB)/8, $0.469505379381388441E-01
    53	GLOBL ·asinhtab2080<> + 0(SB), RODATA, $128
    54	
    55	// Asinh returns the inverse hyperbolic sine of the argument.
    56	//
    57	// Special cases are:
    58	//      Asinh(±0) = ±0
    59	//      Asinh(±Inf) = ±Inf
    60	//      Asinh(NaN) = NaN
    61	// The algorithm used is minimax polynomial approximation
    62	// with coefficients determined with a Remez exchange algorithm.
    63	
    64	TEXT	·asinhAsm(SB), NOSPLIT, $0-16
    65		FMOVD	x+0(FP), F0
    66		MOVD	$·asinhrodataL18<>+0(SB), R9
    67		WORD	$0xB3CD00C0	//lgdr %r12, %f0
    68		WORD	$0xC0293FDF	//iilf	%r2,1071644671
    69		BYTE	$0xFF
    70		BYTE	$0xFF
    71		SRAD	$32, R12
    72		WORD	$0xB917001C	//llgtr	%r1,%r12
    73		MOVW	R1, R6
    74		MOVW	R2, R7
    75		CMPBLE	R6, R7, L2
    76		WORD	$0xC0295FEF	//iilf	%r2,1609564159
    77		BYTE	$0xFF
    78		BYTE	$0xFF
    79		MOVW	R2, R7
    80		CMPBLE	R6, R7, L14
    81	L3:
    82		WORD	$0xC0297FEF	//iilf	%r2,2146435071
    83		BYTE	$0xFF
    84		BYTE	$0xFF
    85		CMPW	R1, R2
    86		BGT	L1
    87		WORD	$0xB3120000	//ltdbr	%f0,%f0
    88		FMOVD	F0, F10
    89		BLTU	L15
    90	L9:
    91		FMOVD	$0, F0
    92		WFADB	V0, V10, V0
    93		WORD	$0xC0398006	//iilf	%r3,2147909631
    94		BYTE	$0x7F
    95		BYTE	$0xFF
    96		WORD	$0xB3CD0050	//lgdr %r5, %f0
    97		SRAD	$32, R5
    98		MOVH	$0x0, R2
    99		SUBW	R5, R3
   100		FMOVD	$0, F8
   101		WORD	$0xEC4320AF	//risbg	%r4,%r3,32,128+47,0
   102		BYTE	$0x00
   103		BYTE	$0x55
   104		BYTE	$0x18	//lr	%r1,%r4
   105		BYTE	$0x14
   106		WORD	$0xEC24001F	//risbgn	%r2,%r4,64-64+0,64-64+0+32-1,64-0-32
   107		BYTE	$0x20
   108		BYTE	$0x59
   109		SUBW	$0x100000, R1
   110		SRAW	$8, R1, R1
   111		ORW	$0x45000000, R1
   112		BR	L6
   113	L2:
   114		MOVD	$0x30000000, R2
   115		CMPW	R1, R2
   116		BGT	L16
   117		FMOVD	200(R9), F2
   118		FMADD	F2, F0, F0
   119	L1:
   120		FMOVD	F0, ret+8(FP)
   121		RET
   122	L14:
   123		WORD	$0xB3120000	//ltdbr	%f0,%f0
   124		BLTU	L17
   125		FMOVD	F0, F10
   126	L4:
   127		FMOVD	192(R9), F2
   128		WFMADB	V0, V0, V2, V0
   129		WORD	$0xB3120000	//ltdbr	%f0,%f0
   130		FSQRT	F0, F8
   131	L5:
   132		WFADB	V8, V10, V0
   133		WORD	$0xC0398006	//iilf	%r3,2147909631
   134		BYTE	$0x7F
   135		BYTE	$0xFF
   136		WORD	$0xB3CD0050	//lgdr %r5, %f0
   137		SRAD	$32, R5
   138		MOVH	$0x0, R2
   139		SUBW	R5, R3
   140		WORD	$0xEC4320AF	//risbg	%r4,%r3,32,128+47,0
   141		BYTE	$0x00
   142		BYTE	$0x55
   143		SRAW	$8, R4, R1
   144		WORD	$0xEC24001F	//risbgn	%r2,%r4,64-64+0,64-64+0+32-1,64-0-32
   145		BYTE	$0x20
   146		BYTE	$0x59
   147		ORW	$0x45000000, R1
   148	L6:
   149		WORD	$0xB3C10022	//ldgr	%f2,%r2
   150		FMOVD	184(R9), F0
   151		WFMADB	V8, V2, V0, V8
   152		FMOVD	176(R9), F4
   153		WFMADB	V10, V2, V8, V2
   154		FMOVD	168(R9), F0
   155		FMOVD	160(R9), F6
   156		FMOVD	152(R9), F1
   157		WFMADB	V2, V6, V4, V6
   158		WFMADB	V2, V1, V0, V1
   159		WFMDB	V2, V2, V4
   160		FMOVD	144(R9), F0
   161		WFMADB	V6, V4, V1, V6
   162		FMOVD	136(R9), F1
   163		WORD	$0xEC3339BC	//risbg	%r3,%r3,57,128+60,64-13
   164		BYTE	$0x33
   165		BYTE	$0x55
   166		WFMADB	V2, V0, V1, V0
   167		FMOVD	128(R9), F1
   168		WFMADB	V4, V6, V0, V6
   169		FMOVD	120(R9), F0
   170		WFMADB	V2, V1, V0, V1
   171		VLVGF	$0, R1, V0
   172		WFMADB	V4, V6, V1, V4
   173		LDEBR	F0, F0
   174		FMOVD	112(R9), F6
   175		WFMADB	V2, V4, V6, V4
   176		MOVD	$·asinhtab2080<>+0(SB), R1
   177		FMOVD	104(R9), F1
   178		WORD	$0x68331000	//ld	%f3,0(%r3,%r1)
   179		FMOVD	96(R9), F6
   180		WFMADB	V2, V4, V3, V2
   181		WFMADB	V0, V1, V6, V0
   182		FMOVD	88(R9), F4
   183		WFMADB	V0, V4, V2, V0
   184		MOVD	R12, R6
   185		CMPBGT	R6, $0, L1
   186	
   187		WORD	$0xB3130000	//lcdbr	%f0,%f0
   188		FMOVD	F0, ret+8(FP)
   189		RET
   190	L16:
   191		WFMDB	V0, V0, V1
   192		FMOVD	80(R9), F6
   193		WFMDB	V1, V1, V4
   194		FMOVD	72(R9), F2
   195		WFMADB	V4, V2, V6, V2
   196		FMOVD	64(R9), F3
   197		FMOVD	56(R9), F6
   198		WFMADB	V4, V2, V3, V2
   199		FMOVD	48(R9), F3
   200		WFMADB	V4, V6, V3, V6
   201		FMOVD	40(R9), F5
   202		FMOVD	32(R9), F3
   203		WFMADB	V4, V2, V5, V2
   204		WFMADB	V4, V6, V3, V6
   205		FMOVD	24(R9), F5
   206		FMOVD	16(R9), F3
   207		WFMADB	V4, V2, V5, V2
   208		WFMADB	V4, V6, V3, V6
   209		FMOVD	8(R9), F5
   210		FMOVD	0(R9), F3
   211		WFMADB	V4, V2, V5, V2
   212		WFMADB	V4, V6, V3, V4
   213		WFMDB	V0, V1, V6
   214		WFMADB	V1, V4, V2, V4
   215		FMADD	F4, F6, F0
   216		FMOVD	F0, ret+8(FP)
   217		RET
   218	L17:
   219		WORD	$0xB31300A0	//lcdbr	%f10,%f0
   220		BR	L4
   221	L15:
   222		WORD	$0xB31300A0	//lcdbr	%f10,%f0
   223		BR	L9

View as plain text