[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 269/437: ARM: Minor changes that should allow building o
From: |
Andy Wingo |
Subject: |
[Guile-commits] 269/437: ARM: Minor changes that should allow building on non gnu-linux/gcc. |
Date: |
Mon, 2 Jul 2018 05:14:34 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 6fa5123855b3312dcd22352f58897895fc7a4e3b
Author: pcpa <address@hidden>
Date: Wed Nov 27 15:05:27 2013 -0200
ARM: Minor changes that should allow building on non gnu-linux/gcc.
* configure.ac, lib/jit_arm-swf.c, lib/jit_arm.c: Add
changes that should at least allow building lightning
on Apple iOS7.
---
ChangeLog | 6 ++
configure.ac | 2 +
lib/jit_arm-swf.c | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
lib/jit_arm.c | 7 +++
4 files changed, 174 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4fe45c7..82a0c09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-27 Paulo Andrade <address@hidden>
+
+ * configure.ac, lib/jit_arm-swf.c, lib/jit_arm.c: Add
+ changes that should at least allow building lightning
+ on Apple iOS7.
+
2013-10-08 Paulo Andrade <address@hidden>
* lib/jit_ppc-cpu.c: Correct wrong shortcut for ldxi_l with
diff --git a/configure.ac b/configure.ac
index 830e53f..9f5e1fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,6 +186,8 @@ elif test $cpu = arm; then
}
}
fclose(fp);
+ #elif defined(__thumb2__)
+ return 0;
#endif
return 1;
}
diff --git a/lib/jit_arm-swf.c b/lib/jit_arm-swf.c
index 972c8ec..f07d65d 100644
--- a/lib/jit_arm-swf.c
+++ b/lib/jit_arm-swf.c
@@ -34,8 +34,8 @@ extern float __aeabi_i2f(int);
extern double __aeabi_i2d(int);
extern float __aeabi_d2f(double);
extern double __aeabi_f2d(float);
-extern int __aeabi_f2iz(double);
-extern int __aeabi_d2iz(float);
+extern int __aeabi_f2iz(float);
+extern int __aeabi_d2iz(double);
extern int __aeabi_fcmplt(float, float);
extern int __aeabi_dcmplt(double, double);
extern int __aeabi_fcmple(float, float);
@@ -394,6 +394,163 @@ static void
_swf_stxi_d(jit_state_t*,jit_word_t,jit_int32_t,jit_int32_t);
BICI(rt, rn, encode_arm_immediate(im)); \
} while (0)
+#if !defined(__GNUC__)
+float __addsf3(float u, float v)
+{
+ return (u + v);
+}
+
+double
+__adddf3(double u, double v)
+{
+ return (u + v);
+}
+
+float
+__aeabi_fsub(float u, float v)
+{
+ return (u - v);
+}
+
+double
+__aeabi_dsub(double u, double v)
+{
+ return (u - v);
+}
+
+float
+__aeabi_fmul(float u, float v)
+{
+ return (u * v);
+}
+
+double
+__aeabi_dmul(double u, double v)
+{
+ return (u * v);
+}
+
+float
+__aeabi_fdiv(float u, float v)
+{
+ return (u / v);
+}
+
+double
+__aeabi_ddiv(double u, double v)
+{
+ return (u / v);
+}
+
+float
+__aeabi_i2f(int u)
+{
+ return (u);
+}
+
+double
+__aeabi_i2d(int u)
+{
+ return (u);
+}
+
+float
+__aeabi_d2f(double u)
+{
+ return (u);
+}
+
+double
+__aeabi_f2d(float u)
+{
+ return (u);
+}
+
+extern int
+__aeabi_f2iz(float u)
+{
+ return (u);
+}
+
+int
+__aeabi_d2iz(double u)
+{
+ return (u);
+}
+
+int
+__aeabi_fcmplt(float u, float v)
+{
+ return (u < v);
+}
+
+int
+__aeabi_dcmplt(double u, double v)
+{
+ return (u < v);
+}
+
+int
+__aeabi_fcmple(float u, float v)
+{
+ return (u <= v);
+}
+
+int
+__aeabi_dcmple(double u, double v)
+{
+ return (u <= v);
+}
+
+int
+__aeabi_fcmpeq(float u, float v)
+{
+ return (u == v);
+}
+
+int
+__aeabi_dcmpeq(double u, double v)
+{
+ return (u == v);
+}
+
+int
+__aeabi_fcmpge(float u, float v)
+{
+ return (u >= v);
+}
+
+int
+__aeabi_dcmpge(double u, double v)
+{
+ return (u >= v);
+}
+
+int
+__aeabi_fcmpgt(float u, float v)
+{
+ return (u > v);
+}
+
+int
+__aeabi_dcmpgt(double u, double v)
+{
+ return (u > v);
+}
+
+int
+__aeabi_fcmpun(float u, float v)
+{
+ return ((u != u) || (v != v));
+}
+
+int
+__aeabi_dcmpun(double u, double v)
+{
+ return ((u != u) || (v != v));
+}
+#endif
+
static void
_swf_ff(jit_state_t *_jit, float(*i0)(float),
jit_int32_t r0, jit_int32_t r1)
diff --git a/lib/jit_arm.c b/lib/jit_arm.c
index 86435bc..71c1a79 100644
--- a/lib/jit_arm.c
+++ b/lib/jit_arm.c
@@ -64,8 +64,10 @@ static void _invalidate_consts(jit_state_t*);
#define patch(instr, node) _patch(_jit, instr, node)
static void _patch(jit_state_t*,jit_word_t,jit_node_t*);
+#if defined(__GNUC__)
/* libgcc */
extern void __clear_cache(void *, void *);
+#endif
#define PROTO 1
# include "jit_arm-cpu.c"
@@ -177,6 +179,9 @@ jit_get_cpu(void)
jit_cpu.version = 7;
jit_cpu.abi = 1;
#endif
+#if defined(__thumb2__)
+ jit_cpu.thumb = 1;
+#endif
/* armv6t2 todo (software float and thumb2) */
if (!jit_cpu.vfp && jit_cpu.thumb)
jit_cpu.thumb = 0;
@@ -1564,8 +1569,10 @@ _emit_code(jit_state_t *_jit)
patch_at(_jitc->patches.ptr[offset].kind & ~arm_patch_node, word,
value);
}
+#if defined(__GNUC__)
word = sysconf(_SC_PAGE_SIZE);
__clear_cache(_jit->code.ptr, (void *)((_jit->pc.w + word) & -word));
+#endif
return (_jit->code.ptr);
}
- [Guile-commits] 403/437: Correct wrong movr simplification, (continued)
- [Guile-commits] 403/437: Correct wrong movr simplification, Andy Wingo, 2018/07/02
- [Guile-commits] 324/437: misc: Enable silent rules to make warnings stick out, Andy Wingo, 2018/07/02
- [Guile-commits] 175/437: Make JIT_RET, JIT_FRET and JIT_SP private., Andy Wingo, 2018/07/02
- [Guile-commits] 430/437: Remove special cflags for obsolete Lightning targets, Andy Wingo, 2018/07/02
- [Guile-commits] 375/437: Update the correct fp offset and add assertions, Andy Wingo, 2018/07/02
- [Guile-commits] 413/437: Correct logic error with jit_live in jit_retr, Andy Wingo, 2018/07/02
- [Guile-commits] 140/437: Add new test cases to exercise memory load/store., Andy Wingo, 2018/07/02
- [Guile-commits] 267/437: GNU lightning 2.0.2 release, Andy Wingo, 2018/07/02
- [Guile-commits] 275/437: GNU lightning 2.0.3 release, Andy Wingo, 2018/07/02
- [Guile-commits] 338/437: Add missing ellipsis mark to align.tst, Andy Wingo, 2018/07/02
- [Guile-commits] 269/437: ARM: Minor changes that should allow building on non gnu-linux/gcc.,
Andy Wingo <=
- [Guile-commits] 260/437: Correct source of the self test case and a missed check failure., Andy Wingo, 2018/07/02
- [Guile-commits] 216/437: Prepare for the first alpha release of lightning 2.0., Andy Wingo, 2018/07/02
- [Guile-commits] 385/437: ia64: Add initial jit_va_ calls to ia64, Andy Wingo, 2018/07/02
- [Guile-commits] 382/437: mips: Add initial jit_va_ calls to mips, Andy Wingo, 2018/07/02
- [Guile-commits] 353/437: Remove inconsistent, public jit_arg_reg_p macro, Andy Wingo, 2018/07/02
- [Guile-commits] 372/437: Properly correct read of freed memory, Andy Wingo, 2018/07/02
- [Guile-commits] 281/437: Implement the new jit_set_data interface., Andy Wingo, 2018/07/02
- [Guile-commits] 329/437: cross: Provide the action for the cross compiling case, Andy Wingo, 2018/07/02
- [Guile-commits] 178/437: Update texinfo documentation to match current implementation., Andy Wingo, 2018/07/02
- [Guile-commits] 392/437: Bump library major., Andy Wingo, 2018/07/02