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

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

Issue 4277: Remove two cases of needlessly jumping to the next instruction. (Closed)
Patch Set: Created 12 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 __ cmp(edx, Factory::heap_number_map()); 1120 __ cmp(edx, Factory::heap_number_map());
1121 __ j(not_equal, &true_result); 1121 __ j(not_equal, &true_result);
1122 __ fldz(); 1122 __ fldz();
1123 __ fld_d(FieldOperand(eax, HeapNumber::kValueOffset)); 1123 __ fld_d(FieldOperand(eax, HeapNumber::kValueOffset));
1124 __ fucompp(); 1124 __ fucompp();
1125 __ push(eax); 1125 __ push(eax);
1126 __ fnstsw_ax(); 1126 __ fnstsw_ax();
1127 __ sahf(); 1127 __ sahf();
1128 __ pop(eax); 1128 __ pop(eax);
1129 __ j(zero, &false_result); 1129 __ j(zero, &false_result);
1130 __ jmp(&true_result); 1130 // Fall through to |true_result|.
1131 1131
1132 // Return 1/0 for true/false in eax. 1132 // Return 1/0 for true/false in eax.
1133 __ bind(&true_result); 1133 __ bind(&true_result);
1134 __ mov(eax, 1); 1134 __ mov(eax, 1);
1135 __ ret(1 * kPointerSize); 1135 __ ret(1 * kPointerSize);
1136 __ bind(&false_result); 1136 __ bind(&false_result);
1137 __ mov(eax, 0); 1137 __ mov(eax, 0);
1138 __ ret(1 * kPointerSize); 1138 __ ret(1 * kPointerSize);
1139 } 1139 }
1140 1140
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 // Fast case: Do integer division and use remainder. 1485 // Fast case: Do integer division and use remainder.
1486 __ idiv(ebx); 1486 __ idiv(ebx);
1487 __ NegativeZeroTest(edx, ecx, &slow); // use ecx = x | y 1487 __ NegativeZeroTest(edx, ecx, &slow); // use ecx = x | y
1488 __ mov(eax, Operand(edx)); 1488 __ mov(eax, Operand(edx));
1489 __ ret(2 * kPointerSize); 1489 __ ret(2 * kPointerSize);
1490 1490
1491 // Slow case: Call runtime operator implementation. 1491 // Slow case: Call runtime operator implementation.
1492 __ bind(&slow); 1492 __ bind(&slow);
1493 __ mov(eax, Operand(esp, 1 * kPointerSize)); 1493 __ mov(eax, Operand(esp, 1 * kPointerSize));
1494 __ mov(edx, Operand(esp, 2 * kPointerSize)); 1494 __ mov(edx, Operand(esp, 2 * kPointerSize));
1495 __ jmp(&call_runtime); 1495 // Fall through to |call_runtime|.
1496 break; 1496 break;
1497 } 1497 }
1498 case Token::BIT_OR: 1498 case Token::BIT_OR:
1499 case Token::BIT_AND: 1499 case Token::BIT_AND:
1500 case Token::BIT_XOR: 1500 case Token::BIT_XOR:
1501 case Token::SAR: 1501 case Token::SAR:
1502 case Token::SHL: 1502 case Token::SHL:
1503 case Token::SHR: { 1503 case Token::SHR: {
1504 // Smi-case for bitops should already have been inlined. 1504 // Smi-case for bitops should already have been inlined.
1505 break; 1505 break;
(...skipping 3984 matching lines...) Expand 10 before | Expand all | Expand 10 after
5490 bool is_eval) { 5490 bool is_eval) {
5491 Handle<Code> code = Ia32CodeGenerator::MakeCode(fun, script, is_eval); 5491 Handle<Code> code = Ia32CodeGenerator::MakeCode(fun, script, is_eval);
5492 if (!code.is_null()) { 5492 if (!code.is_null()) {
5493 Counters::total_compiled_code_size.Increment(code->instruction_size()); 5493 Counters::total_compiled_code_size.Increment(code->instruction_size());
5494 } 5494 }
5495 return code; 5495 return code;
5496 } 5496 }
5497 5497
5498 5498
5499 } } // namespace v8::internal 5499 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698