OLD | NEW |
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 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2277 B(ne, not_found); | 2277 B(ne, not_found); |
2278 | 2278 |
2279 // Get the result from the cache. | 2279 // Get the result from the cache. |
2280 Bind(&load_result_from_cache); | 2280 Bind(&load_result_from_cache); |
2281 Ldr(result, FieldMemOperand(scratch, FixedArray::kHeaderSize + kPointerSize)); | 2281 Ldr(result, FieldMemOperand(scratch, FixedArray::kHeaderSize + kPointerSize)); |
2282 IncrementCounter(isolate()->counters()->number_to_string_native(), 1, | 2282 IncrementCounter(isolate()->counters()->number_to_string_native(), 1, |
2283 scratch1, scratch2); | 2283 scratch1, scratch2); |
2284 } | 2284 } |
2285 | 2285 |
2286 | 2286 |
2287 void MacroAssembler::TryConvertDoubleToInt(Register as_int, | 2287 void MacroAssembler::TryRepresentDoubleAsInt(Register as_int, |
2288 FPRegister value, | 2288 FPRegister value, |
2289 FPRegister scratch_d, | 2289 FPRegister scratch_d, |
2290 Label* on_successful_conversion, | 2290 Label* on_successful_conversion, |
2291 Label* on_failed_conversion) { | 2291 Label* on_failed_conversion) { |
2292 // Convert to an int and back again, then compare with the original value. | 2292 // Convert to an int and back again, then compare with the original value. |
2293 Fcvtzs(as_int, value); | 2293 Fcvtzs(as_int, value); |
2294 Scvtf(scratch_d, as_int); | 2294 Scvtf(scratch_d, as_int); |
2295 Fcmp(value, scratch_d); | 2295 Fcmp(value, scratch_d); |
2296 | 2296 |
2297 if (on_successful_conversion) { | 2297 if (on_successful_conversion) { |
2298 B(on_successful_conversion, eq); | 2298 B(on_successful_conversion, eq); |
2299 } | 2299 } |
2300 if (on_failed_conversion) { | 2300 if (on_failed_conversion) { |
2301 B(on_failed_conversion, ne); | 2301 B(on_failed_conversion, ne); |
(...skipping 2936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5238 } | 5238 } |
5239 } | 5239 } |
5240 | 5240 |
5241 | 5241 |
5242 #undef __ | 5242 #undef __ |
5243 | 5243 |
5244 | 5244 |
5245 } } // namespace v8::internal | 5245 } } // namespace v8::internal |
5246 | 5246 |
5247 #endif // V8_TARGET_ARCH_ARM64 | 5247 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |