Skip to content

z80: opcode output wrong. "in r, (c)", out by 0x40. #150

@gavinbell

Description

@gavinbell

https://github.com/wiz-lang/wiz/blob/5a8ea1ce15953d6ed9d222a54a31cb6447c79121/src/wiz/platform/z80_platform.cpp#L887C156-L887C158

Currently:
builtins.createInstruction(InstructionSignature(InstructionType::LoadIntrinsic(io_read), 0, {std::get<0>(reg), patternC}), encodingImplicit, InstructionOptions({prefixExtended, static_caststd::uint8_t((std::get<1>(reg) * 8))}, {}, {}));

Update to:
builtins.createInstruction(InstructionSignature(InstructionType::LoadIntrinsic(io_read), 0, {std::get<0>(reg), patternC}), encodingImplicit, InstructionOptions({prefixExtended, static_caststd::uint8_t((std::get<1>(reg) * 8)|0x40)}, {}, {}));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions