Update code to build and pass test cases in the arm port. - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/lib/jit_arm-swf.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2012年12月03日 14:27:27 -0200
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2012年12月03日 14:27:27 -0200
commit1c9088beca341765f5260a1ae6f3289b494d4eb8 (patch)
tree9a7232353a37214d7c29adae53f23fef9b9e742a /lib/jit_arm-swf.c
parent712877a5a4c967e0db6a6ce4e92162c9a9056192 (diff)
downloadlightning-1c9088beca341765f5260a1ae6f3289b494d4eb8.tar.gz
Update code to build and pass test cases in the arm port.
* configure.ac, include/lightning/jit_private.h, lib/jit_arm-cpu.c, lib/jit_arm-swf.c, lib/jit_arm.c, check/Makefile.am: Correct implementation of the arm backend port to build and pass the current test cases. Tested on armv7 with softfp abi. * lib/jit_disasm.c: Rename and change prototype of static disassemble function as in the arm backend it is required to access state information stored in the jit_state_t object. * check/3to2.tst, check/add.tst: Correct test case code assuming JIT_RO and JIT_RET are the same, and even if they are the same, the logic was incorrect because it must always call jit_retval* to fetch a function call return before any other instruction. The arm backend hash a special condition if jit_retval is not called, because "r0" is not JIT_R0, but is JIT_RET and *also* the first argument for a called function, so JIT_RET must be only used as an argument to jit_retval. * TODO: New file listing important tasks to be resolved.
Diffstat (limited to 'lib/jit_arm-swf.c')
-rw-r--r--lib/jit_arm-swf.c 6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/jit_arm-swf.c b/lib/jit_arm-swf.c
index 9155ff8..cc311df 100644
--- a/lib/jit_arm-swf.c
+++ b/lib/jit_arm-swf.c
@@ -18,6 +18,8 @@
#if PROTO
/* match vfpv3 result */
#define NAN_TO_INT_IS_ZERO 1
+extern float sqrtf(float);
+extern double sqrt(double);
extern float __addsf3(float, float);
extern double __adddf3(double, double);
extern float __aeabi_fsub(float, float);
@@ -47,7 +49,7 @@ extern int __aeabi_dcmpun(double, double);
# define swf_ff(i0,r0,r1) _swf_ff(_jit,i0,r0,r1)
static void
_swf_ff(jit_state_t*,float(*)(float),jit_int32_t,jit_int32_t) maybe_unused;
-# define swf_dd(i0,r0,r1) _swf_id(_jit,i0,r0,r1)
+# define swf_dd(i0,r0,r1) _swf_dd(_jit,i0,r0,r1)
static void
_swf_dd(jit_state_t*,double(*)(double),jit_int32_t,jit_int32_t) maybe_unused;
# define swf_fff(i0,r0,r1,r2) _swf_fff(_jit,i0,r0,r1,r2)
@@ -138,6 +140,8 @@ static void _swf_absr_d(jit_state_t*,jit_int32_t,jit_int32_t);
static void _swf_negr_f(jit_state_t*,jit_int32_t,jit_int32_t);
# define swf_negr_d(r0,r1) _swf_negr_d(_jit,r0,r1)
static void _swf_negr_d(jit_state_t*,jit_int32_t,jit_int32_t);
+# define swf_sqrtr_f(r0,r1) swf_ff(sqrtf,r0,r1)
+# define swf_sqrtr_d(r0,r1) swf_dd(sqrt,r0,r1)
# define swf_addr_f(r0,r1,r2) swf_fff(__addsf3,r0,r1,r2)
# define swf_addi_f(r0,r1,i0) swf_fff_(__addsf3,r0,r1,i0)
# define swf_addr_d(r0,r1,r2) swf_ddd(__adddf3,r0,r1,r2)
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月11日 11:56:19 +0000

AltStyle によって変換されたページ (->オリジナル) /