-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathio.ll
More file actions
54 lines (44 loc) · 2.41 KB
/
io.ll
File metadata and controls
54 lines (44 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
; ModuleID = 'io.c'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%f\0A\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.3 = private unnamed_addr constant [3 x i8] c"%f\00", align 1
; Function Attrs: nounwind uwtable
define void @escrevaInteiro(i32 %ni) #0 {
%1 = alloca i32, align 4
store i32 %ni, i32* %1, align 4
%2 = load i32, i32* %1, align 4
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %2)
ret void
}
declare i32 @printf(i8*, ...) #1
; Function Attrs: nounwind uwtable
define void @escrevaFlutuante(float %nf) #0 {
%1 = alloca float, align 4
store float %nf, float* %1, align 4
%2 = load float, float* %1, align 4
%3 = fpext float %2 to double
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), double %3)
ret void
}
; Function Attrs: nounwind uwtable
define i32 @leiaInteiro() #0 {
%num = alloca i32, align 4
%1 = call i32 (i8*, ...) @__isoc99_scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i32* %num)
%2 = load i32, i32* %num, align 4
ret i32 %2
}
declare i32 @__isoc99_scanf(i8*, ...) #1
; Function Attrs: nounwind uwtable
define float @leiaFlutuante() #0 {
%num = alloca float, align 4
%1 = call i32 (i8*, ...) @__isoc99_scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), float* %num)
%2 = load float, float* %num, align 4
ret float %2
}
attributes #0 = { nounwind uwtable "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" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { "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" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.ident = !{!0}
!0 = !{!"clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)"}