mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-13 00:30:07 +00:00
x86_64: Fix svml_d_log24_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
2d4d1dc9ab
commit
26b648892a
@ -47,8 +47,7 @@
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
.section .text.avx2,"ax",@progbits
|
||||
.section .text.avx2, "ax", @progbits
|
||||
ENTRY(_ZGVdN4v_log2_avx2)
|
||||
pushq %rbp
|
||||
cfi_def_cfa_offset(16)
|
||||
@ -60,51 +59,51 @@ ENTRY(_ZGVdN4v_log2_avx2)
|
||||
lea Table_Lookup_Bias+__svml_dlog2_data_internal(%rip), %r8
|
||||
vmovapd %ymm0, %ymm3
|
||||
|
||||
/* preserve mantissa, set input exponent to 2^(-10) */
|
||||
/* preserve mantissa, set input exponent to 2^(-10) */
|
||||
vandpd ExpMask+__svml_dlog2_data_internal(%rip), %ymm3, %ymm4
|
||||
vorpd Two10+__svml_dlog2_data_internal(%rip), %ymm4, %ymm2
|
||||
|
||||
/* reciprocal approximation good to at least 11 bits */
|
||||
/* reciprocal approximation good to at least 11 bits */
|
||||
vcvtpd2ps %ymm2, %xmm5
|
||||
|
||||
/* exponent bits */
|
||||
/* exponent bits */
|
||||
vpsrlq $20, %ymm3, %ymm7
|
||||
vmovupd One+__svml_dlog2_data_internal(%rip), %ymm14
|
||||
vrcpps %xmm5, %xmm6
|
||||
|
||||
/* check range */
|
||||
/* check range */
|
||||
vcmplt_oqpd MinNorm+__svml_dlog2_data_internal(%rip), %ymm3, %ymm11
|
||||
vcmpnle_uqpd MaxNorm+__svml_dlog2_data_internal(%rip), %ymm3, %ymm12
|
||||
vcvtps2pd %xmm6, %ymm9
|
||||
|
||||
/* round reciprocal to nearest integer, will have 1+9 mantissa bits */
|
||||
/* round reciprocal to nearest integer, will have 1+9 mantissa bits */
|
||||
vroundpd $0, %ymm9, %ymm1
|
||||
|
||||
/* exponent */
|
||||
/* exponent */
|
||||
vmovupd Threshold+__svml_dlog2_data_internal(%rip), %ymm9
|
||||
|
||||
/*
|
||||
/*
|
||||
* prepare table index
|
||||
* table lookup
|
||||
*/
|
||||
vpsrlq $40, %ymm1, %ymm15
|
||||
|
||||
/* argument reduction */
|
||||
/* argument reduction */
|
||||
vfmsub213pd %ymm14, %ymm1, %ymm2
|
||||
|
||||
/* polynomial */
|
||||
/* polynomial */
|
||||
vmovupd poly_coeff+__svml_dlog2_data_internal(%rip), %ymm14
|
||||
vcmplt_oqpd %ymm1, %ymm9, %ymm1
|
||||
vfmadd213pd poly_coeff+32+__svml_dlog2_data_internal(%rip), %ymm2, %ymm14
|
||||
vorpd %ymm12, %ymm11, %ymm13
|
||||
vmulpd %ymm2, %ymm2, %ymm12
|
||||
|
||||
/* combine and get argument value range mask */
|
||||
/* combine and get argument value range mask */
|
||||
vmovmskpd %ymm13, %eax
|
||||
vextractf128 $1, %ymm7, %xmm8
|
||||
vshufps $221, %xmm8, %xmm7, %xmm10
|
||||
|
||||
/* biased exponent in DP format */
|
||||
/* biased exponent in DP format */
|
||||
vcvtdq2pd %xmm10, %ymm0
|
||||
vandpd Bias+__svml_dlog2_data_internal(%rip), %ymm1, %ymm10
|
||||
vorpd Bias1+__svml_dlog2_data_internal(%rip), %ymm10, %ymm11
|
||||
@ -123,22 +122,22 @@ ENTRY(_ZGVdN4v_log2_avx2)
|
||||
vpextrd $2, %xmm6, %edi
|
||||
movslq %ecx, %rcx
|
||||
movslq %edi, %rdi
|
||||
vmovsd (%r8,%rdx), %xmm4
|
||||
vmovsd (%r8,%rsi), %xmm7
|
||||
vmovhpd (%r8,%rcx), %xmm4, %xmm5
|
||||
vmovhpd (%r8,%rdi), %xmm7, %xmm8
|
||||
vmovsd (%r8, %rdx), %xmm4
|
||||
vmovsd (%r8, %rsi), %xmm7
|
||||
vmovhpd (%r8, %rcx), %xmm4, %xmm5
|
||||
vmovhpd (%r8, %rdi), %xmm7, %xmm8
|
||||
vinsertf128 $1, %xmm8, %ymm5, %ymm13
|
||||
|
||||
/* reconstruction */
|
||||
/* reconstruction */
|
||||
vaddpd %ymm14, %ymm13, %ymm0
|
||||
vaddpd %ymm0, %ymm1, %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 ymm3
|
||||
|
||||
/* Restore registers
|
||||
/* Restore registers
|
||||
* and exit the function
|
||||
*/
|
||||
|
||||
@ -151,7 +150,7 @@ L(EXIT):
|
||||
cfi_def_cfa(6, 16)
|
||||
cfi_offset(6, -16)
|
||||
|
||||
/* Branch to process
|
||||
/* Branch to process
|
||||
* special inputs
|
||||
*/
|
||||
|
||||
@ -177,18 +176,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
|
||||
*/
|
||||
|
||||
@ -196,7 +195,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
|
||||
|
||||
@ -208,7 +207,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
|
||||
@ -218,19 +217,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 log2@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_log2_avx2)
|
||||
@ -770,7 +769,7 @@ __svml_dlog2_data_internal:
|
||||
.quad 0xc08ff7f7fb62e230, 0x3d26abb2c547789a
|
||||
.quad 0xc08ff7fbfe63b010, 0xbd59d383d543b3f5
|
||||
.quad 0xc08ff80000000000, 0x8000000000000000
|
||||
/*== Log_LA_table ==*/
|
||||
/* Log_LA_table */
|
||||
.align 32
|
||||
.quad 0x0000000000000000
|
||||
.quad 0xbf670f83ff0a7565
|
||||
@ -1285,40 +1284,40 @@ __svml_dlog2_data_internal:
|
||||
.quad 0x3f671b0ea42e5fda
|
||||
.quad 0x3f57182a894b69c6
|
||||
.quad 0x8000000000000000
|
||||
/*== poly_coeff[5] ==*/
|
||||
/* poly_coeff[5] */
|
||||
.align 32
|
||||
.quad 0x3fd2776E996DA1D2, 0x3fd2776E996DA1D2, 0x3fd2776E996DA1D2, 0x3fd2776E996DA1D2 /* coeff5 */
|
||||
.quad 0xbfd715494C3E7C9B, 0xbfd715494C3E7C9B, 0xbfd715494C3E7C9B, 0xbfd715494C3E7C9B /* coeff4 */
|
||||
.quad 0x3fdEC709DC39E926, 0x3fdEC709DC39E926, 0x3fdEC709DC39E926, 0x3fdEC709DC39E926 /* coeff3 */
|
||||
.quad 0xbfe71547652B7CF8, 0xbfe71547652B7CF8, 0xbfe71547652B7CF8, 0xbfe71547652B7CF8 /* coeff2 */
|
||||
.quad 0x3ff71547652B82FE, 0x3ff71547652B82FE, 0x3ff71547652B82FE, 0x3ff71547652B82FE /* coeff1 */
|
||||
/*== ExpMask ==*/
|
||||
/* ExpMask */
|
||||
.align 32
|
||||
.quad 0x000fffffffffffff, 0x000fffffffffffff, 0x000fffffffffffff, 0x000fffffffffffff
|
||||
/*== Two10 ==*/
|
||||
/* Two10 */
|
||||
.align 32
|
||||
.quad 0x3f50000000000000, 0x3f50000000000000, 0x3f50000000000000, 0x3f50000000000000
|
||||
/*== MinNorm ==*/
|
||||
/* MinNorm */
|
||||
.align 32
|
||||
.quad 0x0010000000000000, 0x0010000000000000, 0x0010000000000000, 0x0010000000000000
|
||||
/*== MaxNorm ==*/
|
||||
/* MaxNorm */
|
||||
.align 32
|
||||
.quad 0x7fefffffffffffff, 0x7fefffffffffffff, 0x7fefffffffffffff, 0x7fefffffffffffff
|
||||
/*== HalfMask ==*/
|
||||
/* HalfMask */
|
||||
.align 32
|
||||
.quad 0xfffffffffc000000, 0xfffffffffc000000, 0xfffffffffc000000, 0xfffffffffc000000
|
||||
/*== One ==*/
|
||||
/* One */
|
||||
.align 32
|
||||
.quad 0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000
|
||||
/*== Threshold ==*/
|
||||
/* Threshold */
|
||||
.align 32
|
||||
.quad 0x4086a00000000000, 0x4086a00000000000, 0x4086a00000000000, 0x4086a00000000000
|
||||
/*== Bias ==*/
|
||||
/* Bias */
|
||||
.align 32
|
||||
.quad 0x408ff80000000000, 0x408ff80000000000, 0x408ff80000000000, 0x408ff80000000000
|
||||
/*== Bias1 ==*/
|
||||
/* Bias1 */
|
||||
.align 32
|
||||
.quad 0x408ff00000000000, 0x408ff00000000000, 0x408ff00000000000, 0x408ff00000000000
|
||||
.align 32
|
||||
.type __svml_dlog2_data_internal,@object
|
||||
.size __svml_dlog2_data_internal,.-__svml_dlog2_data_internal
|
||||
.type __svml_dlog2_data_internal, @object
|
||||
.size __svml_dlog2_data_internal, .-__svml_dlog2_data_internal
|
||||
|
Loading…
Reference in New Issue
Block a user