1 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
3 * exception.c (ves_icall_get_frame_info): impl.
5 Tue Jun 18 10:21:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7 * invoke.c: marshal simple arrays correctly.
9 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
11 * x86.brg: added inlined versions of Math.Sin, Math.Cos, Math.Sqrt
13 * jit.c (mono_analyze_stack): impl. STARG
14 (mono_analyze_stack): impl. LDARGA
16 * exception.c (arch_handle_exception): correctly restore register
17 values when unwinding the stack (fixes bug 25698)
19 2002-06-09 Martin Baulig <martin@gnome.org>
21 * debug.c (mono_debug_open_image): For MONO_DEBUG_FORMAT_DWARF2_PLUS,
22 the `%s-debug.s' file is in the same directory than its assembly.
24 Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26 * message.c, emit-x86.c: kill warnings.
28 2002-05-31 Dietmar Maurer <dietmar@ximian.com>
30 * x86.brg: buf fix in REMOTE_STIND_OBJ
31 (mono_ldvirtftn): impl.
32 (mono_ldintftn): impl.
35 Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
37 * mono.c: added --config command line option.
39 Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
41 * jit.c, jit.h: collect statistics about the number of basic blocks.
43 2002-05-31 Martin Baulig <martin@gnome.org>
45 * debug.c (mono_debug_address_from_il_offset): New public function.
46 (mono_debug_add_method): Improved local variable info: correctly handle
47 variables in registers and their start/end scopes.
49 2002-05-30 Martin Baulig <martin@gnome.org>
51 * debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
52 not "%p" which seems to be broken on Windows/mingw32.
54 2002-05-30 Dietmar Maurer <dietmar@ximian.com>
56 * x86.brg (reg): bug fix in LOCALLOC
58 * mono.c (main): new switch --nointrinsic to disable memcpy opt.
60 * x86.brg: added block copy/init optimizations from
61 Serge (serge@wildwestsoftware.com)
63 Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
65 * invoke.cs: lookup P/Invoke method address only when needed.
67 2002-05-29 Dietmar Maurer <dietmar@ximian.com>
69 * x86.brg: bug fix in REMOTE_STIND_OBJ
71 * invoke.c (arch_create_native_wrapper): handle pointers to value types
73 * helpers.h: use mono_ prefix for all functions
75 * jit.c (mono_analyze_stack): fixed SIZEOF
77 * x86.brg: impl. LOCALLOC, INITBLK
79 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
81 * x86.brg: impl. CKFINITE
83 * jit.c (mono_analyze_stack): impl. CEE_CALLI
85 * x86.brg (JMP): impl. JMP opcode
87 2002-05-27 Dietmar Maurer <dietmar@ximian.com>
89 * jit.c (mono_cfg_new): reserve additional space to store ESP when
90 calling finally handlers.
92 * exception.c (arch_get_call_finally): save ESP before calling
95 * helpers.c (map_arg_type): move some generic helper function into
98 * mono.c (usage): new option --breakonex
100 * exception.c (arch_exc_is_caught): only return FALSE if really
103 * jit.c (mono_thread_abort): free jit_tls
105 2002-05-24 Dietmar Maurer <dietmar@ximian.com>
107 * x86.brg (stmt): use memmove to cope with overlapping
108 blocks. This is not required by the specs, so we can remove it
109 later if it turns out to be too slow (and use memcpy).
111 * jit.c (mono_analyze_stack): moved const. folding from x86.brg
113 * x86.brg: CPBLK impl.
115 * emit-x86.c (tree_emit): modified to support 3 nonterminals per
116 rule (used for CPBLK).
118 Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
120 * mono.c: remove generated code from hash when benchmarking/testing
122 * invoke.cs: special case string ctors.
124 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
126 * *.c: code cleanups - tried to separate architecture dependent things.
128 2002-05-23 Martin Baulig <martin@gnome.org>
130 * debug.c (mono_debug_open): Don't call mono_debug_add_image().
131 (mono_debug_write_symbols): Only recreate the symbol file if
134 * debug-private.h (MonoDebugHandle): Added `dirty' flag.
136 * mono.c (main): Call mono_debug_add_image() here.
138 * jit.c (mono_thread_abort): If we have debugging support, call
139 mono_debug_make_symbols() and G_BREAKPOINT().
141 * exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
142 an unhandled exception.
144 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
146 * delegate.c: move the thread pool to metadata/threadpool.c, code
149 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
151 * exception.c (arch_exc_is_catched): impl. MS like exception
152 handling (added a check for unhandled exceptions)
154 2002-05-22 Martin Baulig <martin@gnome.org>
156 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
157 the assembler if necessary, ie. the assembler file is newer than the
158 symbol file or the symbol file does not exist.
160 * debug.c: Added "update_on_exit" argument to recreate the symbol file
163 * debug-dwarf2.c: Produce assembler code which is free of comments and
164 extra whitespaces so that it's suitable for `as -f'.
166 2002-05-22 Martin Baulig <martin@gnome.org>
168 * debug-dwarf2.c (dwarf2_write_section_end): Removed. This is not needed
169 and not supported by all assemblers.
170 (dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
173 * mono.c (--debug): Small fix in the argument parsing.
175 2002-05-22 Martin Baulig <martin@gnome.org>
177 * debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.
179 * mono.c: Applied patch from Miguel:
180 (--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
183 2002-05-21 Martin Baulig <martin@gnome.org>
185 * debug.c (mono_debug_source_location_from_address): Added support for the
188 2002-05-21 Martin Baulig <martin@gnome.org>
190 * debug.c (mono_debug_source_location_from_address): New function.
191 (mono_debug_il_offset_from_address): New function.
193 * exception.c (arch_handle_exception): If we have debugging support, include
194 information about the source location and IL offset in the stack trace.
196 2002-05-21 Dietmar Maurer <dietmar@ximian.com>
198 * jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
201 * x86.brg (stmt): removed unnecessary assertion
203 * jit.c (check_inlining): we cant inline throw instructions
204 (because it breaks some basic block requirements)
206 2002-05-21 Martin Baulig <martin@gnome.org>
208 * debug-private.h (MonoDebugFlags): New enum typedef.
210 * debug.c (mono_debug_open): Added a few useful arguments. See the manpage
213 2002-05-21 Martin Baulig <martin@gnome.org>
215 * debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
216 a `MonoAssembly *' argument instead of a `char *filename' one. Also added
217 `const char **args' argument.
219 * mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
220 `int verbose' argument and made it public.
221 (mono_jit_compile_class): New public function, moved the code to compile
222 all methods in a class here from main().
223 (--compile): The argument can now also be an image (in `@imagename' format).
224 Updated documentation for this command line argument.
225 (--precompile): New command line argument to precompile an image/class/method
226 before executing the main app. This argument can be given multiple times.
227 (--break): Renamed the "--debug" command line argument to "--break".
228 (--debug): New command line argument to specify the debugging format.
229 (--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
230 (--debug-args): New command line argument. This is a comma-separated list of
231 additional arguments for the symbol writer.
232 (usage): Beautified the help text a bit.
234 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
235 public mono_jit_compile_image() function rather than duplication this
238 2002-05-21 Martin Baulig <martin@gnome.org>
240 * debug-dwarf2-plus.c: This is now working again :-)
242 * debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
243 we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
244 one for the fallback MONO_DEBUG_FORMAT_DWARF2.
246 2002-05-21 Martin Baulig <martin@gnome.org>
248 * jit.c (mono_debug_handle): Removed this global variable.
250 * debug.c (mono_debug_close): Removed.
251 (mono_debug_cleanup): New global function.
252 (mono_debug_add_image): New global function.
253 (mono_debug_handle_from_class): New global function.
254 (mono_debug_write_symbols): New global function.
255 (mono_debug_add_type): Removed `MonoDebugHandle *' argument.
256 (mono_debug_add_method): Likewise.
258 2002-05-21 Martin Baulig <martin@gnome.org>
260 Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
261 file for all assemblies. Currently, the JIT doesn't put all methods
262 from a single assembly into a continuous region of memory. We were
263 previously creating valid DWARF 2 files for this, but unfortunately
264 GDB's symbol tables get messed up when it reads more than one such file.
266 * debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
267 `next_idx', `methods', `type_hash', `source_files' and `format'
268 into the MonoDebugHandle.
270 * debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
271 not on the AssemblyDebugInfo.
272 (mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().
274 * debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
275 mono_debug_write_dwarf2().
276 (mono_debug_open_assembly_dwarf2): Removed.
277 (mono_debug_close_assembly_dwarf2): Removed.
279 * debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
280 mono_debug_write_stabs().
281 (mono_debug_open_assembly_stabs): Removed.
282 (mono_debug_close_assembly_stabs).
284 * debug-dwarf2-plus.c: This is currently broken. :-(
286 2002-05-20 Martin Baulig <martin@gnome.org>
288 * debug.h (mono_debug_format): New global variable.
289 (MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.
291 * debug-private.h (MonoDebugHandle): Added `objfiles' field which is
292 a whitespace separated list of symbol files.
293 (AssemblyDebugInfo): Added `objfile' filed which is the name of the
296 * mono.c (main): Pass the assembly file name to mono_debug_open_file().
298 * debug.c (mono_debug_make_symbols): Link all symbol files into a big
299 `<assemblyname>.o' symbol file.
301 2002-05-20 Martin Baulig <martin@gnome.org>
303 * debug.c (debug_load_method_lines): Check whether the assembly file
304 is newer than the IL file and recreate the IL file if necessary.
306 2002-05-20 Miguel de Icaza <miguel@ximian.com>
308 * mono.c Updated copyright years.
310 2002-05-18 Miguel de Icaza <miguel@ximian.com>
312 * mono.c (usage): Relayout command line options.
314 2002-05-17 Dietmar Maurer <dietmar@ximian.com>
316 * x86.brg (reg): fixed array bound check
318 * emit-x86.c (enter_method): print method signature
320 * exception.c (arch_handle_exception): set trace info before we
323 2002-05-16 Dietmar Maurer <dietmar@ximian.com>
325 * jit.c (mono_find_final_block): make it work with mcs
327 * x86.brg: buf fix. if exception variable is allocated to a register.
329 * jit.c (mono_find_final_block): bug fix.
331 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
333 * delegate.c (arch_end_invoke): fix bug #24653, simplified the
334 code using new runtime_invoke feature.
336 * jit.c (mono_analyze_flow): try blocks are followed by handler
337 blocks, so we need to add all handler blocks as succesors.
338 (mono_thread_start_cb): set end_of_stack
340 * exception.c (arch_handle_exception): correctly save/restore caller
343 * emit-x86.c (arch_emit_prologue): correctly save/restore caller
346 * jit.c (mono_cfg_new): allocate space for caller saved registers.
348 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
350 * jit.c: only use one TLS slot to store jit data
352 * exception.c (arch_handle_exception): print function signature,
353 use thread relative end_of_stack
355 2002-05-13 Dietmar Maurer <dietmar@ximian.com>
357 * jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
358 store them as 32 bit integers.
359 (mono_analyze_stack): we need to generate a temporary var for
360 SHL/SHR because the tree allocator can fail otherwise
362 * exception.c (arch_handle_exception): EIP now points to the call
363 instruction, not to the instruction after the call. This fixes the
364 bug reported by Linus Upson (tests/exception8.cs)
366 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
368 * jit.c (mono_analyze_flow): always allocate the forest array
369 (mono_stack_duplicate_used_var): impl.
370 (mono_copy_used_var): impl.
372 * x86.brg: bug fix in SHR/SHL
374 * emit-x86.c (arch_emit_prologue): check if live_in_set != NULL
376 2002-05-11 Sergey Chaban <serge@wildwestsoftware.com>
378 * mono.c: new --fast-iconv command line option
379 to enable fast FP-to-integer conversion code.
380 * jit.c, jit.h: added global variable to store state
381 for the above option. This optimization is disabled
383 * x86.brg: added code to emit fast FP-to-integer
384 conversion sequences.
386 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
388 * emit-x86.c: simple definite assignment analysis optimization for
389 uninitialized locals.
391 Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
393 * x86.brg, emit-x86.c: patch the branch targets with x86_patch().
395 2002-05-10 Dietmar Maurer <dietmar@ximian.com>
397 * linear-scan.c (mono_update_gen_set): improvement/bug fix
399 * x86.brg: added additional rules to handle global allocated registers
401 * mono.c (usage): the option is called --nols, and it dissables
404 * x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8
406 2002-05-09 Dietmar Maurer <dietmar@ximian.com>
408 * linear-scan.c: linear scan reg. allocation and data flow analysis
409 use Paolo's great bitset implementation.
411 * jit.c (arch_allocate_var): add live range info
412 (mono_cfg_add_successor): create list of successors for basic
415 * mono.c (main): new option --ls to enable linear scan
417 * exception.c (arch_handle_exception): print instruction pointer
418 relative to method start address.
420 * jit.c (mono_print_ctree): print register number if locals are
421 allocate in registers.
423 * emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
424 (arch_emit_epilogue): take care when restoring save registers,
425 because the stack pointer may has changed.
427 * x86.brg: s/VAROFFSET/VARINFO/
428 modified to support global register allocation
430 Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
432 * jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.
434 2002-05-03 Sergey Chaban <serge@wildwestsoftware.com>
436 * x86.brg: more coni4 optimizations
437 MUL: generate optimized code for some consts other
438 than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
439 DIV_UN: multiply with reciprocal instead of dividing;
441 2002-05-03 Dietmar Maurer <dietmar@ximian.com>
443 * x86.brg: use VAROFFSET macro
445 * emit-x86.c (tree_emit): allocate space for spilled regs in
446 activation frame instead of pushing them to the stack.
448 * x86.brg: replace BXX with CBRANCH/COMPARE
449 replaced CXX CSET/COMPARE
451 * emit-x86.c (arch_allocate_regs): improved register allocation
453 2002-05-02 Dietmar Maurer <dietmar@ximian.com>
455 * delegate.c (mono_delegate_cleanup): signal semaphore in order to
458 2002-04-30 Dick Porter <dick@ximian.com>
460 * mono.c (main): Tell glib to not abort when g_log() etc print
463 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
465 * x86.brg: opt. LDELEMA impl.
466 (MUL) use shift when possible.
467 (DIV) use shift when possible.
468 impl. various opt. with coni4
470 * exception.c (arch_handle_exception): use ctx->SC_EBP in
471 end_of_stack check as suggested by Linus Upson <linus@linus.com>
473 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
475 * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.
477 * exception.c: included the Freebsd patch from Sandro Tolaini
478 <sandro@focuseek.com>
480 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
482 * mono.c, jit.c: use mono_runtime_run_main ().
484 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
486 * jit.c (mono_analyze_stack): dont call methods on Object with
487 METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
489 * x86.brg: added more CONV_U rules
491 * jit.c (mono_analyze_stack): avoid recursive call of virtual
492 methods: fixes Bug #23778
493 (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
495 * exception.c (arch_handle_exception): only g_assert(cleanup) if
498 2002-04-27 Patrik Torstensson <patrik.torstensson@intel.com>
500 * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
502 2002-04-27 Martin Baulig <martin@gnome.org>
504 * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
505 there's already `epilog' so we don't need `epilogue_begin'.
507 * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
508 size of the method's code.
510 2002-04-25 Martin Baulig <martin@gnome.org>
512 * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
515 2002-04-25 Dietmar Maurer <dietmar@ximian.com>
517 * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
518 added CONV_OVF_I4 (fix bug #23808)
520 2002-04-23 Dietmar Maurer <dietmar@ximian.com>
522 * x86.brg: code cleanup - use x86_patch ()
524 * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
525 (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
527 * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
528 because it slows down performance.
530 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
532 * emit-x86.c: enter_method handles 8-byte aligned parameters.
534 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
536 * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
539 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
541 * jit.c (check_inlining): added statistics about inlineing
543 * mono.c (usage): new switch --noinline to disable inlining
545 * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
546 inline methods (to keep semantics)
548 * x86.brg: added constant folding for inegers
550 * emit-x86.c (tree_allocate_regs): handle the special case when
551 chain rules need a register.
553 2002-04-19 Dietmar Maurer <dietmar@ximian.com>
555 * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
557 * jit.c (check_inlining): better inlining support
559 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
561 * x86.brg: LDLEN uses max_length instead of bounds[0]
562 * jit.c: support for new szarray format
564 2002-04-18 Dietmar Maurer <dietmar@ximian.com>
566 * jit.c (check_inlining): added inlining support
568 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
570 * x86.brg: optimized version of castclass and isinst
572 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
574 * emit-x86.c, invoke.c: track time spent compiling.
576 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
578 * emit-x86.c, invoke.c: call profile callbacks if needed.
579 * jit.c, jit.h, mono.c: add --profile command line option.
581 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
583 * jit.h: included mono/io-layer/io-layer.h to avoid breaking
584 compilation under windows when upgrading mingw and w32api to
585 version 1.3 (thanks Dick!).
587 2002-04-15 Patrik Torstensson <patrik.torstensson@labs2.com>
589 * jit.c: changed the array icalls to use full names
591 2002-04-15 Dietmar Maurer <dietmar@ximian.com>
593 * x86.brg: check the this pointer before calling
594 non-virtual functions
596 * emit-x86.c (arch_emit_prologue): initialize local vars.
598 * x86.brg: removed incredible clumsy code
600 2002-04-13 Martin Baulig <martin@gnome.org>
602 * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
603 the location of a variable.
604 (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
605 instead of a stack offset and use dwarf2_write_variable_location() to write
608 2002-04-13 Martin Baulig <martin@gnome.org>
610 * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
613 2002-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
615 * Makefile.am: use of the new '-s' option in monoburg.
617 2002-04-12 Martin Baulig <martin@gnome.org>
619 * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
622 2002-04-10 Sergey Chaban <serge@wildwestsoftware.com>
623 * win32-exception: added Win32 SEH exception filter that translates
624 CONTEXT to sigcontext;
626 * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
627 in a platfrom-dependent way;
629 * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
630 and avoid io-layer includes;
632 * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
635 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
637 * delegate.c (arch_end_invoke): restore output arguments
639 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
641 * jit.c: call mono_runtime_init ().
643 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
645 * jit.c (mono_jit_cleanup): added more statistics
647 * invoke.c (arch_create_native_wrapper): special case EndInvoke -
648 we need to pass the MonoMethod pointer as first argument.
650 * delegate.c (mono_async_invoke): notify all listeners, not only a
652 (arch_end_invoke): we now pass a MonoMethod as first parameter and
653 use arch_method_call_message_new() to access the stack.
654 (arch_end_invoke): wait until we really finished processing
655 (async_invoke_abort): notify all listeners, not only a
658 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
660 * message.c (arch_return_value): impl.
661 (arch_method_return_message_restore): consider delegate BeginInvoke
663 * jit.c: removed jit_exec_main()
665 * delegate.c (arch_begin_invoke): use the message builder to make
666 it architecture independent - still needs more cleanup.
668 2002-04-05 Dietmar Maurer <dietmar@ximian.com>
670 * delegate.c (mono_delegate_ctor): support for transparent proxy
672 * x86.brg (freg): bug fix in CONV_R* opcodes
674 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
676 * message.c: added documentation
678 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
680 * mono.c (main): use --trace instead of --trace-calls
682 * x86.brg: impl. REMOTE_STIND_XX
684 * message.c (mono_store_remote_field): impl.
686 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
688 * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
690 * message.c (mono_load_remote_field): impl.
692 * jit.c (mono_analyze_stack): only call marshalbyref methods
694 (mono_analyze_stack): consider marshalbyref objects in LDFLD
696 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
698 * x86.brg: kill pointer arithmetric.
700 2002-03-28 Martin Baulig <martin@gnome.org>
702 * jit.c (mono_debug_insert_breakpoint): New global variable.
703 (mono_debug_last_breakpoint_address): New global variable.
705 * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
706 non-zero, insert a breakpoint; if it's positive, decrement it when done.
707 Set `mono_debug_last_breakpoint_address' to the address of the last inserted
710 * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
711 `mono_debug_last_breakpoint_address', also documented them here.
713 2002-03-28 Martin Baulig <martin@gnome.org>
715 * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
716 (AssemblyDebugInfo): Added `format'.
718 * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
719 this allows us choose the format on a per-assembly basis.
720 (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
721 to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
723 (debug_generate_method_lines): Generate correct IL offsets.
725 2002-03-28 Martin Baulig <martin@gnome.org>
727 * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
729 * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
731 * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
732 `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
734 * debug.c (debug_generate_method_lines): Don't return if we don't have line
735 numbers, we still need to generate the IL offsets here. Emit line numbers
736 for `prologue_end_offset' (the first line of actual code) and
737 `epilogue_begin_offset' (the line of the method's closing brace).
738 Don't crash if cfg->bblocks [i].forest is NULL.
739 (mono_debug_add_method): Don't crash if we don't have line numbers.
740 Initialize the newly added fields.
742 * debug-stabs.c: Record first and last line, emit filename info at the
743 beginning of the stab file, gdb ignores the types otherwise.
745 * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
746 emit line number info for the first and last line.
748 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
750 * invoke.c (arch_create_delegate_trampoline): impl.
752 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
754 * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
755 with the jit runtime to easy embedding. main() is moved to mono.c, now.
756 * jit.c: use opcode names from libmetadata.
757 * debug.h, debug.c: constify char* argument.
759 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
761 * jit.c: catching SIGSEGV again, added proxy support
763 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
765 * delegate.c (mono_delegate_init): remove unused worker threads
767 2002-03-27 Mike Kestner <mkestner@speakeasy.net>
769 * delegate.c (arch_get_delegate_invoke): malloc a bigger area
771 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
773 * jit.c: remove glib mem vtable code.
775 2002-03-26 Martin Baulig <martin@gnome.org>
777 * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
778 lines if we don't have line number information.
779 (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
782 * debug-stabs.c (write_method_stabs): Don't generate method lines if
783 we don't have line number information. Use `minfo->method_info.this_offset'
784 instead of hardcoding 8.
786 * debug.c (debug_generate_method_lines): Don't crash if we don't have
787 line number information.
788 (mono_debug_open_assembly): Don't generate line numbers for
789 MONO_DEBUG_FORMAT_DWARF2_PLUS.
790 (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
791 but it in the new `this_offset' field.
793 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
795 * debug.c (debug_generate_method_lines): Use correct addresses for
798 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
800 * jit.c: do not set the glib mem vtable anymore.
801 * Makefile.am: link to libmonoutils.
803 2002-03-25 Martin Baulig <martin@gnome.org>
805 * debug.h (mono_debug_make_symbols): Documented this function.
807 2002-03-24 Martin Baulig <martin@gnome.org>
809 * debug.c (mono_debug_add_method): Include the `this' offset in
810 the `minfo->method_info.param_offsets' array.
812 2002-03-23 Martin Baulig <martin@gnome.org>
814 * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
815 to do it before the X86_CMP.
816 (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
817 (reg: CLT (lreg, lreg)): Likewise.
818 (reg: CLT_UN (lreg, lreg)): Likewise.
819 (reg: CLT_UN (lreg, lreg)): Likewise.
820 (reg: CGT (lreg, lreg)): Likewise.
821 (reg: CGT (lreg, lreg)): Likewise.
822 (reg: CGT_UN (lreg, lreg)): Likewise.
823 (reg: CGT_UN (lreg, lreg)): Likewise.
825 2002-03-23 Martin Baulig <martin@gnome.org>
827 * debug-private.h (AssemblyDebugInfo): Added `_priv'.
829 * debug-dwarf2-plus.c
830 (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
831 (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
832 (mono_debug_write_assembly_dwarf2_plus): Only call
833 mono_debug_update_symbol_file() here.
835 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
837 * jit.c: inter strings before executing a method.
838 Do not intern command line arguments anymore.
840 2002-03-21 Martin Baulig <martin@gnome.org>
842 * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
844 * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
845 been created by MCS and fills in all machine dependent stuff.
847 * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
848 removed everything which is already in MonoDebugMethodInfo.
850 * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
851 (mono_debug_make_symbols): Don't open the file or call as, this is done in the
854 * jit.c (main): Added "--dwarf-plus" command line option to use the new
855 MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
857 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
859 * jit.c (usage): new option to specify maximum number of worker threads
860 (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
862 * delegate.c (async_invoke_abort): added support for asynchronous exceptions
863 (arch_get_async_invoke): notify listeners before we call the
864 asynchronous callback
866 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
868 * delegate.c (async_invoke_thread): support for domains
869 (async_invoke_thread): create workers only when needed
871 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
873 * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
875 2002-03-18 Dietmar Maurer <dietmar@ximian.com>
877 * x86.brg: impl. lreg: XOR (lreg, lreg)
878 impl. REM (freg, freg)
880 2002-03-17 Martin Baulig <martin@gnome.org>
882 * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
885 * debug-dwarf2.c: Added support for strings and arrays.
887 2002-03-17 Martin Baulig <martin@gnome.org>
889 * debug.c (mono_debug_get_type): Recursively call this for all function members
891 (mono_debug_add_method): Don't mangle function names, this must be done by the
892 debugger backend if the debugging format needs mangled names.
894 * debug-dwarf2.c: Improved support for classes, added member functions.
896 2002-03-16 Martin Baulig <martin@gnome.org>
898 * debug.c (mono_debug_get_type): Recursively call this for all members and
899 parent classes of a class type.
901 * debug-dwarf2.c: Added basic support for classes. Set source language to C++
902 since GDB doesn't like Java very much.
904 2002-03-16 Martin Baulig <martin@gnome.org>
906 * debug-dwarf2.c: Added support for enums.
908 2002-03-15 Martin Baulig <martin@gnome.org>
910 * debug.c (mono_debug_get_type): Recursively call this for all members
913 * debug-dwarf2.c: Added support for structs.
915 2002-03-15 Dietmar Maurer <dietmar@ximian.com>
917 * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
918 to new MonoLMF layout
920 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
922 * emit-x86.c (arch_create_native_wrapper): new code to generate
923 wrappers for calling native functions.
924 (arch_create_native_wrapper): free allocated strings
925 (arch_handle_exception): made mono_jit_info_table domain dependent
927 2002-03-14 Martin Baulig <martin@gnome.org>
929 * debug.c (MonoDebugFormat): New public enums specifying which debugging
931 (mono_debug_open_file): Added MonoDebugFormat argument.
932 (mono_debug_make_symbols): Don't take an argument to make it easier to call
933 this function from GDB. It's now safe to call this function multiple times;
934 it'll always write a complete debugging file.
936 * debug.c: Splitted this file into a general part which remains in this file
937 and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
938 All public functions now call a corresponding format specific function.
940 * debug.c: The following changes are private to debug.c:
941 (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
942 (record_line_number, debug_generate_method_lines): New private functions.
943 (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
944 calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
945 mono_debug_open_assembly_dwarf2).
946 (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
947 now safe to call this function multiple times.
948 (mono_debug_get_type): New public function. This takes a `MonoClass *' and
949 returns an unique index for this type. It's used to ensure that we only write
950 each class once to the debugging file.
951 (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
952 data structure, but don't directly write to the debugging file. This is done
953 later from mono_debug_write_assembly().
955 * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
956 debugging output. Call mono_debug_close() on cleanup if necessary.
958 2002-03-14 Martin Baulig <martin@gnome.org>
960 * debug-private.h: New private header file.
962 * debug-stabs.c: Added the stabs type generation stuff which was
963 previously in debug.c.
965 * debug-dwarf.c: Started to implement type support. We're currently
966 only writing this most basic types to the dwarf file, but this will
969 2002-03-13 Martin Baulig <martin@gnome.org>
971 * debug-stabs.c, debug-dwarf2.c: New files containing my new
972 debugging code. They're now in CVS, but not yet used anywhere.
974 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
976 * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
977 macros, included new delegate code from Daniel Stodden.
980 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
982 * jit.c: verify that corlib and runtime are in sync.
984 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
986 * emit-x86.c, jit.c: use the debug-helpers facilities to
987 describe and match a method when debugging.
989 2002-03-10 Martin Baulig <martin@gnome.org>
991 * emit-x86.c (arch_compile_method): When emitting stabs debugging
992 output, put a nop instruction at the start of all functions so that
993 the adresses won't change when using --debug.
995 * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
996 the bytecode area, stabs needs a line number in the .il file. Use the
997 new info->moffsets to get the line number.
998 (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
999 `moffsets' is an array of `total_lines' fields (total number of lines
1000 in the .il file); for each line in the .il field, this array contains
1001 the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
1002 of a method and 0 otherwise.
1003 (debug_load_method_lines): Read the whole .il file and initialize the
1004 info->moffsets field.
1006 2002-03-09 Martin Baulig <martin@gnome.org>
1008 * x86.brg (DIV_UN): Clear EDX before performing the division and remove
1009 the unnecessary CDQ instruction.
1011 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1013 * jit.c (mono_analyze_stack): only load addresses of value types
1014 on the runtime stack.
1016 2002-03-07 Duncan Mak <duncan@ximian.com>
1018 * Makefile.am: A small patch fixing errors in vpath-based builds
1019 (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
1020 committed for Daniel Stodden <stodden@in.tum.de>.
1022 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1024 * jit.c: Boehm-GC enable.
1026 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1028 * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
1029 realloc that code sometimes!
1031 * emit-x86.c (mono_compute_branches): support several types of
1034 2002-03-06 Dietmar Maurer <dietmar@ximian.com>
1036 * x86.brg: impl. MUL_OVF_UN (reg, reg)
1038 * jit.c (mono_find_final_block): find correct finally handler.
1040 * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
1041 caller saved registers.
1043 2002-03-05 Dietmar Maurer <dietmar@ximian.com>
1045 * x86.brg: use x86_widen_reg for CONV opcodes
1047 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
1049 * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
1051 * emit-x86.c (arch_handle_exception): big fix - dont use
1052 uninitialized next_bp
1053 (arch_compile_method): make the jit thread save
1054 (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
1055 to avoid need of recursive mutexes
1057 * x86.brg: use new mono_assert macros
1059 2002-02-28 Dietmar Maurer <dietmar@ximian.com>
1061 * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
1062 calling into unmanaged code (arch_compile_method).
1064 * x86.brg: impl. CONV_I4 (freg) with correct rounding
1065 (lreg): impl CALL_I8(INTF_ADDR)
1066 impl. CONV_R_UN (reg)
1069 2002-02-27 Dietmar Maurer <dietmar@ximian.com>
1071 * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
1073 2002-02-26 Dietmar Maurer <dietmar@ximian.com>
1075 * x86.brg: bug fix in CLT(lreg,lreg)
1076 (reg): bug fix in CONV_OVF_I4(lreg)
1077 (lreg): replaced x86_call_reg with x86_call_code
1079 * emit-x86.c (mono_add_jump_info): impl.
1080 (mono_compute_branches): patch real jump address (instead of
1081 emitting code twice)
1083 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1085 * x86.brg: optimize cmp reg,0 -> test reg.
1087 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1089 * jit.h, jit.c, emit-x86.c: Added a few statistics counters
1090 and the --stats command line option to print them.
1091 Fixed memory leak in arch_compile_method () when a method's code is
1092 found in the cache. Fix magic trampoline to deal with static calls.
1094 2002-02-21 Dietmar Maurer <dietmar@ximian.com>
1096 * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN
1098 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
1100 * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
1101 (arch_create_jit_trampoline): cache trampoline code
1103 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1105 * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
1107 (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
1109 * x86.brg: do not encode exception objects into the instruction
1110 stream, because they are domain dependend. Use
1111 arch_get_throw_exception_by_name() instead;
1113 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1115 * jit.c: intern command line arguments.
1117 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1119 * jit.c (mono_analyze_stack): use the magic trampoline for all
1120 calls (since we cant store the address of compiled code in
1122 (mono_analyze_stack): imp. LDSTR for shared code
1124 * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
1125 (arch_compile_method): add a cache for compiled methods to avoid
1126 recompilation. dont use method->addr to store domain dependent
1129 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1131 * x86.brg: impl. BLE,BGT for freg
1133 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1135 * emit-x86.c: handle unreachable code. Eliminate some unneeded
1137 * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
1138 main(). Add --compile classname and --ncompile num command line
1139 options to do performance evaluation of the jitter (and help
1142 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1144 * emit-x86.c (arch_compile_method): bug fix in static delegate
1147 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
1149 * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
1151 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
1153 * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
1155 2002-02-13 Miguel de Icaza <miguel@ximian.com>
1157 * jit.c (arch_allocate_var): Only assert that the alignment is
1158 at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
1160 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1162 * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
1164 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1166 * emit-x86.c: make x86_magic_trampoline() handle call instructions
1167 with an imm8 displacement. x86.brg not yet changed to take advantage
1170 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1172 * jit.c: use opcode info from libmetadata to do flow analysis
1175 2002-02-06 Dietmar Maurer <dietmar@ximian.com>
1177 * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking
1179 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
1181 * x86.brg: use element_class for type check
1183 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
1185 * jit.c (main): impl. __array_Address icall
1187 * mempool.c (mono_mempool_alloc): handle large block allocation
1189 2002-02-01 Dietmar Maurer <dietmar@ximian.com>
1191 * x86.brg: impl. SHL/SHR/CLT for 64 bit values
1193 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
1195 * x86.brg: impl. CEQ(lreg,lreg)
1197 * jit.c (mono_analyze_stack): impl. LDVIRTFTN
1198 (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
1200 * x86.brg: removed some dead code.
1202 2002-01-18 Dietmar Maurer <dietmar@ximian.com>
1204 * jit.c (arch_allocate_var): fixed alignment bugs
1206 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
1208 * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
1210 2002-01-16 Dietmar Maurer <dietmar@ximian.com>
1212 * jit.c (main): install the trampoline before we start to create
1215 * x86.brg: impl. CLT_UN, CGT_UN
1217 * emit-x86.c (leave_method): added check for null object
1218 (enter_method): consider byref arguments
1220 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
1222 * x86.brg: bug fix in CONV_OVF_I1_UN
1223 impl. ADD_OVF, MUL_OVF
1224 impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
1225 (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
1226 (EMIT_COND_EXCEPTION): added signed flag
1228 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
1230 * jit.c: implement stloc, ldloc, ldloca.
1232 2002-01-11 Dietmar Maurer <dietmar@ximian.com>
1234 * jit.c (mono_analyze_stack): fixed calculation of last_instr
1236 * x86.brg (LDLEN): emit null_reference exception
1238 (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
1240 2002-01-04 Dietmar Maurer <dietmar@ximian.com>
1242 * x86.brg: bug fix in CASTCLASS
1244 2001-12-21 Dietmar Maurer <dietmar@ximian.com>
1246 * jit.c (mono_analyze_stack): spill MUL to avoid problem with
1247 register allocation.
1249 * emit-x86.c (arch_compile_method): fixed static delegate bug
1251 2001-12-16 Miguel de Icaza <miguel@ximian.com>
1253 * x86.brg, jit.c: Split up the nodes that we used to share on
1254 CONV_OVF. They were sharing the nodes because they are the same
1255 on 32-bit machines, but on 64-bit machines you need different
1258 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
1260 * x86.brg: removed prerequisite that (tree->left->reg1 <
1261 tree->right->reg1) to make register allocation easier.
1263 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
1265 * emit-x86.c (arch_handle_exception): new code to handle
1266 exceptions inside unmanaged code.
1268 * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
1269 address as first argument.
1271 2001-12-15 Dietmar Maurer <dietmar@ximian.com>
1273 * x86.brg: pass exceptions on the stack
1275 * jit.h (ISSTRUCT): new macro to check for real value types
1276 (return false for enum types).
1278 2001-12-11 Dietmar Maurer <dietmar@ximian.com>
1280 * x86.brg: use position indepentent code if possible.
1282 * x86.brg (EMIT_COND_EXCEPTION): new macro.
1284 * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
1286 2001-12-10 Dietmar Maurer <dietmar@ximian.com>
1288 * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
1290 (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
1292 * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
1294 2001-12-07 Dietmar Maurer <dietmar@ximian.com>
1296 * jit.c (mono_allocate_intvar): bug fix.
1298 * emit-x86.c (get_unbox_trampoline): impl.
1300 * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
1302 2001-12-06 Dietmar Maurer <dietmar@ximian.com>
1304 * x86.brg: raise exceptions.
1306 2001-12-05 Dietmar Maurer <dietmar@ximian.com>
1308 * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
1311 2001-12-06 Miguel de Icaza <miguel@ximian.com>
1313 * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
1314 CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
1315 CONV.OVF.I2.UN, CONV.OVF.I8.UN
1317 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
1319 * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
1320 removed the locaddr nonterminal, reimplemented value types
1322 * jit.c: reimplemented value type support, better support for
1325 2001-12-03 Miguel de Icaza <miguel@ximian.com>
1327 * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
1330 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
1332 * jit.c: call mono_init() after registering internal calls.
1334 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
1336 * emit-x86.c (tree_preallocate_regs): improved register allocation
1338 * x86.brg: impl. ISINST, CASTCLASS
1340 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
1342 * x86.brg: rearrange fields to reduce struct size.
1343 * jit.c: use signature->param_count, not signature->params_size.
1344 * debug.c: off-by-one error fix.
1346 2001-11-29 Radek Doulik <rodo@ximian.com>
1348 * Makefile.am: build mono only for X86 architecture, compilation
1349 fails for ppc now because of accessing registers in sigcontext
1352 2001-11-29 Dietmar Maurer <dietmar@ximian.com>
1354 * jit.c (mono_analyze_stack): bug fix in DUP
1356 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
1358 * debug.c: fix type handling. Position function position at start of
1359 IL code. Output more fine-grained stepping information.
1361 2001-11-28 Dietmar Maurer <dietmar@ximian.com>
1363 * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
1365 * jit.c (mono_analyze_stack): record the cli_address for later use
1367 (sigsegv_signal_handler): translate sigsegv into "Internal error"
1370 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
1372 * debug.c, debug.h: added support for generating stabs.
1373 Stabs can be compiled with as and the resulting object file can be
1374 loaded in a gdb session with add-symbol-file object.o.
1375 * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
1376 where locals and arguments are stored in the stack. Add support for
1377 passing command line arguments to CLR programs.
1378 * emit-x86.c: insert a breakpoint at method invocation if needed.
1380 2001-11-27 Dietmar Maurer <dietmar@ximian.com>
1382 * jit.c: exception support
1384 * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
1387 2001-11-26 Dick Porter <dick@ximian.com>
1389 * Makefile.am (mono_LDADD): Add io-layer library
1391 2001-11-19 Dietmar Maurer <dietmar@ximian.com>
1393 * jit.c (mono_analyze_stack): impl. LDFTN
1394 (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
1395 make register allocation easier on x86
1397 * emit-x86.c (enter_method): more debugging output for Strings
1398 (arch_compile_method): added delegate support
1399 (arch_compile_method): align EBP to 8 byte boundary
1401 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
1403 * jit.c: use mono_install_trampoline (), instead of exporting
1404 a function to a lower-level library.
1406 2001-11-16 Dietmar Maurer <dietmar@ximian.com>
1408 * x86.brg (STRING_ARG): impl. a way to marshal strings. This
1409 will be extensible to handle all possible kinds of marshalling
1412 * jit.c (map_call_type): added MB_TERM_CALL_VOID
1413 (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
1414 instructions to handle this arguments more effectively.
1416 2001-11-15 Dietmar Maurer <dietmar@ximian.com>
1418 * Makefile.am (mono_SOURCES): renamed testjit to mono
1420 * x86.brg: added debugging support
1422 * testjit.c: added support for value types, CFG improvements
1424 * emit-x86.c (enter_method): handle value types
1425 (tree_allocate_regs): impl. a better way to handle chain rules
1427 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
1429 * x86.brg (INITOBJ): bug fix: initialize data before use,
1430 simplified the code.
1432 2001-11-09 Miguel de Icaza <miguel@ximian.com>
1434 * testjit.c (mono_analyze_stack): Remove compiler warning by
1435 testing against NULL.
1437 2001-11-09 Dick Porter <dick@ximian.com>
1439 * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
1441 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
1443 * testjit.c (mono_analyze_stack): new BOX impl.
1445 * x86.brg: implemented INITOBJ
1447 * testjit.c (mono_analyze_stack): finished array support
1448 (mono_analyze_stack): reimplemented DUP instruction
1450 2001-11-08 Dietmar Maurer <dietmar@ximian.com>
1452 * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
1453 represents the address of the element. This way we can emit highly
1454 optimized x86 instructions to access elements (using base+index+offset
1457 2001-11-07 Miguel de Icaza <miguel@ximian.com>
1459 * mempool.c: Include string.h to kill warning.
1461 * testjit.c: Add typecast to kill warning.
1463 * x86.brg: Include string.h to eliminate warning.
1465 * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
1468 2001-11-07 Dietmar Maurer <dietmar@ximian.com>
1470 * emit-x86.c (enter_method): print out all method arguments
1471 (x86_magic_trampoline): impl.
1472 (arch_create_simple_jit_trampoline): we use different trampolines
1473 for static methods (no need to write the address back into to
1476 2001-11-06 Dietmar Maurer <dietmar@ximian.com>
1478 * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
1479 use less the 16 bytes.
1481 * x86.brg: code cleanup
1483 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
1485 * testjit.c: bug fixes.
1487 * emit-x86.c (leave_method): print result values
1489 2001-11-03 Dietmar Maurer <dietmar@ximian.com>
1491 * emit-x86.c (enter_method): new debugging code
1492 (leave_method): new debbuging code, this functions are called
1493 when you use the new option --trace-calls
1495 2001-11-02 Dietmar Maurer <dietmar@ximian.com>
1497 * testjit.c: impl. STELEM_XX, STELEM_XX
1499 * x86.brg: impl. LDLEN, LDELEMA
1502 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
1504 * x86.brg: added some experimental code for CALL
1505 instructions - still not found the optimal way to do it.
1507 * testjit.c (map_stind_type): add support for value types with
1508 a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
1509 CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
1510 (ctree_create_newobj): impl.
1513 * emit-x86.c (tree_allocate_regs): removed allocation code for
1515 (get_address): use a simple, but bug free search instead of the
1516 buggy binary search.
1518 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
1520 * testjit.c: support virtual functions
1522 * x86.brg: support different addressing modes for calls
1524 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
1526 * testjit.c: impl. STFLD
1528 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
1530 * x86.brg: impl. CEQ
1532 2001-10-04 Dick Porter <dick@ximian.com>
1535 * emit-x86.c: include mono-endian.h not endian.h
1537 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
1539 * testjit.c (ctree_create_dup): really duplicate the tree.
1540 attach the arguments to the CALL node. Added a new macro to
1541 make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
1543 2001-10-01 Dietmar Maurer <dietmar@ximian.com>
1545 * interp.brg: the burm based interpreter: added the file as example.
1547 2001-09-27 Dietmar Maurer <dietmar@ximian.com>
1551 * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
1553 (map_stind_type): support enum types
1554 (map_ldind_type): support enum types
1556 * emit-x86.c (tree_allocate_regs): added code to support
1557 register allocation for addressing modes trees.
1558 (tree_emit): bug fix: we have to emit all mono_burg_functins. The
1559 previous impl. did not work for chain rules.
1560 (compute_branches): support for SWITCH statements
1562 * x86.brg: added rules to model x86 addressing modes
1564 2001-09-26 Dietmar Maurer <dietmar@ximian.com>
1566 * emit-x86.c (compute_branches): implemented SWITCH
1568 * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
1569 (map_ldind_type): add enumeration types.
1570 (map_stind_type): add enumeration types.
1572 * emit-x86.c (arch_compile_method): more documentation.
1574 * testjit.c: moved the architecture specific things to emit-x86.c
1575 and x86.brg. Added more documentation. code cleanup.
1577 2001-09-25 Dietmar Maurer <dietmar@ximian.com>
1579 * x86.brg: we now have different types of addresses: ADDR_L for local
1580 values, ADDR_A for arguments and ADDR_G for global addresses. We
1581 also use LDIND_XX token to load values from a specific address
1582 instead of LDLOC/STLOC.
1584 * testjit.c: use the new adressing scheme everywhere:
1585 LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)
1587 2001-09-24 Dietmar Maurer <dietmar@ximian.com>
1589 * testjit.c (main): fix bug in parameter parsing
1591 * x86.brg: impl. more opcodes
1593 2001-09-23 Dick Porter <dick@ximian.com>
1595 * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
1597 2001-09-23 Dietmar Maurer <dietmar@ximian.com>
1599 * testjit.c: use the memory pool to avoid memory leaks
1601 2001-09-22 Dietmar Maurer <dietmar@ximian.com>
1603 * x86.brg: increment the stack pointer after function calls
1605 2001-09-21 Dick Porter <dick@ximian.com>
1607 * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
1609 2001-09-21 Dietmar Maurer <dietmar@ximian.com>
1611 * x86.brg: implemented long MUL/DIV
1612 (MB_OPT_LEVEL): define optimisation level macro
1614 * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
1615 for operations like idiv. it is also possible to assign specific registers.
1617 2001-09-20 Dietmar Maurer <dietmar@ximian.com>
1619 * x86.brg: added basic support for long
1621 * testjit.c (mono_compile_method): implemented POP
1623 2001-09-19 Miguel de Icaza <miguel@ximian.com>
1625 * testjit.c (usage): Added a couple of more usage options.
1627 2001-09-19 Dietmar Maurer <dietmar@ximian.com>
1629 * x86.brg: added more floating point grammar
1631 * testjit.c (mono_compile_method): make local offsets negative
1633 * x86.brg: added some floating point trees
1635 * testjit.c (mono_compile_method): arguments on the runtime
1636 stack are at least 4 bytes
1638 * x86.brg: partly implemented 8,16 bit integers
1640 * testjit.c (get_address): mark basic blocks
1642 2001-09-18 Dietmar Maurer <dietmar@ximian.com>
1644 * x86.brg: added some rules to optimize code
1646 * testjit.c (get_address): use a binary search to get the address
1647 (main): added an option to debug the jit (-d)
1649 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
1651 * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
1653 2001-09-17 Miguel de Icaza <miguel@ximian.com>
1655 * testjit.c (mono_compile_method): Provide better error reporting.
1657 2001-09-17 Dietmar Maurer <dietmar@ximian.com>
1659 * testjit.c (tree_get_address): impl. to fix address bug
1660 (tree_get_address): make sure that we can only jump to the first
1661 instruction of a tree.
1663 * x86.brg: emit real code for calls
1665 * testjit.c (create_jit_trampoline): creates a function to trigger jit
1667 (mono_compile_method): reversed argument order
1669 2001-09-15 Dietmar Maurer <dietmar@ximian.com>
1671 * x86.brg (stmt): don't emit unnecessary register moves
1673 * testjit.c (tree_allocate_regs): free registers earlier
1675 2001-09-14 Dietmar Maurer <dietmar@ximian.com>
1677 * x86.brg: branch addresses are now resolved
1679 * testjit.c (compute_branches): compute address of branches
1681 * x86.brg: emit real x86 instructions
1683 * testjit.c: call objdump to disassemble the output
1685 2001-09-13 Dietmar Maurer <dietmar@ximian.com>
1687 * x86.brg: use the right offsets to access local variables
1690 * emit-x86.c: only save/restore callee saved registers if they are
1693 * testjit.c (tree_allocate_regs): use the new MonoRegSet to
1695 (mono_compile_method): changed the tree for mothod calls
1702 2001-09-10 Miguel de Icaza <miguel@ximian.com>
1704 * x86.brg: Use Unix assembly syntax.
1706 * emit-x86.c: support code, should be moved
1708 * testjit.c: Use GPtrArrays instead of GLists, as those are very
1709 inefficient at appends.
1711 * Renamed `create_new_leave' to `create_new_leaf'