| 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 are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // 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 17 matching lines...) Expand all Loading... |
| 28 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 28 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 29 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 | 30 |
| 31 // The original source code covered by the above license above has been | 31 // The original source code covered by the above license above has been |
| 32 // modified significantly by Google Inc. | 32 // modified significantly by Google Inc. |
| 33 // Copyright 2012 the V8 project authors. All rights reserved. | 33 // Copyright 2012 the V8 project authors. All rights reserved. |
| 34 | 34 |
| 35 #include "src/assembler.h" | 35 #include "src/assembler.h" |
| 36 | 36 |
| 37 #include <math.h> | 37 #include <math.h> |
| 38 #include <string.h> |
| 38 #include <cmath> | 39 #include <cmath> |
| 40 |
| 39 #include "src/api.h" | 41 #include "src/api.h" |
| 40 #include "src/base/cpu.h" | 42 #include "src/base/cpu.h" |
| 41 #include "src/base/functional.h" | 43 #include "src/base/functional.h" |
| 42 #include "src/base/ieee754.h" | 44 #include "src/base/ieee754.h" |
| 43 #include "src/base/lazy-instance.h" | 45 #include "src/base/lazy-instance.h" |
| 44 #include "src/base/platform/platform.h" | 46 #include "src/base/platform/platform.h" |
| 45 #include "src/base/utils/random-number-generator.h" | 47 #include "src/base/utils/random-number-generator.h" |
| 46 #include "src/codegen.h" | 48 #include "src/codegen.h" |
| 47 #include "src/counters.h" | 49 #include "src/counters.h" |
| 48 #include "src/debug/debug.h" | 50 #include "src/debug/debug.h" |
| (...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1544 ExternalReference ExternalReference::ieee754_tan_function(Isolate* isolate) { | 1546 ExternalReference ExternalReference::ieee754_tan_function(Isolate* isolate) { |
| 1545 return ExternalReference( | 1547 return ExternalReference( |
| 1546 Redirect(isolate, FUNCTION_ADDR(base::ieee754::tan), BUILTIN_FP_CALL)); | 1548 Redirect(isolate, FUNCTION_ADDR(base::ieee754::tan), BUILTIN_FP_CALL)); |
| 1547 } | 1549 } |
| 1548 | 1550 |
| 1549 ExternalReference ExternalReference::ieee754_tanh_function(Isolate* isolate) { | 1551 ExternalReference ExternalReference::ieee754_tanh_function(Isolate* isolate) { |
| 1550 return ExternalReference( | 1552 return ExternalReference( |
| 1551 Redirect(isolate, FUNCTION_ADDR(base::ieee754::tanh), BUILTIN_FP_CALL)); | 1553 Redirect(isolate, FUNCTION_ADDR(base::ieee754::tanh), BUILTIN_FP_CALL)); |
| 1552 } | 1554 } |
| 1553 | 1555 |
| 1556 void* libc_memchr(void* string, int character, size_t search_length) { |
| 1557 return memchr(string, character, search_length); |
| 1558 } |
| 1559 |
| 1560 ExternalReference ExternalReference::libc_memchr_function(Isolate* isolate) { |
| 1561 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(libc_memchr))); |
| 1562 } |
| 1563 |
| 1554 ExternalReference ExternalReference::page_flags(Page* page) { | 1564 ExternalReference ExternalReference::page_flags(Page* page) { |
| 1555 return ExternalReference(reinterpret_cast<Address>(page) + | 1565 return ExternalReference(reinterpret_cast<Address>(page) + |
| 1556 MemoryChunk::kFlagsOffset); | 1566 MemoryChunk::kFlagsOffset); |
| 1557 } | 1567 } |
| 1558 | 1568 |
| 1559 | 1569 |
| 1560 ExternalReference ExternalReference::ForDeoptEntry(Address entry) { | 1570 ExternalReference ExternalReference::ForDeoptEntry(Address entry) { |
| 1561 return ExternalReference(entry); | 1571 return ExternalReference(entry); |
| 1562 } | 1572 } |
| 1563 | 1573 |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 | 1940 |
| 1931 | 1941 |
| 1932 void Assembler::DataAlign(int m) { | 1942 void Assembler::DataAlign(int m) { |
| 1933 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1943 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 1934 while ((pc_offset() & (m - 1)) != 0) { | 1944 while ((pc_offset() & (m - 1)) != 0) { |
| 1935 db(0); | 1945 db(0); |
| 1936 } | 1946 } |
| 1937 } | 1947 } |
| 1938 } // namespace internal | 1948 } // namespace internal |
| 1939 } // namespace v8 | 1949 } // namespace v8 |
| OLD | NEW |