1 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
3 * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.
5 * exception.c: included the Freebsd patch from Sandro Tolaini
8 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
10 * mono.c, jit.c: use mono_runtime_run_main ().
12 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
14 * jit.c (mono_analyze_stack): dont call methods on Object with
15 METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
17 * x86.brg: added more CONV_U rules
19 * jit.c (mono_analyze_stack): avoid recursive call of virtual
20 methods: fixes Bug #23778
21 (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
23 * exception.c (arch_handle_exception): only g_assert(cleanup) if
26 2002-04-27 Patrik Torstensson <patrik.torstensson@intel.com>
28 * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
30 2002-04-27 Martin Baulig <martin@gnome.org>
32 * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
33 there's already `epilog' so we don't need `epilogue_begin'.
35 * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
36 size of the method's code.
38 2002-04-25 Martin Baulig <martin@gnome.org>
40 * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
43 2002-04-25 Dietmar Maurer <dietmar@ximian.com>
45 * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
46 added CONV_OVF_I4 (fix bug #23808)
48 2002-04-23 Dietmar Maurer <dietmar@ximian.com>
50 * x86.brg: code cleanup - use x86_patch ()
52 * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
53 (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
55 * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
56 because it slows down performance.
58 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
60 * emit-x86.c: enter_method handles 8-byte aligned parameters.
62 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
64 * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
67 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
69 * jit.c (check_inlining): added statistics about inlineing
71 * mono.c (usage): new switch --noinline to disable inlining
73 * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
74 inline methods (to keep semantics)
76 * x86.brg: added constant folding for inegers
78 * emit-x86.c (tree_allocate_regs): handle the special case when
79 chain rules need a register.
81 2002-04-19 Dietmar Maurer <dietmar@ximian.com>
83 * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
85 * jit.c (check_inlining): better inlining support
87 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
89 * x86.brg: LDLEN uses max_length instead of bounds[0]
90 * jit.c: support for new szarray format
92 2002-04-18 Dietmar Maurer <dietmar@ximian.com>
94 * jit.c (check_inlining): added inlining support
96 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
98 * x86.brg: optimized version of castclass and isinst
100 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
102 * emit-x86.c, invoke.c: track time spent compiling.
104 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
106 * emit-x86.c, invoke.c: call profile callbacks if needed.
107 * jit.c, jit.h, mono.c: add --profile command line option.
109 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
111 * jit.h: included mono/io-layer/io-layer.h to avoid breaking
112 compilation under windows when upgrading mingw and w32api to
113 version 1.3 (thanks Dick!).
115 2002-04-15 Patrik Torstensson <patrik.torstensson@labs2.com>
117 * jit.c: changed the array icalls to use full names
119 2002-04-15 Dietmar Maurer <dietmar@ximian.com>
121 * x86.brg: check the this pointer before calling
122 non-virtual functions
124 * emit-x86.c (arch_emit_prologue): initialize local vars.
126 * x86.brg: removed incredible clumsy code
128 2002-04-13 Martin Baulig <martin@gnome.org>
130 * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
131 the location of a variable.
132 (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
133 instead of a stack offset and use dwarf2_write_variable_location() to write
136 2002-04-13 Martin Baulig <martin@gnome.org>
138 * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
141 2002-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
143 * Makefile.am: use of the new '-s' option in monoburg.
145 2002-04-12 Martin Baulig <martin@gnome.org>
147 * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
150 2002-04-10 Sergey Chaban <serge@wildwestsoftware.com>
151 * win32-exception: added Win32 SEH exception filter that translates
152 CONTEXT to sigcontext;
154 * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
155 in a platfrom-dependent way;
157 * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
158 and avoid io-layer includes;
160 * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
163 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
165 * delegate.c (arch_end_invoke): restore output arguments
167 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
169 * jit.c: call mono_runtime_init ().
171 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
173 * jit.c (mono_jit_cleanup): added more statistics
175 * invoke.c (arch_create_native_wrapper): special case EndInvoke -
176 we need to pass the MonoMethod pointer as first argument.
178 * delegate.c (mono_async_invoke): notify all listeners, not only a
180 (arch_end_invoke): we now pass a MonoMethod as first parameter and
181 use arch_method_call_message_new() to access the stack.
182 (arch_end_invoke): wait until we really finished processing
183 (async_invoke_abort): notify all listeners, not only a
186 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
188 * message.c (arch_return_value): impl.
189 (arch_method_return_message_restore): consider delegate BeginInvoke
191 * jit.c: removed jit_exec_main()
193 * delegate.c (arch_begin_invoke): use the message builder to make
194 it architecture independent - still needs more cleanup.
196 2002-04-05 Dietmar Maurer <dietmar@ximian.com>
198 * delegate.c (mono_delegate_ctor): support for transparent proxy
200 * x86.brg (freg): bug fix in CONV_R* opcodes
202 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
204 * message.c: added documentation
206 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
208 * mono.c (main): use --trace instead of --trace-calls
210 * x86.brg: impl. REMOTE_STIND_XX
212 * message.c (mono_store_remote_field): impl.
214 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
216 * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
218 * message.c (mono_load_remote_field): impl.
220 * jit.c (mono_analyze_stack): only call marshalbyref methods
222 (mono_analyze_stack): consider marshalbyref objects in LDFLD
224 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
226 * x86.brg: kill pointer arithmetric.
228 2002-03-28 Martin Baulig <martin@gnome.org>
230 * jit.c (mono_debug_insert_breakpoint): New global variable.
231 (mono_debug_last_breakpoint_address): New global variable.
233 * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
234 non-zero, insert a breakpoint; if it's positive, decrement it when done.
235 Set `mono_debug_last_breakpoint_address' to the address of the last inserted
238 * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
239 `mono_debug_last_breakpoint_address', also documented them here.
241 2002-03-28 Martin Baulig <martin@gnome.org>
243 * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
244 (AssemblyDebugInfo): Added `format'.
246 * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
247 this allows us choose the format on a per-assembly basis.
248 (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
249 to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
251 (debug_generate_method_lines): Generate correct IL offsets.
253 2002-03-28 Martin Baulig <martin@gnome.org>
255 * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
257 * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
259 * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
260 `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
262 * debug.c (debug_generate_method_lines): Don't return if we don't have line
263 numbers, we still need to generate the IL offsets here. Emit line numbers
264 for `prologue_end_offset' (the first line of actual code) and
265 `epilogue_begin_offset' (the line of the method's closing brace).
266 Don't crash if cfg->bblocks [i].forest is NULL.
267 (mono_debug_add_method): Don't crash if we don't have line numbers.
268 Initialize the newly added fields.
270 * debug-stabs.c: Record first and last line, emit filename info at the
271 beginning of the stab file, gdb ignores the types otherwise.
273 * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
274 emit line number info for the first and last line.
276 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
278 * invoke.c (arch_create_delegate_trampoline): impl.
280 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
282 * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
283 with the jit runtime to easy embedding. main() is moved to mono.c, now.
284 * jit.c: use opcode names from libmetadata.
285 * debug.h, debug.c: constify char* argument.
287 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
289 * jit.c: catching SIGSEGV again, added proxy support
291 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
293 * delegate.c (mono_delegate_init): remove unused worker threads
295 2002-03-27 Mike Kestner <mkestner@speakeasy.net>
297 * delegate.c (arch_get_delegate_invoke): malloc a bigger area
299 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
301 * jit.c: remove glib mem vtable code.
303 2002-03-26 Martin Baulig <martin@gnome.org>
305 * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
306 lines if we don't have line number information.
307 (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
310 * debug-stabs.c (write_method_stabs): Don't generate method lines if
311 we don't have line number information. Use `minfo->method_info.this_offset'
312 instead of hardcoding 8.
314 * debug.c (debug_generate_method_lines): Don't crash if we don't have
315 line number information.
316 (mono_debug_open_assembly): Don't generate line numbers for
317 MONO_DEBUG_FORMAT_DWARF2_PLUS.
318 (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
319 but it in the new `this_offset' field.
321 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
323 * debug.c (debug_generate_method_lines): Use correct addresses for
326 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
328 * jit.c: do not set the glib mem vtable anymore.
329 * Makefile.am: link to libmonoutils.
331 2002-03-25 Martin Baulig <martin@gnome.org>
333 * debug.h (mono_debug_make_symbols): Documented this function.
335 2002-03-24 Martin Baulig <martin@gnome.org>
337 * debug.c (mono_debug_add_method): Include the `this' offset in
338 the `minfo->method_info.param_offsets' array.
340 2002-03-23 Martin Baulig <martin@gnome.org>
342 * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
343 to do it before the X86_CMP.
344 (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
345 (reg: CLT (lreg, lreg)): Likewise.
346 (reg: CLT_UN (lreg, lreg)): Likewise.
347 (reg: CLT_UN (lreg, lreg)): Likewise.
348 (reg: CGT (lreg, lreg)): Likewise.
349 (reg: CGT (lreg, lreg)): Likewise.
350 (reg: CGT_UN (lreg, lreg)): Likewise.
351 (reg: CGT_UN (lreg, lreg)): Likewise.
353 2002-03-23 Martin Baulig <martin@gnome.org>
355 * debug-private.h (AssemblyDebugInfo): Added `_priv'.
357 * debug-dwarf2-plus.c
358 (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
359 (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
360 (mono_debug_write_assembly_dwarf2_plus): Only call
361 mono_debug_update_symbol_file() here.
363 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
365 * jit.c: inter strings before executing a method.
366 Do not intern command line arguments anymore.
368 2002-03-21 Martin Baulig <martin@gnome.org>
370 * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
372 * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
373 been created by MCS and fills in all machine dependent stuff.
375 * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
376 removed everything which is already in MonoDebugMethodInfo.
378 * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
379 (mono_debug_make_symbols): Don't open the file or call as, this is done in the
382 * jit.c (main): Added "--dwarf-plus" command line option to use the new
383 MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
385 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
387 * jit.c (usage): new option to specify maximum number of worker threads
388 (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
390 * delegate.c (async_invoke_abort): added support for asynchronous exceptions
391 (arch_get_async_invoke): notify listeners before we call the
392 asynchronous callback
394 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
396 * delegate.c (async_invoke_thread): support for domains
397 (async_invoke_thread): create workers only when needed
399 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
401 * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
403 2002-03-18 Dietmar Maurer <dietmar@ximian.com>
405 * x86.brg: impl. lreg: XOR (lreg, lreg)
406 impl. REM (freg, freg)
408 2002-03-17 Martin Baulig <martin@gnome.org>
410 * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
413 * debug-dwarf2.c: Added support for strings and arrays.
415 2002-03-17 Martin Baulig <martin@gnome.org>
417 * debug.c (mono_debug_get_type): Recursively call this for all function members
419 (mono_debug_add_method): Don't mangle function names, this must be done by the
420 debugger backend if the debugging format needs mangled names.
422 * debug-dwarf2.c: Improved support for classes, added member functions.
424 2002-03-16 Martin Baulig <martin@gnome.org>
426 * debug.c (mono_debug_get_type): Recursively call this for all members and
427 parent classes of a class type.
429 * debug-dwarf2.c: Added basic support for classes. Set source language to C++
430 since GDB doesn't like Java very much.
432 2002-03-16 Martin Baulig <martin@gnome.org>
434 * debug-dwarf2.c: Added support for enums.
436 2002-03-15 Martin Baulig <martin@gnome.org>
438 * debug.c (mono_debug_get_type): Recursively call this for all members
441 * debug-dwarf2.c: Added support for structs.
443 2002-03-15 Dietmar Maurer <dietmar@ximian.com>
445 * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
446 to new MonoLMF layout
448 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
450 * emit-x86.c (arch_create_native_wrapper): new code to generate
451 wrappers for calling native functions.
452 (arch_create_native_wrapper): free allocated strings
453 (arch_handle_exception): made mono_jit_info_table domain dependent
455 2002-03-14 Martin Baulig <martin@gnome.org>
457 * debug.c (MonoDebugFormat): New public enums specifying which debugging
459 (mono_debug_open_file): Added MonoDebugFormat argument.
460 (mono_debug_make_symbols): Don't take an argument to make it easier to call
461 this function from GDB. It's now safe to call this function multiple times;
462 it'll always write a complete debugging file.
464 * debug.c: Splitted this file into a general part which remains in this file
465 and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
466 All public functions now call a corresponding format specific function.
468 * debug.c: The following changes are private to debug.c:
469 (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
470 (record_line_number, debug_generate_method_lines): New private functions.
471 (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
472 calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
473 mono_debug_open_assembly_dwarf2).
474 (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
475 now safe to call this function multiple times.
476 (mono_debug_get_type): New public function. This takes a `MonoClass *' and
477 returns an unique index for this type. It's used to ensure that we only write
478 each class once to the debugging file.
479 (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
480 data structure, but don't directly write to the debugging file. This is done
481 later from mono_debug_write_assembly().
483 * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
484 debugging output. Call mono_debug_close() on cleanup if necessary.
486 2002-03-14 Martin Baulig <martin@gnome.org>
488 * debug-private.h: New private header file.
490 * debug-stabs.c: Added the stabs type generation stuff which was
491 previously in debug.c.
493 * debug-dwarf.c: Started to implement type support. We're currently
494 only writing this most basic types to the dwarf file, but this will
497 2002-03-13 Martin Baulig <martin@gnome.org>
499 * debug-stabs.c, debug-dwarf2.c: New files containing my new
500 debugging code. They're now in CVS, but not yet used anywhere.
502 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
504 * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
505 macros, included new delegate code from Daniel Stodden.
508 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
510 * jit.c: verify that corlib and runtime are in sync.
512 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
514 * emit-x86.c, jit.c: use the debug-helpers facilities to
515 describe and match a method when debugging.
517 2002-03-10 Martin Baulig <martin@gnome.org>
519 * emit-x86.c (arch_compile_method): When emitting stabs debugging
520 output, put a nop instruction at the start of all functions so that
521 the adresses won't change when using --debug.
523 * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
524 the bytecode area, stabs needs a line number in the .il file. Use the
525 new info->moffsets to get the line number.
526 (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
527 `moffsets' is an array of `total_lines' fields (total number of lines
528 in the .il file); for each line in the .il field, this array contains
529 the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
530 of a method and 0 otherwise.
531 (debug_load_method_lines): Read the whole .il file and initialize the
532 info->moffsets field.
534 2002-03-09 Martin Baulig <martin@gnome.org>
536 * x86.brg (DIV_UN): Clear EDX before performing the division and remove
537 the unnecessary CDQ instruction.
539 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
541 * jit.c (mono_analyze_stack): only load addresses of value types
542 on the runtime stack.
544 2002-03-07 Duncan Mak <duncan@ximian.com>
546 * Makefile.am: A small patch fixing errors in vpath-based builds
547 (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
548 committed for Daniel Stodden <stodden@in.tum.de>.
550 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
552 * jit.c: Boehm-GC enable.
554 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
556 * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
557 realloc that code sometimes!
559 * emit-x86.c (mono_compute_branches): support several types of
562 2002-03-06 Dietmar Maurer <dietmar@ximian.com>
564 * x86.brg: impl. MUL_OVF_UN (reg, reg)
566 * jit.c (mono_find_final_block): find correct finally handler.
568 * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
569 caller saved registers.
571 2002-03-05 Dietmar Maurer <dietmar@ximian.com>
573 * x86.brg: use x86_widen_reg for CONV opcodes
575 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
577 * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
579 * emit-x86.c (arch_handle_exception): big fix - dont use
580 uninitialized next_bp
581 (arch_compile_method): make the jit thread save
582 (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
583 to avoid need of recursive mutexes
585 * x86.brg: use new mono_assert macros
587 2002-02-28 Dietmar Maurer <dietmar@ximian.com>
589 * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
590 calling into unmanaged code (arch_compile_method).
592 * x86.brg: impl. CONV_I4 (freg) with correct rounding
593 (lreg): impl CALL_I8(INTF_ADDR)
594 impl. CONV_R_UN (reg)
597 2002-02-27 Dietmar Maurer <dietmar@ximian.com>
599 * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
601 2002-02-26 Dietmar Maurer <dietmar@ximian.com>
603 * x86.brg: bug fix in CLT(lreg,lreg)
604 (reg): bug fix in CONV_OVF_I4(lreg)
605 (lreg): replaced x86_call_reg with x86_call_code
607 * emit-x86.c (mono_add_jump_info): impl.
608 (mono_compute_branches): patch real jump address (instead of
611 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
613 * x86.brg: optimize cmp reg,0 -> test reg.
615 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
617 * jit.h, jit.c, emit-x86.c: Added a few statistics counters
618 and the --stats command line option to print them.
619 Fixed memory leak in arch_compile_method () when a method's code is
620 found in the cache. Fix magic trampoline to deal with static calls.
622 2002-02-21 Dietmar Maurer <dietmar@ximian.com>
624 * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN
626 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
628 * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
629 (arch_create_jit_trampoline): cache trampoline code
631 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
633 * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
635 (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
637 * x86.brg: do not encode exception objects into the instruction
638 stream, because they are domain dependend. Use
639 arch_get_throw_exception_by_name() instead;
641 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
643 * jit.c: intern command line arguments.
645 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
647 * jit.c (mono_analyze_stack): use the magic trampoline for all
648 calls (since we cant store the address of compiled code in
650 (mono_analyze_stack): imp. LDSTR for shared code
652 * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
653 (arch_compile_method): add a cache for compiled methods to avoid
654 recompilation. dont use method->addr to store domain dependent
657 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
659 * x86.brg: impl. BLE,BGT for freg
661 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
663 * emit-x86.c: handle unreachable code. Eliminate some unneeded
665 * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
666 main(). Add --compile classname and --ncompile num command line
667 options to do performance evaluation of the jitter (and help
670 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
672 * emit-x86.c (arch_compile_method): bug fix in static delegate
675 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
677 * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
679 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
681 * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
683 2002-02-13 Miguel de Icaza <miguel@ximian.com>
685 * jit.c (arch_allocate_var): Only assert that the alignment is
686 at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
688 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
690 * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
692 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
694 * emit-x86.c: make x86_magic_trampoline() handle call instructions
695 with an imm8 displacement. x86.brg not yet changed to take advantage
698 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
700 * jit.c: use opcode info from libmetadata to do flow analysis
703 2002-02-06 Dietmar Maurer <dietmar@ximian.com>
705 * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking
707 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
709 * x86.brg: use element_class for type check
711 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
713 * jit.c (main): impl. __array_Address icall
715 * mempool.c (mono_mempool_alloc): handle large block allocation
717 2002-02-01 Dietmar Maurer <dietmar@ximian.com>
719 * x86.brg: impl. SHL/SHR/CLT for 64 bit values
721 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
723 * x86.brg: impl. CEQ(lreg,lreg)
725 * jit.c (mono_analyze_stack): impl. LDVIRTFTN
726 (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
728 * x86.brg: removed some dead code.
730 2002-01-18 Dietmar Maurer <dietmar@ximian.com>
732 * jit.c (arch_allocate_var): fixed alignment bugs
734 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
736 * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
738 2002-01-16 Dietmar Maurer <dietmar@ximian.com>
740 * jit.c (main): install the trampoline before we start to create
743 * x86.brg: impl. CLT_UN, CGT_UN
745 * emit-x86.c (leave_method): added check for null object
746 (enter_method): consider byref arguments
748 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
750 * x86.brg: bug fix in CONV_OVF_I1_UN
751 impl. ADD_OVF, MUL_OVF
752 impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
753 (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
754 (EMIT_COND_EXCEPTION): added signed flag
756 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
758 * jit.c: implement stloc, ldloc, ldloca.
760 2002-01-11 Dietmar Maurer <dietmar@ximian.com>
762 * jit.c (mono_analyze_stack): fixed calculation of last_instr
764 * x86.brg (LDLEN): emit null_reference exception
766 (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
768 2002-01-04 Dietmar Maurer <dietmar@ximian.com>
770 * x86.brg: bug fix in CASTCLASS
772 2001-12-21 Dietmar Maurer <dietmar@ximian.com>
774 * jit.c (mono_analyze_stack): spill MUL to avoid problem with
777 * emit-x86.c (arch_compile_method): fixed static delegate bug
779 2001-12-16 Miguel de Icaza <miguel@ximian.com>
781 * x86.brg, jit.c: Split up the nodes that we used to share on
782 CONV_OVF. They were sharing the nodes because they are the same
783 on 32-bit machines, but on 64-bit machines you need different
786 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
788 * x86.brg: removed prerequisite that (tree->left->reg1 <
789 tree->right->reg1) to make register allocation easier.
791 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
793 * emit-x86.c (arch_handle_exception): new code to handle
794 exceptions inside unmanaged code.
796 * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
797 address as first argument.
799 2001-12-15 Dietmar Maurer <dietmar@ximian.com>
801 * x86.brg: pass exceptions on the stack
803 * jit.h (ISSTRUCT): new macro to check for real value types
804 (return false for enum types).
806 2001-12-11 Dietmar Maurer <dietmar@ximian.com>
808 * x86.brg: use position indepentent code if possible.
810 * x86.brg (EMIT_COND_EXCEPTION): new macro.
812 * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
814 2001-12-10 Dietmar Maurer <dietmar@ximian.com>
816 * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
818 (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
820 * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
822 2001-12-07 Dietmar Maurer <dietmar@ximian.com>
824 * jit.c (mono_allocate_intvar): bug fix.
826 * emit-x86.c (get_unbox_trampoline): impl.
828 * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
830 2001-12-06 Dietmar Maurer <dietmar@ximian.com>
832 * x86.brg: raise exceptions.
834 2001-12-05 Dietmar Maurer <dietmar@ximian.com>
836 * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
839 2001-12-06 Miguel de Icaza <miguel@ximian.com>
841 * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
842 CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
843 CONV.OVF.I2.UN, CONV.OVF.I8.UN
845 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
847 * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
848 removed the locaddr nonterminal, reimplemented value types
850 * jit.c: reimplemented value type support, better support for
853 2001-12-03 Miguel de Icaza <miguel@ximian.com>
855 * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
858 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
860 * jit.c: call mono_init() after registering internal calls.
862 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
864 * emit-x86.c (tree_preallocate_regs): improved register allocation
866 * x86.brg: impl. ISINST, CASTCLASS
868 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
870 * x86.brg: rearrange fields to reduce struct size.
871 * jit.c: use signature->param_count, not signature->params_size.
872 * debug.c: off-by-one error fix.
874 2001-11-29 Radek Doulik <rodo@ximian.com>
876 * Makefile.am: build mono only for X86 architecture, compilation
877 fails for ppc now because of accessing registers in sigcontext
880 2001-11-29 Dietmar Maurer <dietmar@ximian.com>
882 * jit.c (mono_analyze_stack): bug fix in DUP
884 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
886 * debug.c: fix type handling. Position function position at start of
887 IL code. Output more fine-grained stepping information.
889 2001-11-28 Dietmar Maurer <dietmar@ximian.com>
891 * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
893 * jit.c (mono_analyze_stack): record the cli_address for later use
895 (sigsegv_signal_handler): translate sigsegv into "Internal error"
898 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
900 * debug.c, debug.h: added support for generating stabs.
901 Stabs can be compiled with as and the resulting object file can be
902 loaded in a gdb session with add-symbol-file object.o.
903 * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
904 where locals and arguments are stored in the stack. Add support for
905 passing command line arguments to CLR programs.
906 * emit-x86.c: insert a breakpoint at method invocation if needed.
908 2001-11-27 Dietmar Maurer <dietmar@ximian.com>
910 * jit.c: exception support
912 * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
915 2001-11-26 Dick Porter <dick@ximian.com>
917 * Makefile.am (mono_LDADD): Add io-layer library
919 2001-11-19 Dietmar Maurer <dietmar@ximian.com>
921 * jit.c (mono_analyze_stack): impl. LDFTN
922 (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
923 make register allocation easier on x86
925 * emit-x86.c (enter_method): more debugging output for Strings
926 (arch_compile_method): added delegate support
927 (arch_compile_method): align EBP to 8 byte boundary
929 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
931 * jit.c: use mono_install_trampoline (), instead of exporting
932 a function to a lower-level library.
934 2001-11-16 Dietmar Maurer <dietmar@ximian.com>
936 * x86.brg (STRING_ARG): impl. a way to marshal strings. This
937 will be extensible to handle all possible kinds of marshalling
940 * jit.c (map_call_type): added MB_TERM_CALL_VOID
941 (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
942 instructions to handle this arguments more effectively.
944 2001-11-15 Dietmar Maurer <dietmar@ximian.com>
946 * Makefile.am (mono_SOURCES): renamed testjit to mono
948 * x86.brg: added debugging support
950 * testjit.c: added support for value types, CFG improvements
952 * emit-x86.c (enter_method): handle value types
953 (tree_allocate_regs): impl. a better way to handle chain rules
955 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
957 * x86.brg (INITOBJ): bug fix: initialize data before use,
960 2001-11-09 Miguel de Icaza <miguel@ximian.com>
962 * testjit.c (mono_analyze_stack): Remove compiler warning by
963 testing against NULL.
965 2001-11-09 Dick Porter <dick@ximian.com>
967 * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
969 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
971 * testjit.c (mono_analyze_stack): new BOX impl.
973 * x86.brg: implemented INITOBJ
975 * testjit.c (mono_analyze_stack): finished array support
976 (mono_analyze_stack): reimplemented DUP instruction
978 2001-11-08 Dietmar Maurer <dietmar@ximian.com>
980 * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
981 represents the address of the element. This way we can emit highly
982 optimized x86 instructions to access elements (using base+index+offset
985 2001-11-07 Miguel de Icaza <miguel@ximian.com>
987 * mempool.c: Include string.h to kill warning.
989 * testjit.c: Add typecast to kill warning.
991 * x86.brg: Include string.h to eliminate warning.
993 * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
996 2001-11-07 Dietmar Maurer <dietmar@ximian.com>
998 * emit-x86.c (enter_method): print out all method arguments
999 (x86_magic_trampoline): impl.
1000 (arch_create_simple_jit_trampoline): we use different trampolines
1001 for static methods (no need to write the address back into to
1004 2001-11-06 Dietmar Maurer <dietmar@ximian.com>
1006 * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
1007 use less the 16 bytes.
1009 * x86.brg: code cleanup
1011 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
1013 * testjit.c: bug fixes.
1015 * emit-x86.c (leave_method): print result values
1017 2001-11-03 Dietmar Maurer <dietmar@ximian.com>
1019 * emit-x86.c (enter_method): new debugging code
1020 (leave_method): new debbuging code, this functions are called
1021 when you use the new option --trace-calls
1023 2001-11-02 Dietmar Maurer <dietmar@ximian.com>
1025 * testjit.c: impl. STELEM_XX, STELEM_XX
1027 * x86.brg: impl. LDLEN, LDELEMA
1030 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
1032 * x86.brg: added some experimental code for CALL
1033 instructions - still not found the optimal way to do it.
1035 * testjit.c (map_stind_type): add support for value types with
1036 a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
1037 CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
1038 (ctree_create_newobj): impl.
1041 * emit-x86.c (tree_allocate_regs): removed allocation code for
1043 (get_address): use a simple, but bug free search instead of the
1044 buggy binary search.
1046 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
1048 * testjit.c: support virtual functions
1050 * x86.brg: support different addressing modes for calls
1052 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
1054 * testjit.c: impl. STFLD
1056 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
1058 * x86.brg: impl. CEQ
1060 2001-10-04 Dick Porter <dick@ximian.com>
1063 * emit-x86.c: include mono-endian.h not endian.h
1065 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
1067 * testjit.c (ctree_create_dup): really duplicate the tree.
1068 attach the arguments to the CALL node. Added a new macro to
1069 make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
1071 2001-10-01 Dietmar Maurer <dietmar@ximian.com>
1073 * interp.brg: the burm based interpreter: added the file as example.
1075 2001-09-27 Dietmar Maurer <dietmar@ximian.com>
1079 * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
1081 (map_stind_type): support enum types
1082 (map_ldind_type): support enum types
1084 * emit-x86.c (tree_allocate_regs): added code to support
1085 register allocation for addressing modes trees.
1086 (tree_emit): bug fix: we have to emit all mono_burg_functins. The
1087 previous impl. did not work for chain rules.
1088 (compute_branches): support for SWITCH statements
1090 * x86.brg: added rules to model x86 addressing modes
1092 2001-09-26 Dietmar Maurer <dietmar@ximian.com>
1094 * emit-x86.c (compute_branches): implemented SWITCH
1096 * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
1097 (map_ldind_type): add enumeration types.
1098 (map_stind_type): add enumeration types.
1100 * emit-x86.c (arch_compile_method): more documentation.
1102 * testjit.c: moved the architecture specific things to emit-x86.c
1103 and x86.brg. Added more documentation. code cleanup.
1105 2001-09-25 Dietmar Maurer <dietmar@ximian.com>
1107 * x86.brg: we now have different types of addresses: ADDR_L for local
1108 values, ADDR_A for arguments and ADDR_G for global addresses. We
1109 also use LDIND_XX token to load values from a specific address
1110 instead of LDLOC/STLOC.
1112 * testjit.c: use the new adressing scheme everywhere:
1113 LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)
1115 2001-09-24 Dietmar Maurer <dietmar@ximian.com>
1117 * testjit.c (main): fix bug in parameter parsing
1119 * x86.brg: impl. more opcodes
1121 2001-09-23 Dick Porter <dick@ximian.com>
1123 * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
1125 2001-09-23 Dietmar Maurer <dietmar@ximian.com>
1127 * testjit.c: use the memory pool to avoid memory leaks
1129 2001-09-22 Dietmar Maurer <dietmar@ximian.com>
1131 * x86.brg: increment the stack pointer after function calls
1133 2001-09-21 Dick Porter <dick@ximian.com>
1135 * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
1137 2001-09-21 Dietmar Maurer <dietmar@ximian.com>
1139 * x86.brg: implemented long MUL/DIV
1140 (MB_OPT_LEVEL): define optimisation level macro
1142 * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
1143 for operations like idiv. it is also possible to assign specific registers.
1145 2001-09-20 Dietmar Maurer <dietmar@ximian.com>
1147 * x86.brg: added basic support for long
1149 * testjit.c (mono_compile_method): implemented POP
1151 2001-09-19 Miguel de Icaza <miguel@ximian.com>
1153 * testjit.c (usage): Added a couple of more usage options.
1155 2001-09-19 Dietmar Maurer <dietmar@ximian.com>
1157 * x86.brg: added more floating point grammar
1159 * testjit.c (mono_compile_method): make local offsets negative
1161 * x86.brg: added some floating point trees
1163 * testjit.c (mono_compile_method): arguments on the runtime
1164 stack are at least 4 bytes
1166 * x86.brg: partly implemented 8,16 bit integers
1168 * testjit.c (get_address): mark basic blocks
1170 2001-09-18 Dietmar Maurer <dietmar@ximian.com>
1172 * x86.brg: added some rules to optimize code
1174 * testjit.c (get_address): use a binary search to get the address
1175 (main): added an option to debug the jit (-d)
1177 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
1179 * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
1181 2001-09-17 Miguel de Icaza <miguel@ximian.com>
1183 * testjit.c (mono_compile_method): Provide better error reporting.
1185 2001-09-17 Dietmar Maurer <dietmar@ximian.com>
1187 * testjit.c (tree_get_address): impl. to fix address bug
1188 (tree_get_address): make sure that we can only jump to the first
1189 instruction of a tree.
1191 * x86.brg: emit real code for calls
1193 * testjit.c (create_jit_trampoline): creates a function to trigger jit
1195 (mono_compile_method): reversed argument order
1197 2001-09-15 Dietmar Maurer <dietmar@ximian.com>
1199 * x86.brg (stmt): don't emit unnecessary register moves
1201 * testjit.c (tree_allocate_regs): free registers earlier
1203 2001-09-14 Dietmar Maurer <dietmar@ximian.com>
1205 * x86.brg: branch addresses are now resolved
1207 * testjit.c (compute_branches): compute address of branches
1209 * x86.brg: emit real x86 instructions
1211 * testjit.c: call objdump to disassemble the output
1213 2001-09-13 Dietmar Maurer <dietmar@ximian.com>
1215 * x86.brg: use the right offsets to access local variables
1218 * emit-x86.c: only save/restore callee saved registers if they are
1221 * testjit.c (tree_allocate_regs): use the new MonoRegSet to
1223 (mono_compile_method): changed the tree for mothod calls
1230 2001-09-10 Miguel de Icaza <miguel@ximian.com>
1232 * x86.brg: Use Unix assembly syntax.
1234 * emit-x86.c: support code, should be moved
1236 * testjit.c: Use GPtrArrays instead of GLists, as those are very
1237 inefficient at appends.
1239 * Renamed `create_new_leave' to `create_new_leaf'