emit_pointer (acfg, NULL);
emit_pointer (acfg, NULL);
}
- if (acfg->thumb_mixed) {
- emit_pointer (acfg, "thumb_end");
- } else {
- emit_pointer (acfg, NULL);
- }
if (acfg->aot_opts.static_link) {
emit_pointer (acfg, "globals");
} else {
* Emit all LLVM code into a separate assembly/object file and link with it
* normally.
*/
- if (!acfg->aot_opts.asm_only)
+ if (!acfg->aot_opts.asm_only) {
acfg->llvm_owriter = TRUE;
+ } else if (acfg->aot_opts.llvm_outfile) {
+ int len = strlen (acfg->aot_opts.llvm_outfile);
+
+ if (len >= 2 && acfg->aot_opts.llvm_outfile [len - 2] == '.' && acfg->aot_opts.llvm_outfile [len - 1] == 'o')
+ acfg->llvm_owriter = TRUE;
+ }
}
if (mono_aot_mode_is_full (&acfg->aot_opts))
arch_init (acfg);
+ if (acfg->llvm && acfg->thumb_mixed)
+ acfg->flags |= MONO_AOT_FILE_FLAG_LLVM_THUMB;
+
acfg->assembly_name_sym = g_strdup (acfg->image->assembly->aname.name);
/* Get rid of characters which cannot occur in symbols */
for (p = acfg->assembly_name_sym; *p; ++p) {
}
g_assert (acfg->aot_opts.llvm_outfile);
acfg->llvm_sfile = g_strdup (acfg->aot_opts.llvm_outfile);
+ if (acfg->llvm_owriter)
+ acfg->llvm_ofile = g_strdup (acfg->aot_opts.llvm_outfile);
+ else
+ acfg->llvm_sfile = g_strdup (acfg->aot_opts.llvm_outfile);
} else {
acfg->tmpbasename = g_strdup_printf ("%s", "temp");
acfg->tmpfname = g_strdup_printf ("%s.s", acfg->tmpbasename);
if (acfg->dwarf)
mono_dwarf_writer_emit_base_info (acfg->dwarf, g_path_get_basename (acfg->image->name), mono_unwind_get_cie_program ());
- if (acfg->thumb_mixed) {
- char symbol [256];
- /*
- * This global symbol marks the end of THUMB code, and the beginning of ARM
- * code generated by our JIT.
- */
- sprintf (symbol, "thumb_end");
- emit_section_change (acfg, ".text", 0);
- emit_alignment_code (acfg, 8);
- emit_label (acfg, symbol);
- emit_zero_bytes (acfg, 16);
-
- fprintf (acfg->fp, ".arm\n");
- }
-
emit_code (acfg);
emit_info (acfg);