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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 USE(cc); | 714 USE(cc); |
715 USE(dst); | 715 USE(dst); |
716 USE(handle); | 716 USE(handle); |
717 } | 717 } |
718 | 718 |
719 | 719 |
720 void Assembler::cmov(Condition cc, Register dst, const Operand& src) { | 720 void Assembler::cmov(Condition cc, Register dst, const Operand& src) { |
721 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::CMOV)); | 721 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::CMOV)); |
722 EnsureSpace ensure_space(this); | 722 EnsureSpace ensure_space(this); |
723 last_pc_ = pc_; | 723 last_pc_ = pc_; |
724 UNIMPLEMENTED(); | 724 // Opcode: 0f 40 + cc /r |
725 USE(cc); | 725 EMIT(0x0F); |
726 USE(dst); | 726 EMIT(0x40 + cc); |
727 USE(src); | 727 emit_operand(dst, src); |
728 } | 728 } |
729 | 729 |
730 | 730 |
731 void Assembler::xchg(Register dst, Register src) { | 731 void Assembler::xchg(Register dst, Register src) { |
732 EnsureSpace ensure_space(this); | 732 EnsureSpace ensure_space(this); |
733 last_pc_ = pc_; | 733 last_pc_ = pc_; |
734 if (src.is(eax) || dst.is(eax)) { // Single-byte encoding | 734 if (src.is(eax) || dst.is(eax)) { // Single-byte encoding |
735 EMIT(0x90 | (src.is(eax) ? dst.code() : src.code())); | 735 EMIT(0x90 | (src.is(eax) ? dst.code() : src.code())); |
736 } else { | 736 } else { |
737 EMIT(0x87); | 737 EMIT(0x87); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 } | 859 } |
860 | 860 |
861 | 861 |
862 void Assembler::cmp(const Operand& op, const Immediate& imm) { | 862 void Assembler::cmp(const Operand& op, const Immediate& imm) { |
863 EnsureSpace ensure_space(this); | 863 EnsureSpace ensure_space(this); |
864 last_pc_ = pc_; | 864 last_pc_ = pc_; |
865 emit_arith(7, op, imm); | 865 emit_arith(7, op, imm); |
866 } | 866 } |
867 | 867 |
868 | 868 |
| 869 void Assembler::cmp(const Operand& op, Handle<Object> handle) { |
| 870 EnsureSpace ensure_space(this); |
| 871 last_pc_ = pc_; |
| 872 emit_arith(7, op, Immediate(handle)); |
| 873 } |
| 874 |
| 875 |
869 void Assembler::cmpb_al(const Operand& op) { | 876 void Assembler::cmpb_al(const Operand& op) { |
870 EnsureSpace ensure_space(this); | 877 EnsureSpace ensure_space(this); |
871 last_pc_ = pc_; | 878 last_pc_ = pc_; |
872 EMIT(0x38); // CMP r/m8, r8 | 879 EMIT(0x38); // CMP r/m8, r8 |
873 emit_operand(eax, op); // eax has same code as register al. | 880 emit_operand(eax, op); // eax has same code as register al. |
874 } | 881 } |
875 | 882 |
876 | 883 |
877 void Assembler::cmpw_ax(const Operand& op) { | 884 void Assembler::cmpw_ax(const Operand& op) { |
878 EnsureSpace ensure_space(this); | 885 EnsureSpace ensure_space(this); |
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); | 1947 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); |
1941 EnsureSpace ensure_space(this); | 1948 EnsureSpace ensure_space(this); |
1942 last_pc_ = pc_; | 1949 last_pc_ = pc_; |
1943 EMIT(0xF2); | 1950 EMIT(0xF2); |
1944 EMIT(0x0F); | 1951 EMIT(0x0F); |
1945 EMIT(0x5E); | 1952 EMIT(0x5E); |
1946 emit_sse_operand(dst, src); | 1953 emit_sse_operand(dst, src); |
1947 } | 1954 } |
1948 | 1955 |
1949 | 1956 |
| 1957 void Assembler::comisd(XMMRegister dst, XMMRegister src) { |
| 1958 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE2)); |
| 1959 EnsureSpace ensure_space(this); |
| 1960 last_pc_ = pc_; |
| 1961 EMIT(0x66); |
| 1962 EMIT(0x0F); |
| 1963 EMIT(0x2F); |
| 1964 emit_sse_operand(dst, src); |
| 1965 } |
| 1966 |
| 1967 |
1950 void Assembler::movdbl(XMMRegister dst, const Operand& src) { | 1968 void Assembler::movdbl(XMMRegister dst, const Operand& src) { |
1951 EnsureSpace ensure_space(this); | 1969 EnsureSpace ensure_space(this); |
1952 last_pc_ = pc_; | 1970 last_pc_ = pc_; |
1953 movsd(dst, src); | 1971 movsd(dst, src); |
1954 } | 1972 } |
1955 | 1973 |
1956 | 1974 |
1957 void Assembler::movdbl(const Operand& dst, XMMRegister src) { | 1975 void Assembler::movdbl(const Operand& dst, XMMRegister src) { |
1958 EnsureSpace ensure_space(this); | 1976 EnsureSpace ensure_space(this); |
1959 last_pc_ = pc_; | 1977 last_pc_ = pc_; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2211 push_insn[1] = 13; // Skip over coverage insns. | 2229 push_insn[1] = 13; // Skip over coverage insns. |
2212 if (coverage_log != NULL) { | 2230 if (coverage_log != NULL) { |
2213 fprintf(coverage_log, "%s\n", file_line); | 2231 fprintf(coverage_log, "%s\n", file_line); |
2214 fflush(coverage_log); | 2232 fflush(coverage_log); |
2215 } | 2233 } |
2216 } | 2234 } |
2217 | 2235 |
2218 #endif | 2236 #endif |
2219 | 2237 |
2220 } } // namespace v8::internal | 2238 } } // namespace v8::internal |
OLD | NEW |