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

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

Issue 170383003: Merge a few A64 utils into the CompilerIntrinsics. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes and cleaning Created 6 years, 10 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 | « no previous file | src/a64/utils-a64.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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 case RBIT_w: set_wreg(dst, ReverseBits(wreg(src), kWRegSize)); break; 1608 case RBIT_w: set_wreg(dst, ReverseBits(wreg(src), kWRegSize)); break;
1609 case RBIT_x: set_xreg(dst, ReverseBits(xreg(src), kXRegSize)); break; 1609 case RBIT_x: set_xreg(dst, ReverseBits(xreg(src), kXRegSize)); break;
1610 case REV16_w: set_wreg(dst, ReverseBytes(wreg(src), Reverse16)); break; 1610 case REV16_w: set_wreg(dst, ReverseBytes(wreg(src), Reverse16)); break;
1611 case REV16_x: set_xreg(dst, ReverseBytes(xreg(src), Reverse16)); break; 1611 case REV16_x: set_xreg(dst, ReverseBytes(xreg(src), Reverse16)); break;
1612 case REV_w: set_wreg(dst, ReverseBytes(wreg(src), Reverse32)); break; 1612 case REV_w: set_wreg(dst, ReverseBytes(wreg(src), Reverse32)); break;
1613 case REV32_x: set_xreg(dst, ReverseBytes(xreg(src), Reverse32)); break; 1613 case REV32_x: set_xreg(dst, ReverseBytes(xreg(src), Reverse32)); break;
1614 case REV_x: set_xreg(dst, ReverseBytes(xreg(src), Reverse64)); break; 1614 case REV_x: set_xreg(dst, ReverseBytes(xreg(src), Reverse64)); break;
1615 case CLZ_w: set_wreg(dst, CountLeadingZeros(wreg(src), kWRegSize)); break; 1615 case CLZ_w: set_wreg(dst, CountLeadingZeros(wreg(src), kWRegSize)); break;
1616 case CLZ_x: set_xreg(dst, CountLeadingZeros(xreg(src), kXRegSize)); break; 1616 case CLZ_x: set_xreg(dst, CountLeadingZeros(xreg(src), kXRegSize)); break;
1617 case CLS_w: { 1617 case CLS_w: {
1618 set_wreg(dst, CountLeadingSignBits(wreg(src), kWRegSize)); 1618 set_wreg(dst, CountRedundantLeadingSignBits(wreg(src), kWRegSize));
1619 break; 1619 break;
1620 } 1620 }
1621 case CLS_x: { 1621 case CLS_x: {
1622 set_xreg(dst, CountLeadingSignBits(xreg(src), kXRegSize)); 1622 set_xreg(dst, CountRedundantLeadingSignBits(xreg(src), kXRegSize));
1623 break; 1623 break;
1624 } 1624 }
1625 default: UNIMPLEMENTED(); 1625 default: UNIMPLEMENTED();
1626 } 1626 }
1627 } 1627 }
1628 1628
1629 1629
1630 uint64_t Simulator::ReverseBits(uint64_t value, unsigned num_bits) { 1630 uint64_t Simulator::ReverseBits(uint64_t value, unsigned num_bits) {
1631 ASSERT((num_bits == kWRegSize) || (num_bits == kXRegSize)); 1631 ASSERT((num_bits == kWRegSize) || (num_bits == kXRegSize));
1632 uint64_t result = 0; 1632 uint64_t result = 0;
(...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after
3400 default: 3400 default:
3401 UNIMPLEMENTED(); 3401 UNIMPLEMENTED();
3402 } 3402 }
3403 } 3403 }
3404 3404
3405 #endif // USE_SIMULATOR 3405 #endif // USE_SIMULATOR
3406 3406
3407 } } // namespace v8::internal 3407 } } // namespace v8::internal
3408 3408
3409 #endif // V8_TARGET_ARCH_A64 3409 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « no previous file | src/a64/utils-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698