| 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 ASSERT(CpuFeatures::IsEnabled(CMOV)); | 745 ASSERT(CpuFeatures::IsEnabled(CMOV)); |
| 746 EnsureSpace ensure_space(this); | 746 EnsureSpace ensure_space(this); |
| 747 last_pc_ = pc_; | 747 last_pc_ = pc_; |
| 748 // Opcode: 0f 40 + cc /r | 748 // Opcode: 0f 40 + cc /r |
| 749 EMIT(0x0F); | 749 EMIT(0x0F); |
| 750 EMIT(0x40 + cc); | 750 EMIT(0x40 + cc); |
| 751 emit_operand(dst, src); | 751 emit_operand(dst, src); |
| 752 } | 752 } |
| 753 | 753 |
| 754 | 754 |
| 755 void Assembler::rep_movs() { |
| 756 EnsureSpace ensure_space(this); |
| 757 last_pc_ = pc_; |
| 758 EMIT(0xF3); |
| 759 EMIT(0xA5); |
| 760 } |
| 761 |
| 762 |
| 755 void Assembler::xchg(Register dst, Register src) { | 763 void Assembler::xchg(Register dst, Register src) { |
| 756 EnsureSpace ensure_space(this); | 764 EnsureSpace ensure_space(this); |
| 757 last_pc_ = pc_; | 765 last_pc_ = pc_; |
| 758 if (src.is(eax) || dst.is(eax)) { // Single-byte encoding | 766 if (src.is(eax) || dst.is(eax)) { // Single-byte encoding |
| 759 EMIT(0x90 | (src.is(eax) ? dst.code() : src.code())); | 767 EMIT(0x90 | (src.is(eax) ? dst.code() : src.code())); |
| 760 } else { | 768 } else { |
| 761 EMIT(0x87); | 769 EMIT(0x87); |
| 762 EMIT(0xC0 | src.code() << 3 | dst.code()); | 770 EMIT(0xC0 | src.code() << 3 | dst.code()); |
| 763 } | 771 } |
| 764 } | 772 } |
| (...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2028 ASSERT(CpuFeatures::IsEnabled(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(0x66); | 2039 EMIT(0x66); |
| 2032 EMIT(0x0F); | 2040 EMIT(0x0F); |
| 2033 EMIT(0x2F); | 2041 EMIT(0x2F); |
| 2034 emit_sse_operand(dst, src); | 2042 emit_sse_operand(dst, src); |
| 2035 } | 2043 } |
| 2036 | 2044 |
| 2037 | 2045 |
| 2046 void Assembler::movdqa(const Operand& dst, XMMRegister src ) { |
| 2047 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 2048 EnsureSpace ensure_space(this); |
| 2049 last_pc_ = pc_; |
| 2050 EMIT(0x66); |
| 2051 EMIT(0x0F); |
| 2052 EMIT(0x7F); |
| 2053 emit_sse_operand(src, dst); |
| 2054 } |
| 2055 |
| 2056 |
| 2057 void Assembler::movdqa(XMMRegister dst, const Operand& src) { |
| 2058 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 2059 EnsureSpace ensure_space(this); |
| 2060 last_pc_ = pc_; |
| 2061 EMIT(0x66); |
| 2062 EMIT(0x0F); |
| 2063 EMIT(0x6F); |
| 2064 emit_sse_operand(dst, src); |
| 2065 } |
| 2066 |
| 2067 |
| 2068 void Assembler::movdqu(const Operand& dst, XMMRegister src ) { |
| 2069 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 2070 EnsureSpace ensure_space(this); |
| 2071 last_pc_ = pc_; |
| 2072 EMIT(0xF3); |
| 2073 EMIT(0x0F); |
| 2074 EMIT(0x7F); |
| 2075 emit_sse_operand(src, dst); |
| 2076 } |
| 2077 |
| 2078 |
| 2079 void Assembler::movdqu(XMMRegister dst, const Operand& src) { |
| 2080 ASSERT(CpuFeatures::IsEnabled(SSE2)); |
| 2081 EnsureSpace ensure_space(this); |
| 2082 last_pc_ = pc_; |
| 2083 EMIT(0xF3); |
| 2084 EMIT(0x0F); |
| 2085 EMIT(0x6F); |
| 2086 emit_sse_operand(dst, src); |
| 2087 } |
| 2088 |
| 2089 |
| 2038 void Assembler::movdbl(XMMRegister dst, const Operand& src) { | 2090 void Assembler::movdbl(XMMRegister dst, const Operand& src) { |
| 2039 EnsureSpace ensure_space(this); | 2091 EnsureSpace ensure_space(this); |
| 2040 last_pc_ = pc_; | 2092 last_pc_ = pc_; |
| 2041 movsd(dst, src); | 2093 movsd(dst, src); |
| 2042 } | 2094 } |
| 2043 | 2095 |
| 2044 | 2096 |
| 2045 void Assembler::movdbl(const Operand& dst, XMMRegister src) { | 2097 void Assembler::movdbl(const Operand& dst, XMMRegister src) { |
| 2046 EnsureSpace ensure_space(this); | 2098 EnsureSpace ensure_space(this); |
| 2047 last_pc_ = pc_; | 2099 last_pc_ = pc_; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2304 push_insn[1] = 13; // Skip over coverage insns. | 2356 push_insn[1] = 13; // Skip over coverage insns. |
| 2305 if (coverage_log != NULL) { | 2357 if (coverage_log != NULL) { |
| 2306 fprintf(coverage_log, "%s\n", file_line); | 2358 fprintf(coverage_log, "%s\n", file_line); |
| 2307 fflush(coverage_log); | 2359 fflush(coverage_log); |
| 2308 } | 2360 } |
| 2309 } | 2361 } |
| 2310 | 2362 |
| 2311 #endif | 2363 #endif |
| 2312 | 2364 |
| 2313 } } // namespace v8::internal | 2365 } } // namespace v8::internal |
| OLD | NEW |