提交 9b76a64f 编辑于 作者: Danny Milosavljevic's avatar Danny Milosavljevic
浏览文件

riscv64-asm: Implement asm_clobber

上级 468f338e
......@@ -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)
......
Supports Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册