23 / 24 / Copyright 2006 Sun Microsystems, Inc. All rights reserved. 25 / Use is subject to license terms. 26 / 27 28 / Portions of this file are duplicated as GCC inline assembly in 29 / libm_inlines.h. Keep them in sync. 30 31 .inline __ieee754_sqrt,0 32 sqrtsd %xmm0,%xmm0 33 .end 34 35 .inline __inline_sqrtf,0 36 sqrtss %xmm0,%xmm0 37 .end 38 39 .inline __inline_sqrt,0 40 sqrtsd %xmm0,%xmm0 41 .end 42 43 .inline __inline_fstsw,0 44 fstsw %ax 45 .end 46 47 / 48 / 00 - 24 bits 49 / 01 - reserved 50 / 10 - 53 bits 51 / 11 - 64 bits 52 / 53 .inline __swapRP,0 54 subq $16,%rsp 55 fstcw (%rsp) 56 movw (%rsp),%ax 57 movw %ax,%cx 58 andw $0xfcff,%cx 59 andl $0x3,%edi 60 shlw $8,%di 61 orw %di,%cx 62 movl %ecx,(%rsp) 63 fldcw (%rsp) 64 shrw $8,%ax 65 andq $0x3,%rax 66 addq $16,%rsp 86 shrw $10,%ax 87 andq $0x3,%rax 88 addq $16,%rsp 89 .end 90 91 .inline abs,0 92 cmpl $0,%edi 93 jge 1f 94 negl %edi 95 1: movl %edi,%eax 96 .end 97 98 .inline __copysign,0 99 movq $0x7fffffffffffffff,%rax 100 movdq %rax,%xmm2 101 andpd %xmm2,%xmm0 102 andnpd %xmm1,%xmm2 103 orpd %xmm2,%xmm0 104 .end 105 106 .inline __d_sqrt_,0 107 movlpd (%rdi),%xmm0 108 sqrtsd %xmm0,%xmm0 109 .end 110 111 .inline __fabs,0 112 movq $0x7fffffffffffffff,%rax 113 movdq %rax,%xmm1 114 andpd %xmm1,%xmm0 115 .end 116 117 .inline __fabsf,0 118 movl $0x7fffffff,%eax 119 movdl %eax,%xmm1 120 andps %xmm1,%xmm0 121 .end 122 123 .inline _finite,0 124 subq $16,%rsp 125 movlpd %xmm0,(%rsp) 126 movq (%rsp),%rcx 127 movq $0x7fffffffffffffff,%rax 128 andq %rcx,%rax 129 movq $0x7ff0000000000000,%rcx 130 subq %rcx,%rax 131 shrq $63,%rax 132 addq $16,%rsp 133 .end 134 135 .inline __r_sqrt_,0 136 movss (%rdi),%xmm0 137 sqrtss %xmm0,%xmm0 138 .end 139 140 .inline __signbit,0 141 movmskpd %xmm0,%eax 142 andq $1,%rax 143 .end 144 145 .inline __signbitf,0 146 movmskps %xmm0,%eax 147 andq $1,%rax 148 .end 149 150 .inline __sqrt,0 151 sqrtsd %xmm0,%xmm0 152 .end 153 154 .inline __sqrtf,0 155 sqrtss %xmm0,%xmm0 156 .end 157 158 .inline __f95_signf,0 159 movl (%rdi),%eax 160 movl (%rsi),%ecx 161 andl $0x7fffffff,%eax 162 andl $0x80000000,%ecx 163 orl %ecx,%eax 164 movdl %eax,%xmm0 165 .end 166 | 23 / 24 / Copyright 2006 Sun Microsystems, Inc. All rights reserved. 25 / Use is subject to license terms. 26 / 27 28 / Portions of this file are duplicated as GCC inline assembly in 29 / libm_inlines.h. Keep them in sync. 30 31 .inline __ieee754_sqrt,0 32 sqrtsd %xmm0,%xmm0 33 .end 34 35 .inline __inline_sqrtf,0 36 sqrtss %xmm0,%xmm0 37 .end 38 39 .inline __inline_sqrt,0 40 sqrtsd %xmm0,%xmm0 41 .end 42 43 / 44 / 00 - 24 bits 45 / 01 - reserved 46 / 10 - 53 bits 47 / 11 - 64 bits 48 / 49 .inline __swapRP,0 50 subq $16,%rsp 51 fstcw (%rsp) 52 movw (%rsp),%ax 53 movw %ax,%cx 54 andw $0xfcff,%cx 55 andl $0x3,%edi 56 shlw $8,%di 57 orw %di,%cx 58 movl %ecx,(%rsp) 59 fldcw (%rsp) 60 shrw $8,%ax 61 andq $0x3,%rax 62 addq $16,%rsp 82 shrw $10,%ax 83 andq $0x3,%rax 84 addq $16,%rsp 85 .end 86 87 .inline abs,0 88 cmpl $0,%edi 89 jge 1f 90 negl %edi 91 1: movl %edi,%eax 92 .end 93 94 .inline __copysign,0 95 movq $0x7fffffffffffffff,%rax 96 movdq %rax,%xmm2 97 andpd %xmm2,%xmm0 98 andnpd %xmm1,%xmm2 99 orpd %xmm2,%xmm0 100 .end 101 102 .inline __fabs,0 103 movq $0x7fffffffffffffff,%rax 104 movdq %rax,%xmm1 105 andpd %xmm1,%xmm0 106 .end 107 108 .inline __fabsf,0 109 movl $0x7fffffff,%eax 110 movdl %eax,%xmm1 111 andps %xmm1,%xmm0 112 .end 113 114 .inline _finite,0 115 subq $16,%rsp 116 movlpd %xmm0,(%rsp) 117 movq (%rsp),%rcx 118 movq $0x7fffffffffffffff,%rax 119 andq %rcx,%rax 120 movq $0x7ff0000000000000,%rcx 121 subq %rcx,%rax 122 shrq $63,%rax 123 addq $16,%rsp 124 .end 125 126 .inline __signbit,0 127 movmskpd %xmm0,%eax 128 andq $1,%rax 129 .end 130 131 .inline __sqrt,0 132 sqrtsd %xmm0,%xmm0 133 .end 134 135 .inline __sqrtf,0 136 sqrtss %xmm0,%xmm0 137 .end 138 139 .inline __f95_signf,0 140 movl (%rdi),%eax 141 movl (%rsi),%ecx 142 andl $0x7fffffff,%eax 143 andl $0x80000000,%ecx 144 orl %ecx,%eax 145 movdl %eax,%xmm0 146 .end 147 |