x86_64: Fix svml_s_acoshf8_core_avx2.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:
Sunil K Pandey 2022-03-07 10:47:08 -08:00
parent c90f386276
commit dfa127e854
1 changed files with 281 additions and 282 deletions

View File

@ -49,8 +49,7 @@
#include <sysdep.h>
.text
.section .text.avx2,"ax",@progbits
.section .text.avx2, "ax", @progbits
ENTRY(_ZGVdN8v_acoshf_avx2)
pushq %rbp
cfi_def_cfa_offset(16)
@ -60,13 +59,13 @@ ENTRY(_ZGVdN8v_acoshf_avx2)
andq $-32, %rsp
subq $96, %rsp
/* Load constants, always including One = 1 */
/* Load constants, always including One = 1 */
vmovups sOne+__svml_sacosh_data_internal(%rip), %ymm2
/* Finally, express Y + W = U * V accurately where Y has <= 8 bits */
/* Finally, express Y + W = U * V accurately where Y has <= 8 bits */
vmovups sTopMask8+__svml_sacosh_data_internal(%rip), %ymm9
/*
/*
* Now 1 / (1 + d)
* = 1 / (1 + (sqrt(1 - e) - 1))
* = 1 / sqrt(1 - e)
@ -82,7 +81,7 @@ ENTRY(_ZGVdN8v_acoshf_avx2)
vmovaps %ymm2, %ymm7
vfmsub231ps %ymm3, %ymm3, %ymm7
/*
/*
* Check that 1 < X < +inf; otherwise go to the callout function.
* We need the callout for X = 1 to avoid division by zero below.
* This test ensures that callout handles NaN and either infinity.
@ -90,7 +89,7 @@ ENTRY(_ZGVdN8v_acoshf_avx2)
vcmpnle_uqps sLargestFinite+__svml_sacosh_data_internal(%rip), %ymm3, %ymm4
vcmpngt_uqps %ymm2, %ymm3, %ymm5
/*
/*
* The following computation can go wrong for very large X, e.g.
* the X^2 - 1 = U * V can overflow. But for large X we have
* acosh(X) / log(2 X) - 1 =~= 1/(4 * X^2), so for X >= 2^30
@ -102,7 +101,7 @@ ENTRY(_ZGVdN8v_acoshf_avx2)
vcmplt_oqps sBigThreshold+__svml_sacosh_data_internal(%rip), %ymm3, %ymm1
vandps %ymm9, %ymm7, %ymm10
/*
/*
* Compute R = 1/sqrt(Y + W) * (1 + d)
* Force R to <= 8 significant bits.
* This means that R * Y and R^2 * Y are exactly representable.
@ -111,7 +110,7 @@ ENTRY(_ZGVdN8v_acoshf_avx2)
vsubps %ymm10, %ymm7, %ymm11
vandps %ymm9, %ymm8, %ymm12
/*
/*
* Compute S = (Y/sqrt(Y + W)) * (1 + d)
* and T = (W/sqrt(Y + W)) * (1 + d)
* so that S + T = sqrt(Y + W) * (1 + d)
@ -120,10 +119,10 @@ ENTRY(_ZGVdN8v_acoshf_avx2)
vmulps %ymm12, %ymm10, %ymm15
vmulps %ymm11, %ymm12, %ymm0
/* Now multiplex to the case X = 2^-30 * input, Xl = 0 in the "big" case. */
/* Now multiplex to the case X = 2^-30 * input, Xl = 0 in the "big" case. */
vmulps XScale+__svml_sacosh_data_internal(%rip), %ymm3, %ymm11
/*
/*
* Compute e = -(2 * d + d^2)
* The first FMR is exact, and the rounding error in the other is acceptable
* since d and e are ~ 2^-8
@ -136,25 +135,25 @@ ENTRY(_ZGVdN8v_acoshf_avx2)
vmulps %ymm14, %ymm13, %ymm7
vorps %ymm5, %ymm4, %ymm6
/*
/*
* For low-accuracy versions, the computation can be done
* just as U + ((S + T) + (S + T) * Corr)
*/
vaddps %ymm0, %ymm15, %ymm5
/* sU is needed later on */
/* sU is needed later on */
vsubps %ymm2, %ymm3, %ymm4
vfmadd213ps %ymm5, %ymm7, %ymm5
vmovmskps %ymm6, %edx
vaddps %ymm5, %ymm4, %ymm6
/*
/*
* Now resume the main code.
* reduction: compute r,n
* reduction: compute r, n
*/
vmovups iBrkValue+__svml_sacosh_data_internal(%rip), %ymm4
/*
/*
* Now we feed into the log1p code, using H in place of _VARG1 and
* also adding L into Xl.
* compute 1+x as high, low parts
@ -174,10 +173,10 @@ ENTRY(_ZGVdN8v_acoshf_avx2)
vcvtdq2ps %ymm15, %ymm0
vpsubd %ymm5, %ymm2, %ymm7
/* polynomial evaluation */
/* polynomial evaluation */
vsubps %ymm2, %ymm8, %ymm2
/* Add 31 to the exponent in the "large" case to get log(2 * input) */
/* Add 31 to the exponent in the "large" case to get log(2 * input) */
vaddps sThirtyOne+__svml_sacosh_data_internal(%rip), %ymm0, %ymm5
vandps %ymm1, %ymm13, %ymm6
vmulps %ymm7, %ymm6, %ymm9
@ -193,15 +192,15 @@ ENTRY(_ZGVdN8v_acoshf_avx2)
vmulps %ymm4, %ymm2, %ymm6
vfmadd213ps %ymm2, %ymm2, %ymm6
/* final reconstruction */
/* final reconstruction */
vfmadd132ps sLn2+__svml_sacosh_data_internal(%rip), %ymm6, %ymm0
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 ymm0 ymm3
/* Restore registers
/* Restore registers
* and exit the function
*/
@ -214,7 +213,7 @@ L(EXIT):
cfi_def_cfa(6, 16)
cfi_offset(6, -16)
/* Branch to process
/* Branch to process
* special inputs
*/
@ -240,18 +239,18 @@ L(SPECIAL_VALUES_BRANCH):
.cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0xa0, 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
*/
@ -259,7 +258,7 @@ L(SPECIAL_VALUES_LOOP):
incl %r12d
cmpl $8, %r12d
/* Check bits in range mask */
/* Check bits in range mask */
jl L(RANGEMASK_CHECK)
# LOE rbx r15 r12d r13d
@ -271,7 +270,7 @@ L(SPECIAL_VALUES_LOOP):
cfi_restore(14)
vmovups 64(%rsp), %ymm0
/* 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: -80; DW_OP_plus) */
.cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0xb0, 0xff, 0xff, 0xff, 0x22
@ -281,19 +280,19 @@ L(SPECIAL_VALUES_LOOP):
.cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0xa0, 0xff, 0xff, 0xff, 0x22
# LOE rbx r12 r13 r14 r15 ymm0
/* Scalar math fucntion call
/* Scalar math fucntion call
* to process special input
*/
L(SCALAR_MATH_CALL):
movl %r12d, %r14d
movss 32(%rsp,%r14,4), %xmm0
movss 32(%rsp, %r14, 4), %xmm0
call acoshf@PLT
# LOE rbx r14 r15 r12d r13d xmm0
movss %xmm0, 64(%rsp,%r14,4)
movss %xmm0, 64(%rsp, %r14, 4)
/* Process special inputs in loop */
/* Process special inputs in loop */
jmp L(SPECIAL_VALUES_LOOP)
# LOE rbx r15 r12d r13d
END(_ZGVdN8v_acoshf_avx2)
@ -320,9 +319,9 @@ typedef struct {
} __svml_sacosh_data_internal;
#endif
__svml_sacosh_data_internal:
/*== sOne = SP 1.0 ==*/
/* sOne = SP 1.0 */
.long 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000
/*== sPoly[] = SP polynomial ==*/
/* sPoly[] = SP polynomial */
.align 32
.long 0xbf000000, 0xbf000000, 0xbf000000, 0xbf000000, 0xbf000000, 0xbf000000, 0xbf000000, 0xbf000000 /* -5.0000000000000000000000000e-01 P0 */
.long 0x3eaaaa94, 0x3eaaaa94, 0x3eaaaa94, 0x3eaaaa94, 0x3eaaaa94, 0x3eaaaa94, 0x3eaaaa94, 0x3eaaaa94 /* 3.3333265781402587890625000e-01 P1 */
@ -332,39 +331,39 @@ __svml_sacosh_data_internal:
.long 0x3e0fcb12, 0x3e0fcb12, 0x3e0fcb12, 0x3e0fcb12, 0x3e0fcb12, 0x3e0fcb12, 0x3e0fcb12, 0x3e0fcb12 /* 1.4042308926582336425781250e-01 P5 */
.long 0xbe1ad9e3, 0xbe1ad9e3, 0xbe1ad9e3, 0xbe1ad9e3, 0xbe1ad9e3, 0xbe1ad9e3, 0xbe1ad9e3, 0xbe1ad9e3 /* -1.5122179687023162841796875e-01 P6 */
.long 0x3e0d84ed, 0x3e0d84ed, 0x3e0d84ed, 0x3e0d84ed, 0x3e0d84ed, 0x3e0d84ed, 0x3e0d84ed, 0x3e0d84ed /* 1.3820238411426544189453125e-01 P7 */
/*== iBrkValue = SP 2/3 ==*/
/* iBrkValue = SP 2/3 */
.align 32
.long 0x3f2aaaab, 0x3f2aaaab, 0x3f2aaaab, 0x3f2aaaab, 0x3f2aaaab, 0x3f2aaaab, 0x3f2aaaab, 0x3f2aaaab
/*== iOffExpoMask = SP significand mask ==*/
/* iOffExpoMask = SP significand mask */
.align 32
.long 0x007fffff, 0x007fffff, 0x007fffff, 0x007fffff, 0x007fffff, 0x007fffff, 0x007fffff, 0x007fffff
/*== sBigThreshold ==*/
/* sBigThreshold */
.align 32
.long 0x4E800000, 0x4E800000, 0x4E800000, 0x4E800000, 0x4E800000, 0x4E800000, 0x4E800000, 0x4E800000
/*== sC2 ==*/
/* sC2 */
.align 32
.long 0x3EC00000, 0x3EC00000, 0x3EC00000, 0x3EC00000, 0x3EC00000, 0x3EC00000, 0x3EC00000, 0x3EC00000
/*== sC3 ==*/
/* sC3 */
.align 32
.long 0x3EA00000, 0x3EA00000, 0x3EA00000, 0x3EA00000, 0x3EA00000, 0x3EA00000, 0x3EA00000, 0x3EA00000
/*== sHalf ==*/
/* sHalf */
.align 32
.long 0x3F000000, 0x3F000000, 0x3F000000, 0x3F000000, 0x3F000000, 0x3F000000, 0x3F000000, 0x3F000000
/*== sLargestFinite ==*/
/* sLargestFinite */
.align 32
.long 0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF
/*== sThirtyOne ==*/
/* sThirtyOne */
.align 32
.long 0x41F80000, 0x41F80000, 0x41F80000, 0x41F80000, 0x41F80000, 0x41F80000, 0x41F80000, 0x41F80000
/*== sTopMask8 ==*/
/* sTopMask8 */
.align 32
.long 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000
/*== XScale ==*/
/* XScale */
.align 32
.long 0x30800000, 0x30800000, 0x30800000, 0x30800000, 0x30800000, 0x30800000, 0x30800000, 0x30800000
/*== sLn2 = SP ln(2) ==*/
/* sLn2 = SP ln(2) */
.align 32
.long 0x3f317218, 0x3f317218, 0x3f317218, 0x3f317218, 0x3f317218, 0x3f317218, 0x3f317218, 0x3f317218
.align 32
.type __svml_sacosh_data_internal,@object
.size __svml_sacosh_data_internal,.-__svml_sacosh_data_internal
.type __svml_sacosh_data_internal, @object
.size __svml_sacosh_data_internal, .-__svml_sacosh_data_internal