mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
x86_64: Fix svml_d_cosh2_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
c0de82af92
commit
23ff8b384f
@ -50,8 +50,7 @@
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
.section .text.sse4,"ax",@progbits
|
||||
.section .text.sse4, "ax", @progbits
|
||||
ENTRY(_ZGVbN2v_cosh_sse4)
|
||||
subq $72, %rsp
|
||||
cfi_def_cfa_offset(80)
|
||||
@ -59,13 +58,13 @@ ENTRY(_ZGVbN2v_cosh_sse4)
|
||||
movups _dSign+__svml_dcosh_data_internal(%rip), %xmm2
|
||||
lea _dbT+__svml_dcosh_data_internal(%rip), %r8
|
||||
|
||||
/* Abs argument */
|
||||
/* Abs argument */
|
||||
movaps %xmm2, %xmm5
|
||||
|
||||
/* dXSign=0x001000000000 */
|
||||
/* dXSign=0x001000000000 */
|
||||
psrlq $11, %xmm2
|
||||
|
||||
/*
|
||||
/*
|
||||
* Load argument
|
||||
* dM = x*2^K/log(2) + RShifter
|
||||
*/
|
||||
@ -75,22 +74,22 @@ ENTRY(_ZGVbN2v_cosh_sse4)
|
||||
movups _dbShifter+__svml_dcosh_data_internal(%rip), %xmm1
|
||||
addpd %xmm1, %xmm3
|
||||
|
||||
/*
|
||||
/*
|
||||
* R
|
||||
* dN = dM - RShifter
|
||||
*/
|
||||
movaps %xmm3, %xmm15
|
||||
subpd %xmm1, %xmm15
|
||||
|
||||
/* dR = dX - dN*Log2_hi/2^K */
|
||||
/* dR = dX - dN*Log2_hi/2^K */
|
||||
movups _dbLn2hi+__svml_dcosh_data_internal(%rip), %xmm14
|
||||
mulpd %xmm15, %xmm14
|
||||
|
||||
/* dR = (dX - dN*Log2_hi/2^K) - dN*Log2_lo/2^K */
|
||||
/* dR = (dX - dN*Log2_hi/2^K) - dN*Log2_lo/2^K */
|
||||
movups _dbLn2lo+__svml_dcosh_data_internal(%rip), %xmm1
|
||||
mulpd %xmm15, %xmm1
|
||||
|
||||
/*
|
||||
/*
|
||||
* Check for overflow\underflow
|
||||
*
|
||||
*/
|
||||
@ -98,16 +97,16 @@ ENTRY(_ZGVbN2v_cosh_sse4)
|
||||
subpd %xmm14, %xmm5
|
||||
movq _iIndexMask+__svml_dcosh_data_internal(%rip), %xmm8
|
||||
|
||||
/* Index and lookup */
|
||||
/* Index and lookup */
|
||||
pshufd $136, %xmm3, %xmm9
|
||||
|
||||
/*
|
||||
* G1,G2,G3: dTdif,dTn * 2^N,2^(-N)
|
||||
/*
|
||||
* G1, G2, G3: dTdif, dTn * 2^N, 2^(-N)
|
||||
* NB: copied from sinh_la - to be optimized!!!!!
|
||||
*/
|
||||
psllq $44, %xmm3
|
||||
|
||||
/*
|
||||
/*
|
||||
* trick
|
||||
* 256=-iIndex
|
||||
*/
|
||||
@ -116,10 +115,10 @@ ENTRY(_ZGVbN2v_cosh_sse4)
|
||||
subpd %xmm1, %xmm5
|
||||
psubd %xmm9, %xmm12
|
||||
|
||||
/* iIndex*=3 */
|
||||
/* iIndex*=3 */
|
||||
movdqa %xmm9, %xmm10
|
||||
|
||||
/* iDomainRange*=3 */
|
||||
/* iDomainRange*=3 */
|
||||
pslld $3, %xmm12
|
||||
pslld $3, %xmm10
|
||||
movd %xmm12, %esi
|
||||
@ -129,71 +128,71 @@ ENTRY(_ZGVbN2v_cosh_sse4)
|
||||
pcmpgtd %xmm6, %xmm7
|
||||
movmskps %xmm7, %eax
|
||||
|
||||
/* dR2 = dR^2 */
|
||||
/* dR2 = dR^2 */
|
||||
movaps %xmm5, %xmm7
|
||||
|
||||
/* lM now is an EXP(2^N) */
|
||||
/* lM now is an EXP(2^N) */
|
||||
pand _lExpMask+__svml_dcosh_data_internal(%rip), %xmm3
|
||||
pshufd $1, %xmm10, %xmm11
|
||||
movslq %esi, %rsi
|
||||
mulpd %xmm5, %xmm7
|
||||
movd %xmm10, %edx
|
||||
movsd (%r8,%rsi), %xmm6
|
||||
movsd (%r8, %rsi), %xmm6
|
||||
movd %xmm11, %ecx
|
||||
movslq %edi, %rdi
|
||||
movslq %edx, %rdx
|
||||
movslq %ecx, %rcx
|
||||
movhpd (%r8,%rdi), %xmm6
|
||||
movhpd (%r8, %rdi), %xmm6
|
||||
|
||||
/* */
|
||||
/* */
|
||||
psubq %xmm3, %xmm6
|
||||
|
||||
/* lX- = EXP(1/2) */
|
||||
/* lX- = EXP(1/2) */
|
||||
psubq %xmm2, %xmm6
|
||||
|
||||
/*
|
||||
/*
|
||||
* sinh(r) = r +r*r^2*a3 ....
|
||||
* dSinh_r = r^2*a3
|
||||
*/
|
||||
movups _dPC3+__svml_dcosh_data_internal(%rip), %xmm2
|
||||
mulpd %xmm7, %xmm2
|
||||
|
||||
/* dSinh_r = r + r*r^2*a3 */
|
||||
/* dSinh_r = r + r*r^2*a3 */
|
||||
mulpd %xmm5, %xmm2
|
||||
movsd (%r8,%rdx), %xmm0
|
||||
movhpd (%r8,%rcx), %xmm0
|
||||
movsd (%r8, %rdx), %xmm0
|
||||
movhpd (%r8, %rcx), %xmm0
|
||||
paddq %xmm3, %xmm0
|
||||
addpd %xmm2, %xmm5
|
||||
|
||||
/* dTn = dTn*2^N - dTn*2^-N */
|
||||
/* dTn = dTn*2^N - dTn*2^-N */
|
||||
movaps %xmm0, %xmm3
|
||||
subpd %xmm6, %xmm3
|
||||
|
||||
/* dTp = dTn*2^N + dTn*2^-N */
|
||||
/* dTp = dTn*2^N + dTn*2^-N */
|
||||
addpd %xmm6, %xmm0
|
||||
mulpd %xmm5, %xmm3
|
||||
|
||||
/* poly(r) = dTp + dTn*sinh(dR)+dTp*dR2*(a2 +a4*dR2) */
|
||||
/* poly(r) = dTp + dTn*sinh(dR)+dTp*dR2*(a2 +a4*dR2) */
|
||||
movups _dPC4+__svml_dcosh_data_internal(%rip), %xmm5
|
||||
mulpd %xmm7, %xmm5
|
||||
addpd _dPC2+__svml_dcosh_data_internal(%rip), %xmm5
|
||||
mulpd %xmm5, %xmm7
|
||||
|
||||
/* dTn*sinh(dR)+dTp*dR2*(a2 +a4*dR2) */
|
||||
/* dTn*sinh(dR)+dTp*dR2*(a2 +a4*dR2) */
|
||||
mulpd %xmm0, %xmm7
|
||||
addpd %xmm7, %xmm3
|
||||
|
||||
/* _VRES1 = dTp + dTn*sinh(dR)+dTp*dR2*(a2 +a4*dR2) */
|
||||
/* _VRES1 = dTp + dTn*sinh(dR)+dTp*dR2*(a2 +a4*dR2) */
|
||||
addpd %xmm3, %xmm0
|
||||
andl $3, %eax
|
||||
|
||||
/* Ret H */
|
||||
/* Ret H */
|
||||
|
||||
/* Go to special inputs processing branch */
|
||||
/* Go to special inputs processing branch */
|
||||
jne L(SPECIAL_VALUES_BRANCH)
|
||||
# LOE rbx rbp r12 r13 r14 r15 eax xmm0 xmm4
|
||||
|
||||
/* Restore registers
|
||||
/* Restore registers
|
||||
* and exit the function
|
||||
*/
|
||||
|
||||
@ -203,7 +202,7 @@ L(EXIT):
|
||||
ret
|
||||
cfi_def_cfa_offset(80)
|
||||
|
||||
/* Branch to process
|
||||
/* Branch to process
|
||||
* special inputs
|
||||
*/
|
||||
|
||||
@ -223,18 +222,18 @@ L(SPECIAL_VALUES_BRANCH):
|
||||
cfi_offset(14, -80)
|
||||
# LOE rbx rbp 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 rbp r15 r12d r13d
|
||||
|
||||
/* Special inputs
|
||||
/* Special inputs
|
||||
* processing loop
|
||||
*/
|
||||
|
||||
@ -242,7 +241,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 rbp r15 r12d r13d
|
||||
|
||||
@ -254,26 +253,26 @@ L(SPECIAL_VALUES_LOOP):
|
||||
cfi_restore(14)
|
||||
movups 48(%rsp), %xmm0
|
||||
|
||||
/* Go to exit */
|
||||
/* Go to exit */
|
||||
jmp L(EXIT)
|
||||
cfi_offset(12, -64)
|
||||
cfi_offset(13, -72)
|
||||
cfi_offset(14, -80)
|
||||
# LOE rbx rbp 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 cosh@PLT
|
||||
# LOE rbx rbp 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 rbp r15 r12d r13d
|
||||
END(_ZGVbN2v_cosh_sse4)
|
||||
@ -283,25 +282,24 @@ END(_ZGVbN2v_cosh_sse4)
|
||||
|
||||
#ifdef __svml_dcosh_data_internal_typedef
|
||||
typedef unsigned int VUINT32;
|
||||
typedef struct
|
||||
{
|
||||
__declspec(align(16)) VUINT32 _dbT[(1 + (1<<8))][2]; //dTpj ONLY!
|
||||
typedef struct {
|
||||
__declspec(align(16)) VUINT32 _dbT[(1+(1<<8))][2]; // dTpj ONLY!
|
||||
__declspec(align(16)) VUINT32 _dbInvLn2[2][2];
|
||||
__declspec(align(16)) VUINT32 _dbLn2hi[2][2];
|
||||
__declspec(align(16)) VUINT32 _dbLn2lo[2][2];
|
||||
__declspec(align(16)) VUINT32 _dbShifter[2][2];
|
||||
__declspec(align(16)) VUINT32 _iIndexMask[4][1]; //(1<<K)1-
|
||||
__declspec(align(16)) VUINT32 _iIndexMask[4][1]; // (1<<K)1-
|
||||
__declspec(align(16)) VUINT32 _dPC2[2][2];
|
||||
__declspec(align(16)) VUINT32 _dPC3[2][2];
|
||||
__declspec(align(16)) VUINT32 _dPC4[2][2];
|
||||
__declspec(align(16)) VUINT32 _iMaxIndex[4][1]; //(1<<K)
|
||||
__declspec(align(16)) VUINT32 _iMaxIndex[4][1]; // (1<<K)
|
||||
__declspec(align(16)) VUINT32 _lExpMask[2][2];
|
||||
__declspec(align(16)) VUINT32 _dSign[2][2]; //0x8000000000000000
|
||||
__declspec(align(16)) VUINT32 _dSign[2][2]; // 0x8000000000000000
|
||||
__declspec(align(16)) VUINT32 _iDomainRange[4][1];
|
||||
} __svml_dcosh_data_internal;
|
||||
#endif
|
||||
__svml_dcosh_data_internal:
|
||||
/*== _dbT ==*/
|
||||
/* _dbT */
|
||||
.quad 0x3fe0000000000000, 0x3fe00b1afa5abcbf, 0x3fe0163da9fb3335, 0x3fe02168143b0281
|
||||
.quad 0x3fe02c9a3e778061, 0x3fe037d42e11bbcc, 0x3fe04315e86e7f85, 0x3fe04e5f72f654b1
|
||||
.quad 0x3fe059b0d3158574, 0x3fe0650a0e3c1f89, 0x3fe0706b29ddf6de, 0x3fe07bd42b72a836
|
||||
@ -370,9 +368,9 @@ __svml_dcosh_data_internal:
|
||||
.align 16
|
||||
.quad 0x3ff71547652b82fe, 0x3ff71547652b82fe /* _dbInvLn2 = 1/log(2) */
|
||||
.align 16
|
||||
.quad 0x3FE62E42FEFC0000, 0x3FE62E42FEFC0000 /* _dbLn2hi = log(2) hi*/
|
||||
.quad 0x3FE62E42FEFC0000, 0x3FE62E42FEFC0000 /* _dbLn2hi = log(2) hi */
|
||||
.align 16
|
||||
.quad 0xBDAC610CA86C3899, 0xBDAC610CA86C3899 /* _dbLn2lo = log(2) lo*/
|
||||
.quad 0xBDAC610CA86C3899, 0xBDAC610CA86C3899 /* _dbLn2lo = log(2) lo */
|
||||
.align 16
|
||||
.quad 0x42B8000000000000, 0x42B8000000000000 /* _dbShifter */
|
||||
.align 16
|
||||
@ -388,9 +386,9 @@ __svml_dcosh_data_internal:
|
||||
.align 16
|
||||
.quad 0x7ff0000000000000, 0x7ff0000000000000 /* _lExpMask */
|
||||
.align 16
|
||||
.quad 0x8000000000000000, 0x8000000000000000 /* _dSign*/
|
||||
.quad 0x8000000000000000, 0x8000000000000000 /* _dSign */
|
||||
.align 16
|
||||
.long 0x40861d99, 0x40861d99, 0x40861d99, 0x40861d99 /* _iDomainRange 0x40861d9ac12a3e85 =(1021*2^K-0.5)*log(2)/2^K -needed for quick exp*/
|
||||
.long 0x40861d99, 0x40861d99, 0x40861d99, 0x40861d99 /* _iDomainRange 0x40861d9ac12a3e85 =(1021*2^K-0.5)*log(2)/2^K -needed for quick exp */
|
||||
.align 16
|
||||
.type __svml_dcosh_data_internal,@object
|
||||
.size __svml_dcosh_data_internal,.-__svml_dcosh_data_internal
|
||||
.type __svml_dcosh_data_internal, @object
|
||||
.size __svml_dcosh_data_internal, .-__svml_dcosh_data_internal
|
||||
|
Loading…
Reference in New Issue
Block a user