Raymond Toy pushed to branch native-image at cmucl / cmucl
Commits:
-
f6b1c916
by Raymond Toy at 2021-01-26T21:36:17-08:00
1 changed file:
Changes:
... | ... | @@ -26,6 +26,9 @@ |
26 | 26 |
#include "gencgc.h"
|
27 | 27 |
#endif
|
28 | 28 |
|
29 |
+/* Like (ceiling x y), but y is constrained to be a power of two */
|
|
30 |
+#define CEILING(x,y) (((x) + ((y) - 1)) & (~((y) - 1)))
|
|
31 |
+ |
|
29 | 32 |
#ifdef FEATURE_EXECUTABLE
|
30 | 33 |
#include "elf.h"
|
31 | 34 |
#if !(defined(DARWIN) && defined(__ppc__))
|
... | ... | @@ -454,6 +457,7 @@ int |
454 | 457 |
asm_boxed(lispobj* ptr, lispobj object, FILE* f)
|
455 | 458 |
{
|
456 | 459 |
int len = 1 + HeaderValue(object);
|
460 |
+ len = CEILING(len, 2);
|
|
457 | 461 |
int k;
|
458 | 462 |
|
459 | 463 |
asm_label(ptr, object, f);
|
... | ... | @@ -464,8 +468,6 @@ asm_boxed(lispobj* ptr, lispobj object, FILE* f) |
464 | 468 |
asm_lispobj(ptr + k, ptr[k], f);
|
465 | 469 |
}
|
466 | 470 |
|
467 |
- asm_align(f);
|
|
468 |
-
|
|
469 | 471 |
return len;
|
470 | 472 |
}
|
471 | 473 |
|
... | ... | @@ -535,6 +537,7 @@ asm_simple_vector(lispobj* ptr, lispobj object, FILE* f) |
535 | 537 |
{
|
536 | 538 |
int k;
|
537 | 539 |
int len = ptr[1] >> 2;
|
540 |
+ len = CEILING(len, 2);
|
|
538 | 541 |
lispobj* data = ptr + 2;
|
539 | 542 |
|
540 | 543 |
asm_label(ptr, object, f);
|