...

Text file src/math/asin_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
     8DATA ·asinrodataL15<> + 0(SB)/8, $-1.309611320495605469
     9DATA ·asinrodataL15<> + 8(SB)/8, $0x3ff921fb54442d18
    10DATA ·asinrodataL15<> + 16(SB)/8, $0xbff921fb54442d18
    11DATA ·asinrodataL15<> + 24(SB)/8, $1.309611320495605469
    12DATA ·asinrodataL15<> + 32(SB)/8, $-0.0
    13DATA ·asinrodataL15<> + 40(SB)/8, $1.199437040755305217
    14DATA ·asinrodataL15<> + 48(SB)/8, $0.166666666666651626E+00
    15DATA ·asinrodataL15<> + 56(SB)/8, $0.750000000042621169E-01
    16DATA ·asinrodataL15<> + 64(SB)/8, $0.446428567178116477E-01
    17DATA ·asinrodataL15<> + 72(SB)/8, $0.303819660378071894E-01
    18DATA ·asinrodataL15<> + 80(SB)/8, $0.223715011892010405E-01
    19DATA ·asinrodataL15<> + 88(SB)/8, $0.173659424522364952E-01
    20DATA ·asinrodataL15<> + 96(SB)/8, $0.137810186504372266E-01
    21DATA ·asinrodataL15<> + 104(SB)/8, $0.134066870961173521E-01
    22DATA ·asinrodataL15<> + 112(SB)/8, $-.412335502831898721E-02
    23DATA ·asinrodataL15<> + 120(SB)/8, $0.867383739532082719E-01
    24DATA ·asinrodataL15<> + 128(SB)/8, $-.328765950607171649E+00
    25DATA ·asinrodataL15<> + 136(SB)/8, $0.110401073869414626E+01
    26DATA ·asinrodataL15<> + 144(SB)/8, $-.270694366992537307E+01
    27DATA ·asinrodataL15<> + 152(SB)/8, $0.500196500770928669E+01
    28DATA ·asinrodataL15<> + 160(SB)/8, $-.665866959108585165E+01
    29DATA ·asinrodataL15<> + 168(SB)/8, $-.344895269334086578E+01
    30DATA ·asinrodataL15<> + 176(SB)/8, $0.927437952918301659E+00
    31DATA ·asinrodataL15<> + 184(SB)/8, $0.610487478874645653E+01
    32DATA ·asinrodataL15<> + 192(SB)/8, $0x7ff8000000000000			//+Inf
    33DATA ·asinrodataL15<> + 200(SB)/8, $-1.0
    34DATA ·asinrodataL15<> + 208(SB)/8, $1.0
    35DATA ·asinrodataL15<> + 216(SB)/8, $1.00000000000000000e-20
    36GLOBL ·asinrodataL15<> + 0(SB), RODATA, $224
    37
    38// Asin returns the arcsine, in radians, of the argument.
    39//
    40// Special cases are:
    41//      Asin(±0) = ±0=
    42//      Asin(x) = NaN if x < -1 or x > 1
    43// The algorithm used is minimax polynomial approximation
    44// with coefficients determined with a Remez exchange algorithm.
    45
    46TEXT	·asinAsm(SB), NOSPLIT, $0-16
    47	FMOVD	x+0(FP), F0
    48	MOVD	$·asinrodataL15<>+0(SB), R9
    49	LGDR	F0, R7
    50	FMOVD	F0, F8
    51	SRAD	$32, R7
    52	WORD	$0xC0193FE6 //iilf  %r1,1072079005
    53	BYTE	$0xA0
    54	BYTE	$0x9D
    55	WORD	$0xB91700C7 //llgtr %r12,%r7
    56	MOVW	R12, R8
    57	MOVW	R1, R6
    58	CMPBGT	R8, R6, L2
    59	WORD	$0xC0193BFF //iilf  %r1,1006632959
    60	BYTE	$0xFF
    61	BYTE	$0xFF
    62	MOVW	R1, R6
    63	CMPBGT	R8, R6, L13
    64L3:
    65	FMOVD	216(R9), F0
    66	FMADD	F0, F8, F8
    67L1:
    68	FMOVD	F8, ret+8(FP)
    69	RET
    70L2:
    71	WORD	$0xC0193FEF	//iilf	%r1,1072693247
    72	BYTE	$0xFF
    73	BYTE	$0xFF
    74	CMPW	R12, R1
    75	BLE	L14
    76L5:
    77	WORD	$0xED0090D0	//cdb	%f0,.L17-.L15(%r9)
    78	BYTE	$0x00
    79	BYTE	$0x19
    80	BEQ		L9
    81	WORD	$0xED0090C8	//cdb	%f0,.L18-.L15(%r9)
    82	BYTE	$0x00
    83	BYTE	$0x19
    84	BEQ	L10
    85	WFCEDBS	V8, V8, V0
    86	BVS	L1
    87	FMOVD	192(R9), F8
    88	BR	L1
    89L13:
    90	WFMDB	V0, V0, V10
    91L4:
    92	WFMDB	V10, V10, V0
    93	FMOVD	184(R9), F6
    94	FMOVD	176(R9), F2
    95	FMOVD	168(R9), F4
    96	WFMADB	V0, V2, V6, V2
    97	FMOVD	160(R9), F6
    98	WFMADB	V0, V4, V6, V4
    99	FMOVD	152(R9), F6
   100	WFMADB	V0, V2, V6, V2
   101	FMOVD	144(R9), F6
   102	WFMADB	V0, V4, V6, V4
   103	FMOVD	136(R9), F6
   104	WFMADB	V0, V2, V6, V2
   105	WORD	$0xC0193FE6	//iilf	%r1,1072079005
   106	BYTE	$0xA0
   107	BYTE	$0x9D
   108	FMOVD	128(R9), F6
   109	WFMADB	V0, V4, V6, V4
   110	FMOVD	120(R9), F6
   111	WFMADB	V0, V2, V6, V2
   112	FMOVD	112(R9), F6
   113	WFMADB	V0, V4, V6, V4
   114	FMOVD	104(R9), F6
   115	WFMADB	V0, V2, V6, V2
   116	FMOVD	96(R9), F6
   117	WFMADB	V0, V4, V6, V4
   118	FMOVD	88(R9), F6
   119	WFMADB	V0, V2, V6, V2
   120	FMOVD	80(R9), F6
   121	WFMADB	V0, V4, V6, V4
   122	FMOVD	72(R9), F6
   123	WFMADB	V0, V2, V6, V2
   124	FMOVD	64(R9), F6
   125	WFMADB	V0, V4, V6, V4
   126	FMOVD	56(R9), F6
   127	WFMADB	V0, V2, V6, V2
   128	FMOVD	48(R9), F6
   129	WFMADB	V0, V4, V6, V0
   130	WFMDB	V8, V10, V4
   131	FMADD	F2, F10, F0
   132	FMADD	F0, F4, F8
   133	CMPW	R12, R1
   134	BLE	L1
   135	FMOVD	40(R9), F0
   136	FMADD	F0, F1, F8
   137	FMOVD	F8, ret+8(FP)
   138	RET
   139L14:
   140	FMOVD	200(R9), F0
   141	FMADD	F8, F8, F0
   142	WORD	$0xB31300A0	//lcdbr	%f10,%f0
   143	WORD	$0xED009020	//cdb	%f0,.L39-.L15(%r9)
   144	BYTE	$0x00
   145	BYTE	$0x19
   146	FSQRT	F10, F8
   147L6:
   148	MOVW	R7, R6
   149	CMPBLE	R6, $0, L8
   150	WORD	$0xB3130088	//lcdbr	%f8,%f8
   151	FMOVD	24(R9), F1
   152	BR	L4
   153L10:
   154	FMOVD	16(R9), F8
   155	BR	L1
   156L9:
   157	FMOVD	8(R9), F8
   158	FMOVD	F8, ret+8(FP)
   159	RET
   160L8:
   161	FMOVD	0(R9), F1
   162	BR	L4

View as plain text