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

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

Issue 10914072: Support register as right operand in min/max support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleaned up test. Created 8 years, 3 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 | test/mjsunit/regress/regress-crbug-145961.js » ('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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 Condition condition = (operation == HMathMinMax::kMathMin) 1414 Condition condition = (operation == HMathMinMax::kMathMin)
1415 ? less_equal 1415 ? less_equal
1416 : greater_equal; 1416 : greater_equal;
1417 Register left_reg = ToRegister(left); 1417 Register left_reg = ToRegister(left);
1418 if (right->IsConstantOperand()) { 1418 if (right->IsConstantOperand()) {
1419 Immediate right_imm = 1419 Immediate right_imm =
1420 Immediate(ToInteger32(LConstantOperand::cast(right))); 1420 Immediate(ToInteger32(LConstantOperand::cast(right)));
1421 __ cmpq(left_reg, right_imm); 1421 __ cmpq(left_reg, right_imm);
1422 __ j(condition, &return_left, Label::kNear); 1422 __ j(condition, &return_left, Label::kNear);
1423 __ movq(left_reg, right_imm); 1423 __ movq(left_reg, right_imm);
1424 } else if (right->IsRegister()) {
1425 Register right_reg = ToRegister(right);
1426 __ cmpq(left_reg, right_reg);
1427 __ j(condition, &return_left, Label::kNear);
1428 __ movq(left_reg, right_reg);
1424 } else { 1429 } else {
1425 Operand right_op = ToOperand(right); 1430 Operand right_op = ToOperand(right);
1426 __ cmpq(left_reg, right_op); 1431 __ cmpq(left_reg, right_op);
1427 __ j(condition, &return_left, Label::kNear); 1432 __ j(condition, &return_left, Label::kNear);
1428 __ movq(left_reg, right_op); 1433 __ movq(left_reg, right_op);
1429 } 1434 }
1430 __ bind(&return_left); 1435 __ bind(&return_left);
1431 } else { 1436 } else {
1432 ASSERT(instr->hydrogen()->representation().IsDouble()); 1437 ASSERT(instr->hydrogen()->representation().IsDouble());
1433 Label check_nan_left, check_zero, return_left, return_right; 1438 Label check_nan_left, check_zero, return_left, return_right;
(...skipping 3840 matching lines...) Expand 10 before | Expand all | Expand 10 after
5274 FixedArray::kHeaderSize - kPointerSize)); 5279 FixedArray::kHeaderSize - kPointerSize));
5275 __ bind(&done); 5280 __ bind(&done);
5276 } 5281 }
5277 5282
5278 5283
5279 #undef __ 5284 #undef __
5280 5285
5281 } } // namespace v8::internal 5286 } } // namespace v8::internal
5282 5287
5283 #endif // V8_TARGET_ARCH_X64 5288 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-145961.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698