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

Unified Diff: runtime/vm/find_code_object_test.cc

Issue 13474009: Implements optional parameter handling in MIPS vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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: runtime/vm/find_code_object_test.cc
===================================================================
--- runtime/vm/find_code_object_test.cc (revision 20887)
+++ runtime/vm/find_code_object_test.cc (working copy)
@@ -13,16 +13,14 @@
namespace dart {
-// Compiler only implemented on IA32, X64, and ARM.
-#if defined(TARGET_ARCH_IA32) || \
- defined(TARGET_ARCH_X64) || \
- defined(TARGET_ARCH_ARM)
-
TEST_CASE(FindCodeObject) {
#if defined(TARGET_ARCH_IA32)
const int kLoopCount = 50000;
#elif defined(TARGET_ARCH_X64)
const int kLoopCount = 25000;
+#elif defined(TARGET_ARCH_MIPS)
+ // TODO(zra): Increase after we implement far branches on MIPS.
+ const int kLoopCount = 1818;
#else
const int kLoopCount = 20000;
#endif
@@ -149,13 +147,19 @@
code = function.CurrentCode();
EXPECT(code.Size() > 16);
pc = code.EntryPoint() + 16;
+#if defined(TARGET_ARCH_MIPS)
+ // MIPS can only Branch +/- 128KB
+ EXPECT(code.Size() > (PageSpace::kPageSize / 2));
+ EXPECT(Code::LookupCode(pc) == code.raw());
+ pc = code.EntryPoint() + (PageSpace::kPageSize / 4);
+ EXPECT(Code::LookupCode(pc) == code.raw());
+#else
EXPECT(code.Size() > PageSpace::kPageSize);
EXPECT(Code::LookupCode(pc) == code.raw());
EXPECT(code.Size() > (1 * MB));
pc = code.EntryPoint() + (1 * MB);
EXPECT(Code::LookupCode(pc) == code.raw());
+#endif // defined(TARGET_ARCH_MIPS)
}
-#endif // TARGET_ARCH_IA32 || TARGET_ARCH_X64 || TARGET_ARCH_ARM
-
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698