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

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

Issue 14083008: Improve generated code for HDoCompareObjectEqAndBranch on ia32/x64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | « no previous file | src/ia32/lithium-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after
2280 __ cmp(ToRegister(left), ToOperand(right)); 2280 __ cmp(ToRegister(left), ToOperand(right));
2281 } 2281 }
2282 } 2282 }
2283 EmitBranch(true_block, false_block, cc); 2283 EmitBranch(true_block, false_block, cc);
2284 } 2284 }
2285 } 2285 }
2286 2286
2287 2287
2288 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { 2288 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) {
2289 Register left = ToRegister(instr->left()); 2289 Register left = ToRegister(instr->left());
2290 Operand right = ToOperand(instr->right());
2291 int false_block = chunk_->LookupDestination(instr->false_block_id()); 2290 int false_block = chunk_->LookupDestination(instr->false_block_id());
2292 int true_block = chunk_->LookupDestination(instr->true_block_id()); 2291 int true_block = chunk_->LookupDestination(instr->true_block_id());
2293 2292
2294 __ cmp(left, Operand(right)); 2293 if (instr->right()->IsConstantOperand()) {
2294 __ cmp(left, ToHandle(LConstantOperand::cast(instr->right())));
2295 } else {
2296 Operand right = ToOperand(instr->right());
2297 __ cmp(left, Operand(right));
2298 }
2295 EmitBranch(true_block, false_block, equal); 2299 EmitBranch(true_block, false_block, equal);
2296 } 2300 }
2297 2301
2298 2302
2299 void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) { 2303 void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) {
2300 Register left = ToRegister(instr->left()); 2304 Register left = ToRegister(instr->left());
2301 int true_block = chunk_->LookupDestination(instr->true_block_id()); 2305 int true_block = chunk_->LookupDestination(instr->true_block_id());
2302 int false_block = chunk_->LookupDestination(instr->false_block_id()); 2306 int false_block = chunk_->LookupDestination(instr->false_block_id());
2303 2307
2304 __ cmp(left, instr->hydrogen()->right()); 2308 __ cmp(left, instr->hydrogen()->right());
(...skipping 4244 matching lines...) Expand 10 before | Expand all | Expand 10 after
6549 FixedArray::kHeaderSize - kPointerSize)); 6553 FixedArray::kHeaderSize - kPointerSize));
6550 __ bind(&done); 6554 __ bind(&done);
6551 } 6555 }
6552 6556
6553 6557
6554 #undef __ 6558 #undef __
6555 6559
6556 } } // namespace v8::internal 6560 } } // namespace v8::internal
6557 6561
6558 #endif // V8_TARGET_ARCH_IA32 6562 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698