aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil K Pandey <skpgkp2@gmail.com>2022-03-07 10:47:15 -0800
committerSunil K Pandey <skpgkp2@gmail.com>2022-03-07 21:44:09 -0800
commitd9f0857d4de731ad322c2f97fce94fdc1241d1b5 (patch)
tree4ed3d0c726bc7ee9aa6af84eecfa5363cb2e0f96
parentfa2a051dd9e29ccd4ca87f898654f7d451a2833a (diff)
downloadglibc-d9f0857d4de731ad322c2f97fce94fdc1241d1b5.tar.xz
glibc-d9f0857d4de731ad322c2f97fce94fdc1241d1b5.zip
x86_64: Fix svml_s_tanf4_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>
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_tanf4_core_sse4.S5019
1 files changed, 2508 insertions, 2511 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_tanf4_core_sse4.S b/sysdeps/x86_64/fpu/multiarch/svml_s_tanf4_core_sse4.S
index 9e3e672ecf..3dc82cae68 100644
--- a/sysdeps/x86_64/fpu/multiarch/svml_s_tanf4_core_sse4.S
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_tanf4_core_sse4.S
@@ -47,2554 +47,2551 @@
/* Offsets for data table __svml_stan_data_internal
*/
-#define _sInvPI_uisa 0
-#define _sPI1_uisa 16
-#define _sPI2_uisa 32
-#define _sPI3_uisa 48
-#define _sPI2_ha_uisa 64
-#define _sPI3_ha_uisa 80
-#define Th_tbl_uisa 96
-#define Tl_tbl_uisa 224
-#define _sPC3_uisa 352
-#define _sPC5_uisa 368
-#define _sRangeReductionVal_uisa 384
-#define _sInvPi 400
-#define _sSignMask 416
-#define _sAbsMask 432
-#define _sRangeVal 448
-#define _sRShifter 464
-#define _sOne 480
-#define _sRangeReductionVal 496
-#define _sPI1 512
-#define _sPI2 528
-#define _sPI3 544
-#define _sPI4 560
-#define _sPI1_FMA 576
-#define _sPI2_FMA 592
-#define _sPI3_FMA 608
-#define _sP0 624
-#define _sP1 640
-#define _sQ0 656
-#define _sQ1 672
-#define _sQ2 688
-#define _sTwo 704
-#define _sCoeffs 720
+#define _sInvPI_uisa 0
+#define _sPI1_uisa 16
+#define _sPI2_uisa 32
+#define _sPI3_uisa 48
+#define _sPI2_ha_uisa 64
+#define _sPI3_ha_uisa 80
+#define Th_tbl_uisa 96
+#define Tl_tbl_uisa 224
+#define _sPC3_uisa 352
+#define _sPC5_uisa 368
+#define _sRangeReductionVal_uisa 384
+#define _sInvPi 400
+#define _sSignMask 416
+#define _sAbsMask 432
+#define _sRangeVal 448
+#define _sRShifter 464
+#define _sOne 480
+#define _sRangeReductionVal 496
+#define _sPI1 512
+#define _sPI2 528
+#define _sPI3 544
+#define _sPI4 560
+#define _sPI1_FMA 576
+#define _sPI2_FMA 592
+#define _sPI3_FMA 608
+#define _sP0 624
+#define _sP1 640
+#define _sQ0 656
+#define _sQ1 672
+#define _sQ2 688
+#define _sTwo 704
+#define _sCoeffs 720
#include <sysdep.h>
- .text
- .section .text.sse4,"ax",@progbits
+ .section .text.sse4, "ax", @progbits
ENTRY(_ZGVbN4v_tanf_sse4)
- subq $232, %rsp
- cfi_def_cfa_offset(240)
- movaps %xmm0, %xmm13
- movups _sAbsMask+__svml_stan_data_internal(%rip), %xmm12
-
-/*
- * Legacy Code
- * Here HW FMA can be unavailable
- */
- xorl %eax, %eax
- movaps %xmm12, %xmm4
- pxor %xmm10, %xmm10
- movups _sInvPi+__svml_stan_data_internal(%rip), %xmm2
- andps %xmm13, %xmm4
- mulps %xmm4, %xmm2
-
-/* Range reduction */
- movaps %xmm4, %xmm1
-
-/*
- *
- * Main path (_LA_ and _EP_)
- *
- * Octant calculation
- */
- movups _sRShifter+__svml_stan_data_internal(%rip), %xmm3
-
-/* Large values check */
- movaps %xmm4, %xmm11
- movups _sPI1+__svml_stan_data_internal(%rip), %xmm5
- andnps %xmm13, %xmm12
- movups _sPI2+__svml_stan_data_internal(%rip), %xmm6
- addps %xmm3, %xmm2
- cmpnleps _sRangeReductionVal+__svml_stan_data_internal(%rip), %xmm11
- movaps %xmm2, %xmm8
- movups _sPI3+__svml_stan_data_internal(%rip), %xmm7
- subps %xmm3, %xmm8
- movmskps %xmm11, %edx
- movups _sPI4+__svml_stan_data_internal(%rip), %xmm9
- mulps %xmm8, %xmm5
- mulps %xmm8, %xmm6
- mulps %xmm8, %xmm7
- subps %xmm5, %xmm1
- mulps %xmm8, %xmm9
- subps %xmm6, %xmm1
- movups _sQ2+__svml_stan_data_internal(%rip), %xmm15
-
-/* Inversion mask and sign calculation */
- movaps %xmm2, %xmm5
-
-/* Rational approximation */
- movups _sP1+__svml_stan_data_internal(%rip), %xmm14
- pslld $30, %xmm2
- cmpneqps %xmm10, %xmm2
- subps %xmm7, %xmm1
-
-/* Exchanged numerator and denominator if necessary */
- movaps %xmm2, %xmm0
- movaps %xmm2, %xmm10
- pslld $31, %xmm5
- subps %xmm9, %xmm1
- movaps %xmm1, %xmm3
- pxor %xmm12, %xmm5
- mulps %xmm1, %xmm3
- mulps %xmm3, %xmm15
- mulps %xmm3, %xmm14
- addps _sQ1+__svml_stan_data_internal(%rip), %xmm15
- addps _sP0+__svml_stan_data_internal(%rip), %xmm14
- mulps %xmm15, %xmm3
- mulps %xmm14, %xmm1
- addps _sQ0+__svml_stan_data_internal(%rip), %xmm3
- andnps %xmm1, %xmm0
- andps %xmm3, %xmm10
- andps %xmm2, %xmm1
- andnps %xmm3, %xmm2
- orps %xmm10, %xmm0
- orps %xmm2, %xmm1
-
-/* Division */
- divps %xmm1, %xmm0
-
-/* Sign setting */
- pxor %xmm5, %xmm0
-
-/*
- *
- * End of main path (_LA_ and _EP_)
- */
-
- testl %edx, %edx
-
-/* Go to auxilary branch */
- jne L(AUX_BRANCH)
- # LOE rbx rbp r12 r13 r14 r15 eax xmm0 xmm4 xmm11 xmm12 xmm13
-
-/* Return from auxilary branch
- * for out of main path inputs
- */
+ subq $232, %rsp
+ cfi_def_cfa_offset(240)
+ movaps %xmm0, %xmm13
+ movups _sAbsMask+__svml_stan_data_internal(%rip), %xmm12
+
+ /*
+ * Legacy Code
+ * Here HW FMA can be unavailable
+ */
+ xorl %eax, %eax
+ movaps %xmm12, %xmm4
+ pxor %xmm10, %xmm10
+ movups _sInvPi+__svml_stan_data_internal(%rip), %xmm2
+ andps %xmm13, %xmm4
+ mulps %xmm4, %xmm2
+
+ /* Range reduction */
+ movaps %xmm4, %xmm1
+
+ /*
+ *
+ * Main path (_LA_ and _EP_)
+ *
+ * Octant calculation
+ */
+ movups _sRShifter+__svml_stan_data_internal(%rip), %xmm3
+
+ /* Large values check */
+ movaps %xmm4, %xmm11
+ movups _sPI1+__svml_stan_data_internal(%rip), %xmm5
+ andnps %xmm13, %xmm12
+ movups _sPI2+__svml_stan_data_internal(%rip), %xmm6
+ addps %xmm3, %xmm2
+ cmpnleps _sRangeReductionVal+__svml_stan_data_internal(%rip), %xmm11
+ movaps %xmm2, %xmm8
+ movups _sPI3+__svml_stan_data_internal(%rip), %xmm7
+ subps %xmm3, %xmm8
+ movmskps %xmm11, %edx
+ movups _sPI4+__svml_stan_data_internal(%rip), %xmm9
+ mulps %xmm8, %xmm5
+ mulps %xmm8, %xmm6
+ mulps %xmm8, %xmm7
+ subps %xmm5, %xmm1
+ mulps %xmm8, %xmm9
+ subps %xmm6, %xmm1
+ movups _sQ2+__svml_stan_data_internal(%rip), %xmm15
+
+ /* Inversion mask and sign calculation */
+ movaps %xmm2, %xmm5
+
+ /* Rational approximation */
+ movups _sP1+__svml_stan_data_internal(%rip), %xmm14
+ pslld $30, %xmm2
+ cmpneqps %xmm10, %xmm2
+ subps %xmm7, %xmm1
+
+ /* Exchanged numerator and denominator if necessary */
+ movaps %xmm2, %xmm0
+ movaps %xmm2, %xmm10
+ pslld $31, %xmm5
+ subps %xmm9, %xmm1
+ movaps %xmm1, %xmm3
+ pxor %xmm12, %xmm5
+ mulps %xmm1, %xmm3
+ mulps %xmm3, %xmm15
+ mulps %xmm3, %xmm14
+ addps _sQ1+__svml_stan_data_internal(%rip), %xmm15
+ addps _sP0+__svml_stan_data_internal(%rip), %xmm14
+ mulps %xmm15, %xmm3
+ mulps %xmm14, %xmm1
+ addps _sQ0+__svml_stan_data_internal(%rip), %xmm3
+ andnps %xmm1, %xmm0
+ andps %xmm3, %xmm10
+ andps %xmm2, %xmm1
+ andnps %xmm3, %xmm2
+ orps %xmm10, %xmm0
+ orps %xmm2, %xmm1
+
+ /* Division */
+ divps %xmm1, %xmm0
+
+ /* Sign setting */
+ pxor %xmm5, %xmm0
+
+ /*
+ *
+ * End of main path (_LA_ and _EP_)
+ */
+
+ testl %edx, %edx
+
+ /* Go to auxilary branch */
+ jne L(AUX_BRANCH)
+ # LOE rbx rbp r12 r13 r14 r15 eax xmm0 xmm4 xmm11 xmm12 xmm13
+
+ /* Return from auxilary branch
+ * for out of main path inputs
+ */
L(AUX_BRANCH_RETURN):
- testl %eax, %eax
+ testl %eax, %eax
-/* Go to special inputs processing branch */
- jne L(SPECIAL_VALUES_BRANCH)
- # LOE rbx rbp r12 r13 r14 r15 eax xmm0 xmm13
+ /* Go to special inputs processing branch */
+ jne L(SPECIAL_VALUES_BRANCH)
+ # LOE rbx rbp r12 r13 r14 r15 eax xmm0 xmm13
-/* Restore registers
- * and exit the function
- */
+ /* Restore registers
+ * and exit the function
+ */
L(EXIT):
- addq $232, %rsp
- cfi_def_cfa_offset(8)
- ret
- cfi_def_cfa_offset(240)
+ addq $232, %rsp
+ cfi_def_cfa_offset(8)
+ ret
+ cfi_def_cfa_offset(240)
-/* Branch to process
- * special inputs
- */
+ /* Branch to process
+ * special inputs
+ */
L(SPECIAL_VALUES_BRANCH):
- movups %xmm13, 32(%rsp)
- movups %xmm0, 48(%rsp)
- # LOE rbx rbp r12 r13 r14 r15 eax xmm0
-
- xorl %edx, %edx
- movq %r12, 16(%rsp)
- cfi_offset(12, -224)
- movl %edx, %r12d
- movq %r13, 8(%rsp)
- cfi_offset(13, -232)
- movl %eax, %r13d
- movq %r14, (%rsp)
- cfi_offset(14, -240)
- # LOE rbx rbp r15 r12d r13d
-
-/* Range mask
- * bits check
- */
+ movups %xmm13, 32(%rsp)
+ movups %xmm0, 48(%rsp)
+ # LOE rbx rbp r12 r13 r14 r15 eax xmm0
+
+ xorl %edx, %edx
+ movq %r12, 16(%rsp)
+ cfi_offset(12, -224)
+ movl %edx, %r12d
+ movq %r13, 8(%rsp)
+ cfi_offset(13, -232)
+ movl %eax, %r13d
+ movq %r14, (%rsp)
+ cfi_offset(14, -240)
+ # LOE rbx rbp r15 r12d r13d
+
+ /* Range mask
+ * bits check
+ */
L(RANGEMASK_CHECK):
- btl %r12d, %r13d
+ btl %r12d, %r13d
-/* Call scalar math function */
- jc L(SCALAR_MATH_CALL)
- # LOE rbx rbp r15 r12d r13d
+ /* Call scalar math function */
+ jc L(SCALAR_MATH_CALL)
+ # LOE rbx rbp r15 r12d r13d
-/* Special inputs
- * processing loop
- */
+ /* Special inputs
+ * processing loop
+ */
L(SPECIAL_VALUES_LOOP):
- incl %r12d
- cmpl $4, %r12d
-
-/* Check bits in range mask */
- jl L(RANGEMASK_CHECK)
- # LOE rbx rbp r15 r12d r13d
-
- movq 16(%rsp), %r12
- cfi_restore(12)
- movq 8(%rsp), %r13
- cfi_restore(13)
- movq (%rsp), %r14
- cfi_restore(14)
- movups 48(%rsp), %xmm0
-
-/* Go to exit */
- jmp L(EXIT)
- cfi_offset(12, -224)
- cfi_offset(13, -232)
- cfi_offset(14, -240)
- # LOE rbx rbp r12 r13 r14 r15 xmm0
-
-/* Scalar math fucntion call
- * to process special input
- */
+ incl %r12d
+ cmpl $4, %r12d
+
+ /* Check bits in range mask */
+ jl L(RANGEMASK_CHECK)
+ # LOE rbx rbp r15 r12d r13d
+
+ movq 16(%rsp), %r12
+ cfi_restore(12)
+ movq 8(%rsp), %r13
+ cfi_restore(13)
+ movq (%rsp), %r14
+ cfi_restore(14)
+ movups 48(%rsp), %xmm0
+
+ /* Go to exit */
+ jmp L(EXIT)
+ cfi_offset(12, -224)
+ cfi_offset(13, -232)
+ cfi_offset(14, -240)
+ # LOE rbx rbp r12 r13 r14 r15 xmm0
+
+ /* Scalar math fucntion call
+ * to process special input
+ */
L(SCALAR_MATH_CALL):
- movl %r12d, %r14d
- movss 32(%rsp,%r14,4), %xmm0
- call tanf@PLT
- # LOE rbx rbp r14 r15 r12d r13d xmm0
-
- movss %xmm0, 48(%rsp,%r14,4)
-
-/* Process special inputs in loop */
- jmp L(SPECIAL_VALUES_LOOP)
- cfi_restore(12)
- cfi_restore(13)
- cfi_restore(14)
- # LOE rbx rbp r15 r12d r13d
-
-/* Auxilary branch
- * for out of main path inputs
- */
+ movl %r12d, %r14d
+ movss 32(%rsp, %r14, 4), %xmm0
+ call tanf@PLT
+ # LOE rbx rbp r14 r15 r12d r13d xmm0
-L(AUX_BRANCH):
- movl $2139095040, %eax
+ movss %xmm0, 48(%rsp, %r14, 4)
-/*
- * Get the (2^a / 2pi) mod 1 values from the table.
- * Because doesn't have I-type gather, we need a trivial cast
- */
- lea __svml_stan_reduction_data_internal(%rip), %r8
- movups %xmm13, 64(%rsp)
+ /* Process special inputs in loop */
+ jmp L(SPECIAL_VALUES_LOOP)
+ cfi_restore(12)
+ cfi_restore(13)
+ cfi_restore(14)
+ # LOE rbx rbp r15 r12d r13d
-/*
- * Also get the significand as an integer
- * NB: adding in the integer bit is wrong for denorms!
- * To make this work for denorms we should do something slightly different
- */
- movl $8388607, %r9d
- movups %xmm12, 80(%rsp)
- movl $8388608, %r10d
- movups %xmm11, 96(%rsp)
+ /* Auxilary branch
+ * for out of main path inputs
+ */
-/*
- * Break the P_xxx and m into 16-bit chunks ready for
- * the long multiplication via 16x16->32 multiplications
- */
- movl $65535, %r11d
- movd %eax, %xmm3
- pshufd $0, %xmm3, %xmm2
- andps %xmm2, %xmm13
- cmpeqps %xmm2, %xmm13
- pand %xmm4, %xmm2
- psrld $23, %xmm2
- movdqa %xmm2, %xmm12
- pslld $1, %xmm12
- paddd %xmm2, %xmm12
- pslld $2, %xmm12
- pshufd $1, %xmm12, %xmm10
- pshufd $2, %xmm12, %xmm11
- pshufd $3, %xmm12, %xmm14
- movd %xmm12, %edx
- movd %xmm10, %ecx
- movd %xmm11, %esi
- movd %r9d, %xmm11
- movd %xmm14, %edi
- movd 4(%rdx,%r8), %xmm6
- movd 4(%rcx,%r8), %xmm7
- movd 4(%rsi,%r8), %xmm3
- movl $872415232, %r9d
- movd 4(%rdi,%r8), %xmm5
- punpckldq %xmm7, %xmm6
- punpckldq %xmm5, %xmm3
- movd 8(%rdi,%r8), %xmm10
- movmskps %xmm13, %eax
- punpcklqdq %xmm3, %xmm6
- movd 8(%rdx,%r8), %xmm3
- movd 8(%rcx,%r8), %xmm2
- movd 8(%rsi,%r8), %xmm13
- punpckldq %xmm2, %xmm3
- punpckldq %xmm10, %xmm13
- punpcklqdq %xmm13, %xmm3
- pshufd $0, %xmm11, %xmm13
- movdqa %xmm3, %xmm2
- movups %xmm4, 48(%rsp)
- pand %xmm4, %xmm13
- movd %r10d, %xmm4
- psrld $16, %xmm2
- movd (%rdx,%r8), %xmm9
-
-/*
- * We want to incorporate the original sign now too.
- * Do it here for convenience in getting the right N value,
- * though we could wait right to the end if we were prepared
- * to modify the sign of N later too.
- * So get the appropriate sign mask now (or sooner).
- */
- movl $-2147483648, %edx
- movd (%rcx,%r8), %xmm8
-
-/*
- * Create floating-point high part, implicitly adding integer bit 1
- * Incorporate overall sign at this stage too.
- */
- movl $1065353216, %ecx
- movd (%rsi,%r8), %xmm15
-
-/*
- * Now round at the 2^-8 bit position for reduction mod pi/2^7
- * instead of the original 2pi (but still with the same 2pi scaling).
- * Use a shifter of 2^15 + 2^14.
- * The N we get is our final version; it has an offset of
- * 2^8 because of the implicit integer bit, and anyway for negative
- * starting value it's a 2s complement thing. But we need to mask
- * off the exponent part anyway so it's fine.
- */
- movl $1195376640, %esi
- movd (%rdi,%r8), %xmm1
- movl $511, %r10d
- movups %xmm0, 112(%rsp)
- movd %r11d, %xmm0
- pshufd $0, %xmm4, %xmm12
- movdqa %xmm2, %xmm4
- punpckldq %xmm8, %xmm9
- paddd %xmm12, %xmm13
- punpckldq %xmm1, %xmm15
- movdqa %xmm13, %xmm12
- pshufd $0, %xmm0, %xmm8
- movdqa %xmm6, %xmm0
- punpcklqdq %xmm15, %xmm9
- pand %xmm8, %xmm13
- movdqa %xmm9, %xmm14
- pand %xmm8, %xmm9
- movdqa %xmm13, %xmm10
- psrld $16, %xmm14
- movdqu %xmm14, 128(%rsp)
-
-/* Now do the big multiplication and carry propagation */
- movdqa %xmm9, %xmm14
- psrlq $32, %xmm10
- psrlq $32, %xmm14
- movdqa %xmm13, %xmm15
- movdqa %xmm10, %xmm7
- pmuludq %xmm9, %xmm15
- psrld $16, %xmm0
- pmuludq %xmm14, %xmm7
- movdqu %xmm9, 144(%rsp)
- psllq $32, %xmm7
- movdqu .FLT_16(%rip), %xmm9
- pand %xmm8, %xmm6
- pand %xmm9, %xmm15
- psrld $16, %xmm12
- movdqa %xmm0, %xmm1
- por %xmm7, %xmm15
- movdqa %xmm13, %xmm7
- pand %xmm8, %xmm3
- movdqu %xmm0, 160(%rsp)
- movdqa %xmm12, %xmm11
- movdqu %xmm15, 208(%rsp)
- psrlq $32, %xmm1
- pmuludq %xmm0, %xmm7
- movdqa %xmm6, %xmm5
- movdqa %xmm10, %xmm15
- movdqa %xmm12, %xmm0
- movdqu %xmm14, 176(%rsp)
- psrlq $32, %xmm11
- movdqu %xmm1, 192(%rsp)
- psrlq $32, %xmm5
- pmuludq %xmm1, %xmm15
- movdqa %xmm13, %xmm1
- pmuludq %xmm3, %xmm0
- pmuludq %xmm6, %xmm1
- pmuludq %xmm12, %xmm6
- movdqa %xmm10, %xmm14
- psrlq $32, %xmm3
- pmuludq %xmm5, %xmm14
- pand %xmm9, %xmm1
- pmuludq %xmm11, %xmm3
- pmuludq %xmm11, %xmm5
- psllq $32, %xmm14
- pand %xmm9, %xmm0
- psllq $32, %xmm3
- psrlq $32, %xmm4
- por %xmm14, %xmm1
- por %xmm3, %xmm0
- movdqa %xmm12, %xmm14
- movdqa %xmm11, %xmm3
- pmuludq %xmm2, %xmm14
- pand %xmm9, %xmm7
- pmuludq %xmm4, %xmm3
- pmuludq %xmm13, %xmm2
- pmuludq %xmm10, %xmm4
- pand %xmm9, %xmm2
- psllq $32, %xmm4
- psllq $32, %xmm15
- pand %xmm9, %xmm14
- psllq $32, %xmm3
- por %xmm4, %xmm2
- por %xmm15, %xmm7
- por %xmm3, %xmm14
- psrld $16, %xmm2
- pand %xmm9, %xmm6
- psllq $32, %xmm5
- movdqa %xmm1, %xmm15
- paddd %xmm2, %xmm14
- movdqa %xmm7, %xmm2
- por %xmm5, %xmm6
- psrld $16, %xmm1
- pand %xmm8, %xmm2
- paddd %xmm1, %xmm6
- movdqu 160(%rsp), %xmm1
- paddd %xmm6, %xmm2
- movdqu 192(%rsp), %xmm6
- psrld $16, %xmm7
- pmuludq %xmm12, %xmm1
- pand %xmm8, %xmm15
- pmuludq %xmm11, %xmm6
- pmuludq 144(%rsp), %xmm12
- pmuludq 176(%rsp), %xmm11
- pand %xmm9, %xmm1
- psllq $32, %xmm6
- por %xmm6, %xmm1
- psrld $16, %xmm0
- paddd %xmm7, %xmm1
- paddd %xmm14, %xmm15
- movdqu 128(%rsp), %xmm7
- paddd %xmm15, %xmm0
- pmuludq %xmm7, %xmm13
- psrlq $32, %xmm7
- pmuludq %xmm7, %xmm10
- movdqa %xmm0, %xmm14
- pand %xmm9, %xmm13
- movdqu 208(%rsp), %xmm5
- psrld $16, %xmm14
- paddd %xmm2, %xmm14
- movdqa %xmm5, %xmm15
- movdqa %xmm14, %xmm3
- pand %xmm8, %xmm15
- psrld $16, %xmm3
- paddd %xmm1, %xmm15
- psllq $32, %xmm10
- pand %xmm9, %xmm12
- psllq $32, %xmm11
- paddd %xmm15, %xmm3
- por %xmm10, %xmm13
- por %xmm11, %xmm12
- psrld $16, %xmm5
- movdqa %xmm3, %xmm4
- pand %xmm8, %xmm13
- paddd %xmm5, %xmm12
- psrld $16, %xmm4
- paddd %xmm12, %xmm13
- paddd %xmm13, %xmm4
- pand %xmm8, %xmm3
- pslld $16, %xmm4
- movd %edx, %xmm9
- movups 48(%rsp), %xmm15
- paddd %xmm3, %xmm4
- pshufd $0, %xmm9, %xmm7
-
-/* Assemble reduced argument from the pieces */
- pand %xmm8, %xmm0
- movd %ecx, %xmm8
- pand %xmm15, %xmm7
- pshufd $0, %xmm8, %xmm1
- movdqa %xmm4, %xmm5
- psrld $9, %xmm5
- pxor %xmm7, %xmm1
- por %xmm1, %xmm5
- movd %esi, %xmm6
- pshufd $0, %xmm6, %xmm3
- movdqa %xmm5, %xmm6
- movl $262143, %r8d
-
-/*
- * Create floating-point low and medium parts, respectively
- * lo_17, ... lo_0, 0, ..., 0
- * hi_8, ... hi_0, lo_31, ..., lo_18
- * then subtract off the implicitly added integer bits,
- * 2^-46 and 2^-23, respectively.
- * Put the original sign into all of them at this stage.
- */
- movl $679477248, %edi
- movd %r10d, %xmm13
- pslld $16, %xmm14
- pshufd $0, %xmm13, %xmm1
- paddd %xmm0, %xmm14
- movd %r9d, %xmm11
- pand %xmm4, %xmm1
- movd %r8d, %xmm9
- movd %edi, %xmm10
- pshufd $0, %xmm9, %xmm8
- pslld $14, %xmm1
- pshufd $0, %xmm10, %xmm0
- pand %xmm14, %xmm8
- pshufd $0, %xmm11, %xmm12
- psrld $18, %xmm14
- pxor %xmm7, %xmm0
- pxor %xmm12, %xmm7
- por %xmm14, %xmm1
- pslld $5, %xmm8
- por %xmm7, %xmm1
-
-/*
- * Now multiply those numbers all by 2 pi, reasonably accurately.
- * The top part uses 2pi = s2pi_lead + s2pi_trail, where
- * s2pi_lead has 12 significant bits.
- */
- movl $1086918619, %r11d
-
-/* Split RHi into 12-bit leading and trailing parts. */
- movl $-4096, %esi
- por %xmm0, %xmm8
- movl $1086918656, %edx
- movl $-1214941318, %ecx
-
-/*
- * If the magnitude of the input is <= 2^-20, then
- * just pass through the input, since no reduction will be needed and
- * the main path will only work accurately if the reduced argument is
- * about >= 2^-40 (which it is for all large pi multiples)
- */
- movl $2147483647, %edi
- addps %xmm3, %xmm6
- subps %xmm7, %xmm1
- subps %xm