2 Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
4 * message.c, emit-x86.c: kill warnings.
6 2002-05-31 Dietmar Maurer <dietmar@ximian.com>
8 * x86.brg: buf fix in REMOTE_STIND_OBJ
9 (mono_ldvirtftn): impl.
10 (mono_ldintftn): impl.
13 Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15 * mono.c: added --config command line option.
17 Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19 * jit.c, jit.h: collect statistics about the number of basic blocks.
21 2002-05-31 Martin Baulig <martin@gnome.org>
23 * debug.c (mono_debug_address_from_il_offset): New public function.
24 (mono_debug_add_method): Improved local variable info: correctly handle
25 variables in registers and their start/end scopes.
27 2002-05-30 Martin Baulig <martin@gnome.org>
29 * debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
30 not "%p" which seems to be broken on Windows/mingw32.
32 2002-05-30 Dietmar Maurer <dietmar@ximian.com>
34 * x86.brg (reg): bug fix in LOCALLOC
36 * mono.c (main): new switch --nointrinsic to disable memcpy opt.
38 * x86.brg: added block copy/init optimizations from
39 Serge (serge@wildwestsoftware.com)
41 Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
43 * invoke.cs: lookup P/Invoke method address only when needed.
45 2002-05-29 Dietmar Maurer <dietmar@ximian.com>
47 * x86.brg: bug fix in REMOTE_STIND_OBJ
49 * invoke.c (arch_create_native_wrapper): handle pointers to value types
51 * helpers.h: use mono_ prefix for all functions
53 * jit.c (mono_analyze_stack): fixed SIZEOF
55 * x86.brg: impl. LOCALLOC, INITBLK
57 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
59 * x86.brg: impl. CKFINITE
61 * jit.c (mono_analyze_stack): impl. CEE_CALLI
63 * x86.brg (JMP): impl. JMP opcode
65 2002-05-27 Dietmar Maurer <dietmar@ximian.com>
67 * jit.c (mono_cfg_new): reserve additional space to store ESP when
68 calling finally handlers.
70 * exception.c (arch_get_call_finally): save ESP before calling
73 * helpers.c (map_arg_type): move some generic helper function into
76 * mono.c (usage): new option --breakonex
78 * exception.c (arch_exc_is_caught): only return FALSE if really
81 * jit.c (mono_thread_abort): free jit_tls
83 2002-05-24 Dietmar Maurer <dietmar@ximian.com>
85 * x86.brg (stmt): use memmove to cope with overlapping
86 blocks. This is not required by the specs, so we can remove it
87 later if it turns out to be too slow (and use memcpy).
89 * jit.c (mono_analyze_stack): moved const. folding from x86.brg
91 * x86.brg: CPBLK impl.
93 * emit-x86.c (tree_emit): modified to support 3 nonterminals per
94 rule (used for CPBLK).
96 Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
98 * mono.c: remove generated code from hash when benchmarking/testing
100 * invoke.cs: special case string ctors.
102 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
104 * *.c: code cleanups - tried to separate architecture dependent things.
106 2002-05-23 Martin Baulig <martin@gnome.org>
108 * debug.c (mono_debug_open): Don't call mono_debug_add_image().
109 (mono_debug_write_symbols): Only recreate the symbol file if
112 * debug-private.h (MonoDebugHandle): Added `dirty' flag.
114 * mono.c (main): Call mono_debug_add_image() here.
116 * jit.c (mono_thread_abort): If we have debugging support, call
117 mono_debug_make_symbols() and G_BREAKPOINT().
119 * exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
120 an unhandled exception.
122 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
124 * delegate.c: move the thread pool to metadata/threadpool.c, code
127 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
129 * exception.c (arch_exc_is_catched): impl. MS like exception
130 handling (added a check for unhandled exceptions)
132 2002-05-22 Martin Baulig <martin@gnome.org>
134 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
135 the assembler if necessary, ie. the assembler file is newer than the
136 symbol file or the symbol file does not exist.
138 * debug.c: Added "update_on_exit" argument to recreate the symbol file
141 * debug-dwarf2.c: Produce assembler code which is free of comments and
142 extra whitespaces so that it's suitable for `as -f'.
144 2002-05-22 Martin Baulig <martin@gnome.org>
146 * debug-dwarf2.c (dwarf2_write_section_end): Removed. This is not needed
147 and not supported by all assemblers.
148 (dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
151 * mono.c (--debug): Small fix in the argument parsing.
153 2002-05-22 Martin Baulig <martin@gnome.org>
155 * debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.
157 * mono.c: Applied patch from Miguel:
158 (--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
161 2002-05-21 Martin Baulig <martin@gnome.org>
163 * debug.c (mono_debug_source_location_from_address): Added support for the
166 2002-05-21 Martin Baulig <martin@gnome.org>
168 * debug.c (mono_debug_source_location_from_address): New function.
169 (mono_debug_il_offset_from_address): New function.
171 * exception.c (arch_handle_exception): If we have debugging support, include
172 information about the source location and IL offset in the stack trace.
174 2002-05-21 Dietmar Maurer <dietmar@ximian.com>
176 * jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
179 * x86.brg (stmt): removed unnecessary assertion
181 * jit.c (check_inlining): we cant inline throw instructions
182 (because it breaks some basic block requirements)
184 2002-05-21 Martin Baulig <martin@gnome.org>
186 * debug-private.h (MonoDebugFlags): New enum typedef.
188 * debug.c (mono_debug_open): Added a few useful arguments. See the manpage
191 2002-05-21 Martin Baulig <martin@gnome.org>
193 * debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
194 a `MonoAssembly *' argument instead of a `char *filename' one. Also added
195 `const char **args' argument.
197 * mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
198 `int verbose' argument and made it public.
199 (mono_jit_compile_class): New public function, moved the code to compile
200 all methods in a class here from main().
201 (--compile): The argument can now also be an image (in `@imagename' format).
202 Updated documentation for this command line argument.
203 (--precompile): New command line argument to precompile an image/class/method
204 before executing the main app. This argument can be given multiple times.
205 (--break): Renamed the "--debug" command line argument to "--break".
206 (--debug): New command line argument to specify the debugging format.
207 (--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
208 (--debug-args): New command line argument. This is a comma-separated list of
209 additional arguments for the symbol writer.
210 (usage): Beautified the help text a bit.
212 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
213 public mono_jit_compile_image() function rather than duplication this
216 2002-05-21 Martin Baulig <martin@gnome.org>
218 * debug-dwarf2-plus.c: This is now working again :-)
220 * debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
221 we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
222 one for the fallback MONO_DEBUG_FORMAT_DWARF2.
224 2002-05-21 Martin Baulig <martin@gnome.org>
226 * jit.c (mono_debug_handle): Removed this global variable.
228 * debug.c (mono_debug_close): Removed.
229 (mono_debug_cleanup): New global function.
230 (mono_debug_add_image): New global function.
231 (mono_debug_handle_from_class): New global function.
232 (mono_debug_write_symbols): New global function.
233 (mono_debug_add_type): Removed `MonoDebugHandle *' argument.
234 (mono_debug_add_method): Likewise.
236 2002-05-21 Martin Baulig <martin@gnome.org>
238 Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
239 file for all assemblies. Currently, the JIT doesn't put all methods
240 from a single assembly into a continuous region of memory. We were
241 previously creating valid DWARF 2 files for this, but unfortunately
242 GDB's symbol tables get messed up when it reads more than one such file.
244 * debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
245 `next_idx', `methods', `type_hash', `source_files' and `format'
246 into the MonoDebugHandle.
248 * debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
249 not on the AssemblyDebugInfo.
250 (mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().
252 * debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
253 mono_debug_write_dwarf2().
254 (mono_debug_open_assembly_dwarf2): Removed.
255 (mono_debug_close_assembly_dwarf2): Removed.
257 * debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
258 mono_debug_write_stabs().
259 (mono_debug_open_assembly_stabs): Removed.
260 (mono_debug_close_assembly_stabs).
262 * debug-dwarf2-plus.c: This is currently broken. :-(
264 2002-05-20 Martin Baulig <martin@gnome.org>
266 * debug.h (mono_debug_format): New global variable.
267 (MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.
269 * debug-private.h (MonoDebugHandle): Added `objfiles' field which is
270 a whitespace separated list of symbol files.
271 (AssemblyDebugInfo): Added `objfile' filed which is the name of the
274 * mono.c (main): Pass the assembly file name to mono_debug_open_file().
276 * debug.c (mono_debug_make_symbols): Link all symbol files into a big
277 `<assemblyname>.o' symbol file.
279 2002-05-20 Martin Baulig <martin@gnome.org>
281 * debug.c (debug_load_method_lines): Check whether the assembly file
282 is newer than the IL file and recreate the IL file if necessary.
284 2002-05-20 Miguel de Icaza <miguel@ximian.com>
286 * mono.c Updated copyright years.
288 2002-05-18 Miguel de Icaza <miguel@ximian.com>
290 * mono.c (usage): Relayout command line options.
292 2002-05-17 Dietmar Maurer <dietmar@ximian.com>
294 * x86.brg (reg): fixed array bound check
296 * emit-x86.c (enter_method): print method signature
298 * exception.c (arch_handle_exception): set trace info before we
301 2002-05-16 Dietmar Maurer <dietmar@ximian.com>
303 * jit.c (mono_find_final_block): make it work with mcs
305 * x86.brg: buf fix. if exception variable is allocated to a register.
307 * jit.c (mono_find_final_block): bug fix.
309 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
311 * delegate.c (arch_end_invoke): fix bug #24653, simplified the
312 code using new runtime_invoke feature.
314 * jit.c (mono_analyze_flow): try blocks are followed by handler
315 blocks, so we need to add all handler blocks as succesors.
316 (mono_thread_start_cb): set end_of_stack
318 * exception.c (arch_handle_exception): correctly save/restore caller
321 * emit-x86.c (arch_emit_prologue): correctly save/restore caller
324 * jit.c (mono_cfg_new): allocate space for caller saved registers.
326 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
328 * jit.c: only use one TLS slot to store jit data
330 * exception.c (arch_handle_exception): print function signature,
331 use thread relative end_of_stack
333 2002-05-13 Dietmar Maurer <dietmar@ximian.com>
335 * jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
336 store them as 32 bit integers.
337 (mono_analyze_stack): we need to generate a temporary var for
338 SHL/SHR because the tree allocator can fail otherwise
340 * exception.c (arch_handle_exception): EIP now points to the call
341 instruction, not to the instruction after the call. This fixes the
342 bug reported by Linus Upson (tests/exception8.cs)
344 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
346 * jit.c (mono_analyze_flow): always allocate the forest array
347 (mono_stack_duplicate_used_var): impl.
348 (mono_copy_used_var): impl.
350 * x86.brg: bug fix in SHR/SHL
352 * emit-x86.c (arch_emit_prologue): check if live_in_set != NULL
354 2002-05-11 Sergey Chaban <serge@wildwestsoftware.com>
356 * mono.c: new --fast-iconv command line option
357 to enable fast FP-to-integer conversion code.
358 * jit.c, jit.h: added global variable to store state
359 for the above option. This optimization is disabled
361 * x86.brg: added code to emit fast FP-to-integer
362 conversion sequences.
364 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
366 * emit-x86.c: simple definite assignment analysis optimization for
367 uninitialized locals.
369 Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
371 * x86.brg, emit-x86.c: patch the branch targets with x86_patch().
373 2002-05-10 Dietmar Maurer <dietmar@ximian.com>
375 * linear-scan.c (mono_update_gen_set): improvement/bug fix
377 * x86.brg: added additional rules to handle global allocated registers
379 * mono.c (usage): the option is called --nols, and it dissables
382 * x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8
384 2002-05-09 Dietmar Maurer <dietmar@ximian.com>
386 * linear-scan.c: linear scan reg. allocation and data flow analysis
387 use Paolo's great bitset implementation.
389 * jit.c (arch_allocate_var): add live range info
390 (mono_cfg_add_successor): create list of successors for basic
393 * mono.c (main): new option --ls to enable linear scan
395 * exception.c (arch_handle_exception): print instruction pointer
396 relative to method start address.
398 * jit.c (mono_print_ctree): print register number if locals are
399 allocate in registers.
401 * emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
402 (arch_emit_epilogue): take care when restoring save registers,
403 because the stack pointer may has changed.
405 * x86.brg: s/VAROFFSET/VARINFO/
406 modified to support global register allocation
408 Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
410 * jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.
412 2002-05-03 Sergey Chaban <serge@wildwestsoftware.com>
414 * x86.brg: more coni4 optimizations
415 MUL: generate optimized code for some consts other
416 than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
417 DIV_UN: multiply with reciprocal instead of dividing;
419 2002-05-03 Dietmar Maurer <dietmar@ximian.com>
421 * x86.brg: use VAROFFSET macro
423 * emit-x86.c (tree_emit): allocate space for spilled regs in
424 activation frame instead of pushing them to the stack.
426 * x86.brg: replace BXX with CBRANCH/COMPARE
427 replaced CXX CSET/COMPARE
429 * emit-x86.c (arch_allocate_regs): improved register allocation
431 2002-05-02 Dietmar Maurer <dietmar@ximian.com>
433 * delegate.c (mono_delegate_cleanup): signal semaphore in order to
436 2002-04-30 Dick Porter <dick@ximian.com>
438 * mono.c (main): Tell glib to not abort when g_log() etc print
441 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
443 * x86.brg: opt. LDELEMA impl.
444 (MUL) use shift when possible.
445 (DIV) use shift when possible.
446 impl. various opt. with coni4
448 * exception.c (arch_handle_exception): use ctx->SC_EBP in
449 end_of_stack check as suggested by Linus Upson <linus@linus.com>
451 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
453 * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.
455 * exception.c: included the Freebsd patch from Sandro Tolaini
456 <sandro@focuseek.com>
458 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
460 * mono.c, jit.c: use mono_runtime_run_main ().
462 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
464 * jit.c (mono_analyze_stack): dont call methods on Object with
465 METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
467 * x86.brg: added more CONV_U rules
469 * jit.c (mono_analyze_stack): avoid recursive call of virtual
470 methods: fixes Bug #23778
471 (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
473 * exception.c (arch_handle_exception): only g_assert(cleanup) if
476 2002-04-27 Patrik Torstensson <patrik.torstensson@intel.com>
478 * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
480 2002-04-27 Martin Baulig <martin@gnome.org>
482 * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
483 there's already `epilog' so we don't need `epilogue_begin'.
485 * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
486 size of the method's code.
488 2002-04-25 Martin Baulig <martin@gnome.org>
490 * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
493 2002-04-25 Dietmar Maurer <dietmar@ximian.com>
495 * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
496 added CONV_OVF_I4 (fix bug #23808)
498 2002-04-23 Dietmar Maurer <dietmar@ximian.com>
500 * x86.brg: code cleanup - use x86_patch ()
502 * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
503 (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
505 * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
506 because it slows down performance.
508 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
510 * emit-x86.c: enter_method handles 8-byte aligned parameters.
512 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
514 * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
517 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
519 * jit.c (check_inlining): added statistics about inlineing
521 * mono.c (usage): new switch --noinline to disable inlining
523 * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
524 inline methods (to keep semantics)
526 * x86.brg: added constant folding for inegers
528 * emit-x86.c (tree_allocate_regs): handle the special case when
529 chain rules need a register.
531 2002-04-19 Dietmar Maurer <dietmar@ximian.com>
533 * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
535 * jit.c (check_inlining): better inlining support
537 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
539 * x86.brg: LDLEN uses max_length instead of bounds[0]
540 * jit.c: support for new szarray format
542 2002-04-18 Dietmar Maurer <dietmar@ximian.com>
544 * jit.c (check_inlining): added inlining support
546 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
548 * x86.brg: optimized version of castclass and isinst
550 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
552 * emit-x86.c, invoke.c: track time spent compiling.
554 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
556 * emit-x86.c, invoke.c: call profile callbacks if needed.
557 * jit.c, jit.h, mono.c: add --profile command line option.
559 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
561 * jit.h: included mono/io-layer/io-layer.h to avoid breaking
562 compilation under windows when upgrading mingw and w32api to
563 version 1.3 (thanks Dick!).
565 2002-04-15 Patrik Torstensson <patrik.torstensson@labs2.com>
567 * jit.c: changed the array icalls to use full names
569 2002-04-15 Dietmar Maurer <dietmar@ximian.com>
571 * x86.brg: check the this pointer before calling
572 non-virtual functions
574 * emit-x86.c (arch_emit_prologue): initialize local vars.
576 * x86.brg: removed incredible clumsy code
578 2002-04-13 Martin Baulig <martin@gnome.org>
580 * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
581 the location of a variable.
582 (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
583 instead of a stack offset and use dwarf2_write_variable_location() to write
586 2002-04-13 Martin Baulig <martin@gnome.org>
588 * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
591 2002-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
593 * Makefile.am: use of the new '-s' option in monoburg.
595 2002-04-12 Martin Baulig <martin@gnome.org>
597 * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
600 2002-04-10 Sergey Chaban <serge@wildwestsoftware.com>
601 * win32-exception: added Win32 SEH exception filter that translates
602 CONTEXT to sigcontext;
604 * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
605 in a platfrom-dependent way;
607 * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
608 and avoid io-layer includes;
610 * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
613 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
615 * delegate.c (arch_end_invoke): restore output arguments
617 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
619 * jit.c: call mono_runtime_init ().
621 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
623 * jit.c (mono_jit_cleanup): added more statistics
625 * invoke.c (arch_create_native_wrapper): special case EndInvoke -
626 we need to pass the MonoMethod pointer as first argument.
628 * delegate.c (mono_async_invoke): notify all listeners, not only a
630 (arch_end_invoke): we now pass a MonoMethod as first parameter and
631 use arch_method_call_message_new() to access the stack.
632 (arch_end_invoke): wait until we really finished processing
633 (async_invoke_abort): notify all listeners, not only a
636 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
638 * message.c (arch_return_value): impl.
639 (arch_method_return_message_restore): consider delegate BeginInvoke
641 * jit.c: removed jit_exec_main()
643 * delegate.c (arch_begin_invoke): use the message builder to make
644 it architecture independent - still needs more cleanup.
646 2002-04-05 Dietmar Maurer <dietmar@ximian.com>
648 * delegate.c (mono_delegate_ctor): support for transparent proxy
650 * x86.brg (freg): bug fix in CONV_R* opcodes
652 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
654 * message.c: added documentation
656 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
658 * mono.c (main): use --trace instead of --trace-calls
660 * x86.brg: impl. REMOTE_STIND_XX
662 * message.c (mono_store_remote_field): impl.
664 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
666 * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
668 * message.c (mono_load_remote_field): impl.
670 * jit.c (mono_analyze_stack): only call marshalbyref methods
672 (mono_analyze_stack): consider marshalbyref objects in LDFLD
674 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
676 * x86.brg: kill pointer arithmetric.
678 2002-03-28 Martin Baulig <martin@gnome.org>
680 * jit.c (mono_debug_insert_breakpoint): New global variable.
681 (mono_debug_last_breakpoint_address): New global variable.
683 * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
684 non-zero, insert a breakpoint; if it's positive, decrement it when done.
685 Set `mono_debug_last_breakpoint_address' to the address of the last inserted
688 * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
689 `mono_debug_last_breakpoint_address', also documented them here.
691 2002-03-28 Martin Baulig <martin@gnome.org>
693 * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
694 (AssemblyDebugInfo): Added `format'.
696 * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
697 this allows us choose the format on a per-assembly basis.
698 (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
699 to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
701 (debug_generate_method_lines): Generate correct IL offsets.
703 2002-03-28 Martin Baulig <martin@gnome.org>
705 * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
707 * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
709 * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
710 `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
712 * debug.c (debug_generate_method_lines): Don't return if we don't have line
713 numbers, we still need to generate the IL offsets here. Emit line numbers
714 for `prologue_end_offset' (the first line of actual code) and
715 `epilogue_begin_offset' (the line of the method's closing brace).
716 Don't crash if cfg->bblocks [i].forest is NULL.
717 (mono_debug_add_method): Don't crash if we don't have line numbers.
718 Initialize the newly added fields.
720 * debug-stabs.c: Record first and last line, emit filename info at the
721 beginning of the stab file, gdb ignores the types otherwise.
723 * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
724 emit line number info for the first and last line.
726 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
728 * invoke.c (arch_create_delegate_trampoline): impl.
730 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
732 * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
733 with the jit runtime to easy embedding. main() is moved to mono.c, now.
734 * jit.c: use opcode names from libmetadata.
735 * debug.h, debug.c: constify char* argument.
737 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
739 * jit.c: catching SIGSEGV again, added proxy support
741 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
743 * delegate.c (mono_delegate_init): remove unused worker threads
745 2002-03-27 Mike Kestner <mkestner@speakeasy.net>
747 * delegate.c (arch_get_delegate_invoke): malloc a bigger area
749 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
751 * jit.c: remove glib mem vtable code.
753 2002-03-26 Martin Baulig <martin@gnome.org>
755 * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
756 lines if we don't have line number information.
757 (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
760 * debug-stabs.c (write_method_stabs): Don't generate method lines if
761 we don't have line number information. Use `minfo->method_info.this_offset'
762 instead of hardcoding 8.
764 * debug.c (debug_generate_method_lines): Don't crash if we don't have
765 line number information.
766 (mono_debug_open_assembly): Don't generate line numbers for
767 MONO_DEBUG_FORMAT_DWARF2_PLUS.
768 (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
769 but it in the new `this_offset' field.
771 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
773 * debug.c (debug_generate_method_lines): Use correct addresses for
776 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
778 * jit.c: do not set the glib mem vtable anymore.
779 * Makefile.am: link to libmonoutils.
781 2002-03-25 Martin Baulig <martin@gnome.org>
783 * debug.h (mono_debug_make_symbols): Documented this function.
785 2002-03-24 Martin Baulig <martin@gnome.org>
787 * debug.c (mono_debug_add_method): Include the `this' offset in
788 the `minfo->method_info.param_offsets' array.
790 2002-03-23 Martin Baulig <martin@gnome.org>
792 * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
793 to do it before the X86_CMP.
794 (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
795 (reg: CLT (lreg, lreg)): Likewise.
796 (reg: CLT_UN (lreg, lreg)): Likewise.
797 (reg: CLT_UN (lreg, lreg)): Likewise.
798 (reg: CGT (lreg, lreg)): Likewise.
799 (reg: CGT (lreg, lreg)): Likewise.
800 (reg: CGT_UN (lreg, lreg)): Likewise.
801 (reg: CGT_UN (lreg, lreg)): Likewise.
803 2002-03-23 Martin Baulig <martin@gnome.org>
805 * debug-private.h (AssemblyDebugInfo): Added `_priv'.
807 * debug-dwarf2-plus.c
808 (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
809 (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
810 (mono_debug_write_assembly_dwarf2_plus): Only call
811 mono_debug_update_symbol_file() here.
813 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
815 * jit.c: inter strings before executing a method.
816 Do not intern command line arguments anymore.
818 2002-03-21 Martin Baulig <martin@gnome.org>
820 * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
822 * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
823 been created by MCS and fills in all machine dependent stuff.
825 * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
826 removed everything which is already in MonoDebugMethodInfo.
828 * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
829 (mono_debug_make_symbols): Don't open the file or call as, this is done in the
832 * jit.c (main): Added "--dwarf-plus" command line option to use the new
833 MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
835 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
837 * jit.c (usage): new option to specify maximum number of worker threads
838 (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
840 * delegate.c (async_invoke_abort): added support for asynchronous exceptions
841 (arch_get_async_invoke): notify listeners before we call the
842 asynchronous callback
844 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
846 * delegate.c (async_invoke_thread): support for domains
847 (async_invoke_thread): create workers only when needed
849 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
851 * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
853 2002-03-18 Dietmar Maurer <dietmar@ximian.com>
855 * x86.brg: impl. lreg: XOR (lreg, lreg)
856 impl. REM (freg, freg)
858 2002-03-17 Martin Baulig <martin@gnome.org>
860 * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
863 * debug-dwarf2.c: Added support for strings and arrays.
865 2002-03-17 Martin Baulig <martin@gnome.org>
867 * debug.c (mono_debug_get_type): Recursively call this for all function members
869 (mono_debug_add_method): Don't mangle function names, this must be done by the
870 debugger backend if the debugging format needs mangled names.
872 * debug-dwarf2.c: Improved support for classes, added member functions.
874 2002-03-16 Martin Baulig <martin@gnome.org>
876 * debug.c (mono_debug_get_type): Recursively call this for all members and
877 parent classes of a class type.
879 * debug-dwarf2.c: Added basic support for classes. Set source language to C++
880 since GDB doesn't like Java very much.
882 2002-03-16 Martin Baulig <martin@gnome.org>
884 * debug-dwarf2.c: Added support for enums.
886 2002-03-15 Martin Baulig <martin@gnome.org>
888 * debug.c (mono_debug_get_type): Recursively call this for all members
891 * debug-dwarf2.c: Added support for structs.
893 2002-03-15 Dietmar Maurer <dietmar@ximian.com>
895 * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
896 to new MonoLMF layout
898 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
900 * emit-x86.c (arch_create_native_wrapper): new code to generate
901 wrappers for calling native functions.
902 (arch_create_native_wrapper): free allocated strings
903 (arch_handle_exception): made mono_jit_info_table domain dependent
905 2002-03-14 Martin Baulig <martin@gnome.org>
907 * debug.c (MonoDebugFormat): New public enums specifying which debugging
909 (mono_debug_open_file): Added MonoDebugFormat argument.
910 (mono_debug_make_symbols): Don't take an argument to make it easier to call
911 this function from GDB. It's now safe to call this function multiple times;
912 it'll always write a complete debugging file.
914 * debug.c: Splitted this file into a general part which remains in this file
915 and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
916 All public functions now call a corresponding format specific function.
918 * debug.c: The following changes are private to debug.c:
919 (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
920 (record_line_number, debug_generate_method_lines): New private functions.
921 (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
922 calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
923 mono_debug_open_assembly_dwarf2).
924 (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
925 now safe to call this function multiple times.
926 (mono_debug_get_type): New public function. This takes a `MonoClass *' and
927 returns an unique index for this type. It's used to ensure that we only write
928 each class once to the debugging file.
929 (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
930 data structure, but don't directly write to the debugging file. This is done
931 later from mono_debug_write_assembly().
933 * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
934 debugging output. Call mono_debug_close() on cleanup if necessary.
936 2002-03-14 Martin Baulig <martin@gnome.org>
938 * debug-private.h: New private header file.
940 * debug-stabs.c: Added the stabs type generation stuff which was
941 previously in debug.c.
943 * debug-dwarf.c: Started to implement type support. We're currently
944 only writing this most basic types to the dwarf file, but this will
947 2002-03-13 Martin Baulig <martin@gnome.org>
949 * debug-stabs.c, debug-dwarf2.c: New files containing my new
950 debugging code. They're now in CVS, but not yet used anywhere.
952 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
954 * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
955 macros, included new delegate code from Daniel Stodden.
958 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
960 * jit.c: verify that corlib and runtime are in sync.
962 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
964 * emit-x86.c, jit.c: use the debug-helpers facilities to
965 describe and match a method when debugging.
967 2002-03-10 Martin Baulig <martin@gnome.org>
969 * emit-x86.c (arch_compile_method): When emitting stabs debugging
970 output, put a nop instruction at the start of all functions so that
971 the adresses won't change when using --debug.
973 * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
974 the bytecode area, stabs needs a line number in the .il file. Use the
975 new info->moffsets to get the line number.
976 (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
977 `moffsets' is an array of `total_lines' fields (total number of lines
978 in the .il file); for each line in the .il field, this array contains
979 the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
980 of a method and 0 otherwise.
981 (debug_load_method_lines): Read the whole .il file and initialize the
982 info->moffsets field.
984 2002-03-09 Martin Baulig <martin@gnome.org>
986 * x86.brg (DIV_UN): Clear EDX before performing the division and remove
987 the unnecessary CDQ instruction.
989 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
991 * jit.c (mono_analyze_stack): only load addresses of value types
992 on the runtime stack.
994 2002-03-07 Duncan Mak <duncan@ximian.com>
996 * Makefile.am: A small patch fixing errors in vpath-based builds
997 (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
998 committed for Daniel Stodden <stodden@in.tum.de>.
1000 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1002 * jit.c: Boehm-GC enable.
1004 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1006 * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
1007 realloc that code sometimes!
1009 * emit-x86.c (mono_compute_branches): support several types of
1012 2002-03-06 Dietmar Maurer <dietmar@ximian.com>
1014 * x86.brg: impl. MUL_OVF_UN (reg, reg)
1016 * jit.c (mono_find_final_block): find correct finally handler.
1018 * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
1019 caller saved registers.
1021 2002-03-05 Dietmar Maurer <dietmar@ximian.com>
1023 * x86.brg: use x86_widen_reg for CONV opcodes
1025 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
1027 * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
1029 * emit-x86.c (arch_handle_exception): big fix - dont use
1030 uninitialized next_bp
1031 (arch_compile_method): make the jit thread save
1032 (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
1033 to avoid need of recursive mutexes
1035 * x86.brg: use new mono_assert macros
1037 2002-02-28 Dietmar Maurer <dietmar@ximian.com>
1039 * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
1040 calling into unmanaged code (arch_compile_method).
1042 * x86.brg: impl. CONV_I4 (freg) with correct rounding
1043 (lreg): impl CALL_I8(INTF_ADDR)
1044 impl. CONV_R_UN (reg)
1047 2002-02-27 Dietmar Maurer <dietmar@ximian.com>
1049 * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
1051 2002-02-26 Dietmar Maurer <dietmar@ximian.com>
1053 * x86.brg: bug fix in CLT(lreg,lreg)
1054 (reg): bug fix in CONV_OVF_I4(lreg)
1055 (lreg): replaced x86_call_reg with x86_call_code
1057 * emit-x86.c (mono_add_jump_info): impl.
1058 (mono_compute_branches): patch real jump address (instead of
1059 emitting code twice)
1061 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1063 * x86.brg: optimize cmp reg,0 -> test reg.
1065 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1067 * jit.h, jit.c, emit-x86.c: Added a few statistics counters
1068 and the --stats command line option to print them.
1069 Fixed memory leak in arch_compile_method () when a method's code is
1070 found in the cache. Fix magic trampoline to deal with static calls.
1072 2002-02-21 Dietmar Maurer <dietmar@ximian.com>
1074 * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN
1076 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
1078 * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
1079 (arch_create_jit_trampoline): cache trampoline code
1081 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1083 * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
1085 (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
1087 * x86.brg: do not encode exception objects into the instruction
1088 stream, because they are domain dependend. Use
1089 arch_get_throw_exception_by_name() instead;
1091 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1093 * jit.c: intern command line arguments.
1095 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1097 * jit.c (mono_analyze_stack): use the magic trampoline for all
1098 calls (since we cant store the address of compiled code in
1100 (mono_analyze_stack): imp. LDSTR for shared code
1102 * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
1103 (arch_compile_method): add a cache for compiled methods to avoid
1104 recompilation. dont use method->addr to store domain dependent
1107 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1109 * x86.brg: impl. BLE,BGT for freg
1111 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1113 * emit-x86.c: handle unreachable code. Eliminate some unneeded
1115 * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
1116 main(). Add --compile classname and --ncompile num command line
1117 options to do performance evaluation of the jitter (and help
1120 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1122 * emit-x86.c (arch_compile_method): bug fix in static delegate
1125 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
1127 * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
1129 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
1131 * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
1133 2002-02-13 Miguel de Icaza <miguel@ximian.com>
1135 * jit.c (arch_allocate_var): Only assert that the alignment is
1136 at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
1138 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1140 * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
1142 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1144 * emit-x86.c: make x86_magic_trampoline() handle call instructions
1145 with an imm8 displacement. x86.brg not yet changed to take advantage
1148 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1150 * jit.c: use opcode info from libmetadata to do flow analysis
1153 2002-02-06 Dietmar Maurer <dietmar@ximian.com>
1155 * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking
1157 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
1159 * x86.brg: use element_class for type check
1161 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
1163 * jit.c (main): impl. __array_Address icall
1165 * mempool.c (mono_mempool_alloc): handle large block allocation
1167 2002-02-01 Dietmar Maurer <dietmar@ximian.com>
1169 * x86.brg: impl. SHL/SHR/CLT for 64 bit values
1171 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
1173 * x86.brg: impl. CEQ(lreg,lreg)
1175 * jit.c (mono_analyze_stack): impl. LDVIRTFTN
1176 (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
1178 * x86.brg: removed some dead code.
1180 2002-01-18 Dietmar Maurer <dietmar@ximian.com>
1182 * jit.c (arch_allocate_var): fixed alignment bugs
1184 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
1186 * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
1188 2002-01-16 Dietmar Maurer <dietmar@ximian.com>
1190 * jit.c (main): install the trampoline before we start to create
1193 * x86.brg: impl. CLT_UN, CGT_UN
1195 * emit-x86.c (leave_method): added check for null object
1196 (enter_method): consider byref arguments
1198 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
1200 * x86.brg: bug fix in CONV_OVF_I1_UN
1201 impl. ADD_OVF, MUL_OVF
1202 impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
1203 (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
1204 (EMIT_COND_EXCEPTION): added signed flag
1206 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
1208 * jit.c: implement stloc, ldloc, ldloca.
1210 2002-01-11 Dietmar Maurer <dietmar@ximian.com>
1212 * jit.c (mono_analyze_stack): fixed calculation of last_instr
1214 * x86.brg (LDLEN): emit null_reference exception
1216 (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
1218 2002-01-04 Dietmar Maurer <dietmar@ximian.com>
1220 * x86.brg: bug fix in CASTCLASS
1222 2001-12-21 Dietmar Maurer <dietmar@ximian.com>
1224 * jit.c (mono_analyze_stack): spill MUL to avoid problem with
1225 register allocation.
1227 * emit-x86.c (arch_compile_method): fixed static delegate bug
1229 2001-12-16 Miguel de Icaza <miguel@ximian.com>
1231 * x86.brg, jit.c: Split up the nodes that we used to share on
1232 CONV_OVF. They were sharing the nodes because they are the same
1233 on 32-bit machines, but on 64-bit machines you need different
1236 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
1238 * x86.brg: removed prerequisite that (tree->left->reg1 <
1239 tree->right->reg1) to make register allocation easier.
1241 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
1243 * emit-x86.c (arch_handle_exception): new code to handle
1244 exceptions inside unmanaged code.
1246 * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
1247 address as first argument.
1249 2001-12-15 Dietmar Maurer <dietmar@ximian.com>
1251 * x86.brg: pass exceptions on the stack
1253 * jit.h (ISSTRUCT): new macro to check for real value types
1254 (return false for enum types).
1256 2001-12-11 Dietmar Maurer <dietmar@ximian.com>
1258 * x86.brg: use position indepentent code if possible.
1260 * x86.brg (EMIT_COND_EXCEPTION): new macro.
1262 * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
1264 2001-12-10 Dietmar Maurer <dietmar@ximian.com>
1266 * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
1268 (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
1270 * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
1272 2001-12-07 Dietmar Maurer <dietmar@ximian.com>
1274 * jit.c (mono_allocate_intvar): bug fix.
1276 * emit-x86.c (get_unbox_trampoline): impl.
1278 * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
1280 2001-12-06 Dietmar Maurer <dietmar@ximian.com>
1282 * x86.brg: raise exceptions.
1284 2001-12-05 Dietmar Maurer <dietmar@ximian.com>
1286 * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
1289 2001-12-06 Miguel de Icaza <miguel@ximian.com>
1291 * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
1292 CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
1293 CONV.OVF.I2.UN, CONV.OVF.I8.UN
1295 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
1297 * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
1298 removed the locaddr nonterminal, reimplemented value types
1300 * jit.c: reimplemented value type support, better support for
1303 2001-12-03 Miguel de Icaza <miguel@ximian.com>
1305 * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
1308 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
1310 * jit.c: call mono_init() after registering internal calls.
1312 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
1314 * emit-x86.c (tree_preallocate_regs): improved register allocation
1316 * x86.brg: impl. ISINST, CASTCLASS
1318 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
1320 * x86.brg: rearrange fields to reduce struct size.
1321 * jit.c: use signature->param_count, not signature->params_size.
1322 * debug.c: off-by-one error fix.
1324 2001-11-29 Radek Doulik <rodo@ximian.com>
1326 * Makefile.am: build mono only for X86 architecture, compilation
1327 fails for ppc now because of accessing registers in sigcontext
1330 2001-11-29 Dietmar Maurer <dietmar@ximian.com>
1332 * jit.c (mono_analyze_stack): bug fix in DUP
1334 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
1336 * debug.c: fix type handling. Position function position at start of
1337 IL code. Output more fine-grained stepping information.
1339 2001-11-28 Dietmar Maurer <dietmar@ximian.com>
1341 * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
1343 * jit.c (mono_analyze_stack): record the cli_address for later use
1345 (sigsegv_signal_handler): translate sigsegv into "Internal error"
1348 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
1350 * debug.c, debug.h: added support for generating stabs.
1351 Stabs can be compiled with as and the resulting object file can be
1352 loaded in a gdb session with add-symbol-file object.o.
1353 * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
1354 where locals and arguments are stored in the stack. Add support for
1355 passing command line arguments to CLR programs.
1356 * emit-x86.c: insert a breakpoint at method invocation if needed.
1358 2001-11-27 Dietmar Maurer <dietmar@ximian.com>
1360 * jit.c: exception support
1362 * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
1365 2001-11-26 Dick Porter <dick@ximian.com>
1367 * Makefile.am (mono_LDADD): Add io-layer library
1369 2001-11-19 Dietmar Maurer <dietmar@ximian.com>
1371 * jit.c (mono_analyze_stack): impl. LDFTN
1372 (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
1373 make register allocation easier on x86
1375 * emit-x86.c (enter_method): more debugging output for Strings
1376 (arch_compile_method): added delegate support
1377 (arch_compile_method): align EBP to 8 byte boundary
1379 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
1381 * jit.c: use mono_install_trampoline (), instead of exporting
1382 a function to a lower-level library.
1384 2001-11-16 Dietmar Maurer <dietmar@ximian.com>
1386 * x86.brg (STRING_ARG): impl. a way to marshal strings. This
1387 will be extensible to handle all possible kinds of marshalling
1390 * jit.c (map_call_type): added MB_TERM_CALL_VOID
1391 (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
1392 instructions to handle this arguments more effectively.
1394 2001-11-15 Dietmar Maurer <dietmar@ximian.com>
1396 * Makefile.am (mono_SOURCES): renamed testjit to mono
1398 * x86.brg: added debugging support
1400 * testjit.c: added support for value types, CFG improvements
1402 * emit-x86.c (enter_method): handle value types
1403 (tree_allocate_regs): impl. a better way to handle chain rules
1405 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
1407 * x86.brg (INITOBJ): bug fix: initialize data before use,
1408 simplified the code.
1410 2001-11-09 Miguel de Icaza <miguel@ximian.com>
1412 * testjit.c (mono_analyze_stack): Remove compiler warning by
1413 testing against NULL.
1415 2001-11-09 Dick Porter <dick@ximian.com>
1417 * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
1419 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
1421 * testjit.c (mono_analyze_stack): new BOX impl.
1423 * x86.brg: implemented INITOBJ
1425 * testjit.c (mono_analyze_stack): finished array support
1426 (mono_analyze_stack): reimplemented DUP instruction
1428 2001-11-08 Dietmar Maurer <dietmar@ximian.com>
1430 * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
1431 represents the address of the element. This way we can emit highly
1432 optimized x86 instructions to access elements (using base+index+offset
1435 2001-11-07 Miguel de Icaza <miguel@ximian.com>
1437 * mempool.c: Include string.h to kill warning.
1439 * testjit.c: Add typecast to kill warning.
1441 * x86.brg: Include string.h to eliminate warning.
1443 * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
1446 2001-11-07 Dietmar Maurer <dietmar@ximian.com>
1448 * emit-x86.c (enter_method): print out all method arguments
1449 (x86_magic_trampoline): impl.
1450 (arch_create_simple_jit_trampoline): we use different trampolines
1451 for static methods (no need to write the address back into to
1454 2001-11-06 Dietmar Maurer <dietmar@ximian.com>
1456 * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
1457 use less the 16 bytes.
1459 * x86.brg: code cleanup
1461 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
1463 * testjit.c: bug fixes.
1465 * emit-x86.c (leave_method): print result values
1467 2001-11-03 Dietmar Maurer <dietmar@ximian.com>
1469 * emit-x86.c (enter_method): new debugging code
1470 (leave_method): new debbuging code, this functions are called
1471 when you use the new option --trace-calls
1473 2001-11-02 Dietmar Maurer <dietmar@ximian.com>
1475 * testjit.c: impl. STELEM_XX, STELEM_XX
1477 * x86.brg: impl. LDLEN, LDELEMA
1480 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
1482 * x86.brg: added some experimental code for CALL
1483 instructions - still not found the optimal way to do it.
1485 * testjit.c (map_stind_type): add support for value types with
1486 a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
1487 CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
1488 (ctree_create_newobj): impl.
1491 * emit-x86.c (tree_allocate_regs): removed allocation code for
1493 (get_address): use a simple, but bug free search instead of the
1494 buggy binary search.
1496 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
1498 * testjit.c: support virtual functions
1500 * x86.brg: support different addressing modes for calls
1502 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
1504 * testjit.c: impl. STFLD
1506 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
1508 * x86.brg: impl. CEQ
1510 2001-10-04 Dick Porter <dick@ximian.com>
1513 * emit-x86.c: include mono-endian.h not endian.h
1515 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
1517 * testjit.c (ctree_create_dup): really duplicate the tree.
1518 attach the arguments to the CALL node. Added a new macro to
1519 make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
1521 2001-10-01 Dietmar Maurer <dietmar@ximian.com>
1523 * interp.brg: the burm based interpreter: added the file as example.
1525 2001-09-27 Dietmar Maurer <dietmar@ximian.com>
1529 * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
1531 (map_stind_type): support enum types
1532 (map_ldind_type): support enum types
1534 * emit-x86.c (tree_allocate_regs): added code to support
1535 register allocation for addressing modes trees.
1536 (tree_emit): bug fix: we have to emit all mono_burg_functins. The
1537 previous impl. did not work for chain rules.
1538 (compute_branches): support for SWITCH statements
1540 * x86.brg: added rules to model x86 addressing modes
1542 2001-09-26 Dietmar Maurer <dietmar@ximian.com>
1544 * emit-x86.c (compute_branches): implemented SWITCH
1546 * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
1547 (map_ldind_type): add enumeration types.
1548 (map_stind_type): add enumeration types.
1550 * emit-x86.c (arch_compile_method): more documentation.
1552 * testjit.c: moved the architecture specific things to emit-x86.c
1553 and x86.brg. Added more documentation. code cleanup.
1555 2001-09-25 Dietmar Maurer <dietmar@ximian.com>
1557 * x86.brg: we now have different types of addresses: ADDR_L for local
1558 values, ADDR_A for arguments and ADDR_G for global addresses. We
1559 also use LDIND_XX token to load values from a specific address
1560 instead of LDLOC/STLOC.
1562 * testjit.c: use the new adressing scheme everywhere:
1563 LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)
1565 2001-09-24 Dietmar Maurer <dietmar@ximian.com>
1567 * testjit.c (main): fix bug in parameter parsing
1569 * x86.brg: impl. more opcodes
1571 2001-09-23 Dick Porter <dick@ximian.com>
1573 * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
1575 2001-09-23 Dietmar Maurer <dietmar@ximian.com>
1577 * testjit.c: use the memory pool to avoid memory leaks
1579 2001-09-22 Dietmar Maurer <dietmar@ximian.com>
1581 * x86.brg: increment the stack pointer after function calls
1583 2001-09-21 Dick Porter <dick@ximian.com>
1585 * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
1587 2001-09-21 Dietmar Maurer <dietmar@ximian.com>
1589 * x86.brg: implemented long MUL/DIV
1590 (MB_OPT_LEVEL): define optimisation level macro
1592 * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
1593 for operations like idiv. it is also possible to assign specific registers.
1595 2001-09-20 Dietmar Maurer <dietmar@ximian.com>
1597 * x86.brg: added basic support for long
1599 * testjit.c (mono_compile_method): implemented POP
1601 2001-09-19 Miguel de Icaza <miguel@ximian.com>
1603 * testjit.c (usage): Added a couple of more usage options.
1605 2001-09-19 Dietmar Maurer <dietmar@ximian.com>
1607 * x86.brg: added more floating point grammar
1609 * testjit.c (mono_compile_method): make local offsets negative
1611 * x86.brg: added some floating point trees
1613 * testjit.c (mono_compile_method): arguments on the runtime
1614 stack are at least 4 bytes
1616 * x86.brg: partly implemented 8,16 bit integers
1618 * testjit.c (get_address): mark basic blocks
1620 2001-09-18 Dietmar Maurer <dietmar@ximian.com>
1622 * x86.brg: added some rules to optimize code
1624 * testjit.c (get_address): use a binary search to get the address
1625 (main): added an option to debug the jit (-d)
1627 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
1629 * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
1631 2001-09-17 Miguel de Icaza <miguel@ximian.com>
1633 * testjit.c (mono_compile_method): Provide better error reporting.
1635 2001-09-17 Dietmar Maurer <dietmar@ximian.com>
1637 * testjit.c (tree_get_address): impl. to fix address bug
1638 (tree_get_address): make sure that we can only jump to the first
1639 instruction of a tree.
1641 * x86.brg: emit real code for calls
1643 * testjit.c (create_jit_trampoline): creates a function to trigger jit
1645 (mono_compile_method): reversed argument order
1647 2001-09-15 Dietmar Maurer <dietmar@ximian.com>
1649 * x86.brg (stmt): don't emit unnecessary register moves
1651 * testjit.c (tree_allocate_regs): free registers earlier
1653 2001-09-14 Dietmar Maurer <dietmar@ximian.com>
1655 * x86.brg: branch addresses are now resolved
1657 * testjit.c (compute_branches): compute address of branches
1659 * x86.brg: emit real x86 instructions
1661 * testjit.c: call objdump to disassemble the output
1663 2001-09-13 Dietmar Maurer <dietmar@ximian.com>
1665 * x86.brg: use the right offsets to access local variables
1668 * emit-x86.c: only save/restore callee saved registers if they are
1671 * testjit.c (tree_allocate_regs): use the new MonoRegSet to
1673 (mono_compile_method): changed the tree for mothod calls
1680 2001-09-10 Miguel de Icaza <miguel@ximian.com>
1682 * x86.brg: Use Unix assembly syntax.
1684 * emit-x86.c: support code, should be moved
1686 * testjit.c: Use GPtrArrays instead of GLists, as those are very
1687 inefficient at appends.
1689 * Renamed `create_new_leave' to `create_new_leaf'