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

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

Issue 22184004: Desugar bitwise negation into XOR and kill all UnaryOp stuff. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Feedback. Created 7 years, 4 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
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 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 LOperand* context = UseFixed(instr->context(), esi); 1407 LOperand* context = UseFixed(instr->context(), esi);
1408 LOperand* left = UseFixed(instr->left(), edx); 1408 LOperand* left = UseFixed(instr->left(), edx);
1409 LOperand* right = UseFixed(instr->right(), eax); 1409 LOperand* right = UseFixed(instr->right(), eax);
1410 LArithmeticT* result = 1410 LArithmeticT* result =
1411 new(zone()) LArithmeticT(instr->op(), context, left, right); 1411 new(zone()) LArithmeticT(instr->op(), context, left, right);
1412 return MarkAsCall(DefineFixed(result, eax), instr); 1412 return MarkAsCall(DefineFixed(result, eax), instr);
1413 } 1413 }
1414 } 1414 }
1415 1415
1416 1416
1417 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) {
1418 ASSERT(instr->value()->representation().IsInteger32());
1419 ASSERT(instr->representation().IsInteger32());
1420 if (instr->HasNoUses()) return NULL;
1421 LOperand* input = UseRegisterAtStart(instr->value());
1422 LBitNotI* result = new(zone()) LBitNotI(input);
1423 return DefineSameAsFirst(result);
1424 }
1425
1426
1427 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { 1417 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
1428 if (instr->representation().IsDouble()) { 1418 if (instr->representation().IsDouble()) {
1429 return DoArithmeticD(Token::DIV, instr); 1419 return DoArithmeticD(Token::DIV, instr);
1430 } else if (instr->representation().IsSmiOrInteger32()) { 1420 } else if (instr->representation().IsSmiOrInteger32()) {
1431 ASSERT(instr->left()->representation().Equals(instr->representation())); 1421 ASSERT(instr->left()->representation().Equals(instr->representation()));
1432 ASSERT(instr->right()->representation().Equals(instr->representation())); 1422 ASSERT(instr->right()->representation().Equals(instr->representation()));
1433 if (instr->HasPowerOf2Divisor()) { 1423 if (instr->HasPowerOf2Divisor()) {
1434 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); 1424 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero));
1435 LOperand* value = UseRegisterAtStart(instr->left()); 1425 LOperand* value = UseRegisterAtStart(instr->left());
1436 LDivI* div = 1426 LDivI* div =
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2721 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2732 LOperand* object = UseRegister(instr->object()); 2722 LOperand* object = UseRegister(instr->object());
2733 LOperand* index = UseTempRegister(instr->index()); 2723 LOperand* index = UseTempRegister(instr->index());
2734 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2724 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2735 } 2725 }
2736 2726
2737 2727
2738 } } // namespace v8::internal 2728 } } // namespace v8::internal
2739 2729
2740 #endif // V8_TARGET_ARCH_IA32 2730 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ic.h » ('j') | src/x64/lithium-codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698