1 2002-07-05 Martin Baulig <martin@gnome.org>
3 * debug.c (mono_debug_add_method): Fix a bug in the `begin_scope' and
4 `end_scope' calculations when linear scan register allocation is disabled.
6 2002-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8 * mono.c: removed the "RESULT: X" message.
10 2002-07-01 Dietmar Maurer <dietmar@ximian.com>
12 * exception.c (arch_get_call_finally): restore caller saved
13 register used by global reg. allocation when calling finally
14 handlers (fixes bug #24943).
16 2002-07-01 Dick Porter <dick@ximian.com>
18 * jit.c (mono_jit_exec): Removed unneeded argument to
19 mono_runtime_run_main()
21 2002-06-28 Martin Baulig <martin@gnome.org>
23 * debug.c (debug_generate_method_lines, mono_debug_add_method): Make methods
24 start on the nop instruction to make single-stepping into an already-JITed
27 2002-06-26 Martin Baulig <martin@gnome.org>
29 * debug.c (mono_debug_source_location_from_address): Added
30 `guint32 *line_number' argument. If it's not NULL, store the line number
31 there and return the file name without the line number.
33 * exception.c (ves_icall_get_trace): Fill in `sf->filename' and `sf->line'.
34 (ves_icall_get_frame_info): Likewise.
36 2002-06-25 Dick Porter <dick@ximian.com>
38 * jit.c (mono_jit_exec): Pass the assembly to mono_runtime_run_main
40 2002-06-22 Martin Baulig <martin@gnome.org>
42 * debug.c (mono_debug_source_location_from_address): Small fix, an
43 unsigned number can never be smaller than zero, make that check
46 2002-06-19 Dietmar Maurer <dietmar@ximian.com>
48 * exception.c (ves_icall_get_trace): new method to get the stack
49 trace from a Exception.
51 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
53 * jit.c (check_inlining): do not inline functions containing
54 calls to stack query functions
56 * exception.c (ves_icall_get_frame_info): impl.
58 Tue Jun 18 10:21:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
60 * invoke.c: marshal simple arrays correctly.
62 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
64 * x86.brg: added inlined versions of Math.Sin, Math.Cos, Math.Sqrt
66 * jit.c (mono_analyze_stack): impl. STARG
67 (mono_analyze_stack): impl. LDARGA
69 * exception.c (arch_handle_exception): correctly restore register
70 values when unwinding the stack (fixes bug 25698)
72 2002-06-09 Martin Baulig <martin@gnome.org>
74 * debug.c (mono_debug_open_image): For MONO_DEBUG_FORMAT_DWARF2_PLUS,
75 the `%s-debug.s' file is in the same directory than its assembly.
77 Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
79 * message.c, emit-x86.c: kill warnings.
81 2002-05-31 Dietmar Maurer <dietmar@ximian.com>
83 * x86.brg: buf fix in REMOTE_STIND_OBJ
84 (mono_ldvirtftn): impl.
85 (mono_ldintftn): impl.
88 Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
90 * mono.c: added --config command line option.
92 Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
94 * jit.c, jit.h: collect statistics about the number of basic blocks.
96 2002-05-31 Martin Baulig <martin@gnome.org>
98 * debug.c (mono_debug_address_from_il_offset): New public function.
99 (mono_debug_add_method): Improved local variable info: correctly handle
100 variables in registers and their start/end scopes.
102 2002-05-30 Martin Baulig <martin@gnome.org>
104 * debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
105 not "%p" which seems to be broken on Windows/mingw32.
107 2002-05-30 Dietmar Maurer <dietmar@ximian.com>
109 * x86.brg (reg): bug fix in LOCALLOC
111 * mono.c (main): new switch --nointrinsic to disable memcpy opt.
113 * x86.brg: added block copy/init optimizations from
114 Serge (serge@wildwestsoftware.com)
116 Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
118 * invoke.cs: lookup P/Invoke method address only when needed.
120 2002-05-29 Dietmar Maurer <dietmar@ximian.com>
122 * x86.brg: bug fix in REMOTE_STIND_OBJ
124 * invoke.c (arch_create_native_wrapper): handle pointers to value types
126 * helpers.h: use mono_ prefix for all functions
128 * jit.c (mono_analyze_stack): fixed SIZEOF
130 * x86.brg: impl. LOCALLOC, INITBLK
132 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
134 * x86.brg: impl. CKFINITE
136 * jit.c (mono_analyze_stack): impl. CEE_CALLI
138 * x86.brg (JMP): impl. JMP opcode
140 2002-05-27 Dietmar Maurer <dietmar@ximian.com>
142 * jit.c (mono_cfg_new): reserve additional space to store ESP when
143 calling finally handlers.
145 * exception.c (arch_get_call_finally): save ESP before calling
148 * helpers.c (map_arg_type): move some generic helper function into
151 * mono.c (usage): new option --breakonex
153 * exception.c (arch_exc_is_caught): only return FALSE if really
156 * jit.c (mono_thread_abort): free jit_tls
158 2002-05-24 Dietmar Maurer <dietmar@ximian.com>
160 * x86.brg (stmt): use memmove to cope with overlapping
161 blocks. This is not required by the specs, so we can remove it
162 later if it turns out to be too slow (and use memcpy).
164 * jit.c (mono_analyze_stack): moved const. folding from x86.brg
166 * x86.brg: CPBLK impl.
168 * emit-x86.c (tree_emit): modified to support 3 nonterminals per
169 rule (used for CPBLK).
171 Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
173 * mono.c: remove generated code from hash when benchmarking/testing
175 * invoke.cs: special case string ctors.
177 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
179 * *.c: code cleanups - tried to separate architecture dependent things.
181 2002-05-23 Martin Baulig <martin@gnome.org>
183 * debug.c (mono_debug_open): Don't call mono_debug_add_image().
184 (mono_debug_write_symbols): Only recreate the symbol file if
187 * debug-private.h (MonoDebugHandle): Added `dirty' flag.
189 * mono.c (main): Call mono_debug_add_image() here.
191 * jit.c (mono_thread_abort): If we have debugging support, call
192 mono_debug_make_symbols() and G_BREAKPOINT().
194 * exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
195 an unhandled exception.
197 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
199 * delegate.c: move the thread pool to metadata/threadpool.c, code
202 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
204 * exception.c (arch_exc_is_catched): impl. MS like exception
205 handling (added a check for unhandled exceptions)
207 2002-05-22 Martin Baulig <martin@gnome.org>
209 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
210 the assembler if necessary, ie. the assembler file is newer than the
211 symbol file or the symbol file does not exist.
213 * debug.c: Added "update_on_exit" argument to recreate the symbol file
216 * debug-dwarf2.c: Produce assembler code which is free of comments and
217 extra whitespaces so that it's suitable for `as -f'.
219 2002-05-22 Martin Baulig <martin@gnome.org>
221 * debug-dwarf2.c (dwarf2_write_section_end): Removed. This is not needed
222 and not supported by all assemblers.
223 (dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
226 * mono.c (--debug): Small fix in the argument parsing.
228 2002-05-22 Martin Baulig <martin@gnome.org>
230 * debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.
232 * mono.c: Applied patch from Miguel:
233 (--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
236 2002-05-21 Martin Baulig <martin@gnome.org>
238 * debug.c (mono_debug_source_location_from_address): Added support for the
241 2002-05-21 Martin Baulig <martin@gnome.org>
243 * debug.c (mono_debug_source_location_from_address): New function.
244 (mono_debug_il_offset_from_address): New function.
246 * exception.c (arch_handle_exception): If we have debugging support, include
247 information about the source location and IL offset in the stack trace.
249 2002-05-21 Dietmar Maurer <dietmar@ximian.com>
251 * jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
254 * x86.brg (stmt): removed unnecessary assertion
256 * jit.c (check_inlining): we cant inline throw instructions
257 (because it breaks some basic block requirements)
259 2002-05-21 Martin Baulig <martin@gnome.org>
261 * debug-private.h (MonoDebugFlags): New enum typedef.
263 * debug.c (mono_debug_open): Added a few useful arguments. See the manpage
266 2002-05-21 Martin Baulig <martin@gnome.org>
268 * debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
269 a `MonoAssembly *' argument instead of a `char *filename' one. Also added
270 `const char **args' argument.
272 * mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
273 `int verbose' argument and made it public.
274 (mono_jit_compile_class): New public function, moved the code to compile
275 all methods in a class here from main().
276 (--compile): The argument can now also be an image (in `@imagename' format).
277 Updated documentation for this command line argument.
278 (--precompile): New command line argument to precompile an image/class/method
279 before executing the main app. This argument can be given multiple times.
280 (--break): Renamed the "--debug" command line argument to "--break".
281 (--debug): New command line argument to specify the debugging format.
282 (--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
283 (--debug-args): New command line argument. This is a comma-separated list of
284 additional arguments for the symbol writer.
285 (usage): Beautified the help text a bit.
287 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
288 public mono_jit_compile_image() function rather than duplication this
291 2002-05-21 Martin Baulig <martin@gnome.org>
293 * debug-dwarf2-plus.c: This is now working again :-)
295 * debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
296 we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
297 one for the fallback MONO_DEBUG_FORMAT_DWARF2.
299 2002-05-21 Martin Baulig <martin@gnome.org>
301 * jit.c (mono_debug_handle): Removed this global variable.
303 * debug.c (mono_debug_close): Removed.
304 (mono_debug_cleanup): New global function.
305 (mono_debug_add_image): New global function.
306 (mono_debug_handle_from_class): New global function.
307 (mono_debug_write_symbols): New global function.
308 (mono_debug_add_type): Removed `MonoDebugHandle *' argument.
309 (mono_debug_add_method): Likewise.
311 2002-05-21 Martin Baulig <martin@gnome.org>
313 Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
314 file for all assemblies. Currently, the JIT doesn't put all methods
315 from a single assembly into a continuous region of memory. We were
316 previously creating valid DWARF 2 files for this, but unfortunately
317 GDB's symbol tables get messed up when it reads more than one such file.
319 * debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
320 `next_idx', `methods', `type_hash', `source_files' and `format'
321 into the MonoDebugHandle.
323 * debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
324 not on the AssemblyDebugInfo.
325 (mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().
327 * debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
328 mono_debug_write_dwarf2().
329 (mono_debug_open_assembly_dwarf2): Removed.
330 (mono_debug_close_assembly_dwarf2): Removed.
332 * debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
333 mono_debug_write_stabs().
334 (mono_debug_open_assembly_stabs): Removed.
335 (mono_debug_close_assembly_stabs).
337 * debug-dwarf2-plus.c: This is currently broken. :-(
339 2002-05-20 Martin Baulig <martin@gnome.org>
341 * debug.h (mono_debug_format): New global variable.
342 (MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.
344 * debug-private.h (MonoDebugHandle): Added `objfiles' field which is
345 a whitespace separated list of symbol files.
346 (AssemblyDebugInfo): Added `objfile' filed which is the name of the
349 * mono.c (main): Pass the assembly file name to mono_debug_open_file().
351 * debug.c (mono_debug_make_symbols): Link all symbol files into a big
352 `<assemblyname>.o' symbol file.
354 2002-05-20 Martin Baulig <martin@gnome.org>
356 * debug.c (debug_load_method_lines): Check whether the assembly file
357 is newer than the IL file and recreate the IL file if necessary.
359 2002-05-20 Miguel de Icaza <miguel@ximian.com>
361 * mono.c Updated copyright years.
363 2002-05-18 Miguel de Icaza <miguel@ximian.com>
365 * mono.c (usage): Relayout command line options.
367 2002-05-17 Dietmar Maurer <dietmar@ximian.com>
369 * x86.brg (reg): fixed array bound check
371 * emit-x86.c (enter_method): print method signature
373 * exception.c (arch_handle_exception): set trace info before we
376 2002-05-16 Dietmar Maurer <dietmar@ximian.com>
378 * jit.c (mono_find_final_block): make it work with mcs
380 * x86.brg: buf fix. if exception variable is allocated to a register.
382 * jit.c (mono_find_final_block): bug fix.
384 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
386 * delegate.c (arch_end_invoke): fix bug #24653, simplified the
387 code using new runtime_invoke feature.
389 * jit.c (mono_analyze_flow): try blocks are followed by handler
390 blocks, so we need to add all handler blocks as succesors.
391 (mono_thread_start_cb): set end_of_stack
393 * exception.c (arch_handle_exception): correctly save/restore caller
396 * emit-x86.c (arch_emit_prologue): correctly save/restore caller
399 * jit.c (mono_cfg_new): allocate space for caller saved registers.
401 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
403 * jit.c: only use one TLS slot to store jit data
405 * exception.c (arch_handle_exception): print function signature,
406 use thread relative end_of_stack
408 2002-05-13 Dietmar Maurer <dietmar@ximian.com>
410 * jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
411 store them as 32 bit integers.
412 (mono_analyze_stack): we need to generate a temporary var for
413 SHL/SHR because the tree allocator can fail otherwise
415 * exception.c (arch_handle_exception): EIP now points to the call
416 instruction, not to the instruction after the call. This fixes the
417 bug reported by Linus Upson (tests/exception8.cs)
419 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
421 * jit.c (mono_analyze_flow): always allocate the forest array
422 (mono_stack_duplicate_used_var): impl.
423 (mono_copy_used_var): impl.
425 * x86.brg: bug fix in SHR/SHL
427 * emit-x86.c (arch_emit_prologue): check if live_in_set != NULL
429 2002-05-11 Sergey Chaban <serge@wildwestsoftware.com>
431 * mono.c: new --fast-iconv command line option
432 to enable fast FP-to-integer conversion code.
433 * jit.c, jit.h: added global variable to store state
434 for the above option. This optimization is disabled
436 * x86.brg: added code to emit fast FP-to-integer
437 conversion sequences.
439 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
441 * emit-x86.c: simple definite assignment analysis optimization for
442 uninitialized locals.
444 Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
446 * x86.brg, emit-x86.c: patch the branch targets with x86_patch().
448 2002-05-10 Dietmar Maurer <dietmar@ximian.com>
450 * linear-scan.c (mono_update_gen_set): improvement/bug fix
452 * x86.brg: added additional rules to handle global allocated registers
454 * mono.c (usage): the option is called --nols, and it dissables
457 * x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8
459 2002-05-09 Dietmar Maurer <dietmar@ximian.com>
461 * linear-scan.c: linear scan reg. allocation and data flow analysis
462 use Paolo's great bitset implementation.
464 * jit.c (arch_allocate_var): add live range info
465 (mono_cfg_add_successor): create list of successors for basic
468 * mono.c (main): new option --ls to enable linear scan
470 * exception.c (arch_handle_exception): print instruction pointer
471 relative to method start address.
473 * jit.c (mono_print_ctree): print register number if locals are
474 allocate in registers.
476 * emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
477 (arch_emit_epilogue): take care when restoring save registers,
478 because the stack pointer may has changed.
480 * x86.brg: s/VAROFFSET/VARINFO/
481 modified to support global register allocation
483 Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
485 * jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.
487 2002-05-03 Sergey Chaban <serge@wildwestsoftware.com>
489 * x86.brg: more coni4 optimizations
490 MUL: generate optimized code for some consts other
491 than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
492 DIV_UN: multiply with reciprocal instead of dividing;
494 2002-05-03 Dietmar Maurer <dietmar@ximian.com>
496 * x86.brg: use VAROFFSET macro
498 * emit-x86.c (tree_emit): allocate space for spilled regs in
499 activation frame instead of pushing them to the stack.
501 * x86.brg: replace BXX with CBRANCH/COMPARE
502 replaced CXX CSET/COMPARE
504 * emit-x86.c (arch_allocate_regs): improved register allocation
506 2002-05-02 Dietmar Maurer <dietmar@ximian.com>
508 * delegate.c (mono_delegate_cleanup): signal semaphore in order to
511 2002-04-30 Dick Porter <dick@ximian.com>
513 * mono.c (main): Tell glib to not abort when g_log() etc print
516 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
518 * x86.brg: opt. LDELEMA impl.
519 (MUL) use shift when possible.
520 (DIV) use shift when possible.
521 impl. various opt. with coni4
523 * exception.c (arch_handle_exception): use ctx->SC_EBP in
524 end_of_stack check as suggested by Linus Upson <linus@linus.com>
526 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
528 * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.
530 * exception.c: included the Freebsd patch from Sandro Tolaini
531 <sandro@focuseek.com>
533 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
535 * mono.c, jit.c: use mono_runtime_run_main ().
537 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
539 * jit.c (mono_analyze_stack): dont call methods on Object with
540 METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
542 * x86.brg: added more CONV_U rules
544 * jit.c (mono_analyze_stack): avoid recursive call of virtual
545 methods: fixes Bug #23778
546 (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
548 * exception.c (arch_handle_exception): only g_assert(cleanup) if
551 2002-04-27 Patrik Torstensson <patrik.torstensson@intel.com>
553 * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
555 2002-04-27 Martin Baulig <martin@gnome.org>
557 * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
558 there's already `epilog' so we don't need `epilogue_begin'.
560 * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
561 size of the method's code.
563 2002-04-25 Martin Baulig <martin@gnome.org>
565 * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
568 2002-04-25 Dietmar Maurer <dietmar@ximian.com>
570 * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
571 added CONV_OVF_I4 (fix bug #23808)
573 2002-04-23 Dietmar Maurer <dietmar@ximian.com>
575 * x86.brg: code cleanup - use x86_patch ()
577 * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
578 (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
580 * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
581 because it slows down performance.
583 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
585 * emit-x86.c: enter_method handles 8-byte aligned parameters.
587 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
589 * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
592 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
594 * jit.c (check_inlining): added statistics about inlineing
596 * mono.c (usage): new switch --noinline to disable inlining
598 * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
599 inline methods (to keep semantics)
601 * x86.brg: added constant folding for inegers
603 * emit-x86.c (tree_allocate_regs): handle the special case when
604 chain rules need a register.
606 2002-04-19 Dietmar Maurer <dietmar@ximian.com>
608 * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
610 * jit.c (check_inlining): better inlining support
612 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
614 * x86.brg: LDLEN uses max_length instead of bounds[0]
615 * jit.c: support for new szarray format
617 2002-04-18 Dietmar Maurer <dietmar@ximian.com>
619 * jit.c (check_inlining): added inlining support
621 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
623 * x86.brg: optimized version of castclass and isinst
625 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
627 * emit-x86.c, invoke.c: track time spent compiling.
629 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
631 * emit-x86.c, invoke.c: call profile callbacks if needed.
632 * jit.c, jit.h, mono.c: add --profile command line option.
634 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
636 * jit.h: included mono/io-layer/io-layer.h to avoid breaking
637 compilation under windows when upgrading mingw and w32api to
638 version 1.3 (thanks Dick!).
640 2002-04-15 Patrik Torstensson <patrik.torstensson@labs2.com>
642 * jit.c: changed the array icalls to use full names
644 2002-04-15 Dietmar Maurer <dietmar@ximian.com>
646 * x86.brg: check the this pointer before calling
647 non-virtual functions
649 * emit-x86.c (arch_emit_prologue): initialize local vars.
651 * x86.brg: removed incredible clumsy code
653 2002-04-13 Martin Baulig <martin@gnome.org>
655 * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
656 the location of a variable.
657 (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
658 instead of a stack offset and use dwarf2_write_variable_location() to write
661 2002-04-13 Martin Baulig <martin@gnome.org>
663 * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
666 2002-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
668 * Makefile.am: use of the new '-s' option in monoburg.
670 2002-04-12 Martin Baulig <martin@gnome.org>
672 * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
675 2002-04-10 Sergey Chaban <serge@wildwestsoftware.com>
676 * win32-exception: added Win32 SEH exception filter that translates
677 CONTEXT to sigcontext;
679 * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
680 in a platfrom-dependent way;
682 * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
683 and avoid io-layer includes;
685 * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
688 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
690 * delegate.c (arch_end_invoke): restore output arguments
692 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
694 * jit.c: call mono_runtime_init ().
696 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
698 * jit.c (mono_jit_cleanup): added more statistics
700 * invoke.c (arch_create_native_wrapper): special case EndInvoke -
701 we need to pass the MonoMethod pointer as first argument.
703 * delegate.c (mono_async_invoke): notify all listeners, not only a
705 (arch_end_invoke): we now pass a MonoMethod as first parameter and
706 use arch_method_call_message_new() to access the stack.
707 (arch_end_invoke): wait until we really finished processing
708 (async_invoke_abort): notify all listeners, not only a
711 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
713 * message.c (arch_return_value): impl.
714 (arch_method_return_message_restore): consider delegate BeginInvoke
716 * jit.c: removed jit_exec_main()
718 * delegate.c (arch_begin_invoke): use the message builder to make
719 it architecture independent - still needs more cleanup.
721 2002-04-05 Dietmar Maurer <dietmar@ximian.com>
723 * delegate.c (mono_delegate_ctor): support for transparent proxy
725 * x86.brg (freg): bug fix in CONV_R* opcodes
727 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
729 * message.c: added documentation
731 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
733 * mono.c (main): use --trace instead of --trace-calls
735 * x86.brg: impl. REMOTE_STIND_XX
737 * message.c (mono_store_remote_field): impl.
739 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
741 * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
743 * message.c (mono_load_remote_field): impl.
745 * jit.c (mono_analyze_stack): only call marshalbyref methods
747 (mono_analyze_stack): consider marshalbyref objects in LDFLD
749 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
751 * x86.brg: kill pointer arithmetric.
753 2002-03-28 Martin Baulig <martin@gnome.org>
755 * jit.c (mono_debug_insert_breakpoint): New global variable.
756 (mono_debug_last_breakpoint_address): New global variable.
758 * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
759 non-zero, insert a breakpoint; if it's positive, decrement it when done.
760 Set `mono_debug_last_breakpoint_address' to the address of the last inserted
763 * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
764 `mono_debug_last_breakpoint_address', also documented them here.
766 2002-03-28 Martin Baulig <martin@gnome.org>
768 * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
769 (AssemblyDebugInfo): Added `format'.
771 * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
772 this allows us choose the format on a per-assembly basis.
773 (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
774 to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
776 (debug_generate_method_lines): Generate correct IL offsets.
778 2002-03-28 Martin Baulig <martin@gnome.org>
780 * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
782 * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
784 * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
785 `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
787 * debug.c (debug_generate_method_lines): Don't return if we don't have line
788 numbers, we still need to generate the IL offsets here. Emit line numbers
789 for `prologue_end_offset' (the first line of actual code) and
790 `epilogue_begin_offset' (the line of the method's closing brace).
791 Don't crash if cfg->bblocks [i].forest is NULL.
792 (mono_debug_add_method): Don't crash if we don't have line numbers.
793 Initialize the newly added fields.
795 * debug-stabs.c: Record first and last line, emit filename info at the
796 beginning of the stab file, gdb ignores the types otherwise.
798 * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
799 emit line number info for the first and last line.
801 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
803 * invoke.c (arch_create_delegate_trampoline): impl.
805 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
807 * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
808 with the jit runtime to easy embedding. main() is moved to mono.c, now.
809 * jit.c: use opcode names from libmetadata.
810 * debug.h, debug.c: constify char* argument.
812 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
814 * jit.c: catching SIGSEGV again, added proxy support
816 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
818 * delegate.c (mono_delegate_init): remove unused worker threads
820 2002-03-27 Mike Kestner <mkestner@speakeasy.net>
822 * delegate.c (arch_get_delegate_invoke): malloc a bigger area
824 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
826 * jit.c: remove glib mem vtable code.
828 2002-03-26 Martin Baulig <martin@gnome.org>
830 * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
831 lines if we don't have line number information.
832 (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
835 * debug-stabs.c (write_method_stabs): Don't generate method lines if
836 we don't have line number information. Use `minfo->method_info.this_offset'
837 instead of hardcoding 8.
839 * debug.c (debug_generate_method_lines): Don't crash if we don't have
840 line number information.
841 (mono_debug_open_assembly): Don't generate line numbers for
842 MONO_DEBUG_FORMAT_DWARF2_PLUS.
843 (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
844 but it in the new `this_offset' field.
846 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
848 * debug.c (debug_generate_method_lines): Use correct addresses for
851 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
853 * jit.c: do not set the glib mem vtable anymore.
854 * Makefile.am: link to libmonoutils.
856 2002-03-25 Martin Baulig <martin@gnome.org>
858 * debug.h (mono_debug_make_symbols): Documented this function.
860 2002-03-24 Martin Baulig <martin@gnome.org>
862 * debug.c (mono_debug_add_method): Include the `this' offset in
863 the `minfo->method_info.param_offsets' array.
865 2002-03-23 Martin Baulig <martin@gnome.org>
867 * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
868 to do it before the X86_CMP.
869 (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
870 (reg: CLT (lreg, lreg)): Likewise.
871 (reg: CLT_UN (lreg, lreg)): Likewise.
872 (reg: CLT_UN (lreg, lreg)): Likewise.
873 (reg: CGT (lreg, lreg)): Likewise.
874 (reg: CGT (lreg, lreg)): Likewise.
875 (reg: CGT_UN (lreg, lreg)): Likewise.
876 (reg: CGT_UN (lreg, lreg)): Likewise.
878 2002-03-23 Martin Baulig <martin@gnome.org>
880 * debug-private.h (AssemblyDebugInfo): Added `_priv'.
882 * debug-dwarf2-plus.c
883 (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
884 (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
885 (mono_debug_write_assembly_dwarf2_plus): Only call
886 mono_debug_update_symbol_file() here.
888 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
890 * jit.c: inter strings before executing a method.
891 Do not intern command line arguments anymore.
893 2002-03-21 Martin Baulig <martin@gnome.org>
895 * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
897 * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
898 been created by MCS and fills in all machine dependent stuff.
900 * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
901 removed everything which is already in MonoDebugMethodInfo.
903 * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
904 (mono_debug_make_symbols): Don't open the file or call as, this is done in the
907 * jit.c (main): Added "--dwarf-plus" command line option to use the new
908 MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
910 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
912 * jit.c (usage): new option to specify maximum number of worker threads
913 (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
915 * delegate.c (async_invoke_abort): added support for asynchronous exceptions
916 (arch_get_async_invoke): notify listeners before we call the
917 asynchronous callback
919 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
921 * delegate.c (async_invoke_thread): support for domains
922 (async_invoke_thread): create workers only when needed
924 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
926 * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
928 2002-03-18 Dietmar Maurer <dietmar@ximian.com>
930 * x86.brg: impl. lreg: XOR (lreg, lreg)
931 impl. REM (freg, freg)
933 2002-03-17 Martin Baulig <martin@gnome.org>
935 * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
938 * debug-dwarf2.c: Added support for strings and arrays.
940 2002-03-17 Martin Baulig <martin@gnome.org>
942 * debug.c (mono_debug_get_type): Recursively call this for all function members
944 (mono_debug_add_method): Don't mangle function names, this must be done by the
945 debugger backend if the debugging format needs mangled names.
947 * debug-dwarf2.c: Improved support for classes, added member functions.
949 2002-03-16 Martin Baulig <martin@gnome.org>
951 * debug.c (mono_debug_get_type): Recursively call this for all members and
952 parent classes of a class type.
954 * debug-dwarf2.c: Added basic support for classes. Set source language to C++
955 since GDB doesn't like Java very much.
957 2002-03-16 Martin Baulig <martin@gnome.org>
959 * debug-dwarf2.c: Added support for enums.
961 2002-03-15 Martin Baulig <martin@gnome.org>
963 * debug.c (mono_debug_get_type): Recursively call this for all members
966 * debug-dwarf2.c: Added support for structs.
968 2002-03-15 Dietmar Maurer <dietmar@ximian.com>
970 * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
971 to new MonoLMF layout
973 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
975 * emit-x86.c (arch_create_native_wrapper): new code to generate
976 wrappers for calling native functions.
977 (arch_create_native_wrapper): free allocated strings
978 (arch_handle_exception): made mono_jit_info_table domain dependent
980 2002-03-14 Martin Baulig <martin@gnome.org>
982 * debug.c (MonoDebugFormat): New public enums specifying which debugging
984 (mono_debug_open_file): Added MonoDebugFormat argument.
985 (mono_debug_make_symbols): Don't take an argument to make it easier to call
986 this function from GDB. It's now safe to call this function multiple times;
987 it'll always write a complete debugging file.
989 * debug.c: Splitted this file into a general part which remains in this file
990 and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
991 All public functions now call a corresponding format specific function.
993 * debug.c: The following changes are private to debug.c:
994 (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
995 (record_line_number, debug_generate_method_lines): New private functions.
996 (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
997 calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
998 mono_debug_open_assembly_dwarf2).
999 (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
1000 now safe to call this function multiple times.
1001 (mono_debug_get_type): New public function. This takes a `MonoClass *' and
1002 returns an unique index for this type. It's used to ensure that we only write
1003 each class once to the debugging file.
1004 (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
1005 data structure, but don't directly write to the debugging file. This is done
1006 later from mono_debug_write_assembly().
1008 * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
1009 debugging output. Call mono_debug_close() on cleanup if necessary.
1011 2002-03-14 Martin Baulig <martin@gnome.org>
1013 * debug-private.h: New private header file.
1015 * debug-stabs.c: Added the stabs type generation stuff which was
1016 previously in debug.c.
1018 * debug-dwarf.c: Started to implement type support. We're currently
1019 only writing this most basic types to the dwarf file, but this will
1022 2002-03-13 Martin Baulig <martin@gnome.org>
1024 * debug-stabs.c, debug-dwarf2.c: New files containing my new
1025 debugging code. They're now in CVS, but not yet used anywhere.
1027 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
1029 * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
1030 macros, included new delegate code from Daniel Stodden.
1033 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
1035 * jit.c: verify that corlib and runtime are in sync.
1037 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
1039 * emit-x86.c, jit.c: use the debug-helpers facilities to
1040 describe and match a method when debugging.
1042 2002-03-10 Martin Baulig <martin@gnome.org>
1044 * emit-x86.c (arch_compile_method): When emitting stabs debugging
1045 output, put a nop instruction at the start of all functions so that
1046 the adresses won't change when using --debug.
1048 * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
1049 the bytecode area, stabs needs a line number in the .il file. Use the
1050 new info->moffsets to get the line number.
1051 (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
1052 `moffsets' is an array of `total_lines' fields (total number of lines
1053 in the .il file); for each line in the .il field, this array contains
1054 the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
1055 of a method and 0 otherwise.
1056 (debug_load_method_lines): Read the whole .il file and initialize the
1057 info->moffsets field.
1059 2002-03-09 Martin Baulig <martin@gnome.org>
1061 * x86.brg (DIV_UN): Clear EDX before performing the division and remove
1062 the unnecessary CDQ instruction.
1064 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1066 * jit.c (mono_analyze_stack): only load addresses of value types
1067 on the runtime stack.
1069 2002-03-07 Duncan Mak <duncan@ximian.com>
1071 * Makefile.am: A small patch fixing errors in vpath-based builds
1072 (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
1073 committed for Daniel Stodden <stodden@in.tum.de>.
1075 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1077 * jit.c: Boehm-GC enable.
1079 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1081 * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
1082 realloc that code sometimes!
1084 * emit-x86.c (mono_compute_branches): support several types of
1087 2002-03-06 Dietmar Maurer <dietmar@ximian.com>
1089 * x86.brg: impl. MUL_OVF_UN (reg, reg)
1091 * jit.c (mono_find_final_block): find correct finally handler.
1093 * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
1094 caller saved registers.
1096 2002-03-05 Dietmar Maurer <dietmar@ximian.com>
1098 * x86.brg: use x86_widen_reg for CONV opcodes
1100 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
1102 * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
1104 * emit-x86.c (arch_handle_exception): big fix - dont use
1105 uninitialized next_bp
1106 (arch_compile_method): make the jit thread save
1107 (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
1108 to avoid need of recursive mutexes
1110 * x86.brg: use new mono_assert macros
1112 2002-02-28 Dietmar Maurer <dietmar@ximian.com>
1114 * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
1115 calling into unmanaged code (arch_compile_method).
1117 * x86.brg: impl. CONV_I4 (freg) with correct rounding
1118 (lreg): impl CALL_I8(INTF_ADDR)
1119 impl. CONV_R_UN (reg)
1122 2002-02-27 Dietmar Maurer <dietmar@ximian.com>
1124 * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
1126 2002-02-26 Dietmar Maurer <dietmar@ximian.com>
1128 * x86.brg: bug fix in CLT(lreg,lreg)
1129 (reg): bug fix in CONV_OVF_I4(lreg)
1130 (lreg): replaced x86_call_reg with x86_call_code
1132 * emit-x86.c (mono_add_jump_info): impl.
1133 (mono_compute_branches): patch real jump address (instead of
1134 emitting code twice)
1136 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1138 * x86.brg: optimize cmp reg,0 -> test reg.
1140 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1142 * jit.h, jit.c, emit-x86.c: Added a few statistics counters
1143 and the --stats command line option to print them.
1144 Fixed memory leak in arch_compile_method () when a method's code is
1145 found in the cache. Fix magic trampoline to deal with static calls.
1147 2002-02-21 Dietmar Maurer <dietmar@ximian.com>
1149 * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN
1151 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
1153 * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
1154 (arch_create_jit_trampoline): cache trampoline code
1156 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1158 * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
1160 (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
1162 * x86.brg: do not encode exception objects into the instruction
1163 stream, because they are domain dependend. Use
1164 arch_get_throw_exception_by_name() instead;
1166 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1168 * jit.c: intern command line arguments.
1170 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1172 * jit.c (mono_analyze_stack): use the magic trampoline for all
1173 calls (since we cant store the address of compiled code in
1175 (mono_analyze_stack): imp. LDSTR for shared code
1177 * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
1178 (arch_compile_method): add a cache for compiled methods to avoid
1179 recompilation. dont use method->addr to store domain dependent
1182 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1184 * x86.brg: impl. BLE,BGT for freg
1186 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1188 * emit-x86.c: handle unreachable code. Eliminate some unneeded
1190 * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
1191 main(). Add --compile classname and --ncompile num command line
1192 options to do performance evaluation of the jitter (and help
1195 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1197 * emit-x86.c (arch_compile_method): bug fix in static delegate
1200 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
1202 * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
1204 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
1206 * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
1208 2002-02-13 Miguel de Icaza <miguel@ximian.com>
1210 * jit.c (arch_allocate_var): Only assert that the alignment is
1211 at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
1213 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1215 * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
1217 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1219 * emit-x86.c: make x86_magic_trampoline() handle call instructions
1220 with an imm8 displacement. x86.brg not yet changed to take advantage
1223 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1225 * jit.c: use opcode info from libmetadata to do flow analysis
1228 2002-02-06 Dietmar Maurer <dietmar@ximian.com>
1230 * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking
1232 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
1234 * x86.brg: use element_class for type check
1236 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
1238 * jit.c (main): impl. __array_Address icall
1240 * mempool.c (mono_mempool_alloc): handle large block allocation
1242 2002-02-01 Dietmar Maurer <dietmar@ximian.com>
1244 * x86.brg: impl. SHL/SHR/CLT for 64 bit values
1246 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
1248 * x86.brg: impl. CEQ(lreg,lreg)
1250 * jit.c (mono_analyze_stack): impl. LDVIRTFTN
1251 (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
1253 * x86.brg: removed some dead code.
1255 2002-01-18 Dietmar Maurer <dietmar@ximian.com>
1257 * jit.c (arch_allocate_var): fixed alignment bugs
1259 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
1261 * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
1263 2002-01-16 Dietmar Maurer <dietmar@ximian.com>
1265 * jit.c (main): install the trampoline before we start to create
1268 * x86.brg: impl. CLT_UN, CGT_UN
1270 * emit-x86.c (leave_method): added check for null object
1271 (enter_method): consider byref arguments
1273 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
1275 * x86.brg: bug fix in CONV_OVF_I1_UN
1276 impl. ADD_OVF, MUL_OVF
1277 impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
1278 (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
1279 (EMIT_COND_EXCEPTION): added signed flag
1281 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
1283 * jit.c: implement stloc, ldloc, ldloca.
1285 2002-01-11 Dietmar Maurer <dietmar@ximian.com>
1287 * jit.c (mono_analyze_stack): fixed calculation of last_instr
1289 * x86.brg (LDLEN): emit null_reference exception
1291 (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
1293 2002-01-04 Dietmar Maurer <dietmar@ximian.com>
1295 * x86.brg: bug fix in CASTCLASS
1297 2001-12-21 Dietmar Maurer <dietmar@ximian.com>
1299 * jit.c (mono_analyze_stack): spill MUL to avoid problem with
1300 register allocation.
1302 * emit-x86.c (arch_compile_method): fixed static delegate bug
1304 2001-12-16 Miguel de Icaza <miguel@ximian.com>
1306 * x86.brg, jit.c: Split up the nodes that we used to share on
1307 CONV_OVF. They were sharing the nodes because they are the same
1308 on 32-bit machines, but on 64-bit machines you need different
1311 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
1313 * x86.brg: removed prerequisite that (tree->left->reg1 <
1314 tree->right->reg1) to make register allocation easier.
1316 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
1318 * emit-x86.c (arch_handle_exception): new code to handle
1319 exceptions inside unmanaged code.
1321 * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
1322 address as first argument.
1324 2001-12-15 Dietmar Maurer <dietmar@ximian.com>
1326 * x86.brg: pass exceptions on the stack
1328 * jit.h (ISSTRUCT): new macro to check for real value types
1329 (return false for enum types).
1331 2001-12-11 Dietmar Maurer <dietmar@ximian.com>
1333 * x86.brg: use position indepentent code if possible.
1335 * x86.brg (EMIT_COND_EXCEPTION): new macro.
1337 * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
1339 2001-12-10 Dietmar Maurer <dietmar@ximian.com>
1341 * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
1343 (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
1345 * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
1347 2001-12-07 Dietmar Maurer <dietmar@ximian.com>
1349 * jit.c (mono_allocate_intvar): bug fix.
1351 * emit-x86.c (get_unbox_trampoline): impl.
1353 * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
1355 2001-12-06 Dietmar Maurer <dietmar@ximian.com>
1357 * x86.brg: raise exceptions.
1359 2001-12-05 Dietmar Maurer <dietmar@ximian.com>
1361 * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
1364 2001-12-06 Miguel de Icaza <miguel@ximian.com>
1366 * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
1367 CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
1368 CONV.OVF.I2.UN, CONV.OVF.I8.UN
1370 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
1372 * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
1373 removed the locaddr nonterminal, reimplemented value types
1375 * jit.c: reimplemented value type support, better support for
1378 2001-12-03 Miguel de Icaza <miguel@ximian.com>
1380 * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
1383 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
1385 * jit.c: call mono_init() after registering internal calls.
1387 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
1389 * emit-x86.c (tree_preallocate_regs): improved register allocation
1391 * x86.brg: impl. ISINST, CASTCLASS
1393 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
1395 * x86.brg: rearrange fields to reduce struct size.
1396 * jit.c: use signature->param_count, not signature->params_size.
1397 * debug.c: off-by-one error fix.
1399 2001-11-29 Radek Doulik <rodo@ximian.com>
1401 * Makefile.am: build mono only for X86 architecture, compilation
1402 fails for ppc now because of accessing registers in sigcontext
1405 2001-11-29 Dietmar Maurer <dietmar@ximian.com>
1407 * jit.c (mono_analyze_stack): bug fix in DUP
1409 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
1411 * debug.c: fix type handling. Position function position at start of
1412 IL code. Output more fine-grained stepping information.
1414 2001-11-28 Dietmar Maurer <dietmar@ximian.com>
1416 * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
1418 * jit.c (mono_analyze_stack): record the cli_address for later use
1420 (sigsegv_signal_handler): translate sigsegv into "Internal error"
1423 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
1425 * debug.c, debug.h: added support for generating stabs.
1426 Stabs can be compiled with as and the resulting object file can be
1427 loaded in a gdb session with add-symbol-file object.o.
1428 * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
1429 where locals and arguments are stored in the stack. Add support for
1430 passing command line arguments to CLR programs.
1431 * emit-x86.c: insert a breakpoint at method invocation if needed.
1433 2001-11-27 Dietmar Maurer <dietmar@ximian.com>
1435 * jit.c: exception support
1437 * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
1440 2001-11-26 Dick Porter <dick@ximian.com>
1442 * Makefile.am (mono_LDADD): Add io-layer library
1444 2001-11-19 Dietmar Maurer <dietmar@ximian.com>
1446 * jit.c (mono_analyze_stack): impl. LDFTN
1447 (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
1448 make register allocation easier on x86
1450 * emit-x86.c (enter_method): more debugging output for Strings
1451 (arch_compile_method): added delegate support
1452 (arch_compile_method): align EBP to 8 byte boundary
1454 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
1456 * jit.c: use mono_install_trampoline (), instead of exporting
1457 a function to a lower-level library.
1459 2001-11-16 Dietmar Maurer <dietmar@ximian.com>
1461 * x86.brg (STRING_ARG): impl. a way to marshal strings. This
1462 will be extensible to handle all possible kinds of marshalling
1465 * jit.c (map_call_type): added MB_TERM_CALL_VOID
1466 (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
1467 instructions to handle this arguments more effectively.
1469 2001-11-15 Dietmar Maurer <dietmar@ximian.com>
1471 * Makefile.am (mono_SOURCES): renamed testjit to mono
1473 * x86.brg: added debugging support
1475 * testjit.c: added support for value types, CFG improvements
1477 * emit-x86.c (enter_method): handle value types
1478 (tree_allocate_regs): impl. a better way to handle chain rules
1480 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
1482 * x86.brg (INITOBJ): bug fix: initialize data before use,
1483 simplified the code.
1485 2001-11-09 Miguel de Icaza <miguel@ximian.com>
1487 * testjit.c (mono_analyze_stack): Remove compiler warning by
1488 testing against NULL.
1490 2001-11-09 Dick Porter <dick@ximian.com>
1492 * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
1494 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
1496 * testjit.c (mono_analyze_stack): new BOX impl.
1498 * x86.brg: implemented INITOBJ
1500 * testjit.c (mono_analyze_stack): finished array support
1501 (mono_analyze_stack): reimplemented DUP instruction
1503 2001-11-08 Dietmar Maurer <dietmar@ximian.com>
1505 * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
1506 represents the address of the element. This way we can emit highly
1507 optimized x86 instructions to access elements (using base+index+offset
1510 2001-11-07 Miguel de Icaza <miguel@ximian.com>
1512 * mempool.c: Include string.h to kill warning.
1514 * testjit.c: Add typecast to kill warning.
1516 * x86.brg: Include string.h to eliminate warning.
1518 * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
1521 2001-11-07 Dietmar Maurer <dietmar@ximian.com>
1523 * emit-x86.c (enter_method): print out all method arguments
1524 (x86_magic_trampoline): impl.
1525 (arch_create_simple_jit_trampoline): we use different trampolines
1526 for static methods (no need to write the address back into to
1529 2001-11-06 Dietmar Maurer <dietmar@ximian.com>
1531 * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
1532 use less the 16 bytes.
1534 * x86.brg: code cleanup
1536 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
1538 * testjit.c: bug fixes.
1540 * emit-x86.c (leave_method): print result values
1542 2001-11-03 Dietmar Maurer <dietmar@ximian.com>
1544 * emit-x86.c (enter_method): new debugging code
1545 (leave_method): new debbuging code, this functions are called
1546 when you use the new option --trace-calls
1548 2001-11-02 Dietmar Maurer <dietmar@ximian.com>
1550 * testjit.c: impl. STELEM_XX, STELEM_XX
1552 * x86.brg: impl. LDLEN, LDELEMA
1555 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
1557 * x86.brg: added some experimental code for CALL
1558 instructions - still not found the optimal way to do it.
1560 * testjit.c (map_stind_type): add support for value types with
1561 a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
1562 CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
1563 (ctree_create_newobj): impl.
1566 * emit-x86.c (tree_allocate_regs): removed allocation code for
1568 (get_address): use a simple, but bug free search instead of the
1569 buggy binary search.
1571 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
1573 * testjit.c: support virtual functions
1575 * x86.brg: support different addressing modes for calls
1577 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
1579 * testjit.c: impl. STFLD
1581 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
1583 * x86.brg: impl. CEQ
1585 2001-10-04 Dick Porter <dick@ximian.com>
1588 * emit-x86.c: include mono-endian.h not endian.h
1590 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
1592 * testjit.c (ctree_create_dup): really duplicate the tree.
1593 attach the arguments to the CALL node. Added a new macro to
1594 make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
1596 2001-10-01 Dietmar Maurer <dietmar@ximian.com>
1598 * interp.brg: the burm based interpreter: added the file as example.
1600 2001-09-27 Dietmar Maurer <dietmar@ximian.com>
1604 * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
1606 (map_stind_type): support enum types
1607 (map_ldind_type): support enum types
1609 * emit-x86.c (tree_allocate_regs): added code to support
1610 register allocation for addressing modes trees.
1611 (tree_emit): bug fix: we have to emit all mono_burg_functins. The
1612 previous impl. did not work for chain rules.
1613 (compute_branches): support for SWITCH statements
1615 * x86.brg: added rules to model x86 addressing modes
1617 2001-09-26 Dietmar Maurer <dietmar@ximian.com>
1619 * emit-x86.c (compute_branches): implemented SWITCH
1621 * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
1622 (map_ldind_type): add enumeration types.
1623 (map_stind_type): add enumeration types.
1625 * emit-x86.c (arch_compile_method): more documentation.
1627 * testjit.c: moved the architecture specific things to emit-x86.c
1628 and x86.brg. Added more documentation. code cleanup.
1630 2001-09-25 Dietmar Maurer <dietmar@ximian.com>
1632 * x86.brg: we now have different types of addresses: ADDR_L for local
1633 values, ADDR_A for arguments and ADDR_G for global addresses. We
1634 also use LDIND_XX token to load values from a specific address
1635 instead of LDLOC/STLOC.
1637 * testjit.c: use the new adressing scheme everywhere:
1638 LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)
1640 2001-09-24 Dietmar Maurer <dietmar@ximian.com>
1642 * testjit.c (main): fix bug in parameter parsing
1644 * x86.brg: impl. more opcodes
1646 2001-09-23 Dick Porter <dick@ximian.com>
1648 * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
1650 2001-09-23 Dietmar Maurer <dietmar@ximian.com>
1652 * testjit.c: use the memory pool to avoid memory leaks
1654 2001-09-22 Dietmar Maurer <dietmar@ximian.com>
1656 * x86.brg: increment the stack pointer after function calls
1658 2001-09-21 Dick Porter <dick@ximian.com>
1660 * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
1662 2001-09-21 Dietmar Maurer <dietmar@ximian.com>
1664 * x86.brg: implemented long MUL/DIV
1665 (MB_OPT_LEVEL): define optimisation level macro
1667 * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
1668 for operations like idiv. it is also possible to assign specific registers.
1670 2001-09-20 Dietmar Maurer <dietmar@ximian.com>
1672 * x86.brg: added basic support for long
1674 * testjit.c (mono_compile_method): implemented POP
1676 2001-09-19 Miguel de Icaza <miguel@ximian.com>
1678 * testjit.c (usage): Added a couple of more usage options.
1680 2001-09-19 Dietmar Maurer <dietmar@ximian.com>
1682 * x86.brg: added more floating point grammar
1684 * testjit.c (mono_compile_method): make local offsets negative
1686 * x86.brg: added some floating point trees
1688 * testjit.c (mono_compile_method): arguments on the runtime
1689 stack are at least 4 bytes
1691 * x86.brg: partly implemented 8,16 bit integers
1693 * testjit.c (get_address): mark basic blocks
1695 2001-09-18 Dietmar Maurer <dietmar@ximian.com>
1697 * x86.brg: added some rules to optimize code
1699 * testjit.c (get_address): use a binary search to get the address
1700 (main): added an option to debug the jit (-d)
1702 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
1704 * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
1706 2001-09-17 Miguel de Icaza <miguel@ximian.com>
1708 * testjit.c (mono_compile_method): Provide better error reporting.
1710 2001-09-17 Dietmar Maurer <dietmar@ximian.com>
1712 * testjit.c (tree_get_address): impl. to fix address bug
1713 (tree_get_address): make sure that we can only jump to the first
1714 instruction of a tree.
1716 * x86.brg: emit real code for calls
1718 * testjit.c (create_jit_trampoline): creates a function to trigger jit
1720 (mono_compile_method): reversed argument order
1722 2001-09-15 Dietmar Maurer <dietmar@ximian.com>
1724 * x86.brg (stmt): don't emit unnecessary register moves
1726 * testjit.c (tree_allocate_regs): free registers earlier
1728 2001-09-14 Dietmar Maurer <dietmar@ximian.com>
1730 * x86.brg: branch addresses are now resolved
1732 * testjit.c (compute_branches): compute address of branches
1734 * x86.brg: emit real x86 instructions
1736 * testjit.c: call objdump to disassemble the output
1738 2001-09-13 Dietmar Maurer <dietmar@ximian.com>
1740 * x86.brg: use the right offsets to access local variables
1743 * emit-x86.c: only save/restore callee saved registers if they are
1746 * testjit.c (tree_allocate_regs): use the new MonoRegSet to
1748 (mono_compile_method): changed the tree for mothod calls
1755 2001-09-10 Miguel de Icaza <miguel@ximian.com>
1757 * x86.brg: Use Unix assembly syntax.
1759 * emit-x86.c: support code, should be moved
1761 * testjit.c: Use GPtrArrays instead of GLists, as those are very
1762 inefficient at appends.
1764 * Renamed `create_new_leave' to `create_new_leaf'