Merged with michi branch at rev 1684fe51cf3d.
[cacao.git] / src / vm / jit / codegen-common.cpp
index 3bf4591eb6c540e681b2e3626aa30e8219ede2f8..218c2537f9b85a4c2cd314b8f1c09f0468ba06ad 100644 (file)
 #include "md.h"
 #include "md-abi.h"
 
-#include "mm/memory.h"
+#include "mm/memory.hpp"
 
 #include "toolbox/avl.h"
 #include "toolbox/list.hpp"
-#include "toolbox/logging.h"
+#include "toolbox/logging.hpp"
 
 #include "native/llni.h"
-#include "native/localref.h"
-#include "native/native.h"
+#include "native/localref.hpp"
+#include "native/native.hpp"
 
 #include "threads/thread.hpp"
 
 #include "vm/jit/builtin.hpp"
 #include "vm/exceptions.hpp"
-#include "vm/method.h"
+#include "vm/method.hpp"
 #include "vm/options.h"
 #include "vm/string.hpp"
 
 #include <vmlog_cacao.h>
 #endif
 
-#include "show.h"
+#include "show.hpp"
 
 
 /* codegen_init ****************************************************************
@@ -136,7 +136,13 @@ void codegen_setup(jitdata *jd)
 
        /* 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;