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

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

Issue 10984057: Replace a set of Hydrogen instructions with rotate instructions on ARM (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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/arm/lithium-arm.cc ('k') | src/arm/simulator-arm.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 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 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 if (instr->can_deopt()) { 1471 if (instr->can_deopt()) {
1472 __ mov(result, Operand(left, LSR, scratch), SetCC); 1472 __ mov(result, Operand(left, LSR, scratch), SetCC);
1473 DeoptimizeIf(mi, instr->environment()); 1473 DeoptimizeIf(mi, instr->environment());
1474 } else { 1474 } else {
1475 __ mov(result, Operand(left, LSR, scratch)); 1475 __ mov(result, Operand(left, LSR, scratch));
1476 } 1476 }
1477 break; 1477 break;
1478 case Token::SHL: 1478 case Token::SHL:
1479 __ mov(result, Operand(left, LSL, scratch)); 1479 __ mov(result, Operand(left, LSL, scratch));
1480 break; 1480 break;
1481 case Token::ROR:
1482 __ mov(result, Operand(left, ROR, scratch));
1483 break;
1481 default: 1484 default:
1482 UNREACHABLE(); 1485 UNREACHABLE();
1483 break; 1486 break;
1484 } 1487 }
1485 } else { 1488 } else {
1486 // Mask the right_op operand. 1489 // Mask the right_op operand.
1487 int value = ToInteger32(LConstantOperand::cast(right_op)); 1490 int value = ToInteger32(LConstantOperand::cast(right_op));
1488 uint8_t shift_count = static_cast<uint8_t>(value & 0x1F); 1491 uint8_t shift_count = static_cast<uint8_t>(value & 0x1F);
1489 switch (instr->op()) { 1492 switch (instr->op()) {
1490 case Token::SAR: 1493 case Token::SAR:
(...skipping 14 matching lines...) Expand all
1505 __ Move(result, left); 1508 __ Move(result, left);
1506 } 1509 }
1507 break; 1510 break;
1508 case Token::SHL: 1511 case Token::SHL:
1509 if (shift_count != 0) { 1512 if (shift_count != 0) {
1510 __ mov(result, Operand(left, LSL, shift_count)); 1513 __ mov(result, Operand(left, LSL, shift_count));
1511 } else { 1514 } else {
1512 __ Move(result, left); 1515 __ Move(result, left);
1513 } 1516 }
1514 break; 1517 break;
1518 case Token::ROR:
1519 if (shift_count != 0) {
1520 __ mov(result, Operand(left, ROR, shift_count));
1521 } else {
1522 __ Move(result, left);
1523 }
1524 break;
1515 default: 1525 default:
1516 UNREACHABLE(); 1526 UNREACHABLE();
1517 break; 1527 break;
1518 } 1528 }
1519 } 1529 }
1520 } 1530 }
1521 1531
1522 1532
1523 void LCodeGen::DoSubI(LSubI* instr) { 1533 void LCodeGen::DoSubI(LSubI* instr) {
1524 LOperand* left = instr->left(); 1534 LOperand* left = instr->left();
(...skipping 4135 matching lines...) Expand 10 before | Expand all | Expand 10 after
5660 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 5670 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
5661 __ ldr(result, FieldMemOperand(scratch, 5671 __ ldr(result, FieldMemOperand(scratch,
5662 FixedArray::kHeaderSize - kPointerSize)); 5672 FixedArray::kHeaderSize - kPointerSize));
5663 __ bind(&done); 5673 __ bind(&done);
5664 } 5674 }
5665 5675
5666 5676
5667 #undef __ 5677 #undef __
5668 5678
5669 } } // namespace v8::internal 5679 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698