Add check for proper block fall through code - 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
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2022年10月04日 11:37:15 -0300
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2022年10月04日 11:37:15 -0300
commit5a740c6fb521d288f2bd342de035fd28ef24389c (patch)
treecb521684baec02748bf08d765d754decf64b914a /lib
parentba0c4b1e696e34775e4916c96dc4b264c7c597bb (diff)
downloadlightning-5a740c6fb521d288f2bd342de035fd28ef24389c.tar.gz
Add check for proper block fall through code
Diffstat (limited to 'lib')
-rw-r--r--lib/lightning.c 13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/lightning.c b/lib/lightning.c
index 6c0aed6..df69159 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -1700,9 +1700,16 @@ _check_block_again(jit_state_t *_jit)
continue;
/* Remember current label */
- if (node->code == jit_code_label || node->code == jit_code_prolog) {
+ if (node->code == jit_code_label ||
+ node->code == jit_code_prolog ||
+ node->code == jit_code_epilog) {
+
+ /* If previous block does not pass through */
+ if (!(node->flag & jit_flag_head))
+ block = NULL;
+
target = _jitc->blocks.ptr + node->v.w;
- /* Code just start in a new block */
+ /* Update if previous block pass through */
if (block && block->again && block_update_set(target, block))
todo = 1;
block = target;
@@ -1711,7 +1718,7 @@ _check_block_again(jit_state_t *_jit)
}
/* If not the first jmpi */
else if (block) {
- /* If not a jump or if a jump to raw address */
+ /* If a jump to dynamic address or if a jump to raw address */
if (!(jit_classify(node->code) & jit_cc_a0_jmp) ||
!(node->flag & jit_flag_node))
continue;
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月07日 05:25:16 +0000

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