Skip to content

Commit d0f3867

Browse files
committed
---
yaml --- r: 60604 b: refs/heads/auto c: 499b022 h: refs/heads/master v: v3
1 parent 2b9628d commit d0f3867

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
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 15e44381af4f6d89fc62111a8425087ccab40665
17+
refs/heads/auto: 499b02213d7de83d301918d6068c75bd08941ac7
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libcore/rt/context.rs

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

166166
#[cfg(target_arch = "arm")]
167167
fn initialize_call_frame(regs: &mut Registers, fptr: *c_void, arg: *c_void, sp: *mut uint) {
168-
let sp = mut_offset(sp, -1);
168+
let sp = align_down(sp);
169+
// sp of arm eabi is 8-byte aligned
170+
let sp = mut_offset(sp, -2);
169171

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

branches/auto/src/rt/arch/arm/context.cpp

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

2727
// set up the stack
2828
uint32_t *sp = ( uint32_t *)stack;
29-
//sp = align_down(sp);
29+
sp = align_down(sp);
3030
// The final return address. 0 indicates the bottom of the stack
31-
*--sp = 0;
31+
// sp of arm eabi is 8-byte aligned
32+
sp -= 2;
33+
*sp = 0;
3234

3335
regs.data[0] = ( uint32_t )arg; // r0
3436
regs.data[13] = ( uint32_t )sp; //#52 sp, r13

0 commit comments

Comments
 (0)