aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2014-10-07 16:18:46 +0200
committerMike Pall <mike>2014-10-07 16:18:46 +0200
commitbe64823d957bea318e374d7a16a3985158b76cbb (patch)
tree8e4865fc4f9491923596098d2d6b8991bee7c74e /src
parent0de431e3f7ab6fa31a56042f2c10ababe0b2b4ab (diff)
parent4846a714a9b8e01bac8f9fc1de0eb2a5f00ea79b (diff)
downloadluajit-be64823d957bea318e374d7a16a3985158b76cbb.tar.gz
luajit-be64823d957bea318e374d7a16a3985158b76cbb.tar.bz2
luajit-be64823d957bea318e374d7a16a3985158b76cbb.zip
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
-rw-r--r--src/jit/bcsave.lua2
-rw-r--r--src/lj_alloc.c6
-rw-r--r--src/lj_arch.h3
-rw-r--r--src/lj_gdbjit.c2
4 files changed, 8 insertions, 5 deletions
diff --git a/src/jit/bcsave.lua b/src/jit/bcsave.lua
index fa68bf56..8303263d 100644
--- a/src/jit/bcsave.lua
+++ b/src/jit/bcsave.lua
@@ -69,7 +69,7 @@ local map_arch = {
69 69
70local map_os = { 70local map_os = {
71 linux = true, windows = true, osx = true, freebsd = true, netbsd = true, 71 linux = true, windows = true, osx = true, freebsd = true, netbsd = true,
72 openbsd = true, solaris = true, 72 openbsd = true, dragonfly = true, solaris = true,
73} 73}
74 74
75local function checkarg(str, map, err) 75local function checkarg(str, map, err)
diff --git a/src/lj_alloc.c b/src/lj_alloc.c
index facccee5..7c7ec678 100644
--- a/src/lj_alloc.c
+++ b/src/lj_alloc.c
@@ -194,14 +194,14 @@ static LJ_AINLINE void *CALL_MMAP(size_t size)
194 return ptr; 194 return ptr;
195} 195}
196 196
197#elif LJ_TARGET_OSX || LJ_TARGET_PS4 || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun__) 197#elif LJ_TARGET_OSX || LJ_TARGET_PS4 || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun__)
198 198
199/* OSX and FreeBSD mmap() use a naive first-fit linear search. 199/* OSX and FreeBSD mmap() use a naive first-fit linear search.
200** That's perfect for us. Except that -pagezero_size must be set for OSX, 200** That's perfect for us. Except that -pagezero_size must be set for OSX,
201** otherwise the lower 4GB are blocked. And the 32GB RLIMIT_DATA needs 201** otherwise the lower 4GB are blocked. And the 32GB RLIMIT_DATA needs
202** to be reduced to 250MB on FreeBSD. 202** to be reduced to 250MB on FreeBSD.
203*/ 203*/
204#if LJ_TARGET_OSX 204#if LJ_TARGET_OSX || defined(__DragonFly__)
205#define MMAP_REGION_START ((uintptr_t)0x10000) 205#define MMAP_REGION_START ((uintptr_t)0x10000)
206#elif LJ_TARGET_PS4 206#elif LJ_TARGET_PS4
207#define MMAP_REGION_START ((uintptr_t)0x4000) 207#define MMAP_REGION_START ((uintptr_t)0x4000)
@@ -238,7 +238,7 @@ static LJ_AINLINE void *CALL_MMAP(size_t size)
238 return p; 238 return p;
239 } 239 }
240 if (p != CMFAIL) munmap(p, size); 240 if (p != CMFAIL) munmap(p, size);
241#ifdef __sun__ 241#if defined(__sun__) || defined(__DragonFly__)
242 alloc_hint += 0x1000000; /* Need near-exhaustive linear scan. */ 242 alloc_hint += 0x1000000; /* Need near-exhaustive linear scan. */
243 if (alloc_hint + size < MMAP_REGION_END) continue; 243 if (alloc_hint + size < MMAP_REGION_END) continue;
244#endif 244#endif
diff --git a/src/lj_arch.h b/src/lj_arch.h
index 10ff5529..da16a193 100644
--- a/src/lj_arch.h
+++ b/src/lj_arch.h
@@ -67,7 +67,8 @@
67#elif defined(__MACH__) && defined(__APPLE__) 67#elif defined(__MACH__) && defined(__APPLE__)
68#define LUAJIT_OS LUAJIT_OS_OSX 68#define LUAJIT_OS LUAJIT_OS_OSX
69#elif (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ 69#elif (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
70 defined(__NetBSD__) || defined(__OpenBSD__)) && !defined(__ORBIS__) 70 defined(__NetBSD__) || defined(__OpenBSD__) || \
71 defined(__DragonFly__)) && !defined(__ORBIS__)
71#define LUAJIT_OS LUAJIT_OS_BSD 72#define LUAJIT_OS LUAJIT_OS_BSD
72#elif (defined(__sun__) && defined(__svr4__)) || defined(__CYGWIN__) 73#elif (defined(__sun__) && defined(__svr4__)) || defined(__CYGWIN__)
73#define LUAJIT_OS LUAJIT_OS_POSIX 74#define LUAJIT_OS LUAJIT_OS_POSIX
diff --git a/src/lj_gdbjit.c b/src/lj_gdbjit.c
index 1e1ac31f..7135833b 100644
--- a/src/lj_gdbjit.c
+++ b/src/lj_gdbjit.c
@@ -358,6 +358,8 @@ static const ELFheader elfhdr_template = {
358 .eosabi = 2, 358 .eosabi = 2,
359#elif defined(__OpenBSD__) 359#elif defined(__OpenBSD__)
360 .eosabi = 12, 360 .eosabi = 12,
361#elif defined(__DragonFly__)
362 .eosabi = 0,
361#elif (defined(__sun__) && defined(__svr4__)) 363#elif (defined(__sun__) && defined(__svr4__))
362 .eosabi = 6, 364 .eosabi = 6,
363#else 365#else