-
Notifications
You must be signed in to change notification settings - Fork 41
feat: integrate Rabbitizer via FetchContent #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| if (sym && sym->isFunction) | ||
| { | ||
| return sym->name; | ||
| return sanitizeFunctionName(sym->name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will cause an error because the function body is online 78.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wow, yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding "CodeGenerator::" to the beginning should solve the problem.
return CodeGenerator::sanitizeFunctionName(sym->name);and add this to code_generator.h:
std::string sanitizeFunctionName(const std::string& name);| { | ||
| if (inst.opcode == OPCODE_JAL) | ||
| { | ||
| uint32_t target = (inst.address & 0xF0000000) | (inst.target << 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont need (currentAddr + 4) & 0xF0000000 . Rabbitizer already gives the full VRAM target,
So repllace (inst.address & 0xF0000000) | (inst.target << 2) with inst.target; in alll places
| : m_elfPath(elfPath) | ||
| { | ||
| m_elfParser = std::make_unique<ElfParser>(elfPath); | ||
| m_decoder = std::make_unique<R5900Decoder>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also delete the file and the test if they use it.
|
Nice work @Lucasnribeiro |
implementing this issue #17