mirror of git://sourceware.org/git/glibc.git
x86_64: Fix svml_d_atanh2_core_sse4.S code formatting
This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
This commit is contained in:
parent
a14edf4781
commit
8849864bb1
|
|
@ -60,8 +60,7 @@
|
|||
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
.section .text.sse4,"ax",@progbits
|
||||
.section .text.sse4, "ax", @progbits
|
||||
ENTRY(_ZGVbN2v_atanh_sse4)
|
||||
pushq %rbp
|
||||
cfi_def_cfa_offset(16)
|
||||
|
|
@ -74,10 +73,10 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
movups SgnMask+__svml_datanh_data_internal(%rip), %xmm7
|
||||
lea Table_Lookup_Bias+__svml_datanh_data_internal(%rip), %rsi
|
||||
|
||||
/* Load the constant 1 and a sign mask */
|
||||
/* Load the constant 1 and a sign mask */
|
||||
movups One+__svml_datanh_data_internal(%rip), %xmm11
|
||||
|
||||
/* Strip off the sign, so treat X as positive until right at the end */
|
||||
/* Strip off the sign, so treat X as positive until right at the end */
|
||||
movaps %xmm7, %xmm14
|
||||
andps %xmm12, %xmm14
|
||||
movaps %xmm11, %xmm15
|
||||
|
|
@ -86,7 +85,7 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
movaps %xmm11, %xmm5
|
||||
movaps %xmm2, %xmm0
|
||||
|
||||
/*
|
||||
/*
|
||||
* Compute V = 2 * X trivially, and UHi + U_lo = 1 - X in two pieces,
|
||||
* the upper part UHi being <= 41 bits long. Then we have
|
||||
* atanh(X) = 1/2 * log((1 + X) / (1 - X)) = 1/2 * log1p(V / (UHi + ULo)).
|
||||
|
|
@ -94,14 +93,14 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
movaps %xmm14, %xmm6
|
||||
andps %xmm15, %xmm0
|
||||
|
||||
/*
|
||||
/*
|
||||
* Check whether |X| < 1, in which case we use the main function.
|
||||
* Otherwise set the rangemask so that the callout will get used.
|
||||
* Note that this will also use the callout for NaNs since not(NaN < 1).
|
||||
*/
|
||||
movaps %xmm14, %xmm13
|
||||
|
||||
/*
|
||||
/*
|
||||
* Now compute R = 1/(UHi+ULo) * (1 - E) and the error term E
|
||||
* The first FMR is exact (we force R to 12 bits just in case it
|
||||
* isn't already, to make absolutely sure), and since E is ~ 2^-12,
|
||||
|
|
@ -126,13 +125,13 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
mulpd %xmm14, %xmm5
|
||||
subpd %xmm0, %xmm13
|
||||
|
||||
/*
|
||||
/*
|
||||
* Split V as well into upper 41 bits and lower part, so that we can get
|
||||
* a preliminary quotient estimate without rounding error.
|
||||
*/
|
||||
andps %xmm6, %xmm2
|
||||
|
||||
/*
|
||||
/*
|
||||
* Now we feed into the log1p code, using H in place of _VARG1 and
|
||||
* later incorporating L into the reduced argument.
|
||||
* compute 1+x as high, low parts
|
||||
|
|
@ -141,11 +140,11 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
subpd %xmm5, %xmm13
|
||||
subpd %xmm2, %xmm6
|
||||
|
||||
/* Hence get initial quotient estimate QHi + QLo = R * VHi + R * VLo */
|
||||
/* Hence get initial quotient estimate QHi + QLo = R * VHi + R * VLo */
|
||||
mulpd %xmm14, %xmm2
|
||||
mulpd %xmm6, %xmm14
|
||||
|
||||
/*
|
||||
/*
|
||||
* Compute D = E + E^2 + E^3 + E^4 + E^5
|
||||
* = E + (E + E^2) (E + E * E^2)
|
||||
*/
|
||||
|
|
@ -158,7 +157,7 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
mulpd %xmm3, %xmm6
|
||||
addpd %xmm6, %xmm13
|
||||
|
||||
/*
|
||||
/*
|
||||
* Compute R * (VHi + VLo) * (1 + E + E^2 + E^3 + E^4 + E^5)
|
||||
* = R * (VHi + VLo) * (1 + D)
|
||||
* = QHi + (QHi * D + QLo + QLo * D)
|
||||
|
|
@ -170,7 +169,7 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
addpd %xmm13, %xmm14
|
||||
addpd %xmm14, %xmm1
|
||||
|
||||
/*
|
||||
/*
|
||||
* Now finally accumulate the high and low parts of the
|
||||
* argument to log1p, H + L, with a final compensated summation.
|
||||
*/
|
||||
|
|
@ -184,17 +183,17 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
orps XhMask+__svml_datanh_data_internal(%rip), %xmm2
|
||||
movaps %xmm12, %xmm10
|
||||
|
||||
/* preserve mantissa, set input exponent to 2^(-10) */
|
||||
/* preserve mantissa, set input exponent to 2^(-10) */
|
||||
movups ExpMask+__svml_datanh_data_internal(%rip), %xmm7
|
||||
andps %xmm2, %xmm4
|
||||
andps %xmm4, %xmm7
|
||||
|
||||
/* exponent bits */
|
||||
/* exponent bits */
|
||||
movaps %xmm4, %xmm6
|
||||
orps Two10+__svml_datanh_data_internal(%rip), %xmm7
|
||||
psrlq $20, %xmm6
|
||||
|
||||
/* reciprocal approximation good to at least 11 bits */
|
||||
/* reciprocal approximation good to at least 11 bits */
|
||||
cvtpd2ps %xmm7, %xmm1
|
||||
subpd %xmm4, %xmm0
|
||||
mulpd %xmm12, %xmm10
|
||||
|
|
@ -204,47 +203,47 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
rcpps %xmm1, %xmm15
|
||||
cvtps2pd %xmm15, %xmm3
|
||||
|
||||
/* round reciprocal to nearest integer, will have 1+9 mantissa bits */
|
||||
/* round reciprocal to nearest integer, will have 1+9 mantissa bits */
|
||||
movups .FLT_21(%rip), %xmm1
|
||||
addpd %xmm1, %xmm3
|
||||
subpd %xmm1, %xmm3
|
||||
|
||||
/* exponent of X needed to scale Xl */
|
||||
/* exponent of X needed to scale Xl */
|
||||
movdqu ExpMask0+__svml_datanh_data_internal(%rip), %xmm0
|
||||
|
||||
/*
|
||||
/*
|
||||
* prepare table index
|
||||
* table lookup
|
||||
*/
|
||||
movaps %xmm3, %xmm13
|
||||
|
||||
/* 2^ (-10-exp(X) ) */
|
||||
/* 2^ (-10-exp(X) ) */
|
||||
movdqu ExpMask2+__svml_datanh_data_internal(%rip), %xmm2
|
||||
pand %xmm4, %xmm0
|
||||
psubq %xmm0, %xmm2
|
||||
|
||||
/* scale DblRcp */
|
||||
/* scale DblRcp */
|
||||
mulpd %xmm3, %xmm2
|
||||
|
||||
/* argument reduction */
|
||||
/* argument reduction */
|
||||
mulpd %xmm2, %xmm4
|
||||
mulpd %xmm2, %xmm5
|
||||
subpd %xmm11, %xmm4
|
||||
addpd %xmm5, %xmm4
|
||||
|
||||
/* polynomial */
|
||||
/* polynomial */
|
||||
movups poly_coeff+__svml_datanh_data_internal(%rip), %xmm11
|
||||
psrlq $40, %xmm13
|
||||
mulpd %xmm4, %xmm11
|
||||
movd %xmm13, %eax
|
||||
pshufd $221, %xmm6, %xmm7
|
||||
|
||||
/* exponent*log(2.0) */
|
||||
/* exponent*log(2.0) */
|
||||
movups Threshold+__svml_datanh_data_internal(%rip), %xmm6
|
||||
cmpltpd %xmm3, %xmm6
|
||||
addpd poly_coeff+16+__svml_datanh_data_internal(%rip), %xmm11
|
||||
|
||||
/* biased exponent in DP format */
|
||||
/* biased exponent in DP format */
|
||||
cvtdq2pd %xmm7, %xmm1
|
||||
movaps %xmm4, %xmm3
|
||||
mulpd %xmm4, %xmm3
|
||||
|
|
@ -254,7 +253,7 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
addpd poly_coeff+48+__svml_datanh_data_internal(%rip), %xmm2
|
||||
addpd %xmm11, %xmm2
|
||||
|
||||
/* reconstruction */
|
||||
/* reconstruction */
|
||||
mulpd %xmm2, %xmm3
|
||||
andps Bias+__svml_datanh_data_internal(%rip), %xmm6
|
||||
orps Bias1+__svml_datanh_data_internal(%rip), %xmm6
|
||||
|
|
@ -266,19 +265,19 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
movslq %eax, %rax
|
||||
movslq %ecx, %rcx
|
||||
|
||||
/* Record the sign for eventual reincorporation. */
|
||||
/* Record the sign for eventual reincorporation. */
|
||||
movups dSign+__svml_datanh_data_internal(%rip), %xmm8
|
||||
andps %xmm12, %xmm8
|
||||
movsd (%rsi,%rax), %xmm0
|
||||
movsd (%rsi, %rax), %xmm0
|
||||
|
||||
/* Or the sign bit in with the tiny result to handle atanh(-0) correctly */
|
||||
/* Or the sign bit in with the tiny result to handle atanh(-0) correctly */
|
||||
orps %xmm8, %xmm10
|
||||
movhpd (%rsi,%rcx), %xmm0
|
||||
movhpd (%rsi, %rcx), %xmm0
|
||||
andps %xmm9, %xmm10
|
||||
addpd %xmm4, %xmm0
|
||||
addpd %xmm0, %xmm1
|
||||
|
||||
/* Finally, halve the result and reincorporate the sign */
|
||||
/* Finally, halve the result and reincorporate the sign */
|
||||
movups dHalf+__svml_datanh_data_internal(%rip), %xmm4
|
||||
movaps %xmm9, %xmm0
|
||||
pxor %xmm8, %xmm4
|
||||
|
|
@ -287,11 +286,11 @@ ENTRY(_ZGVbN2v_atanh_sse4)
|
|||
orps %xmm10, %xmm0
|
||||
testl %edx, %edx
|
||||
|
||||
/* Go to special inputs processing branch */
|
||||
/* Go to special inputs processing branch */
|
||||
jne L(SPECIAL_VALUES_BRANCH)
|
||||
# LOE rbx r12 r13 r14 r15 edx xmm0 xmm12
|
||||
|
||||
/* Restore registers
|
||||
/* Restore registers
|
||||
* and exit the function
|
||||
*/
|
||||
|
||||
|
|
@ -304,7 +303,7 @@ L(EXIT):
|
|||
cfi_def_cfa(6, 16)
|
||||
cfi_offset(6, -16)
|
||||
|
||||
/* Branch to process
|
||||
/* Branch to process
|
||||
* special inputs
|
||||
*/
|
||||
|
||||
|
|
@ -327,18 +326,18 @@ L(SPECIAL_VALUES_BRANCH):
|
|||
.cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x22
|
||||
# LOE rbx r15 r12d r13d
|
||||
|
||||
/* Range mask
|
||||
/* Range mask
|
||||
* bits check
|
||||
*/
|
||||
|
||||
L(RANGEMASK_CHECK):
|
||||
btl %r12d, %r13d
|
||||
|
||||
/* Call scalar math function */
|
||||
/* Call scalar math function */
|
||||
jc L(SCALAR_MATH_CALL)
|
||||
# LOE rbx r15 r12d r13d
|
||||
|
||||
/* Special inputs
|
||||
/* Special inputs
|
||||
* processing loop
|
||||
*/
|
||||
|
||||
|
|
@ -346,7 +345,7 @@ L(SPECIAL_VALUES_LOOP):
|
|||
incl %r12d
|
||||
cmpl $2, %r12d
|
||||
|
||||
/* Check bits in range mask */
|
||||
/* Check bits in range mask */
|
||||
jl L(RANGEMASK_CHECK)
|
||||
# LOE rbx r15 r12d r13d
|
||||
|
||||
|
|
@ -358,7 +357,7 @@ L(SPECIAL_VALUES_LOOP):
|
|||
cfi_restore(14)
|
||||
movups 48(%rsp), %xmm0
|
||||
|
||||
/* Go to exit */
|
||||
/* Go to exit */
|
||||
jmp L(EXIT)
|
||||
/* DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -48; DW_OP_plus) */
|
||||
.cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0xd0, 0xff, 0xff, 0xff, 0x22
|
||||
|
|
@ -368,19 +367,19 @@ L(SPECIAL_VALUES_LOOP):
|
|||
.cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x22
|
||||
# LOE rbx r12 r13 r14 r15 xmm0
|
||||
|
||||
/* Scalar math fucntion call
|
||||
/* Scalar math fucntion call
|
||||
* to process special input
|
||||
*/
|
||||
|
||||
L(SCALAR_MATH_CALL):
|
||||
movl %r12d, %r14d
|
||||
movsd 32(%rsp,%r14,8), %xmm0
|
||||
movsd 32(%rsp, %r14, 8), %xmm0
|
||||
call atanh@PLT
|
||||
# LOE rbx r14 r15 r12d r13d xmm0
|
||||
|
||||
movsd %xmm0, 48(%rsp,%r14,8)
|
||||
movsd %xmm0, 48(%rsp, %r14, 8)
|
||||
|
||||
/* Process special inputs in loop */
|
||||
/* Process special inputs in loop */
|
||||
jmp L(SPECIAL_VALUES_LOOP)
|
||||
# LOE rbx r15 r12d r13d
|
||||
END(_ZGVbN2v_atanh_sse4)
|
||||
|
|
@ -930,7 +929,7 @@ __svml_datanh_data_internal:
|
|||
.quad 0xc08628b36d39ec08, 0xbe1cf1abc231f7b2
|
||||
.quad 0xc08628b56dfa36d0, 0xbe1cf2074d5ba303
|
||||
.quad 0xc08628b76e3a4180, 0xbe1cf05cd5eed880
|
||||
/*== Log_LA_table ==*/
|
||||
/* Log_LA_table */
|
||||
.align 16
|
||||
.quad 0x8000000000000000
|
||||
.quad 0xbf5ff802a9ab10e6
|
||||
|
|
@ -1445,75 +1444,75 @@ __svml_datanh_data_internal:
|
|||
.quad 0x3f60040155d5889e
|
||||
.quad 0x3f50020055655889
|
||||
.quad 0x0000000000000000
|
||||
/*== poly_coeff[4] ==*/
|
||||
/* poly_coeff[4] */
|
||||
.align 16
|
||||
.quad 0x3fc9999CACDB4D0A, 0x3fc9999CACDB4D0A /* coeff4 */
|
||||
.quad 0xbfd0000148058EE1, 0xbfd0000148058EE1 /* coeff3 */
|
||||
.quad 0x3fd55555555543C5, 0x3fd55555555543C5 /* coeff2 */
|
||||
.quad 0xbfdFFFFFFFFFF81F, 0xbfdFFFFFFFFFF81F /* coeff1 */
|
||||
/*== ExpMask ==*/
|
||||
/* ExpMask */
|
||||
.align 16
|
||||
.quad 0x000fffffffffffff, 0x000fffffffffffff
|
||||
/*== Two10 ==*/
|
||||
/* Two10 */
|
||||
.align 16
|
||||
.quad 0x3f50000000000000, 0x3f50000000000000
|
||||
/*== MinLog1p = -1+2^(-53) ==*/
|
||||
/* MinLog1p = -1+2^(-53) */
|
||||
.align 16
|
||||
.quad 0xbfefffffffffffff, 0xbfefffffffffffff
|
||||
/*== MaxLog1p ==*/
|
||||
/* MaxLog1p */
|
||||
.align 16
|
||||
.quad 0x7f3ffffffffff000, 0x7f3ffffffffff000
|
||||
/*== One ==*/
|
||||
/* One */
|
||||
.align 16
|
||||
.quad 0x3ff0000000000000, 0x3ff0000000000000
|
||||
/*== SgnMask ==*/
|
||||
/* SgnMask */
|
||||
.align 16
|
||||
.quad 0x7fffffffffffffff, 0x7fffffffffffffff
|
||||
/*== XThreshold ==*/
|
||||
/* XThreshold */
|
||||
.align 16
|
||||
.quad 0x3e00000000000000, 0x3e00000000000000
|
||||
/*== XhMask ==*/
|
||||
/* XhMask */
|
||||
.align 16
|
||||
.quad 0xfffffffffffffc00, 0xfffffffffffffc00
|
||||
/*== Threshold ==*/
|
||||
/* Threshold */
|
||||
.align 16
|
||||
.quad 0x4086a00000000000, 0x4086a00000000000
|
||||
/*== Bias ==*/
|
||||
/* Bias */
|
||||
.align 16
|
||||
.quad 0x408ff80000000000, 0x408ff80000000000
|
||||
/*== Bias1 ==*/
|
||||
/* Bias1 */
|
||||
.align 16
|
||||
.quad 0x408ff00000000000, 0x408ff00000000000
|
||||
/*== ExpMask ==*/
|
||||
/* ExpMask */
|
||||
.align 16
|
||||
.quad 0x7ff0000000000000, 0x7ff0000000000000
|
||||
/*== ExpMask2 ==*/
|
||||
/* ExpMask2 */
|
||||
.align 16
|
||||
.quad 0x7f40000000000000, 0x7f40000000000000
|
||||
/*== L2L ==*/
|
||||
/* L2L */
|
||||
.align 16
|
||||
.quad 0x3fe62E42FEFA39EF, 0x3fe62E42FEFA39EF
|
||||
/*== dHalf ==*/
|
||||
/* dHalf */
|
||||
.align 16
|
||||
.quad 0x3FE0000000000000, 0x3FE0000000000000
|
||||
/*== dSign ==*/
|
||||
/* dSign */
|
||||
.align 16
|
||||
.quad 0x8000000000000000, 0x8000000000000000
|
||||
/*== dTopMask12 ==*/
|
||||
/* dTopMask12 */
|
||||
.align 16
|
||||
.quad 0xFFFFFE0000000000, 0xFFFFFE0000000000
|
||||
/*== dTopMask41 ==*/
|
||||
/* dTopMask41 */
|
||||
.align 16
|
||||
.quad 0xFFFFFFFFFFFFF000, 0xFFFFFFFFFFFFF000
|
||||
/*== dTinyRange ==*/
|
||||
/* dTinyRange */
|
||||
.align 16
|
||||
.quad 0x0350000000000000, 0x0350000000000000
|
||||
.align 16
|
||||
.type __svml_datanh_data_internal,@object
|
||||
.size __svml_datanh_data_internal,.-__svml_datanh_data_internal
|
||||
.type __svml_datanh_data_internal, @object
|
||||
.size __svml_datanh_data_internal, .-__svml_datanh_data_internal
|
||||
.align 16
|
||||
|
||||
.FLT_21:
|
||||
.long 0x00000000,0x43380000,0x00000000,0x43380000
|
||||
.type .FLT_21,@object
|
||||
.size .FLT_21,16
|
||||
.long 0x00000000, 0x43380000, 0x00000000, 0x43380000
|
||||
.type .FLT_21, @object
|
||||
.size .FLT_21, 16
|
||||
|
|
|
|||
Loading…
Reference in New Issue