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:
parent
7721fdc7d9
commit
88e732edbc
@ -319,7 +319,7 @@ void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
|
|||||||
|
|
||||||
|
|
||||||
void MacroAssembler::FCmp() {
|
void MacroAssembler::FCmp() {
|
||||||
fcompp();
|
fucompp();
|
||||||
push(eax);
|
push(eax);
|
||||||
fnstsw_ax();
|
fnstsw_ax();
|
||||||
sahf();
|
sahf();
|
||||||
|
@ -3696,7 +3696,7 @@ static Object* Runtime_NumberMod(Arguments args) {
|
|||||||
CONVERT_DOUBLE_CHECKED(x, args[0]);
|
CONVERT_DOUBLE_CHECKED(x, args[0]);
|
||||||
CONVERT_DOUBLE_CHECKED(y, args[1]);
|
CONVERT_DOUBLE_CHECKED(y, args[1]);
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined WIN32 || defined _WIN64
|
||||||
// Workaround MS fmod bugs. ECMA-262 says:
|
// Workaround MS fmod bugs. ECMA-262 says:
|
||||||
// dividend is finite and divisor is an infinity => result equals dividend
|
// dividend is finite and divisor is an infinity => result equals dividend
|
||||||
// dividend is a zero and divisor is nonzero finite => result equals dividend
|
// dividend is a zero and divisor is nonzero finite => result equals dividend
|
||||||
|
@ -1280,7 +1280,7 @@ void MacroAssembler::Ret() {
|
|||||||
|
|
||||||
|
|
||||||
void MacroAssembler::FCmp() {
|
void MacroAssembler::FCmp() {
|
||||||
fcompp();
|
fucompp();
|
||||||
push(rax);
|
push(rax);
|
||||||
fnstsw_ax();
|
fnstsw_ax();
|
||||||
if (CpuFeatures::IsSupported(CpuFeatures::SAHF)) {
|
if (CpuFeatures::IsSupported(CpuFeatures::SAHF)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user