montimaj

test1.s

Jun 28th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.39 KB | None | 0 0
  1. ; ModuleID = '<stdin>'
  2. source_filename = "test.c"
  3. target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  4. target triple = "x86_64-unknown-linux-gnu"
  5.  
  6. @.str = private unnamed_addr constant [20 x i8] c"Enter two numbers: \00", align 1
  7. @.str.1 = private unnamed_addr constant [6 x i8] c"%f %f\00", align 1
  8. @.str.2 = private unnamed_addr constant [9 x i8] c"c1 = %f\0A\00", align 1
  9.  
  10. ; Function Attrs: noinline nounwind optnone uwtable
  11. define i32 @main() #0 {
  12. entry:
  13.   %retval = alloca i32, align 4
  14.   %a = alloca float, align 4
  15.   %b = alloca float, align 4
  16.   %c = alloca float, align 4
  17.   store i32 0, i32* %retval, align 4
  18.   %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i32 0, i32 0))
  19.   %call1 = call i32 (i8*, ...) @__isoc99_scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), float* %a, float* %b)
  20.   %0 = load float, float* %a, align 4
  21.   %1 = load float, float* %b, align 4
  22.   %add = fadd float %0, %1
  23.   store float %add, float* %c, align 4
  24.   %2 = load float, float* %c, align 4
  25.   %conv = fpext float %2 to double
  26.   %call2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i32 0, i32 0), double %conv)
  27.   ret i32 0
  28. }
  29.  
  30. declare i32 @printf(i8*, ...) #1
  31.  
  32. declare i32 @__isoc99_scanf(i8*, ...) #1
  33.  
  34. attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  35. attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  36.  
  37. !llvm.module.flags = !{!0}
  38. !llvm.ident = !{!1}
  39.  
  40. !0 = !{i32 1, !"wchar_size", i32 4}
  41. !1 = !{!"clang version 5.0.0 (trunk 304972)"}
Add Comment
Please, Sign In to add comment