Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: src/x64/assembler-x64.cc

Issue 303034: X64/Win64: Alternative implementation of fmod in general. (Closed)
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 1963
1964 void Assembler::fstp_d(const Operand& adr) { 1964 void Assembler::fstp_d(const Operand& adr) {
1965 EnsureSpace ensure_space(this); 1965 EnsureSpace ensure_space(this);
1966 last_pc_ = pc_; 1966 last_pc_ = pc_;
1967 emit_optional_rex_32(adr); 1967 emit_optional_rex_32(adr);
1968 emit(0xDD); 1968 emit(0xDD);
1969 emit_operand(3, adr); 1969 emit_operand(3, adr);
1970 } 1970 }
1971 1971
1972 1972
1973 void Assembler::fstp(int index) {
1974 ASSERT(is_uint3(index));
1975 EnsureSpace ensure_space(this);
1976 last_pc_ = pc_;
1977 emit_farith(0xDD, 0xD8, index);
1978 }
1979
1980
1973 void Assembler::fild_s(const Operand& adr) { 1981 void Assembler::fild_s(const Operand& adr) {
1974 EnsureSpace ensure_space(this); 1982 EnsureSpace ensure_space(this);
1975 last_pc_ = pc_; 1983 last_pc_ = pc_;
1976 emit_optional_rex_32(adr); 1984 emit_optional_rex_32(adr);
1977 emit(0xDB); 1985 emit(0xDB);
1978 emit_operand(0, adr); 1986 emit_operand(0, adr);
1979 } 1987 }
1980 1988
1981 1989
1982 void Assembler::fild_d(const Operand& adr) { 1990 void Assembler::fild_d(const Operand& adr) {
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 EnsureSpace ensure_space(this); 2259 EnsureSpace ensure_space(this);
2252 last_pc_ = pc_; 2260 last_pc_ = pc_;
2253 emit(0xF2); // double 2261 emit(0xF2); // double
2254 emit_optional_rex_32(src, dst); 2262 emit_optional_rex_32(src, dst);
2255 emit(0x0F); 2263 emit(0x0F);
2256 emit(0x11); // store 2264 emit(0x11); // store
2257 emit_sse_operand(src, dst); 2265 emit_sse_operand(src, dst);
2258 } 2266 }
2259 2267
2260 2268
2261 void Assembler::movsd(Register dst, XMMRegister src) { 2269 void Assembler::movsd(XMMRegister dst, XMMRegister src) {
2262 EnsureSpace ensure_space(this); 2270 EnsureSpace ensure_space(this);
2263 last_pc_ = pc_; 2271 last_pc_ = pc_;
2264 emit(0xF2); // double 2272 emit(0xF2); // double
2265 emit_optional_rex_32(src, dst);
2266 emit(0x0F);
2267 emit(0x11); // store
2268 emit_sse_operand(src, dst);
2269 }
2270
2271
2272 void Assembler::movsd(XMMRegister dst, Register src) {
2273 EnsureSpace ensure_space(this);
2274 last_pc_ = pc_;
2275 emit(0xF2); // double
2276 emit_optional_rex_32(dst, src); 2273 emit_optional_rex_32(dst, src);
2277 emit(0x0F); 2274 emit(0x0F);
2278 emit(0x10); // load 2275 emit(0x10); // load
2279 emit_sse_operand(dst, src); 2276 emit_sse_operand(dst, src);
2280 } 2277 }
2281 2278
2282 2279
2283 void Assembler::movsd(XMMRegister dst, const Operand& src) { 2280 void Assembler::movsd(XMMRegister dst, const Operand& src) {
2284 EnsureSpace ensure_space(this); 2281 EnsureSpace ensure_space(this);
2285 last_pc_ = pc_; 2282 last_pc_ = pc_;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2467 written_position_ = current_position_; 2464 written_position_ = current_position_;
2468 } 2465 }
2469 } 2466 }
2470 2467
2471 2468
2472 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | 2469 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask |
2473 1 << RelocInfo::INTERNAL_REFERENCE | 2470 1 << RelocInfo::INTERNAL_REFERENCE |
2474 1 << RelocInfo::JS_RETURN; 2471 1 << RelocInfo::JS_RETURN;
2475 2472
2476 } } // namespace v8::internal 2473 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/codegen-x64.cc » ('j') | src/x64/codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698