1 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
3 * exception.c (arch_handle_exception): use ctx->SC_EBP in
4 end_of_stack check as suggested by Linus Upson <linus@linus.com>
6 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
8 * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.
10 * exception.c: included the Freebsd patch from Sandro Tolaini
13 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15 * mono.c, jit.c: use mono_runtime_run_main ().
17 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
19 * jit.c (mono_analyze_stack): dont call methods on Object with
20 METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
22 * x86.brg: added more CONV_U rules
24 * jit.c (mono_analyze_stack): avoid recursive call of virtual
25 methods: fixes Bug #23778
26 (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
28 * exception.c (arch_handle_exception): only g_assert(cleanup) if
31 2002-04-27 Patrik Torstensson <patrik.torstensson@intel.com>
33 * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
35 2002-04-27 Martin Baulig <martin@gnome.org>
37 * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
38 there's already `epilog' so we don't need `epilogue_begin'.
40 * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
41 size of the method's code.
43 2002-04-25 Martin Baulig <martin@gnome.org>
45 * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
48 2002-04-25 Dietmar Maurer <dietmar@ximian.com>
50 * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
51 added CONV_OVF_I4 (fix bug #23808)
53 2002-04-23 Dietmar Maurer <dietmar@ximian.com>
55 * x86.brg: code cleanup - use x86_patch ()
57 * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
58 (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
60 * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
61 because it slows down performance.
63 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
65 * emit-x86.c: enter_method handles 8-byte aligned parameters.
67 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
69 * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
72 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
74 * jit.c (check_inlining): added statistics about inlineing
76 * mono.c (usage): new switch --noinline to disable inlining
78 * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
79 inline methods (to keep semantics)
81 * x86.brg: added constant folding for inegers
83 * emit-x86.c (tree_allocate_regs): handle the special case when
84 chain rules need a register.
86 2002-04-19 Dietmar Maurer <dietmar@ximian.com>
88 * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
90 * jit.c (check_inlining): better inlining support
92 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
94 * x86.brg: LDLEN uses max_length instead of bounds[0]
95 * jit.c: support for new szarray format
97 2002-04-18 Dietmar Maurer <dietmar@ximian.com>
99 * jit.c (check_inlining): added inlining support
101 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
103 * x86.brg: optimized version of castclass and isinst
105 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
107 * emit-x86.c, invoke.c: track time spent compiling.
109 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
111 * emit-x86.c, invoke.c: call profile callbacks if needed.
112 * jit.c, jit.h, mono.c: add --profile command line option.
114 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
116 * jit.h: included mono/io-layer/io-layer.h to avoid breaking
117 compilation under windows when upgrading mingw and w32api to
118 version 1.3 (thanks Dick!).
120 2002-04-15 Patrik Torstensson <patrik.torstensson@labs2.com>
122 * jit.c: changed the array icalls to use full names
124 2002-04-15 Dietmar Maurer <dietmar@ximian.com>
126 * x86.brg: check the this pointer before calling
127 non-virtual functions
129 * emit-x86.c (arch_emit_prologue): initialize local vars.
131 * x86.brg: removed incredible clumsy code
133 2002-04-13 Martin Baulig <martin@gnome.org>
135 * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
136 the location of a variable.
137 (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
138 instead of a stack offset and use dwarf2_write_variable_location() to write
141 2002-04-13 Martin Baulig <martin@gnome.org>
143 * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
146 2002-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
148 * Makefile.am: use of the new '-s' option in monoburg.
150 2002-04-12 Martin Baulig <martin@gnome.org>
152 * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
155 2002-04-10 Sergey Chaban <serge@wildwestsoftware.com>
156 * win32-exception: added Win32 SEH exception filter that translates
157 CONTEXT to sigcontext;
159 * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
160 in a platfrom-dependent way;
162 * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
163 and avoid io-layer includes;
165 * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
168 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
170 * delegate.c (arch_end_invoke): restore output arguments
172 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
174 * jit.c: call mono_runtime_init ().
176 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
178 * jit.c (mono_jit_cleanup): added more statistics
180 * invoke.c (arch_create_native_wrapper): special case EndInvoke -
181 we need to pass the MonoMethod pointer as first argument.
183 * delegate.c (mono_async_invoke): notify all listeners, not only a
185 (arch_end_invoke): we now pass a MonoMethod as first parameter and
186 use arch_method_call_message_new() to access the stack.
187 (arch_end_invoke): wait until we really finished processing
188 (async_invoke_abort): notify all listeners, not only a
191 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
193 * message.c (arch_return_value): impl.
194 (arch_method_return_message_restore): consider delegate BeginInvoke
196 * jit.c: removed jit_exec_main()
198 * delegate.c (arch_begin_invoke): use the message builder to make
199 it architecture independent - still needs more cleanup.
201 2002-04-05 Dietmar Maurer <dietmar@ximian.com>
203 * delegate.c (mono_delegate_ctor): support for transparent proxy
205 * x86.brg (freg): bug fix in CONV_R* opcodes
207 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
209 * message.c: added documentation
211 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
213 * mono.c (main): use --trace instead of --trace-calls
215 * x86.brg: impl. REMOTE_STIND_XX
217 * message.c (mono_store_remote_field): impl.
219 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
221 * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
223 * message.c (mono_load_remote_field): impl.
225 * jit.c (mono_analyze_stack): only call marshalbyref methods
227 (mono_analyze_stack): consider marshalbyref objects in LDFLD
229 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
231 * x86.brg: kill pointer arithmetric.
233 2002-03-28 Martin Baulig <martin@gnome.org>
235 * jit.c (mono_debug_insert_breakpoint): New global variable.
236 (mono_debug_last_breakpoint_address): New global variable.
238 * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
239 non-zero, insert a breakpoint; if it's positive, decrement it when done.
240 Set `mono_debug_last_breakpoint_address' to the address of the last inserted
243 * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
244 `mono_debug_last_breakpoint_address', also documented them here.
246 2002-03-28 Martin Baulig <martin@gnome.org>
248 * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
249 (AssemblyDebugInfo): Added `format'.
251 * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
252 this allows us choose the format on a per-assembly basis.
253 (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
254 to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
256 (debug_generate_method_lines): Generate correct IL offsets.
258 2002-03-28 Martin Baulig <martin@gnome.org>
260 * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
262 * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
264 * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
265 `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
267 * debug.c (debug_generate_method_lines): Don't return if we don't have line
268 numbers, we still need to generate the IL offsets here. Emit line numbers
269 for `prologue_end_offset' (the first line of actual code) and
270 `epilogue_begin_offset' (the line of the method's closing brace).
271 Don't crash if cfg->bblocks [i].forest is NULL.
272 (mono_debug_add_method): Don't crash if we don't have line numbers.
273 Initialize the newly added fields.
275 * debug-stabs.c: Record first and last line, emit filename info at the
276 beginning of the stab file, gdb ignores the types otherwise.
278 * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
279 emit line number info for the first and last line.
281 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
283 * invoke.c (arch_create_delegate_trampoline): impl.
285 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
287 * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
288 with the jit runtime to easy embedding. main() is moved to mono.c, now.
289 * jit.c: use opcode names from libmetadata.
290 * debug.h, debug.c: constify char* argument.
292 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
294 * jit.c: catching SIGSEGV again, added proxy support
296 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
298 * delegate.c (mono_delegate_init): remove unused worker threads
300 2002-03-27 Mike Kestner <mkestner@speakeasy.net>
302 * delegate.c (arch_get_delegate_invoke): malloc a bigger area
304 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
306 * jit.c: remove glib mem vtable code.
308 2002-03-26 Martin Baulig <martin@gnome.org>
310 * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
311 lines if we don't have line number information.
312 (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
315 * debug-stabs.c (write_method_stabs): Don't generate method lines if
316 we don't have line number information. Use `minfo->method_info.this_offset'
317 instead of hardcoding 8.
319 * debug.c (debug_generate_method_lines): Don't crash if we don't have
320 line number information.
321 (mono_debug_open_assembly): Don't generate line numbers for
322 MONO_DEBUG_FORMAT_DWARF2_PLUS.
323 (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
324 but it in the new `this_offset' field.
326 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
328 * debug.c (debug_generate_method_lines): Use correct addresses for
331 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
333 * jit.c: do not set the glib mem vtable anymore.
334 * Makefile.am: link to libmonoutils.
336 2002-03-25 Martin Baulig <martin@gnome.org>
338 * debug.h (mono_debug_make_symbols): Documented this function.
340 2002-03-24 Martin Baulig <martin@gnome.org>
342 * debug.c (mono_debug_add_method): Include the `this' offset in
343 the `minfo->method_info.param_offsets' array.
345 2002-03-23 Martin Baulig <martin@gnome.org>
347 * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
348 to do it before the X86_CMP.
349 (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
350 (reg: CLT (lreg, lreg)): Likewise.
351 (reg: CLT_UN (lreg, lreg)): Likewise.
352 (reg: CLT_UN (lreg, lreg)): Likewise.
353 (reg: CGT (lreg, lreg)): Likewise.
354 (reg: CGT (lreg, lreg)): Likewise.
355 (reg: CGT_UN (lreg, lreg)): Likewise.
356 (reg: CGT_UN (lreg, lreg)): Likewise.
358 2002-03-23 Martin Baulig <martin@gnome.org>
360 * debug-private.h (AssemblyDebugInfo): Added `_priv'.
362 * debug-dwarf2-plus.c
363 (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
364 (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
365 (mono_debug_write_assembly_dwarf2_plus): Only call
366 mono_debug_update_symbol_file() here.
368 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
370 * jit.c: inter strings before executing a method.
371 Do not intern command line arguments anymore.
373 2002-03-21 Martin Baulig <martin@gnome.org>
375 * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
377 * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
378 been created by MCS and fills in all machine dependent stuff.
380 * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
381 removed everything which is already in MonoDebugMethodInfo.
383 * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
384 (mono_debug_make_symbols): Don't open the file or call as, this is done in the
387 * jit.c (main): Added "--dwarf-plus" command line option to use the new
388 MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
390 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
392 * jit.c (usage): new option to specify maximum number of worker threads
393 (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
395 * delegate.c (async_invoke_abort): added support for asynchronous exceptions
396 (arch_get_async_invoke): notify listeners before we call the
397 asynchronous callback
399 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
401 * delegate.c (async_invoke_thread): support for domains
402 (async_invoke_thread): create workers only when needed
404 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
406 * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
408 2002-03-18 Dietmar Maurer <dietmar@ximian.com>
410 * x86.brg: impl. lreg: XOR (lreg, lreg)
411 impl. REM (freg, freg)
413 2002-03-17 Martin Baulig <martin@gnome.org>
415 * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
418 * debug-dwarf2.c: Added support for strings and arrays.
420 2002-03-17 Martin Baulig <martin@gnome.org>
422 * debug.c (mono_debug_get_type): Recursively call this for all function members
424 (mono_debug_add_method): Don't mangle function names, this must be done by the
425 debugger backend if the debugging format needs mangled names.
427 * debug-dwarf2.c: Improved support for classes, added member functions.
429 2002-03-16 Martin Baulig <martin@gnome.org>
431 * debug.c (mono_debug_get_type): Recursively call this for all members and
432 parent classes of a class type.
434 * debug-dwarf2.c: Added basic support for classes. Set source language to C++
435 since GDB doesn't like Java very much.
437 2002-03-16 Martin Baulig <martin@gnome.org>
439 * debug-dwarf2.c: Added support for enums.
441 2002-03-15 Martin Baulig <martin@gnome.org>
443 * debug.c (mono_debug_get_type): Recursively call this for all members
446 * debug-dwarf2.c: Added support for structs.
448 2002-03-15 Dietmar Maurer <dietmar@ximian.com>
450 * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
451 to new MonoLMF layout
453 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
455 * emit-x86.c (arch_create_native_wrapper): new code to generate
456 wrappers for calling native functions.
457 (arch_create_native_wrapper): free allocated strings
458 (arch_handle_exception): made mono_jit_info_table domain dependent
460 2002-03-14 Martin Baulig <martin@gnome.org>
462 * debug.c (MonoDebugFormat): New public enums specifying which debugging
464 (mono_debug_open_file): Added MonoDebugFormat argument.
465 (mono_debug_make_symbols): Don't take an argument to make it easier to call
466 this function from GDB. It's now safe to call this function multiple times;
467 it'll always write a complete debugging file.
469 * debug.c: Splitted this file into a general part which remains in this file
470 and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
471 All public functions now call a corresponding format specific function.
473 * debug.c: The following changes are private to debug.c:
474 (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
475 (record_line_number, debug_generate_method_lines): New private functions.
476 (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
477 calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
478 mono_debug_open_assembly_dwarf2).
479 (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
480 now safe to call this function multiple times.
481 (mono_debug_get_type): New public function. This takes a `MonoClass *' and
482 returns an unique index for this type. It's used to ensure that we only write
483 each class once to the debugging file.
484 (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
485 data structure, but don't directly write to the debugging file. This is done
486 later from mono_debug_write_assembly().
488 * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
489 debugging output. Call mono_debug_close() on cleanup if necessary.
491 2002-03-14 Martin Baulig <martin@gnome.org>
493 * debug-private.h: New private header file.
495 * debug-stabs.c: Added the stabs type generation stuff which was
496 previously in debug.c.
498 * debug-dwarf.c: Started to implement type support. We're currently
499 only writing this most basic types to the dwarf file, but this will
502 2002-03-13 Martin Baulig <martin@gnome.org>
504 * debug-stabs.c, debug-dwarf2.c: New files containing my new
505 debugging code. They're now in CVS, but not yet used anywhere.
507 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
509 * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
510 macros, included new delegate code from Daniel Stodden.
513 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
515 * jit.c: verify that corlib and runtime are in sync.
517 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
519 * emit-x86.c, jit.c: use the debug-helpers facilities to
520 describe and match a method when debugging.
522 2002-03-10 Martin Baulig <martin@gnome.org>
524 * emit-x86.c (arch_compile_method): When emitting stabs debugging
525 output, put a nop instruction at the start of all functions so that
526 the adresses won't change when using --debug.
528 * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
529 the bytecode area, stabs needs a line number in the .il file. Use the
530 new info->moffsets to get the line number.
531 (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
532 `moffsets' is an array of `total_lines' fields (total number of lines
533 in the .il file); for each line in the .il field, this array contains
534 the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
535 of a method and 0 otherwise.
536 (debug_load_method_lines): Read the whole .il file and initialize the
537 info->moffsets field.
539 2002-03-09 Martin Baulig <martin@gnome.org>
541 * x86.brg (DIV_UN): Clear EDX before performing the division and remove
542 the unnecessary CDQ instruction.
544 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
546 * jit.c (mono_analyze_stack): only load addresses of value types
547 on the runtime stack.
549 2002-03-07 Duncan Mak <duncan@ximian.com>
551 * Makefile.am: A small patch fixing errors in vpath-based builds
552 (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
553 committed for Daniel Stodden <stodden@in.tum.de>.
555 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
557 * jit.c: Boehm-GC enable.
559 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
561 * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
562 realloc that code sometimes!
564 * emit-x86.c (mono_compute_branches): support several types of
567 2002-03-06 Dietmar Maurer <dietmar@ximian.com>
569 * x86.brg: impl. MUL_OVF_UN (reg, reg)
571 * jit.c (mono_find_final_block): find correct finally handler.
573 * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
574 caller saved registers.
576 2002-03-05 Dietmar Maurer <dietmar@ximian.com>
578 * x86.brg: use x86_widen_reg for CONV opcodes
580 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
582 * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
584 * emit-x86.c (arch_handle_exception): big fix - dont use
585 uninitialized next_bp
586 (arch_compile_method): make the jit thread save
587 (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
588 to avoid need of recursive mutexes
590 * x86.brg: use new mono_assert macros
592 2002-02-28 Dietmar Maurer <dietmar@ximian.com>
594 * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
595 calling into unmanaged code (arch_compile_method).
597 * x86.brg: impl. CONV_I4 (freg) with correct rounding
598 (lreg): impl CALL_I8(INTF_ADDR)
599 impl. CONV_R_UN (reg)
602 2002-02-27 Dietmar Maurer <dietmar@ximian.com>
604 * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
606 2002-02-26 Dietmar Maurer <dietmar@ximian.com>
608 * x86.brg: bug fix in CLT(lreg,lreg)
609 (reg): bug fix in CONV_OVF_I4(lreg)
610 (lreg): replaced x86_call_reg with x86_call_code
612 * emit-x86.c (mono_add_jump_info): impl.
613 (mono_compute_branches): patch real jump address (instead of
616 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
618 * x86.brg: optimize cmp reg,0 -> test reg.
620 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
622 * jit.h, jit.c, emit-x86.c: Added a few statistics counters
623 and the --stats command line option to print them.
624 Fixed memory leak in arch_compile_method () when a method's code is
625 found in the cache. Fix magic trampoline to deal with static calls.
627 2002-02-21 Dietmar Maurer <dietmar@ximian.com>
629 * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN
631 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
633 * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
634 (arch_create_jit_trampoline): cache trampoline code
636 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
638 * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
640 (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
642 * x86.brg: do not encode exception objects into the instruction
643 stream, because they are domain dependend. Use
644 arch_get_throw_exception_by_name() instead;
646 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
648 * jit.c: intern command line arguments.
650 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
652 * jit.c (mono_analyze_stack): use the magic trampoline for all
653 calls (since we cant store the address of compiled code in
655 (mono_analyze_stack): imp. LDSTR for shared code
657 * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
658 (arch_compile_method): add a cache for compiled methods to avoid
659 recompilation. dont use method->addr to store domain dependent
662 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
664 * x86.brg: impl. BLE,BGT for freg
666 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
668 * emit-x86.c: handle unreachable code. Eliminate some unneeded
670 * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
671 main(). Add --compile classname and --ncompile num command line
672 options to do performance evaluation of the jitter (and help
675 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
677 * emit-x86.c (arch_compile_method): bug fix in static delegate
680 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
682 * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
684 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
686 * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
688 2002-02-13 Miguel de Icaza <miguel@ximian.com>
690 * jit.c (arch_allocate_var): Only assert that the alignment is
691 at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
693 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
695 * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
697 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
699 * emit-x86.c: make x86_magic_trampoline() handle call instructions
700 with an imm8 displacement. x86.brg not yet changed to take advantage
703 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
705 * jit.c: use opcode info from libmetadata to do flow analysis
708 2002-02-06 Dietmar Maurer <dietmar@ximian.com>
710 * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking
712 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
714 * x86.brg: use element_class for type check
716 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
718 * jit.c (main): impl. __array_Address icall
720 * mempool.c (mono_mempool_alloc): handle large block allocation
722 2002-02-01 Dietmar Maurer <dietmar@ximian.com>
724 * x86.brg: impl. SHL/SHR/CLT for 64 bit values
726 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
728 * x86.brg: impl. CEQ(lreg,lreg)
730 * jit.c (mono_analyze_stack): impl. LDVIRTFTN
731 (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
733 * x86.brg: removed some dead code.
735 2002-01-18 Dietmar Maurer <dietmar@ximian.com>
737 * jit.c (arch_allocate_var): fixed alignment bugs
739 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
741 * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
743 2002-01-16 Dietmar Maurer <dietmar@ximian.com>
745 * jit.c (main): install the trampoline before we start to create
748 * x86.brg: impl. CLT_UN, CGT_UN
750 * emit-x86.c (leave_method): added check for null object
751 (enter_method): consider byref arguments
753 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
755 * x86.brg: bug fix in CONV_OVF_I1_UN
756 impl. ADD_OVF, MUL_OVF
757 impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
758 (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
759 (EMIT_COND_EXCEPTION): added signed flag
761 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
763 * jit.c: implement stloc, ldloc, ldloca.
765 2002-01-11 Dietmar Maurer <dietmar@ximian.com>
767 * jit.c (mono_analyze_stack): fixed calculation of last_instr
769 * x86.brg (LDLEN): emit null_reference exception
771 (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
773 2002-01-04 Dietmar Maurer <dietmar@ximian.com>
775 * x86.brg: bug fix in CASTCLASS
777 2001-12-21 Dietmar Maurer <dietmar@ximian.com>
779 * jit.c (mono_analyze_stack): spill MUL to avoid problem with
782 * emit-x86.c (arch_compile_method): fixed static delegate bug
784 2001-12-16 Miguel de Icaza <miguel@ximian.com>
786 * x86.brg, jit.c: Split up the nodes that we used to share on
787 CONV_OVF. They were sharing the nodes because they are the same
788 on 32-bit machines, but on 64-bit machines you need different
791 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
793 * x86.brg: removed prerequisite that (tree->left->reg1 <
794 tree->right->reg1) to make register allocation easier.
796 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
798 * emit-x86.c (arch_handle_exception): new code to handle
799 exceptions inside unmanaged code.
801 * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
802 address as first argument.
804 2001-12-15 Dietmar Maurer <dietmar@ximian.com>
806 * x86.brg: pass exceptions on the stack
808 * jit.h (ISSTRUCT): new macro to check for real value types
809 (return false for enum types).
811 2001-12-11 Dietmar Maurer <dietmar@ximian.com>
813 * x86.brg: use position indepentent code if possible.
815 * x86.brg (EMIT_COND_EXCEPTION): new macro.
817 * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
819 2001-12-10 Dietmar Maurer <dietmar@ximian.com>
821 * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
823 (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
825 * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
827 2001-12-07 Dietmar Maurer <dietmar@ximian.com>
829 * jit.c (mono_allocate_intvar): bug fix.
831 * emit-x86.c (get_unbox_trampoline): impl.
833 * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
835 2001-12-06 Dietmar Maurer <dietmar@ximian.com>
837 * x86.brg: raise exceptions.
839 2001-12-05 Dietmar Maurer <dietmar@ximian.com>
841 * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
844 2001-12-06 Miguel de Icaza <miguel@ximian.com>
846 * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
847 CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
848 CONV.OVF.I2.UN, CONV.OVF.I8.UN
850 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
852 * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
853 removed the locaddr nonterminal, reimplemented value types
855 * jit.c: reimplemented value type support, better support for
858 2001-12-03 Miguel de Icaza <miguel@ximian.com>
860 * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
863 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
865 * jit.c: call mono_init() after registering internal calls.
867 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
869 * emit-x86.c (tree_preallocate_regs): improved register allocation
871 * x86.brg: impl. ISINST, CASTCLASS
873 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
875 * x86.brg: rearrange fields to reduce struct size.
876 * jit.c: use signature->param_count, not signature->params_size.
877 * debug.c: off-by-one error fix.
879 2001-11-29 Radek Doulik <rodo@ximian.com>
881 * Makefile.am: build mono only for X86 architecture, compilation
882 fails for ppc now because of accessing registers in sigcontext
885 2001-11-29 Dietmar Maurer <dietmar@ximian.com>
887 * jit.c (mono_analyze_stack): bug fix in DUP
889 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
891 * debug.c: fix type handling. Position function position at start of
892 IL code. Output more fine-grained stepping information.
894 2001-11-28 Dietmar Maurer <dietmar@ximian.com>
896 * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
898 * jit.c (mono_analyze_stack): record the cli_address for later use
900 (sigsegv_signal_handler): translate sigsegv into "Internal error"
903 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
905 * debug.c, debug.h: added support for generating stabs.
906 Stabs can be compiled with as and the resulting object file can be
907 loaded in a gdb session with add-symbol-file object.o.
908 * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
909 where locals and arguments are stored in the stack. Add support for
910 passing command line arguments to CLR programs.
911 * emit-x86.c: insert a breakpoint at method invocation if needed.
913 2001-11-27 Dietmar Maurer <dietmar@ximian.com>
915 * jit.c: exception support
917 * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
920 2001-11-26 Dick Porter <dick@ximian.com>
922 * Makefile.am (mono_LDADD): Add io-layer library
924 2001-11-19 Dietmar Maurer <dietmar@ximian.com>
926 * jit.c (mono_analyze_stack): impl. LDFTN
927 (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
928 make register allocation easier on x86
930 * emit-x86.c (enter_method): more debugging output for Strings
931 (arch_compile_method): added delegate support
932 (arch_compile_method): align EBP to 8 byte boundary
934 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
936 * jit.c: use mono_install_trampoline (), instead of exporting
937 a function to a lower-level library.
939 2001-11-16 Dietmar Maurer <dietmar@ximian.com>
941 * x86.brg (STRING_ARG): impl. a way to marshal strings. This
942 will be extensible to handle all possible kinds of marshalling
945 * jit.c (map_call_type): added MB_TERM_CALL_VOID
946 (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
947 instructions to handle this arguments more effectively.
949 2001-11-15 Dietmar Maurer <dietmar@ximian.com>
951 * Makefile.am (mono_SOURCES): renamed testjit to mono
953 * x86.brg: added debugging support
955 * testjit.c: added support for value types, CFG improvements
957 * emit-x86.c (enter_method): handle value types
958 (tree_allocate_regs): impl. a better way to handle chain rules
960 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
962 * x86.brg (INITOBJ): bug fix: initialize data before use,
965 2001-11-09 Miguel de Icaza <miguel@ximian.com>
967 * testjit.c (mono_analyze_stack): Remove compiler warning by
968 testing against NULL.
970 2001-11-09 Dick Porter <dick@ximian.com>
972 * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
974 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
976 * testjit.c (mono_analyze_stack): new BOX impl.
978 * x86.brg: implemented INITOBJ
980 * testjit.c (mono_analyze_stack): finished array support
981 (mono_analyze_stack): reimplemented DUP instruction
983 2001-11-08 Dietmar Maurer <dietmar@ximian.com>
985 * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
986 represents the address of the element. This way we can emit highly
987 optimized x86 instructions to access elements (using base+index+offset
990 2001-11-07 Miguel de Icaza <miguel@ximian.com>
992 * mempool.c: Include string.h to kill warning.
994 * testjit.c: Add typecast to kill warning.
996 * x86.brg: Include string.h to eliminate warning.
998 * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
1001 2001-11-07 Dietmar Maurer <dietmar@ximian.com>
1003 * emit-x86.c (enter_method): print out all method arguments
1004 (x86_magic_trampoline): impl.
1005 (arch_create_simple_jit_trampoline): we use different trampolines
1006 for static methods (no need to write the address back into to
1009 2001-11-06 Dietmar Maurer <dietmar@ximian.com>
1011 * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
1012 use less the 16 bytes.
1014 * x86.brg: code cleanup
1016 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
1018 * testjit.c: bug fixes.
1020 * emit-x86.c (leave_method): print result values
1022 2001-11-03 Dietmar Maurer <dietmar@ximian.com>
1024 * emit-x86.c (enter_method): new debugging code
1025 (leave_method): new debbuging code, this functions are called
1026 when you use the new option --trace-calls
1028 2001-11-02 Dietmar Maurer <dietmar@ximian.com>
1030 * testjit.c: impl. STELEM_XX, STELEM_XX
1032 * x86.brg: impl. LDLEN, LDELEMA
1035 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
1037 * x86.brg: added some experimental code for CALL
1038 instructions - still not found the optimal way to do it.
1040 * testjit.c (map_stind_type): add support for value types with
1041 a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
1042 CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
1043 (ctree_create_newobj): impl.
1046 * emit-x86.c (tree_allocate_regs): removed allocation code for
1048 (get_address): use a simple, but bug free search instead of the
1049 buggy binary search.
1051 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
1053 * testjit.c: support virtual functions
1055 * x86.brg: support different addressing modes for calls
1057 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
1059 * testjit.c: impl. STFLD
1061 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
1063 * x86.brg: impl. CEQ
1065 2001-10-04 Dick Porter <dick@ximian.com>
1068 * emit-x86.c: include mono-endian.h not endian.h
1070 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
1072 * testjit.c (ctree_create_dup): really duplicate the tree.
1073 attach the arguments to the CALL node. Added a new macro to
1074 make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
1076 2001-10-01 Dietmar Maurer <dietmar@ximian.com>
1078 * interp.brg: the burm based interpreter: added the file as example.
1080 2001-09-27 Dietmar Maurer <dietmar@ximian.com>
1084 * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
1086 (map_stind_type): support enum types
1087 (map_ldind_type): support enum types
1089 * emit-x86.c (tree_allocate_regs): added code to support
1090 register allocation for addressing modes trees.
1091 (tree_emit): bug fix: we have to emit all mono_burg_functins. The
1092 previous impl. did not work for chain rules.
1093 (compute_branches): support for SWITCH statements
1095 * x86.brg: added rules to model x86 addressing modes
1097 2001-09-26 Dietmar Maurer <dietmar@ximian.com>
1099 * emit-x86.c (compute_branches): implemented SWITCH
1101 * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
1102 (map_ldind_type): add enumeration types.
1103 (map_stind_type): add enumeration types.
1105 * emit-x86.c (arch_compile_method): more documentation.
1107 * testjit.c: moved the architecture specific things to emit-x86.c
1108 and x86.brg. Added more documentation. code cleanup.
1110 2001-09-25 Dietmar Maurer <dietmar@ximian.com>
1112 * x86.brg: we now have different types of addresses: ADDR_L for local
1113 values, ADDR_A for arguments and ADDR_G for global addresses. We
1114 also use LDIND_XX token to load values from a specific address
1115 instead of LDLOC/STLOC.
1117 * testjit.c: use the new adressing scheme everywhere:
1118 LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)
1120 2001-09-24 Dietmar Maurer <dietmar@ximian.com>
1122 * testjit.c (main): fix bug in parameter parsing
1124 * x86.brg: impl. more opcodes
1126 2001-09-23 Dick Porter <dick@ximian.com>
1128 * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
1130 2001-09-23 Dietmar Maurer <dietmar@ximian.com>
1132 * testjit.c: use the memory pool to avoid memory leaks
1134 2001-09-22 Dietmar Maurer <dietmar@ximian.com>
1136 * x86.brg: increment the stack pointer after function calls
1138 2001-09-21 Dick Porter <dick@ximian.com>
1140 * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
1142 2001-09-21 Dietmar Maurer <dietmar@ximian.com>
1144 * x86.brg: implemented long MUL/DIV
1145 (MB_OPT_LEVEL): define optimisation level macro
1147 * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
1148 for operations like idiv. it is also possible to assign specific registers.
1150 2001-09-20 Dietmar Maurer <dietmar@ximian.com>
1152 * x86.brg: added basic support for long
1154 * testjit.c (mono_compile_method): implemented POP
1156 2001-09-19 Miguel de Icaza <miguel@ximian.com>
1158 * testjit.c (usage): Added a couple of more usage options.
1160 2001-09-19 Dietmar Maurer <dietmar@ximian.com>
1162 * x86.brg: added more floating point grammar
1164 * testjit.c (mono_compile_method): make local offsets negative
1166 * x86.brg: added some floating point trees
1168 * testjit.c (mono_compile_method): arguments on the runtime
1169 stack are at least 4 bytes
1171 * x86.brg: partly implemented 8,16 bit integers
1173 * testjit.c (get_address): mark basic blocks
1175 2001-09-18 Dietmar Maurer <dietmar@ximian.com>
1177 * x86.brg: added some rules to optimize code
1179 * testjit.c (get_address): use a binary search to get the address
1180 (main): added an option to debug the jit (-d)
1182 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
1184 * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
1186 2001-09-17 Miguel de Icaza <miguel@ximian.com>
1188 * testjit.c (mono_compile_method): Provide better error reporting.
1190 2001-09-17 Dietmar Maurer <dietmar@ximian.com>
1192 * testjit.c (tree_get_address): impl. to fix address bug
1193 (tree_get_address): make sure that we can only jump to the first
1194 instruction of a tree.
1196 * x86.brg: emit real code for calls
1198 * testjit.c (create_jit_trampoline): creates a function to trigger jit
1200 (mono_compile_method): reversed argument order
1202 2001-09-15 Dietmar Maurer <dietmar@ximian.com>
1204 * x86.brg (stmt): don't emit unnecessary register moves
1206 * testjit.c (tree_allocate_regs): free registers earlier
1208 2001-09-14 Dietmar Maurer <dietmar@ximian.com>
1210 * x86.brg: branch addresses are now resolved
1212 * testjit.c (compute_branches): compute address of branches
1214 * x86.brg: emit real x86 instructions
1216 * testjit.c: call objdump to disassemble the output
1218 2001-09-13 Dietmar Maurer <dietmar@ximian.com>
1220 * x86.brg: use the right offsets to access local variables
1223 * emit-x86.c: only save/restore callee saved registers if they are
1226 * testjit.c (tree_allocate_regs): use the new MonoRegSet to
1228 (mono_compile_method): changed the tree for mothod calls
1235 2001-09-10 Miguel de Icaza <miguel@ximian.com>
1237 * x86.brg: Use Unix assembly syntax.
1239 * emit-x86.c: support code, should be moved
1241 * testjit.c: Use GPtrArrays instead of GLists, as those are very
1242 inefficient at appends.
1244 * Renamed `create_new_leave' to `create_new_leaf'