mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-13 12:40:08 +00:00
x86_64: Fix svml_d_tanh4_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:
parent
06c7208f27
commit
28ba5ee77f
@ -28,7 +28,7 @@
|
||||
* and to approximate tanh(.) with a polynomial on each of them.
|
||||
*
|
||||
* IEEE SPECIAL CONDITIONS:
|
||||
* x = [+,-]0, r = [+,-]0
|
||||
* x = [+, -]0, r = [+, -]0
|
||||
* x = +Inf, r = +1
|
||||
* x = -Inf, r = -1
|
||||
* x = QNaN, r = QNaN
|
||||
@ -82,8 +82,7 @@
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
.section .text.avx2,"ax",@progbits
|
||||
.section .text.avx2, "ax", @progbits
|
||||
ENTRY(_ZGVdN4v_tanh_avx2)
|
||||
pushq %rbp
|
||||
cfi_def_cfa_offset(16)
|
||||
@ -95,17 +94,17 @@ ENTRY(_ZGVdN4v_tanh_avx2)
|
||||
lea _dbP+96+__svml_dtanh_data_internal(%rip), %r8
|
||||
vmovupd %ymm0, (%rsp)
|
||||
|
||||
/* if VMIN, VMAX is defined for I type */
|
||||
/* if VMIN, VMAX is defined for I type */
|
||||
vpxor %xmm11, %xmm11, %xmm11
|
||||
|
||||
/* Constant loading */
|
||||
/* Constant loading */
|
||||
vmovups _iMaxIdxMask+__svml_dtanh_data_internal(%rip), %xmm8
|
||||
vandpd _dbAbsMask+__svml_dtanh_data_internal(%rip), %ymm0, %ymm1
|
||||
vandpd _dbSignMask+__svml_dtanh_data_internal(%rip), %ymm0, %ymm2
|
||||
vextractf128 $1, %ymm0, %xmm15
|
||||
vshufps $221, %xmm15, %xmm0, %xmm14
|
||||
|
||||
/* Here huge arguments, INF and NaNs are filtered out to callout. */
|
||||
/* Here huge arguments, INF and NaNs are filtered out to callout. */
|
||||
vpand _iExpMantMask+__svml_dtanh_data_internal(%rip), %xmm14, %xmm12
|
||||
vpsubd _iMinIdxOfsMask+__svml_dtanh_data_internal(%rip), %xmm12, %xmm9
|
||||
vpcmpgtd %xmm11, %xmm9, %xmm10
|
||||
@ -113,7 +112,7 @@ ENTRY(_ZGVdN4v_tanh_avx2)
|
||||
vpand %xmm10, %xmm9, %xmm7
|
||||
blendvps %xmm0, %xmm8, %xmm7
|
||||
|
||||
/*
|
||||
/*
|
||||
* VSHRIMM( I, iIndex, = iIndex, (17 - 4) );
|
||||
* VGATHER_MATRIX( L2D, p, TAB._dbP, iIndex, 0, T_ITEM_SIZE, T_ITEM_GRAN, 13, 0, 0 );
|
||||
*/
|
||||
@ -128,45 +127,45 @@ ENTRY(_ZGVdN4v_tanh_avx2)
|
||||
vpextrd $3, %xmm6, %edi
|
||||
movslq %esi, %rsi
|
||||
movslq %edi, %rdi
|
||||
vmovupd -96(%rdx,%r8), %xmm3
|
||||
vmovupd -96(%rcx,%r8), %xmm4
|
||||
vmovupd -80(%rcx,%r8), %xmm13
|
||||
vmovupd -64(%rcx,%r8), %xmm9
|
||||
vmovupd -80(%rdx,%r8), %xmm14
|
||||
vmovupd -64(%rdx,%r8), %xmm10
|
||||
vmovupd -48(%rdx,%r8), %xmm6
|
||||
vinsertf128 $1, -96(%rsi,%r8), %ymm3, %ymm0
|
||||
vinsertf128 $1, -96(%rdi,%r8), %ymm4, %ymm15
|
||||
vmovupd -48(%rcx,%r8), %xmm3
|
||||
vmovupd -96(%rdx, %r8), %xmm3
|
||||
vmovupd -96(%rcx, %r8), %xmm4
|
||||
vmovupd -80(%rcx, %r8), %xmm13
|
||||
vmovupd -64(%rcx, %r8), %xmm9
|
||||
vmovupd -80(%rdx, %r8), %xmm14
|
||||
vmovupd -64(%rdx, %r8), %xmm10
|
||||
vmovupd -48(%rdx, %r8), %xmm6
|
||||
vinsertf128 $1, -96(%rsi, %r8), %ymm3, %ymm0
|
||||
vinsertf128 $1, -96(%rdi, %r8), %ymm4, %ymm15
|
||||
vmovupd -48(%rcx, %r8), %xmm3
|
||||
vunpckhpd %ymm15, %ymm0, %ymm0
|
||||
vinsertf128 $1, -80(%rsi,%r8), %ymm14, %ymm12
|
||||
vinsertf128 $1, -64(%rsi,%r8), %ymm10, %ymm8
|
||||
vinsertf128 $1, -80(%rdi,%r8), %ymm13, %ymm11
|
||||
vinsertf128 $1, -64(%rdi,%r8), %ymm9, %ymm7
|
||||
vinsertf128 $1, -80(%rsi, %r8), %ymm14, %ymm12
|
||||
vinsertf128 $1, -64(%rsi, %r8), %ymm10, %ymm8
|
||||
vinsertf128 $1, -80(%rdi, %r8), %ymm13, %ymm11
|
||||
vinsertf128 $1, -64(%rdi, %r8), %ymm9, %ymm7
|
||||
vunpcklpd %ymm11, %ymm12, %ymm15
|
||||
vunpckhpd %ymm11, %ymm12, %ymm14
|
||||
vunpcklpd %ymm7, %ymm8, %ymm13
|
||||
vunpckhpd %ymm7, %ymm8, %ymm12
|
||||
vmovupd -32(%rdx,%r8), %xmm9
|
||||
vmovupd -32(%rcx,%r8), %xmm8
|
||||
vinsertf128 $1, -48(%rsi,%r8), %ymm6, %ymm4
|
||||
vinsertf128 $1, -48(%rdi,%r8), %ymm3, %ymm5
|
||||
vmovupd -32(%rdx, %r8), %xmm9
|
||||
vmovupd -32(%rcx, %r8), %xmm8
|
||||
vinsertf128 $1, -48(%rsi, %r8), %ymm6, %ymm4
|
||||
vinsertf128 $1, -48(%rdi, %r8), %ymm3, %ymm5
|
||||
vunpcklpd %ymm5, %ymm4, %ymm11
|
||||
vunpckhpd %ymm5, %ymm4, %ymm10
|
||||
vmovupd -16(%rdx,%r8), %xmm3
|
||||
vmovupd -16(%rcx,%r8), %xmm4
|
||||
vinsertf128 $1, -32(%rsi,%r8), %ymm9, %ymm7
|
||||
vinsertf128 $1, -32(%rdi,%r8), %ymm8, %ymm6
|
||||
vmovupd -16(%rdx, %r8), %xmm3
|
||||
vmovupd -16(%rcx, %r8), %xmm4
|
||||
vinsertf128 $1, -32(%rsi, %r8), %ymm9, %ymm7
|
||||
vinsertf128 $1, -32(%rdi, %r8), %ymm8, %ymm6
|
||||
vunpcklpd %ymm6, %ymm7, %ymm9
|
||||
vunpckhpd %ymm6, %ymm7, %ymm8
|
||||
vinsertf128 $1, -16(%rsi,%r8), %ymm3, %ymm5
|
||||
vinsertf128 $1, -16(%rdi,%r8), %ymm4, %ymm6
|
||||
vinsertf128 $1, -16(%rsi, %r8), %ymm3, %ymm5
|
||||
vinsertf128 $1, -16(%rdi, %r8), %ymm4, %ymm6
|
||||
vunpcklpd %ymm6, %ymm5, %ymm7
|
||||
vunpckhpd %ymm6, %ymm5, %ymm6
|
||||
vmovupd (%rdx,%r8), %xmm3
|
||||
vmovupd (%rcx,%r8), %xmm5
|
||||
vinsertf128 $1, (%rsi,%r8), %ymm3, %ymm4
|
||||
vinsertf128 $1, (%rdi,%r8), %ymm5, %ymm5
|
||||
vmovupd (%rdx, %r8), %xmm3
|
||||
vmovupd (%rcx, %r8), %xmm5
|
||||
vinsertf128 $1, (%rsi, %r8), %ymm3, %ymm4
|
||||
vinsertf128 $1, (%rdi, %r8), %ymm5, %ymm5
|
||||
vunpcklpd %ymm5, %ymm4, %ymm3
|
||||
vaddpd %ymm3, %ymm1, %ymm1
|
||||
vfmadd213pd %ymm7, %ymm1, %ymm6
|
||||
@ -182,11 +181,11 @@ ENTRY(_ZGVdN4v_tanh_avx2)
|
||||
vorpd %ymm2, %ymm6, %ymm0
|
||||
testl %eax, %eax
|
||||
|
||||
/* Go to special inputs processing branch */
|
||||
/* Go to special inputs processing branch */
|
||||
jne L(SPECIAL_VALUES_BRANCH)
|
||||
# LOE rbx r12 r13 r14 r15 eax ymm0
|
||||
|
||||
/* Restore registers
|
||||
/* Restore registers
|
||||
* and exit the function
|
||||
*/
|
||||
|
||||
@ -199,7 +198,7 @@ L(EXIT):
|
||||
cfi_def_cfa(6, 16)
|
||||
cfi_offset(6, -16)
|
||||
|
||||
/* Branch to process
|
||||
/* Branch to process
|
||||
* special inputs
|
||||
*/
|
||||
|
||||
@ -226,18 +225,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
|
||||
*/
|
||||
|
||||
@ -245,7 +244,7 @@ L(SPECIAL_VALUES_LOOP):
|
||||
incl %r12d
|
||||
cmpl $4, %r12d
|
||||
|
||||
/* Check bits in range mask */
|
||||
/* Check bits in range mask */
|
||||
jl L(RANGEMASK_CHECK)
|
||||
# LOE rbx r15 r12d r13d
|
||||
|
||||
@ -257,7 +256,7 @@ L(SPECIAL_VALUES_LOOP):
|
||||
cfi_restore(14)
|
||||
vmovupd 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
|
||||
@ -267,19 +266,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
|
||||
movsd 32(%rsp,%r14,8), %xmm0
|
||||
movsd 32(%rsp, %r14, 8), %xmm0
|
||||
call tanh@PLT
|
||||
# LOE rbx r14 r15 r12d r13d xmm0
|
||||
|
||||
movsd %xmm0, 64(%rsp,%r14,8)
|
||||
movsd %xmm0, 64(%rsp, %r14, 8)
|
||||
|
||||
/* Process special inputs in loop */
|
||||
/* Process special inputs in loop */
|
||||
jmp L(SPECIAL_VALUES_LOOP)
|
||||
# LOE rbx r15 r12d r13d
|
||||
END(_ZGVdN4v_tanh_avx2)
|
||||
@ -289,8 +288,7 @@ END(_ZGVdN4v_tanh_avx2)
|
||||
|
||||
#ifdef __svml_dtanh_data_internal_typedef
|
||||
typedef unsigned int VUINT32;
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
__declspec(align(32)) VUINT32 _dbP[60*16][2];
|
||||
__declspec(align(32)) VUINT32 _dbSignMask[4][2];
|
||||
__declspec(align(32)) VUINT32 _dbAbsMask[4][2];
|
||||
@ -1275,5 +1273,5 @@ __svml_dtanh_data_internal:
|
||||
.align 32
|
||||
.long 0x00760000, 0x00760000, 0x00760000, 0x00760000, 0x00760000, 0x00760000, 0x00760000, 0x00760000 /* _iMaxIdxMask */
|
||||
.align 32
|
||||
.type __svml_dtanh_data_internal,@object
|
||||
.size __svml_dtanh_data_internal,.-__svml_dtanh_data_internal
|
||||
.type __svml_dtanh_data_internal, @object
|
||||
.size __svml_dtanh_data_internal, .-__svml_dtanh_data_internal
|
||||
|
Loading…
Reference in New Issue
Block a user