Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

460 lines
17 KiB

  1. ;//
  2. ;// INTEL CORPORATION PROPRIETARY INFORMATION
  3. ;// This software is supplied under the terms of a license agreement or
  4. ;// nondisclosure agreement with Intel Corporation and may not be copied
  5. ;// or disclosed except in accordance with the terms of that agreement.
  6. ;// Copyright (c) 2000 Intel Corporation. All Rights Reserved.
  7. ;//
  8. ;//
  9. ; log_wmt.asm
  10. ;
  11. ; double log(double);
  12. ;
  13. ; Initial version: 12/15/2000
  14. ; Updated with bug fixes: 2/20/2001
  15. ;
  16. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  17. ;; ;;
  18. ;; Another important feature is that we use the table of log(1/B) ;;
  19. ;; throughout. To ensure numerical accuracy, we only need to ensure that ;;
  20. ;; T(0)_hi = B(last)_hi, T(0)_lo = B(last)_lo. This ensures W_hi = 0 and ;;
  21. ;; W_lo = 0 exactly in the case of |X-1| <= 2^(-7). ;;
  22. ;; Finally, we do away with the need for extra-precision addition by the ;;
  23. ;; following observation. The three pieces at the end are ;;
  24. ;; A = W_hi + r_hi; B = r_lo; C = P + W_lo. ;;
  25. ;; When W_hi = W_lo = 0, the addition sequence (A+B) + C is accurate as ;;
  26. ;; the sum A+B is exact. ;;
  27. ;; Otherwise, A + (B+C) is accurate as B is going to be largely shifted ;;
  28. ;; off compared to the final result. ;;
  29. ;; Hence if we use compare and mask operations to ;;
  30. ;; create alpha = (r_lo or 0), beta = (0 or r_lo), Res_hi <- W_hi+alpha, ;;
  31. ;; Res_lo <- C + beta, then result is accurately computed as ;;
  32. ;; Res_hi+Res_lo. ;;
  33. ;; ;;
  34. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  35. .686P
  36. .387
  37. .XMM
  38. .MODEL FLAT,C
  39. EXTRN C __libm_error_support : NEAR
  40. CONST SEGMENT PARA PUBLIC USE32 'CONST'
  41. ALIGN 16
  42. emask DQ 000FFFFFFFFFFFFFH, 000FFFFFFFFFFFFFH ; mask off sign/expo field
  43. Magic DQ 428FFFFFFFFFF80FH, 428FFFFFFFFFF80FH ; 2^(42)-1+2^(-7)
  44. hi_mask DQ 7FFFFFFFFFE00000H, 7FFFFFFFFFE00000H ; mask of bottom 21 bits
  45. LOG_2 DQ 3FE62E42FEFA3800H, 3D2EF35793C76730H ; L_hi,L_lo -> [L_lo|L_hi]
  46. place_L DQ 0000000000000000H,0FFFFFFFFFFFFFFFFH ; 0,1 -> [FF..FF|00..00]
  47. DQ 0FFFFFFFFFFFFFFFFH, 0000000000000000H ; 1,0 -> [00..00|FF..FF]
  48. One DQ 3ff0000000000000H, 3ff0000000000000H ; 1,1
  49. Zero DQ 0000000000000000H, 0000000000000000H ; 0,0
  50. Two52 DQ 4330000000000000H, 4330000000000000H ; 2^52 for normalization
  51. Infs DQ 0FFF0000000000000H, 7FF0000000000000H ; -inf,+inf --> [+inf|-inf]
  52. NaN DQ 7FF0000000000001H, 7FF0000000000001H ; NaN for log(-ve), log(Nan)
  53. coeff DQ 3FC24998090DC555H, 0BFCFFFFFFF201E13H ; p6,p3 ->[p3|p6]
  54. DQ 0BFC555C54DD57D75H, 3FD55555555555A7H ; p5,p2 ->[p2|p5]
  55. DQ 3FC9999998867A53H, 0BFE000000000001CH ; p4,p1 ->[p1|p4]
  56. ;-------Table B-----------
  57. B_Tbl DQ 3FF0000000000000H, 3FF0000000000000H
  58. DQ 3FEF820000000000H, 3FEF820000000000H
  59. DQ 3FEF080000000000H, 3FEF080000000000H
  60. DQ 3FEE920000000000H, 3FEE920000000000H
  61. DQ 3FEE1E0000000000H, 3FEE1E0000000000H
  62. DQ 3FEDAE0000000000H, 3FEDAE0000000000H
  63. DQ 3FED420000000000H, 3FED420000000000H
  64. DQ 3FECD80000000000H, 3FECD80000000000H
  65. DQ 3FEC720000000000H, 3FEC720000000000H
  66. DQ 3FEC0E0000000000H, 3FEC0E0000000000H
  67. DQ 3FEBAC0000000000H, 3FEBAC0000000000H
  68. DQ 3FEB4E0000000000H, 3FEB4E0000000000H
  69. DQ 3FEAF20000000000H, 3FEAF20000000000H
  70. DQ 3FEA980000000000H, 3FEA980000000000H
  71. DQ 3FEA420000000000H, 3FEA420000000000H
  72. DQ 3FE9EC0000000000H, 3FE9EC0000000000H
  73. DQ 3FE99A0000000000H, 3FE99A0000000000H
  74. DQ 3FE9480000000000H, 3FE9480000000000H
  75. DQ 3FE8FA0000000000H, 3FE8FA0000000000H
  76. DQ 3FE8AC0000000000H, 3FE8AC0000000000H
  77. DQ 3FE8620000000000H, 3FE8620000000000H
  78. DQ 3FE8180000000000H, 3FE8180000000000H
  79. DQ 3FE7D00000000000H, 3FE7D00000000000H
  80. DQ 3FE78A0000000000H, 3FE78A0000000000H
  81. DQ 3FE7460000000000H, 3FE7460000000000H
  82. DQ 3FE7020000000000H, 3FE7020000000000H
  83. DQ 3FE6C20000000000H, 3FE6C20000000000H
  84. DQ 3FE6820000000000H, 3FE6820000000000H
  85. DQ 3FE6420000000000H, 3FE6420000000000H
  86. DQ 3FE6060000000000H, 3FE6060000000000H
  87. DQ 3FE5CA0000000000H, 3FE5CA0000000000H
  88. DQ 3FE58E0000000000H, 3FE58E0000000000H
  89. DQ 3FE5560000000000H, 3FE5560000000000H
  90. DQ 3FE51E0000000000H, 3FE51E0000000000H
  91. DQ 3FE4E60000000000H, 3FE4E60000000000H
  92. DQ 3FE4B00000000000H, 3FE4B00000000000H
  93. DQ 3FE47A0000000000H, 3FE47A0000000000H
  94. DQ 3FE4460000000000H, 3FE4460000000000H
  95. DQ 3FE4140000000000H, 3FE4140000000000H
  96. DQ 3FE3E20000000000H, 3FE3E20000000000H
  97. DQ 3FE3B20000000000H, 3FE3B20000000000H
  98. DQ 3FE3820000000000H, 3FE3820000000000H
  99. DQ 3FE3520000000000H, 3FE3520000000000H
  100. DQ 3FE3240000000000H, 3FE3240000000000H
  101. DQ 3FE2F60000000000H, 3FE2F60000000000H
  102. DQ 3FE2CA0000000000H, 3FE2CA0000000000H
  103. DQ 3FE29E0000000000H, 3FE29E0000000000H
  104. DQ 3FE2740000000000H, 3FE2740000000000H
  105. DQ 3FE24A0000000000H, 3FE24A0000000000H
  106. DQ 3FE2200000000000H, 3FE2200000000000H
  107. DQ 3FE1F80000000000H, 3FE1F80000000000H
  108. DQ 3FE1D00000000000H, 3FE1D00000000000H
  109. DQ 3FE1A80000000000H, 3FE1A80000000000H
  110. DQ 3FE1820000000000H, 3FE1820000000000H
  111. DQ 3FE15C0000000000H, 3FE15C0000000000H
  112. DQ 3FE1360000000000H, 3FE1360000000000H
  113. DQ 3FE1120000000000H, 3FE1120000000000H
  114. DQ 3FE0EC0000000000H, 3FE0EC0000000000H
  115. DQ 3FE0CA0000000000H, 3FE0CA0000000000H
  116. DQ 3FE0A60000000000H, 3FE0A60000000000H
  117. DQ 3FE0840000000000H, 3FE0840000000000H
  118. DQ 3FE0620000000000H, 3FE0620000000000H
  119. DQ 3FE0420000000000H, 3FE0420000000000H
  120. DQ 3FE0200000000000H, 3FE0200000000000H
  121. DQ 3FE0000000000000H, 3FE0000000000000H
  122. ;-------Table T_hi,T_lo so that movapd gives [ T_lo | T_hi ]
  123. T_Tbl DQ 0000000000000000H, 0000000000000000H
  124. DQ 3F8FBEA8B13C0000H, 3CDEC927B17E4E13H
  125. DQ 3F9F7A9B16780000H, 3D242AD9271BE7D7H
  126. DQ 3FA766D923C20000H, 3D1FF0A82F1C24C1H
  127. DQ 3FAF0C30C1114000H, 3D31A88653BA4140H
  128. DQ 3FB345179B63C000H, 3D3D4203D36150D0H
  129. DQ 3FB6EF528C056000H, 3D24573A51306A44H
  130. DQ 3FBA956D3ECAC000H, 3D3E63794C02C4AFH
  131. DQ 3FBE2507702AE000H, 3D303B433FD6EEDCH
  132. DQ 3FC0D79E7CD48000H, 3D3CB422847849E4H
  133. DQ 3FC299D30C606000H, 3D3D4D0079DC08D9H
  134. DQ 3FC44F8B726F8000H, 3D3DF6A4432B9BB4H
  135. DQ 3FC601B076E7A000H, 3D3152D7D4DFC8E5H
  136. DQ 3FC7B00916515000H, 3D146280D3E606A3H
  137. DQ 3FC9509AA0044000H, 3D3F1E675B4D35C6H
  138. DQ 3FCAF6895610D000H, 3D375BEBBA042B64H
  139. DQ 3FCC8DF7CB9A8000H, 3D3EEE42F58E1E6EH
  140. DQ 3FCE2A877A6B2000H, 3D3823817787081AH
  141. DQ 3FCFB7D86EEE3000H, 3D371FCF1923FB43H
  142. DQ 3FD0A504E97BB000H, 3D303094E6690C44H
  143. DQ 3FD1661CAECB9800H, 3D2D1C000C076A8BH
  144. DQ 3FD22981FBEF7800H, 3D17AF7A7DA9FC99H
  145. DQ 3FD2E9E2BCE12000H, 3D24300C128D1DC2H
  146. DQ 3FD3A71C56BB4800H, 3D08C46FB5A88483H
  147. DQ 3FD4610BC29C5800H, 3D385F4D833BCDC7H
  148. DQ 3FD51D1D93104000H, 3D35B0FAA20D9C8EH
  149. DQ 3FD5D01DC49FF000H, 3D2740AB8CFA5ED3H
  150. DQ 3FD68518244CF800H, 3D28722FF88BF119H
  151. DQ 3FD73C1800DC0800H, 3D3320DBF75476C0H
  152. DQ 3FD7E9883FA49800H, 3D3FAFF96743F289H
  153. DQ 3FD898D38A893000H, 3D31F666071E2F57H
  154. DQ 3FD94A0428036000H, 3D30E7BCB08C6B44H
  155. DQ 3FD9F123F4BF6800H, 3D36892015F2401FH
  156. DQ 3FDA99FCABDB8000H, 3D11E89C5F87A311H
  157. DQ 3FDB44977C148800H, 3D3C6A343FB526DBH
  158. DQ 3FDBEACD9E271800H, 3D268A6EDB879B51H
  159. DQ 3FDC92B7D6BB0800H, 3D10FE9FFF876CC2H
  160. DQ 3FDD360E90C38000H, 3D342CDB58440FD6H
  161. DQ 3FDDD4AA04E1C000H, 3D32D8512DF01AFDH
  162. DQ 3FDE74D262788800H, 3CFEB945ED9457BCH
  163. DQ 3FDF100F6C2EB000H, 3D2CCE779D37F3D8H
  164. DQ 3FDFACC89C9A9800H, 3D163E0D100EC76CH
  165. DQ 3FE02582A5C9D000H, 3D222C6C4E98E18CH
  166. DQ 3FE0720E5C40DC00H, 3D38E27400B03FBEH
  167. DQ 3FE0BF52E7353800H, 3D19B5899CD387D3H
  168. DQ 3FE109EB9E2E4C00H, 3D12DA67293E0BE7H
  169. DQ 3FE15533D3B8D400H, 3D3D981CA8B0D3C3H
  170. DQ 3FE19DB6BA0BA400H, 3D2B675885A4A268H
  171. DQ 3FE1E6DF676FF800H, 3D1A58BA81B983AAH
  172. DQ 3FE230B0D8BEBC00H, 3D12FC066E48667BH
  173. DQ 3FE2779E1EC93C00H, 3D36523373359B79H
  174. DQ 3FE2BF29F9841C00H, 3CFD8A3861D3B7ECH
  175. DQ 3FE30757344F0C00H, 3D309BE85662F034H
  176. DQ 3FE34C80A8958000H, 3D1D4093FCAC34BDH
  177. DQ 3FE39240DDE5CC00H, 3D3493DBEAB758B3H
  178. DQ 3FE3D89A6B1A5400H, 3D28C7CD5FA81E3EH
  179. DQ 3FE41BCFF4860000H, 3D076FD6B90E2A84H
  180. DQ 3FE4635BCF40DC00H, 3D2CE8D5D412CAADH
  181. DQ 3FE4A3E862342400H, 3D224FA993F78464H
  182. DQ 3FE4E8D015786C00H, 3D38B1C0D0303623H
  183. DQ 3FE52A6D269BC400H, 3D30022268F689C9H
  184. DQ 3FE56C91D71CF800H, 3CE07BAFD1366E9EH
  185. DQ 3FE5AB505B390400H, 3CD5627AF66563FAH
  186. DQ 3FE5EE82AA241800H, 3D2202380CDA46BEH
  187. DQ 3FE62E42FEFA3800H, 3D2EF35793C76730H
  188. ALIGN 16
  189. CONST ENDS
  190. $cmpsd MACRO op1, op2, op3
  191. LOCAL begin_cmpsd, end_cmpsd
  192. begin_cmpsd:
  193. cmppd op1, op2, op3
  194. end_cmpsd:
  195. org begin_cmpsd
  196. db 0F2h
  197. org end_cmpsd
  198. ENDM
  199. _TEXT SEGMENT PARA PUBLIC USE32 'CODE'
  200. ALIGN 16
  201. PUBLIC _log_pentium4, _CIlog_pentium4
  202. _CIlog_pentium4 PROC NEAR
  203. push ebp
  204. mov ebp, esp
  205. sub esp, 8 ; for argument DBLSIZE
  206. and esp, 0fffffff0h
  207. fstp qword ptr [esp]
  208. movq xmm0, qword ptr [esp]
  209. call start
  210. leave
  211. ret
  212. ;----------------------;
  213. ;--Argument Reduction--;
  214. ;----------------------;
  215. _log_pentium4 label proc
  216. movlpd xmm0, QWORD PTR [4+esp] ;... load X to low part of xmm0
  217. start:
  218. mov edx,0 ;... set edx to 0
  219. DENORMAL_RETRY:
  220. movapd xmm5,xmm0
  221. unpcklpd xmm0,xmm0 ;... [X|X]
  222. psrlq xmm5,52
  223. pextrw ecx,xmm5,0
  224. movapd xmm1, QWORD PTR [emask] ;... pair of 000FF...FF
  225. movapd xmm3, QWORD PTR [One] ;... pair of 3FF000...000
  226. movapd xmm4, QWORD PTR [Magic] ;... pair of 2^(42)-1+2^(-7)
  227. movapd xmm6, QWORD PTR [hi_mask] ;... pair of 7FFFFFFF..FE00000
  228. andpd xmm0,xmm1
  229. orpd xmm0,xmm3 ;... [Y|Y]
  230. addpd xmm4,xmm0 ;... 11 lsb contains the index to B
  231. ;... the last 4 lsb are don't cares, the
  232. ;... 7 bits following that is the index
  233. ;... Hence by masking, we already have index*16
  234. pextrw eax,xmm4,0
  235. and eax,000007F0H ;... eax is offset
  236. movapd xmm4, QWORD PTR [eax+B_Tbl] ;... [B|B]
  237. movapd xmm7, QWORD PTR [eax+T_Tbl]
  238. andpd xmm6,xmm0 ;... [Y_hi|Y_hi]
  239. subpd xmm0,xmm6 ;... [Y_lo|Y_lo]
  240. mulpd xmm6,xmm4 ;... [B*Y_hi|B*Y_hi]
  241. subpd xmm6,xmm3 ;... [R_hi|R_hi]
  242. addsd xmm7,xmm6 ;... [T_lo|T_hi+R_hi]
  243. mulpd xmm0,xmm4 ;... [R_lo|R_lo]
  244. movapd xmm4,xmm0 ;... [R_lo|R_lo]
  245. addpd xmm0,xmm6 ;... [R|R]
  246. ;-----------------------------------------;
  247. ;--Approx and Reconstruction in parallel--;
  248. ;-----------------------------------------;
  249. ;...m is in ecx, [T_lo,T_hi+R_hi] in xmm7
  250. ;...xmm4 through xmm6 will be used
  251. and ecx,00000FFFH ;... note we need sign and biased exponent
  252. sub ecx,1
  253. cmp ecx,2045 ;... the largest biased exponent 2046-1
  254. ;... if ecx is ABOVE (unsigned) this, either
  255. ;... the sign is +ve and biased exponent is 7FF
  256. ;... or the sign is +ve and exponent is 0, or
  257. ;... the sign is -ve (i.e. sign bit 1)
  258. ja SPECIAL_CASES
  259. sub ecx,1022 ;... m in integer format
  260. add ecx,edx ;... this is the denormal adjustment
  261. cvtsi2sd xmm6,ecx
  262. unpcklpd xmm6,xmm6 ;... [m | m] in FP format
  263. shl ecx,10
  264. add eax,ecx ;16*(64*m + j) 0 <=> (m=-1 & j=64) or (m=0 & j=0)
  265. mov ecx,16
  266. mov edx,0
  267. cmp eax,0
  268. cmove edx,ecx ;this is the index into the mask table (place_{L,R})
  269. movapd xmm1, QWORD PTR [coeff] ;... loading [p3|p6]
  270. movapd xmm3,xmm0
  271. movapd xmm2, QWORD PTR [coeff+16] ;... loading [p2|p5]
  272. mulpd xmm1,xmm0 ;... [p3 R | p6 R]
  273. mulpd xmm3,xmm3 ;... [R^2|R^2]
  274. addpd xmm1,xmm2 ;... [p2+p3 R |p5+p6 R]
  275. movapd xmm2, QWORD PTR [coeff+32] ;... [p1|p4]
  276. mulsd xmm3,xmm3 ;... [R^2|R^4]
  277. movapd xmm5, QWORD PTR [LOG_2] ;... loading [L_lo|L_hi]
  278. ;... [T_lo|T_hi+R_hi] already in xmm7
  279. mulpd xmm6,xmm5 ;... [m L_lo | m L_hi]
  280. movapd xmm5, QWORD PTR [edx+place_L] ;... [FF..FF|00.00] or [00..00|FF..FF]
  281. andpd xmm4,xmm5 ;... [R_lo|0] or [0|R_lo]
  282. addpd xmm7,xmm6 ;... [W_lo|W_hi]
  283. addpd xmm7,xmm4 ;... [A_lo|A_hi]
  284. mulpd xmm1,xmm0 ;... [p2 R+p3 R^2|p5 R+p6 R^2]
  285. mulsd xmm3,xmm0 ;... [R^2|R^5]
  286. addpd xmm1,xmm2 ;... [p1+.. | p4+...]
  287. movapd xmm6,xmm7
  288. unpckhpd xmm6,xmm6 ;... [*|A_lo]
  289. mulpd xmm1,xmm3 ;... [P_hi|P_lo]
  290. sub esp, 16
  291. movapd xmm0,xmm1 ;... copy of [P_hi|P_lo]
  292. unpckhpd xmm1,xmm1 ;... [P_hi|P_hi]
  293. ;...[P_hi|P_lo] in xmm1 at this point
  294. addsd xmm0,xmm1 ;... [*|P]
  295. addsd xmm0,xmm6
  296. addsd xmm0,xmm7
  297. movlpd QWORD PTR [esp+4], xmm0 ; return result
  298. fld QWORD PTR [esp+4] ;
  299. add esp, 16
  300. ret
  301. SPECIAL_CASES:
  302. movlpd xmm0, QWORD PTR [4+esp] ;... load X again
  303. movapd xmm1, QWORD PTR [Zero]
  304. $cmpsd xmm1,xmm0,0
  305. pextrw eax,xmm1,0 ;... ones if X = +-0.0
  306. cmp eax,0
  307. ja INPUT_ZERO
  308. cmp ecx,-1 ;... ecx = -1 iff X is positive denormal
  309. je INPUT_DENORM
  310. cmp ecx,000007FEH
  311. ja INPUT_NEGATIVE
  312. movlpd xmm0, QWORD PTR [4+esp]
  313. movapd xmm1, QWORD PTR [emask]
  314. movapd xmm2, QWORD PTR [One]
  315. andpd xmm0,xmm1
  316. orpd xmm0,xmm2 ;... xmm0 is 1 iff the input argument was +inf
  317. $cmpsd xmm2,xmm0,0
  318. pextrw eax,xmm2,0 ;... 0 if X is NaN
  319. cmp eax, 0
  320. je INPUT_NaN
  321. INPUT_INF:
  322. ;....Input is +Inf
  323. fld QWORD PTR [Infs+8] ;
  324. ret
  325. INPUT_NaN:
  326. ; movlpd xmm0, QWORD PTR [esp+4]
  327. ; addsd xmm0, xmm0
  328. ; sub esp, 16
  329. ; movlpd QWORD PTR [esp+4], xmm0 ; return result
  330. ; fld QWORD PTR [esp+4] ;
  331. ; add esp, 16
  332. ; ret
  333. mov edx, 1000
  334. jmp CALL_LIBM_ERROR
  335. INPUT_ZERO:
  336. ; raise Divide by Zero
  337. movlpd xmm2, QWORD PTR [One]
  338. divsd xmm2, xmm0
  339. movlpd xmm1, QWORD PTR [Infs]
  340. mov edx, 2
  341. jmp CALL_LIBM_ERROR
  342. INPUT_DENORM:
  343. ;....check for zero or denormal
  344. ;....for now I assume this is simply denormal
  345. ;....in reality, we need to check for zero and handle appropriately
  346. movlpd xmm1,Two52
  347. mulsd xmm0,xmm1
  348. mov edx,-52 ;...set adjustment to exponent
  349. jmp DENORMAL_RETRY ;...branch back
  350. INPUT_NEGATIVE:
  351. add ecx,1
  352. and ecx, 7ffH
  353. cmp ecx, 7ffH
  354. jae NEG_INF_NAN
  355. NEG_NORMAL_INFINITY:
  356. ; xmm1=0
  357. xorpd xmm1, xmm1
  358. ; raise Invalid
  359. divsd xmm1, xmm1
  360. mov edx, 3
  361. CALL_LIBM_ERROR:
  362. ;call libm_error_support(void *arg1,void *arg2,void *retval,error_types input_tag)
  363. sub esp, 28
  364. movlpd QWORD PTR [esp+16], xmm1
  365. mov DWORD PTR [esp+12],edx
  366. mov edx, esp
  367. add edx,16
  368. mov DWORD PTR [esp+8],edx
  369. add edx,16
  370. mov DWORD PTR [esp+4],edx
  371. mov DWORD PTR [esp],edx
  372. call NEAR PTR __libm_error_support
  373. ; movlpd xmm0, QWORD PTR [esp+16]
  374. ; movlpd QWORD PTR [esp+16], xmm0 ; return result
  375. fld QWORD PTR [esp+16] ;
  376. add esp,28
  377. ret
  378. NEG_INF_NAN:
  379. movlpd xmm2, QWORD PTR [esp+4]
  380. movlpd xmm0, QWORD PTR [esp+4]
  381. movd eax, xmm2
  382. psrlq xmm2, 32
  383. movd ecx, xmm2
  384. and ecx, 0fffffH ; eliminate sign/exponent
  385. or eax, ecx
  386. cmp eax,0
  387. jz NEG_NORMAL_INFINITY ; negative infinity
  388. ; addsd xmm0, xmm0
  389. ; sub esp,16
  390. ; movlpd QWORD PTR [esp+4], xmm0
  391. ; fld QWORD PTR [esp+4]
  392. ; add esp, 16
  393. ; ret
  394. mov edx, 1000
  395. jmp CALL_LIBM_ERROR
  396. _CIlog_pentium4 ENDP
  397. ALIGN 16
  398. _TEXT ENDS
  399. END