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

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

Issue 579713002: X87: enable the crankshaft compiler for X87 port. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: rebase code Created 6 years, 3 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
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/lithium-codegen-x87.h
diff --git a/src/x87/lithium-codegen-x87.h b/src/x87/lithium-codegen-x87.h
index 080a468292a710d48853ea1c6a0602fe7919ce01..db562129673829f7bfda5523b39bd01778e7a98e 100644
--- a/src/x87/lithium-codegen-x87.h
+++ b/src/x87/lithium-codegen-x87.h
@@ -5,6 +5,7 @@
#ifndef V8_X87_LITHIUM_CODEGEN_X87_H_
#define V8_X87_LITHIUM_CODEGEN_X87_H_
+#include <map>
#include "src/x87/lithium-x87.h"
#include "src/base/logging.h"
@@ -84,6 +85,8 @@ class LCodeGen: public LCodeGenBase {
X87OperandType operand = kX87DoubleOperand);
void X87Mov(Operand src, X87Register reg,
X87OperandType operand = kX87DoubleOperand);
+ void X87Mov(X87Register reg, X87Register src,
+ X87OperandType operand = kX87DoubleOperand);
void X87PrepareBinaryOp(
X87Register left, X87Register right, X87Register result);
@@ -200,7 +203,8 @@ class LCodeGen: public LCodeGenBase {
void CallRuntime(const Runtime::Function* fun,
int argc,
- LInstruction* instr);
+ LInstruction* instr,
+ SaveFPRegsMode save_doubles = kDontSaveFPRegs);
void CallRuntime(Runtime::FunctionId id,
int argc,
@@ -376,7 +380,7 @@ class LCodeGen: public LCodeGenBase {
int osr_pc_offset_;
bool frame_is_built_;
- class X87Stack {
+ class X87Stack : public ZoneObject {
public:
explicit X87Stack(MacroAssembler* masm)
: stack_depth_(0), is_mutable_(true), masm_(masm) { }
@@ -393,14 +397,23 @@ class LCodeGen: public LCodeGenBase {
}
return true;
}
+ X87Stack& operator=(const X87Stack& other) {
+ stack_depth_ = other.stack_depth_;
+ for (int i = 0; i < stack_depth_; i++) {
+ stack_[i] = other.stack_[i];
+ }
+ return *this;
+ }
bool Contains(X87Register reg);
void Fxch(X87Register reg, int other_slot = 0);
void Free(X87Register reg);
void PrepareToWrite(X87Register reg);
void CommitWrite(X87Register reg);
void FlushIfNecessary(LInstruction* instr, LCodeGen* cgen);
- void LeavingBlock(int current_block_id, LGoto* goto_instr);
+ void LeavingBlock(int current_block_id, LGoto* goto_instr, LCodeGen* cgen);
int depth() const { return stack_depth_; }
+ int GetLayout();
+ int st(X87Register reg) { return st2idx(ArrayIndex(reg)); }
void pop() {
DCHECK(is_mutable_);
stack_depth_--;
@@ -425,6 +438,9 @@ class LCodeGen: public LCodeGenBase {
MacroAssembler* masm_;
};
X87Stack x87_stack_;
+ // block_id -> X87Stack*;
+ typedef std::map<int, X87Stack*> X87StackMap;
+ X87StackMap x87_stack_map_;
// Builder that keeps track of safepoints in the code. The table
// itself is emitted at the end of the generated code.
@@ -458,6 +474,7 @@ class LCodeGen: public LCodeGenBase {
friend class LDeferredCode;
friend class LEnvironment;
friend class SafepointGenerator;
+ friend class X87Stack;
DISALLOW_COPY_AND_ASSIGN(LCodeGen);
};
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698