Fix adjusting jumps
This commit is contained in:
@@ -192,8 +192,8 @@ optimizer_adjust_jumps (OPCODE *first_opcode, OPCODE *last_opcode, int16_t value
|
||||
20: is_false_jmp 21
|
||||
21: assignment
|
||||
*/
|
||||
if (current_opcode->data.is_true_jmp.opcode <= opcode_to_counter (first_opcode)
|
||||
&& current_opcode->data.is_false_jmp.opcode < opcode_to_counter (last_opcode) - value)
|
||||
if (current_opcode->data.is_false_jmp.opcode >= opcode_to_counter (first_opcode)
|
||||
&& current_opcode->data.is_false_jmp.opcode <= opcode_to_counter (last_opcode) - value)
|
||||
{
|
||||
current_opcode->data.is_false_jmp.opcode = (T_IDX) (current_opcode->data.is_false_jmp.opcode + value);
|
||||
continue;
|
||||
|
||||
@@ -315,7 +315,7 @@ pp_opcode (opcode_counter_t oc, OPCODE opcode, bool is_rewrite)
|
||||
uint8_t i = 1;
|
||||
uint8_t opcode_num = opcode.op_idx;
|
||||
|
||||
__printf ("%03d: %20s ", oc++, opcode_names[opcode_num]);
|
||||
__printf ("%03d: %20s ", oc, opcode_names[opcode_num]);
|
||||
if (opcode_num != NAME_TO_ID (nop) && opcode_num != NAME_TO_ID (ret)
|
||||
&& opcode_num != NAME_TO_ID (end_with))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user