File tree 3 files changed +13
-3
lines changed 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 19
19
#include <setjmp.h>
20
20
#ifndef _OS_WINDOWS_
21
21
# define jl_jmp_buf sigjmp_buf
22
- # if defined(_CPU_ARM_ )
22
+ # if defined(_CPU_ARM_ ) || defined( _CPU_PPC_ )
23
23
# define MAX_ALIGN 8
24
24
# elif defined(_CPU_AARCH64_ )
25
25
// int128 is 16 bytes aligned on aarch64
Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ void *jl_gc_perm_alloc(size_t sz);
54
54
static const int jl_gc_sizeclasses [JL_GC_N_POOLS ] = {
55
55
#ifdef _P64
56
56
8 ,
57
+ #elif defined(_CPU_ARM_ ) || defined (_CPU_PPC_ )
58
+ // ARM and PowerPC has max alignment of 8,
59
+ // make sure allocation of size 8 has that alignment.
60
+ 4 , 8 ,
57
61
#else
58
62
4 , 8 , 12 ,
59
63
#endif
@@ -87,6 +91,10 @@ STATIC_INLINE int JL_CONST_FUNC jl_gc_szclass(size_t sz)
87
91
if (sz <= 8 )
88
92
return 0 ;
89
93
const int N = 0 ;
94
+ #elif defined(_CPU_ARM_ ) || defined(_CPU_PPC_ )
95
+ if (sz <= 8 )
96
+ return (sz + 3 ) / 4 - 1 ;
97
+ const int N = 1 ;
90
98
#else
91
99
if (sz <= 12 )
92
100
return (sz + 3 ) / 4 - 1 ;
Original file line number Diff line number Diff line change @@ -55,9 +55,11 @@ typedef struct {
55
55
56
56
// variables for allocating objects from pools
57
57
#ifdef _P64
58
- #define JL_GC_N_POOLS 41
58
+ # define JL_GC_N_POOLS 41
59
+ #elif defined(_CPU_ARM_) || defined(_CPU_PPC_)
60
+ # define JL_GC_N_POOLS 42
59
61
#else
60
- #define JL_GC_N_POOLS 43
62
+ # define JL_GC_N_POOLS 43
61
63
#endif
62
64
jl_gc_pool_t norm_pools[JL_GC_N_POOLS];
63
65
} jl_thread_heap_t ;
You can’t perform that action at this time.
0 commit comments