+#define DRC_TEST_VAL 0x74657374
+
+static int new_dynarec_test(void)
+{
+ int (*testfunc)(void) = (void *)out;
+ int ret;
+ emit_movimm(DRC_TEST_VAL,0); // test
+ emit_jmpreg(14);
+ literal_pool(0);
+#ifdef __arm__
+ __clear_cache((void *)testfunc, out);
+#endif
+ SysPrintf("testing if we can run recompiled code..\n");
+ ret = testfunc();
+ if (ret == DRC_TEST_VAL)
+ SysPrintf("test passed.\n");
+ else
+ SysPrintf("test failed: %08x\n", ret);
+ out=(u_char *)BASE_ADDR;
+ return ret == DRC_TEST_VAL;
+}
+