diff options
| author | David Rubin <daviru007@icloud.com> | 2024-03-13 19:26:10 -0700 |
|---|---|---|
| committer | David Rubin <daviru007@icloud.com> | 2024-05-11 02:17:11 -0700 |
| commit | 060c475fcd358eb9d05d14ec9f1bb7bfc47e4423 (patch) | |
| tree | c203f555ba0eba4d7edffd3a9ce6cc121fc900df /src | |
| parent | 5e770407cf50ae8cd103644c8ca297da52adb5b8 (diff) | |
| download | zig-060c475fcd358eb9d05d14ec9f1bb7bfc47e4423.tar.gz zig-060c475fcd358eb9d05d14ec9f1bb7bfc47e4423.zip | |
riscv: update `start.zig` and restore ra from the proper stack offset
Diffstat (limited to 'src')
| -rw-r--r-- | src/arch/riscv64/Emit.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/riscv64/Emit.zig b/src/arch/riscv64/Emit.zig index 3cdf3ce48e..a82d5fb602 100644 --- a/src/arch/riscv64/Emit.zig +++ b/src/arch/riscv64/Emit.zig @@ -287,7 +287,7 @@ fn mirPsuedo(emit: *Emit, inst: Mir.Inst.Index) !void { }; // Restore ra - try emit.writeInstruction(Instruction.ld(.ra, stack_size - 16, .sp)); + try emit.writeInstruction(Instruction.ld(.ra, stack_size - 8, .sp)); // Restore s0 try emit.writeInstruction(Instruction.ld(.s0, stack_size - 16, .sp)); |
