x86_64: Fix svml_s_exp2f4_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:
Sunil K Pandey 2022-03-07 10:47:12 -08:00
parent eb927a26fa
commit ac11206db3

View File

@ -22,7 +22,7 @@
* exp2(x) = 2^n * T[j] * (1 + P(y))
* where
* x = m*(1/K) + y, y in [-1/K..1/K]
* m = n*K + j, m,n,j - signed integer, j in [-K/2..K/2]
* m = n*K + j, m, n,j - signed integer, j in [-K/2..K/2]
*
* values of 2^j/K are tabulated
*
@ -56,31 +56,30 @@
#include <sysdep.h>
.text
.section .text.sse4,"ax",@progbits
.section .text.sse4, "ax", @progbits
ENTRY(_ZGVbN4v_exp2f_sse4)
subq $72, %rsp
cfi_def_cfa_offset(80)
/* Check for overflow\underflow */
/* Check for overflow\underflow */
movups __svml_sexp2_data_internal(%rip), %xmm1
/* Implementation */
/* Implementation */
movaps %xmm1, %xmm5
/* Polynomial */
/* Polynomial */
movups _sPC6+__svml_sexp2_data_internal(%rip), %xmm4
addps %xmm0, %xmm5
movaps %xmm5, %xmm3
/* 2^N */
/* 2^N */
pslld $23, %xmm5
/* Check for overflow\underflow */
/* Check for overflow\underflow */
movdqu _iAbsMask+__svml_sexp2_data_internal(%rip), %xmm2
subps %xmm1, %xmm3
/* R */
/* R */
movaps %xmm0, %xmm1
pand %xmm0, %xmm2
pcmpgtd _iDomainRange+__svml_sexp2_data_internal(%rip), %xmm2
@ -99,15 +98,15 @@ ENTRY(_ZGVbN4v_exp2f_sse4)
mulps %xmm4, %xmm1
addps _sPC0+__svml_sexp2_data_internal(%rip), %xmm1
/* Reconstruction */
/* Reconstruction */
paddd %xmm5, %xmm1
testl %edx, %edx
/* Go to special inputs processing branch */
/* Go to special inputs processing branch */
jne L(SPECIAL_VALUES_BRANCH)
# LOE rbx rbp r12 r13 r14 r15 edx xmm0 xmm1
/* Restore registers
/* Restore registers
* and exit the function
*/
@ -118,7 +117,7 @@ L(EXIT):
ret
cfi_def_cfa_offset(80)
/* Branch to process
/* Branch to process
* special inputs
*/
@ -138,18 +137,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
*/
@ -157,7 +156,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 rbp r15 r12d r13d
@ -169,26 +168,26 @@ L(SPECIAL_VALUES_LOOP):
cfi_restore(14)
movups 48(%rsp), %xmm1
/* 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 xmm1
/* 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 exp2f@PLT
# LOE rbx rbp r14 r15 r12d r13d xmm0
movss %xmm0, 48(%rsp,%r14,4)
movss %xmm0, 48(%rsp, %r14, 4)
/* Process special inputs in loop */
/* Process special inputs in loop */
jmp L(SPECIAL_VALUES_LOOP)
# LOE rbx rbp r15 r12d r13d
END(_ZGVbN4v_exp2f_sse4)
@ -198,8 +197,7 @@ END(_ZGVbN4v_exp2f_sse4)
#ifdef __svml_sexp2_data_internal_typedef
typedef unsigned int VUINT32;
typedef struct
{
typedef struct {
__declspec(align(16)) VUINT32 _sShifter[4][1];
__declspec(align(16)) VUINT32 _sPC0[4][1];
__declspec(align(16)) VUINT32 _sPC1[4][1];
@ -234,5 +232,5 @@ __svml_sexp2_data_internal:
.align 16
.long 0x42fc0000, 0x42fc0000, 0x42fc0000, 0x42fc0000 /* _iDomainRange=126.0 */
.align 16
.type __svml_sexp2_data_internal,@object
.size __svml_sexp2_data_internal,.-__svml_sexp2_data_internal
.type __svml_sexp2_data_internal, @object
.size __svml_sexp2_data_internal, .-__svml_sexp2_data_internal