feat(asm): emit RISC-V GOOBJ with the shared emitter

Assisted-by: DeepSeek V4 Pro
This commit is contained in:
2026-08-13 12:07:29 +02:00
parent 31ee8e7941
commit 9b5c878f9e
9 changed files with 358 additions and 383 deletions
+6 -7
View File
@@ -89,13 +89,12 @@ func (fl *FuncLayout) LineAt(offset int) int {
type RelocKind int
const (
RelPCRel32 RelocKind = iota // 32-bit PC-relative (amd64)
RelPCRelHI20 // R_RISCV_PCREL_HI20 (AUIPC)
RelPCRelLO12 // R_RISCV_PCREL_LO12_I (ADDI, LD)
RelPCRelLO12S // R_RISCV_PCREL_LO12_S (SD)
RelPCRelAbs // 32-bit absolute (R_RISCV_32)
RelLoong64AddrHi // R_LOONG64_ADDR_HI (pcalau12i)
RelLoong64AddrLo // R_LOONG64_ADDR_LO (addi.d/ld/st)
RelPCRel32 RelocKind = iota // 32-bit PC-relative (amd64)
RelRISCVPCRELIType // R_RISCV_PCREL_ITYPE (AUIPC + I-type pair)
RelRISCVPCRELSType // R_RISCV_PCREL_STYPE (AUIPC + S-type pair)
RelPCRelAbs // 32-bit absolute (R_RISCV_32)
RelLoong64AddrHi // R_LOONG64_ADDR_HI (pcalau12i)
RelLoong64AddrLo // R_LOONG64_ADDR_LO (addi.d/ld/st)
)
type Reloc struct {