Commit 46e82e2f authored by whesse@chromium.org's avatar whesse@chromium.org

X64 Crankshaft: Implement DoCodeStub on X64 platform.

Review URL: http://codereview.chromium.org/6451001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f740d1ad
...@@ -593,7 +593,56 @@ void LCodeGen::DoParameter(LParameter* instr) { ...@@ -593,7 +593,56 @@ void LCodeGen::DoParameter(LParameter* instr) {
void LCodeGen::DoCallStub(LCallStub* instr) { void LCodeGen::DoCallStub(LCallStub* instr) {
Abort("Unimplemented: %s", "DoCallStub"); ASSERT(ToRegister(instr->result()).is(rax));
switch (instr->hydrogen()->major_key()) {
case CodeStub::RegExpConstructResult: {
RegExpConstructResultStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
case CodeStub::RegExpExec: {
RegExpExecStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
case CodeStub::SubString: {
SubStringStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
case CodeStub::StringCharAt: {
// TODO(1116): Add StringCharAt stub to x64.
Abort("Unimplemented: %s", "StringCharAt Stub");
break;
}
case CodeStub::MathPow: {
// TODO(1115): Add MathPow stub to x64.
Abort("Unimplemented: %s", "MathPow Stub");
break;
}
case CodeStub::NumberToString: {
NumberToStringStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
case CodeStub::StringAdd: {
StringAddStub stub(NO_STRING_ADD_FLAGS);
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
case CodeStub::StringCompare: {
StringCompareStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
case CodeStub::TranscendentalCache: {
TranscendentalCacheStub stub(instr->transcendental_type());
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
default:
UNREACHABLE();
}
} }
......
...@@ -1747,8 +1747,8 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { ...@@ -1747,8 +1747,8 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) {
Abort("Unimplemented: %s", "DoCallStub"); argument_count_ -= instr->argument_count();
return NULL; return MarkAsCall(DefineFixed(new LCallStub, rax), instr);
} }
......
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