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

fstsw and fnstsw generate wrong opcode #68

Closed
Zeex opened this issue Jan 31, 2015 · 1 comment
Closed

fstsw and fnstsw generate wrong opcode #68

Zeex opened this issue Jan 31, 2015 · 1 comment

Comments

@Zeex
Copy link
Contributor

Zeex commented Jan 31, 2015

When using the fstsw ax and fntstsw ax instructions asmjit outputs only part of their opcode. E.g. for fnstsw ax instead of DF E0 it generates E0, which is loopne.

I used this program to reproduce the bug:

#include <asmjit/asmjit.h>

using namespace asmjit;
using namespace asmjit::x86;

int main() {
  JitRuntime runtime;
  X86Assembler a(&runtime);

  a.fnstsw(ax);
  void *code = a.make();

  runtime.release(code);
}
@kobalicek
Copy link
Member

Thanks! Should be fixed.

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