Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 112 additions & 50 deletions PudgeWithMoML/bin/run.t

Large diffs are not rendered by default.

62 changes: 43 additions & 19 deletions PudgeWithMoML/bin/run_after_ll.t
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
addi fp, sp, 32
ld t0, 16(fp)
ld t1, 0(fp)
srai t0, t0, 1
srai t1, t1, 1
mul t0, t0, t1
slli t0, t0, 1
ori t0, t0, 1
sd t0, -24(fp)
# Apply k__4 with 1 args
ld t0, 8(fp)
Expand All @@ -59,7 +63,7 @@
addi sp, sp, -32
ld t0, -32(fp)
sd t0, 0(sp)
li t0, 1
li t0, 3
sd t0, 8(sp)
ld t0, -24(fp)
sd t0, 16(sp)
Expand All @@ -80,7 +84,7 @@
sd fp, 32(sp)
addi fp, sp, 48
ld t0, 0(fp)
li t1, 1
li t1, 3
sub t0, t0, t1
seqz t0, t0
sd t0, -24(fp)
Expand All @@ -93,9 +97,9 @@
addi sp, sp, -32
ld t0, -32(fp)
sd t0, 0(sp)
li t0, 1
li t0, 3
sd t0, 8(sp)
li t0, 1
li t0, 3
sd t0, 16(sp)
# End loading args on stack
call apply_closure
Expand All @@ -106,8 +110,12 @@
j L3
L2:
ld t0, 0(fp)
li t1, 1
li t1, 3
srai t0, t0, 1
srai t1, t1, 1
sub t0, t0, t1
slli t0, t0, 1
ori t0, t0, 1
sd t0, -40(fp)
# Partial application fresh_1__2 with 2 args
# Load args on stack
Expand All @@ -121,7 +129,7 @@
mv t0, a0
addi sp, sp, 16
sd t0, 0(sp)
li t0, 2
li t0, 5
sd t0, 8(sp)
ld t0, 0(fp)
sd t0, 16(sp)
Expand Down Expand Up @@ -156,11 +164,13 @@
.globl _start
_start:
mv fp, sp
mv a0, sp
call init_GC
addi sp, sp, -16
# Apply fac_cps__6 with 2 args
# Load args on stack
addi sp, sp, -16
li t0, 4
li t0, 9
sd t0, 0(sp)
addi sp, sp, -16
la t5, id__0
Expand All @@ -185,7 +195,7 @@
mv t0, a0
# End Apply print_int
sd t0, -16(fp)
li t0, 0
li t0, 1
la t1, main__9
sd t0, 0(t1)
call flush
Expand Down Expand Up @@ -253,7 +263,11 @@
addi fp, sp, 32
ld t0, 0(fp)
ld t1, 16(fp)
srai t0, t0, 1
srai t1, t1, 1
add t0, t0, t1
slli t0, t0, 1
ori t0, t0, 1
sd t0, -24(fp)
# Apply k__4 with 1 args
ld t0, 8(fp)
Expand All @@ -262,7 +276,7 @@
addi sp, sp, -32
ld t0, -32(fp)
sd t0, 0(sp)
li t0, 1
li t0, 3
sd t0, 8(sp)
ld t0, -24(fp)
sd t0, 16(sp)
Expand All @@ -283,8 +297,12 @@
sd fp, 32(sp)
addi fp, sp, 48
ld t0, 0(fp)
li t1, 2
li t1, 5
srai t0, t0, 1
srai t1, t1, 1
sub t0, t0, t1
slli t0, t0, 1
ori t0, t0, 1
sd t0, -24(fp)
# Partial application fresh_2__2 with 2 args
# Load args on stack
Expand All @@ -298,7 +316,7 @@
mv t0, a0
addi sp, sp, 16
sd t0, 0(sp)
li t0, 2
li t0, 5
sd t0, 8(sp)
ld t0, 24(fp)
sd t0, 16(sp)
Expand All @@ -319,7 +337,7 @@
addi sp, sp, -32
ld t0, -40(fp)
sd t0, 0(sp)
li t0, 1
li t0, 3
sd t0, 8(sp)
ld t0, -24(fp)
sd t0, 16(sp)
Expand All @@ -334,7 +352,7 @@
addi sp, sp, -32
ld t0, -48(fp)
sd t0, 0(sp)
li t0, 1
li t0, 3
sd t0, 8(sp)
ld t0, -32(fp)
sd t0, 16(sp)
Expand All @@ -355,7 +373,7 @@
sd fp, 32(sp)
addi fp, sp, 48
ld t0, 0(fp)
li t1, 2
li t1, 5
slt t0, t0, t1
sd t0, -24(fp)
ld t0, -24(fp)
Expand All @@ -367,7 +385,7 @@
addi sp, sp, -32
ld t0, -32(fp)
sd t0, 0(sp)
li t0, 1
li t0, 3
sd t0, 8(sp)
ld t0, 0(fp)
sd t0, 16(sp)
Expand All @@ -380,8 +398,12 @@
j L5
L4:
ld t0, 0(fp)
li t1, 1
li t1, 3
srai t0, t0, 1
srai t1, t1, 1
sub t0, t0, t1
slli t0, t0, 1
ori t0, t0, 1
sd t0, -40(fp)
# Partial application fresh_1__6 with 3 args
# Load args on stack
Expand All @@ -395,7 +417,7 @@
mv t0, a0
addi sp, sp, 16
sd t0, 0(sp)
li t0, 3
li t0, 7
sd t0, 8(sp)
ld t0, 0(fp)
sd t0, 16(sp)
Expand Down Expand Up @@ -439,11 +461,13 @@
.globl _start
_start:
mv fp, sp
mv a0, sp
call init_GC
addi sp, sp, -24
# Apply fib__11 with 2 args
# Load args on stack
addi sp, sp, -16
li t0, 6
li t0, 13
sd t0, 0(sp)
addi sp, sp, -16
la t5, id__0
Expand All @@ -470,7 +494,7 @@
sd t0, -16(fp)
ld t0, -16(fp)
sd t0, -24(fp)
li t0, 0
li t0, 1
la t1, main__14
sd t0, 0(t1)
call flush
Expand Down
Loading