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

Unified Diff: src/disasm-ia32.cc

Issue 17611: Combine smi and overflow checks for count operations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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
« no previous file with comments | « src/codegen-ia32.cc ('k') | src/register-allocator-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/disasm-ia32.cc
===================================================================
--- src/disasm-ia32.cc (revision 1049)
+++ src/disasm-ia32.cc (working copy)
@@ -294,6 +294,7 @@
int JumpShort(byte* data);
int JumpConditional(byte* data, const char* comment);
int JumpConditionalShort(byte* data, const char* comment);
+ int SetCC(byte* data);
int FPUInstruction(byte* data);
void AppendToBuffer(const char* format, ...);
@@ -577,6 +578,17 @@
// Returns number of bytes used, including *data.
+int DisassemblerIA32::SetCC(byte* data) {
+ assert(*data == 0x0F);
+ byte cond = *(data+1) & 0x0F;
+ const char* mnem = jump_conditional_mnem[cond];
+ AppendToBuffer("set%s ", mnem);
+ PrintRightOperand(data+2);
+ return 3; // includes 0x0F
+}
+
+
+// Returns number of bytes used, including *data.
int DisassemblerIA32::FPUInstruction(byte* data) {
byte b1 = *data;
byte b2 = *(data + 1);
@@ -821,6 +833,8 @@
f0byte == 0xB7 || f0byte == 0xAF) {
data += 2;
data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data);
+ } else if ((f0byte & 0xF0) == 0x90) {
+ data += SetCC(data);
} else {
data += 2;
if (f0byte == 0xAB || f0byte == 0xA5 || f0byte == 0xAD) {
« no previous file with comments | « src/codegen-ia32.cc ('k') | src/register-allocator-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698