| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 ExternalReference ExternalReference::cpu_features() { | 58 ExternalReference ExternalReference::cpu_features() { |
| 59 ASSERT(CpuFeatures::initialized_); | 59 ASSERT(CpuFeatures::initialized_); |
| 60 return ExternalReference(&CpuFeatures::supported_); | 60 return ExternalReference(&CpuFeatures::supported_); |
| 61 } | 61 } |
| 62 | 62 |
| 63 | 63 |
| 64 int IntelDoubleRegister::NumAllocatableRegisters() { | 64 int IntelDoubleRegister::NumAllocatableRegisters() { |
| 65 if (CpuFeatures::IsSupported(SSE2)) { | 65 if (CpuFeatures::IsSupported(SSE2)) { |
| 66 return XMMRegister::kNumAllocatableRegisters; | 66 return XMMRegister::kNumAllocatableRegisters; |
| 67 } else { | 67 } else { |
| 68 return X87TopOfStackRegister::kNumAllocatableRegisters; | 68 return X87Register::kNumAllocatableRegisters; |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 | 72 |
| 73 int IntelDoubleRegister::NumRegisters() { | 73 int IntelDoubleRegister::NumRegisters() { |
| 74 if (CpuFeatures::IsSupported(SSE2)) { | 74 if (CpuFeatures::IsSupported(SSE2)) { |
| 75 return XMMRegister::kNumRegisters; | 75 return XMMRegister::kNumRegisters; |
| 76 } else { | 76 } else { |
| 77 return X87TopOfStackRegister::kNumRegisters; | 77 return X87Register::kNumRegisters; |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 | 81 |
| 82 const char* IntelDoubleRegister::AllocationIndexToString(int index) { | 82 const char* IntelDoubleRegister::AllocationIndexToString(int index) { |
| 83 if (CpuFeatures::IsSupported(SSE2)) { | 83 if (CpuFeatures::IsSupported(SSE2)) { |
| 84 return XMMRegister::AllocationIndexToString(index); | 84 return XMMRegister::AllocationIndexToString(index); |
| 85 } else { | 85 } else { |
| 86 return X87TopOfStackRegister::AllocationIndexToString(index); | 86 return X87Register::AllocationIndexToString(index); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 | 90 |
| 91 // The Probe method needs executable memory, so it uses Heap::CreateCode. | 91 // The Probe method needs executable memory, so it uses Heap::CreateCode. |
| 92 // Allocation failure is silent and leads to safe default. | 92 // Allocation failure is silent and leads to safe default. |
| 93 void CpuFeatures::Probe() { | 93 void CpuFeatures::Probe() { |
| 94 ASSERT(!initialized_); | 94 ASSERT(!initialized_); |
| 95 ASSERT(supported_ == 0); | 95 ASSERT(supported_ == 0); |
| 96 #ifdef DEBUG | 96 #ifdef DEBUG |
| (...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 } | 1775 } |
| 1776 | 1776 |
| 1777 | 1777 |
| 1778 void Assembler::fisub_s(const Operand& adr) { | 1778 void Assembler::fisub_s(const Operand& adr) { |
| 1779 EnsureSpace ensure_space(this); | 1779 EnsureSpace ensure_space(this); |
| 1780 EMIT(0xDA); | 1780 EMIT(0xDA); |
| 1781 emit_operand(esp, adr); | 1781 emit_operand(esp, adr); |
| 1782 } | 1782 } |
| 1783 | 1783 |
| 1784 | 1784 |
| 1785 void Assembler::fmul_i(int i) { |
| 1786 EnsureSpace ensure_space(this); |
| 1787 emit_farith(0xD8, 0xC8, i); |
| 1788 } |
| 1789 |
| 1790 |
| 1785 void Assembler::fmul(int i) { | 1791 void Assembler::fmul(int i) { |
| 1786 EnsureSpace ensure_space(this); | 1792 EnsureSpace ensure_space(this); |
| 1787 emit_farith(0xDC, 0xC8, i); | 1793 emit_farith(0xDC, 0xC8, i); |
| 1788 } | 1794 } |
| 1789 | 1795 |
| 1790 | 1796 |
| 1791 void Assembler::fdiv(int i) { | 1797 void Assembler::fdiv(int i) { |
| 1792 EnsureSpace ensure_space(this); | 1798 EnsureSpace ensure_space(this); |
| 1793 emit_farith(0xDC, 0xF8, i); | 1799 emit_farith(0xDC, 0xF8, i); |
| 1794 } | 1800 } |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2695 fprintf(coverage_log, "%s\n", file_line); | 2701 fprintf(coverage_log, "%s\n", file_line); |
| 2696 fflush(coverage_log); | 2702 fflush(coverage_log); |
| 2697 } | 2703 } |
| 2698 } | 2704 } |
| 2699 | 2705 |
| 2700 #endif | 2706 #endif |
| 2701 | 2707 |
| 2702 } } // namespace v8::internal | 2708 } } // namespace v8::internal |
| 2703 | 2709 |
| 2704 #endif // V8_TARGET_ARCH_IA32 | 2710 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |