Skip to content

Commit 0cdc083

Browse files
committed
Fix jlo and jhs
1 parent 36f8507 commit 0cdc083

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

lifter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def lift_jge(il, instr):
305305
def lift_jhs(il, instr):
306306
cond_branch(
307307
il,
308-
il.flag_condition(LowLevelILFlagCondition.LLFC_UGE),
308+
il.flag_condition(LowLevelILFlagCondition.LLFC_ULE),
309309
il.const(2, instr.src.value),
310310
)
311311

@@ -321,7 +321,7 @@ def lift_jl(il, instr):
321321
def lift_jlo(il, instr):
322322
cond_branch(
323323
il,
324-
il.flag_condition(LowLevelILFlagCondition.LLFC_ULT),
324+
il.flag_condition(LowLevelILFlagCondition.LLFC_UGT),
325325
il.const(2, instr.src.value),
326326
)
327327

msp430.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ class MSP430(Architecture):
3939
}
4040

4141
flags_required_for_flag_condition = {
42-
LowLevelILFlagCondition.LLFC_UGE: ["c"],
43-
LowLevelILFlagCondition.LLFC_ULT: ["c"],
44-
LowLevelILFlagCondition.LLFC_SGE: ["n", "v"],
45-
LowLevelILFlagCondition.LLFC_SLT: ["n", "v"],
46-
LowLevelILFlagCondition.LLFC_E: ["z"],
47-
LowLevelILFlagCondition.LLFC_NE: ["z"],
48-
LowLevelILFlagCondition.LLFC_NEG: ["n"],
49-
LowLevelILFlagCondition.LLFC_POS: ["n"],
42+
LowLevelILFlagCondition.LLFC_UGE: ['c'],
43+
LowLevelILFlagCondition.LLFC_UGT: ['c'],
44+
LowLevelILFlagCondition.LLFC_ULT: ['c'],
45+
LowLevelILFlagCondition.LLFC_ULE: ['c'],
46+
LowLevelILFlagCondition.LLFC_SGE: ['n', 'v'],
47+
LowLevelILFlagCondition.LLFC_SLT: ['n', 'v'],
48+
LowLevelILFlagCondition.LLFC_E: ['z'],
49+
LowLevelILFlagCondition.LLFC_NE: ['z'],
50+
LowLevelILFlagCondition.LLFC_NEG: ['n'],
51+
LowLevelILFlagCondition.LLFC_POS: ['n']
5052
}
5153

5254
def get_instruction_info(self, data, addr):

0 commit comments

Comments
 (0)