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

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

Issue 9316127: X64: Fix bug in minus-zero check after int32 multiplication. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 10 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 | 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 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 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 986 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
987 // Bail out if the result is supposed to be negative zero. 987 // Bail out if the result is supposed to be negative zero.
988 Label done; 988 Label done;
989 __ testl(left, left); 989 __ testl(left, left);
990 __ j(not_zero, &done, Label::kNear); 990 __ j(not_zero, &done, Label::kNear);
991 if (right->IsConstantOperand()) { 991 if (right->IsConstantOperand()) {
992 if (ToInteger32(LConstantOperand::cast(right)) <= 0) { 992 if (ToInteger32(LConstantOperand::cast(right)) <= 0) {
993 DeoptimizeIf(no_condition, instr->environment()); 993 DeoptimizeIf(no_condition, instr->environment());
994 } 994 }
995 } else if (right->IsStackSlot()) { 995 } else if (right->IsStackSlot()) {
996 __ or_(kScratchRegister, ToOperand(right)); 996 __ orl(kScratchRegister, ToOperand(right));
997 DeoptimizeIf(sign, instr->environment()); 997 DeoptimizeIf(sign, instr->environment());
998 } else { 998 } else {
999 // Test the non-zero operand for negative sign. 999 // Test the non-zero operand for negative sign.
1000 __ or_(kScratchRegister, ToRegister(right)); 1000 __ orl(kScratchRegister, ToRegister(right));
1001 DeoptimizeIf(sign, instr->environment()); 1001 DeoptimizeIf(sign, instr->environment());
1002 } 1002 }
1003 __ bind(&done); 1003 __ bind(&done);
1004 } 1004 }
1005 } 1005 }
1006 1006
1007 1007
1008 void LCodeGen::DoBitI(LBitI* instr) { 1008 void LCodeGen::DoBitI(LBitI* instr) {
1009 LOperand* left = instr->InputAt(0); 1009 LOperand* left = instr->InputAt(0);
1010 LOperand* right = instr->InputAt(1); 1010 LOperand* right = instr->InputAt(1);
(...skipping 3394 matching lines...) Expand 10 before | Expand all | Expand 10 after
4405 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4405 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4406 ASSERT(osr_pc_offset_ == -1); 4406 ASSERT(osr_pc_offset_ == -1);
4407 osr_pc_offset_ = masm()->pc_offset(); 4407 osr_pc_offset_ = masm()->pc_offset();
4408 } 4408 }
4409 4409
4410 #undef __ 4410 #undef __
4411 4411
4412 } } // namespace v8::internal 4412 } } // namespace v8::internal
4413 4413
4414 #endif // V8_TARGET_ARCH_X64 4414 #endif // V8_TARGET_ARCH_X64
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