mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-03 18:32:50 +00:00
add div test as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5245 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
102f533f69
commit
6442a3eaae
@ -6,13 +6,15 @@ double %test(double* %DP, double %Arg) {
|
||||
%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
|
||||
store double %Q, double* %DP
|
||||
%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 1.0)
|
||||
call double %test(double* %X, double 2.0)
|
||||
ret int 0
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user