Skip to content

Conversation

@Sightem
Copy link

@Sightem Sightem commented Dec 15, 2025

This PR addresses multiple compilation errors, linker failures, and runtime crashes encountered while porting the z80 backend to LLVM v19. The changes span the z80 target implementation as well as minor fixes to core LLVM headers required for a successful build

Known Issue:

int global_result = 0;

int main(void) {
    volatile int x = 10;
    for (int i = 0; i < 5; ++i) {
        global_result += x;
    }
    return global_result;
}

from what I can tell, global_result += x now fails with a "cannot select" error. This seems to be because the backend currently lacks GlobalISel patterns for general register to register addition (only the INC/DEC optimization is implemented)

Signed-off-by: Sightem <sightem@national.shitposting.agency>
@adriweb
Copy link
Member

adriweb commented Dec 15, 2025

Well considering I wasn't able to test v19 because of tablegen issues in the first place, if this gets us closer, it's a win.

@adriweb adriweb merged commit 50f0532 into CE-Programming:rebase-v19 Dec 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants