Chromium Code Reviews

Unified Diff: src/ia32/lithium-codegen-ia32.h

Issue 13426006: Improvements for x87 stack handling (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Improvements Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/ia32/lithium-codegen-ia32.h
diff --git a/src/ia32/lithium-codegen-ia32.h b/src/ia32/lithium-codegen-ia32.h
index 3a38e321dee5faa9df44d07c9d47ce2e5851067f..5e79936f2317298dd9f9d57b9121ab4529d4174e 100644
--- a/src/ia32/lithium-codegen-ia32.h
+++ b/src/ia32/lithium-codegen-ia32.h
@@ -68,6 +68,7 @@ class LCodeGen BASE_EMBEDDED {
osr_pc_offset_(-1),
last_lazy_deopt_pc_(0),
frame_is_built_(false),
+ x87_stack_depth_(0),
safepoints_(info->zone()),
resolver_(this),
expected_safepoint_kind_(Safepoint::kSimple) {
@@ -102,10 +103,15 @@ class LCodeGen BASE_EMBEDDED {
return Immediate(ToInteger32(LConstantOperand::cast(op)));
}
- Handle<Object> ToHandle(LConstantOperand* op) const;
+ // Support for non-sse2 (x87) floating point stack handling.
+ // These functions maintain the depth of the stack (either 0 or 1)
+ void PushX87Operand(Operand src);
+ void PushX87FloatOperand(Operand src);
+ void ReadX87Operand(Operand dst);
+ void PopX87();
+ void MarkReturnX87Result();
- // A utility for instructions that return floating point values on X87.
- void HandleX87FPReturnValue(LInstruction* instr);
+ Handle<Object> ToHandle(LConstantOperand* op) const;
// The operand denoting the second word (the one with a higher address) of
// a double stack slot.
@@ -129,6 +135,7 @@ class LCodeGen BASE_EMBEDDED {
IntegerSignedness signedness);
void DoDeferredTaggedToI(LTaggedToI* instr);
+ void DoDeferredTaggedToINoSSE2(LTaggedToINoSSE2* instr);
void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr);
void DoDeferredStackCheck(LStackCheck* instr);
void DoDeferredRandom(LRandom* instr);
@@ -315,6 +322,14 @@ class LCodeGen BASE_EMBEDDED {
LEnvironment* env,
NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED);
+ void EmitNumberUntagDNoSSE2(
+ Register input,
+ Register temp,
+ bool deoptimize_on_undefined,
+ bool deoptimize_on_minus_zero,
+ LEnvironment* env,
+ NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED);
+
// Emits optimized code for typeof x == "y". Modifies input register.
// Returns the condition on which a final split to
// true and false label should be made, to optimize fallthrough.
@@ -404,6 +419,7 @@ class LCodeGen BASE_EMBEDDED {
int osr_pc_offset_;
int last_lazy_deopt_pc_;
bool frame_is_built_;
+ int x87_stack_depth_;
// Builder that keeps track of safepoints in the code. The table
// itself is emitted at the end of the generated code.

Powered by Google App Engine