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

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

Issue 8275035: Fix evaluation order of GT and LTE operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 LOperand* right = exponent_type.IsDouble() ? 1427 LOperand* right = exponent_type.IsDouble() ?
1428 UseFixedDouble(instr->right(), xmm2) : 1428 UseFixedDouble(instr->right(), xmm2) :
1429 UseFixed(instr->right(), eax); 1429 UseFixed(instr->right(), eax);
1430 LPower* result = new LPower(left, right); 1430 LPower* result = new LPower(left, right);
1431 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, 1431 return MarkAsCall(DefineFixedDouble(result, xmm3), instr,
1432 CAN_DEOPTIMIZE_EAGERLY); 1432 CAN_DEOPTIMIZE_EAGERLY);
1433 } 1433 }
1434 1434
1435 1435
1436 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1436 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1437 Token::Value op = instr->token();
1438 ASSERT(instr->left()->representation().IsTagged()); 1437 ASSERT(instr->left()->representation().IsTagged());
1439 ASSERT(instr->right()->representation().IsTagged()); 1438 ASSERT(instr->right()->representation().IsTagged());
1440 bool reversed = (op == Token::GT || op == Token::LTE);
1441 LOperand* context = UseFixed(instr->context(), esi); 1439 LOperand* context = UseFixed(instr->context(), esi);
1442 LOperand* left = UseFixed(instr->left(), reversed ? eax : edx); 1440 LOperand* left = UseFixed(instr->left(), edx);
1443 LOperand* right = UseFixed(instr->right(), reversed ? edx : eax); 1441 LOperand* right = UseFixed(instr->right(), eax);
1444 LCmpT* result = new LCmpT(context, left, right); 1442 LCmpT* result = new LCmpT(context, left, right);
1445 return MarkAsCall(DefineFixed(result, eax), instr); 1443 return MarkAsCall(DefineFixed(result, eax), instr);
1446 } 1444 }
1447 1445
1448 1446
1449 LInstruction* LChunkBuilder::DoCompareIDAndBranch( 1447 LInstruction* LChunkBuilder::DoCompareIDAndBranch(
1450 HCompareIDAndBranch* instr) { 1448 HCompareIDAndBranch* instr) {
1451 Representation r = instr->GetInputRepresentation(); 1449 Representation r = instr->GetInputRepresentation();
1452 if (r.IsInteger32()) { 1450 if (r.IsInteger32()) {
1453 ASSERT(instr->left()->representation().IsInteger32()); 1451 ASSERT(instr->left()->representation().IsInteger32());
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 LOperand* key = UseOrConstantAtStart(instr->key()); 2276 LOperand* key = UseOrConstantAtStart(instr->key());
2279 LOperand* object = UseOrConstantAtStart(instr->object()); 2277 LOperand* object = UseOrConstantAtStart(instr->object());
2280 LIn* result = new LIn(context, key, object); 2278 LIn* result = new LIn(context, key, object);
2281 return MarkAsCall(DefineFixed(result, eax), instr); 2279 return MarkAsCall(DefineFixed(result, eax), instr);
2282 } 2280 }
2283 2281
2284 2282
2285 } } // namespace v8::internal 2283 } } // namespace v8::internal
2286 2284
2287 #endif // V8_TARGET_ARCH_IA32 2285 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698