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

Side by Side Diff: src/ia32/disasm-ia32.cc

Issue 10382033: x86/x64 port of Math.floor(x/y) to use integer division for specific divisor (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 ASSERT_EQ(0xF7, *data); 546 ASSERT_EQ(0xF7, *data);
547 byte modrm = *(data+1); 547 byte modrm = *(data+1);
548 int mod, regop, rm; 548 int mod, regop, rm;
549 get_modrm(modrm, &mod, &regop, &rm); 549 get_modrm(modrm, &mod, &regop, &rm);
550 if (mod == 3 && regop != 0) { 550 if (mod == 3 && regop != 0) {
551 const char* mnem = NULL; 551 const char* mnem = NULL;
552 switch (regop) { 552 switch (regop) {
553 case 2: mnem = "not"; break; 553 case 2: mnem = "not"; break;
554 case 3: mnem = "neg"; break; 554 case 3: mnem = "neg"; break;
555 case 4: mnem = "mul"; break; 555 case 4: mnem = "mul"; break;
556 case 5: mnem = "imul"; break;
556 case 7: mnem = "idiv"; break; 557 case 7: mnem = "idiv"; break;
557 default: UnimplementedInstruction(); 558 default: UnimplementedInstruction();
558 } 559 }
559 AppendToBuffer("%s %s", mnem, NameOfCPURegister(rm)); 560 AppendToBuffer("%s %s", mnem, NameOfCPURegister(rm));
560 return 2; 561 return 2;
561 } else if (mod == 3 && regop == eax) { 562 } else if (mod == 3 && regop == eax) {
562 int32_t imm = *reinterpret_cast<int32_t*>(data+2); 563 int32_t imm = *reinterpret_cast<int32_t*>(data+2);
563 AppendToBuffer("test %s,0x%x", NameOfCPURegister(rm), imm); 564 AppendToBuffer("test %s,0x%x", NameOfCPURegister(rm), imm);
564 return 6; 565 return 6;
565 } else if (regop == eax) { 566 } else if (regop == eax) {
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 fprintf(f, " "); 1691 fprintf(f, " ");
1691 } 1692 }
1692 fprintf(f, " %s\n", buffer.start()); 1693 fprintf(f, " %s\n", buffer.start());
1693 } 1694 }
1694 } 1695 }
1695 1696
1696 1697
1697 } // namespace disasm 1698 } // namespace disasm
1698 1699
1699 #endif // V8_TARGET_ARCH_IA32 1700 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698