1 2003-01-14 Martin Baulig <martin@ximian.com>
3 * Makefile.am: Link against gthread.
5 * jit.c: After realizing that mono-mutex doesn't work either
6 because it doesn't support recursive mutexes on FreeBSD, rewrote
7 the whole thread stuff to use gthread. This seems to fix this
8 weird deadlock in the debugger as well.
10 2003-01-12 Alp Toker <alp@atoker.com>
12 * exception.c: Typo fix: insinde -> inside
14 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
16 * exception.c (ves_icall_get_frame_info): skip one more frame and also
17 MONO_WRAPPER_RUNTIME_INVOKE wrappers
18 (x86_unwind_native_frame): disable unnecessary assertion
20 2003-01-07 Dietmar Maurer <dietmar@ximian.com>
22 * exception.c (ves_icall_get_frame_info): fix bug 36382
24 Tue Jan 7 15:15:41 CET 2003 Paolo Molaro <lupus@ximian.com>
26 * jit.c: handle wrapper_data in NEWOBJ/CALL.
28 2003-01-07 Dietmar Maurer <dietmar@ximian.com>
30 * jit.c (mono_analyze_stack): add check for NULL target in STFLD
32 2003-01-06 Martin Baulig <martin@ximian.com>
34 * debug.c (debugger_finished_mutex): Use a recursive mutex here.
36 * debug.c: Correctly handle the `debugger_finished_mutex'; it is
37 only unlocked by the pthread_cond_wait() in mono_debugger_wait().
39 2003-01-04 Jackson Harper <jackson@latitudegeo.com>
41 * debug.c: Move must_send_finished var declaration out of #if win32
42 block (this fixes the build on win32)
44 2003-01-05 Martin Baulig <martin@ximian.com>
46 * debug.c (mono_debugger_jit_exec): Custom version of mono_jit_exec();
47 this is used when we're running inside the Mono Debugger
48 (mono_debugger_wait): Put the waiting code into a function of its own.
50 * mono.c (main): Call mono_debugger_jit_exec() instead of
51 mono_jit_exec() if we're running inside the Mono Debugger.
53 2003-01-05 Martin Baulig <martin@ximian.com>
55 * debug.h (MonoDebugFormat): Added
56 `MONO_DEBUG_FORMAT_MONO_DEBUGGER'; this allows us to check whether
57 we're running inside the Mono Debugger prior to the args parsing.
59 2003-01-04 Martin Baulig <martin@ximian.com>
61 * debug.c (release_symbol_file_table): Only call this if we're
62 actually modifying the symbol tables.
63 (mono_debug_open): Always set the `mono_debugger_class_init_func'
64 for MONO_DEBUG_FORMAT_MONO; this stuff should also go into core dumps.
66 2003-01-03 Martin Baulig <martin@ximian.com>
68 * debug.c: Disable the mono debugger stuff on Windows.
70 2003-01-03 Martin Baulig <martin@ximian.com>
72 * debug.c (mono_debugger_trampoline_breakpoint_callback): New
73 function. This is called from the breakpoint trampoline to signal
74 the debugger and wait until it has reload the symbol tables.
76 * trampoline.c (get_breakpoint_trampoline): Call the new
77 mono_debugger_trampoline_breakpoint_callback() in the breakpoint
78 trampoline just before the breakpoint.
80 2002-12-31 Martin Baulig <martin@ximian.com>
82 * debug.c (MonoDebuggerSymbolFileTable): Added `global_symfile'
83 field to point to the MonoGlobalSymbolTable.
85 2002-12-30 Martin Baulig <martin@ximian.com>
87 * debug.c (MonoDebuggerInfo): Put back `symbol_file_modified'.
88 This variable now specifies that the symbol tables have been
89 modified after the last notification has been send. The debugger
90 uses this flag to check whether it needs to reload the symbol
92 (debugger_compile_method): Just send a notification to the
93 debugger, but don't set the modified flag. It may or may not be
94 set when the debugger gets the notification - depending on whether
95 the JIT compilation added a new method to the symbol tables.
97 2002-12-30 Martin Baulig <martin@ximian.com>
99 * debug.c (debugger_compile_method): This is a wrapper around
100 mono_compile_method() which always sends a notification to the
103 2002-12-30 Martin Baulig <martin@ximian.com>
105 * debug.c: Reload the symbol file table before sending the
106 notification event to the debugger.
107 (MonoDebuggerInfo): Removed `update_symbol_file_table'.
109 2002-12-31 Martin Baulig <martin@ximian.com>
111 * debug.c: Propertly lock everything and avoid race conditions.
112 (MonoDebuggerInfo): Removed the `symbol_file_modified' again.
114 2002-12-31 Duncan Mak <duncan@ximian.com>
116 * debug.c (initialize_debugger_support): Fix build error by
117 declaring ret at the top of the function.
119 2002-12-30 Martin Baulig <martin@ximian.com>
121 * debug.c: When running under the mono debugger, create a special
122 debugger thread; always protect the symbol tables with a mutex.
124 2002-12-28 Martin Baulig <martin@ximian.com>
126 * debug.c (MonoDebuggerInfo): Added `symbol_file_modified'; it's
127 incremented each time one of the symbol tables is modified.
129 Thu Dec 19 18:31:54 CET 2002 Paolo Molaro <lupus@ximian.com>
131 * jit.c: fix LDELEMA implementation here as well.
133 Wed Dec 18 11:42:58 CET 2002 Paolo Molaro <lupus@ximian.com>
135 * jit.c: handle CEE_CONV_OVF_U8_UN like CEE_CONV_OVF_I8_UN.
137 Wed Dec 18 11:36:04 CET 2002 Paolo Molaro <lupus@ximian.com>
139 * jit.c: query the thread abort signal from the runtime.
141 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
143 * jit.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
145 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
147 * jit.c (mono_analyze_stack): call the utility function
148 mono_field_from_token to avoid code duplication.
150 2002-12-02 Dietmar Maurer <dietmar@ximian.com>
152 * jit.c (mono_analyze_stack): added some additinal checks to verify IL code
154 * x86.brg (stmt): POP floating point stack correctly
156 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
158 * emit-x86.c (arch_emit_prologue): don't save caller saved
161 * exception.c (x86_unwind_native_frame): support exceptions inside
162 native code using gcc generated exception tables (-fexception).
164 2002-11-19 Dietmar Maurer <dietmar@ximian.com>
166 * exception.c: include some code from Zoltan Varga, but modified
169 2002-11-27 Dietmar Maurer <dietmar@ximian.com>
171 * exception.c: massive code cleanups. The code is still
172 architecture dependent, but it should be now possible to reuse the
173 complex parts for other architecture.
175 2002-11-15 Dick Porter <dick@ximian.com>
177 * jit.c: Pass the attach callback to mono_runtime_init().
179 2002-11-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
181 * jit.c: display the domain name in trace output.
183 2002-11-08 Dietmar Maurer <dietmar@ximian.com>
185 * x86.brg (reg): fix bug #2721
187 * jit.c (mono_runtime_install_handlers): impl.
189 2002-10-17 Martin Baulig <martin@gnome.org>
191 * debug.c (mono_debug_add_method): Make this actually work if we don't
192 have any lifetime information.
194 2002-10-15 Martin Baulig <martin@gnome.org>
196 * jit.cs (PUSH_TREE): Always set t->cli_addr here.
198 * debug.c (generate_line_number): Small fix to make this actually
199 work for more complex things.
201 2002-10-11 Dietmar Maurer <dietmar@ximian.com>
203 * x86.brg (freg): use fprem instead of fprem1
205 2002-10-03 Dietmar Maurer <dietmar@ximian.com>
207 * jit.c (ves_array_element_address): added check for out of range index
208 (mono_analyze_stack): added fix for bug #31654
210 2002-10-01 Martin Baulig <martin@gnome.org>
212 * debug.c: Don't create an .il file for the dynamic symbol file.
214 2002-10-01 Martin Baulig <martin@gnome.org>
216 * debug.c (MonoDebuggerInfo): Added mono_runtime_invoke().
218 2002-09-27 Martin Baulig <martin@gnome.org>
220 * debug.c (debug_load_method_lines): Don't use sigaction() on win32.
222 2002-09-27 Dick Porter <dick@ximian.com>
224 * mono.c: Tell glib what the program name is, by passing it the
225 name of the managed file we're executing
227 2002-09-26 Martin Baulig <martin@gnome.org>
229 * trampoline.c (x86_magic_trampoline): Don't insert the breakpoint
230 trampoline into the vtable, also use it for non-virtual methods,
231 remove the breakpoint when done.
233 2002-09-26 Martin Baulig <martin@gnome.org>
235 * debug.c (debug_load_method_lines): Block SIGCHLD while running
238 2002-09-26 Martin Baulig <martin@gnome.org>
240 * debug.c: Reworked the whole debugging stuff. We have now one
241 single `mono_debug_handle' which keeps a hashtable of
242 `AssemblyDebugInfo's (which may have different debugging formats).
243 The AssemblyDebugInfo is now created when the assembly is loaded,
244 but never when adding a class/type.
246 * mono.c: Initialize debugging stuff after corlib and the assembly
249 2002-09-25 Martin Baulig <martin@gnome.org>
251 * debug-private.h (DebugLineNumberInfo): Removed. There's now a
252 MonoDebugLineNumberEntry type in debug-mono-symfile.h which we're
254 (DebugMethodInfo): Removed `line_numbers'.
256 * debug.c: Reworked the line number generation; we're now using
257 the MonoDebugLineNumberEntry try for all debugging formats. This
258 type also includes the line number and IL offset, this allows the
259 JIT to produce better line number info: we only emit line number
260 information for source lines which actually have code.
262 2002-09-25 Martin Baulig <martin@gnome.org>
264 * debug.h: Removed external declaration of all functions which
265 should only be called from the Mono Debugger and also made them
266 static. Since the debugger gets their address from the
267 `MONO_DEBUGGER__debugger_info' vtable, there's no need to export
270 2002-09-25 Martin Baulig <martin@gnome.org>
272 Improved breakpoint support, we can now dynamically insert and
273 remove breakpoints at runtime and when called from withing the
274 Mono Debugger, we're using a special breakpoint trampoline.
276 * debug.h (mono_method_has_breakpoint): New method to check
277 whether to insert a breakpoint for a method.
278 (mono_insert_breakpoint): New method to insert a breakpoint.
279 (mono_insert_breakpoint_full): New method to insert a breakpoint,
280 takes a MonoMethodDesc.
281 (mono_remove_breakpoint): New method to remove a breakpoint.
283 * debug.c (mono_debugger_insert_breakpoint): New function for the
284 debugger. Should only be called from the debugger.
285 (mono_debugger_remove_breakpoint): Likewise.
287 * mono.c (main): Use mono_insert_breakpoint() to insert breakpoints.
289 * trampoline.c (get_breakpoint_trampoline): New static function to
290 create a special breakpoint trampoline for the debugger.
291 (x86_magic_trampoline): If we're running inside the Mono Debugger
292 and a breakpoint was requested for the method, generate a special
293 breakpoint trampoline.
295 * jit.c (mono_debug_methods): Removed, use mono_insert_breakpoint()
296 to insert a breakpoint.
297 (mono_debug_last_breakpoint_address): Removed.
298 (match_debug_method): Removed, use mono_method_has_breakpoint().
300 Wed Sep 25 12:04:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
302 * jit.c: reorder mono_runtime_cleanup () call since it needs the
303 engine still fully working.
305 2002-09-24 Martin Baulig <martin@gnome.org>
307 * debug.c (mono_debug_open): When we're invoked from inside the
308 Mono Debugger, set mono_debugger_class_init_func (exported in
309 metadata/class.c) to mono_add_type().
310 (mono_add_type): Call mono_debug_symfile_add_type().
312 Tue Sep 24 11:34:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
314 * jit.c: avoid including cil-coff.h (again). Optimize typeof (type).
315 Run finalize on domain cleanup.
316 * mono.c: call setlocale ().
317 * trampoline.c: clearer error message for invalid trampoline.
319 2002-09-21 Martin Baulig <martin@gnome.org>
321 * debug.c (MonoDebuggerSymbolFileTable): Use an actual typedef for this
322 instead of writing a byte blob.
323 (mono_debug_make_symbols): This doesn't touch the symbol tables anymore.
324 (mono_debug_add_method): Incrementally add the new method to the symbol
327 * exception.c (arch_handle_exception): If we have debugging support,
328 call mono_debugger_update_symbol_file_table () as well.
330 2002-09-20 Martin Baulig <martin@gnome.org>
332 * debug.c (mono_debug_add_method): The `MonoDebugVarInfo' now includes
333 the size of the variable.
335 2002-09-18 Dietmar Maurer <dietmar@ximian.com>
337 * linear-scan.c (mono_analyze_liveness): we can save 30% of needed
338 iterations if we visit blocks in reverse order.
340 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
342 * jit.c (mono_analyze_stack): cleaup of the array code
344 * exception.c: added patch from Julio Merno to fix bug #30048
346 * jit.c (mono_analyze_stack): code cleanup, fix bug #29365
348 2002-09-09 Dietmar Maurer <dietmar@ximian.com>
350 * x86.brg (LDELEMA): use x86_lea
352 2002-09-06 Martin Baulig <martin@gnome.org>
354 * debug.c (debug_update_il_offsets): Fixed a memory corruption bug.
355 If you were getting random crashes when using the JIT with debugging
356 turned on, this fixes it.
358 2002-09-06 Dietmar Maurer <dietmar@ximian.com>
360 * emit-x86.c (arch_emit_epilogue): use pop instead of mov
362 2002-09-05 Martin Baulig <martin@gnome.org>
364 * debug.c (MONO_DEBUGGER__debugger_info): New global data symbol
365 which is read by the debugger.
367 Wed Sep 4 14:06:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
369 * Makefile.am: link libmono directly into mono. Use a ld script
370 to reduce exported symbols.
372 2002-09-03 Martin Baulig <martin@gnome.org>
374 * debug.c (free_method_info): Make this actually work.
376 2002-09-03 Martin Baulig <martin@gnome.org>
378 * debug.h (MonoDebugFormat): Killed MONO_DEBUG_FORMAT_DWARF2_PLUS.
379 * debug-dwarf2-plus.c: Removed.
381 * debug-private.h (DebugMethodInfo): Removed the `method_info' field.
382 (AssemblyDebugInfo): Removed the old `symfile' field and renamed
383 `mono_symfile' to `symfile'.
385 * debug.c (mono_debug_open): Replaced the assembly argument with a
386 file name argument; you can now call this before loading the assembly.
387 (debug_generate_method_lines): The MonoDebugILOffsetInfo struct is gone,
388 we now use MonoSymbolFileLineNumberEntry's and a separate address array
389 instead; splitted out all MonoSymbolFileLineNumberEntry code into
390 debug_generate_il_offsets() and debug_update_il_offsets().
391 (mono_debug_add_method): Don't create the MonoDebugMethodInfo here; it's
392 created when reading the symbol file or from debug_load_method_lines().
393 (debug_load_method_lines): Create the MonoDebugMethodInfo for all methods.
395 * exception.c (arch_handle_exception): Call mono_debug_make_symbols() before
396 looking up an address.
398 * debug.c: Don't create the .il files for MONO_DEBUG_FORMAT_MONO.
400 * mono.c (main): Initialize debugging before loading the first assembly.
402 2002-08-28 Dick Porter <dick@ximian.com>
404 * mono.c: mono_set_rootdir() doesnt take any args now
406 * Makefile.am: Export HOST_CC for w32 builds
408 2002-08-28 Dietmar Maurer <dietmar@ximian.com>
410 * jit.c (mono_store_tree): only allocate vars if really necessary
412 2002-08-27 Martin Baulig <martin@gnome.org>
414 * debug.c: The mono symbol file is installed together with the assembly
415 it belongs to and it's used on a per-image basis.
417 Tue Aug 27 19:44:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
419 * mono.c: don't use the cil-coff header outside of the loader.
421 2002-08-27 Martin Baulig <martin@gnome.org>
423 * debug.c (mono_debugger_internal_get_symbol_files): Removed, we need
424 to use global variables for this since they're stored in a core file.
425 (mono_debugger_symbol_file_table_generation): New global variable.
426 (mono_debugger_symbol_file_table): New global variable.
427 (mono_debugger_update_symbol_file_table): New global function to update
428 the symbol file table.
430 2002-08-27 Martin Baulig <martin@gnome.org>
432 * trampoline.c (mono_generic_trampoline_code): New global variable.
433 (arch_create_jit_trampoline): Use the new global variable to store the
434 generic trampoline code instead of using a static one. This allows the
435 debugger to access this variable to check whether a method is a trampoline.
437 * debug.h (mono_generic_trampoline_code): Added external declaration.
439 2002-08-27 Martin Baulig <martin@gnome.org>
441 * debug.c (MonoDebugHandle): Moved the method hash into the
442 AssemblyDebugInfo struct since we need to use a separate hash for each
445 * debug.c: Added special undocumented command line argument to create a
446 symbol file for IL files on-the-fly. In this case, we also need to create
447 the IL files and parse them.
448 (mono_debugger_internal_get_symbol_files): Return something more reasonable.
450 2002-08-26 Martin Baulig <martin@gnome.org>
452 * debug.c (mono_debugger_internal_free_symbol_files): New function.
453 (mono_debugger_internal_symbol_files_changed): New global variable.
455 2002-08-24 Martin Baulig <martin@gnome.org>
457 * debug.c (mono_debugger_internal_get_symbol_files): New function.
459 2002-08-24 Martin Baulig <martin@gnome.org>
461 * debug.c (mono_debug_write_symbols): Added support for the new
464 * mono.c (main): The `--debug' argument now knows about a new
465 debugging format `mono' which will be used to display source lines
468 * debug.h (MonoDebugFormat): Added a new MONO_DEBUG_FORMAT_MONO
469 which will be used when displaying backtraces. It reads a new
472 2002-08-23 Martin Baulig <martin@gnome.org>
474 * jit.c (match_debug_method): Don't include runtime invoke methods
477 * mono.c (main): Accept `Main' as argument to --break to insert a
478 breakpoint on the application's main method.
480 2002-08-23 Martin Baulig <martin@gnome.org>
482 * debug-dwarf2.c (dwarf2_write_class_field): Don't include any static fields.
484 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
486 * exception.c (arch_handle_exception): don't set stack_trace to
487 null (so that it contains the full trace even when we rethrow the
490 2002-08-19 Nick Drochak <ndrochak@gol.com>
492 * x86.brg (mono_llmult_ovf): Simplified the code greatly by refactoring
493 the algebraic form we are using. This also eliminated a silly overflow
494 of the intermediate result that was causing troubles.
496 2002-08-16 Nick Drochak <ndrochak@gol.com>
498 * x86.brg (mono_llmult_ovf): Flip ALL the bits, dummy. Now negative numbers
501 2002-08-15 Nick Drochak <ndrochak@gol.com>
503 * x86.brg (mono_llmult_ovf): Fix so it throws an overflow when result
504 will not fit in 64 bits. Fixes bug #27375.
506 Wed Aug 14 17:31:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
508 * exception.c: updates for API changes in metadata/.
510 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
512 * jit.c (mono_jit_init): use ((gpointer)-1) as end_of_stack
513 address for the main thread.
515 2002-08-12 Dietmar Maurer <dietmar@ximian.com>
517 * jit.c (mono_analyze_stack): added support for Thread::Abort ()
519 2002-08-08 Dietmar Maurer <dietmar@ximian.com>
521 * exception.c (arch_handle_exception): simply return and let the
522 libpthread/kernel restore the context. This should work on recent
523 versions of linuxthreads.
525 * jit.c (mono_runtime_install_handlers): switch back to use
526 sigaction from libpthreads. As long as this does not make problems
527 we should use this instead of syscall.
529 2002-08-07 Dietmar Maurer <dietmar@ximian.com>
531 * jit.c: removed the createdelegate icall
532 (mono_analyze_stack): special case Array::Address()
534 2002-08-06 Dietmar Maurer <dietmar@ximian.com>
536 * emit-x86.c (arch_emit_prologue): make the call to
537 mono_get_lmf_addr relocatable.
538 (arch_jit_compile_cfg): do not waste memory
539 (arch_jit_compile_cfg): use a mempool to store native code. This
540 improves locality of code.
542 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
544 * jit.c (mono_analyze_stack): impl. CEE_MONO_RETOBJ
546 2002-07-30 Sergey Chaban <serge@wildwestsoftware.com>
548 * x86.brg (LOCALLOC): under Windows, if allocation size is bigger
549 than one page, it's necessary to allocate memory incrementally,
550 in page-size steps, performing stack-touch every time.
551 Also added LOCALLOC(CONST_I4) implementation.
553 2002-07-27 Dietmar Maurer <dietmar@ximian.com>
555 * jit.c (mono_get_runtime_method): code cleanup
557 * x86.brg: we do not need to save EAX/ECX/EDX in stmt:
559 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
561 * jit.c (mono_analyze_stack): added CEE_TAIL (but it is ignored)
563 Wed Jul 24 13:02:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
565 * jit.c, jit.h, exception.c: implemented stack walking function.
567 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
569 * x86.brg (ARG_OBJ): removed zero sized object warning
571 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
573 * jit.c (mono_allocate_excvar): mark excvar as volatile
575 * emit-x86.c (enter_method): use arch_get_argument_info to get
578 * jit.c (mono_analyze_stack): use arch_get_argument_info to get
580 (mono_analyze_stack): removed unused code
582 * emit-x86.c (arch_allocate_arg): impl.
584 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
586 * emit-x86.c (arch_allocate_var): fix alignment bug
588 * x86.brg (X86_CALL_BEGIN): add argument padding before emitting a call
590 * jit.c (mono_analyze_stack): s/k/k + 1/
592 * x86.brg (LOCALLOC): align to MONO_FRAME_ALIGNMENT
594 * emit-x86.c (arch_get_argument_info): impl.
596 2002-07-21 Miguel de Icaza <miguel@ximian.com>
598 * exception.c (arch_handle_exception): Memory leak fix.
600 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
602 * jit.c (mono_analyze_stack): avoid recursive inlining
604 Fri Jul 19 18:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
606 * emit-x86.c: temporary workaround for gcc bug.
607 * jit.h, jit.c, mono.c: move mono_jit_image to jit.c.
608 Don't include config.h in headers.
610 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
612 * x86.brg: correctly align valuetype arguments on the stack
614 * jit.c (mono_analyze_stack): do not compute frame size here.
616 * x86.brg: use macros to avoid code duplication for CALL opcodes,
617 compute frame size in x86.brg
619 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
621 * x86.brg (ARG_OBJ): allow zero sized ARG_OBJ
623 * exception.c (arch_handle_exception): removed duplicated code,
624 added support for exception filters
626 * jit.c (mono_jit_compile_method): support exception filters
628 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
630 * jit.c (mono_analyze_stack CEE_DIV): added fix from Zoltan Varga
632 * jit.c: s/ISSTRUCT/MONO_TYPE_ISSTRUCT/
634 * helpers.c (mono_map_ldind_type): added suggested changes from
635 Zoltan Varga (support MONO_TYPE_U), variou 64bit fixes
637 * jit.c (mono_analyze_stack): remove the vtype pointer from the
638 stack (fix bug #27420)
640 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
642 * x86.brg (CALL_VOID): fix bug #27751
643 (CONV_R_UN) use reg2 instead of reg1 for the negative check /fix bug 27849.
645 * jit.c (mono_analyze_stack): adjust valuetype size for pinvoke calls
647 i2002-07-11 Dietmar Maurer <dietmar@ximian.com>
649 * x86.brg (freg): new rule freg: CALL_R8 (this, reg)
651 2002-07-10 Dietmar Maurer <dietmar@ximian.com>
653 * emit-x86.c (arch_emit_prologue): added code to save LMF
655 2002-07-04 Dietmar Maurer <dietmar@ximian.com>
657 * x86.brg (LOCALLOC): added fix from Zoltan Varga (for bug #27396)
659 2002-07-05 Martin Baulig <martin@gnome.org>
661 * debug.c (mono_debug_add_method): Fix a bug in the `begin_scope' and
662 `end_scope' calculations when linear scan register allocation is disabled.
664 2002-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
666 * mono.c: removed the "RESULT: X" message.
668 2002-07-01 Dietmar Maurer <dietmar@ximian.com>
670 * exception.c (arch_get_call_finally): restore caller saved
671 register used by global reg. allocation when calling finally
672 handlers (fixes bug #24943).
674 2002-07-01 Dick Porter <dick@ximian.com>
676 * jit.c (mono_jit_exec): Removed unneeded argument to
677 mono_runtime_run_main()
679 2002-06-28 Martin Baulig <martin@gnome.org>
681 * debug.c (debug_generate_method_lines, mono_debug_add_method): Make methods
682 start on the nop instruction to make single-stepping into an already-JITed
685 2002-06-26 Martin Baulig <martin@gnome.org>
687 * debug.c (mono_debug_source_location_from_address): Added
688 `guint32 *line_number' argument. If it's not NULL, store the line number
689 there and return the file name without the line number.
691 * exception.c (ves_icall_get_trace): Fill in `sf->filename' and `sf->line'.
692 (ves_icall_get_frame_info): Likewise.
694 2002-06-25 Dick Porter <dick@ximian.com>
696 * jit.c (mono_jit_exec): Pass the assembly to mono_runtime_run_main
698 2002-06-22 Martin Baulig <martin@gnome.org>
700 * debug.c (mono_debug_source_location_from_address): Small fix, an
701 unsigned number can never be smaller than zero, make that check
704 2002-06-19 Dietmar Maurer <dietmar@ximian.com>
706 * exception.c (ves_icall_get_trace): new method to get the stack
707 trace from a Exception.
709 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
711 * jit.c (check_inlining): do not inline functions containing
712 calls to stack query functions
714 * exception.c (ves_icall_get_frame_info): impl.
716 Tue Jun 18 10:21:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
718 * invoke.c: marshal simple arrays correctly.
720 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
722 * x86.brg: added inlined versions of Math.Sin, Math.Cos, Math.Sqrt
724 * jit.c (mono_analyze_stack): impl. STARG
725 (mono_analyze_stack): impl. LDARGA
727 * exception.c (arch_handle_exception): correctly restore register
728 values when unwinding the stack (fixes bug 25698)
730 2002-06-09 Martin Baulig <martin@gnome.org>
732 * debug.c (mono_debug_open_image): For MONO_DEBUG_FORMAT_DWARF2_PLUS,
733 the `%s-debug.s' file is in the same directory than its assembly.
735 Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
737 * message.c, emit-x86.c: kill warnings.
739 2002-05-31 Dietmar Maurer <dietmar@ximian.com>
741 * x86.brg: buf fix in REMOTE_STIND_OBJ
742 (mono_ldvirtftn): impl.
743 (mono_ldintftn): impl.
746 Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
748 * mono.c: added --config command line option.
750 Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
752 * jit.c, jit.h: collect statistics about the number of basic blocks.
754 2002-05-31 Martin Baulig <martin@gnome.org>
756 * debug.c (mono_debug_address_from_il_offset): New public function.
757 (mono_debug_add_method): Improved local variable info: correctly handle
758 variables in registers and their start/end scopes.
760 2002-05-30 Martin Baulig <martin@gnome.org>
762 * debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
763 not "%p" which seems to be broken on Windows/mingw32.
765 2002-05-30 Dietmar Maurer <dietmar@ximian.com>
767 * x86.brg (reg): bug fix in LOCALLOC
769 * mono.c (main): new switch --nointrinsic to disable memcpy opt.
771 * x86.brg: added block copy/init optimizations from
772 Serge (serge@wildwestsoftware.com)
774 Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
776 * invoke.cs: lookup P/Invoke method address only when needed.
778 2002-05-29 Dietmar Maurer <dietmar@ximian.com>
780 * x86.brg: bug fix in REMOTE_STIND_OBJ
782 * invoke.c (arch_create_native_wrapper): handle pointers to value types
784 * helpers.h: use mono_ prefix for all functions
786 * jit.c (mono_analyze_stack): fixed SIZEOF
788 * x86.brg: impl. LOCALLOC, INITBLK
790 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
792 * x86.brg: impl. CKFINITE
794 * jit.c (mono_analyze_stack): impl. CEE_CALLI
796 * x86.brg (JMP): impl. JMP opcode
798 2002-05-27 Dietmar Maurer <dietmar@ximian.com>
800 * jit.c (mono_cfg_new): reserve additional space to store ESP when
801 calling finally handlers.
803 * exception.c (arch_get_call_finally): save ESP before calling
806 * helpers.c (map_arg_type): move some generic helper function into
809 * mono.c (usage): new option --breakonex
811 * exception.c (arch_exc_is_caught): only return FALSE if really
814 * jit.c (mono_thread_abort): free jit_tls
816 2002-05-24 Dietmar Maurer <dietmar@ximian.com>
818 * x86.brg (stmt): use memmove to cope with overlapping
819 blocks. This is not required by the specs, so we can remove it
820 later if it turns out to be too slow (and use memcpy).
822 * jit.c (mono_analyze_stack): moved const. folding from x86.brg
824 * x86.brg: CPBLK impl.
826 * emit-x86.c (tree_emit): modified to support 3 nonterminals per
827 rule (used for CPBLK).
829 Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
831 * mono.c: remove generated code from hash when benchmarking/testing
833 * invoke.cs: special case string ctors.
835 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
837 * *.c: code cleanups - tried to separate architecture dependent things.
839 2002-05-23 Martin Baulig <martin@gnome.org>
841 * debug.c (mono_debug_open): Don't call mono_debug_add_image().
842 (mono_debug_write_symbols): Only recreate the symbol file if
845 * debug-private.h (MonoDebugHandle): Added `dirty' flag.
847 * mono.c (main): Call mono_debug_add_image() here.
849 * jit.c (mono_thread_abort): If we have debugging support, call
850 mono_debug_make_symbols() and G_BREAKPOINT().
852 * exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
853 an unhandled exception.
855 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
857 * delegate.c: move the thread pool to metadata/threadpool.c, code
860 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
862 * exception.c (arch_exc_is_catched): impl. MS like exception
863 handling (added a check for unhandled exceptions)
865 2002-05-22 Martin Baulig <martin@gnome.org>
867 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
868 the assembler if necessary, ie. the assembler file is newer than the
869 symbol file or the symbol file does not exist.
871 * debug.c: Added "update_on_exit" argument to recreate the symbol file
874 * debug-dwarf2.c: Produce assembler code which is free of comments and
875 extra whitespaces so that it's suitable for `as -f'.
877 2002-05-22 Martin Baulig <martin@gnome.org>
879 * debug-dwarf2.c (dwarf2_write_section_end): Removed. This is not needed
880 and not supported by all assemblers.
881 (dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
884 * mono.c (--debug): Small fix in the argument parsing.
886 2002-05-22 Martin Baulig <martin@gnome.org>
888 * debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.
890 * mono.c: Applied patch from Miguel:
891 (--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
894 2002-05-21 Martin Baulig <martin@gnome.org>
896 * debug.c (mono_debug_source_location_from_address): Added support for the
899 2002-05-21 Martin Baulig <martin@gnome.org>
901 * debug.c (mono_debug_source_location_from_address): New function.
902 (mono_debug_il_offset_from_address): New function.
904 * exception.c (arch_handle_exception): If we have debugging support, include
905 information about the source location and IL offset in the stack trace.
907 2002-05-21 Dietmar Maurer <dietmar@ximian.com>
909 * jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
912 * x86.brg (stmt): removed unnecessary assertion
914 * jit.c (check_inlining): we cant inline throw instructions
915 (because it breaks some basic block requirements)
917 2002-05-21 Martin Baulig <martin@gnome.org>
919 * debug-private.h (MonoDebugFlags): New enum typedef.
921 * debug.c (mono_debug_open): Added a few useful arguments. See the manpage
924 2002-05-21 Martin Baulig <martin@gnome.org>
926 * debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
927 a `MonoAssembly *' argument instead of a `char *filename' one. Also added
928 `const char **args' argument.
930 * mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
931 `int verbose' argument and made it public.
932 (mono_jit_compile_class): New public function, moved the code to compile
933 all methods in a class here from main().
934 (--compile): The argument can now also be an image (in `@imagename' format).
935 Updated documentation for this command line argument.
936 (--precompile): New command line argument to precompile an image/class/method
937 before executing the main app. This argument can be given multiple times.
938 (--break): Renamed the "--debug" command line argument to "--break".
939 (--debug): New command line argument to specify the debugging format.
940 (--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
941 (--debug-args): New command line argument. This is a comma-separated list of
942 additional arguments for the symbol writer.
943 (usage): Beautified the help text a bit.
945 * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
946 public mono_jit_compile_image() function rather than duplication this
949 2002-05-21 Martin Baulig <martin@gnome.org>
951 * debug-dwarf2-plus.c: This is now working again :-)
953 * debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
954 we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
955 one for the fallback MONO_DEBUG_FORMAT_DWARF2.
957 2002-05-21 Martin Baulig <martin@gnome.org>
959 * jit.c (mono_debug_handle): Removed this global variable.
961 * debug.c (mono_debug_close): Removed.
962 (mono_debug_cleanup): New global function.
963 (mono_debug_add_image): New global function.
964 (mono_debug_handle_from_class): New global function.
965 (mono_debug_write_symbols): New global function.
966 (mono_debug_add_type): Removed `MonoDebugHandle *' argument.
967 (mono_debug_add_method): Likewise.
969 2002-05-21 Martin Baulig <martin@gnome.org>
971 Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
972 file for all assemblies. Currently, the JIT doesn't put all methods
973 from a single assembly into a continuous region of memory. We were
974 previously creating valid DWARF 2 files for this, but unfortunately
975 GDB's symbol tables get messed up when it reads more than one such file.
977 * debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
978 `next_idx', `methods', `type_hash', `source_files' and `format'
979 into the MonoDebugHandle.
981 * debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
982 not on the AssemblyDebugInfo.
983 (mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().
985 * debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
986 mono_debug_write_dwarf2().
987 (mono_debug_open_assembly_dwarf2): Removed.
988 (mono_debug_close_assembly_dwarf2): Removed.
990 * debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
991 mono_debug_write_stabs().
992 (mono_debug_open_assembly_stabs): Removed.
993 (mono_debug_close_assembly_stabs).
995 * debug-dwarf2-plus.c: This is currently broken. :-(
997 2002-05-20 Martin Baulig <martin@gnome.org>
999 * debug.h (mono_debug_format): New global variable.
1000 (MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.
1002 * debug-private.h (MonoDebugHandle): Added `objfiles' field which is
1003 a whitespace separated list of symbol files.
1004 (AssemblyDebugInfo): Added `objfile' filed which is the name of the
1007 * mono.c (main): Pass the assembly file name to mono_debug_open_file().
1009 * debug.c (mono_debug_make_symbols): Link all symbol files into a big
1010 `<assemblyname>.o' symbol file.
1012 2002-05-20 Martin Baulig <martin@gnome.org>
1014 * debug.c (debug_load_method_lines): Check whether the assembly file
1015 is newer than the IL file and recreate the IL file if necessary.
1017 2002-05-20 Miguel de Icaza <miguel@ximian.com>
1019 * mono.c Updated copyright years.
1021 2002-05-18 Miguel de Icaza <miguel@ximian.com>
1023 * mono.c (usage): Relayout command line options.
1025 2002-05-17 Dietmar Maurer <dietmar@ximian.com>
1027 * x86.brg (reg): fixed array bound check
1029 * emit-x86.c (enter_method): print method signature
1031 * exception.c (arch_handle_exception): set trace info before we
1034 2002-05-16 Dietmar Maurer <dietmar@ximian.com>
1036 * jit.c (mono_find_final_block): make it work with mcs
1038 * x86.brg: buf fix. if exception variable is allocated to a register.
1040 * jit.c (mono_find_final_block): bug fix.
1042 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
1044 * delegate.c (arch_end_invoke): fix bug #24653, simplified the
1045 code using new runtime_invoke feature.
1047 * jit.c (mono_analyze_flow): try blocks are followed by handler
1048 blocks, so we need to add all handler blocks as succesors.
1049 (mono_thread_start_cb): set end_of_stack
1051 * exception.c (arch_handle_exception): correctly save/restore caller
1054 * emit-x86.c (arch_emit_prologue): correctly save/restore caller
1057 * jit.c (mono_cfg_new): allocate space for caller saved registers.
1059 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
1061 * jit.c: only use one TLS slot to store jit data
1063 * exception.c (arch_handle_exception): print function signature,
1064 use thread relative end_of_stack
1066 2002-05-13 Dietmar Maurer <dietmar@ximian.com>
1068 * jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
1069 store them as 32 bit integers.
1070 (mono_analyze_stack): we need to generate a temporary var for
1071 SHL/SHR because the tree allocator can fail otherwise
1073 * exception.c (arch_handle_exception): EIP now points to the call
1074 instruction, not to the instruction after the call. This fixes the
1075 bug reported by Linus Upson (tests/exception8.cs)
1077 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
1079 * jit.c (mono_analyze_flow): always allocate the forest array
1080 (mono_stack_duplicate_used_var): impl.
1081 (mono_copy_used_var): impl.
1083 * x86.brg: bug fix in SHR/SHL
1085 * emit-x86.c (arch_emit_prologue): check if live_in_set != NULL
1087 2002-05-11 Sergey Chaban <serge@wildwestsoftware.com>
1089 * mono.c: new --fast-iconv command line option
1090 to enable fast FP-to-integer conversion code.
1091 * jit.c, jit.h: added global variable to store state
1092 for the above option. This optimization is disabled
1094 * x86.brg: added code to emit fast FP-to-integer
1095 conversion sequences.
1097 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
1099 * emit-x86.c: simple definite assignment analysis optimization for
1100 uninitialized locals.
1102 Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
1104 * x86.brg, emit-x86.c: patch the branch targets with x86_patch().
1106 2002-05-10 Dietmar Maurer <dietmar@ximian.com>
1108 * linear-scan.c (mono_update_gen_set): improvement/bug fix
1110 * x86.brg: added additional rules to handle global allocated registers
1112 * mono.c (usage): the option is called --nols, and it dissables
1115 * x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8
1117 2002-05-09 Dietmar Maurer <dietmar@ximian.com>
1119 * linear-scan.c: linear scan reg. allocation and data flow analysis
1120 use Paolo's great bitset implementation.
1122 * jit.c (arch_allocate_var): add live range info
1123 (mono_cfg_add_successor): create list of successors for basic
1126 * mono.c (main): new option --ls to enable linear scan
1128 * exception.c (arch_handle_exception): print instruction pointer
1129 relative to method start address.
1131 * jit.c (mono_print_ctree): print register number if locals are
1132 allocate in registers.
1134 * emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
1135 (arch_emit_epilogue): take care when restoring save registers,
1136 because the stack pointer may has changed.
1138 * x86.brg: s/VAROFFSET/VARINFO/
1139 modified to support global register allocation
1141 Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
1143 * jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.
1145 2002-05-03 Sergey Chaban <serge@wildwestsoftware.com>
1147 * x86.brg: more coni4 optimizations
1148 MUL: generate optimized code for some consts other
1149 than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
1150 DIV_UN: multiply with reciprocal instead of dividing;
1152 2002-05-03 Dietmar Maurer <dietmar@ximian.com>
1154 * x86.brg: use VAROFFSET macro
1156 * emit-x86.c (tree_emit): allocate space for spilled regs in
1157 activation frame instead of pushing them to the stack.
1159 * x86.brg: replace BXX with CBRANCH/COMPARE
1160 replaced CXX CSET/COMPARE
1162 * emit-x86.c (arch_allocate_regs): improved register allocation
1164 2002-05-02 Dietmar Maurer <dietmar@ximian.com>
1166 * delegate.c (mono_delegate_cleanup): signal semaphore in order to
1169 2002-04-30 Dick Porter <dick@ximian.com>
1171 * mono.c (main): Tell glib to not abort when g_log() etc print
1174 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
1176 * x86.brg: opt. LDELEMA impl.
1177 (MUL) use shift when possible.
1178 (DIV) use shift when possible.
1179 impl. various opt. with coni4
1181 * exception.c (arch_handle_exception): use ctx->SC_EBP in
1182 end_of_stack check as suggested by Linus Upson <linus@linus.com>
1184 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
1186 * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.
1188 * exception.c: included the Freebsd patch from Sandro Tolaini
1189 <sandro@focuseek.com>
1191 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
1193 * mono.c, jit.c: use mono_runtime_run_main ().
1195 2002-04-29 Dietmar Maurer <dietmar@ximian.com>
1197 * jit.c (mono_analyze_stack): dont call methods on Object with
1198 METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
1200 * x86.brg: added more CONV_U rules
1202 * jit.c (mono_analyze_stack): avoid recursive call of virtual
1203 methods: fixes Bug #23778
1204 (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
1206 * exception.c (arch_handle_exception): only g_assert(cleanup) if
1209 2002-04-27 Patrik Torstensson <patrik.torstensson@intel.com>
1211 * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
1213 2002-04-27 Martin Baulig <martin@gnome.org>
1215 * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
1216 there's already `epilog' so we don't need `epilogue_begin'.
1218 * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
1219 size of the method's code.
1221 2002-04-25 Martin Baulig <martin@gnome.org>
1223 * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
1226 2002-04-25 Dietmar Maurer <dietmar@ximian.com>
1228 * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
1229 added CONV_OVF_I4 (fix bug #23808)
1231 2002-04-23 Dietmar Maurer <dietmar@ximian.com>
1233 * x86.brg: code cleanup - use x86_patch ()
1235 * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
1236 (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
1238 * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
1239 because it slows down performance.
1241 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
1243 * emit-x86.c: enter_method handles 8-byte aligned parameters.
1245 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
1247 * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
1250 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
1252 * jit.c (check_inlining): added statistics about inlineing
1254 * mono.c (usage): new switch --noinline to disable inlining
1256 * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
1257 inline methods (to keep semantics)
1259 * x86.brg: added constant folding for inegers
1261 * emit-x86.c (tree_allocate_regs): handle the special case when
1262 chain rules need a register.
1264 2002-04-19 Dietmar Maurer <dietmar@ximian.com>
1266 * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
1268 * jit.c (check_inlining): better inlining support
1270 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
1272 * x86.brg: LDLEN uses max_length instead of bounds[0]
1273 * jit.c: support for new szarray format
1275 2002-04-18 Dietmar Maurer <dietmar@ximian.com>
1277 * jit.c (check_inlining): added inlining support
1279 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
1281 * x86.brg: optimized version of castclass and isinst
1283 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
1285 * emit-x86.c, invoke.c: track time spent compiling.
1287 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
1289 * emit-x86.c, invoke.c: call profile callbacks if needed.
1290 * jit.c, jit.h, mono.c: add --profile command line option.
1292 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1294 * jit.h: included mono/io-layer/io-layer.h to avoid breaking
1295 compilation under windows when upgrading mingw and w32api to
1296 version 1.3 (thanks Dick!).
1298 2002-04-15 Patrik Torstensson <patrik.torstensson@labs2.com>
1300 * jit.c: changed the array icalls to use full names
1302 2002-04-15 Dietmar Maurer <dietmar@ximian.com>
1304 * x86.brg: check the this pointer before calling
1305 non-virtual functions
1307 * emit-x86.c (arch_emit_prologue): initialize local vars.
1309 * x86.brg: removed incredible clumsy code
1311 2002-04-13 Martin Baulig <martin@gnome.org>
1313 * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
1314 the location of a variable.
1315 (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
1316 instead of a stack offset and use dwarf2_write_variable_location() to write
1319 2002-04-13 Martin Baulig <martin@gnome.org>
1321 * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
1324 2002-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1326 * Makefile.am: use of the new '-s' option in monoburg.
1328 2002-04-12 Martin Baulig <martin@gnome.org>
1330 * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
1333 2002-04-10 Sergey Chaban <serge@wildwestsoftware.com>
1334 * win32-exception: added Win32 SEH exception filter that translates
1335 CONTEXT to sigcontext;
1337 * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
1338 in a platfrom-dependent way;
1340 * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
1341 and avoid io-layer includes;
1343 * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
1346 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
1348 * delegate.c (arch_end_invoke): restore output arguments
1350 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
1352 * jit.c: call mono_runtime_init ().
1354 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
1356 * jit.c (mono_jit_cleanup): added more statistics
1358 * invoke.c (arch_create_native_wrapper): special case EndInvoke -
1359 we need to pass the MonoMethod pointer as first argument.
1361 * delegate.c (mono_async_invoke): notify all listeners, not only a
1363 (arch_end_invoke): we now pass a MonoMethod as first parameter and
1364 use arch_method_call_message_new() to access the stack.
1365 (arch_end_invoke): wait until we really finished processing
1366 (async_invoke_abort): notify all listeners, not only a
1369 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
1371 * message.c (arch_return_value): impl.
1372 (arch_method_return_message_restore): consider delegate BeginInvoke
1374 * jit.c: removed jit_exec_main()
1376 * delegate.c (arch_begin_invoke): use the message builder to make
1377 it architecture independent - still needs more cleanup.
1379 2002-04-05 Dietmar Maurer <dietmar@ximian.com>
1381 * delegate.c (mono_delegate_ctor): support for transparent proxy
1383 * x86.brg (freg): bug fix in CONV_R* opcodes
1385 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
1387 * message.c: added documentation
1389 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
1391 * mono.c (main): use --trace instead of --trace-calls
1393 * x86.brg: impl. REMOTE_STIND_XX
1395 * message.c (mono_store_remote_field): impl.
1397 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
1399 * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
1401 * message.c (mono_load_remote_field): impl.
1403 * jit.c (mono_analyze_stack): only call marshalbyref methods
1405 (mono_analyze_stack): consider marshalbyref objects in LDFLD
1407 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
1409 * x86.brg: kill pointer arithmetric.
1411 2002-03-28 Martin Baulig <martin@gnome.org>
1413 * jit.c (mono_debug_insert_breakpoint): New global variable.
1414 (mono_debug_last_breakpoint_address): New global variable.
1416 * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
1417 non-zero, insert a breakpoint; if it's positive, decrement it when done.
1418 Set `mono_debug_last_breakpoint_address' to the address of the last inserted
1421 * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
1422 `mono_debug_last_breakpoint_address', also documented them here.
1424 2002-03-28 Martin Baulig <martin@gnome.org>
1426 * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
1427 (AssemblyDebugInfo): Added `format'.
1429 * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
1430 this allows us choose the format on a per-assembly basis.
1431 (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
1432 to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
1434 (debug_generate_method_lines): Generate correct IL offsets.
1436 2002-03-28 Martin Baulig <martin@gnome.org>
1438 * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
1440 * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
1442 * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
1443 `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
1445 * debug.c (debug_generate_method_lines): Don't return if we don't have line
1446 numbers, we still need to generate the IL offsets here. Emit line numbers
1447 for `prologue_end_offset' (the first line of actual code) and
1448 `epilogue_begin_offset' (the line of the method's closing brace).
1449 Don't crash if cfg->bblocks [i].forest is NULL.
1450 (mono_debug_add_method): Don't crash if we don't have line numbers.
1451 Initialize the newly added fields.
1453 * debug-stabs.c: Record first and last line, emit filename info at the
1454 beginning of the stab file, gdb ignores the types otherwise.
1456 * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
1457 emit line number info for the first and last line.
1459 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
1461 * invoke.c (arch_create_delegate_trampoline): impl.
1463 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
1465 * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
1466 with the jit runtime to easy embedding. main() is moved to mono.c, now.
1467 * jit.c: use opcode names from libmetadata.
1468 * debug.h, debug.c: constify char* argument.
1470 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
1472 * jit.c: catching SIGSEGV again, added proxy support
1474 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
1476 * delegate.c (mono_delegate_init): remove unused worker threads
1478 2002-03-27 Mike Kestner <mkestner@speakeasy.net>
1480 * delegate.c (arch_get_delegate_invoke): malloc a bigger area
1482 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
1484 * jit.c: remove glib mem vtable code.
1486 2002-03-26 Martin Baulig <martin@gnome.org>
1488 * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
1489 lines if we don't have line number information.
1490 (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
1493 * debug-stabs.c (write_method_stabs): Don't generate method lines if
1494 we don't have line number information. Use `minfo->method_info.this_offset'
1495 instead of hardcoding 8.
1497 * debug.c (debug_generate_method_lines): Don't crash if we don't have
1498 line number information.
1499 (mono_debug_open_assembly): Don't generate line numbers for
1500 MONO_DEBUG_FORMAT_DWARF2_PLUS.
1501 (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
1502 but it in the new `this_offset' field.
1504 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
1506 * debug.c (debug_generate_method_lines): Use correct addresses for
1509 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
1511 * jit.c: do not set the glib mem vtable anymore.
1512 * Makefile.am: link to libmonoutils.
1514 2002-03-25 Martin Baulig <martin@gnome.org>
1516 * debug.h (mono_debug_make_symbols): Documented this function.
1518 2002-03-24 Martin Baulig <martin@gnome.org>
1520 * debug.c (mono_debug_add_method): Include the `this' offset in
1521 the `minfo->method_info.param_offsets' array.
1523 2002-03-23 Martin Baulig <martin@gnome.org>
1525 * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
1526 to do it before the X86_CMP.
1527 (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
1528 (reg: CLT (lreg, lreg)): Likewise.
1529 (reg: CLT_UN (lreg, lreg)): Likewise.
1530 (reg: CLT_UN (lreg, lreg)): Likewise.
1531 (reg: CGT (lreg, lreg)): Likewise.
1532 (reg: CGT (lreg, lreg)): Likewise.
1533 (reg: CGT_UN (lreg, lreg)): Likewise.
1534 (reg: CGT_UN (lreg, lreg)): Likewise.
1536 2002-03-23 Martin Baulig <martin@gnome.org>
1538 * debug-private.h (AssemblyDebugInfo): Added `_priv'.
1540 * debug-dwarf2-plus.c
1541 (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
1542 (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
1543 (mono_debug_write_assembly_dwarf2_plus): Only call
1544 mono_debug_update_symbol_file() here.
1546 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
1548 * jit.c: inter strings before executing a method.
1549 Do not intern command line arguments anymore.
1551 2002-03-21 Martin Baulig <martin@gnome.org>
1553 * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
1555 * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
1556 been created by MCS and fills in all machine dependent stuff.
1558 * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
1559 removed everything which is already in MonoDebugMethodInfo.
1561 * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
1562 (mono_debug_make_symbols): Don't open the file or call as, this is done in the
1565 * jit.c (main): Added "--dwarf-plus" command line option to use the new
1566 MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
1568 2002-03-21 Dietmar Maurer <dietmar@ximian.com>
1570 * jit.c (usage): new option to specify maximum number of worker threads
1571 (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
1573 * delegate.c (async_invoke_abort): added support for asynchronous exceptions
1574 (arch_get_async_invoke): notify listeners before we call the
1575 asynchronous callback
1577 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
1579 * delegate.c (async_invoke_thread): support for domains
1580 (async_invoke_thread): create workers only when needed
1582 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
1584 * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
1586 2002-03-18 Dietmar Maurer <dietmar@ximian.com>
1588 * x86.brg: impl. lreg: XOR (lreg, lreg)
1589 impl. REM (freg, freg)
1591 2002-03-17 Martin Baulig <martin@gnome.org>
1593 * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
1596 * debug-dwarf2.c: Added support for strings and arrays.
1598 2002-03-17 Martin Baulig <martin@gnome.org>
1600 * debug.c (mono_debug_get_type): Recursively call this for all function members
1602 (mono_debug_add_method): Don't mangle function names, this must be done by the
1603 debugger backend if the debugging format needs mangled names.
1605 * debug-dwarf2.c: Improved support for classes, added member functions.
1607 2002-03-16 Martin Baulig <martin@gnome.org>
1609 * debug.c (mono_debug_get_type): Recursively call this for all members and
1610 parent classes of a class type.
1612 * debug-dwarf2.c: Added basic support for classes. Set source language to C++
1613 since GDB doesn't like Java very much.
1615 2002-03-16 Martin Baulig <martin@gnome.org>
1617 * debug-dwarf2.c: Added support for enums.
1619 2002-03-15 Martin Baulig <martin@gnome.org>
1621 * debug.c (mono_debug_get_type): Recursively call this for all members
1624 * debug-dwarf2.c: Added support for structs.
1626 2002-03-15 Dietmar Maurer <dietmar@ximian.com>
1628 * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
1629 to new MonoLMF layout
1631 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
1633 * emit-x86.c (arch_create_native_wrapper): new code to generate
1634 wrappers for calling native functions.
1635 (arch_create_native_wrapper): free allocated strings
1636 (arch_handle_exception): made mono_jit_info_table domain dependent
1638 2002-03-14 Martin Baulig <martin@gnome.org>
1640 * debug.c (MonoDebugFormat): New public enums specifying which debugging
1642 (mono_debug_open_file): Added MonoDebugFormat argument.
1643 (mono_debug_make_symbols): Don't take an argument to make it easier to call
1644 this function from GDB. It's now safe to call this function multiple times;
1645 it'll always write a complete debugging file.
1647 * debug.c: Splitted this file into a general part which remains in this file
1648 and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
1649 All public functions now call a corresponding format specific function.
1651 * debug.c: The following changes are private to debug.c:
1652 (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
1653 (record_line_number, debug_generate_method_lines): New private functions.
1654 (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
1655 calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
1656 mono_debug_open_assembly_dwarf2).
1657 (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
1658 now safe to call this function multiple times.
1659 (mono_debug_get_type): New public function. This takes a `MonoClass *' and
1660 returns an unique index for this type. It's used to ensure that we only write
1661 each class once to the debugging file.
1662 (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
1663 data structure, but don't directly write to the debugging file. This is done
1664 later from mono_debug_write_assembly().
1666 * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
1667 debugging output. Call mono_debug_close() on cleanup if necessary.
1669 2002-03-14 Martin Baulig <martin@gnome.org>
1671 * debug-private.h: New private header file.
1673 * debug-stabs.c: Added the stabs type generation stuff which was
1674 previously in debug.c.
1676 * debug-dwarf.c: Started to implement type support. We're currently
1677 only writing this most basic types to the dwarf file, but this will
1680 2002-03-13 Martin Baulig <martin@gnome.org>
1682 * debug-stabs.c, debug-dwarf2.c: New files containing my new
1683 debugging code. They're now in CVS, but not yet used anywhere.
1685 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
1687 * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
1688 macros, included new delegate code from Daniel Stodden.
1691 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
1693 * jit.c: verify that corlib and runtime are in sync.
1695 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
1697 * emit-x86.c, jit.c: use the debug-helpers facilities to
1698 describe and match a method when debugging.
1700 2002-03-10 Martin Baulig <martin@gnome.org>
1702 * emit-x86.c (arch_compile_method): When emitting stabs debugging
1703 output, put a nop instruction at the start of all functions so that
1704 the adresses won't change when using --debug.
1706 * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
1707 the bytecode area, stabs needs a line number in the .il file. Use the
1708 new info->moffsets to get the line number.
1709 (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
1710 `moffsets' is an array of `total_lines' fields (total number of lines
1711 in the .il file); for each line in the .il field, this array contains
1712 the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
1713 of a method and 0 otherwise.
1714 (debug_load_method_lines): Read the whole .il file and initialize the
1715 info->moffsets field.
1717 2002-03-09 Martin Baulig <martin@gnome.org>
1719 * x86.brg (DIV_UN): Clear EDX before performing the division and remove
1720 the unnecessary CDQ instruction.
1722 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1724 * jit.c (mono_analyze_stack): only load addresses of value types
1725 on the runtime stack.
1727 2002-03-07 Duncan Mak <duncan@ximian.com>
1729 * Makefile.am: A small patch fixing errors in vpath-based builds
1730 (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
1731 committed for Daniel Stodden <stodden@in.tum.de>.
1733 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1735 * jit.c: Boehm-GC enable.
1737 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
1739 * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
1740 realloc that code sometimes!
1742 * emit-x86.c (mono_compute_branches): support several types of
1745 2002-03-06 Dietmar Maurer <dietmar@ximian.com>
1747 * x86.brg: impl. MUL_OVF_UN (reg, reg)
1749 * jit.c (mono_find_final_block): find correct finally handler.
1751 * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
1752 caller saved registers.
1754 2002-03-05 Dietmar Maurer <dietmar@ximian.com>
1756 * x86.brg: use x86_widen_reg for CONV opcodes
1758 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
1760 * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
1762 * emit-x86.c (arch_handle_exception): big fix - dont use
1763 uninitialized next_bp
1764 (arch_compile_method): make the jit thread save
1765 (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
1766 to avoid need of recursive mutexes
1768 * x86.brg: use new mono_assert macros
1770 2002-02-28 Dietmar Maurer <dietmar@ximian.com>
1772 * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
1773 calling into unmanaged code (arch_compile_method).
1775 * x86.brg: impl. CONV_I4 (freg) with correct rounding
1776 (lreg): impl CALL_I8(INTF_ADDR)
1777 impl. CONV_R_UN (reg)
1780 2002-02-27 Dietmar Maurer <dietmar@ximian.com>
1782 * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
1784 2002-02-26 Dietmar Maurer <dietmar@ximian.com>
1786 * x86.brg: bug fix in CLT(lreg,lreg)
1787 (reg): bug fix in CONV_OVF_I4(lreg)
1788 (lreg): replaced x86_call_reg with x86_call_code
1790 * emit-x86.c (mono_add_jump_info): impl.
1791 (mono_compute_branches): patch real jump address (instead of
1792 emitting code twice)
1794 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1796 * x86.brg: optimize cmp reg,0 -> test reg.
1798 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1800 * jit.h, jit.c, emit-x86.c: Added a few statistics counters
1801 and the --stats command line option to print them.
1802 Fixed memory leak in arch_compile_method () when a method's code is
1803 found in the cache. Fix magic trampoline to deal with static calls.
1805 2002-02-21 Dietmar Maurer <dietmar@ximian.com>
1807 * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN
1809 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
1811 * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
1812 (arch_create_jit_trampoline): cache trampoline code
1814 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1816 * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
1818 (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
1820 * x86.brg: do not encode exception objects into the instruction
1821 stream, because they are domain dependend. Use
1822 arch_get_throw_exception_by_name() instead;
1824 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1826 * jit.c: intern command line arguments.
1828 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
1830 * jit.c (mono_analyze_stack): use the magic trampoline for all
1831 calls (since we cant store the address of compiled code in
1833 (mono_analyze_stack): imp. LDSTR for shared code
1835 * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
1836 (arch_compile_method): add a cache for compiled methods to avoid
1837 recompilation. dont use method->addr to store domain dependent
1840 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1842 * x86.brg: impl. BLE,BGT for freg
1844 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1846 * emit-x86.c: handle unreachable code. Eliminate some unneeded
1848 * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
1849 main(). Add --compile classname and --ncompile num command line
1850 options to do performance evaluation of the jitter (and help
1853 2002-02-15 Dietmar Maurer <dietmar@ximian.com>
1855 * emit-x86.c (arch_compile_method): bug fix in static delegate
1858 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
1860 * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
1862 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
1864 * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
1866 2002-02-13 Miguel de Icaza <miguel@ximian.com>
1868 * jit.c (arch_allocate_var): Only assert that the alignment is
1869 at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
1871 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1873 * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
1875 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1877 * emit-x86.c: make x86_magic_trampoline() handle call instructions
1878 with an imm8 displacement. x86.brg not yet changed to take advantage
1881 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1883 * jit.c: use opcode info from libmetadata to do flow analysis
1886 2002-02-06 Dietmar Maurer <dietmar@ximian.com>
1888 * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking
1890 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
1892 * x86.brg: use element_class for type check
1894 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
1896 * jit.c (main): impl. __array_Address icall
1898 * mempool.c (mono_mempool_alloc): handle large block allocation
1900 2002-02-01 Dietmar Maurer <dietmar@ximian.com>
1902 * x86.brg: impl. SHL/SHR/CLT for 64 bit values
1904 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
1906 * x86.brg: impl. CEQ(lreg,lreg)
1908 * jit.c (mono_analyze_stack): impl. LDVIRTFTN
1909 (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
1911 * x86.brg: removed some dead code.
1913 2002-01-18 Dietmar Maurer <dietmar@ximian.com>
1915 * jit.c (arch_allocate_var): fixed alignment bugs
1917 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
1919 * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
1921 2002-01-16 Dietmar Maurer <dietmar@ximian.com>
1923 * jit.c (main): install the trampoline before we start to create
1926 * x86.brg: impl. CLT_UN, CGT_UN
1928 * emit-x86.c (leave_method): added check for null object
1929 (enter_method): consider byref arguments
1931 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
1933 * x86.brg: bug fix in CONV_OVF_I1_UN
1934 impl. ADD_OVF, MUL_OVF
1935 impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
1936 (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
1937 (EMIT_COND_EXCEPTION): added signed flag
1939 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
1941 * jit.c: implement stloc, ldloc, ldloca.
1943 2002-01-11 Dietmar Maurer <dietmar@ximian.com>
1945 * jit.c (mono_analyze_stack): fixed calculation of last_instr
1947 * x86.brg (LDLEN): emit null_reference exception
1949 (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
1951 2002-01-04 Dietmar Maurer <dietmar@ximian.com>
1953 * x86.brg: bug fix in CASTCLASS
1955 2001-12-21 Dietmar Maurer <dietmar@ximian.com>
1957 * jit.c (mono_analyze_stack): spill MUL to avoid problem with
1958 register allocation.
1960 * emit-x86.c (arch_compile_method): fixed static delegate bug
1962 2001-12-16 Miguel de Icaza <miguel@ximian.com>
1964 * x86.brg, jit.c: Split up the nodes that we used to share on
1965 CONV_OVF. They were sharing the nodes because they are the same
1966 on 32-bit machines, but on 64-bit machines you need different
1969 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
1971 * x86.brg: removed prerequisite that (tree->left->reg1 <
1972 tree->right->reg1) to make register allocation easier.
1974 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
1976 * emit-x86.c (arch_handle_exception): new code to handle
1977 exceptions inside unmanaged code.
1979 * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
1980 address as first argument.
1982 2001-12-15 Dietmar Maurer <dietmar@ximian.com>
1984 * x86.brg: pass exceptions on the stack
1986 * jit.h (ISSTRUCT): new macro to check for real value types
1987 (return false for enum types).
1989 2001-12-11 Dietmar Maurer <dietmar@ximian.com>
1991 * x86.brg: use position indepentent code if possible.
1993 * x86.brg (EMIT_COND_EXCEPTION): new macro.
1995 * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
1997 2001-12-10 Dietmar Maurer <dietmar@ximian.com>
1999 * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
2001 (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
2003 * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
2005 2001-12-07 Dietmar Maurer <dietmar@ximian.com>
2007 * jit.c (mono_allocate_intvar): bug fix.
2009 * emit-x86.c (get_unbox_trampoline): impl.
2011 * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
2013 2001-12-06 Dietmar Maurer <dietmar@ximian.com>
2015 * x86.brg: raise exceptions.
2017 2001-12-05 Dietmar Maurer <dietmar@ximian.com>
2019 * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
2022 2001-12-06 Miguel de Icaza <miguel@ximian.com>
2024 * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
2025 CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
2026 CONV.OVF.I2.UN, CONV.OVF.I8.UN
2028 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
2030 * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
2031 removed the locaddr nonterminal, reimplemented value types
2033 * jit.c: reimplemented value type support, better support for
2036 2001-12-03 Miguel de Icaza <miguel@ximian.com>
2038 * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
2041 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
2043 * jit.c: call mono_init() after registering internal calls.
2045 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
2047 * emit-x86.c (tree_preallocate_regs): improved register allocation
2049 * x86.brg: impl. ISINST, CASTCLASS
2051 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
2053 * x86.brg: rearrange fields to reduce struct size.
2054 * jit.c: use signature->param_count, not signature->params_size.
2055 * debug.c: off-by-one error fix.
2057 2001-11-29 Radek Doulik <rodo@ximian.com>
2059 * Makefile.am: build mono only for X86 architecture, compilation
2060 fails for ppc now because of accessing registers in sigcontext
2063 2001-11-29 Dietmar Maurer <dietmar@ximian.com>
2065 * jit.c (mono_analyze_stack): bug fix in DUP
2067 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
2069 * debug.c: fix type handling. Position function position at start of
2070 IL code. Output more fine-grained stepping information.
2072 2001-11-28 Dietmar Maurer <dietmar@ximian.com>
2074 * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
2076 * jit.c (mono_analyze_stack): record the cli_address for later use
2078 (sigsegv_signal_handler): translate sigsegv into "Internal error"
2081 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
2083 * debug.c, debug.h: added support for generating stabs.
2084 Stabs can be compiled with as and the resulting object file can be
2085 loaded in a gdb session with add-symbol-file object.o.
2086 * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
2087 where locals and arguments are stored in the stack. Add support for
2088 passing command line arguments to CLR programs.
2089 * emit-x86.c: insert a breakpoint at method invocation if needed.
2091 2001-11-27 Dietmar Maurer <dietmar@ximian.com>
2093 * jit.c: exception support
2095 * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
2098 2001-11-26 Dick Porter <dick@ximian.com>
2100 * Makefile.am (mono_LDADD): Add io-layer library
2102 2001-11-19 Dietmar Maurer <dietmar@ximian.com>
2104 * jit.c (mono_analyze_stack): impl. LDFTN
2105 (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
2106 make register allocation easier on x86
2108 * emit-x86.c (enter_method): more debugging output for Strings
2109 (arch_compile_method): added delegate support
2110 (arch_compile_method): align EBP to 8 byte boundary
2112 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
2114 * jit.c: use mono_install_trampoline (), instead of exporting
2115 a function to a lower-level library.
2117 2001-11-16 Dietmar Maurer <dietmar@ximian.com>
2119 * x86.brg (STRING_ARG): impl. a way to marshal strings. This
2120 will be extensible to handle all possible kinds of marshalling
2123 * jit.c (map_call_type): added MB_TERM_CALL_VOID
2124 (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
2125 instructions to handle this arguments more effectively.
2127 2001-11-15 Dietmar Maurer <dietmar@ximian.com>
2129 * Makefile.am (mono_SOURCES): renamed testjit to mono
2131 * x86.brg: added debugging support
2133 * testjit.c: added support for value types, CFG improvements
2135 * emit-x86.c (enter_method): handle value types
2136 (tree_allocate_regs): impl. a better way to handle chain rules
2138 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
2140 * x86.brg (INITOBJ): bug fix: initialize data before use,
2141 simplified the code.
2143 2001-11-09 Miguel de Icaza <miguel@ximian.com>
2145 * testjit.c (mono_analyze_stack): Remove compiler warning by
2146 testing against NULL.
2148 2001-11-09 Dick Porter <dick@ximian.com>
2150 * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
2152 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
2154 * testjit.c (mono_analyze_stack): new BOX impl.
2156 * x86.brg: implemented INITOBJ
2158 * testjit.c (mono_analyze_stack): finished array support
2159 (mono_analyze_stack): reimplemented DUP instruction
2161 2001-11-08 Dietmar Maurer <dietmar@ximian.com>
2163 * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
2164 represents the address of the element. This way we can emit highly
2165 optimized x86 instructions to access elements (using base+index+offset
2168 2001-11-07 Miguel de Icaza <miguel@ximian.com>
2170 * mempool.c: Include string.h to kill warning.
2172 * testjit.c: Add typecast to kill warning.
2174 * x86.brg: Include string.h to eliminate warning.
2176 * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
2179 2001-11-07 Dietmar Maurer <dietmar@ximian.com>
2181 * emit-x86.c (enter_method): print out all method arguments
2182 (x86_magic_trampoline): impl.
2183 (arch_create_simple_jit_trampoline): we use different trampolines
2184 for static methods (no need to write the address back into to
2187 2001-11-06 Dietmar Maurer <dietmar@ximian.com>
2189 * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
2190 use less the 16 bytes.
2192 * x86.brg: code cleanup
2194 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
2196 * testjit.c: bug fixes.
2198 * emit-x86.c (leave_method): print result values
2200 2001-11-03 Dietmar Maurer <dietmar@ximian.com>
2202 * emit-x86.c (enter_method): new debugging code
2203 (leave_method): new debbuging code, this functions are called
2204 when you use the new option --trace-calls
2206 2001-11-02 Dietmar Maurer <dietmar@ximian.com>
2208 * testjit.c: impl. STELEM_XX, STELEM_XX
2210 * x86.brg: impl. LDLEN, LDELEMA
2213 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
2215 * x86.brg: added some experimental code for CALL
2216 instructions - still not found the optimal way to do it.
2218 * testjit.c (map_stind_type): add support for value types with
2219 a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
2220 CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
2221 (ctree_create_newobj): impl.
2224 * emit-x86.c (tree_allocate_regs): removed allocation code for
2226 (get_address): use a simple, but bug free search instead of the
2227 buggy binary search.
2229 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
2231 * testjit.c: support virtual functions
2233 * x86.brg: support different addressing modes for calls
2235 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
2237 * testjit.c: impl. STFLD
2239 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
2241 * x86.brg: impl. CEQ
2243 2001-10-04 Dick Porter <dick@ximian.com>
2246 * emit-x86.c: include mono-endian.h not endian.h
2248 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
2250 * testjit.c (ctree_create_dup): really duplicate the tree.
2251 attach the arguments to the CALL node. Added a new macro to
2252 make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
2254 2001-10-01 Dietmar Maurer <dietmar@ximian.com>
2256 * interp.brg: the burm based interpreter: added the file as example.
2258 2001-09-27 Dietmar Maurer <dietmar@ximian.com>
2262 * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
2264 (map_stind_type): support enum types
2265 (map_ldind_type): support enum types
2267 * emit-x86.c (tree_allocate_regs): added code to support
2268 register allocation for addressing modes trees.
2269 (tree_emit): bug fix: we have to emit all mono_burg_functins. The
2270 previous impl. did not work for chain rules.
2271 (compute_branches): support for SWITCH statements
2273 * x86.brg: added rules to model x86 addressing modes
2275 2001-09-26 Dietmar Maurer <dietmar@ximian.com>
2277 * emit-x86.c (compute_branches): implemented SWITCH
2279 * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
2280 (map_ldind_type): add enumeration types.
2281 (map_stind_type): add enumeration types.
2283 * emit-x86.c (arch_compile_method): more documentation.
2285 * testjit.c: moved the architecture specific things to emit-x86.c
2286 and x86.brg. Added more documentation. code cleanup.
2288 2001-09-25 Dietmar Maurer <dietmar@ximian.com>
2290 * x86.brg: we now have different types of addresses: ADDR_L for local
2291 values, ADDR_A for arguments and ADDR_G for global addresses. We
2292 also use LDIND_XX token to load values from a specific address
2293 instead of LDLOC/STLOC.
2295 * testjit.c: use the new adressing scheme everywhere:
2296 LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)
2298 2001-09-24 Dietmar Maurer <dietmar@ximian.com>
2300 * testjit.c (main): fix bug in parameter parsing
2302 * x86.brg: impl. more opcodes
2304 2001-09-23 Dick Porter <dick@ximian.com>
2306 * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
2308 2001-09-23 Dietmar Maurer <dietmar@ximian.com>
2310 * testjit.c: use the memory pool to avoid memory leaks
2312 2001-09-22 Dietmar Maurer <dietmar@ximian.com>
2314 * x86.brg: increment the stack pointer after function calls
2316 2001-09-21 Dick Porter <dick@ximian.com>
2318 * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
2320 2001-09-21 Dietmar Maurer <dietmar@ximian.com>
2322 * x86.brg: implemented long MUL/DIV
2323 (MB_OPT_LEVEL): define optimisation level macro
2325 * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
2326 for operations like idiv. it is also possible to assign specific registers.
2328 2001-09-20 Dietmar Maurer <dietmar@ximian.com>
2330 * x86.brg: added basic support for long
2332 * testjit.c (mono_compile_method): implemented POP
2334 2001-09-19 Miguel de Icaza <miguel@ximian.com>
2336 * testjit.c (usage): Added a couple of more usage options.
2338 2001-09-19 Dietmar Maurer <dietmar@ximian.com>
2340 * x86.brg: added more floating point grammar
2342 * testjit.c (mono_compile_method): make local offsets negative
2344 * x86.brg: added some floating point trees
2346 * testjit.c (mono_compile_method): arguments on the runtime
2347 stack are at least 4 bytes
2349 * x86.brg: partly implemented 8,16 bit integers
2351 * testjit.c (get_address): mark basic blocks
2353 2001-09-18 Dietmar Maurer <dietmar@ximian.com>
2355 * x86.brg: added some rules to optimize code
2357 * testjit.c (get_address): use a binary search to get the address
2358 (main): added an option to debug the jit (-d)
2360 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
2362 * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
2364 2001-09-17 Miguel de Icaza <miguel@ximian.com>
2366 * testjit.c (mono_compile_method): Provide better error reporting.
2368 2001-09-17 Dietmar Maurer <dietmar@ximian.com>
2370 * testjit.c (tree_get_address): impl. to fix address bug
2371 (tree_get_address): make sure that we can only jump to the first
2372 instruction of a tree.
2374 * x86.brg: emit real code for calls
2376 * testjit.c (create_jit_trampoline): creates a function to trigger jit
2378 (mono_compile_method): reversed argument order
2380 2001-09-15 Dietmar Maurer <dietmar@ximian.com>
2382 * x86.brg (stmt): don't emit unnecessary register moves
2384 * testjit.c (tree_allocate_regs): free registers earlier
2386 2001-09-14 Dietmar Maurer <dietmar@ximian.com>
2388 * x86.brg: branch addresses are now resolved
2390 * testjit.c (compute_branches): compute address of branches
2392 * x86.brg: emit real x86 instructions
2394 * testjit.c: call objdump to disassemble the output
2396 2001-09-13 Dietmar Maurer <dietmar@ximian.com>
2398 * x86.brg: use the right offsets to access local variables
2401 * emit-x86.c: only save/restore callee saved registers if they are
2404 * testjit.c (tree_allocate_regs): use the new MonoRegSet to
2406 (mono_compile_method): changed the tree for mothod calls
2413 2001-09-10 Miguel de Icaza <miguel@ximian.com>
2415 * x86.brg: Use Unix assembly syntax.
2417 * emit-x86.c: support code, should be moved
2419 * testjit.c: Use GPtrArrays instead of GLists, as those are very
2420 inefficient at appends.
2422 * Renamed `create_new_leave' to `create_new_leaf'