Implement the jit_align interface - 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-cpu.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2014年10月14日 17:05:25 -0300
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2014年10月14日 17:05:25 -0300
commitafae5407f67646254c868a9fde6da97609d5f69d (patch)
treef50e3a56cb2acfde87ad64cb1441b38cdec3cabb /lib/jit_arm-cpu.c
parentdbb1bb24099caad8e106a1b80f831b131b3d8e87 (diff)
downloadlightning-afae5407f67646254c868a9fde6da97609d5f69d.tar.gz
Implement the jit_align interface
* lib/jit_aarch64-cpu.c, lib/jit_alpha-cpu.c, lib/jit_arm-cpu.c, lib/jit_hppa-cpu.c, lib/jit_mips-cpu.c, lib/jit_ppc-cpu.c, lib/jit_sparc-cpu.c: Implement or correct the internal nop(count) call that receives an argument that tells the modulo bytes to align the code for the next instruction. * include/lightning.h, lib/lightning.c, lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c, lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c, lib/jit_x86.c: Implement the new jit_align() call that receive an argument, that tells the modulo, in bytes, to align the next instruction. In most backends the only value that makes a difference is a value that matches sizeof(void*), as all other values usually are already automatically aligned in labels, but not guaranteed to be aligned at word size bytes. * check/align.ok, check/align.tst: New files, implementing a simple test for the new jit_align() interface. * check/Makefile.am, check/lightning.c, lib/jit_aarch64-sz.c, lib/jit_alpha-sz.c, lib/jit_arm-sz.c, lib/jit_hppa-sz.c, lib/jit_ia64-sz.c, lib/jit_mips-sz.c, lib/jit_ppc-sz.c, lib/jit_print.c, lib/jit_s390x-sz.c, lib/jit_sparc-sz.c, lib/jit_x86-sz.c: Update for the new jit_code_align code and the jit_align() interface.
Diffstat (limited to 'lib/jit_arm-cpu.c')
-rw-r--r--lib/jit_arm-cpu.c 6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/jit_arm-cpu.c b/lib/jit_arm-cpu.c
index 02edeed..3f7db05 100644
--- a/lib/jit_arm-cpu.c
+++ b/lib/jit_arm-cpu.c
@@ -833,7 +833,7 @@ static void _torl(jit_state_t*,int,int,int) maybe_unused;
jit_unget_reg(_R0); \
} while (0)
# define nop(i0) _nop(_jit,i0)
-static void _nop(jit_state_t*,jit_word_t) maybe_unused;
+static void _nop(jit_state_t*,jit_int32_t);
# define movr(r0,r1) _movr(_jit,r0,r1)
static void _movr(jit_state_t*,jit_int32_t,jit_int32_t);
# define movi(r0,i0) _movi(_jit,r0,i0)
@@ -1498,9 +1498,8 @@ _torl(jit_state_t *_jit, int o, int rn, int im)
}
static void
-_nop(jit_state_t *_jit, jit_word_t i0)
+_nop(jit_state_t *_jit, jit_int32_t i0)
{
- assert(i0 >= 0);
if (jit_thumb_p()) {
for (; i0 > 0; i0 -= 2)
T1_NOP();
@@ -1509,6 +1508,7 @@ _nop(jit_state_t *_jit, jit_word_t i0)
for (; i0 > 0; i0 -= 4)
NOP();
}
+ assert(i0 == 0);
}
static void
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月15日 08:05:25 +0000

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