Skip to content

Claude/add qbe backend 011 cu uwa f gzns yx kitqra red#4

Open
tienex wants to merge 2 commits into
IanHarvey:masterfrom
tienex:claude/add-qbe-backend-011CUUwaFGznsYXKitqraRED
Open

Claude/add qbe backend 011 cu uwa f gzns yx kitqra red#4
tienex wants to merge 2 commits into
IanHarvey:masterfrom
tienex:claude/add-qbe-backend-011CUUwaFGznsYXKitqraRED

Conversation

@tienex

@tienex tienex commented Nov 27, 2025

Copy link
Copy Markdown

No description provided.

This commit adds a QBE (Quick Backend) IR backend to the Portable C
Compiler. QBE is a small compiler backend that uses an SSA-based
intermediate representation.

Changes include:
- Import QBE as a git submodule
- Create arch/qbe/ with complete backend implementation:
  - macdefs.h: Type and register definitions for QBE's virtual registers
  - code.c: Code generation and QBE IR emission
  - local.c: Local type handling and transformations
  - local2.c: Register allocation (simplified for QBE)
  - table.c: Instruction selection table mapping PCC IR to QBE IR
  - order.c: Register ordering
- Update configure.ac to recognize qbe target (qbe-local-linux)
- Update os/linux/ccconfig.h to support QBE backend

The QBE backend generates QBE IR output which can then be processed
by the QBE compiler to produce machine code for various architectures.

To use: ./configure --target=qbe-local-linux && make

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Ignore build artifacts, generated files, and temporary documentation
files created during development.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants