Skip to content
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

Bug in raising division instructions. #15

Closed
deXetrous opened this issue Nov 9, 2018 · 2 comments
Closed

Bug in raising division instructions. #15

deXetrous opened this issue Nov 9, 2018 · 2 comments

Comments

@deXetrous
Copy link

I have been using llvm-mctoll for my project which involves raising of binaries to IR. I have been getting an error when i try to raise binaries which are generated for a C code involving division operation on a variable. It works fine if both the operands are constants.
As an example: The following code snippet works fine.

int main() {
   int a = 4/2;
   return 0;
}

But, there seems to be an issue with variable operands.
As an example:

int main() {
  int a = 10;
  a = a/2;
  return 0;
}

While raising the binary, following error occurs:

*** Generic instruction not raised :   IDIV32r $ecx, <0x557f28d346e8>, implicit-def $eax, implicit-def $edx, implicit-def $eflags, implicit $eax, implicit $edx

Please let me know if this is not implemented or there is an issue from my side.

@bharadwajy
Copy link
Contributor

bharadwajy commented Nov 9, 2018

Thanks for trying the tool and filing the bug report.

Support to raise several x64 instructions still needs to be added - a subset of division instructions are among those. We are actively working towards adding support to missing instructions.

If you have the cycles, we welcome any help you can offer.

Thanks!

@bharadwajy
Copy link
Contributor

Fix pushed (commit bca73b3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants