Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1227)

Unified Diff: src/x64/disasm-x64.cc

Issue 303034: X64/Win64: Alternative implementation of fmod in general. (Closed)
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/x64/disasm-x64.cc
diff --git a/src/x64/disasm-x64.cc b/src/x64/disasm-x64.cc
index d8d6dbb23bca454cb7716b60c51b32df4d6f5ff8..19bcf663823caacc108deabcc921cf3a437dd0db 100644
--- a/src/x64/disasm-x64.cc
+++ b/src/x64/disasm-x64.cc
@@ -860,12 +860,22 @@ int DisassemblerX64::FPUInstruction(byte* data) {
return count + 1;
}
} else if (b1 == 0xDD) {
- if ((b2 & 0xF8) == 0xC0) {
- AppendToBuffer("ffree st%d", b2 & 0x7);
+ int mod, regop, rm;
+ get_modrm(*(data + 1), &mod, &regop, &rm);
+ if (mod == 3) {
+ switch (regop) {
+ case 0:
+ AppendToBuffer("ffree st%d", rm & 7);
+ break;
+ case 2:
+ AppendToBuffer("fstp st%d", rm & 7);
+ break;
+ default:
+ UnimplementedInstruction();
+ break;
+ }
return 2;
} else {
- int mod, regop, rm;
- get_modrm(*(data + 1), &mod, &regop, &rm);
const char* mnem = "?";
switch (regop) {
case 0:
« src/x64/codegen-x64.cc ('K') | « src/x64/codegen-x64.cc ('k') | test/mjsunit/div-mod.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698