Sparc support proposal. (#264)

* Sparc support proposal.

* Tweaks from feedback.
Shift to integer/pointers cast like other archs.
Assembly reworks.
Note apparently reading the register once is sufficient to provoke
a pause in the cpu adding a clobber tough.
This commit is contained in:
David CARLIER
2021-01-05 16:28:22 +00:00
committed by GitHub
parent 975a2bd6db
commit 2dd63606af
5 changed files with 72 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ namespace snmalloc
static constexpr uint64_t pal_features = PALPOSIX::pal_features;
static constexpr size_t page_size =
Aal::aal_name == PowerPC ? 0x10000 : 0x1000;
Aal::aal_name == PowerPC ? 0x10000 : PALPOSIX::page_size;
/**
* OS specific function for zeroing memory.

View File

@@ -39,7 +39,7 @@ namespace snmalloc
*/
static constexpr uint64_t pal_features = 0;
static constexpr size_t page_size = 0x1000;
static constexpr size_t page_size = Aal::smallest_page_size;
[[noreturn]] static void error(const char* const str)
{

View File

@@ -98,7 +98,7 @@ namespace snmalloc
*/
static constexpr uint64_t pal_features = LazyCommit;
static constexpr size_t page_size = 0x1000;
static constexpr size_t page_size = Aal::smallest_page_size;
static void print_stack_trace()
{