Skip to content

Commit

Permalink
Unbreak or1k.
Browse files Browse the repository at this point in the history
close #53
  • Loading branch information
whitequark authored and edef1c committed Sep 22, 2016
1 parent d7329b6 commit 5608d2d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/arch/or1k.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
// * The 1st init trampoline tells the unwinder to restore r2 and r9
// from the stack frame at r2 (in the parent stack), thus continuing
// unwinding at the swap call site instead of falling off the end of context stack.
use core::mem;
use stack::Stack;

pub const STACK_ALIGNMENT: usize = 4;
Expand Down Expand Up @@ -101,11 +102,11 @@ pub unsafe fn init(stack: &Stack, f: unsafe extern "C" fn(usize, StackPointer) -
# doesn't point to the start of the symbol. This confuses gdb's backtraces,
# causing them to think the parent function is trampoline_1 instead of
# trampoline_2.
nop
l.nop
# Call the provided function.
l.lwz r4, 8(r1)
l.jalr r4
l.lwz r5, 8(r1)
l.jalr r5
l.nop
"#
: : : : "volatile")
Expand Down

0 comments on commit 5608d2d

Please sign in to comment.