1 2002-07-01 Dietmar Maurer <dietmar@ximian.com>
3 * exception.c (arch_get_call_finally): restore caller saved
4 register used by global reg. allocation when calling finally
5 handlers (fixes bug #24943).
7 2002-07-01 Dick Porter <dick@ximian.com>
9 * jit.c (mono_jit_exec): Removed unneeded argument to
10 mono_runtime_run_main()
12 2002-06-28 Martin Baulig <martin@gnome.org>
14 * debug.c (debug_generate_method_lines, mono_debug_add_method): Make methods
15 start on the nop instruction to make single-stepping into an already-JITed
18 2002-06-26 Martin Baulig <martin@gnome.org>
20 * debug.c (mono_debug_source_location_from_address): Added
21 `guint32 *line_number' argument. If it's not NULL, store the line number
22 there and return the file name without the line number.
24 * exception.c (ves_icall_get_trace): Fill in `sf->filename' and `sf->line'.
25 (ves_icall_get_frame_info): Likewise.
27 2002-06-25 Dick Porter <dick@ximian.com>
29 * jit.c (mono_jit_exec): Pass the assembly to mono_runtime_run_main
31 2002-06-22 Martin Baulig <martin@gnome.org>
33 * debug.c (mono_debug_source_location_from_address): Small fix, an
34 unsigned number can never be smaller than zero, make that check
37 2002-06-19 Dietmar Maurer <dietmar@ximian.com>
39 * exception.c (ves_icall_get_trace): new method to get the stack
40 trace from a Exception.
42 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
44 * jit.c (check_inlining): do not inline functions containing
45 calls to stack query functions
47 * exception.c (ves_icall_get_frame_info): impl.
49 Tue Jun 18 10:21:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
51 * invoke.c: marshal simple arrays correctly.
53 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
55 * x86.brg: added inlined versions of Math.Sin, Math.Cos, Math.Sqrt
57 * jit.c (mono_analyze_stack): impl. STARG
58 (mono_analyze_stack): impl. LDARGA
60 * exception.c (arch_handle_exception): correctly restore register
61 values when unwinding the stack (fixes bug 25698)
63 2002-06-09 Martin Baulig <martin@gnome.org>
65 * debug.c (mono_debug_open_image): For MONO_DEBUG_FORMAT_DWARF2_PLUS,
66 the `%s-debug.s' file is in the same directory than its assembly.
68 Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
70 * message.c, emit-x86.c: kill warnings.
72 2002-05-31 Dietmar Maurer <dietmar@ximian.com>
74 * x86.brg: buf fix in REMOTE_STIND_OBJ
75 (mono_ldvirtftn): impl.
76 (mono_ldintftn): impl.
79 Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
81 * mono.c: added --config command line option.
83 Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
85 * jit.c, jit.h: collect statistics about the number of basic blocks.
87 2002-05-31 Martin Baulig <martin@gnome.org>
89 * debug.c (mono_debug_address_from_il_offset): New public function.
90 (mono_debug_add_method): Improved local variable info: correctly handle
91 variables in registers and their start/end scopes.
93 2002-05-30 Martin Baulig <martin@gnome.org>
95 * debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
96 not "%p" which seems to be broken on Windows/mingw32.
98 2002-05-30 Dietmar Maurer <dietmar@ximian.com>
100 * x86.brg (reg): bug fix in LOCALLOC
102 * mono.c (main): new switch --nointrinsic to disable memcpy opt.
104 * x86.brg: added block copy/init optimizations from
105 Serge (serge@wildwestsoftware.com)
107 Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
109 * invoke.cs: lookup P/Invoke method address only when needed.
111 2002-05-29 Dietmar Maurer <dietmar@ximian.com>
113 * x86.brg: bug fix in REMOTE_STIND_OBJ
115 * invoke.c (arch_create_native_wrapper): handle pointers to value types
117 * helpers.h: use mono_ prefix for all functions
119 * jit.c (mono_analyze_stack): fixed SIZEOF
121 * x86.brg: impl. LOCALLOC, INITBLK
123 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
125 * x86.brg: impl. CKFINITE
127 * jit.c (mono_analyze_stack): impl. CEE_CALLI
129 * x86.brg (JMP): impl. JMP opcode
131 2002-05-27 Dietmar Maurer <dietmar@ximian.com>
133 * jit.c (mono_cfg_new): reserve additional space to store ESP when
134 calling finally handlers.
136 * exception.c (arch_get_call_finally): save ESP before calling
139 * helpers.c (map_arg_type): move some generic helper function into
142 * mono.c (usage): new option --breakonex
144 * exception.c (arch_exc_is_caught): only return FALSE if really
147 * jit.c (mono_thread_abort): free jit_tls
149 2002-05-24 Dietmar Maurer <dietmar@ximian.com>
151 * x86.brg (stmt): use memmove to cope with overlapping
152 blocks. This is not required by the specs, so we can remove it
153 later if it turns out to be too slow (and use memcpy).
155 * jit.c (mono_analyze_stack): moved const. folding from x86.brg
157 * x86.brg: CPBLK impl.
159 * emit-x86.c (tree_emit): modified to support 3 nonterminals per
160 rule (used for CPBLK).
162 Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
164 * mono.c: remove generated code from hash when benchmarking/testing
166 * invoke.cs: special case string ctors.
168 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
170 * *.c: code cleanups - tried to separate architecture dependent things.
172 2002-05-23 Martin Baulig <martin@gnome.org>
174 * debug.c (mono_debug_open): Don't call mono_debug_add_image().
175 (mono_debug_write_symbols): Only recreate the symbol file if
178 * debug-private.h (MonoDebugHandle): Added `dirty' flag.
180 * mono.c (main): Call mono_debug_add_image() here.
182 * jit.c (mono_thread_abort): If we have debugging support, call
183 mono_debug_make_symbols() and G_BREAKPOINT().
185 * exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
186 an unhandled exception.
188 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
190 * delegate.c: move the thread pool to metadata/threadpool.c, code
193 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
195 * exception.c (arch_exc_is_catched): impl. MS like exception
196 handling (added a check for unhandled exceptions)
198 2002-05-22 Martin Baulig <martin@gnome.org>
200 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
201 the assembler if necessary, ie. the assembler file is newer than the
202 symbol file or the symbol file does not exist.
204 * debug.c: Added "update_on_exit" argument to recreate the symbol file
207 * debug-dwarf2.c: Produce assembler code which is free of comments and
208 extra whitespaces so that it's suitable for `as -f'.
210 2002-05-22 Martin Baulig <martin@gnome.org>
212 * debug-dwarf2.c (dwarf2_write_section_end): Removed. This is not needed
213 and not supported by all assemblers.
214 (dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
217 * mono.c (--debug): Small fix in the argument parsing.
219 2002-05-22 Martin Baulig <martin@gnome.org>
221 * debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.
223 * mono.c: Applied patch from Miguel:
224 (--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
227 2002-05-21 Martin Baulig <martin@gnome.org>
229 * debug.c (mono_debug_source_location_from_address): Added support for the
232 2002-05-21 Martin Baulig <martin@gnome.org>
234 * debug.c (mono_debug_source_location_from_address): New function.
235 (mono_debug_il_offset_from_address): New function.
237 * exception.c (arch_handle_exception): If we have debugging support, include
238 information about the source location and IL offset in the stack trace.
240 2002-05-21 Dietmar Maurer <dietmar@ximian.com>
242 * jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
245 * x86.brg (stmt): removed unnecessary assertion
247 * jit.c (check_inlining): we cant inline throw instructions
248 (because it breaks some basic block requirements)
250 2002-05-21 Martin Baulig <martin@gnome.org>
252 * debug-private.h (MonoDebugFlags): New enum typedef.
254 * debug.c (mono_debug_open): Added a few useful arguments. See the manpage
257 2002-05-21 Martin Baulig <martin@gnome.org>
259 * debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
260 a `MonoAssembly *' argument instead of a `char *filename' one. Also added
261 `const char **args' argument.
263 * mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
264 `int verbose' argument and made it public.
265 (mono_jit_compile_class): New public function, moved the code to compile
266 all methods in a class here from main().
267 (--compile): The argument can now also be an image (in `@imagename' format).
268 Updated documentation for this command line argument.
269 (--precompile): New command line argument to precompile an image/class/method
270 before executing the main app. This argument can be given multiple times.
271 (--break): Renamed the "--debug" command line argument to "--break".
272 (--debug): New command line argument to specify the debugging format.
273 (--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
274 (--debug-args): New command line argument. This is a comma-separated list of
275 additional arguments for the symbol writer.
276 (usage): Beautified the help text a bit.
278 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
279 public mono_jit_compile_image() function rather than duplication this
282 2002-05-21 Martin Baulig <martin@gnome.org>
284 * debug-dwarf2-plus.c: This is now working again :-)
286 * debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
287 we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
288 one for the fallback MONO_DEBUG_FORMAT_DWARF2.
290 2002-05-21 Martin Baulig <martin@gnome.org>
292 * jit.c (mono_debug_handle): Removed this global variable.
294 * debug.c (mono_debug_close): Removed.
295 (mono_debug_cleanup): New global function.
296 (mono_debug_add_image): New global function.
297 (mono_debug_handle_from_class): New global function.
298 (mono_debug_write_symbols): New global function.
299 (mono_debug_add_type): Removed `MonoDebugHandle *' argument.
300 (mono_debug_add_method): Likewise.
302 2002-05-21 Martin Baulig <martin@gnome.org>
304 Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
305 file for all assemblies. Currently, the JIT doesn't put all methods
306 from a single assembly into a continuous region of memory. We were
307 previously creating valid DWARF 2 files for this, but unfortunately
308 GDB's symbol tables get messed up when it reads more than one such file.
310 * debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
311 `next_idx', `methods', `type_hash', `source_files' and `format'
312 into the MonoDebugHandle.
314 * debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
315 not on the AssemblyDebugInfo.
316 (mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().
318 * debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
319 mono_debug_write_dwarf2().
320 (mono_debug_open_assembly_dwarf2): Removed.
321 (mono_debug_close_assembly_dwarf2): Removed.
323 * debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
324 mono_debug_write_stabs().
325 (mono_debug_open_assembly_stabs): Removed.
326 (mono_debug_close_assembly_stabs).
328 * debug-dwarf2-plus.c: This is currently broken. :-(
330 2002-05-20 Martin Baulig <martin@gnome.org>
332 * debug.h (mono_debug_format): New global variable.
333 (MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.
335 * debug-private.h (MonoDebugHandle): Added `objfiles' field which is
336 a whitespace separated list of symbol files.
337 (AssemblyDebugInfo): Added `objfile' filed which is the name of the
340 * mono.c (main): Pass the assembly file name to mono_debug_open_file().
342 * debug.c (mono_debug_make_symbols): Link all symbol files into a big
343 `<assemblyname>.o' symbol file.
345 2002-05-20 Martin Baulig <martin@gnome.org>
347 * debug.c (debug_load_method_lines): Check whether the assembly file
348 is newer than the IL file and recreate the IL file if necessary.
350 2002-05-20 Miguel de Icaza <miguel@ximian.com>
352 * mono.c Updated copyright years.
354 2002-05-18 Miguel de Icaza <miguel@ximian.com>
356 * mono.c (usage): Relayout command line options.
358 2002-05-17 Dietmar Maurer <dietmar@ximian.com>
360 * x86.brg (reg): fixed array bound check
362 * emit-x86.c (enter_method): print method signature
364 * exception.c (arch_handle_exception): set trace info before we
367 2002-05-16 Dietmar Maurer <dietmar@ximian.com>
369 * jit.c (mono_find_final_block): make it work with mcs
371 * x86.brg: buf fix. if exception variable is allocated to a register.
373 * jit.c (mono_find_final_block): bug fix.
375 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
377 * delegate.c (arch_end_invoke): fix bug #24653, simplified the
378 code using new runtime_invoke feature.
380 * jit.c (mono_analyze_flow): try blocks are followed by handler
381 blocks, so we need to add all handler blocks as succesors.
382 (mono_thread_start_cb): set end_of_stack
384 * exception.c (arch_handle_exception): correctly save/restore caller
387 * emit-x86.c (arch_emit_prologue): correctly save/restore caller
390 * jit.c (mono_cfg_new): allocate space for caller saved registers.
392 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
394 * jit.c: only use one TLS slot to store jit data
396 * exception.c (arch_handle_exception): print function signature,
397 use thread relative end_of_stack
399 2002-05-13 Dietmar Maurer <dietmar@ximian.com>
401 * jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
402 store them as 32 bit integers.
403 (mono_analyze_stack): we need to generate a temporary var for
404 SHL/SHR because the tree allocator can fail otherwise
406 * exception.c (arch_handle_exception): EIP now points to the call
407 instruction, not to the instruction after the call. This fixes the
408 bug reported by Linus Upson (tests/exception8.cs)
410 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
412 * jit.c (mono_analyze_flow): always allocate the forest array
413 (mono_stack_duplicate_used_var): impl.
414 (mono_copy_used_var): impl.
416 * x86.brg: bug fix in SHR/SHL
418 * emit-x86.c (arch_emit_prologue): check if live_in_set != NULL
420 2002-05-11 Sergey Chaban <serge@wildwestsoftware.com>
422 * mono.c: new --fast-iconv command line option
423 to enable fast FP-to-integer conversion code.
424 * jit.c, jit.h: added global variable to store state
425 for the above option. This optimization is disabled
427 * x86.brg: added code to emit fast FP-to-integer
428 conversion sequences.
430 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
432 * emit-x86.c: simple definite assignment analysis optimization for
433 uninitialized locals.
435 Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
437 * x86.brg, emit-x86.c: patch the branch targets with x86_patch().
439 2002-05-10 Dietmar Maurer <dietmar@ximian.com>
441 * linear-scan.c (mono_update_gen_set): improvement/bug fix
443 * x86.brg: added additional rules to handle global allocated registers
445 * mono.c (usage): the option is called --nols, and it dissables
448 * x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8
450 2002-05-09 Dietmar Maurer <dietmar@ximian.com>
452 * linear-scan.c: linear scan reg. allocation and data flow analysis
453 use Paolo's great bitset implementation.
455 * jit.c (arch_allocate_var): add live range info
456 (mono_cfg_add_successor): create list of successors for basic
459 * mono.c (main): new option --ls to enable linear scan
461 * exception.c (arch_handle_exception): print instruction pointer
462 relative to method start address.
464 * jit.c (mono_print_ctree): print register number if locals are
465 allocate in registers.
467 * emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
468 (arch_emit_epilogue): take care when restoring save registers,
469 because the stack pointer may has changed.
471 * x86.brg: s/VAROFFSET/VARINFO/
472 modified to support global register allocation
474 Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
476 * jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.
478 2002-05-03 Sergey Chaban <serge@wildwestsoftware.com>
480 * x86.brg: more coni4 optimizations
481 MUL: generate optimized code for some consts other
482 than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
483 DIV_UN: multiply with reciprocal instead of dividing;
485 2002-05-03 Dietmar Maurer <dietmar@ximian.com>
487 * x86.brg: use VAROFFSET macro
489 * emit-x86.c (tree_emit): allocate space for spilled regs in
490 activation frame instead of pushing them to the stack.
492 * x86.brg: replace BXX with CBRANCH/COMPARE
493 replaced CXX CSET/COMPARE
495 * emit-x86.c (arch_allocate_regs): improved register allocation
497 2002-05-02 Dietmar Maurer <dietmar@ximian.com>
499 * delegate.c (mono_delegate_cleanup): signal semaphore in order to
502 2002-04-30 Dick Porter <dick@ximian.com>
504 * mono.c (main): Tell glib to not abort when g_log() etc print
507 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
509 * x86.brg: opt. LDELEMA impl.
510 (MUL) use shift when possible.
511 (DIV) use shift when possible.
512 impl. various opt. with coni4
514 * exception.c (arch_handle_exception): use ctx->SC_EBP in
515 end_of_stack check as suggested by Linus Upson <linus@linus.com>
517 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
519 * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.
521 * exception.c: included the Freebsd patch from Sandro Tolaini
522 <sandro@focuseek.com>
524 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
526 * mono.c, jit.c: use mono_runtime_run_main ().
528 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
530 * jit.c (mono_analyze_stack): dont call methods on Object with
531 METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
533 * x86.brg: added more CONV_U rules
535 * jit.c (mono_analyze_stack): avoid recursive call of virtual
536 methods: fixes Bug #23778
537 (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
539 * exception.c (arch_handle_exception): only g_assert(cleanup) if
542 2002-04-27 Patrik Torstensson <patrik.torstensson@intel.com>
544 * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
546 2002-04-27 Martin Baulig <martin@gnome.org>
548 * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
549 there's already `epilog' so we don't need `epilogue_begin'.
551 * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
552 size of the method's code.
554 2002-04-25 Martin Baulig <martin@gnome.org>
556 * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
559 2002-04-25 Dietmar Maurer <dietmar@ximian.com>
561 * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
562 added CONV_OVF_I4 (fix bug #23808)
564 2002-04-23 Dietmar Maurer <dietmar@ximian.com>
566 * x86.brg: code cleanup - use x86_patch ()
568 * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
569 (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
571 * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
572 because it slows down performance.
574 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
576 * emit-x86.c: enter_method handles 8-byte aligned parameters.
578 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
580 * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
583 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
585 * jit.c (check_inlining): added statistics about inlineing
587 * mono.c (usage): new switch --noinline to disable inlining
589 * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
590 inline methods (to keep semantics)
592 * x86.brg: added constant folding for inegers
594 * emit-x86.c (tree_allocate_regs): handle the special case when
595 chain rules need a register.
597 2002-04-19 Dietmar Maurer <dietmar@ximian.com>
599 * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
601 * jit.c (check_inlining): better inlining support
603 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
605 * x86.brg: LDLEN uses max_length instead of bounds[0]
606 * jit.c: support for new szarray format
608 2002-04-18 Dietmar Maurer <dietmar@ximian.com>
610 * jit.c (check_inlining): added inlining support
612 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
614 * x86.brg: optimized version of castclass and isinst
616 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
618 * emit-x86.c, invoke.c: track time spent compiling.
620 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
622 * emit-x86.c, invoke.c: call profile callbacks if needed.
623 * jit.c, jit.h, mono.c: add --profile command line option.
625 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
627 * jit.h: included mono/io-layer/io-layer.h to avoid breaking
628 compilation under windows when upgrading mingw and w32api to
629 version 1.3 (thanks Dick!).
631 2002-04-15 Patrik Torstensson <patrik.torstensson@labs2.com>
633 * jit.c: changed the array icalls to use full names
635 2002-04-15 Dietmar Maurer <dietmar@ximian.com>
637 * x86.brg: check the this pointer before calling
638 non-virtual functions
640 * emit-x86.c (arch_emit_prologue): initialize local vars.
642 * x86.brg: removed incredible clumsy code
644 2002-04-13 Martin Baulig <martin@gnome.org>
646 * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
647 the location of a variable.
648 (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
649 instead of a stack offset and use dwarf2_write_variable_location() to write
652 2002-04-13 Martin Baulig <martin@gnome.org>
654 * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
657 2002-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
659 * Makefile.am: use of the new '-s' option in monoburg.
661 2002-04-12 Martin Baulig <martin@gnome.org>
663 * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
666 2002-04-10 Sergey Chaban <serge@wildwestsoftware.com>
667 * win32-exception: added Win32 SEH exception filter that translates
668 CONTEXT to sigcontext;
670 * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
671 in a platfrom-dependent way;
673 * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
674 and avoid io-layer includes;
676 * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
679 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
681 * delegate.c (arch_end_invoke): restore output arguments
683 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
685 * jit.c: call mono_runtime_init ().
687 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
689 * jit.c (mono_jit_cleanup): added more statistics
691 * invoke.c (arch_create_native_wrapper): special case EndInvoke -
692 we need to pass the MonoMethod pointer as first argument.
694 * delegate.c (mono_async_invoke): notify all listeners, not only a
696 (arch_end_invoke): we now pass a MonoMethod as first parameter and
697 use arch_method_call_message_new() to access the stack.
698 (arch_end_invoke): wait until we really finished processing
699 (async_invoke_abort): notify all listeners, not only a
702 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
704 * message.c (arch_return_value): impl.
705 (arch_method_return_message_restore): consider delegate BeginInvoke
707 * jit.c: removed jit_exec_main()
709 * delegate.c (arch_begin_invoke): use the message builder to make
710 it architecture independent - still needs more cleanup.
712 2002-04-05 Dietmar Maurer <dietmar@ximian.com>
714 * delegate.c (mono_delegate_ctor): support for transparent proxy
716 * x86.brg (freg): bug fix in CONV_R* opcodes
718 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
720 * message.c: added documentation
722 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
724 * mono.c (main): use --trace instead of --trace-calls
726 * x86.brg: impl. REMOTE_STIND_XX
728 * message.c (mono_store_remote_field): impl.
730 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
732 * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
734 * message.c (mono_load_remote_field): impl.
736 * jit.c (mono_analyze_stack): only call marshalbyref methods
738 (mono_analyze_stack): consider marshalbyref objects in LDFLD
740 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
742 * x86.brg: kill pointer arithmetric.
744 2002-03-28 Martin Baulig <martin@gnome.org>
746 * jit.c (mono_debug_insert_breakpoint): New global variable.
747 (mono_debug_last_breakpoint_address): New global variable.
749 * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
750 non-zero, insert a breakpoint; if it's positive, decrement it when done.
751 Set `mono_debug_last_breakpoint_address' to the address of the last inserted
754 * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
755 `mono_debug_last_breakpoint_address', also documented them here.
757 2002-03-28 Martin Baulig <martin@gnome.org>
759 * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
760 (AssemblyDebugInfo): Added `format'.
762 * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
763 this allows us choose the format on a per-assembly basis.
764 (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
765 to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
767 (debug_generate_method_lines): Generate correct IL offsets.
769 2002-03-28 Martin Baulig <martin@gnome.org>
771 * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
773 * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
775 * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
776 `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
778 * debug.c (debug_generate_method_lines): Don't return if we don't have line
779 numbers, we still need to generate the IL offsets here. Emit line numbers
780 for `prologue_end_offset' (the first line of actual code) and
781 `epilogue_begin_offset' (the line of the method's closing brace).
782 Don't crash if cfg->bblocks [i].forest is NULL.
783 (mono_debug_add_method): Don't crash if we don't have line numbers.
784 Initialize the newly added fields.
786 * debug-stabs.c: Record first and last line, emit filename info at the
787 beginning of the stab file, gdb ignores the types otherwise.
789 * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
790 emit line number info for the first and last line.
792 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
794 * invoke.c (arch_create_delegate_trampoline): impl.
796 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
798 * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
799 with the jit runtime to easy embedding. main() is moved to mono.c, now.
800 * jit.c: use opcode names from libmetadata.
801 * debug.h, debug.c: constify char* argument.
803 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
805 * jit.c: catching SIGSEGV again, added proxy support
807 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
809 * delegate.c (mono_delegate_init): remove unused worker threads
811 2002-03-27 Mike Kestner <mkestner@speakeasy.net>
813 * delegate.c (arch_get_delegate_invoke): malloc a bigger area
815 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
817 * jit.c: remove glib mem vtable code.
819 2002-03-26 Martin Baulig <martin@gnome.org>
821 * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
822 lines if we don't have line number information.
823 (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
826 * debug-stabs.c (write_method_stabs): Don't generate method lines if
827 we don't have line number information. Use `minfo->method_info.this_offset'
828 instead of hardcoding 8.
830 * debug.c (debug_generate_method_lines): Don't crash if we don't have
831 line number information.
832 (mono_debug_open_assembly): Don't generate line numbers for
833 MONO_DEBUG_FORMAT_DWARF2_PLUS.
834 (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
835 but it in the new `this_offset' field.
837 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
839 * debug.c (debug_generate_method_lines): Use correct addresses for
842 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
844 * jit.c: do not set the glib mem vtable anymore.
845 * Makefile.am: link to libmonoutils.
847 2002-03-25 Martin Baulig <martin@gnome.org>
849 * debug.h (mono_debug_make_symbols): Documented this function.
851 2002-03-24 Martin Baulig <martin@gnome.org>
853 * debug.c (mono_debug_add_method): Include the `this' offset in
854 the `minfo->method_info.param_offsets' array.
856 2002-03-23 Martin Baulig <martin@gnome.org>
858 * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
859 to do it before the X86_CMP.
860 (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
861 (reg: CLT (lreg, lreg)): Likewise.
862 (reg: CLT_UN (lreg, lreg)): Likewise.
863 (reg: CLT_UN (lreg, lreg)): Likewise.
864 (reg: CGT (lreg, lreg)): Likewise.
865 (reg: CGT (lreg, lreg)): Likewise.
866 (reg: CGT_UN (lreg, lreg)): Likewise.
867 (reg: CGT_UN (lreg, lreg)): Likewise.
869 2002-03-23 Martin Baulig <martin@gnome.org>
871 * debug-private.h (AssemblyDebugInfo): Added `_priv'.
873 * debug-dwarf2-plus.c
874 (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
875 (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
876 (mono_debug_write_assembly_dwarf2_plus): Only call
877 mono_debug_update_symbol_file() here.
879 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
881 * jit.c: inter strings before executing a method.
882 Do not intern command line arguments anymore.
884 2002-03-21 Martin Baulig <martin@gnome.org>
886 * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
888 * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
889 been created by MCS and fills in all machine dependent stuff.
891 * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
892 removed everything which is already in MonoDebugMethodInfo.
894 * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
895 (mono_debug_make_symbols): Don't open the file or call as, this is done in the
898 * jit.c (main): Added "--dwarf-plus" command line option to use the new
899 MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
901 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
903 * jit.c (usage): new option to specify maximum number of worker threads
904 (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
906 * delegate.c (async_invoke_abort): added support for asynchronous exceptions
907 (arch_get_async_invoke): notify listeners before we call the
908 asynchronous callback
910 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
912 * delegate.c (async_invoke_thread): support for domains
913 (async_invoke_thread): create workers only when needed
915 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
917 * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
919 2002-03-18 Dietmar Maurer <dietmar@ximian.com>
921 * x86.brg: impl. lreg: XOR (lreg, lreg)
922 impl. REM (freg, freg)
924 2002-03-17 Martin Baulig <martin@gnome.org>
926 * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
929 * debug-dwarf2.c: Added support for strings and arrays.
931 2002-03-17 Martin Baulig <martin@gnome.org>
933 * debug.c (mono_debug_get_type): Recursively call this for all function members
935 (mono_debug_add_method): Don't mangle function names, this must be done by the
936 debugger backend if the debugging format needs mangled names.
938 * debug-dwarf2.c: Improved support for classes, added member functions.
940 2002-03-16 Martin Baulig <martin@gnome.org>
942 * debug.c (mono_debug_get_type): Recursively call this for all members and
943 parent classes of a class type.
945 * debug-dwarf2.c: Added basic support for classes. Set source language to C++
946 since GDB doesn't like Java very much.
948 2002-03-16 Martin Baulig <martin@gnome.org>
950 * debug-dwarf2.c: Added support for enums.
952 2002-03-15 Martin Baulig <martin@gnome.org>
954 * debug.c (mono_debug_get_type): Recursively call this for all members
957 * debug-dwarf2.c: Added support for structs.
959 2002-03-15 Dietmar Maurer <dietmar@ximian.com>
961 * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
962 to new MonoLMF layout
964 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
966 * emit-x86.c (arch_create_native_wrapper): new code to generate
967 wrappers for calling native functions.
968 (arch_create_native_wrapper): free allocated strings
969 (arch_handle_exception): made mono_jit_info_table domain dependent
971 2002-03-14 Martin Baulig <martin@gnome.org>
973 * debug.c (MonoDebugFormat): New public enums specifying which debugging
975 (mono_debug_open_file): Added MonoDebugFormat argument.
976 (mono_debug_make_symbols): Don't take an argument to make it easier to call
977 this function from GDB. It's now safe to call this function multiple times;
978 it'll always write a complete debugging file.
980 * debug.c: Splitted this file into a general part which remains in this file
981 and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
982 All public functions now call a corresponding format specific function.
984 * debug.c: The following changes are private to debug.c:
985 (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
986 (record_line_number, debug_generate_method_lines): New private functions.
987 (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
988 calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
989 mono_debug_open_assembly_dwarf2).
990 (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
991 now safe to call this function multiple times.
992 (mono_debug_get_type): New public function. This takes a `MonoClass *' and
993 returns an unique index for this type. It's used to ensure that we only write
994 each class once to the debugging file.
995 (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
996 data structure, but don't directly write to the debugging file. This is done
997 later from mono_debug_write_assembly().
999 * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
1000 debugging output. Call mono_debug_close() on cleanup if necessary.
1002 2002-03-14 Martin Baulig <martin@gnome.org>
1004 * debug-private.h: New private header file.
1006 * debug-stabs.c: Added the stabs type generation stuff which was
1007 previously in debug.c.
1009 * debug-dwarf.c: Started to implement type support. We're currently
1010 only writing this most basic types to the dwarf file, but this will
1013 2002-03-13 Martin Baulig <martin@gnome.org>
1015 * debug-stabs.c, debug-dwarf2.c: New files containing my new
1016 debugging code. They're now in CVS, but not yet used anywhere.
1018 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
1020 * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
1021 macros, included new delegate code from Daniel Stodden.
1024 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
1026 * jit.c: verify that corlib and runtime are in sync.
1028 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
1030 * emit-x86.c, jit.c: use the debug-helpers facilities to
1031 describe and match a method when debugging.
1033 2002-03-10 Martin Baulig <martin@gnome.org>
1035 * emit-x86.c (arch_compile_method): When emitting stabs debugging
1036 output, put a nop instruction at the start of all functions so that
1037 the adresses won't change when using --debug.
1039 * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
1040 the bytecode area, stabs needs a line number in the .il file. Use the
1041 new info->moffsets to get the line number.
1042 (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
1043 `moffsets' is an array of `total_lines' fields (total number of lines
1044 in the .il file); for each line in the .il field, this array contains
1045 the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
1046 of a method and 0 otherwise.
1047 (debug_load_method_lines): Read the whole .il file and initialize the
1048 info->moffsets field.
1050 2002-03-09 Martin Baulig <martin@gnome.org>
1052 * x86.brg (DIV_UN): Clear EDX before performing the division and remove
1053 the unnecessary CDQ instruction.
1055 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1057 * jit.c (mono_analyze_stack): only load addresses of value types
1058 on the runtime stack.
1060 2002-03-07 Duncan Mak <duncan@ximian.com>
1062 * Makefile.am: A small patch fixing errors in vpath-based builds
1063 (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
1064 committed for Daniel Stodden <stodden@in.tum.de>.
1066 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1068 * jit.c: Boehm-GC enable.
1070 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1072 * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
1073 realloc that code sometimes!
1075 * emit-x86.c (mono_compute_branches): support several types of
1078 2002-03-06 Dietmar Maurer <dietmar@ximian.com>
1080 * x86.brg: impl. MUL_OVF_UN (reg, reg)
1082 * jit.c (mono_find_final_block): find correct finally handler.
1084 * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
1085 caller saved registers.
1087 2002-03-05 Dietmar Maurer <dietmar@ximian.com>
1089 * x86.brg: use x86_widen_reg for CONV opcodes
1091 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
1093 * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
1095 * emit-x86.c (arch_handle_exception): big fix - dont use
1096 uninitialized next_bp
1097 (arch_compile_method): make the jit thread save
1098 (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
1099 to avoid need of recursive mutexes
1101 * x86.brg: use new mono_assert macros
1103 2002-02-28 Dietmar Maurer <dietmar@ximian.com>
1105 * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
1106 calling into unmanaged code (arch_compile_method).
1108 * x86.brg: impl. CONV_I4 (freg) with correct rounding
1109 (lreg): impl CALL_I8(INTF_ADDR)
1110 impl. CONV_R_UN (reg)
1113 2002-02-27 Dietmar Maurer <dietmar@ximian.com>
1115 * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
1117 2002-02-26 Dietmar Maurer <dietmar@ximian.com>
1119 * x86.brg: bug fix in CLT(lreg,lreg)
1120 (reg): bug fix in CONV_OVF_I4(lreg)
1121 (lreg): replaced x86_call_reg with x86_call_code
1123 * emit-x86.c (mono_add_jump_info): impl.
1124 (mono_compute_branches): patch real jump address (instead of
1125 emitting code twice)
1127 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1129 * x86.brg: optimize cmp reg,0 -> test reg.
1131 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1133 * jit.h, jit.c, emit-x86.c: Added a few statistics counters
1134 and the --stats command line option to print them.
1135 Fixed memory leak in arch_compile_method () when a method's code is
1136 found in the cache. Fix magic trampoline to deal with static calls.
1138 2002-02-21 Dietmar Maurer <dietmar@ximian.com>
1140 * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN
1142 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
1144 * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
1145 (arch_create_jit_trampoline): cache trampoline code
1147 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1149 * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
1151 (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
1153 * x86.brg: do not encode exception objects into the instruction
1154 stream, because they are domain dependend. Use
1155 arch_get_throw_exception_by_name() instead;
1157 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1159 * jit.c: intern command line arguments.
1161 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1163 * jit.c (mono_analyze_stack): use the magic trampoline for all
1164 calls (since we cant store the address of compiled code in
1166 (mono_analyze_stack): imp. LDSTR for shared code
1168 * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
1169 (arch_compile_method): add a cache for compiled methods to avoid
1170 recompilation. dont use method->addr to store domain dependent
1173 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1175 * x86.brg: impl. BLE,BGT for freg
1177 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1179 * emit-x86.c: handle unreachable code. Eliminate some unneeded
1181 * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
1182 main(). Add --compile classname and --ncompile num command line
1183 options to do performance evaluation of the jitter (and help
1186 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1188 * emit-x86.c (arch_compile_method): bug fix in static delegate
1191 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
1193 * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
1195 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
1197 * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
1199 2002-02-13 Miguel de Icaza <miguel@ximian.com>
1201 * jit.c (arch_allocate_var): Only assert that the alignment is
1202 at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
1204 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1206 * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
1208 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1210 * emit-x86.c: make x86_magic_trampoline() handle call instructions
1211 with an imm8 displacement. x86.brg not yet changed to take advantage
1214 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1216 * jit.c: use opcode info from libmetadata to do flow analysis
1219 2002-02-06 Dietmar Maurer <dietmar@ximian.com>
1221 * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking
1223 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
1225 * x86.brg: use element_class for type check
1227 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
1229 * jit.c (main): impl. __array_Address icall
1231 * mempool.c (mono_mempool_alloc): handle large block allocation
1233 2002-02-01 Dietmar Maurer <dietmar@ximian.com>
1235 * x86.brg: impl. SHL/SHR/CLT for 64 bit values
1237 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
1239 * x86.brg: impl. CEQ(lreg,lreg)
1241 * jit.c (mono_analyze_stack): impl. LDVIRTFTN
1242 (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
1244 * x86.brg: removed some dead code.
1246 2002-01-18 Dietmar Maurer <dietmar@ximian.com>
1248 * jit.c (arch_allocate_var): fixed alignment bugs
1250 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
1252 * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
1254 2002-01-16 Dietmar Maurer <dietmar@ximian.com>
1256 * jit.c (main): install the trampoline before we start to create
1259 * x86.brg: impl. CLT_UN, CGT_UN
1261 * emit-x86.c (leave_method): added check for null object
1262 (enter_method): consider byref arguments
1264 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
1266 * x86.brg: bug fix in CONV_OVF_I1_UN
1267 impl. ADD_OVF, MUL_OVF
1268 impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
1269 (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
1270 (EMIT_COND_EXCEPTION): added signed flag
1272 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
1274 * jit.c: implement stloc, ldloc, ldloca.
1276 2002-01-11 Dietmar Maurer <dietmar@ximian.com>
1278 * jit.c (mono_analyze_stack): fixed calculation of last_instr
1280 * x86.brg (LDLEN): emit null_reference exception
1282 (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
1284 2002-01-04 Dietmar Maurer <dietmar@ximian.com>
1286 * x86.brg: bug fix in CASTCLASS
1288 2001-12-21 Dietmar Maurer <dietmar@ximian.com>
1290 * jit.c (mono_analyze_stack): spill MUL to avoid problem with
1291 register allocation.
1293 * emit-x86.c (arch_compile_method): fixed static delegate bug
1295 2001-12-16 Miguel de Icaza <miguel@ximian.com>
1297 * x86.brg, jit.c: Split up the nodes that we used to share on
1298 CONV_OVF. They were sharing the nodes because they are the same
1299 on 32-bit machines, but on 64-bit machines you need different
1302 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
1304 * x86.brg: removed prerequisite that (tree->left->reg1 <
1305 tree->right->reg1) to make register allocation easier.
1307 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
1309 * emit-x86.c (arch_handle_exception): new code to handle
1310 exceptions inside unmanaged code.
1312 * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
1313 address as first argument.
1315 2001-12-15 Dietmar Maurer <dietmar@ximian.com>
1317 * x86.brg: pass exceptions on the stack
1319 * jit.h (ISSTRUCT): new macro to check for real value types
1320 (return false for enum types).
1322 2001-12-11 Dietmar Maurer <dietmar@ximian.com>
1324 * x86.brg: use position indepentent code if possible.
1326 * x86.brg (EMIT_COND_EXCEPTION): new macro.
1328 * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
1330 2001-12-10 Dietmar Maurer <dietmar@ximian.com>
1332 * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
1334 (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
1336 * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
1338 2001-12-07 Dietmar Maurer <dietmar@ximian.com>
1340 * jit.c (mono_allocate_intvar): bug fix.
1342 * emit-x86.c (get_unbox_trampoline): impl.
1344 * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
1346 2001-12-06 Dietmar Maurer <dietmar@ximian.com>
1348 * x86.brg: raise exceptions.
1350 2001-12-05 Dietmar Maurer <dietmar@ximian.com>
1352 * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
1355 2001-12-06 Miguel de Icaza <miguel@ximian.com>
1357 * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
1358 CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
1359 CONV.OVF.I2.UN, CONV.OVF.I8.UN
1361 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
1363 * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
1364 removed the locaddr nonterminal, reimplemented value types
1366 * jit.c: reimplemented value type support, better support for
1369 2001-12-03 Miguel de Icaza <miguel@ximian.com>
1371 * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
1374 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
1376 * jit.c: call mono_init() after registering internal calls.
1378 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
1380 * emit-x86.c (tree_preallocate_regs): improved register allocation
1382 * x86.brg: impl. ISINST, CASTCLASS
1384 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
1386 * x86.brg: rearrange fields to reduce struct size.
1387 * jit.c: use signature->param_count, not signature->params_size.
1388 * debug.c: off-by-one error fix.
1390 2001-11-29 Radek Doulik <rodo@ximian.com>
1392 * Makefile.am: build mono only for X86 architecture, compilation
1393 fails for ppc now because of accessing registers in sigcontext
1396 2001-11-29 Dietmar Maurer <dietmar@ximian.com>
1398 * jit.c (mono_analyze_stack): bug fix in DUP
1400 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
1402 * debug.c: fix type handling. Position function position at start of
1403 IL code. Output more fine-grained stepping information.
1405 2001-11-28 Dietmar Maurer <dietmar@ximian.com>
1407 * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
1409 * jit.c (mono_analyze_stack): record the cli_address for later use
1411 (sigsegv_signal_handler): translate sigsegv into "Internal error"
1414 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
1416 * debug.c, debug.h: added support for generating stabs.
1417 Stabs can be compiled with as and the resulting object file can be
1418 loaded in a gdb session with add-symbol-file object.o.
1419 * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
1420 where locals and arguments are stored in the stack. Add support for
1421 passing command line arguments to CLR programs.
1422 * emit-x86.c: insert a breakpoint at method invocation if needed.
1424 2001-11-27 Dietmar Maurer <dietmar@ximian.com>
1426 * jit.c: exception support
1428 * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
1431 2001-11-26 Dick Porter <dick@ximian.com>
1433 * Makefile.am (mono_LDADD): Add io-layer library
1435 2001-11-19 Dietmar Maurer <dietmar@ximian.com>
1437 * jit.c (mono_analyze_stack): impl. LDFTN
1438 (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
1439 make register allocation easier on x86
1441 * emit-x86.c (enter_method): more debugging output for Strings
1442 (arch_compile_method): added delegate support
1443 (arch_compile_method): align EBP to 8 byte boundary
1445 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
1447 * jit.c: use mono_install_trampoline (), instead of exporting
1448 a function to a lower-level library.
1450 2001-11-16 Dietmar Maurer <dietmar@ximian.com>
1452 * x86.brg (STRING_ARG): impl. a way to marshal strings. This
1453 will be extensible to handle all possible kinds of marshalling
1456 * jit.c (map_call_type): added MB_TERM_CALL_VOID
1457 (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
1458 instructions to handle this arguments more effectively.
1460 2001-11-15 Dietmar Maurer <dietmar@ximian.com>
1462 * Makefile.am (mono_SOURCES): renamed testjit to mono
1464 * x86.brg: added debugging support
1466 * testjit.c: added support for value types, CFG improvements
1468 * emit-x86.c (enter_method): handle value types
1469 (tree_allocate_regs): impl. a better way to handle chain rules
1471 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
1473 * x86.brg (INITOBJ): bug fix: initialize data before use,
1474 simplified the code.
1476 2001-11-09 Miguel de Icaza <miguel@ximian.com>
1478 * testjit.c (mono_analyze_stack): Remove compiler warning by
1479 testing against NULL.
1481 2001-11-09 Dick Porter <dick@ximian.com>
1483 * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
1485 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
1487 * testjit.c (mono_analyze_stack): new BOX impl.
1489 * x86.brg: implemented INITOBJ
1491 * testjit.c (mono_analyze_stack): finished array support
1492 (mono_analyze_stack): reimplemented DUP instruction
1494 2001-11-08 Dietmar Maurer <dietmar@ximian.com>
1496 * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
1497 represents the address of the element. This way we can emit highly
1498 optimized x86 instructions to access elements (using base+index+offset
1501 2001-11-07 Miguel de Icaza <miguel@ximian.com>
1503 * mempool.c: Include string.h to kill warning.
1505 * testjit.c: Add typecast to kill warning.
1507 * x86.brg: Include string.h to eliminate warning.
1509 * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
1512 2001-11-07 Dietmar Maurer <dietmar@ximian.com>
1514 * emit-x86.c (enter_method): print out all method arguments
1515 (x86_magic_trampoline): impl.
1516 (arch_create_simple_jit_trampoline): we use different trampolines
1517 for static methods (no need to write the address back into to
1520 2001-11-06 Dietmar Maurer <dietmar@ximian.com>
1522 * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
1523 use less the 16 bytes.
1525 * x86.brg: code cleanup
1527 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
1529 * testjit.c: bug fixes.
1531 * emit-x86.c (leave_method): print result values
1533 2001-11-03 Dietmar Maurer <dietmar@ximian.com>
1535 * emit-x86.c (enter_method): new debugging code
1536 (leave_method): new debbuging code, this functions are called
1537 when you use the new option --trace-calls
1539 2001-11-02 Dietmar Maurer <dietmar@ximian.com>
1541 * testjit.c: impl. STELEM_XX, STELEM_XX
1543 * x86.brg: impl. LDLEN, LDELEMA
1546 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
1548 * x86.brg: added some experimental code for CALL
1549 instructions - still not found the optimal way to do it.
1551 * testjit.c (map_stind_type): add support for value types with
1552 a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
1553 CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
1554 (ctree_create_newobj): impl.
1557 * emit-x86.c (tree_allocate_regs): removed allocation code for
1559 (get_address): use a simple, but bug free search instead of the
1560 buggy binary search.
1562 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
1564 * testjit.c: support virtual functions
1566 * x86.brg: support different addressing modes for calls
1568 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
1570 * testjit.c: impl. STFLD
1572 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
1574 * x86.brg: impl. CEQ
1576 2001-10-04 Dick Porter <dick@ximian.com>
1579 * emit-x86.c: include mono-endian.h not endian.h
1581 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
1583 * testjit.c (ctree_create_dup): really duplicate the tree.
1584 attach the arguments to the CALL node. Added a new macro to
1585 make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
1587 2001-10-01 Dietmar Maurer <dietmar@ximian.com>
1589 * interp.brg: the burm based interpreter: added the file as example.
1591 2001-09-27 Dietmar Maurer <dietmar@ximian.com>
1595 * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
1597 (map_stind_type): support enum types
1598 (map_ldind_type): support enum types
1600 * emit-x86.c (tree_allocate_regs): added code to support
1601 register allocation for addressing modes trees.
1602 (tree_emit): bug fix: we have to emit all mono_burg_functins. The
1603 previous impl. did not work for chain rules.
1604 (compute_branches): support for SWITCH statements
1606 * x86.brg: added rules to model x86 addressing modes
1608 2001-09-26 Dietmar Maurer <dietmar@ximian.com>
1610 * emit-x86.c (compute_branches): implemented SWITCH
1612 * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
1613 (map_ldind_type): add enumeration types.
1614 (map_stind_type): add enumeration types.
1616 * emit-x86.c (arch_compile_method): more documentation.
1618 * testjit.c: moved the architecture specific things to emit-x86.c
1619 and x86.brg. Added more documentation. code cleanup.
1621 2001-09-25 Dietmar Maurer <dietmar@ximian.com>
1623 * x86.brg: we now have different types of addresses: ADDR_L for local
1624 values, ADDR_A for arguments and ADDR_G for global addresses. We
1625 also use LDIND_XX token to load values from a specific address
1626 instead of LDLOC/STLOC.
1628 * testjit.c: use the new adressing scheme everywhere:
1629 LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)
1631 2001-09-24 Dietmar Maurer <dietmar@ximian.com>
1633 * testjit.c (main): fix bug in parameter parsing
1635 * x86.brg: impl. more opcodes
1637 2001-09-23 Dick Porter <dick@ximian.com>
1639 * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
1641 2001-09-23 Dietmar Maurer <dietmar@ximian.com>
1643 * testjit.c: use the memory pool to avoid memory leaks
1645 2001-09-22 Dietmar Maurer <dietmar@ximian.com>
1647 * x86.brg: increment the stack pointer after function calls
1649 2001-09-21 Dick Porter <dick@ximian.com>
1651 * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
1653 2001-09-21 Dietmar Maurer <dietmar@ximian.com>
1655 * x86.brg: implemented long MUL/DIV
1656 (MB_OPT_LEVEL): define optimisation level macro
1658 * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
1659 for operations like idiv. it is also possible to assign specific registers.
1661 2001-09-20 Dietmar Maurer <dietmar@ximian.com>
1663 * x86.brg: added basic support for long
1665 * testjit.c (mono_compile_method): implemented POP
1667 2001-09-19 Miguel de Icaza <miguel@ximian.com>
1669 * testjit.c (usage): Added a couple of more usage options.
1671 2001-09-19 Dietmar Maurer <dietmar@ximian.com>
1673 * x86.brg: added more floating point grammar
1675 * testjit.c (mono_compile_method): make local offsets negative
1677 * x86.brg: added some floating point trees
1679 * testjit.c (mono_compile_method): arguments on the runtime
1680 stack are at least 4 bytes
1682 * x86.brg: partly implemented 8,16 bit integers
1684 * testjit.c (get_address): mark basic blocks
1686 2001-09-18 Dietmar Maurer <dietmar@ximian.com>
1688 * x86.brg: added some rules to optimize code
1690 * testjit.c (get_address): use a binary search to get the address
1691 (main): added an option to debug the jit (-d)
1693 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
1695 * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
1697 2001-09-17 Miguel de Icaza <miguel@ximian.com>
1699 * testjit.c (mono_compile_method): Provide better error reporting.
1701 2001-09-17 Dietmar Maurer <dietmar@ximian.com>
1703 * testjit.c (tree_get_address): impl. to fix address bug
1704 (tree_get_address): make sure that we can only jump to the first
1705 instruction of a tree.
1707 * x86.brg: emit real code for calls
1709 * testjit.c (create_jit_trampoline): creates a function to trigger jit
1711 (mono_compile_method): reversed argument order
1713 2001-09-15 Dietmar Maurer <dietmar@ximian.com>
1715 * x86.brg (stmt): don't emit unnecessary register moves
1717 * testjit.c (tree_allocate_regs): free registers earlier
1719 2001-09-14 Dietmar Maurer <dietmar@ximian.com>
1721 * x86.brg: branch addresses are now resolved
1723 * testjit.c (compute_branches): compute address of branches
1725 * x86.brg: emit real x86 instructions
1727 * testjit.c: call objdump to disassemble the output
1729 2001-09-13 Dietmar Maurer <dietmar@ximian.com>
1731 * x86.brg: use the right offsets to access local variables
1734 * emit-x86.c: only save/restore callee saved registers if they are
1737 * testjit.c (tree_allocate_regs): use the new MonoRegSet to
1739 (mono_compile_method): changed the tree for mothod calls
1746 2001-09-10 Miguel de Icaza <miguel@ximian.com>
1748 * x86.brg: Use Unix assembly syntax.
1750 * emit-x86.c: support code, should be moved
1752 * testjit.c: Use GPtrArrays instead of GLists, as those are very
1753 inefficient at appends.
1755 * Renamed `create_new_leave' to `create_new_leaf'