Skip to content

Tensix backend: emit string literal globals (Phase 2) #95

Description

@Zaneham

Tensix backend doesn't lower string literals yet. E110 refusal fires on any device-side "..." until this lands.

Two paths to do, in increasing pain order:

Metalium (--tensix): emit each byte-init global as static const char .strN[len] = { ... }; at file scope in the generated compute C++, lower BIR_GLOBAL_REF to a reference. Should be a Sunday-afternoon job.

Native RV32IM (--rv-elf): same shape as AMD #93, the bytes go into the ELF read-only segment and BIR_GLOBAL_REF becomes a lui+addi of the symbol's PC-relative address. More involved.

bir_global_is_bytes(M, gi) tells you which globals to materialise; bytes are at M->strings[c->d.bytes.off].

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions