mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
Added stack alignment check, fixed Makefile to build target in x86-64 mode
This commit is contained in:
parent
2dadccc71f
commit
f6516bae63
2 changed files with 9 additions and 8 deletions
|
|
@ -14,6 +14,7 @@ extern size_t __gc_stack_top, __gc_stack_bottom;
|
|||
flag = __gc_stack_top == 0; \
|
||||
if (flag) { __gc_stack_top = (size_t)__builtin_frame_address(0); } \
|
||||
assert(__gc_stack_top != 0); \
|
||||
assert(__gc_stack_top & 0xF == 0); \
|
||||
assert(__builtin_frame_address(0) <= (void *)__gc_stack_top);
|
||||
|
||||
#define POST_GC() \
|
||||
|
|
@ -238,15 +239,15 @@ extern aint LtagHash (char *s) {
|
|||
p++;
|
||||
}
|
||||
|
||||
if (strncmp(s, de_hash(h), 5) != 0) { failure("%s <-> %s\n", s, de_hash(h)); }
|
||||
if (strncmp(s, de_hash(h), MAX_SEXP_TAG_LEN) != 0) { failure("%s <-> %s\n", s, de_hash(h)); }
|
||||
|
||||
return BOX(h);
|
||||
}
|
||||
|
||||
char *de_hash (aint n) {
|
||||
static char buf[6] = {0, 0, 0, 0, 0, 0};
|
||||
static char buf[MAX_SEXP_TAG_LEN + 1] = {0, 0, 0, 0, 0, 0};
|
||||
char *p = (char *)BOX(NULL);
|
||||
p = &buf[5];
|
||||
p = &buf[MAX_SEXP_TAG_LEN];
|
||||
|
||||
*p-- = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue