mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-13 05:10:07 +08:00
riscv64-asm: Implement asm_clobber
This commit is contained in:
parent
468f338e23
commit
9b76a64f96
@ -694,7 +694,19 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands,
|
||||
|
||||
ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str)
|
||||
{
|
||||
tcc_error("RISCV64 asm not implemented.");
|
||||
int reg;
|
||||
TokenSym *ts;
|
||||
|
||||
if (!strcmp(str, "memory") ||
|
||||
!strcmp(str, "cc") ||
|
||||
!strcmp(str, "flags"))
|
||||
return;
|
||||
ts = tok_alloc(str, strlen(str));
|
||||
reg = asm_parse_regvar(ts->tok);
|
||||
if (reg == -1) {
|
||||
tcc_error("invalid clobber register '%s'", str);
|
||||
}
|
||||
clobber_regs[reg] = 1;
|
||||
}
|
||||
|
||||
ST_FUNC int asm_parse_regvar (int t)
|
||||
|
Loading…
Reference in New Issue
Block a user