mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-04 08:20:12 +08:00
riscv64-asm: Implement asm_parse_regvar
This commit is contained in:
parent
b28bf50d2b
commit
99189ea707
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user