riscv64-asm: Implement asm_clobber
This commit is contained in:
parent
468f338e23
commit
9b76a64f96
1 changed files with 13 additions and 1 deletions
|
@ -694,7 +694,19 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands,
|
||||||
|
|
||||||
ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str)
|
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)
|
ST_FUNC int asm_parse_regvar (int t)
|
||||||
|
|
Loading…
Add table
Reference in a new issue