Fix bug that errnoeously sets FPU exception.

This has only been caught on Win64 yet.

Review URL: http://codereview.chromium.org/201106


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
lrn@chromium.org 2009-09-14 12:20:13 +00:00
parent 7721fdc7d9
commit 88e732edbc
3 changed files with 3 additions and 3 deletions

View File

@ -319,7 +319,7 @@ void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
void MacroAssembler::FCmp() {
fcompp();
fucompp();
push(eax);
fnstsw_ax();
sahf();

View File

@ -3696,7 +3696,7 @@ static Object* Runtime_NumberMod(Arguments args) {
CONVERT_DOUBLE_CHECKED(x, args[0]);
CONVERT_DOUBLE_CHECKED(y, args[1]);
#ifdef WIN32
#if defined WIN32 || defined _WIN64
// Workaround MS fmod bugs. ECMA-262 says:
// dividend is finite and divisor is an infinity => result equals dividend
// dividend is a zero and divisor is nonzero finite => result equals dividend

View File

@ -1280,7 +1280,7 @@ void MacroAssembler::Ret() {
void MacroAssembler::FCmp() {
fcompp();
fucompp();
push(rax);
fnstsw_ax();
if (CpuFeatures::IsSupported(CpuFeatures::SAHF)) {