Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/arch/z80/backend/_16bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,18 +1089,18 @@ def jzero16(cls, ins: Quad) -> list[str]:
output.append("jp z, %s" % str(ins[2]))
return output

@classmethod
def jgezerou16(cls, ins: Quad) -> list[str]:
"""Jumps if top of the stack (16bit) is >= 0 to arg(1)
Always TRUE for unsigned
"""
output = []
value = ins[1]
if not is_int(value):
output = Bits16.get_oper(value)

def _jgezerou16(ins: Quad) -> list[str]:
"""Jumps if top of the stack (16bit) is >= 0 to arg(1)
Always TRUE for unsigned
"""
output = []
value = ins[1]
if not is_int(value):
output = Bits16.get_oper(value)

output.append("jp %s" % str(ins[2]))
return output
output.append("jp %s" % str(ins[2]))
return output


def _jgezeroi16(ins: Quad) -> list[str]:
Expand Down
3 changes: 1 addition & 2 deletions src/arch/z80/backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
Bits16,
_fparam16,
_jgezeroi16,
_jgezerou16,
_jnzero16,
_param16,
_ret16,
Expand Down Expand Up @@ -331,7 +330,7 @@ def _set_quad_table(self):
ICInstruction.JGEZEROI8: ICInfo(2, Bits8.jgezeroi8), # if X >= 0 jmp LABEL
ICInstruction.JGEZEROU8: ICInfo(2, Bits8.jgezerou8), # if X >= 0 jmp LABEL (ALWAYS TRUE)
ICInstruction.JGEZEROI16: ICInfo(2, _jgezeroi16), # if X >= 0 jmp LABEL
ICInstruction.JGEZEROU16: ICInfo(2, _jgezerou16), # if X >= 0 jmp LABEL (ALWAYS TRUE)
ICInstruction.JGEZEROU16: ICInfo(2, Bits16.jgezerou16), # if X >= 0 jmp LABEL (ALWAYS TRUE)
ICInstruction.JGEZEROI32: ICInfo(2, Bits32.jgezeroi32), # if X >= 0 jmp LABEL (32bit, fixed)
ICInstruction.JGEZEROU32: ICInfo(2, Bits32.jgezerou32), # if X >= 0 jmp LABEL (32bit, fixed) (always true)
ICInstruction.JGEZEROF16: ICInfo(2, Fixed16.jgezerof16), # if X >= 0 jmp LABEL (32bit, fixed)
Expand Down