feat(asm): add RISC-V ELF relocatable object emission and SB relocation
support
This commit is contained in:
+7
-2
@@ -398,10 +398,15 @@ func parseAddress(g []token.Token) ast.Address {
|
||||
return addr
|
||||
}
|
||||
// Symbol-with-pseudo form: name[<>][+off](PSEUDO).
|
||||
// When the prefix is not a valid symbol name (e.g. a bare number like
|
||||
// 0(SP) in RISC-V), sym is nil and we fall through to regular memory
|
||||
// operand parsing instead of returning an empty address.
|
||||
if idx := findPseudoParen(g); idx >= 0 {
|
||||
sym, _ := parseSymbolPrefix(g[:idx+3])
|
||||
addr.Sym = sym
|
||||
return addr
|
||||
if sym != nil {
|
||||
addr.Sym = sym
|
||||
return addr
|
||||
}
|
||||
}
|
||||
|
||||
i := 0
|
||||
|
||||
Reference in New Issue
Block a user