| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3861 // Hoisted load. vldr requires offset to be a multiple of 4 so we can | 3861 // Hoisted load. vldr requires offset to be a multiple of 4 so we can |
| 3862 // not include -kHeapObjectTag into it. | 3862 // not include -kHeapObjectTag into it. |
| 3863 __ sub(r5, value, Operand(kHeapObjectTag)); | 3863 __ sub(r5, value, Operand(kHeapObjectTag)); |
| 3864 __ vldr(d0, r5, HeapNumber::kValueOffset); | 3864 __ vldr(d0, r5, HeapNumber::kValueOffset); |
| 3865 | 3865 |
| 3866 __ Sbfx(r6, r6, HeapNumber::kExponentShift, HeapNumber::kExponentBits); | 3866 __ Sbfx(r6, r6, HeapNumber::kExponentShift, HeapNumber::kExponentBits); |
| 3867 // NaNs and Infinities have all-one exponents so they sign extend to -1. | 3867 // NaNs and Infinities have all-one exponents so they sign extend to -1. |
| 3868 __ cmp(r6, Operand(-1)); | 3868 __ cmp(r6, Operand(-1)); |
| 3869 __ mov(r5, Operand(0), LeaveCC, eq); | 3869 __ mov(r5, Operand(0), LeaveCC, eq); |
| 3870 | 3870 |
| 3871 // Not infinity or NaN simply convert to int. | 3871 __ vcvt_s32_f64(s0, d0, kDefaultRoundToZero, ne); |
| 3872 if (IsElementTypeSigned(array_type)) { | |
| 3873 __ vcvt_s32_f64(s0, d0, kDefaultRoundToZero, ne); | |
| 3874 } else { | |
| 3875 __ vcvt_u32_f64(s0, d0, kDefaultRoundToZero, ne); | |
| 3876 } | |
| 3877 __ vmov(r5, s0, ne); | 3872 __ vmov(r5, s0, ne); |
| 3878 | 3873 |
| 3879 switch (array_type) { | 3874 switch (array_type) { |
| 3880 case kExternalByteArray: | 3875 case kExternalByteArray: |
| 3881 case kExternalUnsignedByteArray: | 3876 case kExternalUnsignedByteArray: |
| 3882 __ strb(r5, MemOperand(r3, r4, LSL, 0)); | 3877 __ strb(r5, MemOperand(r3, r4, LSL, 0)); |
| 3883 break; | 3878 break; |
| 3884 case kExternalShortArray: | 3879 case kExternalShortArray: |
| 3885 case kExternalUnsignedShortArray: | 3880 case kExternalUnsignedShortArray: |
| 3886 __ strh(r5, MemOperand(r3, r4, LSL, 1)); | 3881 __ strh(r5, MemOperand(r3, r4, LSL, 1)); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4053 | 4048 |
| 4054 return GetCode(flags); | 4049 return GetCode(flags); |
| 4055 } | 4050 } |
| 4056 | 4051 |
| 4057 | 4052 |
| 4058 #undef __ | 4053 #undef __ |
| 4059 | 4054 |
| 4060 } } // namespace v8::internal | 4055 } } // namespace v8::internal |
| 4061 | 4056 |
| 4062 #endif // V8_TARGET_ARCH_ARM | 4057 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |