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

Unified Diff: src/x64/codegen-x64.cc

Issue 123014: Add x64 implementation test support for assembler and code generator. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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
« no previous file with comments | « src/x64/codegen-x64.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc (revision 2140)
+++ src/x64/codegen-x64.cc (working copy)
@@ -58,15 +58,34 @@
in_spilled_code_(false) {
}
-#define __ ACCESS_MASM(masm)
+#define __ ACCESS_MASM(masm_)
void CodeGenerator::DeclareGlobals(Handle<FixedArray> a) {
UNIMPLEMENTED();
}
+void CodeGenerator::TestCodeGenerator() {
+ // Generate code.
+ const int initial_buffer_size = 4 * KB;
+ CodeGenerator cgen(initial_buffer_size, NULL, false);
+ CodeGeneratorScope scope(&cgen);
+ cgen.GenCode(NULL);
+
+ CodeDesc desc;
+ cgen.masm()->GetCode(&desc);
+}
+
+
void CodeGenerator::GenCode(FunctionLiteral* a) {
- masm_->int3(); // UNIMPLEMENTED
+ if (a != NULL) {
+ __ int3(); // UNIMPLEMENTED
+ } else {
+ // GenCode Implementation under construction. Run by TestCodeGenerator
+ // with a == NULL.
+ __ movq(rax, Immediate(0x2a));
+ __ Ret();
+ }
}
void CodeGenerator::GenerateFastCaseSwitchJumpTable(SwitchStatement* a,
@@ -235,7 +254,15 @@
UNIMPLEMENTED();
}
+#undef __
+// End of CodeGenerator implementation.
+// -----------------------------------------------------------------------------
+// Implementation of stubs.
+
+// Stub classes have public member named masm, not masm_.
+#define __ ACCESS_MASM(masm)
+
void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
// Check that stack should contain frame pointer, code pointer, state and
// return address in that order.
« no previous file with comments | « src/x64/codegen-x64.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698