Zelatrix

LLVM addition

Jun 30th, 2022 (edited)
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. ; ModuleID = "/home/callum/fns2/funs_no_errors_v2/functions_no_errors/codegen.py"
  2. target triple = "x86_64-unknown-linux-gnu"
  3. target datalayout = ""
  4.  
  5. define void @"main"()
  6. {
  7. entry:
  8. %".2" = bitcast [6 x i8]* @"fstr" to i64*
  9. %".3" = alloca double
  10. store double 0x4000000000000000, double* %".3"
  11. %".5" = alloca double
  12. store double 0x4008000000000000, double* %".5"
  13. %".7" = alloca double
  14. %".8" = load double, double* %".3"
  15. %".9" = load double, double* %".5"
  16. %".10" = fadd double %".8", %".9"
  17. store double %".10", double* %".7"
  18. %".12" = load double, double* %".7"
  19. %".13" = call i32 (i64*, ...) @"printf"(i64* %".2", double %".12")
  20. ret void
  21. }
  22.  
  23. declare dso_local i32 @"printf"(i64* %".1", ...)
  24.  
  25. @"fstr" = internal constant [6 x i8] c"%lf \0a\00"
Add Comment
Please, Sign In to add comment