Implement pseudo for riscv's 'auipc' instruction ##disasm

This commit is contained in:
pancake 2023-04-11 00:07:25 +02:00 committed by pancake
parent 9f90b76155
commit 0fddb6c0d7

View File

@ -20,6 +20,7 @@ static int replace(int argc, const char *argv[], char *newstr) {
{ 0, "and", "# = # & #", { 1, 2, 3 } },
{ 0, "andi", "# = # & #", { 1, 2, 3 } },
{ 0, "beq", "if (# == #) goto #", { 1, 2, 3 } },
{ 0, "auipc", "# = pc + #", {1, 2} },
{ 0, "bleu", "if (unsigned)# <= # goto #", { 1, 2, 3 } },
{ 0, "bltu", "if (unsigned)# < # goto #", { 1, 2, 3 } },
{ 0, "blt", "if (# < #) goto #", { 1, 2, 3 } },
@ -100,7 +101,6 @@ static int replace(int argc, const char *argv[], char *newstr) {
strcat (newstr, argv[i]);
strcat (newstr, (!i || i == argc - 1)? " " : ",");
}
r_str_replace_char (newstr, '{', '(');
r_str_replace_char (newstr, '}', ')');
return false;