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

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

Issue 205343013: Introduce andp, notp, orp and xorp for x64 port (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased with bleeding_edge Created 6 years, 9 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/x64/ic-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 // Constant can't be represented as Smi due to immediate size limit. 1396 // Constant can't be represented as Smi due to immediate size limit.
1397 ASSERT(!instr->hydrogen_value()->representation().IsSmi()); 1397 ASSERT(!instr->hydrogen_value()->representation().IsSmi());
1398 if (ToInteger32(LConstantOperand::cast(right)) < 0) { 1398 if (ToInteger32(LConstantOperand::cast(right)) < 0) {
1399 DeoptimizeIf(no_condition, instr->environment()); 1399 DeoptimizeIf(no_condition, instr->environment());
1400 } else if (ToInteger32(LConstantOperand::cast(right)) == 0) { 1400 } else if (ToInteger32(LConstantOperand::cast(right)) == 0) {
1401 __ cmpl(kScratchRegister, Immediate(0)); 1401 __ cmpl(kScratchRegister, Immediate(0));
1402 DeoptimizeIf(less, instr->environment()); 1402 DeoptimizeIf(less, instr->environment());
1403 } 1403 }
1404 } else if (right->IsStackSlot()) { 1404 } else if (right->IsStackSlot()) {
1405 if (instr->hydrogen_value()->representation().IsSmi()) { 1405 if (instr->hydrogen_value()->representation().IsSmi()) {
1406 __ or_(kScratchRegister, ToOperand(right)); 1406 __ orp(kScratchRegister, ToOperand(right));
1407 } else { 1407 } else {
1408 __ orl(kScratchRegister, ToOperand(right)); 1408 __ orl(kScratchRegister, ToOperand(right));
1409 } 1409 }
1410 DeoptimizeIf(sign, instr->environment()); 1410 DeoptimizeIf(sign, instr->environment());
1411 } else { 1411 } else {
1412 // Test the non-zero operand for negative sign. 1412 // Test the non-zero operand for negative sign.
1413 if (instr->hydrogen_value()->representation().IsSmi()) { 1413 if (instr->hydrogen_value()->representation().IsSmi()) {
1414 __ or_(kScratchRegister, ToRegister(right)); 1414 __ orp(kScratchRegister, ToRegister(right));
1415 } else { 1415 } else {
1416 __ orl(kScratchRegister, ToRegister(right)); 1416 __ orl(kScratchRegister, ToRegister(right));
1417 } 1417 }
1418 DeoptimizeIf(sign, instr->environment()); 1418 DeoptimizeIf(sign, instr->environment());
1419 } 1419 }
1420 __ bind(&done); 1420 __ bind(&done);
1421 } 1421 }
1422 } 1422 }
1423 1423
1424 1424
(...skipping 19 matching lines...) Expand all
1444 __ xorl(ToRegister(left), Immediate(right_operand)); 1444 __ xorl(ToRegister(left), Immediate(right_operand));
1445 } 1445 }
1446 break; 1446 break;
1447 default: 1447 default:
1448 UNREACHABLE(); 1448 UNREACHABLE();
1449 break; 1449 break;
1450 } 1450 }
1451 } else if (right->IsStackSlot()) { 1451 } else if (right->IsStackSlot()) {
1452 switch (instr->op()) { 1452 switch (instr->op()) {
1453 case Token::BIT_AND: 1453 case Token::BIT_AND:
1454 __ and_(ToRegister(left), ToOperand(right)); 1454 __ andp(ToRegister(left), ToOperand(right));
1455 break; 1455 break;
1456 case Token::BIT_OR: 1456 case Token::BIT_OR:
1457 __ or_(ToRegister(left), ToOperand(right)); 1457 __ orp(ToRegister(left), ToOperand(right));
1458 break; 1458 break;
1459 case Token::BIT_XOR: 1459 case Token::BIT_XOR:
1460 __ xor_(ToRegister(left), ToOperand(right)); 1460 __ xorp(ToRegister(left), ToOperand(right));
1461 break; 1461 break;
1462 default: 1462 default:
1463 UNREACHABLE(); 1463 UNREACHABLE();
1464 break; 1464 break;
1465 } 1465 }
1466 } else { 1466 } else {
1467 ASSERT(right->IsRegister()); 1467 ASSERT(right->IsRegister());
1468 switch (instr->op()) { 1468 switch (instr->op()) {
1469 case Token::BIT_AND: 1469 case Token::BIT_AND:
1470 __ and_(ToRegister(left), ToRegister(right)); 1470 __ andp(ToRegister(left), ToRegister(right));
1471 break; 1471 break;
1472 case Token::BIT_OR: 1472 case Token::BIT_OR:
1473 __ or_(ToRegister(left), ToRegister(right)); 1473 __ orp(ToRegister(left), ToRegister(right));
1474 break; 1474 break;
1475 case Token::BIT_XOR: 1475 case Token::BIT_XOR:
1476 __ xor_(ToRegister(left), ToRegister(right)); 1476 __ xorp(ToRegister(left), ToRegister(right));
1477 break; 1477 break;
1478 default: 1478 default:
1479 UNREACHABLE(); 1479 UNREACHABLE();
1480 break; 1480 break;
1481 } 1481 }
1482 } 1482 }
1483 } 1483 }
1484 1484
1485 1485
1486 void LCodeGen::DoShiftI(LShiftI* instr) { 1486 void LCodeGen::DoShiftI(LShiftI* instr) {
(...skipping 4163 matching lines...) Expand 10 before | Expand all | Expand 10 after
5650 FixedArray::kHeaderSize - kPointerSize)); 5650 FixedArray::kHeaderSize - kPointerSize));
5651 __ bind(&done); 5651 __ bind(&done);
5652 } 5652 }
5653 5653
5654 5654
5655 #undef __ 5655 #undef __
5656 5656
5657 } } // namespace v8::internal 5657 } } // namespace v8::internal
5658 5658
5659 #endif // V8_TARGET_ARCH_X64 5659 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/ic-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698