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

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

Issue 201106: Fix bug that errnoeously sets FPU exception. (Closed)
Patch Set: Created 11 years, 3 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
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 movq(Operand(kScratchRegister, 0), rsp); 1273 movq(Operand(kScratchRegister, 0), rsp);
1274 } 1274 }
1275 1275
1276 1276
1277 void MacroAssembler::Ret() { 1277 void MacroAssembler::Ret() {
1278 ret(0); 1278 ret(0);
1279 } 1279 }
1280 1280
1281 1281
1282 void MacroAssembler::FCmp() { 1282 void MacroAssembler::FCmp() {
1283 fcompp(); 1283 fucompp();
1284 push(rax); 1284 push(rax);
1285 fnstsw_ax(); 1285 fnstsw_ax();
1286 if (CpuFeatures::IsSupported(CpuFeatures::SAHF)) { 1286 if (CpuFeatures::IsSupported(CpuFeatures::SAHF)) {
1287 sahf(); 1287 sahf();
1288 } else { 1288 } else {
1289 shrl(rax, Immediate(8)); 1289 shrl(rax, Immediate(8));
1290 and_(rax, Immediate(0xFF)); 1290 and_(rax, Immediate(0xFF));
1291 push(rax); 1291 push(rax);
1292 popfq(); 1292 popfq();
1293 } 1293 }
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 // Indicate that code has changed. 2100 // Indicate that code has changed.
2101 CPU::FlushICache(address_, size_); 2101 CPU::FlushICache(address_, size_);
2102 2102
2103 // Check that the code was patched as expected. 2103 // Check that the code was patched as expected.
2104 ASSERT(masm_.pc_ == address_ + size_); 2104 ASSERT(masm_.pc_ == address_ + size_);
2105 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2105 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2106 } 2106 }
2107 2107
2108 2108
2109 } } // namespace v8::internal 2109 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698