Fix signed comparison in op_jl
This commit is contained in:
parent
f8f5ac7ad0
commit
fa31f39a65
1 changed files with 8 additions and 11 deletions
|
|
@ -251,16 +251,13 @@ class ZCpu:
|
||||||
# Fallthrough: No args were equal to a.
|
# Fallthrough: No args were equal to a.
|
||||||
self._branch(False)
|
self._branch(False)
|
||||||
|
|
||||||
def op_jl(self, a, *others):
|
def op_jl(self, a, b):
|
||||||
"""Branch if the first argument is less than any subsequent
|
"""Branch if the first argument is less than the second."""
|
||||||
argument. Note that the second operand may be absent, in
|
a = self._make_signed(a)
|
||||||
which case there is no jump."""
|
b = self._make_signed(b)
|
||||||
for b in others:
|
|
||||||
if a < b:
|
if a < b:
|
||||||
self._branch(True)
|
self._branch(True)
|
||||||
return
|
else:
|
||||||
|
|
||||||
# Fallthrough: No args were greater than a.
|
|
||||||
self._branch(False)
|
self._branch(False)
|
||||||
|
|
||||||
def op_jg(self, a, b):
|
def op_jg(self, a, b):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue