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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 8699004: Shorten FP register pops where possible. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3738 matching lines...) Expand 10 before | Expand all | Expand 10 after
3749 // Load x87 register with heap number. 3749 // Load x87 register with heap number.
3750 __ fld_d(FieldOperand(input_reg, HeapNumber::kValueOffset)); 3750 __ fld_d(FieldOperand(input_reg, HeapNumber::kValueOffset));
3751 // Get exponent alone and check for too-big exponent. 3751 // Get exponent alone and check for too-big exponent.
3752 __ mov(input_reg, FieldOperand(input_reg, HeapNumber::kExponentOffset)); 3752 __ mov(input_reg, FieldOperand(input_reg, HeapNumber::kExponentOffset));
3753 __ and_(input_reg, HeapNumber::kExponentMask); 3753 __ and_(input_reg, HeapNumber::kExponentMask);
3754 const uint32_t kTooBigExponent = 3754 const uint32_t kTooBigExponent =
3755 (HeapNumber::kExponentBias + 63) << HeapNumber::kExponentShift; 3755 (HeapNumber::kExponentBias + 63) << HeapNumber::kExponentShift;
3756 __ cmp(Operand(input_reg), Immediate(kTooBigExponent)); 3756 __ cmp(Operand(input_reg), Immediate(kTooBigExponent));
3757 __ j(less, &convert, Label::kNear); 3757 __ j(less, &convert, Label::kNear);
3758 // Pop FPU stack before deoptimizing. 3758 // Pop FPU stack before deoptimizing.
3759 __ ffree(0); 3759 __ fstp(0);
3760 __ fincstp();
3761 DeoptimizeIf(no_condition, instr->environment()); 3760 DeoptimizeIf(no_condition, instr->environment());
3762 3761
3763 // Reserve space for 64 bit answer. 3762 // Reserve space for 64 bit answer.
3764 __ bind(&convert); 3763 __ bind(&convert);
3765 __ sub(Operand(esp), Immediate(kDoubleSize)); 3764 __ sub(Operand(esp), Immediate(kDoubleSize));
3766 // Do conversion, which cannot fail because we checked the exponent. 3765 // Do conversion, which cannot fail because we checked the exponent.
3767 __ fisttp_d(Operand(esp, 0)); 3766 __ fisttp_d(Operand(esp, 0));
3768 __ mov(input_reg, Operand(esp, 0)); // Low word of answer is the result. 3767 __ mov(input_reg, Operand(esp, 0)); // Low word of answer is the result.
3769 __ add(Operand(esp), Immediate(kDoubleSize)); 3768 __ add(Operand(esp), Immediate(kDoubleSize));
3770 } else { 3769 } else {
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
4632 this, pointers, Safepoint::kLazyDeopt); 4631 this, pointers, Safepoint::kLazyDeopt);
4633 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4632 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4634 } 4633 }
4635 4634
4636 4635
4637 #undef __ 4636 #undef __
4638 4637
4639 } } // namespace v8::internal 4638 } } // namespace v8::internal
4640 4639
4641 #endif // V8_TARGET_ARCH_IA32 4640 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698