We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 223fede commit 14662f5Copy full SHA for 14662f5
1 file changed
src/arch/z80/backend/common.py
@@ -402,7 +402,18 @@ def to_long(stype: DataType) -> list[str]:
402
)
403
404
elif stype == F16_t:
405
- output.extend(["ex de, hl", "ld de, 0"])
+ output.extend(
406
+ [
407
+ "ex de, hl",
408
+ "ld de, 0",
409
+ # Copies the highest bit (sign) to DE
410
+ "ld a, h",
411
+ "add a, a",
412
+ "sbc a, a",
413
+ "ld e, a",
414
+ "ld d, a",
415
+ ]
416
+ )
417
418
elif stype in (U32_t, I32_t):
419
return []
0 commit comments