abiBasic fix
This commit is contained in:
@@ -3,7 +3,7 @@ source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
|
||||
@main.a = global ptr null
|
||||
@main.b = global ptr null
|
||||
@@ -242,10 +242,15 @@ _llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%107 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
%108 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2)
|
||||
%109 = call %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAnyIntptr"(ptr %108, i64 100)
|
||||
store %"github.com/goplus/llgo/internal/runtime.iface" %109, ptr %107, align 8
|
||||
%110 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %107, align 8
|
||||
%111 = ptrtoint ptr %107 to i64
|
||||
%109 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
||||
%110 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %109, i32 0, i32 0
|
||||
store ptr %108, ptr %110, align 8
|
||||
%111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %109, i32 0, i32 1
|
||||
store ptr inttoptr (i64 100 to ptr), ptr %111, align 8
|
||||
%112 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %109, align 8
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %112, ptr %107, align 8
|
||||
%113 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %107, align 8
|
||||
%114 = ptrtoint ptr %107 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 true)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 0)
|
||||
@@ -262,83 +267,83 @@ _llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double 1.005000e+02)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface" %110)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintEface"(%"github.com/goplus/llgo/internal/runtime.eface" %113)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %107)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %111)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %114)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%112 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 3)
|
||||
%113 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%114 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %112, i64 1, i64 3, i64 0, i64 3, i64 3)
|
||||
%115 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %106, 0
|
||||
%116 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %106, 1
|
||||
%117 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %114, ptr %115, i64 %116, i64 1)
|
||||
store i64 %117, ptr %113, align 4
|
||||
%118 = load i64, ptr %113, align 4
|
||||
%119 = getelementptr inbounds i8, ptr %112, i64 0
|
||||
%120 = load i8, ptr %119, align 1
|
||||
%121 = getelementptr inbounds i8, ptr %112, i64 1
|
||||
%122 = load i8, ptr %121, align 1
|
||||
%123 = getelementptr inbounds i8, ptr %112, i64 2
|
||||
%124 = load i8, ptr %123, align 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %118)
|
||||
%115 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 3)
|
||||
%116 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%117 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %115, i64 1, i64 3, i64 0, i64 3, i64 3)
|
||||
%118 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %106, 0
|
||||
%119 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %106, 1
|
||||
%120 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %117, ptr %118, i64 %119, i64 1)
|
||||
store i64 %120, ptr %116, align 4
|
||||
%121 = load i64, ptr %116, align 4
|
||||
%122 = getelementptr inbounds i8, ptr %115, i64 0
|
||||
%123 = load i8, ptr %122, align 1
|
||||
%124 = getelementptr inbounds i8, ptr %115, i64 1
|
||||
%125 = load i8, ptr %124, align 1
|
||||
%126 = getelementptr inbounds i8, ptr %115, i64 2
|
||||
%127 = load i8, ptr %126, align 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %121)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%125 = zext i8 %120 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %125)
|
||||
%128 = zext i8 %123 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %128)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%126 = zext i8 %122 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %126)
|
||||
%129 = zext i8 %125 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %129)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%127 = zext i8 %124 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %127)
|
||||
%130 = zext i8 %127 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %130)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%128 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %112, i64 1, i64 3, i64 1, i64 3, i64 3)
|
||||
%129 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||
%130 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %129, i32 0, i32 0
|
||||
store ptr @5, ptr %130, align 8
|
||||
%131 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %129, i32 0, i32 1
|
||||
store i64 4, ptr %131, align 4
|
||||
%132 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %129, align 8
|
||||
%133 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %132, 0
|
||||
%134 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %132, 1
|
||||
%135 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %128, ptr %133, i64 %134, i64 1)
|
||||
store i64 %135, ptr %113, align 4
|
||||
%136 = load i64, ptr %113, align 4
|
||||
%137 = getelementptr inbounds i8, ptr %112, i64 0
|
||||
%138 = load i8, ptr %137, align 1
|
||||
%139 = getelementptr inbounds i8, ptr %112, i64 1
|
||||
%140 = load i8, ptr %139, align 1
|
||||
%141 = getelementptr inbounds i8, ptr %112, i64 2
|
||||
%142 = load i8, ptr %141, align 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %136)
|
||||
%131 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %115, i64 1, i64 3, i64 1, i64 3, i64 3)
|
||||
%132 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||
%133 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %132, i32 0, i32 0
|
||||
store ptr @5, ptr %133, align 8
|
||||
%134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %132, i32 0, i32 1
|
||||
store i64 4, ptr %134, align 4
|
||||
%135 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %132, align 8
|
||||
%136 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %135, 0
|
||||
%137 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %135, 1
|
||||
%138 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %131, ptr %136, i64 %137, i64 1)
|
||||
store i64 %138, ptr %116, align 4
|
||||
%139 = load i64, ptr %116, align 4
|
||||
%140 = getelementptr inbounds i8, ptr %115, i64 0
|
||||
%141 = load i8, ptr %140, align 1
|
||||
%142 = getelementptr inbounds i8, ptr %115, i64 1
|
||||
%143 = load i8, ptr %142, align 1
|
||||
%144 = getelementptr inbounds i8, ptr %115, i64 2
|
||||
%145 = load i8, ptr %144, align 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %139)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%143 = zext i8 %138 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %143)
|
||||
%146 = zext i8 %141 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %146)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%144 = zext i8 %140 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %144)
|
||||
%147 = zext i8 %143 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %147)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%145 = zext i8 %142 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %145)
|
||||
%148 = zext i8 %145 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %148)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%146 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%147 = getelementptr inbounds { ptr }, ptr %146, i32 0, i32 0
|
||||
store ptr %113, ptr %147, align 8
|
||||
%148 = alloca { ptr, ptr }, align 8
|
||||
%149 = getelementptr inbounds { ptr, ptr }, ptr %148, i32 0, i32 0
|
||||
store ptr @"main.main$2", ptr %149, align 8
|
||||
%150 = getelementptr inbounds { ptr, ptr }, ptr %148, i32 0, i32 1
|
||||
store ptr %146, ptr %150, align 8
|
||||
%151 = load { ptr, ptr }, ptr %148, align 8
|
||||
%149 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%150 = getelementptr inbounds { ptr }, ptr %149, i32 0, i32 0
|
||||
store ptr %116, ptr %150, align 8
|
||||
%151 = alloca { ptr, ptr }, align 8
|
||||
%152 = getelementptr inbounds { ptr, ptr }, ptr %151, i32 0, i32 0
|
||||
store ptr @"main.main$2", ptr %152, align 8
|
||||
%153 = getelementptr inbounds { ptr, ptr }, ptr %151, i32 0, i32 1
|
||||
store ptr %149, ptr %153, align 8
|
||||
%154 = load { ptr, ptr }, ptr %151, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @main.demo)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @main.demo)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @"main.main$1")
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%152 = extractvalue { ptr, ptr } %151, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %152)
|
||||
%155 = extractvalue { ptr, ptr } %154, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %155)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
@@ -361,8 +366,6 @@ declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/internal/runtime.Slice", ptr, i64, i64)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAnyIntptr"(ptr, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
@@ -371,7 +374,7 @@ declare void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintEface"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user