diff options
| author | bors <bors@rust-lang.org> | 2013-05-17 18:19:27 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-17 18:19:27 -0700 |
| commit | d68c0279eadc8544a1e3c1d9077185500a36ae66 (patch) | |
| tree | 9f1c22f6d98d4619ac63350828d584b9924582a8 /src/rt/arch | |
| parent | 2d28d645422c1617be58c8ca7ad9a457264ca850 (diff) | |
| parent | 48b6262b383365b7319ef76fa9c6d2c63c4d70e1 (diff) | |
| download | rust-d68c0279eadc8544a1e3c1d9077185500a36ae66.tar.gz rust-d68c0279eadc8544a1e3c1d9077185500a36ae66.zip | |
auto merge of #6249 : crabtw/rust/arm, r=brson
It uses the private field of TCB head to store stack limit. I tested on my Raspberry PI. A simple hello world program ran without any problem. However, for a more complex program, it segfaulted as #6231.
Diffstat (limited to 'src/rt/arch')
| -rw-r--r-- | src/rt/arch/arm/record_sp.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rt/arch/arm/record_sp.S b/src/rt/arch/arm/record_sp.S index 95fce8746a1..8d5f24bc5a8 100644 --- a/src/rt/arch/arm/record_sp.S +++ b/src/rt/arch/arm/record_sp.S @@ -15,13 +15,21 @@ record_sp_limit: mrc p15, #0, r3, c13, c0, #3 +#if __ANDROID__ add r3, r3, #252 +#elif __linux__ + add r3, r3, #4 +#endif str r0, [r3] mov pc, lr get_sp_limit: mrc p15, #0, r3, c13, c0, #3 +#if __ANDROID__ add r3, r3, #252 +#elif __linux__ + add r3, r3, #4 +#endif ldr r0, [r3] mov pc, lr |
