mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:44:43 +01:00
riscv64: Support the fp alias for register s0 in inline assembly.
This commit is contained in:
parent
c172877b81
commit
0b67463b92
1 changed files with 4 additions and 0 deletions
|
|
@ -8442,6 +8442,10 @@ fn failSymbol(func: *Func, comptime format: []const u8, args: anytype) InnerErro
|
|||
}
|
||||
|
||||
fn parseRegName(name: []const u8) ?Register {
|
||||
// The `fp` alias for `s0` is awkward to fit into the current `Register` scheme, so for now we
|
||||
// special-case it here.
|
||||
if (std.mem.eql(u8, name, "fp")) return .s0;
|
||||
|
||||
return std.meta.stringToEnum(Register, name);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue