1 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
3 * x86.brg (CALL_VOID): fix bug #27751
4 (CONV_R_UN) use reg2 instead of reg1 for the negative check /fix bug 27849.
6 * jit.c (mono_analyze_stack): adjust valuetype size for pinvoke calls
8 i2002-07-11 Dietmar Maurer <dietmar@ximian.com>
10 * x86.brg (freg): new rule freg: CALL_R8 (this, reg)
12 2002-07-10 Dietmar Maurer <dietmar@ximian.com>
14 * emit-x86.c (arch_emit_prologue): added code to save LMF
16 2002-07-04 Dietmar Maurer <dietmar@ximian.com>
18 * x86.brg (LOCALLOC): added fix from Zoltan Varga (for bug #27396)
20 2002-07-05 Martin Baulig <martin@gnome.org>
22 * debug.c (mono_debug_add_method): Fix a bug in the `begin_scope' and
23 `end_scope' calculations when linear scan register allocation is disabled.
25 2002-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27 * mono.c: removed the "RESULT: X" message.
29 2002-07-01 Dietmar Maurer <dietmar@ximian.com>
31 * exception.c (arch_get_call_finally): restore caller saved
32 register used by global reg. allocation when calling finally
33 handlers (fixes bug #24943).
35 2002-07-01 Dick Porter <dick@ximian.com>
37 * jit.c (mono_jit_exec): Removed unneeded argument to
38 mono_runtime_run_main()
40 2002-06-28 Martin Baulig <martin@gnome.org>
42 * debug.c (debug_generate_method_lines, mono_debug_add_method): Make methods
43 start on the nop instruction to make single-stepping into an already-JITed
46 2002-06-26 Martin Baulig <martin@gnome.org>
48 * debug.c (mono_debug_source_location_from_address): Added
49 `guint32 *line_number' argument. If it's not NULL, store the line number
50 there and return the file name without the line number.
52 * exception.c (ves_icall_get_trace): Fill in `sf->filename' and `sf->line'.
53 (ves_icall_get_frame_info): Likewise.
55 2002-06-25 Dick Porter <dick@ximian.com>
57 * jit.c (mono_jit_exec): Pass the assembly to mono_runtime_run_main
59 2002-06-22 Martin Baulig <martin@gnome.org>
61 * debug.c (mono_debug_source_location_from_address): Small fix, an
62 unsigned number can never be smaller than zero, make that check
65 2002-06-19 Dietmar Maurer <dietmar@ximian.com>
67 * exception.c (ves_icall_get_trace): new method to get the stack
68 trace from a Exception.
70 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
72 * jit.c (check_inlining): do not inline functions containing
73 calls to stack query functions
75 * exception.c (ves_icall_get_frame_info): impl.
77 Tue Jun 18 10:21:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
79 * invoke.c: marshal simple arrays correctly.
81 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
83 * x86.brg: added inlined versions of Math.Sin, Math.Cos, Math.Sqrt
85 * jit.c (mono_analyze_stack): impl. STARG
86 (mono_analyze_stack): impl. LDARGA
88 * exception.c (arch_handle_exception): correctly restore register
89 values when unwinding the stack (fixes bug 25698)
91 2002-06-09 Martin Baulig <martin@gnome.org>
93 * debug.c (mono_debug_open_image): For MONO_DEBUG_FORMAT_DWARF2_PLUS,
94 the `%s-debug.s' file is in the same directory than its assembly.
96 Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
98 * message.c, emit-x86.c: kill warnings.
100 2002-05-31 Dietmar Maurer <dietmar@ximian.com>
102 * x86.brg: buf fix in REMOTE_STIND_OBJ
103 (mono_ldvirtftn): impl.
104 (mono_ldintftn): impl.
107 Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
109 * mono.c: added --config command line option.
111 Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
113 * jit.c, jit.h: collect statistics about the number of basic blocks.
115 2002-05-31 Martin Baulig <martin@gnome.org>
117 * debug.c (mono_debug_address_from_il_offset): New public function.
118 (mono_debug_add_method): Improved local variable info: correctly handle
119 variables in registers and their start/end scopes.
121 2002-05-30 Martin Baulig <martin@gnome.org>
123 * debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
124 not "%p" which seems to be broken on Windows/mingw32.
126 2002-05-30 Dietmar Maurer <dietmar@ximian.com>
128 * x86.brg (reg): bug fix in LOCALLOC
130 * mono.c (main): new switch --nointrinsic to disable memcpy opt.
132 * x86.brg: added block copy/init optimizations from
133 Serge (serge@wildwestsoftware.com)
135 Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
137 * invoke.cs: lookup P/Invoke method address only when needed.
139 2002-05-29 Dietmar Maurer <dietmar@ximian.com>
141 * x86.brg: bug fix in REMOTE_STIND_OBJ
143 * invoke.c (arch_create_native_wrapper): handle pointers to value types
145 * helpers.h: use mono_ prefix for all functions
147 * jit.c (mono_analyze_stack): fixed SIZEOF
149 * x86.brg: impl. LOCALLOC, INITBLK
151 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
153 * x86.brg: impl. CKFINITE
155 * jit.c (mono_analyze_stack): impl. CEE_CALLI
157 * x86.brg (JMP): impl. JMP opcode
159 2002-05-27 Dietmar Maurer <dietmar@ximian.com>
161 * jit.c (mono_cfg_new): reserve additional space to store ESP when
162 calling finally handlers.
164 * exception.c (arch_get_call_finally): save ESP before calling
167 * helpers.c (map_arg_type): move some generic helper function into
170 * mono.c (usage): new option --breakonex
172 * exception.c (arch_exc_is_caught): only return FALSE if really
175 * jit.c (mono_thread_abort): free jit_tls
177 2002-05-24 Dietmar Maurer <dietmar@ximian.com>
179 * x86.brg (stmt): use memmove to cope with overlapping
180 blocks. This is not required by the specs, so we can remove it
181 later if it turns out to be too slow (and use memcpy).
183 * jit.c (mono_analyze_stack): moved const. folding from x86.brg
185 * x86.brg: CPBLK impl.
187 * emit-x86.c (tree_emit): modified to support 3 nonterminals per
188 rule (used for CPBLK).
190 Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
192 * mono.c: remove generated code from hash when benchmarking/testing
194 * invoke.cs: special case string ctors.
196 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
198 * *.c: code cleanups - tried to separate architecture dependent things.
200 2002-05-23 Martin Baulig <martin@gnome.org>
202 * debug.c (mono_debug_open): Don't call mono_debug_add_image().
203 (mono_debug_write_symbols): Only recreate the symbol file if
206 * debug-private.h (MonoDebugHandle): Added `dirty' flag.
208 * mono.c (main): Call mono_debug_add_image() here.
210 * jit.c (mono_thread_abort): If we have debugging support, call
211 mono_debug_make_symbols() and G_BREAKPOINT().
213 * exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
214 an unhandled exception.
216 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
218 * delegate.c: move the thread pool to metadata/threadpool.c, code
221 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
223 * exception.c (arch_exc_is_catched): impl. MS like exception
224 handling (added a check for unhandled exceptions)
226 2002-05-22 Martin Baulig <martin@gnome.org>
228 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
229 the assembler if necessary, ie. the assembler file is newer than the
230 symbol file or the symbol file does not exist.
232 * debug.c: Added "update_on_exit" argument to recreate the symbol file
235 * debug-dwarf2.c: Produce assembler code which is free of comments and
236 extra whitespaces so that it's suitable for `as -f'.
238 2002-05-22 Martin Baulig <martin@gnome.org>
240 * debug-dwarf2.c (dwarf2_write_section_end): Removed. This is not needed
241 and not supported by all assemblers.
242 (dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
245 * mono.c (--debug): Small fix in the argument parsing.
247 2002-05-22 Martin Baulig <martin@gnome.org>
249 * debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.
251 * mono.c: Applied patch from Miguel:
252 (--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
255 2002-05-21 Martin Baulig <martin@gnome.org>
257 * debug.c (mono_debug_source_location_from_address): Added support for the
260 2002-05-21 Martin Baulig <martin@gnome.org>
262 * debug.c (mono_debug_source_location_from_address): New function.
263 (mono_debug_il_offset_from_address): New function.
265 * exception.c (arch_handle_exception): If we have debugging support, include
266 information about the source location and IL offset in the stack trace.
268 2002-05-21 Dietmar Maurer <dietmar@ximian.com>
270 * jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
273 * x86.brg (stmt): removed unnecessary assertion
275 * jit.c (check_inlining): we cant inline throw instructions
276 (because it breaks some basic block requirements)
278 2002-05-21 Martin Baulig <martin@gnome.org>
280 * debug-private.h (MonoDebugFlags): New enum typedef.
282 * debug.c (mono_debug_open): Added a few useful arguments. See the manpage
285 2002-05-21 Martin Baulig <martin@gnome.org>
287 * debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
288 a `MonoAssembly *' argument instead of a `char *filename' one. Also added
289 `const char **args' argument.
291 * mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
292 `int verbose' argument and made it public.
293 (mono_jit_compile_class): New public function, moved the code to compile
294 all methods in a class here from main().
295 (--compile): The argument can now also be an image (in `@imagename' format).
296 Updated documentation for this command line argument.
297 (--precompile): New command line argument to precompile an image/class/method
298 before executing the main app. This argument can be given multiple times.
299 (--break): Renamed the "--debug" command line argument to "--break".
300 (--debug): New command line argument to specify the debugging format.
301 (--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
302 (--debug-args): New command line argument. This is a comma-separated list of
303 additional arguments for the symbol writer.
304 (usage): Beautified the help text a bit.
306 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
307 public mono_jit_compile_image() function rather than duplication this
310 2002-05-21 Martin Baulig <martin@gnome.org>
312 * debug-dwarf2-plus.c: This is now working again :-)
314 * debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
315 we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
316 one for the fallback MONO_DEBUG_FORMAT_DWARF2.
318 2002-05-21 Martin Baulig <martin@gnome.org>
320 * jit.c (mono_debug_handle): Removed this global variable.
322 * debug.c (mono_debug_close): Removed.
323 (mono_debug_cleanup): New global function.
324 (mono_debug_add_image): New global function.
325 (mono_debug_handle_from_class): New global function.
326 (mono_debug_write_symbols): New global function.
327 (mono_debug_add_type): Removed `MonoDebugHandle *' argument.
328 (mono_debug_add_method): Likewise.
330 2002-05-21 Martin Baulig <martin@gnome.org>
332 Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
333 file for all assemblies. Currently, the JIT doesn't put all methods
334 from a single assembly into a continuous region of memory. We were
335 previously creating valid DWARF 2 files for this, but unfortunately
336 GDB's symbol tables get messed up when it reads more than one such file.
338 * debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
339 `next_idx', `methods', `type_hash', `source_files' and `format'
340 into the MonoDebugHandle.
342 * debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
343 not on the AssemblyDebugInfo.
344 (mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().
346 * debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
347 mono_debug_write_dwarf2().
348 (mono_debug_open_assembly_dwarf2): Removed.
349 (mono_debug_close_assembly_dwarf2): Removed.
351 * debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
352 mono_debug_write_stabs().
353 (mono_debug_open_assembly_stabs): Removed.
354 (mono_debug_close_assembly_stabs).
356 * debug-dwarf2-plus.c: This is currently broken. :-(
358 2002-05-20 Martin Baulig <martin@gnome.org>
360 * debug.h (mono_debug_format): New global variable.
361 (MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.
363 * debug-private.h (MonoDebugHandle): Added `objfiles' field which is
364 a whitespace separated list of symbol files.
365 (AssemblyDebugInfo): Added `objfile' filed which is the name of the
368 * mono.c (main): Pass the assembly file name to mono_debug_open_file().
370 * debug.c (mono_debug_make_symbols): Link all symbol files into a big
371 `<assemblyname>.o' symbol file.
373 2002-05-20 Martin Baulig <martin@gnome.org>
375 * debug.c (debug_load_method_lines): Check whether the assembly file
376 is newer than the IL file and recreate the IL file if necessary.
378 2002-05-20 Miguel de Icaza <miguel@ximian.com>
380 * mono.c Updated copyright years.
382 2002-05-18 Miguel de Icaza <miguel@ximian.com>
384 * mono.c (usage): Relayout command line options.
386 2002-05-17 Dietmar Maurer <dietmar@ximian.com>
388 * x86.brg (reg): fixed array bound check
390 * emit-x86.c (enter_method): print method signature
392 * exception.c (arch_handle_exception): set trace info before we
395 2002-05-16 Dietmar Maurer <dietmar@ximian.com>
397 * jit.c (mono_find_final_block): make it work with mcs
399 * x86.brg: buf fix. if exception variable is allocated to a register.
401 * jit.c (mono_find_final_block): bug fix.
403 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
405 * delegate.c (arch_end_invoke): fix bug #24653, simplified the
406 code using new runtime_invoke feature.
408 * jit.c (mono_analyze_flow): try blocks are followed by handler
409 blocks, so we need to add all handler blocks as succesors.
410 (mono_thread_start_cb): set end_of_stack
412 * exception.c (arch_handle_exception): correctly save/restore caller
415 * emit-x86.c (arch_emit_prologue): correctly save/restore caller
418 * jit.c (mono_cfg_new): allocate space for caller saved registers.
420 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
422 * jit.c: only use one TLS slot to store jit data
424 * exception.c (arch_handle_exception): print function signature,
425 use thread relative end_of_stack
427 2002-05-13 Dietmar Maurer <dietmar@ximian.com>
429 * jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
430 store them as 32 bit integers.
431 (mono_analyze_stack): we need to generate a temporary var for
432 SHL/SHR because the tree allocator can fail otherwise
434 * exception.c (arch_handle_exception): EIP now points to the call
435 instruction, not to the instruction after the call. This fixes the
436 bug reported by Linus Upson (tests/exception8.cs)
438 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
440 * jit.c (mono_analyze_flow): always allocate the forest array
441 (mono_stack_duplicate_used_var): impl.
442 (mono_copy_used_var): impl.
444 * x86.brg: bug fix in SHR/SHL
446 * emit-x86.c (arch_emit_prologue): check if live_in_set != NULL
448 2002-05-11 Sergey Chaban <serge@wildwestsoftware.com>
450 * mono.c: new --fast-iconv command line option
451 to enable fast FP-to-integer conversion code.
452 * jit.c, jit.h: added global variable to store state
453 for the above option. This optimization is disabled
455 * x86.brg: added code to emit fast FP-to-integer
456 conversion sequences.
458 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
460 * emit-x86.c: simple definite assignment analysis optimization for
461 uninitialized locals.
463 Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
465 * x86.brg, emit-x86.c: patch the branch targets with x86_patch().
467 2002-05-10 Dietmar Maurer <dietmar@ximian.com>
469 * linear-scan.c (mono_update_gen_set): improvement/bug fix
471 * x86.brg: added additional rules to handle global allocated registers
473 * mono.c (usage): the option is called --nols, and it dissables
476 * x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8
478 2002-05-09 Dietmar Maurer <dietmar@ximian.com>
480 * linear-scan.c: linear scan reg. allocation and data flow analysis
481 use Paolo's great bitset implementation.
483 * jit.c (arch_allocate_var): add live range info
484 (mono_cfg_add_successor): create list of successors for basic
487 * mono.c (main): new option --ls to enable linear scan
489 * exception.c (arch_handle_exception): print instruction pointer
490 relative to method start address.
492 * jit.c (mono_print_ctree): print register number if locals are
493 allocate in registers.
495 * emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
496 (arch_emit_epilogue): take care when restoring save registers,
497 because the stack pointer may has changed.
499 * x86.brg: s/VAROFFSET/VARINFO/
500 modified to support global register allocation
502 Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
504 * jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.
506 2002-05-03 Sergey Chaban <serge@wildwestsoftware.com>
508 * x86.brg: more coni4 optimizations
509 MUL: generate optimized code for some consts other
510 than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
511 DIV_UN: multiply with reciprocal instead of dividing;
513 2002-05-03 Dietmar Maurer <dietmar@ximian.com>
515 * x86.brg: use VAROFFSET macro
517 * emit-x86.c (tree_emit): allocate space for spilled regs in
518 activation frame instead of pushing them to the stack.
520 * x86.brg: replace BXX with CBRANCH/COMPARE
521 replaced CXX CSET/COMPARE
523 * emit-x86.c (arch_allocate_regs): improved register allocation
525 2002-05-02 Dietmar Maurer <dietmar@ximian.com>
527 * delegate.c (mono_delegate_cleanup): signal semaphore in order to
530 2002-04-30 Dick Porter <dick@ximian.com>
532 * mono.c (main): Tell glib to not abort when g_log() etc print
535 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
537 * x86.brg: opt. LDELEMA impl.
538 (MUL) use shift when possible.
539 (DIV) use shift when possible.
540 impl. various opt. with coni4
542 * exception.c (arch_handle_exception): use ctx->SC_EBP in
543 end_of_stack check as suggested by Linus Upson <linus@linus.com>
545 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
547 * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.
549 * exception.c: included the Freebsd patch from Sandro Tolaini
550 <sandro@focuseek.com>
552 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
554 * mono.c, jit.c: use mono_runtime_run_main ().
556 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
558 * jit.c (mono_analyze_stack): dont call methods on Object with
559 METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
561 * x86.brg: added more CONV_U rules
563 * jit.c (mono_analyze_stack): avoid recursive call of virtual
564 methods: fixes Bug #23778
565 (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
567 * exception.c (arch_handle_exception): only g_assert(cleanup) if
570 2002-04-27 Patrik Torstensson <patrik.torstensson@intel.com>
572 * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
574 2002-04-27 Martin Baulig <martin@gnome.org>
576 * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
577 there's already `epilog' so we don't need `epilogue_begin'.
579 * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
580 size of the method's code.
582 2002-04-25 Martin Baulig <martin@gnome.org>
584 * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
587 2002-04-25 Dietmar Maurer <dietmar@ximian.com>
589 * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
590 added CONV_OVF_I4 (fix bug #23808)
592 2002-04-23 Dietmar Maurer <dietmar@ximian.com>
594 * x86.brg: code cleanup - use x86_patch ()
596 * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
597 (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
599 * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
600 because it slows down performance.
602 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
604 * emit-x86.c: enter_method handles 8-byte aligned parameters.
606 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
608 * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
611 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
613 * jit.c (check_inlining): added statistics about inlineing
615 * mono.c (usage): new switch --noinline to disable inlining
617 * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
618 inline methods (to keep semantics)
620 * x86.brg: added constant folding for inegers
622 * emit-x86.c (tree_allocate_regs): handle the special case when
623 chain rules need a register.
625 2002-04-19 Dietmar Maurer <dietmar@ximian.com>
627 * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
629 * jit.c (check_inlining): better inlining support
631 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
633 * x86.brg: LDLEN uses max_length instead of bounds[0]
634 * jit.c: support for new szarray format
636 2002-04-18 Dietmar Maurer <dietmar@ximian.com>
638 * jit.c (check_inlining): added inlining support
640 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
642 * x86.brg: optimized version of castclass and isinst
644 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
646 * emit-x86.c, invoke.c: track time spent compiling.
648 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
650 * emit-x86.c, invoke.c: call profile callbacks if needed.
651 * jit.c, jit.h, mono.c: add --profile command line option.
653 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
655 * jit.h: included mono/io-layer/io-layer.h to avoid breaking
656 compilation under windows when upgrading mingw and w32api to
657 version 1.3 (thanks Dick!).
659 2002-04-15 Patrik Torstensson <patrik.torstensson@labs2.com>
661 * jit.c: changed the array icalls to use full names
663 2002-04-15 Dietmar Maurer <dietmar@ximian.com>
665 * x86.brg: check the this pointer before calling
666 non-virtual functions
668 * emit-x86.c (arch_emit_prologue): initialize local vars.
670 * x86.brg: removed incredible clumsy code
672 2002-04-13 Martin Baulig <martin@gnome.org>
674 * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
675 the location of a variable.
676 (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
677 instead of a stack offset and use dwarf2_write_variable_location() to write
680 2002-04-13 Martin Baulig <martin@gnome.org>
682 * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
685 2002-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
687 * Makefile.am: use of the new '-s' option in monoburg.
689 2002-04-12 Martin Baulig <martin@gnome.org>
691 * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
694 2002-04-10 Sergey Chaban <serge@wildwestsoftware.com>
695 * win32-exception: added Win32 SEH exception filter that translates
696 CONTEXT to sigcontext;
698 * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
699 in a platfrom-dependent way;
701 * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
702 and avoid io-layer includes;
704 * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
707 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
709 * delegate.c (arch_end_invoke): restore output arguments
711 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
713 * jit.c: call mono_runtime_init ().
715 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
717 * jit.c (mono_jit_cleanup): added more statistics
719 * invoke.c (arch_create_native_wrapper): special case EndInvoke -
720 we need to pass the MonoMethod pointer as first argument.
722 * delegate.c (mono_async_invoke): notify all listeners, not only a
724 (arch_end_invoke): we now pass a MonoMethod as first parameter and
725 use arch_method_call_message_new() to access the stack.
726 (arch_end_invoke): wait until we really finished processing
727 (async_invoke_abort): notify all listeners, not only a
730 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
732 * message.c (arch_return_value): impl.
733 (arch_method_return_message_restore): consider delegate BeginInvoke
735 * jit.c: removed jit_exec_main()
737 * delegate.c (arch_begin_invoke): use the message builder to make
738 it architecture independent - still needs more cleanup.
740 2002-04-05 Dietmar Maurer <dietmar@ximian.com>
742 * delegate.c (mono_delegate_ctor): support for transparent proxy
744 * x86.brg (freg): bug fix in CONV_R* opcodes
746 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
748 * message.c: added documentation
750 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
752 * mono.c (main): use --trace instead of --trace-calls
754 * x86.brg: impl. REMOTE_STIND_XX
756 * message.c (mono_store_remote_field): impl.
758 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
760 * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
762 * message.c (mono_load_remote_field): impl.
764 * jit.c (mono_analyze_stack): only call marshalbyref methods
766 (mono_analyze_stack): consider marshalbyref objects in LDFLD
768 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
770 * x86.brg: kill pointer arithmetric.
772 2002-03-28 Martin Baulig <martin@gnome.org>
774 * jit.c (mono_debug_insert_breakpoint): New global variable.
775 (mono_debug_last_breakpoint_address): New global variable.
777 * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
778 non-zero, insert a breakpoint; if it's positive, decrement it when done.
779 Set `mono_debug_last_breakpoint_address' to the address of the last inserted
782 * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
783 `mono_debug_last_breakpoint_address', also documented them here.
785 2002-03-28 Martin Baulig <martin@gnome.org>
787 * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
788 (AssemblyDebugInfo): Added `format'.
790 * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
791 this allows us choose the format on a per-assembly basis.
792 (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
793 to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
795 (debug_generate_method_lines): Generate correct IL offsets.
797 2002-03-28 Martin Baulig <martin@gnome.org>
799 * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
801 * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
803 * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
804 `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
806 * debug.c (debug_generate_method_lines): Don't return if we don't have line
807 numbers, we still need to generate the IL offsets here. Emit line numbers
808 for `prologue_end_offset' (the first line of actual code) and
809 `epilogue_begin_offset' (the line of the method's closing brace).
810 Don't crash if cfg->bblocks [i].forest is NULL.
811 (mono_debug_add_method): Don't crash if we don't have line numbers.
812 Initialize the newly added fields.
814 * debug-stabs.c: Record first and last line, emit filename info at the
815 beginning of the stab file, gdb ignores the types otherwise.
817 * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
818 emit line number info for the first and last line.
820 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
822 * invoke.c (arch_create_delegate_trampoline): impl.
824 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
826 * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
827 with the jit runtime to easy embedding. main() is moved to mono.c, now.
828 * jit.c: use opcode names from libmetadata.
829 * debug.h, debug.c: constify char* argument.
831 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
833 * jit.c: catching SIGSEGV again, added proxy support
835 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
837 * delegate.c (mono_delegate_init): remove unused worker threads
839 2002-03-27 Mike Kestner <mkestner@speakeasy.net>
841 * delegate.c (arch_get_delegate_invoke): malloc a bigger area
843 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
845 * jit.c: remove glib mem vtable code.
847 2002-03-26 Martin Baulig <martin@gnome.org>
849 * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
850 lines if we don't have line number information.
851 (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
854 * debug-stabs.c (write_method_stabs): Don't generate method lines if
855 we don't have line number information. Use `minfo->method_info.this_offset'
856 instead of hardcoding 8.
858 * debug.c (debug_generate_method_lines): Don't crash if we don't have
859 line number information.
860 (mono_debug_open_assembly): Don't generate line numbers for
861 MONO_DEBUG_FORMAT_DWARF2_PLUS.
862 (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
863 but it in the new `this_offset' field.
865 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
867 * debug.c (debug_generate_method_lines): Use correct addresses for
870 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
872 * jit.c: do not set the glib mem vtable anymore.
873 * Makefile.am: link to libmonoutils.
875 2002-03-25 Martin Baulig <martin@gnome.org>
877 * debug.h (mono_debug_make_symbols): Documented this function.
879 2002-03-24 Martin Baulig <martin@gnome.org>
881 * debug.c (mono_debug_add_method): Include the `this' offset in
882 the `minfo->method_info.param_offsets' array.
884 2002-03-23 Martin Baulig <martin@gnome.org>
886 * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
887 to do it before the X86_CMP.
888 (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
889 (reg: CLT (lreg, lreg)): Likewise.
890 (reg: CLT_UN (lreg, lreg)): Likewise.
891 (reg: CLT_UN (lreg, lreg)): Likewise.
892 (reg: CGT (lreg, lreg)): Likewise.
893 (reg: CGT (lreg, lreg)): Likewise.
894 (reg: CGT_UN (lreg, lreg)): Likewise.
895 (reg: CGT_UN (lreg, lreg)): Likewise.
897 2002-03-23 Martin Baulig <martin@gnome.org>
899 * debug-private.h (AssemblyDebugInfo): Added `_priv'.
901 * debug-dwarf2-plus.c
902 (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
903 (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
904 (mono_debug_write_assembly_dwarf2_plus): Only call
905 mono_debug_update_symbol_file() here.
907 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
909 * jit.c: inter strings before executing a method.
910 Do not intern command line arguments anymore.
912 2002-03-21 Martin Baulig <martin@gnome.org>
914 * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
916 * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
917 been created by MCS and fills in all machine dependent stuff.
919 * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
920 removed everything which is already in MonoDebugMethodInfo.
922 * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
923 (mono_debug_make_symbols): Don't open the file or call as, this is done in the
926 * jit.c (main): Added "--dwarf-plus" command line option to use the new
927 MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
929 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
931 * jit.c (usage): new option to specify maximum number of worker threads
932 (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
934 * delegate.c (async_invoke_abort): added support for asynchronous exceptions
935 (arch_get_async_invoke): notify listeners before we call the
936 asynchronous callback
938 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
940 * delegate.c (async_invoke_thread): support for domains
941 (async_invoke_thread): create workers only when needed
943 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
945 * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
947 2002-03-18 Dietmar Maurer <dietmar@ximian.com>
949 * x86.brg: impl. lreg: XOR (lreg, lreg)
950 impl. REM (freg, freg)
952 2002-03-17 Martin Baulig <martin@gnome.org>
954 * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
957 * debug-dwarf2.c: Added support for strings and arrays.
959 2002-03-17 Martin Baulig <martin@gnome.org>
961 * debug.c (mono_debug_get_type): Recursively call this for all function members
963 (mono_debug_add_method): Don't mangle function names, this must be done by the
964 debugger backend if the debugging format needs mangled names.
966 * debug-dwarf2.c: Improved support for classes, added member functions.
968 2002-03-16 Martin Baulig <martin@gnome.org>
970 * debug.c (mono_debug_get_type): Recursively call this for all members and
971 parent classes of a class type.
973 * debug-dwarf2.c: Added basic support for classes. Set source language to C++
974 since GDB doesn't like Java very much.
976 2002-03-16 Martin Baulig <martin@gnome.org>
978 * debug-dwarf2.c: Added support for enums.
980 2002-03-15 Martin Baulig <martin@gnome.org>
982 * debug.c (mono_debug_get_type): Recursively call this for all members
985 * debug-dwarf2.c: Added support for structs.
987 2002-03-15 Dietmar Maurer <dietmar@ximian.com>
989 * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
990 to new MonoLMF layout
992 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
994 * emit-x86.c (arch_create_native_wrapper): new code to generate
995 wrappers for calling native functions.
996 (arch_create_native_wrapper): free allocated strings
997 (arch_handle_exception): made mono_jit_info_table domain dependent
999 2002-03-14 Martin Baulig <martin@gnome.org>
1001 * debug.c (MonoDebugFormat): New public enums specifying which debugging
1003 (mono_debug_open_file): Added MonoDebugFormat argument.
1004 (mono_debug_make_symbols): Don't take an argument to make it easier to call
1005 this function from GDB. It's now safe to call this function multiple times;
1006 it'll always write a complete debugging file.
1008 * debug.c: Splitted this file into a general part which remains in this file
1009 and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
1010 All public functions now call a corresponding format specific function.
1012 * debug.c: The following changes are private to debug.c:
1013 (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
1014 (record_line_number, debug_generate_method_lines): New private functions.
1015 (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
1016 calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
1017 mono_debug_open_assembly_dwarf2).
1018 (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
1019 now safe to call this function multiple times.
1020 (mono_debug_get_type): New public function. This takes a `MonoClass *' and
1021 returns an unique index for this type. It's used to ensure that we only write
1022 each class once to the debugging file.
1023 (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
1024 data structure, but don't directly write to the debugging file. This is done
1025 later from mono_debug_write_assembly().
1027 * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
1028 debugging output. Call mono_debug_close() on cleanup if necessary.
1030 2002-03-14 Martin Baulig <martin@gnome.org>
1032 * debug-private.h: New private header file.
1034 * debug-stabs.c: Added the stabs type generation stuff which was
1035 previously in debug.c.
1037 * debug-dwarf.c: Started to implement type support. We're currently
1038 only writing this most basic types to the dwarf file, but this will
1041 2002-03-13 Martin Baulig <martin@gnome.org>
1043 * debug-stabs.c, debug-dwarf2.c: New files containing my new
1044 debugging code. They're now in CVS, but not yet used anywhere.
1046 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
1048 * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
1049 macros, included new delegate code from Daniel Stodden.
1052 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
1054 * jit.c: verify that corlib and runtime are in sync.
1056 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
1058 * emit-x86.c, jit.c: use the debug-helpers facilities to
1059 describe and match a method when debugging.
1061 2002-03-10 Martin Baulig <martin@gnome.org>
1063 * emit-x86.c (arch_compile_method): When emitting stabs debugging
1064 output, put a nop instruction at the start of all functions so that
1065 the adresses won't change when using --debug.
1067 * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
1068 the bytecode area, stabs needs a line number in the .il file. Use the
1069 new info->moffsets to get the line number.
1070 (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
1071 `moffsets' is an array of `total_lines' fields (total number of lines
1072 in the .il file); for each line in the .il field, this array contains
1073 the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
1074 of a method and 0 otherwise.
1075 (debug_load_method_lines): Read the whole .il file and initialize the
1076 info->moffsets field.
1078 2002-03-09 Martin Baulig <martin@gnome.org>
1080 * x86.brg (DIV_UN): Clear EDX before performing the division and remove
1081 the unnecessary CDQ instruction.
1083 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1085 * jit.c (mono_analyze_stack): only load addresses of value types
1086 on the runtime stack.
1088 2002-03-07 Duncan Mak <duncan@ximian.com>
1090 * Makefile.am: A small patch fixing errors in vpath-based builds
1091 (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
1092 committed for Daniel Stodden <stodden@in.tum.de>.
1094 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1096 * jit.c: Boehm-GC enable.
1098 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1100 * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
1101 realloc that code sometimes!
1103 * emit-x86.c (mono_compute_branches): support several types of
1106 2002-03-06 Dietmar Maurer <dietmar@ximian.com>
1108 * x86.brg: impl. MUL_OVF_UN (reg, reg)
1110 * jit.c (mono_find_final_block): find correct finally handler.
1112 * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
1113 caller saved registers.
1115 2002-03-05 Dietmar Maurer <dietmar@ximian.com>
1117 * x86.brg: use x86_widen_reg for CONV opcodes
1119 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
1121 * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
1123 * emit-x86.c (arch_handle_exception): big fix - dont use
1124 uninitialized next_bp
1125 (arch_compile_method): make the jit thread save
1126 (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
1127 to avoid need of recursive mutexes
1129 * x86.brg: use new mono_assert macros
1131 2002-02-28 Dietmar Maurer <dietmar@ximian.com>
1133 * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
1134 calling into unmanaged code (arch_compile_method).
1136 * x86.brg: impl. CONV_I4 (freg) with correct rounding
1137 (lreg): impl CALL_I8(INTF_ADDR)
1138 impl. CONV_R_UN (reg)
1141 2002-02-27 Dietmar Maurer <dietmar@ximian.com>
1143 * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
1145 2002-02-26 Dietmar Maurer <dietmar@ximian.com>
1147 * x86.brg: bug fix in CLT(lreg,lreg)
1148 (reg): bug fix in CONV_OVF_I4(lreg)
1149 (lreg): replaced x86_call_reg with x86_call_code
1151 * emit-x86.c (mono_add_jump_info): impl.
1152 (mono_compute_branches): patch real jump address (instead of
1153 emitting code twice)
1155 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1157 * x86.brg: optimize cmp reg,0 -> test reg.
1159 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1161 * jit.h, jit.c, emit-x86.c: Added a few statistics counters
1162 and the --stats command line option to print them.
1163 Fixed memory leak in arch_compile_method () when a method's code is
1164 found in the cache. Fix magic trampoline to deal with static calls.
1166 2002-02-21 Dietmar Maurer <dietmar@ximian.com>
1168 * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN
1170 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
1172 * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
1173 (arch_create_jit_trampoline): cache trampoline code
1175 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1177 * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
1179 (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
1181 * x86.brg: do not encode exception objects into the instruction
1182 stream, because they are domain dependend. Use
1183 arch_get_throw_exception_by_name() instead;
1185 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1187 * jit.c: intern command line arguments.
1189 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1191 * jit.c (mono_analyze_stack): use the magic trampoline for all
1192 calls (since we cant store the address of compiled code in
1194 (mono_analyze_stack): imp. LDSTR for shared code
1196 * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
1197 (arch_compile_method): add a cache for compiled methods to avoid
1198 recompilation. dont use method->addr to store domain dependent
1201 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1203 * x86.brg: impl. BLE,BGT for freg
1205 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1207 * emit-x86.c: handle unreachable code. Eliminate some unneeded
1209 * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
1210 main(). Add --compile classname and --ncompile num command line
1211 options to do performance evaluation of the jitter (and help
1214 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1216 * emit-x86.c (arch_compile_method): bug fix in static delegate
1219 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
1221 * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
1223 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
1225 * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
1227 2002-02-13 Miguel de Icaza <miguel@ximian.com>
1229 * jit.c (arch_allocate_var): Only assert that the alignment is
1230 at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
1232 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1234 * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
1236 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1238 * emit-x86.c: make x86_magic_trampoline() handle call instructions
1239 with an imm8 displacement. x86.brg not yet changed to take advantage
1242 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1244 * jit.c: use opcode info from libmetadata to do flow analysis
1247 2002-02-06 Dietmar Maurer <dietmar@ximian.com>
1249 * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking
1251 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
1253 * x86.brg: use element_class for type check
1255 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
1257 * jit.c (main): impl. __array_Address icall
1259 * mempool.c (mono_mempool_alloc): handle large block allocation
1261 2002-02-01 Dietmar Maurer <dietmar@ximian.com>
1263 * x86.brg: impl. SHL/SHR/CLT for 64 bit values
1265 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
1267 * x86.brg: impl. CEQ(lreg,lreg)
1269 * jit.c (mono_analyze_stack): impl. LDVIRTFTN
1270 (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
1272 * x86.brg: removed some dead code.
1274 2002-01-18 Dietmar Maurer <dietmar@ximian.com>
1276 * jit.c (arch_allocate_var): fixed alignment bugs
1278 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
1280 * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
1282 2002-01-16 Dietmar Maurer <dietmar@ximian.com>
1284 * jit.c (main): install the trampoline before we start to create
1287 * x86.brg: impl. CLT_UN, CGT_UN
1289 * emit-x86.c (leave_method): added check for null object
1290 (enter_method): consider byref arguments
1292 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
1294 * x86.brg: bug fix in CONV_OVF_I1_UN
1295 impl. ADD_OVF, MUL_OVF
1296 impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
1297 (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
1298 (EMIT_COND_EXCEPTION): added signed flag
1300 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
1302 * jit.c: implement stloc, ldloc, ldloca.
1304 2002-01-11 Dietmar Maurer <dietmar@ximian.com>
1306 * jit.c (mono_analyze_stack): fixed calculation of last_instr
1308 * x86.brg (LDLEN): emit null_reference exception
1310 (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
1312 2002-01-04 Dietmar Maurer <dietmar@ximian.com>
1314 * x86.brg: bug fix in CASTCLASS
1316 2001-12-21 Dietmar Maurer <dietmar@ximian.com>
1318 * jit.c (mono_analyze_stack): spill MUL to avoid problem with
1319 register allocation.
1321 * emit-x86.c (arch_compile_method): fixed static delegate bug
1323 2001-12-16 Miguel de Icaza <miguel@ximian.com>
1325 * x86.brg, jit.c: Split up the nodes that we used to share on
1326 CONV_OVF. They were sharing the nodes because they are the same
1327 on 32-bit machines, but on 64-bit machines you need different
1330 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
1332 * x86.brg: removed prerequisite that (tree->left->reg1 <
1333 tree->right->reg1) to make register allocation easier.
1335 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
1337 * emit-x86.c (arch_handle_exception): new code to handle
1338 exceptions inside unmanaged code.
1340 * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
1341 address as first argument.
1343 2001-12-15 Dietmar Maurer <dietmar@ximian.com>
1345 * x86.brg: pass exceptions on the stack
1347 * jit.h (ISSTRUCT): new macro to check for real value types
1348 (return false for enum types).
1350 2001-12-11 Dietmar Maurer <dietmar@ximian.com>
1352 * x86.brg: use position indepentent code if possible.
1354 * x86.brg (EMIT_COND_EXCEPTION): new macro.
1356 * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
1358 2001-12-10 Dietmar Maurer <dietmar@ximian.com>
1360 * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
1362 (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
1364 * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
1366 2001-12-07 Dietmar Maurer <dietmar@ximian.com>
1368 * jit.c (mono_allocate_intvar): bug fix.
1370 * emit-x86.c (get_unbox_trampoline): impl.
1372 * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
1374 2001-12-06 Dietmar Maurer <dietmar@ximian.com>
1376 * x86.brg: raise exceptions.
1378 2001-12-05 Dietmar Maurer <dietmar@ximian.com>
1380 * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
1383 2001-12-06 Miguel de Icaza <miguel@ximian.com>
1385 * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
1386 CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
1387 CONV.OVF.I2.UN, CONV.OVF.I8.UN
1389 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
1391 * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
1392 removed the locaddr nonterminal, reimplemented value types
1394 * jit.c: reimplemented value type support, better support for
1397 2001-12-03 Miguel de Icaza <miguel@ximian.com>
1399 * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
1402 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
1404 * jit.c: call mono_init() after registering internal calls.
1406 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
1408 * emit-x86.c (tree_preallocate_regs): improved register allocation
1410 * x86.brg: impl. ISINST, CASTCLASS
1412 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
1414 * x86.brg: rearrange fields to reduce struct size.
1415 * jit.c: use signature->param_count, not signature->params_size.
1416 * debug.c: off-by-one error fix.
1418 2001-11-29 Radek Doulik <rodo@ximian.com>
1420 * Makefile.am: build mono only for X86 architecture, compilation
1421 fails for ppc now because of accessing registers in sigcontext
1424 2001-11-29 Dietmar Maurer <dietmar@ximian.com>
1426 * jit.c (mono_analyze_stack): bug fix in DUP
1428 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
1430 * debug.c: fix type handling. Position function position at start of
1431 IL code. Output more fine-grained stepping information.
1433 2001-11-28 Dietmar Maurer <dietmar@ximian.com>
1435 * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
1437 * jit.c (mono_analyze_stack): record the cli_address for later use
1439 (sigsegv_signal_handler): translate sigsegv into "Internal error"
1442 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
1444 * debug.c, debug.h: added support for generating stabs.
1445 Stabs can be compiled with as and the resulting object file can be
1446 loaded in a gdb session with add-symbol-file object.o.
1447 * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
1448 where locals and arguments are stored in the stack. Add support for
1449 passing command line arguments to CLR programs.
1450 * emit-x86.c: insert a breakpoint at method invocation if needed.
1452 2001-11-27 Dietmar Maurer <dietmar@ximian.com>
1454 * jit.c: exception support
1456 * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
1459 2001-11-26 Dick Porter <dick@ximian.com>
1461 * Makefile.am (mono_LDADD): Add io-layer library
1463 2001-11-19 Dietmar Maurer <dietmar@ximian.com>
1465 * jit.c (mono_analyze_stack): impl. LDFTN
1466 (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
1467 make register allocation easier on x86
1469 * emit-x86.c (enter_method): more debugging output for Strings
1470 (arch_compile_method): added delegate support
1471 (arch_compile_method): align EBP to 8 byte boundary
1473 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
1475 * jit.c: use mono_install_trampoline (), instead of exporting
1476 a function to a lower-level library.
1478 2001-11-16 Dietmar Maurer <dietmar@ximian.com>
1480 * x86.brg (STRING_ARG): impl. a way to marshal strings. This
1481 will be extensible to handle all possible kinds of marshalling
1484 * jit.c (map_call_type): added MB_TERM_CALL_VOID
1485 (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
1486 instructions to handle this arguments more effectively.
1488 2001-11-15 Dietmar Maurer <dietmar@ximian.com>
1490 * Makefile.am (mono_SOURCES): renamed testjit to mono
1492 * x86.brg: added debugging support
1494 * testjit.c: added support for value types, CFG improvements
1496 * emit-x86.c (enter_method): handle value types
1497 (tree_allocate_regs): impl. a better way to handle chain rules
1499 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
1501 * x86.brg (INITOBJ): bug fix: initialize data before use,
1502 simplified the code.
1504 2001-11-09 Miguel de Icaza <miguel@ximian.com>
1506 * testjit.c (mono_analyze_stack): Remove compiler warning by
1507 testing against NULL.
1509 2001-11-09 Dick Porter <dick@ximian.com>
1511 * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
1513 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
1515 * testjit.c (mono_analyze_stack): new BOX impl.
1517 * x86.brg: implemented INITOBJ
1519 * testjit.c (mono_analyze_stack): finished array support
1520 (mono_analyze_stack): reimplemented DUP instruction
1522 2001-11-08 Dietmar Maurer <dietmar@ximian.com>
1524 * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
1525 represents the address of the element. This way we can emit highly
1526 optimized x86 instructions to access elements (using base+index+offset
1529 2001-11-07 Miguel de Icaza <miguel@ximian.com>
1531 * mempool.c: Include string.h to kill warning.
1533 * testjit.c: Add typecast to kill warning.
1535 * x86.brg: Include string.h to eliminate warning.
1537 * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
1540 2001-11-07 Dietmar Maurer <dietmar@ximian.com>
1542 * emit-x86.c (enter_method): print out all method arguments
1543 (x86_magic_trampoline): impl.
1544 (arch_create_simple_jit_trampoline): we use different trampolines
1545 for static methods (no need to write the address back into to
1548 2001-11-06 Dietmar Maurer <dietmar@ximian.com>
1550 * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
1551 use less the 16 bytes.
1553 * x86.brg: code cleanup
1555 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
1557 * testjit.c: bug fixes.
1559 * emit-x86.c (leave_method): print result values
1561 2001-11-03 Dietmar Maurer <dietmar@ximian.com>
1563 * emit-x86.c (enter_method): new debugging code
1564 (leave_method): new debbuging code, this functions are called
1565 when you use the new option --trace-calls
1567 2001-11-02 Dietmar Maurer <dietmar@ximian.com>
1569 * testjit.c: impl. STELEM_XX, STELEM_XX
1571 * x86.brg: impl. LDLEN, LDELEMA
1574 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
1576 * x86.brg: added some experimental code for CALL
1577 instructions - still not found the optimal way to do it.
1579 * testjit.c (map_stind_type): add support for value types with
1580 a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
1581 CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
1582 (ctree_create_newobj): impl.
1585 * emit-x86.c (tree_allocate_regs): removed allocation code for
1587 (get_address): use a simple, but bug free search instead of the
1588 buggy binary search.
1590 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
1592 * testjit.c: support virtual functions
1594 * x86.brg: support different addressing modes for calls
1596 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
1598 * testjit.c: impl. STFLD
1600 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
1602 * x86.brg: impl. CEQ
1604 2001-10-04 Dick Porter <dick@ximian.com>
1607 * emit-x86.c: include mono-endian.h not endian.h
1609 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
1611 * testjit.c (ctree_create_dup): really duplicate the tree.
1612 attach the arguments to the CALL node. Added a new macro to
1613 make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
1615 2001-10-01 Dietmar Maurer <dietmar@ximian.com>
1617 * interp.brg: the burm based interpreter: added the file as example.
1619 2001-09-27 Dietmar Maurer <dietmar@ximian.com>
1623 * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
1625 (map_stind_type): support enum types
1626 (map_ldind_type): support enum types
1628 * emit-x86.c (tree_allocate_regs): added code to support
1629 register allocation for addressing modes trees.
1630 (tree_emit): bug fix: we have to emit all mono_burg_functins. The
1631 previous impl. did not work for chain rules.
1632 (compute_branches): support for SWITCH statements
1634 * x86.brg: added rules to model x86 addressing modes
1636 2001-09-26 Dietmar Maurer <dietmar@ximian.com>
1638 * emit-x86.c (compute_branches): implemented SWITCH
1640 * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
1641 (map_ldind_type): add enumeration types.
1642 (map_stind_type): add enumeration types.
1644 * emit-x86.c (arch_compile_method): more documentation.
1646 * testjit.c: moved the architecture specific things to emit-x86.c
1647 and x86.brg. Added more documentation. code cleanup.
1649 2001-09-25 Dietmar Maurer <dietmar@ximian.com>
1651 * x86.brg: we now have different types of addresses: ADDR_L for local
1652 values, ADDR_A for arguments and ADDR_G for global addresses. We
1653 also use LDIND_XX token to load values from a specific address
1654 instead of LDLOC/STLOC.
1656 * testjit.c: use the new adressing scheme everywhere:
1657 LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)
1659 2001-09-24 Dietmar Maurer <dietmar@ximian.com>
1661 * testjit.c (main): fix bug in parameter parsing
1663 * x86.brg: impl. more opcodes
1665 2001-09-23 Dick Porter <dick@ximian.com>
1667 * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
1669 2001-09-23 Dietmar Maurer <dietmar@ximian.com>
1671 * testjit.c: use the memory pool to avoid memory leaks
1673 2001-09-22 Dietmar Maurer <dietmar@ximian.com>
1675 * x86.brg: increment the stack pointer after function calls
1677 2001-09-21 Dick Porter <dick@ximian.com>
1679 * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
1681 2001-09-21 Dietmar Maurer <dietmar@ximian.com>
1683 * x86.brg: implemented long MUL/DIV
1684 (MB_OPT_LEVEL): define optimisation level macro
1686 * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
1687 for operations like idiv. it is also possible to assign specific registers.
1689 2001-09-20 Dietmar Maurer <dietmar@ximian.com>
1691 * x86.brg: added basic support for long
1693 * testjit.c (mono_compile_method): implemented POP
1695 2001-09-19 Miguel de Icaza <miguel@ximian.com>
1697 * testjit.c (usage): Added a couple of more usage options.
1699 2001-09-19 Dietmar Maurer <dietmar@ximian.com>
1701 * x86.brg: added more floating point grammar
1703 * testjit.c (mono_compile_method): make local offsets negative
1705 * x86.brg: added some floating point trees
1707 * testjit.c (mono_compile_method): arguments on the runtime
1708 stack are at least 4 bytes
1710 * x86.brg: partly implemented 8,16 bit integers
1712 * testjit.c (get_address): mark basic blocks
1714 2001-09-18 Dietmar Maurer <dietmar@ximian.com>
1716 * x86.brg: added some rules to optimize code
1718 * testjit.c (get_address): use a binary search to get the address
1719 (main): added an option to debug the jit (-d)
1721 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
1723 * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
1725 2001-09-17 Miguel de Icaza <miguel@ximian.com>
1727 * testjit.c (mono_compile_method): Provide better error reporting.
1729 2001-09-17 Dietmar Maurer <dietmar@ximian.com>
1731 * testjit.c (tree_get_address): impl. to fix address bug
1732 (tree_get_address): make sure that we can only jump to the first
1733 instruction of a tree.
1735 * x86.brg: emit real code for calls
1737 * testjit.c (create_jit_trampoline): creates a function to trigger jit
1739 (mono_compile_method): reversed argument order
1741 2001-09-15 Dietmar Maurer <dietmar@ximian.com>
1743 * x86.brg (stmt): don't emit unnecessary register moves
1745 * testjit.c (tree_allocate_regs): free registers earlier
1747 2001-09-14 Dietmar Maurer <dietmar@ximian.com>
1749 * x86.brg: branch addresses are now resolved
1751 * testjit.c (compute_branches): compute address of branches
1753 * x86.brg: emit real x86 instructions
1755 * testjit.c: call objdump to disassemble the output
1757 2001-09-13 Dietmar Maurer <dietmar@ximian.com>
1759 * x86.brg: use the right offsets to access local variables
1762 * emit-x86.c: only save/restore callee saved registers if they are
1765 * testjit.c (tree_allocate_regs): use the new MonoRegSet to
1767 (mono_compile_method): changed the tree for mothod calls
1774 2001-09-10 Miguel de Icaza <miguel@ximian.com>
1776 * x86.brg: Use Unix assembly syntax.
1778 * emit-x86.c: support code, should be moved
1780 * testjit.c: Use GPtrArrays instead of GLists, as those are very
1781 inefficient at appends.
1783 * Renamed `create_new_leave' to `create_new_leaf'