Skip to content

Lower BIR_FADD and friends to soft-float calls #128

Description

@Zaneham

25 of the 34 unlowered BIR opcodes on the RV32 path are float. runtime/soft_fp.c already implements __addsf3, __subsf3, __mulsf3, __divsf3 and __unordsf2 with libgcc naming and is host-tested, but nothing in src/ references it.

The wrinkle is that BIR_CALL takes a function index into M->funcs[] rather than a symbol name, so there is no way to express a call into another module. The runtime has to be in the same module as the kernel. Simplest honest route is prepending the runtime translation unit before parsing, which is what gcc -include does, after which the existing call patcher in rv_isel_module resolves everything with no new machinery.

Blocked on #127 until i64 lowering lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend: TensixTenstorrent Tensix / Metalium backendenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions