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

Side by Side Diff: src/arm/simulator-arm.cc

Issue 11033005: Add rotate-right instruction to hydrogen and use it instead of bitwise operations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 8 years, 1 month 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-codegen-arm.cc ('k') | src/hydrogen.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 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 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 *carry_out = (result < 0); 1452 *carry_out = (result < 0);
1453 result = 0; 1453 result = 0;
1454 } else { 1454 } else {
1455 *carry_out = false; 1455 *carry_out = false;
1456 result = 0; 1456 result = 0;
1457 } 1457 }
1458 break; 1458 break;
1459 } 1459 }
1460 1460
1461 case ROR: { 1461 case ROR: {
1462 UNIMPLEMENTED(); 1462 if (shift_amount == 0) {
1463 *carry_out = c_flag_;
1464 } else {
1465 uint32_t left = static_cast<uint32_t>(result) >> shift_amount;
1466 uint32_t right = static_cast<uint32_t>(result) << (32 - shift_amount);
1467 result = right | left;
1468 *carry_out = (static_cast<uint32_t>(result) >> 31) != 0;
1469 }
1463 break; 1470 break;
1464 } 1471 }
1465 1472
1466 default: { 1473 default: {
1467 UNREACHABLE(); 1474 UNREACHABLE();
1468 break; 1475 break;
1469 } 1476 }
1470 } 1477 }
1471 } 1478 }
1472 return result; 1479 return result;
(...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 uintptr_t address = *stack_slot; 3385 uintptr_t address = *stack_slot;
3379 set_register(sp, current_sp + sizeof(uintptr_t)); 3386 set_register(sp, current_sp + sizeof(uintptr_t));
3380 return address; 3387 return address;
3381 } 3388 }
3382 3389
3383 } } // namespace v8::internal 3390 } } // namespace v8::internal
3384 3391
3385 #endif // USE_SIMULATOR 3392 #endif // USE_SIMULATOR
3386 3393
3387 #endif // V8_TARGET_ARCH_ARM 3394 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698