Add several arithmetic and branch tests cases. - 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月09日 19:13:33 -0200
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2012年12月09日 19:13:33 -0200
commite255b7606842c02be793e0d447aaac2f9a40bc65 (patch)
tree7212ff1d58e72a2d00449d52144322b5027a2b84 /lib/jit_arm-swf.c
parentd1c0bc8e983620693bb71c58b7bfd64bd3690d94 (diff)
downloadlightning-e255b7606842c02be793e0d447aaac2f9a40bc65.tar.gz
Add several arithmetic and branch tests cases.
* check/alu.inc, check/alu_add.ok, check/alu_add.tst, check/alu_and.ok, check/alu_and.tst, check/alu_com.ok, check/alu_com.tst, check/alu_div.ok, check/alu_div.tst, check/alu_lsh.ok, check/alu_lsh.tst, check/alu_mul.ok, check/alu_mul.tst, check/alu_neg.ok, check/alu_neg.tst, check/alu_or.ok, check/alu_or.tst, check/alu_rem.ok, check/alu_rem.tst, check/alu_rsh.ok, check/alu_rsh.tst, check/alu_sub.ok, check/alu_sub.tst, check/alu_xor.ok, check/alu_xor.tst, check/alux_add.ok, check/alux_add.tst, check/alux_sub.ok, check/alux_sub.tst, check/branch.ok, check/branch.tst: New test cases for arithmetic and branch tests. * check/Makefile.am: Update for new test cases. * include/lightning/jit_private.h: Make the jit_reg_free_p macro shared by all backends. Previously was added for the arm backend, but is useful in the x86_64 backend when checking state of "special purpose register". Also add the new jit_class_named register class, that must be or'ed with the register value if calling jit_get_reg expecting an specific value, because the specific register value may be zero, that previously was treated as no register requested. * lib/jit_arm-cpu.c: Correct argument order for T2_MVN. * lib/jit_arm-swf.c: Call the proper function for double divide. The "software float" implementation just calls libgcc functions. * lib/jit_arm.c: Return float/double values in the float register if using the hard float ABI. * lib/jit_x86-cpu.c: Change the can_sign_extend_int_p macro to not include -0x80000000L, because there is code that "abuses" it and thinks it can negate the immediate value after calling that macro. Correct implementation of jit_subi that had a wrong code patch logic doing subtraction with reversed arguments. Correct REX prefix calculation in the jit_muli implementation. Correct logic to get/unget %*ax and %*dx registers in divremr and divremi. Correct divremi that was using the symbolic, unique %*ax value in on place (not using the _REGNO name suffix). Correct cut&paste error causing it to use "xor" instead of "or" in one code path of the jit_ori implementation. Correct several flaws when clobbering registers and/or when one of the arguments was %*cx in the rotshr wrapper function implementing most shift operations. * lib/lightning.c: No longer expect that the backend be smart enough to know what to do when asking for a named register if that register is already an argument or is live. It fails if it is an argument, or if register is live, fails if cannot spill. No longer incorrectly assume that eqr_{f,d} and ltgr_{f,d} are safe to inverse value tests in jump thread optimization.
Diffstat (limited to 'lib/jit_arm-swf.c')
-rw-r--r--lib/jit_arm-swf.c 4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/jit_arm-swf.c b/lib/jit_arm-swf.c
index cc311df..ad0d12d 100644
--- a/lib/jit_arm-swf.c
+++ b/lib/jit_arm-swf.c
@@ -156,8 +156,8 @@ static void _swf_negr_d(jit_state_t*,jit_int32_t,jit_int32_t);
# define swf_muli_d(r0,r1,i0) swf_ddd_(__aeabi_dmul,r0,r1,i0)
# define swf_divr_f(r0,r1,r2) swf_fff(__aeabi_fdiv,r0,r1,r2)
# define swf_divi_f(r0,r1,i0) swf_fff_(__aeabi_fdiv,r0,r1,i0)
-# define swf_divr_d(r0,r1,r2) swf_ddd(__aeabi_dsub,r0,r1,r2)
-# define swf_divi_d(r0,r1,i0) swf_ddd_(__aeabi_dsub,r0,r1,i0)
+# define swf_divr_d(r0,r1,r2) swf_ddd(__aeabi_ddiv,r0,r1,r2)
+# define swf_divi_d(r0,r1,i0) swf_ddd_(__aeabi_ddiv,r0,r1,i0)
# define swf_ltr_f(r0,r1,r2) swf_iff(__aeabi_fcmplt,r0,r1,r2)
# define swf_lti_f(r0,r1,i0) swf_iff_(__aeabi_fcmplt,r0,r1,i0)
# define swf_ltr_d(r0,r1,r2) swf_idd(__aeabi_dcmplt,r0,r1,r2)
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月12日 07:57:16 +0000

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