/[cmucl]/src/code/irrat.lisp
ViewVC logotype

Diff of /src/code/irrat.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by rtoy, Thu Jan 31 19:12:40 2008 UTC revision 1.55.8.2 by rtoy, Fri Sep 26 20:13:10 2008 UTC
# Line 59  Line 59 
59  ;;; Please refer to the Unix man pages for details about these routines.  ;;; Please refer to the Unix man pages for details about these routines.
60    
61  ;;; Trigonometric.  ;;; Trigonometric.
62  #-x86 (def-math-rtn "sin" 1)  #-(and x86 (not sse2))
63  #-x86 (def-math-rtn "cos" 1)  (progn
64  #-x86 (def-math-rtn "tan" 1)    ;; For x86 (without sse2), we can use x87 instructions to implement
65      ;; these.  With sse2, we don't currently support that, so these
66      ;; should be disabled.
67      (def-math-rtn "sin" 1)
68      (def-math-rtn "cos" 1)
69      (def-math-rtn "tan" 1)
70      (def-math-rtn "atan" 1)
71      (def-math-rtn "atan2" 2))
72  (def-math-rtn "asin" 1)  (def-math-rtn "asin" 1)
73  (def-math-rtn "acos" 1)  (def-math-rtn "acos" 1)
 #-x86 (def-math-rtn "atan" 1)  
 #-x86 (def-math-rtn "atan2" 2)  
74  (def-math-rtn "sinh" 1)  (def-math-rtn "sinh" 1)
75  (def-math-rtn "cosh" 1)  (def-math-rtn "cosh" 1)
76  (def-math-rtn "tanh" 1)  (def-math-rtn "tanh" 1)
# Line 74  Line 79 
79  (def-math-rtn "atanh" 1)  (def-math-rtn "atanh" 1)
80    
81  ;;; Exponential and Logarithmic.  ;;; Exponential and Logarithmic.
82  #-x86 (def-math-rtn "exp" 1)  #-(and x86 (not sse2))
83  #-x86 (def-math-rtn "log" 1)  (progn
84  #-x86 (def-math-rtn "log10" 1)    (def-math-rtn "exp" 1)
85      (def-math-rtn "log" 1)
86      (def-math-rtn "log10" 1))
87    
88  (def-math-rtn "pow" 2)  (def-math-rtn "pow" 2)
89  #-(or x86 sparc-v7 sparc-v8 sparc-v9) (def-math-rtn "sqrt" 1)  #-(or x86 sparc-v7 sparc-v8 sparc-v9)
90    (def-math-rtn "sqrt" 1)
91  (def-math-rtn "hypot" 2)  (def-math-rtn "hypot" 2)
 #-(or hpux x86) (def-math-rtn "log1p" 1)  
92    
93  #+x86 ;; These are needed for use by byte-compiled files.  ;; Don't want log1p to use the x87 instruction.
94    #-(or hpux (and x86 (not sse2)))
95    (def-math-rtn "log1p" 1)
96    
97    ;; These are needed for use by byte-compiled files.  But don't use
98    ;; these with sse2 since we don't support using the x87 instructions
99    ;; here.
100    #+(and x86 (not sse2))
101  (progn  (progn
102    #+nil    #+nil
103    (defun %sin (x)    (defun %sin (x)
# Line 204  Line 219 
219    
220  )  )
221    
222  #+ppc  #+(or ppc sse2)
223  (progn  (progn
224  (declaim (inline %%sin %%cos %%tan))  (declaim (inline %%sin %%cos %%tan))
225  (macrolet ((frob (alien-name lisp-name)  (macrolet ((frob (alien-name lisp-name)
# Line 266  Line 281 
281                      (if (evenp n)                      (if (evenp n)
282                          (,tan reduced)                          (,tan reduced)
283                          (- (/ (,tan reduced)))))))))))                          (- (/ (,tan reduced)))))))))))
284    #+x86    ;; Don't want %sin-quick and friends with sse2.
285      #+(and x86 (not sse2))
286    (frob %sin-quick %cos-quick %tan-quick)    (frob %sin-quick %cos-quick %tan-quick)
287    #+ppc    #+(or ppc sse2)
288    (frob %%sin %%cos %%tan))    (frob %%sin %%cos %%tan))
289    
290    

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.55.8.2

  ViewVC Help
Powered by ViewVC 1.1.5