mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
6442a3eaae
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5245 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
410 B
LLVM
21 lines
410 B
LLVM
|
|
double %test(double* %DP, double %Arg) {
|
|
%D = load double* %DP
|
|
%V = add double %D, 1.0
|
|
%W = sub double %V, %V
|
|
%X = mul double %W, %W
|
|
%Y = div double %X, %X
|
|
%Z = rem double %Y, %Y
|
|
%Z = div double %Z, %W
|
|
%Q = add double %Z, %Arg
|
|
%R = cast double %Q to double
|
|
store double %R, double* %DP
|
|
ret double %Z
|
|
}
|
|
|
|
int %main() {
|
|
%X = alloca double
|
|
call double %test(double* %X, double 2.0)
|
|
ret int 0
|
|
}
|