基础版本

lzkk 5 days ago
parent 2c43ea28f9
commit 39d1f8119f

867
-

@ -1,591 +1,358 @@
.data
.globl maxn
.p2align 2
maxn:
.word 18
.globl mod
.p2align 2
mod:
.word 1000000007
.bss
.globl dp
.globl A
.p2align 2
dp:
.space 52907904
.data
.bss
.globl list
A:
.space 4194304
.globl B
.p2align 2
list:
.space 800
.data
.bss
.globl cns
B:
.space 4194304
.globl C
.p2align 2
cns:
.space 80
.data
C:
.space 4194304
.text
.globl equal
.globl main
.p2align 2
equal:
.L.equal.0:
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, w0
mov w9, w1
cmp w8, w9
b.eq .L.equal.1
b .L.equal.2
.L.equal.1:
sub sp, sp, #48
str x21, [sp, #0]
str x19, [sp, #8]
str x20, [sp, #16]
bl getint
mov w19, w0
bl getint
mov w20, w0
mov w21, #0
b .L.main.1
.L.main.55:
lsl w8, w11, #10
add w8, w8, w10
adrp x9, A
add x9, x9, :lo12:A
ldr w8, [x9, w8, uxtw #2]
mul w9, w8, w8
madd w21, w8, w8, w21
mov w8, #1
mov w0, w8
ldp x29, x30, [sp], #16
ret
.L.equal.2:
mov w8, #0
mov w0, w8
ldp x29, x30, [sp], #16
ret
.text
.globl dfs
.p2align 2
dfs:
.L.dfs.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
sub sp, sp, #96
str x25, [sp, #0]
str x27, [sp, #8]
str x26, [sp, #16]
str x24, [sp, #24]
str x22, [sp, #32]
str x20, [sp, #40]
str x23, [sp, #48]
str x21, [sp, #56]
str x19, [sp, #64]
mov w24, w0
mov w23, w1
mov w22, w2
mov w20, w3
mov w21, w4
mov w19, w5
movz w8, #13936
movk w8, #11, lsl #16
mul w8, w24, w8
mov w9, #40824
mul w9, w23, w9
add w8, w8, w9
mov w9, #2268
mul w9, w22, w9
add w8, w8, w9
mov w9, #126
mul w9, w20, w9
add w8, w8, w9
mov w9, #7
mul w9, w21, w9
add w8, w8, w9
add w8, w8, w19
adrp x9, dp
add x9, x9, :lo12:dp
sxtw x8, w8
lsl x8, x8, #2
add x8, x9, x8
ldr w9, [x8]
mov w8, #-1
cmp w9, w8
b.ne .L.dfs.1
b .L.dfs.2
.L.dfs.1:
movz w8, #13936
movk w8, #11, lsl #16
mul w8, w24, w8
mov w9, #40824
mul w9, w23, w9
add w8, w8, w9
mov w9, #2268
mul w9, w22, w9
add w8, w8, w9
mov w9, #126
mul w9, w20, w9
add w8, w8, w9
mov w9, #7
mul w9, w21, w9
add w8, w8, w9
add w8, w8, w19
adrp x9, dp
add x9, x9, :lo12:dp
sxtw x8, w8
lsl x8, x8, #2
add x8, x9, x8
ldr w8, [x8]
mov w0, w8
ldr x25, [sp, #0]
ldr x27, [sp, #8]
ldr x26, [sp, #16]
ldr x24, [sp, #24]
ldr x22, [sp, #32]
ldr x20, [sp, #40]
ldr x23, [sp, #48]
ldr x21, [sp, #56]
ldr x19, [sp, #64]
add sp, sp, #96
ldp x29, x30, [sp], #16
ret
.L.dfs.2:
add w8, w24, w23
add w8, w8, w22
add w8, w8, w20
add w8, w8, w21
mov w9, #0
cmp w8, w9
b.eq .L.dfs.3
b .L.dfs.4
.L.dfs.3:
add w10, w10, #1
b .L.main.54
.L.main.54:
cmp w10, w19
b.lt .L.main.55
.L.main.56:
mov w8, #1
mov w0, w8
ldr x25, [sp, #0]
ldr x27, [sp, #8]
ldr x26, [sp, #16]
ldr x24, [sp, #24]
ldr x22, [sp, #32]
ldr x20, [sp, #40]
ldr x23, [sp, #48]
ldr x21, [sp, #56]
ldr x19, [sp, #64]
add sp, sp, #96
ldp x29, x30, [sp], #16
ret
.L.dfs.4:
mov w8, #0
cmp w24, w8
b.ne .L.dfs.5
mov w8, #0
mov w25, w8
b .L.dfs.10
.L.dfs.5:
b .L.dfs.6
.L.dfs.6:
mov w8, #2
cmp w19, w8
b.eq .L.dfs.7
b .L.dfs.8
.L.dfs.7:
add w9, w11, #1
mov w8, w12
b .L.main.51
.L.main.51:
cmp w9, w19
b.ge .L.main.53
.L.main.52:
mov w10, #0
mov w12, w8
mov w11, w9
b .L.main.54
.L.main.46:
lsl w8, w11, #10
add w8, w8, w15
adrp x9, C
add x9, x9, :lo12:C
ldr w8, [x9, w8, uxtw #2]
lsl w9, w15, #10
add w21, w9, w10
adrp x9, A
add x9, x9, :lo12:A
ldr w21, [x9, w21, uxtw #2]
mul w9, w8, w21
madd w12, w8, w21, w12
mov w8, #1
b .L.dfs.9
.L.dfs.8:
mov w8, #0
b .L.dfs.9
.L.dfs.9:
sub w25, w24, w8
add w8, w15, #1
mov w15, w8
b .L.main.45
.L.main.45:
cmp w15, w19
b.lt .L.main.46
.L.main.47:
lsl w8, w11, #10
add w9, w8, w10
adrp x8, A
add x8, x8, :lo12:A
str w12, [x8, w9, uxtw #2]
mov w8, #1
sub w9, w24, w8
mov w0, w9
mov w1, w23
mov w2, w22
mov w3, w20
mov w4, w21
mov w5, w8
bl dfs
mov w8, w0
mul w8, w25, w8
mov w9, #0
add w8, w9, w8
movz w9, #51719
movk w9, #15258, lsl #16
sdiv w14, w8, w9
msub w8, w14, w9, w8
mov w25, w8
b .L.dfs.10
.L.dfs.10:
add w8, w10, #1
mov w10, w8
mov w9, w11
b .L.main.42
.L.main.42:
cmp w10, w19
b.ge .L.main.44
.L.main.43:
mov w8, #0
cmp w23, w8
b.ne .L.dfs.11
mov w27, w25
b .L.dfs.16
.L.dfs.11:
b .L.dfs.12
.L.dfs.12:
mov w12, w8
mov w15, w8
mov w11, w9
b .L.main.45
.L.main.53:
mov w9, #1
add w8, w8, #1
mov w9, w8
b .L.main.48
.L.main.48:
cmp w9, w20
b.ge .L.main.50
.L.main.49:
mov w8, w9
mov w9, #0
b .L.main.51
.L.main.37:
lsl w8, w11, #10
add w12, w8, w15
adrp x10, C
add x10, x10, :lo12:C
ldr w9, [x10, w12, uxtw #2]
mul w8, w9, w9
mov w8, #7
madd w9, w9, w9, w8
mov w8, #3
cmp w19, w8
b.eq .L.dfs.13
b .L.dfs.14
.L.dfs.13:
movz w8, #21846
movk w8, #21845, lsl #16
smull x8, w9, w8
lsr x8, x8, #32
asr w9, w9, #31
sub w8, w8, w9
str w8, [x10, w12, uxtw #2]
mov w8, #1
b .L.dfs.15
.L.dfs.14:
mov w8, #0
b .L.dfs.15
.L.dfs.15:
sub w26, w23, w8
mov w8, #1
add w9, w24, w8
sub w8, w23, w8
mov w0, w9
mov w1, w8
mov w2, w22
mov w3, w20
mov w4, w21
mov w8, #2
mov w5, w8
bl dfs
mov w8, w0
mul w8, w26, w8
add w8, w25, w8
movz w9, #51719
movk w9, #15258, lsl #16
sdiv w14, w8, w9
msub w8, w14, w9, w8
mov w27, w8
b .L.dfs.16
.L.dfs.16:
mov w8, #0
cmp w22, w8
b.ne .L.dfs.17
mov w26, w27
b .L.dfs.22
.L.dfs.17:
b .L.dfs.18
.L.dfs.18:
mov w8, #4
cmp w19, w8
b.eq .L.dfs.19
b .L.dfs.20
.L.dfs.19:
add w8, w15, #1
mov w15, w8
b .L.main.36
.L.main.36:
cmp w15, w19
b.lt .L.main.37
.L.main.38:
mov w8, #1
b .L.dfs.21
.L.dfs.20:
mov w8, #0
b .L.dfs.21
.L.dfs.21:
sub w25, w22, w8
add w8, w11, #1
mov w11, w8
b .L.main.33
.L.main.33:
cmp w11, w19
b.ge .L.main.35
.L.main.34:
mov w15, #0
b .L.main.36
.L.main.44:
mov w8, #1
add w9, w23, w8
sub w8, w22, w8
mov w0, w24
mov w1, w9
mov w2, w8
mov w3, w20
mov w4, w21
add w8, w9, #1
mov w9, w8
b .L.main.39
.L.main.39:
cmp w9, w19
b.ge .L.main.41
.L.main.40:
mov w10, #0
b .L.main.42
.L.main.31:
lsl w8, w12, #10
add w11, w8, w15
adrp x8, A
add x8, x8, :lo12:A
ldr w8, [x8, w11, uxtw #2]
lsl w10, w8, #1
adrp x8, B
add x8, x8, :lo12:B
ldr w9, [x8, w11, uxtw #2]
mov w8, #3
mov w5, w8
bl dfs
mov w8, w0
mul w8, w25, w8
add w9, w27, w8
movz w8, #51719
movk w8, #15258, lsl #16
sdiv w14, w9, w8
msub w8, w14, w8, w9
mov w26, w8
b .L.dfs.22
.L.dfs.22:
mov w8, #0
cmp w20, w8
b.ne .L.dfs.23
mov w25, w26
b .L.dfs.28
.L.dfs.23:
b .L.dfs.24
.L.dfs.24:
mov w8, #5
cmp w19, w8
b.eq .L.dfs.25
b .L.dfs.26
.L.dfs.25:
mul w8, w9, w8
add w9, w10, w8
adrp x8, C
add x8, x8, :lo12:C
str w9, [x8, w11, uxtw #2]
mov w8, #1
b .L.dfs.27
.L.dfs.26:
mov w8, #0
b .L.dfs.27
.L.dfs.27:
sub w25, w20, w8
add w8, w15, #1
mov w15, w8
b .L.main.30
.L.main.30:
cmp w15, w19
b.lt .L.main.31
.L.main.32:
mov w8, #1
add w9, w22, w8
sub w8, w20, w8
mov w0, w24
mov w1, w23
mov w2, w9
mov w3, w8
mov w4, w21
mov w8, #4
mov w5, w8
bl dfs
mov w8, w0
mul w8, w25, w8
add w9, w26, w8
movz w8, #51719
movk w8, #15258, lsl #16
sdiv w14, w9, w8
msub w8, w14, w8, w9
mov w25, w8
b .L.dfs.28
.L.dfs.28:
add w8, w12, #1
mov w12, w8
b .L.main.27
.L.main.27:
cmp w12, w19
b.ge .L.main.29
.L.main.28:
mov w15, #0
b .L.main.30
.L.main.50:
mov w8, #105
mov w0, w8
bl _sysy_stoptime
mov w0, w21
bl putint
mov w8, #10
mov w0, w8
bl putch
mov w8, #0
cmp w21, w8
b.ne .L.dfs.29
mov w10, w25
b .L.dfs.30
.L.dfs.29:
mov w8, #1
add w9, w20, w8
sub w8, w21, w8
mov w0, w24
mov w1, w23
mov w2, w22
mov w3, w9
mov w4, w8
mov w8, #5
mov w5, w8
bl dfs
mov w8, w0
mul w8, w21, w8
add w9, w25, w8
movz w8, #51719
movk w8, #15258, lsl #16
sdiv w14, w9, w8
msub w8, w14, w8, w9
mov w10, w8
b .L.dfs.30
.L.dfs.30:
movz w8, #13936
movk w8, #11, lsl #16
mul w9, w24, w8
mov w8, #40824
mul w8, w23, w8
add w9, w9, w8
mov w8, #2268
mul w8, w22, w8
add w9, w9, w8
mov w8, #126
mul w8, w20, w8
add w9, w9, w8
mov w8, #7
mul w8, w21, w8
add w8, w9, w8
add w8, w8, w19
movz w9, #51719
movk w9, #15258, lsl #16
sdiv w14, w10, w9
msub w9, w14, w9, w10
adrp x10, dp
add x10, x10, :lo12:dp
sxtw x11, w8
lsl x11, x11, #2
add x11, x10, x11
str w9, [x11]
sxtw x8, w8
lsl x8, x8, #2
add x8, x10, x8
ldr w8, [x8]
mov w0, w8
ldr x25, [sp, #0]
ldr x27, [sp, #8]
ldr x26, [sp, #16]
ldr x24, [sp, #24]
ldr x22, [sp, #32]
ldr x20, [sp, #40]
ldr x23, [sp, #48]
ldr x21, [sp, #56]
ldr x19, [sp, #64]
add sp, sp, #96
ldr x21, [sp, #0]
ldr x19, [sp, #8]
ldr x20, [sp, #16]
add sp, sp, #48
ldp x29, x30, [sp], #16
ret
.text
.globl main
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
sub sp, sp, #48
str x19, [sp, #0]
str x20, [sp, #8]
str x21, [sp, #16]
str x22, [sp, #24]
bl getint
mov w19, w0
mov w8, #0
.L.main.25:
lsl w10, w8, #10
add w10, w10, w9
adrp x11, B
add x11, x11, :lo12:B
mov w12, #-1
str w12, [x11, w10, uxtw #2]
mov w10, #1
add w9, w9, #1
b .L.main.24
.L.main.24:
cmp w9, w19
b.lt .L.main.25
.L.main.26:
mov w9, w8
b .L.main.1
.L.main.3:
mov w8, #0
mov w20, w8
b .L.main.23
.L.main.23:
mov w8, #1
add w8, w9, #1
b .L.main.19
.L.main.19:
cmp w20, w19
b.lt .L.main.20
b .L.main.21
cmp w8, w19
b.ge .L.main.21
.L.main.20:
bl getint
mov w10, w0
adrp x9, list
add x9, x9, :lo12:list
sxtw x8, w20
lsl x8, x8, #2
add x8, x9, x8
str w10, [x8]
sxtw x8, w20
lsl x8, x8, #2
add x8, x9, x8
ldr w11, [x8]
sxtw x8, w20
lsl x8, x8, #2
add x8, x9, x8
ldr w9, [x8]
adrp x8, cns
add x8, x8, :lo12:cns
sxtw x9, w9
lsl x9, x9, #2
add x9, x8, x9
ldr w9, [x9]
mov w10, #1
add w9, w9, w10
sxtw x11, w11
lsl x11, x11, #2
add x8, x8, x11
str w9, [x8]
add w8, w20, w10
mov w20, w8
b .L.main.19
.L.main.5:
mov w10, #0
mov w11, w10
mov w10, w8
b .L.main.7
.L.main.9:
mov w8, #1
add w8, w10, w8
.L.main.4:
mov w10, #18
cmp w8, w10
b.lt .L.main.5
.L.main.6:
mov w8, #1
add w8, w9, w8
mov w9, #2
add w9, w19, #1
cmp w19, #0
csel w9, w9, w19, lt
asr w9, w9, #1
cmp w8, w9
b.lt .L.main.22
mov w9, w8
.L.main.1:
mov w8, #18
cmp w9, w8
b.lt .L.main.2
b .L.main.3
.L.main.2:
mov w8, #0
b .L.main.4
.L.main.12:
mov w8, #1
add w8, w11, w8
mov w11, w8
.L.main.7:
mov w8, #18
cmp w11, w8
b.lt .L.main.8
b .L.main.9
.L.main.8:
b .L.main.23
.L.main.22:
mov w9, #0
b .L.main.24
.L.main.41:
mov w8, #0
mov w9, w8
mov w21, w8
b .L.main.10
.L.main.14:
mov w8, #0
mov w10, w8
mov w11, w22
mov w21, w9
b .L.main.16
b .L.main.48
.L.main.17:
movz w8, #13936
movk w8, #11, lsl #16
mul w9, w21, w8
mov w8, #40824
mul w8, w12, w8
add w9, w9, w8
mov w8, #2268
mul w8, w20, w8
add w9, w9, w8
mov w8, #126
mul w8, w11, w8
add w9, w9, w8
mov w8, #7
mul w8, w15, w8
add w8, w9, w8
add w8, w8, w10
adrp x9, dp
add x9, x9, :lo12:dp
sxtw x8, w8
lsl x8, x8, #2
add x9, x9, x8
mov w8, #-1
str w8, [x9]
mov w8, #1
add w8, w10, w8
mov w10, w8
lsl w10, w8, #10
add w10, w10, w9
adrp x11, A
add x11, x11, :lo12:A
mov w12, #-1
str w12, [x11, w10, uxtw #2]
mov w10, #1
add w9, w9, #1
b .L.main.16
.L.main.16:
mov w8, #7
cmp w10, w8
cmp w9, w19
b.lt .L.main.17
.L.main.18:
mov w8, #1
add w8, w15, w8
mov w15, w8
mov w22, w11
mov w9, w21
.L.main.13:
mov w8, #18
cmp w15, w8
b.lt .L.main.14
mov w9, w8
b .L.main.15
.L.main.15:
mov w8, #1
add w8, w22, w8
mov w21, w8
mov w11, w20
mov w10, w12
add w8, w9, #1
b .L.main.11
.L.main.11:
cmp w8, w19
b.ge .L.main.13
.L.main.12:
mov w9, #2
add w9, w19, #1
cmp w19, #0
csel w9, w9, w19, lt
asr w9, w9, #1
cmp w8, w9
b.ge .L.main.14
mov w9, w8
b .L.main.15
.L.main.14:
mov w9, #0
b .L.main.16
.L.main.35:
mov w9, #0
b .L.main.39
.L.main.29:
mov w11, #0
b .L.main.33
.L.main.10:
mov w8, #18
mov w8, #1
add w21, w21, #1
b .L.main.6
.L.main.6:
cmp w21, w19
b.ge .L.main.8
.L.main.7:
mov w8, #2
add w8, w19, #1
cmp w19, #0
csel w8, w8, w19, lt
asr w8, w8, #1
cmp w21, w8
b.lt .L.main.11
b .L.main.12
.L.main.11:
mov w8, #0
mov w15, w8
mov w22, w21
mov w20, w11
mov w12, w10
b .L.main.13
b.lt .L.main.10
.L.main.9:
lsl w8, w21, #10
adrp x9, B
add x9, x9, :lo12:B
sxtw x8, w8
lsl x8, x8, #2
add x8, x9, x8
mov x0, x8
bl getarray
mov w8, w0
b .L.main.10
.L.main.21:
adrp x8, cns
add x8, x8, :lo12:cns
mov x9, #4
add x9, x8, x9
ldr w9, [x9]
mov x10, #8
add x10, x8, x10
ldr w15, [x10]
mov x10, #12
add x10, x8, x10
ldr w12, [x10]
mov x10, #16
add x10, x8, x10
ldr w11, [x10]
mov x10, #20
add x8, x8, x10
ldr w8, [x8]
mov w0, w9
mov w1, w15
mov w2, w12
mov w3, w11
mov w4, w8
mov w12, #0
b .L.main.27
.L.main.13:
mov w8, #0
mov w5, w8
bl dfs
mov w19, w0
mov w0, w19
bl putint
mov w0, w19
ldr x19, [sp, #0]
ldr x20, [sp, #8]
ldr x21, [sp, #16]
ldr x22, [sp, #24]
add sp, sp, #48
ldp x29, x30, [sp], #16
ret
b .L.main.19
.L.main.8:
mov w8, #25
mov w0, w8
bl _sysy_starttime
mov w8, #0
b .L.main.11
.L.main.5:
mov w8, #1
add w8, w21, #1
mov w21, w8
b .L.main.1
.L.main.1:
cmp w21, w19
b.ge .L.main.3
.L.main.2:
mov w8, #2
add w8, w19, #1
cmp w19, #0
csel w8, w8, w19, lt
asr w8, w8, #1
cmp w21, w8
b.ge .L.main.5
.L.main.4:
lsl w8, w21, #10
adrp x9, A
add x9, x9, :lo12:A
sxtw x8, w8
lsl x8, x8, #2
add x8, x9, x8
mov x0, x8
bl getarray
mov w8, w0
b .L.main.5
.L.main.3:
mov w21, #0
b .L.main.6

@ -63,6 +63,7 @@ show_help() {
-c, --category CAT 指定测试类别: functional|h_functional|performance|all (默认: all)
--skip N1,N2,... 跳过指定编号的测试用例 (逗号分隔)
-v, --verbose 显示详细输出
-d, --test-dir DIR 测试用例目录 (默认: ./2026test)
-o, --output-dir DIR 指定输出目录 (默认: ./2026test_results)
-t, --timeout MS 单个测试超时时间(毫秒) (默认: 300000)
-j, --jobs N 并行任务数 (默认: nproc, 设为1恢复串行)
@ -132,6 +133,10 @@ parse_args() {
VERBOSE=true
shift
;;
-d|--test-dir)
TEST_ROOT="$2"
shift 2
;;
-o|--output-dir)
OUTPUT_DIR="$2"
shift 2
@ -516,8 +521,12 @@ run_one_test() {
exec_start_ms=$(get_timestamp_ms)
set +e
# qemu 执行加 timeout 防护(默认 60s防止无限循环卡死整个测试
local qemu_timeout=60
# qemu 执行加 timeout 防护,防止无限循环卡死整个测试
# functional 30sperformance 120s长计算用例需要更多时间
local qemu_timeout=30
if [[ "$category_name" == "performance" ]]; then
qemu_timeout=120
fi
if [[ -f "$stdin_file" ]]; then
timeout --signal=KILL "$qemu_timeout" qemu-aarch64 -L /usr/aarch64-linux-gnu -s 104857600 "$exe" < "$stdin_file" > "$stdout_file" 2>/dev/null
else
@ -526,6 +535,19 @@ run_one_test() {
local exit_status=$?
set -e
# 检测超时timeout 命令返回 124
if [[ $exit_status -eq 124 ]]; then
printf 'STATUS=%s
ERROR=%s
ELAPSED=%s
START=%s
END=%s
FILE=%s
BASELINE=%s
' "TIMEOUT" "qemu timeout (${qemu_timeout}s)" "$elapsed_ms" "$start_human" "$end_human" "$rel_path" "$baseline_entry" > "$result_file"
return 0
fi
local exec_end_ms
exec_end_ms=$(get_timestamp_ms)
end_human=$(date '+%Y-%m-%d %H:%M:%S.%3N')
@ -624,6 +646,7 @@ else
case "$_st" in
SUCCESS) echo -e "${GREEN}成功${NC} (${_el}ms)" ;;
COMPILE_FAIL) echo -e "${RED}编译/链接失败${NC}" ;;
TIMEOUT) echo -e "${YELLOW}超时${NC} (${_el}ms)" ;;
OUTPUT_MISMATCH) echo -e "${RED}输出不匹配${NC} (${_el}ms)" ;;
*) echo -e "${RED}异常${NC}" ;;
esac
@ -738,6 +761,22 @@ for item in "${TEST_QUEUE[@]}"; do
echo "========================================"
} >> "$ERROR_LOG_FILE"
;;
TIMEOUT)
FAILED=$((FAILED + 1))
echo "$file" >> "$FAIL_FILE"
if $_parallel_mode; then
echo -e "${YELLOW}[$idx] $(basename "$file") ... 超时${NC} (${error}s)"
fi
echo "[TIMEOUT] $file (${error}) | start=$start_human | end=$end_human | exec=${elapsed_ms}ms" >> "$LOG_FILE"
{
echo "========================================"
echo "测试超时: $file"
echo "原因: ${error}"
echo "运行时间: ${elapsed_ms}ms"
echo "时间: $(date '+%Y-%m-%d %H:%M:%S')"
echo "========================================"
} >> "$ERROR_LOG_FILE"
;;
OUTPUT_MISMATCH)
FAILED=$((FAILED + 1))
echo "$file" >> "$FAIL_FILE"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -124,3 +124,262 @@
./2026test/functional/87_many_params.sy
./2026test/functional/87_many_params.sy
./2026test/functional/87_many_params.sy
./2026test/functional/80_chaos_token.sy
./2026test/h_functional/14_dp.sy
./2026test/performance/01_mm1.sy
./2026test/performance/01_mm2.sy
./2026test/performance/01_mm3.sy
./2026test/performance/03_sort1.sy
./2026test/performance/03_sort2.sy
./2026test/performance/03_sort3.sy
./2026test/performance/conv2d-1.sy
./2026test/performance/conv2d-2.sy
./2026test/performance/conv2d-3.sy
./2026test/performance/crc1.sy
./2026test/performance/crc2.sy
./2026test/performance/crc3.sy
./2026test/performance/crypto-1.sy
./2026test/performance/crypto-2.sy
./2026test/performance/crypto-3.sy
./2026test/performance/fft0.sy
./2026test/performance/fft1.sy
./2026test/performance/fft2.sy
./2026test/performance/h-10-01.sy
./2026test/performance/h-10-02.sy
./2026test/performance/h-10-03.sy
./2026test/performance/h-1-01.sy
./2026test/performance/h-1-02.sy
./2026test/performance/h-1-03.sy
./2026test/performance/h-4-01.sy
./2026test/performance/h-4-02.sy
./2026test/performance/h-4-03.sy
./2026test/performance/h-5-01.sy
./2026test/performance/h-5-02.sy
./2026test/performance/h-5-03.sy
./2026test/performance/h-8-01.sy
./2026test/performance/h-8-02.sy
./2026test/performance/h-8-03.sy
./2026test/performance/h-9-01.sy
./2026test/performance/h-9-02.sy
./2026test/performance/h-9-03.sy
./2026test/performance/huffman-01.sy
./2026test/performance/huffman-02.sy
./2026test/performance/huffman-03.sy
./2026test/performance/knapsack_naive-1.sy
./2026test/performance/knapsack_naive-2.sy
./2026test/performance/knapsack_naive-3.sy
./2026test/performance/many_mat_cal-1.sy
./2026test/performance/many_mat_cal-2.sy
./2026test/performance/many_mat_cal-3.sy
./2026test/performance/matmul1.sy
./2026test/performance/matmul2.sy
./2026test/performance/matmul3.sy
./2026test/performance/optimization_scheduling1.sy
./2026test/performance/optimization_scheduling2.sy
./2026test/performance/optimization_scheduling3.sy
./2026test/performance/shuffle0.sy
./2026test/performance/shuffle1.sy
./2026test/performance/shuffle2.sy
./2026test/performance/sl1.sy
./2026test/performance/sl2.sy
./2026test/performance/sl3.sy
./2026test/performance/transpose0.sy
./2026test/performance/transpose1.sy
./2026test/performance/transpose2.sy
./2026test/functional/28_while_test3.sy
./2026test/functional/55_sort_test1.sy
./2026test/functional/56_sort_test2.sy
./2026test/functional/70_dijkstra.sy
./2026test/functional/85_long_code.sy
./2026test/functional/87_many_params.sy
./2026test/functional/89_many_globals.sy
./2026test/functional/92_register_alloc.sy
./2026test/functional/96_matrix_add.sy
./2026test/h_functional/20_sort.sy
./2026test/h_functional/27_scope5.sy
./2026test/h_functional/32_many_params3.sy
./2026test/h_functional/39_fp_params.sy
./2026test/functional/28_while_test3.sy
./2026test/functional/55_sort_test1.sy
./2026test/functional/56_sort_test2.sy
./2026test/functional/70_dijkstra.sy
./2026test/functional/85_long_code.sy
./2026test/functional/87_many_params.sy
./2026test/functional/89_many_globals.sy
./2026test/functional/92_register_alloc.sy
./2026test/functional/96_matrix_add.sy
./2026test/h_functional/20_sort.sy
./2026test/h_functional/27_scope5.sy
./2026test/h_functional/32_many_params3.sy
./2026test/h_functional/39_fp_params.sy
./2026test/functional/28_while_test3.sy
./2026test/functional/55_sort_test1.sy
./2026test/functional/56_sort_test2.sy
./2026test/functional/70_dijkstra.sy
./2026test/functional/85_long_code.sy
./2026test/functional/87_many_params.sy
./2026test/functional/89_many_globals.sy
./2026test/functional/92_register_alloc.sy
./2026test/functional/96_matrix_add.sy
./2026test/h_functional/20_sort.sy
./2026test/h_functional/27_scope5.sy
./2026test/h_functional/32_many_params3.sy
./2026test/h_functional/39_fp_params.sy
./2026test/functional/28_while_test3.sy
./2026test/functional/55_sort_test1.sy
./2026test/functional/56_sort_test2.sy
./2026test/functional/70_dijkstra.sy
./2026test/functional/85_long_code.sy
./2026test/functional/89_many_globals.sy
./2026test/functional/92_register_alloc.sy
./2026test/functional/96_matrix_add.sy
./2026test/h_functional/20_sort.sy
./2026test/h_functional/27_scope5.sy
./2026test/h_functional/32_many_params3.sy
./2026test/h_functional/39_fp_params.sy
./2026test/functional/87_many_params.sy
./2026test/functional/89_many_globals.sy
./2026test/h_functional/39_fp_params.sy
./2026test/functional/87_many_params.sy
./2026test/functional/89_many_globals.sy
./2026test/h_functional/39_fp_params.sy
./2026test/h_functional/26_scope4.sy
./2026test/h_functional/26_scope4.sy
./2026test/functional/58_sort_test4.sy
./2026test/functional/59_sort_test5.sy
./2026test/functional/60_sort_test6.sy
./2026test/functional/64_calculator.sy
./2026test/functional/89_many_globals.sy
./2026test/functional/58_sort_test4.sy
./2026test/functional/59_sort_test5.sy
./2026test/functional/60_sort_test6.sy
./2026test/functional/64_calculator.sy
./2026test/functional/89_many_globals.sy
./2026test/functional/63_big_int_mul.sy
./2026test/functional/73_int_io.sy
./2026test/functional/80_chaos_token.sy
./2026test/functional/04_arr_defn3.sy
./2026test/functional/05_arr_defn4.sy
./2026test/functional/09_func_defn.sy
./2026test/functional/28_while_test3.sy
./2026test/functional/44_stmt_expr.sy
./2026test/functional/51_short_circuit3.sy
./2026test/functional/53_scope2.sy
./2026test/functional/54_hidden_var.sy
./2026test/functional/55_sort_test1.sy
./2026test/functional/56_sort_test2.sy
./2026test/functional/57_sort_test3.sy
./2026test/functional/58_sort_test4.sy
./2026test/functional/59_sort_test5.sy
./2026test/functional/60_sort_test6.sy
./2026test/functional/62_percolation.sy
./2026test/functional/63_big_int_mul.sy
./2026test/functional/64_calculator.sy
./2026test/functional/65_color.sy
./2026test/functional/66_exgcd.sy
./2026test/functional/69_expr_eval.sy
./2026test/functional/70_dijkstra.sy
./2026test/functional/71_full_conn.sy
./2026test/functional/74_kmp.sy
./2026test/functional/75_max_flow.sy
./2026test/functional/76_n_queens.sy
./2026test/functional/77_substr.sy
./2026test/functional/79_var_name.sy
./2026test/functional/82_long_func.sy
./2026test/functional/84_long_array2.sy
./2026test/functional/85_long_code.sy
./2026test/functional/86_long_code2.sy
./2026test/functional/87_many_params.sy
./2026test/functional/88_many_params2.sy
./2026test/functional/89_many_globals.sy
./2026test/functional/90_many_locals.sy
./2026test/functional/91_many_locals2.sy
./2026test/functional/94_nested_loops.sy
./2026test/functional/96_matrix_add.sy
./2026test/functional/98_matrix_mul.sy
./2026test/functional/99_matrix_tran.sy
./2026test/h_functional/07_arr_init_nd.sy
./2026test/h_functional/09_BFS.sy
./2026test/h_functional/10_DFS.sy
./2026test/h_functional/11_BST.sy
./2026test/h_functional/13_LCA.sy
./2026test/h_functional/14_dp.sy
./2026test/h_functional/15_graph_coloring.sy
./2026test/h_functional/19_search.sy
./2026test/h_functional/23_json.sy
./2026test/h_functional/26_scope4.sy
./2026test/h_functional/27_scope5.sy
./2026test/h_functional/28_side_effect2.sy
./2026test/h_functional/29_long_line.sy
./2026test/h_functional/30_many_dimensions.sy
./2026test/h_functional/32_many_params3.sy
./2026test/h_functional/34_multi_loop.sy
./2026test/h_functional/39_fp_params.sy
./2026test/functional/64_calculator.sy
./2026test/functional/95_float.sy
./2026test/h_functional/35_math.sy
./2026test/h_functional/36_rotate.sy
./2026test/h_functional/37_dct.sy
./2026test/h_functional/38_light2d.sy
./2026test/functional/64_calculator.sy
./2026test/functional/95_float.sy
./2026test/h_functional/35_math.sy
./2026test/h_functional/36_rotate.sy
./2026test/h_functional/37_dct.sy
./2026test/h_functional/38_light2d.sy
./2026test/functional/64_calculator.sy
./2026test/functional/95_float.sy
./2026test/h_functional/35_math.sy
./2026test/h_functional/36_rotate.sy
./2026test/h_functional/37_dct.sy
./2026test/h_functional/38_light2d.sy
./2026test/functional/64_calculator.sy
./2026test/functional/95_float.sy
test_case/functional/95_float.sy
./2026test/performance/03_sort1.sy
./2026test/performance/crypto-3.sy
./2026test/performance/h-10-03.sy
./2026test/performance/h-1-01.sy
./2026test/performance/h-1-03.sy
./2026test/performance/huffman-01.sy
./2026test/performance/huffman-02.sy
./2026test/performance/huffman-03.sy
./2026test/performance/many_mat_cal-1.sy
./2026test/performance/many_mat_cal-2.sy
./2026test/performance/many_mat_cal-3.sy
./2026test/performance/h-1-01.sy
./2026test/performance/huffman-01.sy
./2026test/performance/huffman-02.sy
./2026test/performance/huffman-03.sy
./2026test/performance/many_mat_cal-1.sy
./2026test/performance/many_mat_cal-2.sy
./2026test/performance/many_mat_cal-3.sy
test_case/functional/95_float.sy
test_case/functional/95_float.sy
./2026test/functional/64_calculator.sy
./2026test/functional/95_float.sy
test/test_case/performance/vector_mul3.sy
test_case/performance/vector_mul3.sy
./2026test/functional/95_float.sy
./2026test/functional/95_float.sy
./2026test/h_functional/35_math.sy
./2026test/h_functional/38_light2d.sy
./2026test/functional/95_float.sy
./2026test/h_functional/35_math.sy
./2026test/h_functional/38_light2d.sy
./2026test/functional/95_float.sy
./2026test/h_functional/35_math.sy
./2026test/h_functional/38_light2d.sy
./2026test/h_functional/35_math.sy
./2026test/h_functional/38_light2d.sy
./2026test/functional/95_float.sy
./2026test/functional/24_if_test5.sy
./2026test/functional/52_scope.sy
./2026test/functional/53_scope2.sy
./2026test/functional/58_sort_test4.sy
./2026test/functional/59_sort_test5.sy
./2026test/functional/64_calculator.sy
./2026test/functional/68_brainfk.sy
./2026test/functional/73_int_io.sy
./2026test/functional/74_kmp.sy
./2026test/functional/76_n_queens.sy

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #3
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -13,12 +13,9 @@ b:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
adrp x13, b
ldr w8, [x13, #:lo12:b]
mov w9, #5
add w8, w9, w8
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #5
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -1,19 +1,14 @@
.data
.bss
.globl a
.p2align 2
a:
.space 400
.data
.text
.globl main
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #0
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -13,9 +13,6 @@ b:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #5
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #5
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -13,13 +13,10 @@ a:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
adrp x8, a
add x8, x8, :lo12:a
mov x9, #16
add x8, x8, x9
ldr w8, [x8]
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -1,23 +1,18 @@
.data
.bss
.globl a
.p2align 2
a:
.space 4
.data
.text
.globl func
.p2align 2
func:
.L.func.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, w0
mov w9, #1
sub w8, w8, #1
mov w0, w8
ldp x29, x30, [sp], #16
ret
.text
@ -25,14 +20,12 @@ func:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #10
adrp x13, a
str w8, [x13, #:lo12:a]
adrp x13, a
ldr w8, [x13, #:lo12:a]
mov w9, #1
sub w8, w8, #1
mov w0, w8
bl func
mov w8, w0
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,11 +3,8 @@
.p2align 2
defn:
.L.defn.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #4
mov w0, w8
ldp x29, x30, [sp], #16
ret
.text
@ -15,10 +12,6 @@ defn:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
bl defn
mov w8, w0
mov w8, #4
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #9
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -9,9 +9,6 @@ a:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #15
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -9,9 +9,6 @@ a:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #-8
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #8
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #50
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -9,9 +9,6 @@ a:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #25
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #2
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -9,9 +9,6 @@ a:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #2
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #3
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #1
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,51 +3,46 @@
.p2align 2
ifElseIf:
.L.ifElseIf.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w9, #0
mov w8, #0
cmp w9, w8
b.ne .L.ifElseIf.1
b .L.ifElseIf.4
.L.ifElseIf.10:
mov w8, #-5
b .L.ifElseIf.11
.L.ifElseIf.11:
b .L.ifElseIf.7
.L.ifElseIf.7:
b .L.ifElseIf.3
.L.ifElseIf.3:
.L.ifElseIf.9:
mov w8, #-5
b .L.ifElseIf.10
.L.ifElseIf.10:
b .L.ifElseIf.6
.L.ifElseIf.6:
mov w0, w8
ldp x29, x30, [sp], #16
ret
.L.ifElseIf.6:
.L.ifElseIf.5:
mov w9, #1
mov w8, #0
cmp w9, w8
b.eq .L.ifElseIf.10
.L.ifElseIf.12:
b.eq .L.ifElseIf.9
.L.ifElseIf.11:
mov w9, #0
mov w8, #0
cmp w9, w8
b.eq .L.ifElseIf.10
.L.ifElseIf.9:
b.eq .L.ifElseIf.9
.L.ifElseIf.8:
mov w8, #20
b .L.ifElseIf.11
b .L.ifElseIf.10
.L.ifElseIf.2:
mov w8, #1
mov w9, #0
cmp w8, w9
b.eq .L.ifElseIf.6
.L.ifElseIf.8:
b.eq .L.ifElseIf.5
.L.ifElseIf.7:
mov w8, #0
mov w9, #0
cmp w8, w9
b.eq .L.ifElseIf.6
.L.ifElseIf.5:
mov w8, #25
b .L.ifElseIf.7
b.eq .L.ifElseIf.5
.L.ifElseIf.4:
mov w8, #25
b .L.ifElseIf.6
.L.ifElseIf.3:
mov w9, #0
mov w8, #0
cmp w9, w8
@ -55,7 +50,6 @@ ifElseIf:
.L.ifElseIf.1:
mov w8, #5
mov w0, w8
ldp x29, x30, [sp], #16
ret
.text

@ -3,8 +3,6 @@
.p2align 2
ififElse:
.L.ififElse.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #1
mov w9, #0
cmp w8, w9
@ -18,7 +16,6 @@ ififElse:
b .L.ififElse.2
.L.ififElse.2:
mov w0, w8
ldp x29, x30, [sp], #16
ret
.L.ififElse.1:
mov w8, #1

@ -3,8 +3,6 @@
.p2align 2
if_ifElse_:
.L.if_ifElse_.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #1
mov w9, #0
cmp w8, w9
@ -18,7 +16,6 @@ if_ifElse_:
b .L.if_ifElse_.2
.L.if_ifElse_.2:
mov w0, w8
ldp x29, x30, [sp], #16
ret
.L.if_ifElse_.1:
mov w8, #1

@ -3,30 +3,17 @@
.p2align 2
if_if_Else:
.L.if_if_Else.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #1
mov w9, #0
cmp w8, w9
b.eq .L.if_if_Else.2
.L.if_if_Else.1:
mov w8, #1
mov w9, #0
cmp w8, w9
b.ne .L.if_if_Else.4
mov w8, #5
b .L.if_if_Else.5
.L.if_if_Else.4:
mov w8, #25
b .L.if_if_Else.5
.L.if_if_Else.5:
b.ne .L.if_if_Else.1
.L.if_if_Else.2:
b .L.if_if_Else.3
.L.if_if_Else.3:
mov w8, #20
mov w0, w8
ldp x29, x30, [sp], #16
ret
.L.if_if_Else.2:
mov w8, #20
.L.if_if_Else.1:
b .L.if_if_Else.3
.text

@ -3,12 +3,9 @@
.p2align 2
get_one:
.L.get_one.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, w0
mov w8, #1
mov w0, w8
ldp x29, x30, [sp], #16
ret
.text
@ -22,48 +19,37 @@ deepWhileBr:
str x19, [sp, #0]
mov w9, w0
mov w8, w1
add w9, w9, w8
add w8, w9, w8
b .L.deepWhileBr.1
.L.deepWhileBr.9:
b .L.deepWhileBr.7
.L.deepWhileBr.7:
b .L.deepWhileBr.5
.L.deepWhileBr.5:
mov w9, w8
mov w8, w19
b .L.deepWhileBr.1
.L.deepWhileBr.1:
mov w8, #75
cmp w9, w8
mov w9, #75
cmp w8, w9
b.ge .L.deepWhileBr.3
.L.deepWhileBr.2:
mov w8, #100
cmp w9, w8
mov w9, #100
cmp w8, w9
b.lt .L.deepWhileBr.4
mov w8, w9
mov w19, w8
b .L.deepWhileBr.5
.L.deepWhileBr.4:
mov w8, #42
add w19, w9, #42
mov w9, #42
add w19, w8, #42
mov w8, #99
cmp w19, w8
b.gt .L.deepWhileBr.6
mov w8, w19
b .L.deepWhileBr.7
b.le .L.deepWhileBr.7
.L.deepWhileBr.6:
mov w8, #0
mov w0, w8
bl get_one
mov w9, w0
mov w8, #1
cmp w9, w8
b.eq .L.deepWhileBr.8
mov w8, w19
b .L.deepWhileBr.9
.L.deepWhileBr.8:
mov w8, #168
b .L.deepWhileBr.9
mov w8, w0
b .L.deepWhileBr.7
.L.deepWhileBr.3:
mov w0, w9
mov w0, w8
ldr x19, [sp, #0]
add sp, sp, #32
ldp x29, x30, [sp], #16

@ -3,8 +3,6 @@
.p2align 2
doubleWhile:
.L.doubleWhile.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #7
mov w9, #5
b .L.doubleWhile.1
@ -32,7 +30,6 @@ doubleWhile:
b .L.doubleWhile.4
.L.doubleWhile.3:
mov w0, w8
ldp x29, x30, [sp], #16
ret
.text

@ -3,8 +3,6 @@
.p2align 2
FourWhile:
.L.FourWhile.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w9, #10
mov w10, #7
mov w11, #6
@ -65,7 +63,6 @@ FourWhile:
add w8, w12, w8
add w8, w8, w10
mov w0, w8
ldp x29, x30, [sp], #16
ret
.text

@ -1,28 +1,20 @@
.data
.bss
.globl g
.p2align 2
g:
.space 4
.data
.bss
.globl h
.p2align 2
h:
.space 4
.data
.bss
.globl f
.p2align 2
f:
.space 4
.data
.bss
.globl e
.p2align 2
e:
.space 4
.data
.text
.globl EightWhile

@ -3,8 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w9, #0
mov w8, w9
b .L.main.1
@ -25,5 +23,4 @@ main:
b .L.main.3
.L.main.3:
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,8 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w9, #0
mov w8, w9
b .L.main.1
@ -27,5 +25,4 @@ main:
b .L.main.1
.L.main.3:
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,13 +3,10 @@
.p2align 2
whileIf:
.L.whileIf.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w9, #0
mov w8, w9
b .L.whileIf.1
.L.whileIf.8:
mov w8, #2
lsl w8, w9, #1
b .L.whileIf.9
.L.whileIf.9:
@ -38,7 +35,6 @@ whileIf:
b .L.whileIf.9
.L.whileIf.3:
mov w0, w8
ldp x29, x30, [sp], #16
ret
.text

@ -3,15 +3,12 @@
.p2align 2
ifWhile:
.L.ifWhile.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w9, #0
mov w8, #0
cmp w9, w8
mov w9, #0
cmp w8, w9
b.ne .L.ifWhile.1
b .L.ifWhile.2
.L.ifWhile.8:
mov w8, #2
lsl w10, w10, #1
mov w8, #1
add w8, w9, #1
@ -26,7 +23,6 @@ ifWhile:
b .L.ifWhile.3
.L.ifWhile.3:
mov w0, w8
ldp x29, x30, [sp], #16
ret
.L.ifWhile.5:
mov w8, #2

@ -3,17 +3,10 @@
.p2align 2
deepWhileBr:
.L.deepWhileBr.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, w0
mov w9, w1
add w8, w8, w9
b .L.deepWhileBr.1
.L.deepWhileBr.8:
b .L.deepWhileBr.9
.L.deepWhileBr.9:
mov w9, #168
b .L.deepWhileBr.7
.L.deepWhileBr.7:
b .L.deepWhileBr.5
.L.deepWhileBr.5:
@ -36,10 +29,9 @@ deepWhileBr:
cmp w9, w8
b.le .L.deepWhileBr.7
.L.deepWhileBr.6:
b .L.deepWhileBr.8
b .L.deepWhileBr.7
.L.deepWhileBr.3:
mov w0, w8
ldp x29, x30, [sp], #16
ret
.text

@ -14,8 +14,6 @@ arr:
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w9, #0
mov w8, w9
b .L.main.1
@ -33,5 +31,4 @@ main:
b.lt .L.main.2
.L.main.3:
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #40
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #24
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #40
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -1,34 +1,24 @@
.data
.bss
.globl a
.p2align 2
a:
.space 4
.data
.bss
.globl b
.p2align 2
b:
.space 4
.data
.bss
.globl c
.p2align 2
c:
.space 4
.data
.bss
.globl d
.p2align 2
d:
.space 4
.data
.bss
.globl e
.p2align 2
e:
.space 4
.data
.text
.globl main
@ -58,20 +48,20 @@ main:
adrp x13, e
str w8, [x13, #:lo12:e]
adrp x13, a
ldr w8, [x13, #:lo12:a]
ldr w11, [x13, #:lo12:a]
adrp x13, b
ldr w9, [x13, #:lo12:b]
ldr w8, [x13, #:lo12:b]
adrp x13, c
ldr w10, [x13, #:lo12:c]
mul w9, w9, w10
sub w9, w8, w9
adrp x13, d
ldr w11, [x13, #:lo12:d]
sdiv w8, w8, w10
ldr w9, [x13, #:lo12:c]
mul w8, w8, w9
sub w8, w11, w8
cmp w9, w8
adrp x13, d
ldr w10, [x13, #:lo12:d]
sdiv w9, w11, w9
sub w9, w10, w9
cmp w8, w9
b.ne .L.main.1
.L.main.4:
.L.main.3:
adrp x13, a
ldr w8, [x13, #:lo12:a]
adrp x13, b
@ -86,8 +76,9 @@ main:
ldr w10, [x13, #:lo12:d]
add w9, w9, w10
cmp w8, w9
b.eq .L.main.1
.L.main.3:
b.ne .L.main.2
.L.main.1:
.L.main.2:
adrp x13, a
ldr w8, [x13, #:lo12:a]
adrp x13, b
@ -102,13 +93,9 @@ main:
ldr w10, [x13, #:lo12:e]
add w9, w9, w10
cmp w8, w9
b.eq .L.main.1
mov w8, #0
b .L.main.2
.L.main.1:
mov w8, #1
b .L.main.2
.L.main.2:
cset w8, eq
mov w9, #0
add w8, w9, w8, lsl #0
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -1,14 +1,13 @@
.data
.globl a
.p2align 2
a:
.word 1
.bss
.globl b
.p2align 2
b:
.space 4
.data
.globl a
.p2align 2
a:
.word 1
.globl c
.p2align 2
c:
@ -45,14 +44,13 @@ main:
ldr w8, [x13, #:lo12:d]
add w8, w9, w8
cmp w10, w8
b.ne .L.main.3
.L.main.4:
b.ne .L.main.2
.L.main.3:
adrp x13, a
ldr w10, [x13, #:lo12:a]
adrp x13, b
ldr w8, [x13, #:lo12:b]
add w9, w10, w8
mul w8, w10, w9
adrp x13, c
ldr w8, [x13, #:lo12:c]
madd w10, w10, w9, w8
@ -62,8 +60,9 @@ main:
ldr w8, [x13, #:lo12:e]
add w8, w9, w8
cmp w10, w8
b.le .L.main.1
.L.main.3:
b.gt .L.main.2
.L.main.1:
.L.main.2:
adrp x13, a
ldr w12, [x13, #:lo12:a]
adrp x13, b
@ -77,13 +76,9 @@ main:
sdiv w8, w12, w11
sub w8, w9, w8
cmp w10, w8
b.eq .L.main.1
mov w19, #0
b .L.main.2
.L.main.1:
mov w19, #1
b .L.main.2
.L.main.2:
cset w9, eq
mov w8, #0
add w19, w8, w9, lsl #0
mov w0, w19
bl putint
mov w0, w19

@ -3,8 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #0
mov w9, #0
cmp w8, #0
@ -20,7 +18,6 @@ main:
b .L.main.3
.L.main.3:
mov w0, w8
ldp x29, x30, [sp], #16
ret
.L.main.1:
mov w8, #-1

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #21
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -1,16 +1,12 @@
.data
.bss
.globl a
.p2align 2
a:
.space 4
.data
.bss
.globl b
.p2align 2
b:
.space 4
.data
.text
.globl main

@ -1,4 +1,3 @@
.data
.bss
.globl k
.p2align 2

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #5
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #15
mov w0, w8
ldp x29, x30, [sp], #16
ret

@ -3,9 +3,6 @@
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #88
mov w0, w8
ldp x29, x30, [sp], #16
ret

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save