forked from UpsilonNumworks/Upsilon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ion] Set stack pointer when testing as well
Change-Id: Ibeae7961535208c224f9ac51f4cf33e3978665b3
- Loading branch information
1 parent
e199143
commit 688394a
Showing
5 changed files
with
35 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include <ion.h> | ||
|
||
namespace Ion { | ||
|
||
#if PLATFORM_DEVICE | ||
// On device, stack start address is always known. TODO : Factorize address | ||
static void * s_stackStart = reinterpret_cast<void *>(0x20000000 + 256*1024); | ||
#else | ||
// Stack start will be defined in ion_main. | ||
static void * s_stackStart = nullptr; | ||
#endif | ||
|
||
void * stackStart() { | ||
assert(s_stackStart != nullptr); | ||
return s_stackStart; | ||
} | ||
|
||
void setStackStart(void * pointer) { | ||
assert(pointer != nullptr); | ||
s_stackStart = pointer; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters