| OLD | NEW |
| 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 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 }; | 1867 }; |
| 1868 | 1868 |
| 1869 | 1869 |
| 1870 class DoubleToIStub : public PlatformCodeStub { | 1870 class DoubleToIStub : public PlatformCodeStub { |
| 1871 public: | 1871 public: |
| 1872 DoubleToIStub(Register source, | 1872 DoubleToIStub(Register source, |
| 1873 Register destination, | 1873 Register destination, |
| 1874 int offset, | 1874 int offset, |
| 1875 bool is_truncating, | 1875 bool is_truncating, |
| 1876 bool skip_fastpath = false) : bit_field_(0) { | 1876 bool skip_fastpath = false) : bit_field_(0) { |
| 1877 #if V8_TARGET_ARCH_A64 | |
| 1878 // TODO(jbramley): Make A64's Register type compatible with the normal code, | |
| 1879 // so we don't need this special case. | |
| 1880 bit_field_ = SourceRegisterBits::encode(source.code()) | | 1877 bit_field_ = SourceRegisterBits::encode(source.code()) | |
| 1881 DestinationRegisterBits::encode(destination.code()) | | 1878 DestinationRegisterBits::encode(destination.code()) | |
| 1882 OffsetBits::encode(offset) | | 1879 OffsetBits::encode(offset) | |
| 1883 IsTruncatingBits::encode(is_truncating) | | 1880 IsTruncatingBits::encode(is_truncating) | |
| 1884 SkipFastPathBits::encode(skip_fastpath) | | 1881 SkipFastPathBits::encode(skip_fastpath) | |
| 1885 SSEBits::encode(CpuFeatures::IsSafeForSnapshot(SSE2) ? | 1882 SSEBits::encode(CpuFeatures::IsSafeForSnapshot(SSE2) ? |
| 1886 CpuFeatures::IsSafeForSnapshot(SSE3) ? 2 : 1 : 0); | 1883 CpuFeatures::IsSafeForSnapshot(SSE3) ? 2 : 1 : 0); |
| 1887 #else | |
| 1888 bit_field_ = SourceRegisterBits::encode(source.code_) | | |
| 1889 DestinationRegisterBits::encode(destination.code_) | | |
| 1890 OffsetBits::encode(offset) | | |
| 1891 IsTruncatingBits::encode(is_truncating) | | |
| 1892 SkipFastPathBits::encode(skip_fastpath) | | |
| 1893 SSEBits::encode(CpuFeatures::IsSafeForSnapshot(SSE2) ? | |
| 1894 CpuFeatures::IsSafeForSnapshot(SSE3) ? 2 : 1 : 0); | |
| 1895 #endif | |
| 1896 } | 1884 } |
| 1897 | 1885 |
| 1898 Register source() { | 1886 Register source() { |
| 1899 #if V8_TARGET_ARCH_A64 | 1887 return Register::from_code(SourceRegisterBits::decode(bit_field_)); |
| 1900 // TODO(jbramley): Make A64's Register type compatible with the normal code, | |
| 1901 // so we don't need this special case. | |
| 1902 return Register::XRegFromCode(SourceRegisterBits::decode(bit_field_)); | |
| 1903 #else | |
| 1904 Register result = { SourceRegisterBits::decode(bit_field_) }; | |
| 1905 return result; | |
| 1906 #endif | |
| 1907 } | 1888 } |
| 1908 | 1889 |
| 1909 Register destination() { | 1890 Register destination() { |
| 1910 #if V8_TARGET_ARCH_A64 | 1891 return Register::from_code(DestinationRegisterBits::decode(bit_field_)); |
| 1911 // TODO(jbramley): Make A64's Register type compatible with the normal code, | |
| 1912 // so we don't need this special case. | |
| 1913 return Register::XRegFromCode(DestinationRegisterBits::decode(bit_field_)); | |
| 1914 #else | |
| 1915 Register result = { DestinationRegisterBits::decode(bit_field_) }; | |
| 1916 return result; | |
| 1917 #endif | |
| 1918 } | 1892 } |
| 1919 | 1893 |
| 1920 bool is_truncating() { | 1894 bool is_truncating() { |
| 1921 return IsTruncatingBits::decode(bit_field_); | 1895 return IsTruncatingBits::decode(bit_field_); |
| 1922 } | 1896 } |
| 1923 | 1897 |
| 1924 bool skip_fastpath() { | 1898 bool skip_fastpath() { |
| 1925 return SkipFastPathBits::decode(bit_field_); | 1899 return SkipFastPathBits::decode(bit_field_); |
| 1926 } | 1900 } |
| 1927 | 1901 |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 | 2482 |
| 2509 | 2483 |
| 2510 class CallDescriptors { | 2484 class CallDescriptors { |
| 2511 public: | 2485 public: |
| 2512 static void InitializeForIsolate(Isolate* isolate); | 2486 static void InitializeForIsolate(Isolate* isolate); |
| 2513 }; | 2487 }; |
| 2514 | 2488 |
| 2515 } } // namespace v8::internal | 2489 } } // namespace v8::internal |
| 2516 | 2490 |
| 2517 #endif // V8_CODE_STUBS_H_ | 2491 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |