Skip to content

Commit bc1db1a

Browse files
committed
---
yaml --- r: 73320 b: refs/heads/dist-snap c: dc7b83d h: refs/heads/master v: v3
1 parent a41319c commit bc1db1a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 329d8e2622754778758cf7eaafae9c71e9351e17
10+
refs/heads/dist-snap: dc7b83d18659503f47ae622918c3576d430a926e
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libcore/rt/context.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ fn new_regs() -> ~Registers { ~([0, .. 32]) }
183183

184184
#[cfg(target_arch = "mips")]
185185
fn initialize_call_frame(regs: &mut Registers, fptr: *c_void, arg: *c_void, sp: *mut uint) {
186-
let sp = mut_offset(sp, -1);
186+
let sp = align_down(sp);
187+
// sp of mips o32 is 8-byte aligned
188+
let sp = mut_offset(sp, -2);
187189

188190
// The final return address. 0 indicates the bottom of the stack
189191
unsafe { *sp = 0; }

branches/dist-snap/src/rt/arch/mips/context.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ void context::call(void *f, void *arg, void *stack)
3434

3535
// set up the stack
3636
uint32_t *sp = (uint32_t *)stack;
37-
//sp = align_down(sp);
37+
sp = align_down(sp);
3838
// The final return address. 0 indicates the bottom of the stack
39-
*--sp = 0;
39+
// sp of mips o32 is 8-byte aligned
40+
sp -= 2;
41+
*sp = 0;
4042

4143
regs.data[4] = (uint32_t)arg;
4244
regs.data[29] = (uint32_t)sp;

0 commit comments

Comments
 (0)