Skip to content

Commit 8f99882

Browse files
committed
Merge branch 'master' of github.com:JuliaLang/julia
2 parents e8bc7d9 + 194f996 commit 8f99882

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/julia.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <setjmp.h>
2020
#ifndef _OS_WINDOWS_
2121
# define jl_jmp_buf sigjmp_buf
22-
# if defined(_CPU_ARM_)
22+
# if defined(_CPU_ARM_) || defined(_CPU_PPC_)
2323
# define MAX_ALIGN 8
2424
# elif defined(_CPU_AARCH64_)
2525
// int128 is 16 bytes aligned on aarch64

src/julia_internal.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ void *jl_gc_perm_alloc(size_t sz);
5454
static const int jl_gc_sizeclasses[JL_GC_N_POOLS] = {
5555
#ifdef _P64
5656
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,
5761
#else
5862
4, 8, 12,
5963
#endif
@@ -87,6 +91,10 @@ STATIC_INLINE int JL_CONST_FUNC jl_gc_szclass(size_t sz)
8791
if (sz <= 8)
8892
return 0;
8993
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;
9098
#else
9199
if (sz <= 12)
92100
return (sz + 3) / 4 - 1;

src/julia_threads.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ typedef struct {
5555

5656
// variables for allocating objects from pools
5757
#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
5961
#else
60-
#define JL_GC_N_POOLS 43
62+
# define JL_GC_N_POOLS 43
6163
#endif
6264
jl_gc_pool_t norm_pools[JL_GC_N_POOLS];
6365
} jl_thread_heap_t;

0 commit comments

Comments
 (0)