[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 237/437: Correct build and check on NetBSD amd64.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 237/437: Correct build and check on NetBSD amd64. |
Date: |
Mon, 2 Jul 2018 05:14:28 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit ecf753f94fcd1ed81035a7e2c3275ce86fe52782
Author: pcpa <address@hidden>
Date: Mon Aug 26 16:31:42 2013 -0300
Correct build and check on NetBSD amd64.
* configure.ac: Extend FreeBSD test to also handle NetBSD.
* lib/jit_x86-cpu.c: Correct wrongly defined offset type of
ldxi_ui. Problem detected when building on NetBSD.
* lib/lightning.c: Adjust code to handle NetBSD mremap,
where arguments do not match Linux mremap.
---
ChangeLog | 12 +++++++++++-
configure.ac | 2 +-
lib/jit_x86-cpu.c | 4 ++--
lib/lightning.c | 5 +++++
4 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f8ee83e..d1407a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,16 @@
2013-08-26 Paulo Andrade <address@hidden>
- lib/jit_ppc.c: Correct C sequence point problem miscalculating
+ * configure.ac: Extend FreeBSD test to also handle NetBSD.
+
+ * lib/jit_x86-cpu.c: Correct wrongly defined offset type of
+ ldxi_ui. Problem detected when building on NetBSD.
+
+ * lib/lightning.c: Adjust code to handle NetBSD mremap,
+ where arguments do not match Linux mremap.
+
+2013-08-26 Paulo Andrade <address@hidden>
+
+ * lib/jit_ppc.c: Correct C sequence point problem miscalculating
the actual function address in a function descriptor. Problem
happens with gcc 4.8.1 at least.
diff --git a/configure.ac b/configure.ac
index 4a10b6b..971cb4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,7 +87,7 @@ else
fi
case "$host_os" in
- *freebsd*) SHLIB="" ;;
+ *bsd*) SHLIB="" ;;
*hpux*) SHLIB="-ldld" ;;
*) SHLIB="-ldl" ;;
esac
diff --git a/lib/jit_x86-cpu.c b/lib/jit_x86-cpu.c
index 298dc33..afc83d2 100644
--- a/lib/jit_x86-cpu.c
+++ b/lib/jit_x86-cpu.c
@@ -426,7 +426,7 @@ static void _ldxi_i(jit_state_t*, jit_int32_t, jit_int32_t,
jit_word_t);
# define ldxr_ui(r0, r1, r2) _ldxr_ui(_jit, r0, r1, r2)
static void _ldxr_ui(jit_state_t*, jit_int32_t, jit_int32_t, jit_int32_t);
# define ldxi_ui(r0, r1, i0) _ldxi_ui(_jit, r0, r1, i0)
-static void _ldxi_ui(jit_state_t*, jit_int32_t, jit_int32_t, jit_int32_t);
+static void _ldxi_ui(jit_state_t*, jit_int32_t, jit_int32_t, jit_word_t);
# define ldxr_l(r0, r1, r2) _ldxr_l(_jit, r0, r1, r2)
static void _ldxr_l(jit_state_t*, jit_int32_t, jit_int32_t, jit_int32_t);
# define ldxi_l(r0, r1, i0) _ldxi_l(_jit, r0, r1, i0)
@@ -2540,7 +2540,7 @@ _ldxr_ui(jit_state_t *_jit, jit_int32_t r0, jit_int32_t
r1, jit_int32_t r2)
}
static void
-_ldxi_ui(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_int32_t i0)
+_ldxi_ui(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_word_t i0)
{
jit_int32_t reg;
if (can_sign_extend_int_p(i0)) {
diff --git a/lib/lightning.c b/lib/lightning.c
index d35db0f..84ce4da 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -1709,8 +1709,13 @@ _jit_emit(jit_state_t *_jit)
#endif
#if HAVE_MREMAP
+# if __NetBSD__
+ _jit->code.ptr = mremap(_jit->code.ptr, _jit->code.length,
+ _jit->code.ptr, length, 0);
+# else
_jit->code.ptr = mremap(_jit->code.ptr, _jit->code.length,
length, MREMAP_MAYMOVE, NULL);
+# endif
#else
_jit->code.ptr = mmap(NULL, length,
PROT_EXEC | PROT_READ | PROT_WRITE,
- [Guile-commits] 224/437: Correct mips o32 abi that was broken when adding n32 abi support., (continued)
- [Guile-commits] 224/437: Correct mips o32 abi that was broken when adding n32 abi support., Andy Wingo, 2018/07/02
- [Guile-commits] 230/437: New s390x port built on the hercules emulator and fedora 16 image., Andy Wingo, 2018/07/02
- [Guile-commits] 234/437: GNU lightning 2.0.0 release, Andy Wingo, 2018/07/02
- [Guile-commits] 256/437: X86: %r12 may be used as an index register., Andy Wingo, 2018/07/02
- [Guile-commits] 229/437: Do not assume cast of nan or inf double to float always work., Andy Wingo, 2018/07/02
- [Guile-commits] 231/437: Cosmetic removal of white spaces in end of lines., Andy Wingo, 2018/07/02
- [Guile-commits] 232/437: Correct off by one bug on s390x subi., Andy Wingo, 2018/07/02
- [Guile-commits] 123/437: Revert change aliasing jit_movi_p to jit_movi_ul., Andy Wingo, 2018/07/02
- [Guile-commits] 248/437: Correct wrong example and mt unsafe code in the arm backend., Andy Wingo, 2018/07/02
- [Guile-commits] 236/437: Correct build and make check on gcc111 - AIX 7.1., Andy Wingo, 2018/07/02
- [Guile-commits] 237/437: Correct build and check on NetBSD amd64.,
Andy Wingo <=
- [Guile-commits] 213/437: Finish Itanium port, correcting remaining failing test cases., Andy Wingo, 2018/07/02
- [Guile-commits] 253/437: IA64: Correct some wrong checks value range checks., Andy Wingo, 2018/07/02
- [Guile-commits] 254/437: ARM: Correct build when disassembler is disabled., Andy Wingo, 2018/07/02
- [Guile-commits] 251/437: Add code to calculate code buffer size based on devel time information., Andy Wingo, 2018/07/02
- [Guile-commits] 144/437: Add new ldst variant test cases to check base/index register clobber., Andy Wingo, 2018/07/02
- [Guile-commits] 212/437: Correct remaining test cases, but not yet ones with stack arguments., Andy Wingo, 2018/07/02
- [Guile-commits] 179/437: Add heuristic code to estimate space and resize if required jit buffer., Andy Wingo, 2018/07/02
- [Guile-commits] 265/437: PPC: Correct wrong ldxi_l simplification in 64 bit mode, Andy Wingo, 2018/07/02
- [Guile-commits] 155/437: Add support to test different/alternate code generation setups., Andy Wingo, 2018/07/02
- [Guile-commits] 241/437: Add fallback logic instead of error if cannot figure __WORDSIZE., Andy Wingo, 2018/07/02