| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 namespace v8 { | 43 namespace v8 { |
| 44 namespace internal { | 44 namespace internal { |
| 45 | 45 |
| 46 // ----------------------------------------------------------------------------- | 46 // ----------------------------------------------------------------------------- |
| 47 // Implementation of CpuFeatures | 47 // Implementation of CpuFeatures |
| 48 | 48 |
| 49 // Safe default is no features. | 49 // Safe default is no features. |
| 50 uint64_t CpuFeatures::supported_ = 0; | 50 uint64_t CpuFeatures::supported_ = 0; |
| 51 uint64_t CpuFeatures::enabled_ = 0; | 51 uint64_t CpuFeatures::enabled_ = 0; |
| 52 uint64_t CpuFeatures::found_by_runtime_probing_ = 0; |
| 52 | 53 |
| 53 | 54 |
| 54 // The Probe method needs executable memory, so it uses Heap::CreateCode. | 55 // The Probe method needs executable memory, so it uses Heap::CreateCode. |
| 55 // Allocation failure is silent and leads to safe default. | 56 // Allocation failure is silent and leads to safe default. |
| 56 void CpuFeatures::Probe() { | 57 void CpuFeatures::Probe() { |
| 57 ASSERT(Heap::HasBeenSetup()); | 58 ASSERT(Heap::HasBeenSetup()); |
| 58 ASSERT(supported_ == 0); | 59 ASSERT(supported_ == 0); |
| 59 if (Serializer::enabled()) return; // No features if we might serialize. | 60 if (Serializer::enabled()) { |
| 61 supported_ |= OS::CpuFeaturesImpliedByPlatform(); |
| 62 return; // No features if we might serialize. |
| 63 } |
| 60 | 64 |
| 61 Assembler assm(NULL, 0); | 65 Assembler assm(NULL, 0); |
| 62 Label cpuid, done; | 66 Label cpuid, done; |
| 63 #define __ assm. | 67 #define __ assm. |
| 64 // Save old esp, since we are going to modify the stack. | 68 // Save old esp, since we are going to modify the stack. |
| 65 __ push(ebp); | 69 __ push(ebp); |
| 66 __ pushfd(); | 70 __ pushfd(); |
| 67 __ push(ecx); | 71 __ push(ecx); |
| 68 __ push(ebx); | 72 __ push(ebx); |
| 69 __ mov(ebp, Operand(esp)); | 73 __ mov(ebp, Operand(esp)); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 Object* code = Heap::CreateCode(desc, | 121 Object* code = Heap::CreateCode(desc, |
| 118 NULL, | 122 NULL, |
| 119 Code::ComputeFlags(Code::STUB), | 123 Code::ComputeFlags(Code::STUB), |
| 120 Handle<Code>::null()); | 124 Handle<Code>::null()); |
| 121 if (!code->IsCode()) return; | 125 if (!code->IsCode()) return; |
| 122 LOG(CodeCreateEvent(Logger::BUILTIN_TAG, | 126 LOG(CodeCreateEvent(Logger::BUILTIN_TAG, |
| 123 Code::cast(code), "CpuFeatures::Probe")); | 127 Code::cast(code), "CpuFeatures::Probe")); |
| 124 typedef uint64_t (*F0)(); | 128 typedef uint64_t (*F0)(); |
| 125 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); | 129 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); |
| 126 supported_ = probe(); | 130 supported_ = probe(); |
| 131 found_by_runtime_probing_ = supported_; |
| 132 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform(); |
| 133 supported_ |= os_guarantees; |
| 134 found_by_runtime_probing_ &= ~os_guarantees; |
| 127 } | 135 } |
| 128 | 136 |
| 129 | 137 |
| 130 // ----------------------------------------------------------------------------- | 138 // ----------------------------------------------------------------------------- |
| 131 // Implementation of Displacement | 139 // Implementation of Displacement |
| 132 | 140 |
| 133 void Displacement::init(Label* L, Type type) { | 141 void Displacement::init(Label* L, Type type) { |
| 134 ASSERT(!L->is_bound()); | 142 ASSERT(!L->is_bound()); |
| 135 int next = 0; | 143 int next = 0; |
| 136 if (L->is_linked()) { | 144 if (L->is_linked()) { |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 361 |
| 354 void Assembler::Align(int m) { | 362 void Assembler::Align(int m) { |
| 355 ASSERT(IsPowerOf2(m)); | 363 ASSERT(IsPowerOf2(m)); |
| 356 while ((pc_offset() & (m - 1)) != 0) { | 364 while ((pc_offset() & (m - 1)) != 0) { |
| 357 nop(); | 365 nop(); |
| 358 } | 366 } |
| 359 } | 367 } |
| 360 | 368 |
| 361 | 369 |
| 362 void Assembler::cpuid() { | 370 void Assembler::cpuid() { |
| 363 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::CPUID)); | 371 ASSERT(CpuFeatures::IsEnabled(CPUID)); |
| 364 EnsureSpace ensure_space(this); | 372 EnsureSpace ensure_space(this); |
| 365 last_pc_ = pc_; | 373 last_pc_ = pc_; |
| 366 EMIT(0x0F); | 374 EMIT(0x0F); |
| 367 EMIT(0xA2); | 375 EMIT(0xA2); |
| 368 } | 376 } |
| 369 | 377 |
| 370 | 378 |
| 371 void Assembler::pushad() { | 379 void Assembler::pushad() { |
| 372 EnsureSpace ensure_space(this); | 380 EnsureSpace ensure_space(this); |
| 373 last_pc_ = pc_; | 381 last_pc_ = pc_; |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 void Assembler::movzx_w(Register dst, const Operand& src) { | 713 void Assembler::movzx_w(Register dst, const Operand& src) { |
| 706 EnsureSpace ensure_space(this); | 714 EnsureSpace ensure_space(this); |
| 707 last_pc_ = pc_; | 715 last_pc_ = pc_; |
| 708 EMIT(0x0F); | 716 EMIT(0x0F); |
| 709 EMIT(0xB7); | 717 EMIT(0xB7); |
| 710 emit_operand(dst, src); | 718 emit_operand(dst, src); |
| 711 } | 719 } |
| 712 | 720 |
| 713 | 721 |
| 714 void Assembler::cmov(Condition cc, Register dst, int32_t imm32) { | 722 void Assembler::cmov(Condition cc, Register dst, int32_t imm32) { |
| 715 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::CMOV)); | 723 ASSERT(CpuFeatures::IsEnabled(CMOV)); |
| 716 EnsureSpace ensure_space(this); | 724 EnsureSpace ensure_space(this); |
| 717 last_pc_ = pc_; | 725 last_pc_ = pc_; |
| 718 UNIMPLEMENTED(); | 726 UNIMPLEMENTED(); |
| 719 USE(cc); | 727 USE(cc); |
| 720 USE(dst); | 728 USE(dst); |
| 721 USE(imm32); | 729 USE(imm32); |
| 722 } | 730 } |
| 723 | 731 |
| 724 | 732 |
| 725 void Assembler::cmov(Condition cc, Register dst, Handle<Object> handle) { | 733 void Assembler::cmov(Condition cc, Register dst, Handle<Object> handle) { |
| 726 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::CMOV)); | 734 ASSERT(CpuFeatures::IsEnabled(CMOV)); |
| 727 EnsureSpace ensure_space(this); | 735 EnsureSpace ensure_space(this); |
| 728 last_pc_ = pc_; | 736 last_pc_ = pc_; |
| 729 UNIMPLEMENTED(); | 737 UNIMPLEMENTED(); |
| 730 USE(cc); | 738 USE(cc); |
| 731 USE(dst); | 739 USE(dst); |
| 732 USE(handle); | 740 USE(handle); |
| 733 } | 741 } |
| 734 | 742 |
| 735 | 743 |
| 736 void Assembler::cmov(Condition cc, Register dst, const Operand& src) { | 744 void Assembler::cmov(Condition cc, Register dst, const Operand& src) { |
| 737 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::CMOV)); | 745 ASSERT(CpuFeatures::IsEnabled(CMOV)); |
| 738 EnsureSpace ensure_space(this); | 746 EnsureSpace ensure_space(this); |
| 739 last_pc_ = pc_; | 747 last_pc_ = pc_; |
| 740 // Opcode: 0f 40 + cc /r | 748 // Opcode: 0f 40 + cc /r |
| 741 EMIT(0x0F); | 749 EMIT(0x0F); |
| 742 EMIT(0x40 + cc); | 750 EMIT(0x40 + cc); |
| 743 emit_operand(dst, src); | 751 emit_operand(dst, src); |
| 744 } | 752 } |
| 745 | 753 |
| 746 | 754 |
| 747 void Assembler::xchg(Register dst, Register src) { | 755 void Assembler::xchg(Register dst, Register src) { |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 | 1317 |
| 1310 | 1318 |
| 1311 void Assembler::nop() { | 1319 void Assembler::nop() { |
| 1312 EnsureSpace ensure_space(this); | 1320 EnsureSpace ensure_space(this); |
| 1313 last_pc_ = pc_; | 1321 last_pc_ = pc_; |
| 1314 EMIT(0x90); | 1322 EMIT(0x90); |
| 1315 } | 1323 } |
| 1316 | 1324 |
| 1317 | 1325 |
| 1318 void Assembler::rdtsc() { | 1326 void Assembler::rdtsc() { |
| 1319 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::RDTSC)); | 1327 ASSERT(CpuFeatures::IsEnabled(RDTSC)); |
| 1320 EnsureSpace ensure_space(this); | 1328 EnsureSpace ensure_space(this); |
| 1321 last_pc_ = pc_; | 1329 last_pc_ = pc_; |
| 1322 EMIT(0x0F); | 1330 EMIT(0x0F); |
| 1323 EMIT(0x31); | 1331 EMIT(0x31); |
| 1324 } | 1332 } |
| 1325 | 1333 |
| 1326 | 1334 |
| 1327 void Assembler::ret(int imm16) { | 1335 void Assembler::ret(int imm16) { |
| 1328 EnsureSpace ensure_space(this); | 1336 EnsureSpace ensure_space(this); |
| 1329 last_pc_ = pc_; | 1337 last_pc_ = pc_; |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 | 1663 |
| 1656 void Assembler::fistp_s(const Operand& adr) { | 1664 void Assembler::fistp_s(const Operand& adr) { |
| 1657 EnsureSpace ensure_space(this); | 1665 EnsureSpace ensure_space(this); |
| 1658 last_pc_ = pc_; | 1666 last_pc_ = pc_; |
| 1659 EMIT(0xDB); | 1667 EMIT(0xDB); |
| 1660 emit_operand(ebx, adr); | 1668 emit_operand(ebx, adr); |
| 1661 } | 1669 } |
| 1662 | 1670 |
| 1663 | 1671 |
| 1664 void Assembler::fisttp_s(const Operand& adr) { | 1672 void Assembler::fisttp_s(const Operand& adr) { |
| 1665 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE3)); | 1673 ASSERT(CpuFeatures::IsEnabled(SSE3)); |
| 1666 EnsureSpace ensure_space(this); | 1674 EnsureSpace ensure_space(this); |
| 1667 last_pc_ = pc_; | 1675 last_pc_ = pc_; |
| 1668 EMIT(0xDB); | 1676 EMIT(0xDB); |
| 1669 emit_operand(ecx, adr); | 1677 emit_operand(ecx, adr); |
| 1670 } | 1678 } |
| 1671 | 1679 |
| 1672 | 1680 |
| 1673 void Assembler::fist_s(const Operand& adr) { | 1681 void Assembler::fist_s(const Operand& adr) { |
| 1674 EnsureSpace ensure_space(this); | 1682 EnsureSpace ensure_space(this); |
| 1675 last_pc_ = pc_; | 1683 last_pc_ = pc_; |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 ASSERT(reg.is_byte_register()); | 1924 ASSERT(reg.is_byte_register()); |
| 1917 EnsureSpace ensure_space(this); | 1925 EnsureSpace ensure_space(this); |
| 1918 last_pc_ = pc_; | 1926 last_pc_ = pc_; |
| 1919 EMIT(0x0F); | 1927 EMIT(0x0F); |
| 1920 EMIT(0x90 | cc); | 1928 EMIT(0x90 | cc); |
| 1921 EMIT(0xC0 | reg.code()); | 1929 EMIT(0xC0 | reg.code()); |
| 1922 } | 1930 } |
| 1923 | 1931 |
| 1924 | 1932 |
| 1925 void Assembler::cvttss2si(Register dst, const Operand& src) { | 1933 void Assembler::cvttss2si(Register dst, const Operand& src) { |
| 1926 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 1934 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 1927 EnsureSpace ensure_space(this); | 1935 EnsureSpace ensure_space(this); |
| 1928 last_pc_ = pc_; | 1936 last_pc_ = pc_; |
| 1929 EMIT(0xF3); | 1937 EMIT(0xF3); |
| 1930 EMIT(0x0F); | 1938 EMIT(0x0F); |
| 1931 EMIT(0x2C); | 1939 EMIT(0x2C); |
| 1932 emit_operand(dst, src); | 1940 emit_operand(dst, src); |
| 1933 } | 1941 } |
| 1934 | 1942 |
| 1935 | 1943 |
| 1936 void Assembler::cvttsd2si(Register dst, const Operand& src) { | 1944 void Assembler::cvttsd2si(Register dst, const Operand& src) { |
| 1937 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 1945 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 1938 EnsureSpace ensure_space(this); | 1946 EnsureSpace ensure_space(this); |
| 1939 last_pc_ = pc_; | 1947 last_pc_ = pc_; |
| 1940 EMIT(0xF2); | 1948 EMIT(0xF2); |
| 1941 EMIT(0x0F); | 1949 EMIT(0x0F); |
| 1942 EMIT(0x2C); | 1950 EMIT(0x2C); |
| 1943 emit_operand(dst, src); | 1951 emit_operand(dst, src); |
| 1944 } | 1952 } |
| 1945 | 1953 |
| 1946 | 1954 |
| 1947 void Assembler::cvtsi2sd(XMMRegister dst, const Operand& src) { | 1955 void Assembler::cvtsi2sd(XMMRegister dst, const Operand& src) { |
| 1948 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 1956 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 1949 EnsureSpace ensure_space(this); | 1957 EnsureSpace ensure_space(this); |
| 1950 last_pc_ = pc_; | 1958 last_pc_ = pc_; |
| 1951 EMIT(0xF2); | 1959 EMIT(0xF2); |
| 1952 EMIT(0x0F); | 1960 EMIT(0x0F); |
| 1953 EMIT(0x2A); | 1961 EMIT(0x2A); |
| 1954 emit_sse_operand(dst, src); | 1962 emit_sse_operand(dst, src); |
| 1955 } | 1963 } |
| 1956 | 1964 |
| 1957 | 1965 |
| 1958 void Assembler::addsd(XMMRegister dst, XMMRegister src) { | 1966 void Assembler::addsd(XMMRegister dst, XMMRegister src) { |
| 1959 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 1967 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 1960 EnsureSpace ensure_space(this); | 1968 EnsureSpace ensure_space(this); |
| 1961 last_pc_ = pc_; | 1969 last_pc_ = pc_; |
| 1962 EMIT(0xF2); | 1970 EMIT(0xF2); |
| 1963 EMIT(0x0F); | 1971 EMIT(0x0F); |
| 1964 EMIT(0x58); | 1972 EMIT(0x58); |
| 1965 emit_sse_operand(dst, src); | 1973 emit_sse_operand(dst, src); |
| 1966 } | 1974 } |
| 1967 | 1975 |
| 1968 | 1976 |
| 1969 void Assembler::mulsd(XMMRegister dst, XMMRegister src) { | 1977 void Assembler::mulsd(XMMRegister dst, XMMRegister src) { |
| 1970 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 1978 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 1971 EnsureSpace ensure_space(this); | 1979 EnsureSpace ensure_space(this); |
| 1972 last_pc_ = pc_; | 1980 last_pc_ = pc_; |
| 1973 EMIT(0xF2); | 1981 EMIT(0xF2); |
| 1974 EMIT(0x0F); | 1982 EMIT(0x0F); |
| 1975 EMIT(0x59); | 1983 EMIT(0x59); |
| 1976 emit_sse_operand(dst, src); | 1984 emit_sse_operand(dst, src); |
| 1977 } | 1985 } |
| 1978 | 1986 |
| 1979 | 1987 |
| 1980 void Assembler::subsd(XMMRegister dst, XMMRegister src) { | 1988 void Assembler::subsd(XMMRegister dst, XMMRegister src) { |
| 1981 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 1989 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 1982 EnsureSpace ensure_space(this); | 1990 EnsureSpace ensure_space(this); |
| 1983 last_pc_ = pc_; | 1991 last_pc_ = pc_; |
| 1984 EMIT(0xF2); | 1992 EMIT(0xF2); |
| 1985 EMIT(0x0F); | 1993 EMIT(0x0F); |
| 1986 EMIT(0x5C); | 1994 EMIT(0x5C); |
| 1987 emit_sse_operand(dst, src); | 1995 emit_sse_operand(dst, src); |
| 1988 } | 1996 } |
| 1989 | 1997 |
| 1990 | 1998 |
| 1991 void Assembler::divsd(XMMRegister dst, XMMRegister src) { | 1999 void Assembler::divsd(XMMRegister dst, XMMRegister src) { |
| 1992 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 2000 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 1993 EnsureSpace ensure_space(this); | 2001 EnsureSpace ensure_space(this); |
| 1994 last_pc_ = pc_; | 2002 last_pc_ = pc_; |
| 1995 EMIT(0xF2); | 2003 EMIT(0xF2); |
| 1996 EMIT(0x0F); | 2004 EMIT(0x0F); |
| 1997 EMIT(0x5E); | 2005 EMIT(0x5E); |
| 1998 emit_sse_operand(dst, src); | 2006 emit_sse_operand(dst, src); |
| 1999 } | 2007 } |
| 2000 | 2008 |
| 2001 | 2009 |
| 2002 void Assembler::comisd(XMMRegister dst, XMMRegister src) { | 2010 void Assembler::comisd(XMMRegister dst, XMMRegister src) { |
| 2003 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 2011 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 2004 EnsureSpace ensure_space(this); | 2012 EnsureSpace ensure_space(this); |
| 2005 last_pc_ = pc_; | 2013 last_pc_ = pc_; |
| 2006 EMIT(0x66); | 2014 EMIT(0x66); |
| 2007 EMIT(0x0F); | 2015 EMIT(0x0F); |
| 2008 EMIT(0x2F); | 2016 EMIT(0x2F); |
| 2009 emit_sse_operand(dst, src); | 2017 emit_sse_operand(dst, src); |
| 2010 } | 2018 } |
| 2011 | 2019 |
| 2012 | 2020 |
| 2013 void Assembler::movdbl(XMMRegister dst, const Operand& src) { | 2021 void Assembler::movdbl(XMMRegister dst, const Operand& src) { |
| 2014 EnsureSpace ensure_space(this); | 2022 EnsureSpace ensure_space(this); |
| 2015 last_pc_ = pc_; | 2023 last_pc_ = pc_; |
| 2016 movsd(dst, src); | 2024 movsd(dst, src); |
| 2017 } | 2025 } |
| 2018 | 2026 |
| 2019 | 2027 |
| 2020 void Assembler::movdbl(const Operand& dst, XMMRegister src) { | 2028 void Assembler::movdbl(const Operand& dst, XMMRegister src) { |
| 2021 EnsureSpace ensure_space(this); | 2029 EnsureSpace ensure_space(this); |
| 2022 last_pc_ = pc_; | 2030 last_pc_ = pc_; |
| 2023 movsd(dst, src); | 2031 movsd(dst, src); |
| 2024 } | 2032 } |
| 2025 | 2033 |
| 2026 | 2034 |
| 2027 void Assembler::movsd(const Operand& dst, XMMRegister src ) { | 2035 void Assembler::movsd(const Operand& dst, XMMRegister src ) { |
| 2028 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 2036 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 2029 EnsureSpace ensure_space(this); | 2037 EnsureSpace ensure_space(this); |
| 2030 last_pc_ = pc_; | 2038 last_pc_ = pc_; |
| 2031 EMIT(0xF2); // double | 2039 EMIT(0xF2); // double |
| 2032 EMIT(0x0F); | 2040 EMIT(0x0F); |
| 2033 EMIT(0x11); // store | 2041 EMIT(0x11); // store |
| 2034 emit_sse_operand(src, dst); | 2042 emit_sse_operand(src, dst); |
| 2035 } | 2043 } |
| 2036 | 2044 |
| 2037 | 2045 |
| 2038 void Assembler::movsd(XMMRegister dst, const Operand& src) { | 2046 void Assembler::movsd(XMMRegister dst, const Operand& src) { |
| 2039 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 2047 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 2040 EnsureSpace ensure_space(this); | 2048 EnsureSpace ensure_space(this); |
| 2041 last_pc_ = pc_; | 2049 last_pc_ = pc_; |
| 2042 EMIT(0xF2); // double | 2050 EMIT(0xF2); // double |
| 2043 EMIT(0x0F); | 2051 EMIT(0x0F); |
| 2044 EMIT(0x10); // load | 2052 EMIT(0x10); // load |
| 2045 emit_sse_operand(dst, src); | 2053 emit_sse_operand(dst, src); |
| 2046 } | 2054 } |
| 2047 | 2055 |
| 2048 | 2056 |
| 2049 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) { | 2057 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) { |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 | 2246 |
| 2239 void Assembler::dd(uint32_t data, RelocInfo::Mode reloc_info) { | 2247 void Assembler::dd(uint32_t data, RelocInfo::Mode reloc_info) { |
| 2240 EnsureSpace ensure_space(this); | 2248 EnsureSpace ensure_space(this); |
| 2241 emit(data, reloc_info); | 2249 emit(data, reloc_info); |
| 2242 } | 2250 } |
| 2243 | 2251 |
| 2244 | 2252 |
| 2245 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { | 2253 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
| 2246 ASSERT(rmode != RelocInfo::NONE); | 2254 ASSERT(rmode != RelocInfo::NONE); |
| 2247 // Don't record external references unless the heap will be serialized. | 2255 // Don't record external references unless the heap will be serialized. |
| 2248 if (rmode == RelocInfo::EXTERNAL_REFERENCE && | 2256 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
| 2249 !Serializer::enabled() && | 2257 #ifdef DEBUG |
| 2250 !FLAG_debug_code) { | 2258 if (!Serializer::enabled()) { |
| 2251 return; | 2259 Serializer::TooLateToEnableNow(); |
| 2260 } |
| 2261 #endif |
| 2262 if (!Serializer::enabled() && !FLAG_debug_code) { |
| 2263 return; |
| 2264 } |
| 2252 } | 2265 } |
| 2253 RelocInfo rinfo(pc_, rmode, data); | 2266 RelocInfo rinfo(pc_, rmode, data); |
| 2254 reloc_info_writer.Write(&rinfo); | 2267 reloc_info_writer.Write(&rinfo); |
| 2255 } | 2268 } |
| 2256 | 2269 |
| 2257 | 2270 |
| 2258 #ifdef GENERATED_CODE_COVERAGE | 2271 #ifdef GENERATED_CODE_COVERAGE |
| 2259 static FILE* coverage_log = NULL; | 2272 static FILE* coverage_log = NULL; |
| 2260 | 2273 |
| 2261 | 2274 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2274 push_insn[1] = 13; // Skip over coverage insns. | 2287 push_insn[1] = 13; // Skip over coverage insns. |
| 2275 if (coverage_log != NULL) { | 2288 if (coverage_log != NULL) { |
| 2276 fprintf(coverage_log, "%s\n", file_line); | 2289 fprintf(coverage_log, "%s\n", file_line); |
| 2277 fflush(coverage_log); | 2290 fflush(coverage_log); |
| 2278 } | 2291 } |
| 2279 } | 2292 } |
| 2280 | 2293 |
| 2281 #endif | 2294 #endif |
| 2282 | 2295 |
| 2283 } } // namespace v8::internal | 2296 } } // namespace v8::internal |
| OLD | NEW |