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
2 changes: 1 addition & 1 deletion src/arch/z80/backend/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def _cast(ins: Quad):
xsB = sB = YY_TYPES[tB] # Type sizes

if tA in ("u8", "i8") and tB == "bool":
return [] # bytes are booleans already (0 = False, not 0 = True)
return [*Bits8.get_oper(ins[4]), "push af"] # bytes are booleans already (0 = False, not 0 = True)

output = []
if tA in ("u8", "i8", "bool"):
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/arch/zx48k/bool_crash.asm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ _ReadKeys:
push ix
ld ix, 0
add ix, sp
pop af
ld a, (_pldx)
ld hl, (_pldx - 1)
or h
jp z, .LABEL.__LABEL1
Expand Down
Loading