Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 25 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 26 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 26 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 28 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 28 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 30 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 30 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 31 // OF THE POSSIBILITY OF SUCH DAMAGE. | 31 // OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 | 32 |
| 33 // The original source code covered by the above license above has been | 33 // The original source code covered by the above license above has been |
| 34 // modified significantly by Google Inc. | 34 // modified significantly by Google Inc. |
| 35 // Copyright 2010 the V8 project authors. All rights reserved. | 35 // Copyright 2010 the V8 project authors. All rights reserved. |
|
Karl Klose
2011/04/06 06:52:56
2011
Søren Thygesen Gjesse
2011/04/06 08:00:09
Done.
| |
| 36 | 36 |
| 37 #include "v8.h" | 37 #include "v8.h" |
| 38 | 38 |
| 39 #if defined(V8_TARGET_ARCH_ARM) | 39 #if defined(V8_TARGET_ARCH_ARM) |
| 40 | 40 |
| 41 #include "arm/assembler-arm-inl.h" | 41 #include "arm/assembler-arm-inl.h" |
| 42 #include "serialize.h" | 42 #include "serialize.h" |
| 43 | 43 |
| 44 namespace v8 { | 44 namespace v8 { |
| 45 namespace internal { | 45 namespace internal { |
| (...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2028 | 2028 |
| 2029 void Assembler::vstr(const SwVfpRegister src, | 2029 void Assembler::vstr(const SwVfpRegister src, |
| 2030 const MemOperand& operand, | 2030 const MemOperand& operand, |
| 2031 const Condition cond) { | 2031 const Condition cond) { |
| 2032 ASSERT(!operand.rm().is_valid()); | 2032 ASSERT(!operand.rm().is_valid()); |
| 2033 ASSERT(operand.am_ == Offset); | 2033 ASSERT(operand.am_ == Offset); |
| 2034 vldr(src, operand.rn(), operand.offset(), cond); | 2034 vldr(src, operand.rn(), operand.offset(), cond); |
| 2035 } | 2035 } |
| 2036 | 2036 |
| 2037 | 2037 |
| 2038 void Assembler::vldm(BlockAddrMode am, | |
| 2039 Register base, | |
| 2040 DwVfpRegister first, | |
| 2041 DwVfpRegister last, | |
| 2042 Condition cond) { | |
| 2043 // Instruction details available in ARM DDI 0406A, A8-626. | |
| 2044 // cond(31-28) | 110(27-25)| PUDW1(26-20) | Rbase(19-16) | | |
|
Rodolph Perfetta
2011/04/05 18:16:39
PUDW1 is bit 24-20.
Søren Thygesen Gjesse
2011/04/06 08:00:09
Done.
| |
| 2045 // first(15-12) | 1010(11-8) | (count/2) | |
|
Rodolph Perfetta
2011/04/05 18:16:39
It should be count*2.
Søren Thygesen Gjesse
2011/04/06 08:00:09
Done.
| |
| 2046 ASSERT(CpuFeatures::IsEnabled(VFP3)); | |
| 2047 ASSERT_LE(first.code(), last.code()); | |
| 2048 ASSERT(am == ia || am == ia_w || am == db_w); | |
|
Rodolph Perfetta
2011/04/05 18:16:39
if the base is r15 and writeback is on, the instru
Søren Thygesen Gjesse
2011/04/06 08:00:09
Done.
| |
| 2049 | |
| 2050 int sd, d; | |
| 2051 first.split_code(&sd, &d); | |
| 2052 int count = last.code() - first.code() + 1; | |
| 2053 emit(cond | B27 | B26 | am | d*B22 | B20 | base.code()*B16 | sd*B12 | | |
| 2054 0xB*B8 | count*2); | |
| 2055 } | |
| 2056 | |
| 2057 | |
| 2058 void Assembler::vstm(BlockAddrMode am, | |
| 2059 Register base, | |
| 2060 DwVfpRegister first, | |
| 2061 DwVfpRegister last, | |
| 2062 Condition cond) { | |
|
Rodolph Perfetta
2011/04/05 18:16:39
same as above.
Søren Thygesen Gjesse
2011/04/06 08:00:09
Done.
| |
| 2063 // Instruction details available in ARM DDI 0406A, A8-784. | |
| 2064 // cond(31-28) | 110(27-25)| PUDW0(26-20) | Rbase(19-16) | | |
| 2065 // first(15-12) | 1011(11-8) | (count/2) | |
| 2066 ASSERT(CpuFeatures::IsEnabled(VFP3)); | |
| 2067 ASSERT_LE(first.code(), last.code()); | |
| 2068 ASSERT(am == ia || am == ia_w || am == db_w); | |
| 2069 | |
| 2070 int sd, d; | |
| 2071 first.split_code(&sd, &d); | |
| 2072 int count = last.code() - first.code() + 1; | |
| 2073 emit(cond | B27 | B26 | am | d*B22 | base.code()*B16 | sd*B12 | | |
| 2074 0xB*B8 | count*2); | |
| 2075 } | |
| 2076 | |
| 2077 void Assembler::vldm(BlockAddrMode am, | |
| 2078 Register base, | |
| 2079 SwVfpRegister first, | |
| 2080 SwVfpRegister last, | |
| 2081 Condition cond) { | |
|
Rodolph Perfetta
2011/04/05 18:16:39
same as above.
Søren Thygesen Gjesse
2011/04/06 08:00:09
Done.
| |
| 2082 // Instruction details available in ARM DDI 0406A, A8-626. | |
| 2083 // cond(31-28) | 110(27-25)| PUDW1(26-20) | Rbase(19-16) | | |
| 2084 // first(15-12) | 1010(11-8) | (count/2) | |
| 2085 ASSERT(CpuFeatures::IsEnabled(VFP3)); | |
| 2086 ASSERT_LE(first.code(), last.code()); | |
| 2087 ASSERT(am == ia || am == ia_w || am == db_w); | |
| 2088 | |
| 2089 int sd, d; | |
| 2090 first.split_code(&sd, &d); | |
| 2091 int count = last.code() - first.code() + 1; | |
| 2092 emit(cond | B27 | B26 | am | d*B22 | B20 | base.code()*B16 | sd*B12 | | |
| 2093 0xA*B8 | count); | |
| 2094 } | |
| 2095 | |
| 2096 | |
| 2097 void Assembler::vstm(BlockAddrMode am, | |
| 2098 Register base, | |
| 2099 SwVfpRegister first, | |
| 2100 SwVfpRegister last, | |
| 2101 Condition cond) { | |
|
Rodolph Perfetta
2011/04/05 18:16:39
same as above.
Søren Thygesen Gjesse
2011/04/06 08:00:09
Done.
| |
| 2102 // Instruction details available in ARM DDI 0406A, A8-784. | |
| 2103 // cond(31-28) | 110(27-25)| PUDW0(26-20) | Rbase(19-16) | | |
| 2104 // first(15-12) | 1011(11-8) | (count/2) | |
| 2105 ASSERT(CpuFeatures::IsEnabled(VFP3)); | |
| 2106 ASSERT_LE(first.code(), last.code()); | |
| 2107 ASSERT(am == ia || am == ia_w || am == db_w); | |
| 2108 | |
| 2109 int sd, d; | |
| 2110 first.split_code(&sd, &d); | |
| 2111 int count = last.code() - first.code() + 1; | |
| 2112 emit(cond | B27 | B26 | am | d*B22 | base.code()*B16 | sd*B12 | | |
| 2113 0xA*B8 | count); | |
| 2114 } | |
| 2115 | |
| 2038 static void DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) { | 2116 static void DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) { |
| 2039 uint64_t i; | 2117 uint64_t i; |
| 2040 memcpy(&i, &d, 8); | 2118 memcpy(&i, &d, 8); |
| 2041 | 2119 |
| 2042 *lo = i & 0xffffffff; | 2120 *lo = i & 0xffffffff; |
| 2043 *hi = i >> 32; | 2121 *hi = i >> 32; |
| 2044 } | 2122 } |
| 2045 | 2123 |
| 2046 // Only works for little endian floating point formats. | 2124 // Only works for little endian floating point formats. |
| 2047 // We don't support VFP on the mixed endian floating point platform. | 2125 // We don't support VFP on the mixed endian floating point platform. |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2786 | 2864 |
| 2787 // Since a constant pool was just emitted, move the check offset forward by | 2865 // Since a constant pool was just emitted, move the check offset forward by |
| 2788 // the standard interval. | 2866 // the standard interval. |
| 2789 next_buffer_check_ = pc_offset() + kCheckConstInterval; | 2867 next_buffer_check_ = pc_offset() + kCheckConstInterval; |
| 2790 } | 2868 } |
| 2791 | 2869 |
| 2792 | 2870 |
| 2793 } } // namespace v8::internal | 2871 } } // namespace v8::internal |
| 2794 | 2872 |
| 2795 #endif // V8_TARGET_ARCH_ARM | 2873 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |