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

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

Issue 300004: X64 Win64: Reimplement fmod so that it works. (Closed)
Patch Set: And it lints. 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 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 void MacroAssembler::Push(Smi* source) { 1306 void MacroAssembler::Push(Smi* source) {
1307 intptr_t smi = reinterpret_cast<intptr_t>(source); 1307 intptr_t smi = reinterpret_cast<intptr_t>(source);
1308 if (is_int32(smi)) { 1308 if (is_int32(smi)) {
1309 push(Immediate(static_cast<int32_t>(smi))); 1309 push(Immediate(static_cast<int32_t>(smi)));
1310 } else { 1310 } else {
1311 Set(kScratchRegister, smi); 1311 Set(kScratchRegister, smi);
1312 push(kScratchRegister); 1312 push(kScratchRegister);
1313 } 1313 }
1314 } 1314 }
1315 1315
1316 1316
William Hesse 2009/10/20 14:50:51 Can this load optimization, and the Operand + disp
Lasse Reichstein 2009/10/22 11:22:53 I'm dropping this approach, going for a replacemen
1317 void MacroAssembler::FLoadSmi(const Operand& src) {
1318 fild_s(Operand(src, kIntSize));
1319 }
1320
1321
1317 void MacroAssembler::Test(const Operand& src, Smi* source) { 1322 void MacroAssembler::Test(const Operand& src, Smi* source) {
1318 intptr_t smi = reinterpret_cast<intptr_t>(source); 1323 intptr_t smi = reinterpret_cast<intptr_t>(source);
1319 if (is_int32(smi)) { 1324 if (is_int32(smi)) {
1320 testl(src, Immediate(static_cast<int32_t>(smi))); 1325 testl(src, Immediate(static_cast<int32_t>(smi)));
1321 } else { 1326 } else {
1322 Move(kScratchRegister, source); 1327 Move(kScratchRegister, source);
1323 testq(src, kScratchRegister); 1328 testq(src, kScratchRegister);
1324 } 1329 }
1325 } 1330 }
1326 1331
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 CodePatcher::~CodePatcher() { 2230 CodePatcher::~CodePatcher() {
2226 // Indicate that code has changed. 2231 // Indicate that code has changed.
2227 CPU::FlushICache(address_, size_); 2232 CPU::FlushICache(address_, size_);
2228 2233
2229 // Check that the code was patched as expected. 2234 // Check that the code was patched as expected.
2230 ASSERT(masm_.pc_ == address_ + size_); 2235 ASSERT(masm_.pc_ == address_ + size_);
2231 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2236 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2232 } 2237 }
2233 2238
2234 } } // namespace v8::internal 2239 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698