feat(asm): add LoongArch encoder with ELF and GOOBJ emission
Assisted-by: DeepSeek V4 Pro
This commit is contained in:
+5
-1
@@ -298,10 +298,14 @@ func parseSymbolPrefix(g []token.Token) (*ast.Symbol, int) {
|
||||
sym.Static = true
|
||||
i += 2
|
||||
}
|
||||
if i < len(g) && g[i].Kind == token.Plus {
|
||||
if i < len(g) && (g[i].Kind == token.Plus || g[i].Kind == token.Minus) {
|
||||
neg := g[i].Kind == token.Minus
|
||||
i++
|
||||
if i < len(g) && g[i].Kind == token.Number {
|
||||
sym.Offset, sym.HasOff = parseInt(g[i].Text), true
|
||||
if neg {
|
||||
sym.Offset = -sym.Offset
|
||||
}
|
||||
i++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user