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

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

Issue 18041003: Implement X87 stack tracking and x87 multiplication (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/ia32/lithium-codegen-ia32.h
diff --git a/src/ia32/lithium-codegen-ia32.h b/src/ia32/lithium-codegen-ia32.h
index d05da8a0841bb8f9328997ef4444282aa2a069f8..0e8be82efacbfd6ee19e16dff6f0ed18a6798ee4 100644
--- a/src/ia32/lithium-codegen-ia32.h
+++ b/src/ia32/lithium-codegen-ia32.h
@@ -105,7 +105,7 @@ class LCodeGen BASE_EMBEDDED {
Operand ToOperand(LOperand* op) const;
Register ToRegister(LOperand* op) const;
XMMRegister ToDoubleRegister(LOperand* op) const;
- bool IsX87TopOfStack(LOperand* op) const;
+ X87Register ToX87Register(LOperand* op) const;
bool IsInteger32(LConstantOperand* op) const;
bool IsSmi(LConstantOperand* op) const;
@@ -118,13 +118,18 @@ class LCodeGen BASE_EMBEDDED {
// Support for non-sse2 (x87) floating point stack handling.
// These functions maintain the depth of the stack (either 0 or 1)
- void PushX87DoubleOperand(Operand src);
- void PushX87FloatOperand(Operand src);
- void ReadX87Operand(Operand dst);
- bool X87StackNonEmpty() const { return x87_stack_depth_ > 0; }
- void PopX87();
- void CurrentInstructionReturnsX87Result();
- void FlushX87StackIfNecessary(LInstruction* instr);
+ enum X87OperandType { kX87DoubleOperand, kX87FloatOperand, kX87IntOperand };
mvstanton 2013/07/04 12:30:55 Maybe update the comment above, it's out of date n
+
+ void X87Mov(X87Register reg, Operand src,
+ X87OperandType operand = kX87DoubleOperand);
+ void X87Mov(Operand src, X87Register reg);
+
+ void X87PrepareBinaryOp(
+ X87Register left, X87Register right, X87Register result);
+
+ void X87LoadForUsage(X87Register reg);
+ void X87PrepareToWrite(X87Register reg);
+ void X87CommitWrite(X87Register reg);
Handle<Object> ToHandle(LConstantOperand* op) const;
@@ -291,6 +296,7 @@ class LCodeGen BASE_EMBEDDED {
Register ToRegister(int index) const;
XMMRegister ToDoubleRegister(int index) const;
+ X87Register ToX87Register(int index) const;
int ToInteger32(LConstantOperand* op) const;
double ToDouble(LConstantOperand* op) const;
@@ -331,6 +337,7 @@ class LCodeGen BASE_EMBEDDED {
void EmitNumberUntagDNoSSE2(
Register input,
Register temp,
+ X87Register res_reg,
bool allow_undefined_as_nan,
bool deoptimize_on_minus_zero,
LEnvironment* env,
@@ -392,6 +399,15 @@ class LCodeGen BASE_EMBEDDED {
// register, or a stack slot operand.
void EmitPushTaggedOperand(LOperand* operand);
+ void X87Fxch(X87Register reg, int other_slot = 0);
+ void X87Fld(Operand src, X87OperandType opts);
+ void X87Free(X87Register reg);
+
+ void FlushX87StackIfNecessary(LInstruction* instr);
+ bool X87StackContains(X87Register reg);
+ int X87ArrayIndex(X87Register reg);
+ int x87_st2idx(int pos);
+
Zone* zone_;
LPlatformChunk* const chunk_;
MacroAssembler* const masm_;
@@ -413,6 +429,7 @@ class LCodeGen BASE_EMBEDDED {
int osr_pc_offset_;
int last_lazy_deopt_pc_;
bool frame_is_built_;
+ X87Register x87_stack_[8];
mvstanton 2013/07/04 12:30:55 Can you replace the constant with something more o
int x87_stack_depth_;
// Builder that keeps track of safepoints in the code. The table

Powered by Google App Engine
This is Rietveld 408576698