Skip to content

Commit cfdce00

Browse files
committed
fix: failed tests after closure ctx passing changed
1 parent fa1bbe0 commit cfdce00

File tree

66 files changed

+299
-199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+299
-199
lines changed

cl/_testcall/closureparam/out.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ _llgo_2: ; preds = %_llgo_1
6767
%14 = load i64, ptr %13, align 4
6868
%15 = load ptr, ptr %1, align 8
6969
%16 = getelementptr i8, ptr %1, i64 16
70-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %16)
70+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %16)
7171
%17 = call i64 %15(i64 %14)
7272
%18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, 0
7373
%19 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, 1
@@ -85,7 +85,7 @@ _llgo_3: ; preds = %_llgo_1
8585

8686
define i64 @"github.com/goplus/llgo/cl/_testcall/closureparam.main$2"(i64 %0) {
8787
_llgo_0:
88-
%1 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
88+
%1 = call ptr asm sideeffect "mov $0, x26", "=r"()
8989
%2 = load { ptr }, ptr %1, align 8
9090
%3 = extractvalue { ptr } %2, 0
9191
%4 = load i64, ptr %3, align 4

cl/_testcall/freeclosure/out.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ _llgo_0:
2121
%0 = call ptr @"github.com/goplus/llgo/cl/_testcall/freeclosure.main$1"(i64 3)
2222
%1 = load ptr, ptr %0, align 8
2323
%2 = getelementptr i8, ptr %0, i64 16
24-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %2)
24+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %2)
2525
%3 = call i64 %1(i64 2)
2626
ret void
2727
}
@@ -45,7 +45,7 @@ _llgo_0:
4545

4646
define i64 @"github.com/goplus/llgo/cl/_testcall/freeclosure.main$1$1"(i64 %0) {
4747
_llgo_0:
48-
%1 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
48+
%1 = call ptr asm sideeffect "mov $0, x26", "=r"()
4949
%2 = load { ptr }, ptr %1, align 8
5050
%3 = extractvalue { ptr } %2, 0
5151
%4 = load i64, ptr %3, align 4

cl/_testcall/go/out.ll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ _llgo_2: ; preds = %_llgo_0
232232

233233
define void @"github.com/goplus/llgo/cl/_testcall/go.main$1"() {
234234
_llgo_0:
235-
%0 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
235+
%0 = call ptr asm sideeffect "mov $0, x26", "=r"()
236236
%1 = load { ptr }, ptr %0, align 8
237237
%2 = extractvalue { ptr } %1, 0
238238
%3 = load i64, ptr %2, align 4
@@ -270,7 +270,7 @@ _llgo_0:
270270
%2 = extractvalue { ptr } %1, 0
271271
%3 = load ptr, ptr %2, align 8
272272
%4 = getelementptr i8, ptr %2, i64 16
273-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %4)
273+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %4)
274274
call void %3()
275275
call void @free(ptr %0)
276276
ret ptr null
@@ -302,7 +302,7 @@ _llgo_0:
302302

303303
define i64 @"github.com/goplus/llgo/cl/_testcall/go.(*S).Add$bound"(i64 %0) {
304304
_llgo_0:
305-
%1 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
305+
%1 = call ptr asm sideeffect "mov $0, x26", "=r"()
306306
%2 = load { ptr }, ptr %1, align 8
307307
%3 = extractvalue { ptr } %2, 0
308308
%4 = call i64 @"github.com/goplus/llgo/cl/_testcall/go.(*S).Add"(ptr %3, i64 %0)
@@ -316,15 +316,15 @@ _llgo_0:
316316
%3 = extractvalue { ptr, i64 } %1, 1
317317
%4 = load ptr, ptr %2, align 8
318318
%5 = getelementptr i8, ptr %2, i64 16
319-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %5)
319+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %5)
320320
%6 = call i64 %4(i64 %3)
321321
call void @free(ptr %0)
322322
ret ptr null
323323
}
324324

325325
define i64 @"github.com/goplus/llgo/cl/_testcall/go.S.Inc$bound"(i64 %0) {
326326
_llgo_0:
327-
%1 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
327+
%1 = call ptr asm sideeffect "mov $0, x26", "=r"()
328328
%2 = load { %"github.com/goplus/llgo/cl/_testcall/go.S" }, ptr %1, align 4
329329
%3 = extractvalue { %"github.com/goplus/llgo/cl/_testcall/go.S" } %2, 0
330330
%4 = call i64 @"github.com/goplus/llgo/cl/_testcall/go.S.Inc"(%"github.com/goplus/llgo/cl/_testcall/go.S" %3, i64 %0)
@@ -338,7 +338,7 @@ _llgo_0:
338338
%3 = extractvalue { ptr, i64 } %1, 1
339339
%4 = load ptr, ptr %2, align 8
340340
%5 = getelementptr i8, ptr %2, i64 16
341-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %5)
341+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %5)
342342
%6 = call i64 %4(i64 %3)
343343
call void @free(ptr %0)
344344
ret ptr null
@@ -396,7 +396,7 @@ _llgo_0:
396396
%3 = extractvalue { ptr, i64 } %1, 1
397397
%4 = load ptr, ptr %2, align 8
398398
%5 = getelementptr i8, ptr %2, i64 16
399-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %5)
399+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %5)
400400
%6 = call i64 %4(i64 %3)
401401
call void @free(ptr %0)
402402
ret ptr null
@@ -410,7 +410,7 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.c
410410

411411
define i64 @"github.com/goplus/llgo/cl/_testcall/go.interface{Add(int) int}.Add$bound"(i64 %0) {
412412
_llgo_0:
413-
%1 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
413+
%1 = call ptr asm sideeffect "mov $0, x26", "=r"()
414414
%2 = load { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %1, align 8
415415
%3 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %2, 0
416416
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %3)
@@ -428,7 +428,7 @@ _llgo_0:
428428
%13 = getelementptr i8, ptr %8, i64 16
429429
%14 = load ptr, ptr %13, align 8
430430
%15 = getelementptr i8, ptr %8, i64 16
431-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %15)
431+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %15)
432432
%16 = call i64 %12(ptr %14, i64 %0)
433433
ret i64 %16
434434
}
@@ -440,7 +440,7 @@ _llgo_0:
440440
%3 = extractvalue { ptr, i64 } %1, 1
441441
%4 = load ptr, ptr %2, align 8
442442
%5 = getelementptr i8, ptr %2, i64 16
443-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %5)
443+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %5)
444444
%6 = call i64 %4(i64 %3)
445445
call void @free(ptr %0)
446446
ret ptr null

cl/_testcall/ifacecall/out.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ _llgo_0:
8484
%14 = getelementptr i8, ptr %9, i64 16
8585
%15 = load ptr, ptr %14, align 8
8686
%16 = getelementptr i8, ptr %9, i64 16
87-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %16)
87+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %16)
8888
%17 = call i64 %13(ptr %15, i64 11)
8989
ret void
9090
}

cl/_testcall/ifacemethodval/out.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ _llgo_1: ; preds = %_llgo_0
8989
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4, ptr %10, align 8
9090
%11 = load ptr, ptr %7, align 8
9191
%12 = getelementptr i8, ptr %7, i64 16
92-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %12)
92+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %12)
9393
%13 = call i64 %11(i64 9)
9494
ret void
9595

@@ -123,7 +123,7 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.c
123123

124124
define i64 @"github.com/goplus/llgo/cl/_testcall/ifacemethodval.interface{Add(int) int}.Add$bound"(i64 %0) {
125125
_llgo_0:
126-
%1 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
126+
%1 = call ptr asm sideeffect "mov $0, x26", "=r"()
127127
%2 = load { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %1, align 8
128128
%3 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %2, 0
129129
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %3)
@@ -141,7 +141,7 @@ _llgo_0:
141141
%13 = getelementptr i8, ptr %8, i64 16
142142
%14 = load ptr, ptr %13, align 8
143143
%15 = getelementptr i8, ptr %8, i64 16
144-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %15)
144+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %15)
145145
%16 = call i64 %12(ptr %14, i64 %0)
146146
ret i64 %16
147147
}

cl/_testcall/iife/out.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ _llgo_0:
2929
store ptr %0, ptr %4, align 8
3030
%5 = load ptr, ptr %1, align 8
3131
%6 = getelementptr i8, ptr %1, i64 16
32-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %6)
32+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %6)
3333
%7 = call i64 %5(i64 5)
3434
ret void
3535
}
3636

3737
define i64 @"github.com/goplus/llgo/cl/_testcall/iife.main$1"(i64 %0) {
3838
_llgo_0:
39-
%1 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
39+
%1 = call ptr asm sideeffect "mov $0, x26", "=r"()
4040
%2 = load { ptr }, ptr %1, align 8
4141
%3 = extractvalue { ptr } %2, 0
4242
%4 = load i64, ptr %3, align 4

cl/_testcall/nestedclosure/out.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ _llgo_0:
2929
store ptr %0, ptr %4, align 8
3030
%5 = load ptr, ptr %1, align 8
3131
%6 = getelementptr i8, ptr %1, i64 16
32-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %6)
32+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %6)
3333
%7 = call ptr %5()
3434
%8 = load ptr, ptr %7, align 8
3535
%9 = getelementptr i8, ptr %7, i64 16
36-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %9)
36+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %9)
3737
%10 = call i64 %8()
3838
ret void
3939
}
4040

4141
define ptr @"github.com/goplus/llgo/cl/_testcall/nestedclosure.main$1"() {
4242
_llgo_0:
43-
%0 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
43+
%0 = call ptr asm sideeffect "mov $0, x26", "=r"()
4444
%1 = load { ptr }, ptr %0, align 8
4545
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
4646
store i64 2, ptr %2, align 4
@@ -59,7 +59,7 @@ _llgo_0:
5959

6060
define i64 @"github.com/goplus/llgo/cl/_testcall/nestedclosure.main$1$1"() {
6161
_llgo_0:
62-
%0 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
62+
%0 = call ptr asm sideeffect "mov $0, x26", "=r"()
6363
%1 = load { ptr, ptr }, ptr %0, align 8
6464
%2 = extractvalue { ptr, ptr } %1, 0
6565
%3 = load i64, ptr %2, align 4

cl/_testcall/nofreeclosure/out.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _llgo_0:
2222
%0 = call ptr @"github.com/goplus/llgo/cl/_testcall/nofreeclosure.main$1"()
2323
%1 = load ptr, ptr %0, align 8
2424
%2 = getelementptr i8, ptr %0, i64 16
25-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %2)
25+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %2)
2626
%3 = call i64 %1(i64 1)
2727
ret void
2828
}

cl/_testcall/ptrmethodval/out.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ _llgo_0:
4040
store ptr %0, ptr %5, align 8
4141
%6 = load ptr, ptr %2, align 8
4242
%7 = getelementptr i8, ptr %2, i64 16
43-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %7)
43+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %7)
4444
%8 = call i64 %6(i64 7)
4545
ret void
4646
}
@@ -49,7 +49,7 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
4949

5050
define i64 @"github.com/goplus/llgo/cl/_testcall/ptrmethodval.(*S).Add$bound"(i64 %0) {
5151
_llgo_0:
52-
%1 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
52+
%1 = call ptr asm sideeffect "mov $0, x26", "=r"()
5353
%2 = load { ptr }, ptr %1, align 8
5454
%3 = extractvalue { ptr } %2, 0
5555
%4 = call i64 @"github.com/goplus/llgo/cl/_testcall/ptrmethodval.(*S).Add"(ptr %3, i64 %0)

cl/_testcall/valmethodval/out.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ _llgo_0:
5252
store %"github.com/goplus/llgo/cl/_testcall/valmethodval.S" %2, ptr %6, align 4
5353
%7 = load ptr, ptr %3, align 8
5454
%8 = getelementptr i8, ptr %3, i64 16
55-
call void asm sideeffect "mov x26, $0", "r,~{x26},~{memory}"(ptr %8)
55+
call void asm sideeffect "mov x26, $0", "r,~{x26}"(ptr %8)
5656
%9 = call i64 %7(i64 3)
5757
ret void
5858
}
@@ -62,7 +62,7 @@ declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
6262

6363
define i64 @"github.com/goplus/llgo/cl/_testcall/valmethodval.S.Inc$bound"(i64 %0) {
6464
_llgo_0:
65-
%1 = call ptr asm sideeffect "mov $0, x26", "=r,~{memory}"()
65+
%1 = call ptr asm sideeffect "mov $0, x26", "=r"()
6666
%2 = load { %"github.com/goplus/llgo/cl/_testcall/valmethodval.S" }, ptr %1, align 4
6767
%3 = extractvalue { %"github.com/goplus/llgo/cl/_testcall/valmethodval.S" } %2, 0
6868
%4 = call i64 @"github.com/goplus/llgo/cl/_testcall/valmethodval.S.Inc"(%"github.com/goplus/llgo/cl/_testcall/valmethodval.S" %3, i64 %0)

0 commit comments

Comments
 (0)