feat(asm): add LoongArch encoder with ELF and GOOBJ emission

Assisted-by: DeepSeek V4 Pro
This commit is contained in:
2026-08-13 11:24:44 +02:00
parent 2d1176e045
commit 31ee8e7941
24 changed files with 4777 additions and 149 deletions
+4 -4
View File
@@ -75,10 +75,10 @@ func (img *Image) GOObjectRISCV(pkgPath, srcPath string) ([]byte, error) {
data []byte
dst *int
}{
{pcspTable(fn), &pcIdx[i].sp},
{pcValueFlat(0, fn.Size), &pcIdx[i].file},
{pcValueFlat(int32(fn.Line), fn.Size), &pcIdx[i].line},
{pcValueFlat(-1, fn.Size), &pcIdx[i].inl},
{pcspTable(fn, 2), &pcIdx[i].sp},
{pcValueFlat(0, fn.Size, 2), &pcIdx[i].file},
{pcValueFlat(int32(fn.Line), fn.Size, 2), &pcIdx[i].line},
{pcValueFlat(-1, fn.Size, 2), &pcIdx[i].inl},
}
for _, t := range tables {
*t.dst = len(nps)