[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 346/437: PPC: Build and pass all tests in powerpcle
From: |
Andy Wingo |
Subject: |
[Guile-commits] 346/437: PPC: Build and pass all tests in powerpcle |
Date: |
Mon, 2 Jul 2018 05:14:51 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit af9df5faeb74331d063afc221ebc0604728b8552
Author: Paulo Andrade <address@hidden>
Date: Fri Dec 26 17:23:39 2014 -0200
PPC: Build and pass all tests in powerpcle
* lib/jit_ppc-cpu.c, lib/jit_ppc.c: Correct some endianess issues
on the powerpc le backend.
---
ChangeLog | 5 +++++
lib/jit_ppc-cpu.c | 6 +++++-
lib/jit_ppc.c | 6 +++---
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1583aa5..ae72602 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2014-12-26 Paulo Andrade <address@hidden>
+ * lib/jit_ppc-cpu.c, lib/jit_ppc.c: Correct some endianess issues
+ on the powerpc le backend.
+
+2014-12-26 Paulo Andrade <address@hidden>
+
* lib/jit_ppc-cpu.c: Add mcrxr instruction emulation,
as this instruction has been phased out, and should be
implemented as a kernel trap.
diff --git a/lib/jit_ppc-cpu.c b/lib/jit_ppc-cpu.c
index f358bfa..b8f6066 100644
--- a/lib/jit_ppc-cpu.c
+++ b/lib/jit_ppc-cpu.c
@@ -26,7 +26,11 @@
# define fits_uint32_p(im) 1
# else
# define gpr_save_area 144 /* r14~r31 = 18 * 8 */
-# define params_offset 48
+# if if ABI_ELFv2
+# define params_offset 32
+# else
+# define params_offset 48
+# endif
# define can_sign_extend_int_p(im) \
(((im) >= 0 && (long)(im) <= 0x7fffffffL) || \
((im) < 0 && (long)(im) >= -0x80000000L))
diff --git a/lib/jit_ppc.c b/lib/jit_ppc.c
index 4549c99..d3df78c 100644
--- a/lib/jit_ppc.c
+++ b/lib/jit_ppc.c
@@ -279,7 +279,7 @@ _jit_arg_f(jit_state_t *_jit)
if (_jitc->function->self.argf < 13)
offset = _jitc->function->self.argf++;
else {
-#if __WORDSIZE == 32
+#if __WORDSIZE == 32 || __BYTE_ORDER == __LITTLE_ENDIAN
offset = _jitc->function->self.size;
#else
offset = _jitc->function->self.size + 4;
@@ -502,7 +502,7 @@ _jit_pushargr_f(jit_state_t *_jit, jit_int32_t u)
#endif
}
else {
-#if __WORDSIZE == 32
+#if __WORDSIZE == 32 || __BYTE_ORDER == __LITTLE_ENDIAN
jit_stxi_f(_jitc->function->call.size + params_offset, JIT_SP, u);
#else
jit_stxi_f(_jitc->function->call.size + params_offset + 4,
@@ -549,7 +549,7 @@ _jit_pushargi_f(jit_state_t *_jit, jit_float32_t u)
#endif
}
else {
-#if __WORDSIZE == 32
+#if __WORDSIZE == 32 || __BYTE_ORDER == __LITTLE_ENDIAN
jit_stxi_f(_jitc->function->call.size + params_offset, JIT_SP, regno);
#else
jit_stxi_f(_jitc->function->call.size + params_offset + 4,
- [Guile-commits] 142/437: Make current test cases pass in armv7l., (continued)
- [Guile-commits] 142/437: Make current test cases pass in armv7l., Andy Wingo, 2018/07/02
- [Guile-commits] 188/437: Add framework for sparc port., Andy Wingo, 2018/07/02
- [Guile-commits] 227/437: Cosmetic removal of unused macros., Andy Wingo, 2018/07/02
- [Guile-commits] 330/437: Resync with new patch to make functions receive a const argument, Andy Wingo, 2018/07/02
- [Guile-commits] 185/437: Store all annotation information in the read only data buffer., Andy Wingo, 2018/07/02
- [Guile-commits] 170/437: Test and correct test cases in all current backends., Andy Wingo, 2018/07/02
- [Guile-commits] 368/437: Implement jit_allocar for dynamic stack allocation, Andy Wingo, 2018/07/02
- [Guile-commits] 355/437: Update documentation on jit_frame and jit_tramp, Andy Wingo, 2018/07/02
- [Guile-commits] 323/437: misc: Make jit_note and related functions take a const argument, Andy Wingo, 2018/07/02
- [Guile-commits] 429/437: Remove disassembler support from lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 346/437: PPC: Build and pass all tests in powerpcle,
Andy Wingo <=
- [Guile-commits] 180/437: Correct C sequence point problem., Andy Wingo, 2018/07/02
- [Guile-commits] 370/437: Add missing ellipsis in allocar.tst, Andy Wingo, 2018/07/02
- [Guile-commits] 337/437: Remove a wrong optimization of callee save registers, Andy Wingo, 2018/07/02
- [Guile-commits] 437/437: Wire up lightning into libguile build, Andy Wingo, 2018/07/02
- [Guile-commits] 362/437: Avoid problems if JIT_INSTR_MAX is miscalculated, Andy Wingo, 2018/07/02
- [Guile-commits] 183/437: Correct qmul and qdiv in ppc., Andy Wingo, 2018/07/02
- [Guile-commits] 235/437: Correct build on FreeBSD/amd64, Andy Wingo, 2018/07/02
- [Guile-commits] 240/437: Correct wrong test and update of arm thumb offset information., Andy Wingo, 2018/07/02
- [Guile-commits] 215/437: Add functional hppa port. All tests pass., Andy Wingo, 2018/07/02
- [Guile-commits] 369/437: Correct typo in x87.nodata test list, Andy Wingo, 2018/07/02