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_x86.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2023年03月07日 18:05:11 -0300
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2023年03月07日 18:05:11 -0300
commita0d09a9548c613aa8a3ef90d362cf2f5e5f97a6f (patch)
tree07955115b1818a18a063e99692d7ffe79caf6870 /lib/jit_x86.c
parent87139e0f6c0c24db1458f5b7aca25f13bc4b6ac6 (diff)
downloadlightning-a0d09a9548c613aa8a3ef90d362cf2f5e5f97a6f.tar.gz
Implement new bit rotate instructions.
This commit also corrects some previous changes that were not properly tested and were failing to compile or having runtime problems, like using register 0 for addressing in s390. Still need to test on actual s390, as it fails in Hercules, but has the same encoding as shifts. For the moment presume it is a bug in the Hercules emulator. * check/alu_rot.tst, check/alu_rot.ok: New test files for the new lrotr, lroti, rrotr and rroti instructions. * check/Makefile.am, check/lightning.c, include/lightning.h.in, lib/jit_names.c: lib/lightning.c, doc/body.texi: Update for the new instructions. * lib/jit_aarch64-cpu.c, lib/jit_aarch64.c, lib/jit_arm-cpu.c, lib/jit_arm.c: Implement optimized rrotr and rroti. lrotr and lroti just adjust parameters for a left shift rotate. * lib/jit_alpha-cpu.c, lib/jit_alpha.c, lib/jit_ia64-cpu, lib/jit_ia64.c, lib/jit_riscv-cpu.c, lib/jit_riscv.c, jit_sparc-cpu.c, jit_sparc.c: Implement calls to fallback lrotr, lroti, rrotr and rroti. * lib/jit_hppa-cpu.c, lib/jit_hppa.c: Implement optimized rroti. Other instructions use fallbacks. * lib/jit_loongarch-cpu.c, lib/jit_loongarch.c: Implement optimized rrotr and rroti. lrotr and lroti just adapt arguments and use a right shift. * lib/jit_mips-cpu.c, lib/jit_mips.c: If mips2, Implement optimized rrotr and rroti. lrotr and lroti just adapt arguments and use a right shift. If mips1 use fallbacks. * lib/jit_ppc-cpu.c, lib/jit_ppc.c, jit_s390-cpu.c, jit_s390.c, lib/jit_x86-cpu.c, lib/jit_x86.c: Implement optimized lrotr, lroti, rrotr, rroti. * lib/jit_fallback.c: Implement fallbacks for lrotr, lroti, rrotr and rroti. Also add extra macro to avoid segfaults in s390, that cannot use register zero for some addressing instructions.
Diffstat (limited to 'lib/jit_x86.c')
-rw-r--r--lib/jit_x86.c 4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/jit_x86.c b/lib/jit_x86.c
index 334a11e..1cb0356 100644
--- a/lib/jit_x86.c
+++ b/lib/jit_x86.c
@@ -1803,6 +1803,10 @@ _emit_code(jit_state_t *_jit)
case_rrw(rsh,);
case_rrr(rsh, _u);
case_rrw(rsh, _u);
+ case_rrr(lrot,);
+ case_rrw(lrot,);
+ case_rrr(rrot,);
+ case_rrw(rrot,);
case_rr(neg,);
case_rr(com,);
case_rr(clo,);
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月17日 12:45:41 +0000

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