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

Side by Side Diff: src/code-stubs.h

Issue 23129003: Arm support for DoubleToIStub (truncating). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix CALL_GENERATED_CODE call when on native. 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
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | test/cctest/cctest.gyp » ('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 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 1697
1698 DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementStub); 1698 DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementStub);
1699 }; 1699 };
1700 1700
1701 1701
1702 class DoubleToIStub : public PlatformCodeStub { 1702 class DoubleToIStub : public PlatformCodeStub {
1703 public: 1703 public:
1704 DoubleToIStub(Register source, 1704 DoubleToIStub(Register source,
1705 Register destination, 1705 Register destination,
1706 int offset, 1706 int offset,
1707 bool is_truncating) : bit_field_(0) { 1707 bool is_truncating,
1708 bool skip_fastpath = false) : bit_field_(0) {
1708 bit_field_ = SourceRegisterBits::encode(source.code_) | 1709 bit_field_ = SourceRegisterBits::encode(source.code_) |
1709 DestinationRegisterBits::encode(destination.code_) | 1710 DestinationRegisterBits::encode(destination.code_) |
1710 OffsetBits::encode(offset) | 1711 OffsetBits::encode(offset) |
1711 IsTruncatingBits::encode(is_truncating); 1712 IsTruncatingBits::encode(is_truncating) |
1713 SkipFastPathBits::encode(skip_fastpath);
1712 } 1714 }
1713 1715
1714 Register source() { 1716 Register source() {
1715 Register result = { SourceRegisterBits::decode(bit_field_) }; 1717 Register result = { SourceRegisterBits::decode(bit_field_) };
1716 return result; 1718 return result;
1717 } 1719 }
1718 1720
1719 Register destination() { 1721 Register destination() {
1720 Register result = { DestinationRegisterBits::decode(bit_field_) }; 1722 Register result = { DestinationRegisterBits::decode(bit_field_) };
1721 return result; 1723 return result;
1722 } 1724 }
1723 1725
1724 bool is_truncating() { 1726 bool is_truncating() {
1725 return IsTruncatingBits::decode(bit_field_); 1727 return IsTruncatingBits::decode(bit_field_);
1726 } 1728 }
1727 1729
1730 bool skip_fastpath() {
1731 return SkipFastPathBits::decode(bit_field_);
1732 }
1733
1728 int offset() { 1734 int offset() {
1729 return OffsetBits::decode(bit_field_); 1735 return OffsetBits::decode(bit_field_);
1730 } 1736 }
1731 1737
1732 void Generate(MacroAssembler* masm); 1738 void Generate(MacroAssembler* masm);
1733 1739
1740 virtual bool SometimesSetsUpAFrame() { return false; }
1741
1734 private: 1742 private:
1735 static const int kBitsPerRegisterNumber = 6; 1743 static const int kBitsPerRegisterNumber = 6;
1736 STATIC_ASSERT((1L << kBitsPerRegisterNumber) >= Register::kNumRegisters); 1744 STATIC_ASSERT((1L << kBitsPerRegisterNumber) >= Register::kNumRegisters);
1737 class SourceRegisterBits: 1745 class SourceRegisterBits:
1738 public BitField<int, 0, kBitsPerRegisterNumber> {}; // NOLINT 1746 public BitField<int, 0, kBitsPerRegisterNumber> {}; // NOLINT
1739 class DestinationRegisterBits: 1747 class DestinationRegisterBits:
1740 public BitField<int, kBitsPerRegisterNumber, 1748 public BitField<int, kBitsPerRegisterNumber,
1741 kBitsPerRegisterNumber> {}; // NOLINT 1749 kBitsPerRegisterNumber> {}; // NOLINT
1742 class IsTruncatingBits: 1750 class IsTruncatingBits:
1743 public BitField<bool, 2 * kBitsPerRegisterNumber, 1> {}; // NOLINT 1751 public BitField<bool, 2 * kBitsPerRegisterNumber, 1> {}; // NOLINT
1744 class OffsetBits: 1752 class OffsetBits:
1745 public BitField<int, 2 * kBitsPerRegisterNumber + 1, 3> {}; // NOLINT 1753 public BitField<int, 2 * kBitsPerRegisterNumber + 1, 3> {}; // NOLINT
1754 class SkipFastPathBits:
1755 public BitField<int, 2 * kBitsPerRegisterNumber + 4, 1> {}; // NOLINT
1746 1756
1747 Major MajorKey() { return DoubleToI; } 1757 Major MajorKey() { return DoubleToI; }
1748 int MinorKey() { return bit_field_; } 1758 int MinorKey() { return bit_field_; }
1749 1759
1750 int bit_field_; 1760 int bit_field_;
1751 1761
1752 DISALLOW_COPY_AND_ASSIGN(DoubleToIStub); 1762 DISALLOW_COPY_AND_ASSIGN(DoubleToIStub);
1753 }; 1763 };
1754 1764
1755 1765
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
2307 int MinorKey() { return 0; } 2317 int MinorKey() { return 0; }
2308 2318
2309 void Generate(MacroAssembler* masm); 2319 void Generate(MacroAssembler* masm);
2310 2320
2311 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2321 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2312 }; 2322 };
2313 2323
2314 } } // namespace v8::internal 2324 } } // namespace v8::internal
2315 2325
2316 #endif // V8_CODE_STUBS_H_ 2326 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698