mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
add sin/cos tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21635 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
08cae7f519
commit
ac766dca82
@ -1,13 +1,31 @@
|
||||
; RUN: llvm-as < %s | llc
|
||||
|
||||
|
||||
;; SQRT
|
||||
declare float %llvm.sqrt(float)
|
||||
declare double %llvm.sqrt(double)
|
||||
|
||||
|
||||
double %test_sqrt(float %F) {
|
||||
%G = call float %llvm.sqrt(float %F)
|
||||
%H = cast float %G to double
|
||||
%I = call double %llvm.sqrt(double %H)
|
||||
ret double %I
|
||||
}
|
||||
|
||||
; SIN
|
||||
declare float %sinf(float)
|
||||
declare double %sin(double)
|
||||
double %test_sin(float %F) {
|
||||
%G = call float %sinf(float %F)
|
||||
%H = cast float %G to double
|
||||
%I = call double %sin(double %H)
|
||||
ret double %I
|
||||
}
|
||||
|
||||
; COS
|
||||
declare float %cosf(float)
|
||||
declare double %cos(double)
|
||||
double %test_cos(float %F) {
|
||||
%G = call float %cosf(float %F)
|
||||
%H = cast float %G to double
|
||||
%I = call double %cos(double %H)
|
||||
ret double %I
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user