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

riscv64-asm: Implement asm_parse_regvar

上级 b28bf50d
...@@ -691,7 +691,14 @@ ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str) ...@@ -691,7 +691,14 @@ ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str)
ST_FUNC int asm_parse_regvar (int t) ST_FUNC int asm_parse_regvar (int t)
{ {
tcc_error("RISCV64 asm not implemented."); if (t >= TOK_ASM_x0 && t <= TOK_ASM_pc) { /* register name */
switch (t) {
case TOK_ASM_pc:
return -1; // TODO: Figure out where it can be used after all
default:
return t - TOK_ASM_x0;
}
} else
return -1; return -1;
} }
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册