/* initialize members */
- cd->flags = 0;
+ // Set flags as requested.
+ if (opt_AlwaysEmitLongBranches) {
+ cd->flags = CODEGENDATA_FLAG_LONGBRANCHES;
+ }
+ else {
+ cd->flags = 0;
+ }
cd->mcodebase = (u1*) DumpMemory::allocate(MCODEINITSIZE);
cd->mcodeend = cd->mcodebase + MCODEINITSIZE;
/* Debugging options which can be turned off. */
+bool opt_AlwaysEmitLongBranches = false;
int opt_DebugExceptions = 0;
int opt_DebugFinalizer = 0;
int opt_DebugLocalReferences = 0;
/* Debugging options which can be turned off. */
+ OPT_AlwaysEmitLongBranches,
OPT_DebugExceptions,
OPT_DebugFinalizer,
OPT_DebugLocalReferences,
/* Debugging options which can be turned off. */
+ { "AlwaysEmitLongBranches", OPT_AlwaysEmitLongBranches, OPT_TYPE_BOOLEAN, "Always emit long-branches." },
{ "DebugExceptions", OPT_DebugExceptions, OPT_TYPE_BOOLEAN, "debug exceptions" },
{ "DebugFinalizer", OPT_DebugFinalizer, OPT_TYPE_BOOLEAN, "debug finalizer thread" },
{ "DebugLocalReferences", OPT_DebugLocalReferences, OPT_TYPE_BOOLEAN, "print debug information for local reference tables" },
/* Debugging options which can be turned off. */
+ case OPT_AlwaysEmitLongBranches:
+ opt_AlwaysEmitLongBranches = enable;
+ break;
+
case OPT_DebugExceptions:
opt_DebugExceptions = enable;
break;
/* Debugging options which can be turned off. */
+extern bool opt_AlwaysEmitLongBranches;
extern int opt_DebugExceptions;
extern int opt_DebugFinalizer;
extern int opt_DebugLocalReferences;