Commit 49bfbb06 authored by plind44@gmail.com's avatar plind44@gmail.com

MIPS: Add HLoadRoot hydrogen instruction.

Port r16807 (257f48f)

BUG=
R=plind44@gmail.com

Review URL: https://codereview.chromium.org/24134004

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1b03642b
......@@ -3002,6 +3002,12 @@ void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
}
void LCodeGen::DoLoadRoot(LLoadRoot* instr) {
Register result = ToRegister(instr->result());
__ LoadRoot(result, instr->index());
}
void LCodeGen::DoLoadExternalArrayPointer(
LLoadExternalArrayPointer* instr) {
Register to_reg = ToRegister(instr->result());
......
......@@ -2071,6 +2071,11 @@ LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
}
LInstruction* LChunkBuilder::DoLoadRoot(HLoadRoot* instr) {
return DefineAsRegister(new(zone()) LLoadRoot);
}
LInstruction* LChunkBuilder::DoLoadExternalArrayPointer(
HLoadExternalArrayPointer* instr) {
LOperand* input = UseRegisterAtStart(instr->value());
......
......@@ -119,6 +119,7 @@ class LCodeGen;
V(LazyBailout) \
V(LoadContextSlot) \
V(LoadExternalArrayPointer) \
V(LoadRoot) \
V(LoadFieldByIndex) \
V(LoadFunctionPrototype) \
V(LoadGlobalCell) \
......@@ -1559,6 +1560,15 @@ class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> {
};
class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root")
DECLARE_HYDROGEN_ACCESSOR(LoadRoot)
Heap::RootListIndex index() const { return hydrogen()->index(); }
};
class LLoadExternalArrayPointer V8_FINAL
: public LTemplateInstruction<1, 1, 0> {
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment