diff options
Diffstat (limited to 'rts.ll')
| -rw-r--r-- | rts.ll | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -67,7 +67,7 @@ define private i64** @fillI_b(i64 %b_offset, i64 %a_offset, i64* %bsp.0, i64** % ret i64** %asp.0 } -define private i64** @jsr_eval(i64 %n, i64** %asp.0, i64** %aspstart, i64** %globasp.0) #0 { +define private i64* @jsr_eval(i64 %n, i64** %asp.0, i64** %aspstart, i64** %globasp.0, i64* %hp.0) #0 { ; TODO in case %n != 0 do we need to push it to the top of the stack? %asp.1 = getelementptr i64*, i64** %asp.0, i64 %n @@ -79,14 +79,16 @@ define private i64** @jsr_eval(i64 %n, i64** %asp.0, i64** %aspstart, i64** %glo br i1 %t.1, label %eval, label %done done: - ret i64** %asp.0 + ret i64* %hp.0 eval: %globasp.1 = call i64** @_push_local_astack(i64** %asp.0, i64** %aspstart, i64** %globasp.0) - %nentry.0 = inttoptr i64 %d.0 to i64*(i64*, i64**)* - %n.1 = call i64* %nentry.0(i64* %n.0, i64** %globasp.1) + %nentry.0 = inttoptr i64 %d.0 to {i64*, i64*} (i64*, i64**, i64*)* + %t.2 = call {i64*, i64*} %nentry.0(i64* %n.0, i64** %globasp.1, i64* %hp.0) + %n.1 = extractvalue {i64*, i64*} %t.2, 0 + %hp.1 = extractvalue {i64*, i64*} %t.2, 1 store i64* %n.1, i64** %asp.1 - ret i64** %asp.0 + ret i64* %hp.1 } define private i64* @ltI(i64* %bsp.0) #0 { @@ -144,7 +146,7 @@ done: ret i64** %asp.1 loop.0: - %n.1 = getelementptr i64, i64* %n.0, i64 %arity + %n.1 = getelementptr i64, i64* %n.0, i64 %arity.0 %n.2 = load i64, i64* %n.1 %n.3 = inttoptr i64 %n.2 to i64* %asp.2 = getelementptr i64*, i64** %asp.1, i64 1 @@ -207,9 +209,9 @@ define private i64 @peek_b(i64* %bsp) #0 { } @INT = constant {i64, i64, i64*, i64, i8, i8, i8} - {i64 0, i64 0, i64* inttoptr (i64 0 to i64*), i64 3, i8 73, i8 78, i8 84} + {i64 0, i64 0, i64* inttoptr (i64 0 to i64*), i64 3, i8 73, i8 78, i8 84}, align 8 -define i64* @_cycle_in_spine(i64** %globasp) prefix {i8*, i64} {i8* inttoptr (i64 0 to i8*), i64 0} { +define {i64*,i64*} @_cycle_in_spine(i64** %globasp, i64* %hp.0) align 8 prefix {i8*, i64} {i8* inttoptr (i64 0 to i8*), i64 0} { call i64 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @printf_cycle, i64 0, i64 0)) unreachable } |
