2003-01-22 Martin Baulig <martin@ximian.com>
[mono.git] / mono / jit / ChangeLog
1 2003-01-22  Martin Baulig  <martin@ximian.com>
2
3         * debug.c: Reverted Gonzalo's last change since it is wrong.
4         We're also using the debugging code on Windows, for instance the
5         stabs stuff when running in gdb.  I hope this code still builds on
6         Windows; if not, we need to fix this.
7         Moved all the mono debugger support code into the debugger itself;
8         when debugging a managed application, the debugger new launches a
9         small unmanaged wrapper application which contains this stuff.
10
11         * debug.h (MonoDebuggerIOLayer): New public typedef; this is just
12         initialized to an array of function pointers to the io-layer
13         function; they don't seem to be public in the `libmono' library.
14         (mono_debugger_event): New public function.  Sends the debugger an
15         event if we're running in the Mono Debugger and does nothing otherwise.
16
17         * mono.c: Don't initialize the Mono Debugger here.
18
19         * jit.c (mono_debug_insert_breakpoint): Removed, this isn't used anymore.
20         (mono_thread_start_cb, mono_thread_attach_cb): Call
21         mono_debugger_event() to send the debugger a callback.
22
23 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24
25         * debug.c: make all public symbols just dummy for windows.
26
27 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
28
29         * debug.c (initialize_debugger_support): ifdef out the call to
30         mono_debugger_init_thread_debug for the release. 
31
32         Someone should look into why its not defined.  I think the problem
33         is what Dick pointed out somewhere: code in io-layer is not
34         supposed to ever be used in Windows, so code for the debugger that
35         lives there must be moved elsewhere.
36
37 2003-01-19  Martin Baulig  <martin@ximian.com>
38
39         * debug.c: Ok, this should now finally be working this time ....
40
41 2003-01-18  Martin Baulig  <martin@ximian.com>
42
43         * debug.c (mono_debugger_jit_exec): Send the background thread a
44         SIGKILL before returning.
45
46 2003-01-17  Dietmar Maurer  <dietmar@ximian.com>
47
48         * x86.brg: removed duplicated CONV_OVF_I4
49
50 2003-01-17  Martin Baulig  <martin@ximian.com>
51
52         * debug.c: Don't use mono_once here.  Reworked the API a bit to
53         use `mono_debug_' and `debug_' for the general debugging API and
54         `mono_debugger_' and `debugger_' for the Mono Debugger stuff.
55
56 2003-01-16  Martin Baulig  <martin@ximian.com>
57
58         * debug.c (debugger_thread_func): We don't need to `raise
59         (SIGSTOP)' anymore; the thread manager already takes care of this.
60
61 2003-01-16  Dietmar Maurer  <dietmar@ximian.com>
62
63         * exception.c (arch_handle_exception): exclude runtime invoke
64         wrapper from the stack trace
65
66         * jit.c (mono_cfg_new): allocate extra space to store esp (used by exceptions)
67         (mono_thread_start_cb): save an additional LMF at thread start
68
69 2003-01-16  Martin Baulig  <martin@ximian.com>
70
71         * jit.c (mono_runtime_install_handlers): Use SYS_sigaction() for
72         the mono_thread_get_abort_signal () - this is SIGUSR1 on FreeBSD
73         and the LinuxThreads port doesn't allow you to override the handler.
74         [FIXME: This avoids an assertion failure on startup, but there's
75         still an issue with thread termination.]
76
77 2003-01-16  Martin Baulig  <martin@ximian.com>
78
79         * debug.c (debugger_thread_func): We don't need to `raise
80         (SIGSTOP)' anymore; the thread manager already takes care of this.
81
82 2003-01-16  Martin Baulig  <martin@ximian.com>
83
84         * debug.c: Use the mono/io-layer functions here instead of gthread.
85
86 2003-01-14  Dietmar Maurer  <dietmar@ximian.com>
87
88         * jit.c (mono_jit_compile_method):  make sure runtime_init is called 
89         (mono_analyze_stack): make sure runtime_init is called
90
91 2003-01-14  Martin Baulig  <martin@ximian.com>
92
93         * debug.c (debugger_update_symbol_file_table): Moved all the
94         functionality into debugger_update_symbol_file_table_internal();
95         the latter one will be called from the background thread while
96         already owning the lock.  This'll allow us to step into
97         debugger_update_symbol_file_table() in the debugger and debug it.
98
99 2003-01-14  Martin Baulig  <martin@ximian.com>
100
101         * Makefile.am: Link against gthread.
102
103         * jit.c: After realizing that mono-mutex doesn't work either
104         because it doesn't support recursive mutexes on FreeBSD, rewrote
105         the whole thread stuff to use gthread.  This seems to fix this
106         weird deadlock in the debugger as well.
107
108 2003-01-12  Alp Toker  <alp@atoker.com>
109
110         * exception.c: Typo fix: insinde -> inside
111
112 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
113
114         * exception.c (ves_icall_get_frame_info): skip one more frame and also
115         MONO_WRAPPER_RUNTIME_INVOKE wrappers
116         (x86_unwind_native_frame): disable unnecessary assertion
117
118 2003-01-07  Dietmar Maurer  <dietmar@ximian.com>
119
120         * exception.c (ves_icall_get_frame_info): fix bug 36382
121
122 Tue Jan 7 15:15:41 CET 2003 Paolo Molaro <lupus@ximian.com>
123
124         * jit.c: handle wrapper_data in NEWOBJ/CALL.
125
126 2003-01-07  Dietmar Maurer  <dietmar@ximian.com>
127
128         * jit.c (mono_analyze_stack): add check for NULL target in STFLD
129
130 2003-01-06  Martin Baulig  <martin@ximian.com>
131
132         * debug.c (debugger_finished_mutex): Use a recursive mutex here.
133
134         * debug.c: Correctly handle the `debugger_finished_mutex'; it is
135         only unlocked by the pthread_cond_wait() in mono_debugger_wait().
136
137 2003-01-04 Jackson Harper <jackson@latitudegeo.com>
138
139         * debug.c: Move must_send_finished var declaration out of #if win32
140         block (this fixes the build on win32)
141
142 2003-01-05  Martin Baulig  <martin@ximian.com>
143
144         * debug.c (mono_debugger_jit_exec): Custom version of mono_jit_exec();
145         this is used when we're running inside the Mono Debugger 
146         (mono_debugger_wait): Put the waiting code into a function of its own.
147
148         * mono.c (main): Call mono_debugger_jit_exec() instead of
149         mono_jit_exec() if we're running inside the Mono Debugger.
150         
151 2003-01-05  Martin Baulig  <martin@ximian.com>
152
153         * debug.h (MonoDebugFormat): Added
154         `MONO_DEBUG_FORMAT_MONO_DEBUGGER'; this allows us to check whether
155         we're running inside the Mono Debugger prior to the args parsing.
156
157 2003-01-04  Martin Baulig  <martin@ximian.com>
158
159         * debug.c (release_symbol_file_table): Only call this if we're
160         actually modifying the symbol tables.
161         (mono_debug_open): Always set the `mono_debugger_class_init_func'
162         for MONO_DEBUG_FORMAT_MONO; this stuff should also go into core dumps.
163
164 2003-01-03  Martin Baulig  <martin@ximian.com>
165
166         * debug.c: Disable the mono debugger stuff on Windows.
167
168 2003-01-03  Martin Baulig  <martin@ximian.com>
169
170         * debug.c (mono_debugger_trampoline_breakpoint_callback): New
171         function.  This is called from the breakpoint trampoline to signal
172         the debugger and wait until it has reload the symbol tables.
173
174         * trampoline.c (get_breakpoint_trampoline): Call the new
175         mono_debugger_trampoline_breakpoint_callback() in the breakpoint
176         trampoline just before the breakpoint.
177
178 2002-12-31  Martin Baulig  <martin@ximian.com>
179
180         * debug.c (MonoDebuggerSymbolFileTable): Added `global_symfile'
181         field to point to the MonoGlobalSymbolTable.
182
183 2002-12-30  Martin Baulig  <martin@ximian.com>
184
185         * debug.c (MonoDebuggerInfo): Put back `symbol_file_modified'.
186         This variable now specifies that the symbol tables have been
187         modified after the last notification has been send.  The debugger
188         uses this flag to check whether it needs to reload the symbol
189         tables or not.
190         (debugger_compile_method): Just send a notification to the
191         debugger, but don't set the modified flag.  It may or may not be
192         set when the debugger gets the notification - depending on whether
193         the JIT compilation added a new method to the symbol tables.
194
195 2002-12-30  Martin Baulig  <martin@ximian.com>
196
197         * debug.c (debugger_compile_method): This is a wrapper around
198         mono_compile_method() which always sends a notification to the
199         debugger.
200
201 2002-12-30  Martin Baulig  <martin@ximian.com>
202
203         * debug.c: Reload the symbol file table before sending the
204         notification event to the debugger.
205         (MonoDebuggerInfo): Removed `update_symbol_file_table'.
206
207 2002-12-31  Martin Baulig  <martin@ximian.com>
208
209         * debug.c: Propertly lock everything and avoid race conditions.
210         (MonoDebuggerInfo): Removed the `symbol_file_modified' again.
211
212 2002-12-31  Duncan Mak  <duncan@ximian.com>
213
214         * debug.c (initialize_debugger_support): Fix build error by
215         declaring ret at the top of the function.
216
217 2002-12-30  Martin Baulig  <martin@ximian.com>
218
219         * debug.c: When running under the mono debugger, create a special
220         debugger thread; always protect the symbol tables with a mutex.
221
222 2002-12-28  Martin Baulig  <martin@ximian.com>
223
224         * debug.c (MonoDebuggerInfo): Added `symbol_file_modified'; it's
225         incremented each time one of the symbol tables is modified.
226
227 Thu Dec 19 18:31:54 CET 2002 Paolo Molaro <lupus@ximian.com>
228
229         * jit.c: fix LDELEMA implementation here as well.
230
231 Wed Dec 18 11:42:58 CET 2002 Paolo Molaro <lupus@ximian.com>
232
233         * jit.c: handle CEE_CONV_OVF_U8_UN like CEE_CONV_OVF_I8_UN.
234
235 Wed Dec 18 11:36:04 CET 2002 Paolo Molaro <lupus@ximian.com>
236
237         * jit.c: query the thread abort signal from the runtime.
238
239 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
240
241         * jit.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
242
243 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
244
245         * jit.c (mono_analyze_stack): call the utility function 
246         mono_field_from_token to avoid code duplication.
247
248 2002-12-02  Dietmar Maurer  <dietmar@ximian.com>
249
250         * jit.c (mono_analyze_stack): added some additinal checks to verify IL code
251
252         * x86.brg (stmt): POP floating point stack correctly
253
254 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
255
256         * emit-x86.c (arch_emit_prologue): don't save caller saved
257         registers twice.
258
259         * exception.c (x86_unwind_native_frame): support exceptions inside
260         native code using gcc generated exception tables (-fexception).
261
262 2002-11-19  Dietmar Maurer  <dietmar@ximian.com>
263
264         * exception.c: include some code from Zoltan Varga, but modified
265         it slightly.
266
267 2002-11-27  Dietmar Maurer  <dietmar@ximian.com>
268
269         * exception.c: massive code cleanups. The code is still
270         architecture dependent, but it should be now possible to reuse the
271         complex parts for other architecture.
272
273 2002-11-15  Dick Porter  <dick@ximian.com>
274
275         * jit.c: Pass the attach callback to mono_runtime_init().
276
277 2002-11-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
278
279         * jit.c: display the domain name in trace output.
280
281 2002-11-08  Dietmar Maurer  <dietmar@ximian.com>
282
283         * x86.brg (reg): fix bug #2721
284
285         * jit.c (mono_runtime_install_handlers): impl.
286
287 2002-10-17  Martin Baulig  <martin@gnome.org>
288
289         * debug.c (mono_debug_add_method): Make this actually work if we don't
290         have any lifetime information.
291
292 2002-10-15  Martin Baulig  <martin@gnome.org>
293
294         * jit.cs (PUSH_TREE): Always set t->cli_addr here.
295
296         * debug.c (generate_line_number): Small fix to make this actually
297         work for more complex things.
298
299 2002-10-11  Dietmar Maurer  <dietmar@ximian.com>
300
301         * x86.brg (freg): use fprem instead of fprem1
302
303 2002-10-03  Dietmar Maurer  <dietmar@ximian.com>
304
305         * jit.c (ves_array_element_address): added check for out of range index
306         (mono_analyze_stack): added fix for bug #31654
307
308 2002-10-01  Martin Baulig  <martin@gnome.org>
309
310         * debug.c: Don't create an .il file for the dynamic symbol file.
311
312 2002-10-01  Martin Baulig  <martin@gnome.org>
313
314         * debug.c (MonoDebuggerInfo): Added mono_runtime_invoke().
315
316 2002-09-27  Martin Baulig  <martin@gnome.org>
317
318         * debug.c (debug_load_method_lines): Don't use sigaction() on win32.
319
320 2002-09-27  Dick Porter  <dick@ximian.com>
321
322         * mono.c: Tell glib what the program name is, by passing it the
323         name of the managed file we're executing
324
325 2002-09-26  Martin Baulig  <martin@gnome.org>
326
327         * trampoline.c (x86_magic_trampoline): Don't insert the breakpoint
328         trampoline into the vtable, also use it for non-virtual methods,
329         remove the breakpoint when done.
330
331 2002-09-26  Martin Baulig  <martin@gnome.org>
332
333         * debug.c (debug_load_method_lines): Block SIGCHLD while running
334         monodis.
335
336 2002-09-26  Martin Baulig  <martin@gnome.org>
337
338         * debug.c: Reworked the whole debugging stuff.  We have now one
339         single `mono_debug_handle' which keeps a hashtable of
340         `AssemblyDebugInfo's (which may have different debugging formats).
341         The AssemblyDebugInfo is now created when the assembly is loaded,
342         but never when adding a class/type.
343
344         * mono.c: Initialize debugging stuff after corlib and the assembly
345         have been loaded.
346
347 2002-09-25  Martin Baulig  <martin@gnome.org>
348
349         * debug-private.h (DebugLineNumberInfo): Removed.  There's now a
350         MonoDebugLineNumberEntry type in debug-mono-symfile.h which we're
351         using instead of it.
352         (DebugMethodInfo): Removed `line_numbers'.
353
354         * debug.c: Reworked the line number generation; we're now using
355         the MonoDebugLineNumberEntry try for all debugging formats.  This
356         type also includes the line number and IL offset, this allows the
357         JIT to produce better line number info: we only emit line number
358         information for source lines which actually have code.
359
360 2002-09-25  Martin Baulig  <martin@gnome.org>
361
362         * debug.h: Removed external declaration of all functions which
363         should only be called from the Mono Debugger and also made them
364         static.  Since the debugger gets their address from the
365         `MONO_DEBUGGER__debugger_info' vtable, there's no need to export
366         these functions.
367
368 2002-09-25  Martin Baulig  <martin@gnome.org>
369
370         Improved breakpoint support, we can now dynamically insert and
371         remove breakpoints at runtime and when called from withing the
372         Mono Debugger, we're using a special breakpoint trampoline.
373
374         * debug.h (mono_method_has_breakpoint): New method to check
375         whether to insert a breakpoint for a method.
376         (mono_insert_breakpoint): New method to insert a breakpoint.
377         (mono_insert_breakpoint_full): New method to insert a breakpoint,
378         takes a MonoMethodDesc.
379         (mono_remove_breakpoint): New method to remove a breakpoint.
380
381         * debug.c (mono_debugger_insert_breakpoint): New function for the
382         debugger.  Should only be called from the debugger.
383         (mono_debugger_remove_breakpoint): Likewise.
384
385         * mono.c (main): Use mono_insert_breakpoint() to insert breakpoints.
386
387         * trampoline.c (get_breakpoint_trampoline): New static function to
388         create a special breakpoint trampoline for the debugger.
389         (x86_magic_trampoline): If we're running inside the Mono Debugger
390         and a breakpoint was requested for the method, generate a special
391         breakpoint trampoline.
392
393         * jit.c (mono_debug_methods): Removed, use mono_insert_breakpoint()
394         to insert a breakpoint.
395         (mono_debug_last_breakpoint_address): Removed.
396         (match_debug_method): Removed, use mono_method_has_breakpoint().
397
398 Wed Sep 25 12:04:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
399
400         * jit.c: reorder mono_runtime_cleanup () call since it needs the
401         engine still fully working.
402
403 2002-09-24  Martin Baulig  <martin@gnome.org>
404
405         * debug.c (mono_debug_open): When we're invoked from inside the
406         Mono Debugger, set mono_debugger_class_init_func (exported in
407         metadata/class.c) to mono_add_type().
408         (mono_add_type): Call mono_debug_symfile_add_type().
409
410 Tue Sep 24 11:34:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
411
412         * jit.c: avoid including cil-coff.h (again). Optimize typeof (type).
413         Run finalize on domain cleanup.
414         * mono.c: call setlocale ().
415         * trampoline.c: clearer error message for invalid trampoline.
416
417 2002-09-21  Martin Baulig  <martin@gnome.org>
418
419         * debug.c (MonoDebuggerSymbolFileTable): Use an actual typedef for this
420         instead of writing a byte blob.
421         (mono_debug_make_symbols): This doesn't touch the symbol tables anymore.
422         (mono_debug_add_method): Incrementally add the new method to the symbol
423         table.
424
425         * exception.c (arch_handle_exception): If we have debugging support,
426         call mono_debugger_update_symbol_file_table () as well.
427
428 2002-09-20  Martin Baulig  <martin@gnome.org>
429
430         * debug.c (mono_debug_add_method): The `MonoDebugVarInfo' now includes
431         the size of the variable.
432
433 2002-09-18  Dietmar Maurer  <dietmar@ximian.com>
434
435         * linear-scan.c (mono_analyze_liveness): we can save 30% of needed
436         iterations if we visit blocks in reverse order.
437
438 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
439
440         * jit.c (mono_analyze_stack): cleaup of the array code
441
442         * exception.c: added patch from Julio Merno to fix bug #30048
443
444         * jit.c (mono_analyze_stack): code cleanup, fix bug #29365
445
446 2002-09-09  Dietmar Maurer  <dietmar@ximian.com>
447
448         * x86.brg (LDELEMA): use x86_lea 
449
450 2002-09-06  Martin Baulig  <martin@gnome.org>
451
452         * debug.c (debug_update_il_offsets): Fixed a memory corruption bug.
453         If you were getting random crashes when using the JIT with debugging
454         turned on, this fixes it.
455
456 2002-09-06  Dietmar Maurer  <dietmar@ximian.com>
457
458         * emit-x86.c (arch_emit_epilogue): use pop instead of mov
459
460 2002-09-05  Martin Baulig  <martin@gnome.org>
461
462         * debug.c (MONO_DEBUGGER__debugger_info): New global data symbol
463         which is read by the debugger.
464
465 Wed Sep 4 14:06:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
466
467         * Makefile.am: link libmono directly into mono. Use a ld script
468         to reduce exported symbols.
469
470 2002-09-03  Martin Baulig  <martin@gnome.org>
471
472         * debug.c (free_method_info): Make this actually work.
473
474 2002-09-03  Martin Baulig  <martin@gnome.org>
475
476         * debug.h (MonoDebugFormat): Killed MONO_DEBUG_FORMAT_DWARF2_PLUS.
477         * debug-dwarf2-plus.c: Removed.
478
479         * debug-private.h (DebugMethodInfo): Removed the `method_info' field.
480         (AssemblyDebugInfo): Removed the old `symfile' field and renamed
481         `mono_symfile' to `symfile'.
482
483         * debug.c (mono_debug_open): Replaced the assembly argument with a
484         file name argument; you can now call this before loading the assembly.
485         (debug_generate_method_lines): The MonoDebugILOffsetInfo struct is gone,
486         we now use MonoSymbolFileLineNumberEntry's and a separate address array
487         instead; splitted out all MonoSymbolFileLineNumberEntry code into
488         debug_generate_il_offsets() and debug_update_il_offsets().
489         (mono_debug_add_method): Don't create the MonoDebugMethodInfo here; it's
490         created when reading the symbol file or from debug_load_method_lines().
491         (debug_load_method_lines): Create the MonoDebugMethodInfo for all methods.
492
493         * exception.c (arch_handle_exception): Call mono_debug_make_symbols() before
494         looking up an address.
495
496         * debug.c: Don't create the .il files for MONO_DEBUG_FORMAT_MONO.
497
498         * mono.c (main): Initialize debugging before loading the first assembly.
499         
500 2002-08-28  Dick Porter  <dick@ximian.com>
501
502         * mono.c: mono_set_rootdir() doesnt take any args now
503
504         * Makefile.am: Export HOST_CC for w32 builds
505
506 2002-08-28  Dietmar Maurer  <dietmar@ximian.com>
507
508         * jit.c (mono_store_tree): only allocate vars if really necessary
509
510 2002-08-27  Martin Baulig  <martin@gnome.org>
511
512         * debug.c: The mono symbol file is installed together with the assembly
513         it belongs to and it's used on a per-image basis.
514
515 Tue Aug 27 19:44:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
516
517         * mono.c: don't use the cil-coff header outside of the loader.
518
519 2002-08-27  Martin Baulig  <martin@gnome.org>
520
521         * debug.c (mono_debugger_internal_get_symbol_files): Removed, we need
522         to use global variables for this since they're stored in a core file.
523         (mono_debugger_symbol_file_table_generation): New global variable.
524         (mono_debugger_symbol_file_table): New global variable.
525         (mono_debugger_update_symbol_file_table): New global function to update
526         the symbol file table.
527
528 2002-08-27  Martin Baulig  <martin@gnome.org>
529
530         * trampoline.c (mono_generic_trampoline_code): New global variable.
531         (arch_create_jit_trampoline): Use the new global variable to store the
532         generic trampoline code instead of using a static one.  This allows the
533         debugger to access this variable to check whether a method is a trampoline.
534
535         * debug.h (mono_generic_trampoline_code): Added external declaration.
536
537 2002-08-27  Martin Baulig  <martin@gnome.org>
538
539         * debug.c (MonoDebugHandle): Moved the method hash into the
540         AssemblyDebugInfo struct since we need to use a separate hash for each
541         MonoImage.
542
543         * debug.c: Added special undocumented command line argument to create a
544         symbol file for IL files on-the-fly.  In this case, we also need to create
545         the IL files and parse them.
546         (mono_debugger_internal_get_symbol_files): Return something more reasonable.
547
548 2002-08-26  Martin Baulig  <martin@gnome.org>
549
550         * debug.c (mono_debugger_internal_free_symbol_files): New function.
551         (mono_debugger_internal_symbol_files_changed): New global variable.
552
553 2002-08-24  Martin Baulig  <martin@gnome.org>
554
555         * debug.c (mono_debugger_internal_get_symbol_files): New function.
556
557 2002-08-24  Martin Baulig  <martin@gnome.org>
558
559         * debug.c (mono_debug_write_symbols): Added support for the new
560         debugging format.
561
562         * mono.c (main): The `--debug' argument now knows about a new
563         debugging format `mono' which will be used to display source lines
564         in backtraces.
565
566         * debug.h (MonoDebugFormat): Added a new MONO_DEBUG_FORMAT_MONO
567         which will be used when displaying backtraces.  It reads a new
568         binary symbol file.
569
570 2002-08-23  Martin Baulig  <martin@gnome.org>
571
572         * jit.c (match_debug_method): Don't include runtime invoke methods
573         in the search.
574
575         * mono.c (main): Accept `Main' as argument to --break to insert a
576         breakpoint on the application's main method.
577
578 2002-08-23  Martin Baulig  <martin@gnome.org>
579
580         * debug-dwarf2.c (dwarf2_write_class_field): Don't include any static fields.
581         
582 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
583
584         * exception.c (arch_handle_exception): don't set stack_trace to
585         null (so that it contains the full trace even when we rethrow the
586         exception).
587
588 2002-08-19  Nick Drochak <ndrochak@gol.com>
589
590         * x86.brg (mono_llmult_ovf): Simplified the code greatly by refactoring
591         the algebraic form we are using.  This also eliminated a silly overflow
592         of the intermediate result that was causing troubles.
593
594 2002-08-16  Nick Drochak <ndrochak@gol.com>
595
596         * x86.brg (mono_llmult_ovf): Flip ALL the bits, dummy. Now negative numbers
597         work.
598
599 2002-08-15  Nick Drochak <ndrochak@gol.com>
600
601         * x86.brg (mono_llmult_ovf): Fix so it throws an overflow when result
602         will not fit in 64 bits.  Fixes bug #27375.
603
604 Wed Aug 14 17:31:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
605
606         * exception.c: updates for API changes in metadata/.
607
608 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
609
610         * jit.c (mono_jit_init): use  ((gpointer)-1) as end_of_stack
611         address for the main thread.
612
613 2002-08-12  Dietmar Maurer  <dietmar@ximian.com>
614
615         * jit.c (mono_analyze_stack): added support for Thread::Abort ()
616
617 2002-08-08  Dietmar Maurer  <dietmar@ximian.com>
618
619         * exception.c (arch_handle_exception): simply return and let the
620         libpthread/kernel restore the context. This should work on recent
621         versions of linuxthreads.
622
623         * jit.c (mono_runtime_install_handlers): switch back to use
624         sigaction from libpthreads. As long as this does not make problems
625         we should use this instead of syscall.
626
627 2002-08-07  Dietmar Maurer  <dietmar@ximian.com>
628
629         * jit.c: removed the createdelegate icall
630         (mono_analyze_stack): special case Array::Address()
631
632 2002-08-06  Dietmar Maurer  <dietmar@ximian.com>
633
634         * emit-x86.c (arch_emit_prologue): make the call to
635         mono_get_lmf_addr relocatable.
636         (arch_jit_compile_cfg): do not waste memory
637         (arch_jit_compile_cfg): use a mempool to store native code. This
638         improves locality of code.
639
640 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
641
642         * jit.c (mono_analyze_stack): impl. CEE_MONO_RETOBJ
643
644 2002-07-30  Sergey Chaban <serge@wildwestsoftware.com>
645
646         * x86.brg (LOCALLOC): under Windows, if allocation size is bigger
647         than one page, it's necessary to allocate memory incrementally,
648         in page-size steps, performing stack-touch every time.
649         Also added LOCALLOC(CONST_I4) implementation.
650
651 2002-07-27  Dietmar Maurer  <dietmar@ximian.com>
652
653         * jit.c (mono_get_runtime_method): code cleanup
654
655         * x86.brg: we do not need to save EAX/ECX/EDX in stmt:
656
657 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
658
659         * jit.c (mono_analyze_stack): added CEE_TAIL (but it is ignored)
660
661 Wed Jul 24 13:02:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
662
663         * jit.c, jit.h, exception.c: implemented stack walking function.
664
665 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
666
667         * x86.brg (ARG_OBJ): removed zero sized object warning 
668
669 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
670
671         * jit.c (mono_allocate_excvar): mark excvar as volatile
672
673         * emit-x86.c (enter_method): use arch_get_argument_info to get
674         stack layout.
675
676         * jit.c (mono_analyze_stack): use arch_get_argument_info to get
677         stack layout.
678         (mono_analyze_stack): removed unused code
679
680         * emit-x86.c (arch_allocate_arg): impl.
681
682 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
683
684         * emit-x86.c (arch_allocate_var): fix alignment bug
685
686         * x86.brg (X86_CALL_BEGIN): add argument padding before emitting a call
687
688         * jit.c (mono_analyze_stack): s/k/k + 1/
689
690         * x86.brg (LOCALLOC): align to MONO_FRAME_ALIGNMENT
691
692         * emit-x86.c (arch_get_argument_info): impl.
693
694 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
695
696         * exception.c (arch_handle_exception): Memory leak fix.
697
698 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
699
700         * jit.c (mono_analyze_stack): avoid recursive inlining
701
702 Fri Jul 19 18:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
703
704         * emit-x86.c: temporary workaround for gcc bug.
705         * jit.h, jit.c, mono.c: move mono_jit_image to jit.c.
706         Don't include config.h in headers.
707
708 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
709
710         * x86.brg: correctly align valuetype arguments on the stack
711
712         * jit.c (mono_analyze_stack): do not compute frame size here.
713
714         * x86.brg: use macros to avoid code duplication for CALL opcodes,
715         compute frame size in x86.brg
716
717 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
718
719         * x86.brg (ARG_OBJ): allow zero sized ARG_OBJ
720
721         * exception.c (arch_handle_exception): removed duplicated code,
722         added support for exception filters
723
724         * jit.c (mono_jit_compile_method): support exception filters
725
726 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
727
728         * jit.c (mono_analyze_stack CEE_DIV): added fix from Zoltan Varga
729         (bug #27423)
730         * jit.c: s/ISSTRUCT/MONO_TYPE_ISSTRUCT/ 
731
732         * helpers.c (mono_map_ldind_type): added suggested changes from
733         Zoltan Varga (support MONO_TYPE_U), variou 64bit fixes
734
735         * jit.c (mono_analyze_stack): remove the vtype pointer from the
736         stack (fix bug #27420)
737
738 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
739
740         * x86.brg (CALL_VOID): fix bug #27751
741         (CONV_R_UN) use reg2 instead of reg1 for the negative check /fix bug 27849.
742
743         * jit.c (mono_analyze_stack): adjust valuetype size for pinvoke calls
744
745 i2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
746
747         * x86.brg (freg): new rule freg: CALL_R8 (this, reg)
748
749 2002-07-10  Dietmar Maurer  <dietmar@ximian.com>
750
751         * emit-x86.c (arch_emit_prologue): added code to save LMF
752
753 2002-07-04  Dietmar Maurer  <dietmar@ximian.com>
754
755         * x86.brg (LOCALLOC): added fix from Zoltan Varga (for bug #27396) 
756
757 2002-07-05  Martin Baulig  <martin@gnome.org>
758
759         * debug.c (mono_debug_add_method): Fix a bug in the `begin_scope' and
760         `end_scope' calculations when linear scan register allocation is disabled.
761
762 2002-07-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
763
764         * mono.c: removed the "RESULT: X" message.
765
766 2002-07-01  Dietmar Maurer <dietmar@ximian.com>
767
768         * exception.c (arch_get_call_finally): restore caller saved
769         register used by global reg. allocation when calling finally
770         handlers (fixes bug #24943).
771
772 2002-07-01  Dick Porter  <dick@ximian.com>
773
774         * jit.c (mono_jit_exec): Removed unneeded argument to
775         mono_runtime_run_main()
776
777 2002-06-28  Martin Baulig  <martin@gnome.org>
778
779         * debug.c (debug_generate_method_lines, mono_debug_add_method): Make methods
780         start on the nop instruction to make single-stepping into an already-JITed
781         method work.
782
783 2002-06-26  Martin Baulig  <martin@gnome.org>
784
785         * debug.c (mono_debug_source_location_from_address): Added
786         `guint32 *line_number' argument.  If it's not NULL, store the line number
787         there and return the file name without the line number.
788
789         * exception.c (ves_icall_get_trace): Fill in `sf->filename' and `sf->line'.
790         (ves_icall_get_frame_info): Likewise.
791
792 2002-06-25  Dick Porter  <dick@ximian.com>
793
794         * jit.c (mono_jit_exec): Pass the assembly to mono_runtime_run_main
795
796 2002-06-22  Martin Baulig  <martin@gnome.org>
797
798         * debug.c (mono_debug_source_location_from_address): Small fix, an
799         unsigned number can never be smaller than zero, make that check
800         actually work.
801
802 2002-06-19  Dietmar Maurer  <dietmar@ximian.com>
803
804         * exception.c (ves_icall_get_trace): new method to get the stack
805         trace from a Exception.
806
807 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
808
809         * jit.c (check_inlining): do not inline functions containing 
810         calls to stack query functions
811
812         * exception.c (ves_icall_get_frame_info): impl.
813
814 Tue Jun 18 10:21:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
815
816         * invoke.c: marshal simple arrays correctly.
817
818 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
819
820         * x86.brg: added inlined versions of Math.Sin, Math.Cos, Math.Sqrt
821
822         * jit.c (mono_analyze_stack): impl. STARG
823         (mono_analyze_stack): impl. LDARGA
824
825         * exception.c (arch_handle_exception): correctly restore register
826         values when unwinding the stack (fixes bug 25698)
827
828 2002-06-09  Martin Baulig  <martin@gnome.org>
829
830         * debug.c (mono_debug_open_image): For MONO_DEBUG_FORMAT_DWARF2_PLUS,
831         the `%s-debug.s' file is in the same directory than its assembly.
832
833 Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
834
835         * message.c, emit-x86.c: kill warnings.
836
837 2002-05-31  Dietmar Maurer  <dietmar@ximian.com>
838
839         * x86.brg: buf fix in REMOTE_STIND_OBJ
840         (mono_ldvirtftn): impl.
841         (mono_ldintftn): impl.
842         (mono_ldftn): impl.
843
844 Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
845
846         * mono.c: added --config command line option.
847
848 Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
849
850         * jit.c, jit.h: collect statistics about the number of basic blocks.
851
852 2002-05-31  Martin Baulig  <martin@gnome.org>
853
854         * debug.c (mono_debug_address_from_il_offset): New public function.
855         (mono_debug_add_method): Improved local variable info: correctly handle
856         variables in registers and their start/end scopes.
857
858 2002-05-30  Martin Baulig  <martin@gnome.org>
859
860         * debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
861         not "%p" which seems to be broken on Windows/mingw32.
862
863 2002-05-30  Dietmar Maurer  <dietmar@ximian.com>
864
865         * x86.brg (reg): bug fix in LOCALLOC
866
867         * mono.c (main): new switch --nointrinsic to disable memcpy opt.
868
869         * x86.brg: added block copy/init optimizations from 
870         Serge (serge@wildwestsoftware.com)
871  
872 Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
873
874         * invoke.cs: lookup P/Invoke method address only when needed.
875
876 2002-05-29  Dietmar Maurer  <dietmar@ximian.com>
877
878         * x86.brg: bug fix in REMOTE_STIND_OBJ
879
880         * invoke.c (arch_create_native_wrapper): handle pointers to value types
881
882         * helpers.h: use mono_ prefix for all functions
883
884         * jit.c (mono_analyze_stack): fixed SIZEOF
885
886         * x86.brg: impl. LOCALLOC, INITBLK
887
888 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
889
890         * x86.brg: impl. CKFINITE 
891
892         * jit.c (mono_analyze_stack): impl. CEE_CALLI
893
894         * x86.brg (JMP): impl. JMP opcode
895
896 2002-05-27  Dietmar Maurer  <dietmar@ximian.com>
897
898         * jit.c (mono_cfg_new): reserve additional space to store ESP when
899         calling finally handlers.
900
901         * exception.c (arch_get_call_finally): save ESP before calling
902         finally handler.
903
904         * helpers.c (map_arg_type): move some generic helper function into
905         this file.
906
907         * mono.c (usage): new option --breakonex 
908
909         * exception.c (arch_exc_is_caught): only return FALSE if really
910         unhandled.
911
912         * jit.c (mono_thread_abort): free jit_tls
913
914 2002-05-24  Dietmar Maurer  <dietmar@ximian.com>
915
916         * x86.brg (stmt): use memmove to cope with overlapping
917         blocks. This is not required by the specs, so we can remove it
918         later if it turns out to be too slow (and use memcpy).
919
920         * jit.c (mono_analyze_stack): moved const. folding from x86.brg
921
922         * x86.brg: CPBLK impl.
923
924         * emit-x86.c (tree_emit): modified to support 3 nonterminals per
925         rule (used for CPBLK).
926
927 Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
928
929         * mono.c: remove generated code from hash when benchmarking/testing
930         method compilation.
931         * invoke.cs: special case string ctors.
932
933 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
934
935         * *.c: code cleanups - tried to separate architecture dependent things. 
936
937 2002-05-23  Martin Baulig  <martin@gnome.org>
938
939         * debug.c (mono_debug_open): Don't call mono_debug_add_image().
940         (mono_debug_write_symbols): Only recreate the symbol file if
941         necessary.
942
943         * debug-private.h (MonoDebugHandle): Added `dirty' flag.
944
945         * mono.c (main): Call mono_debug_add_image() here.
946
947         * jit.c (mono_thread_abort): If we have debugging support, call
948         mono_debug_make_symbols() and G_BREAKPOINT().
949
950         * exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
951         an unhandled exception.
952
953 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
954
955         * delegate.c: move the thread pool to metadata/threadpool.c, code
956         cleanup.
957
958 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
959
960         * exception.c (arch_exc_is_catched): impl. MS like exception
961         handling (added a check for unhandled exceptions)
962
963 2002-05-22  Martin Baulig  <martin@gnome.org>
964
965         * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
966         the assembler if necessary, ie. the assembler file is newer than the
967         symbol file or the symbol file does not exist.
968
969         * debug.c: Added "update_on_exit" argument to recreate the symbol file
970         when the JIT exists.
971
972         * debug-dwarf2.c: Produce assembler code which is free of comments and
973         extra whitespaces so that it's suitable for `as -f'.
974
975 2002-05-22  Martin Baulig  <martin@gnome.org>
976
977         * debug-dwarf2.c (dwarf2_write_section_end): Removed.  This is not needed
978         and not supported by all assemblers.
979         (dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
980         GNU extension.
981
982         * mono.c (--debug): Small fix in the argument parsing.
983
984 2002-05-22  Martin Baulig  <martin@gnome.org>
985
986         * debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.
987
988         * mono.c: Applied patch from Miguel:
989         (--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
990         to dwarf-plus.
991
992 2002-05-21  Martin Baulig  <martin@gnome.org>
993
994         * debug.c (mono_debug_source_location_from_address): Added support for the
995         dwarf2-plus format.
996
997 2002-05-21  Martin Baulig  <martin@gnome.org>
998
999         * debug.c (mono_debug_source_location_from_address): New function.
1000         (mono_debug_il_offset_from_address): New function.
1001
1002         * exception.c (arch_handle_exception): If we have debugging support, include
1003         information about the source location and IL offset in the stack trace.
1004
1005 2002-05-21  Dietmar Maurer  <dietmar@ximian.com>
1006
1007         * jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
1008         #25058)  
1009
1010         * x86.brg (stmt): removed unnecessary assertion
1011
1012         * jit.c (check_inlining):  we cant inline throw instructions
1013         (because it breaks some basic block requirements)
1014
1015 2002-05-21  Martin Baulig  <martin@gnome.org>
1016
1017         * debug-private.h (MonoDebugFlags): New enum typedef.
1018
1019         * debug.c (mono_debug_open): Added a few useful arguments.  See the manpage
1020         for details.
1021
1022 2002-05-21  Martin Baulig  <martin@gnome.org>
1023
1024         * debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
1025         a `MonoAssembly *' argument instead of a `char *filename' one.  Also added
1026         `const char **args' argument.
1027
1028         * mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
1029         `int verbose' argument and made it public.
1030         (mono_jit_compile_class): New public function,  moved the code to compile
1031         all methods in a class here from main().
1032         (--compile): The argument can now also be an image (in `@imagename' format).
1033         Updated documentation for this command line argument.
1034         (--precompile): New command line argument to precompile an image/class/method
1035         before executing the main app.  This argument can be given multiple times.
1036         (--break): Renamed the "--debug" command line argument to "--break".
1037         (--debug): New command line argument to specify the debugging format.
1038         (--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
1039         (--debug-args): New command line argument.  This is a comma-separated list of
1040         additional arguments for the symbol writer.
1041         (usage): Beautified the help text a bit.
1042
1043         * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
1044         public mono_jit_compile_image() function rather than duplication this
1045         functionality here.
1046
1047 2002-05-21  Martin Baulig  <martin@gnome.org>
1048
1049         * debug-dwarf2-plus.c: This is now working again :-)
1050
1051         * debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
1052         we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
1053         one for the fallback MONO_DEBUG_FORMAT_DWARF2.
1054
1055 2002-05-21  Martin Baulig  <martin@gnome.org>
1056
1057         * jit.c (mono_debug_handle): Removed this global variable.
1058
1059         * debug.c (mono_debug_close): Removed.
1060         (mono_debug_cleanup): New global function.
1061         (mono_debug_add_image): New global function.
1062         (mono_debug_handle_from_class): New global function.
1063         (mono_debug_write_symbols): New global function.
1064         (mono_debug_add_type): Removed `MonoDebugHandle *' argument.
1065         (mono_debug_add_method): Likewise.
1066
1067 2002-05-21  Martin Baulig  <martin@gnome.org>
1068
1069         Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
1070         file for all assemblies.  Currently, the JIT doesn't put all methods
1071         from a single assembly into a continuous region of memory.  We were
1072         previously creating valid DWARF 2 files for this, but unfortunately
1073         GDB's symbol tables get messed up when it reads more than one such file.
1074
1075         * debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
1076         `next_idx', `methods', `type_hash', `source_files' and `format'
1077         into the MonoDebugHandle.
1078
1079         * debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
1080         not on the AssemblyDebugInfo.
1081         (mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().
1082
1083         * debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
1084         mono_debug_write_dwarf2().
1085         (mono_debug_open_assembly_dwarf2): Removed.
1086         (mono_debug_close_assembly_dwarf2): Removed.
1087
1088         * debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
1089         mono_debug_write_stabs().
1090         (mono_debug_open_assembly_stabs): Removed.
1091         (mono_debug_close_assembly_stabs).
1092
1093         * debug-dwarf2-plus.c: This is currently broken. :-(
1094
1095 2002-05-20  Martin Baulig  <martin@gnome.org>
1096
1097         * debug.h (mono_debug_format): New global variable.
1098         (MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.
1099
1100         * debug-private.h (MonoDebugHandle): Added `objfiles' field which is
1101         a whitespace separated list of symbol files.
1102         (AssemblyDebugInfo): Added `objfile' filed which is the name of the
1103         symbol file.
1104
1105         * mono.c (main): Pass the assembly file name to mono_debug_open_file().
1106
1107         * debug.c (mono_debug_make_symbols): Link all symbol files into a big
1108         `<assemblyname>.o' symbol file.
1109
1110 2002-05-20  Martin Baulig  <martin@gnome.org>
1111
1112         * debug.c (debug_load_method_lines): Check whether the assembly file
1113         is newer than the IL file and recreate the IL file if necessary.
1114
1115 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
1116
1117         * mono.c Updated copyright years. 
1118
1119 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
1120
1121         * mono.c (usage): Relayout command line options.
1122
1123 2002-05-17  Dietmar Maurer  <dietmar@ximian.com>
1124
1125         * x86.brg (reg): fixed array bound check
1126
1127         * emit-x86.c (enter_method): print method signature
1128
1129         * exception.c (arch_handle_exception): set trace info before we
1130         call handlers.
1131
1132 2002-05-16  Dietmar Maurer  <dietmar@ximian.com>
1133
1134         * jit.c (mono_find_final_block): make it work with mcs
1135
1136         * x86.brg: buf fix. if exception variable is allocated to a register. 
1137
1138         * jit.c (mono_find_final_block): bug fix.
1139
1140 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
1141
1142         * delegate.c (arch_end_invoke): fix bug #24653, simplified the
1143         code using new runtime_invoke feature.
1144
1145         * jit.c (mono_analyze_flow): try blocks are followed by handler
1146         blocks, so we need to add all handler blocks as succesors.
1147         (mono_thread_start_cb): set end_of_stack
1148
1149         * exception.c (arch_handle_exception): correctly save/restore caller
1150         saved regs.
1151
1152         * emit-x86.c (arch_emit_prologue): correctly save/restore caller
1153         saved regs.
1154
1155         * jit.c (mono_cfg_new): allocate space for caller saved registers.
1156
1157 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
1158
1159         * jit.c: only use one TLS slot to store jit data
1160
1161         * exception.c (arch_handle_exception): print function signature,
1162         use thread relative end_of_stack
1163
1164 2002-05-13  Dietmar Maurer  <dietmar@ximian.com>
1165
1166         * jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
1167         store them as 32 bit integers.
1168         (mono_analyze_stack): we need to generate a temporary var for
1169         SHL/SHR because the tree allocator can fail otherwise 
1170
1171         * exception.c (arch_handle_exception): EIP now points to the call
1172         instruction, not to the instruction after the call. This fixes the
1173         bug reported by Linus Upson (tests/exception8.cs)
1174
1175 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
1176
1177         * jit.c (mono_analyze_flow): always allocate the forest array
1178         (mono_stack_duplicate_used_var): impl.
1179         (mono_copy_used_var): impl.
1180
1181         * x86.brg: bug fix in SHR/SHL
1182
1183         * emit-x86.c (arch_emit_prologue): check if live_in_set != NULL
1184
1185 2002-05-11  Sergey Chaban <serge@wildwestsoftware.com>
1186
1187         * mono.c: new --fast-iconv command line option
1188         to enable fast FP-to-integer conversion code.
1189         * jit.c, jit.h: added global variable to store state
1190         for the above option. This optimization is disabled
1191         by default.
1192         * x86.brg: added code to emit fast FP-to-integer
1193         conversion sequences.
1194
1195 2002-05-10  Dan Lewis  <dihlewis@yahoo.co.uk>
1196
1197         * emit-x86.c: simple definite assignment analysis optimization for
1198         uninitialized locals.
1199
1200 Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
1201
1202         * x86.brg, emit-x86.c: patch the branch targets with x86_patch().
1203
1204 2002-05-10  Dietmar Maurer  <dietmar@ximian.com>
1205
1206         * linear-scan.c (mono_update_gen_set): improvement/bug fix
1207
1208         * x86.brg: added additional rules to handle global allocated registers
1209
1210         * mono.c (usage): the option is called --nols, and it dissables
1211         linear scan.
1212
1213         * x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8
1214
1215 2002-05-09  Dietmar Maurer  <dietmar@ximian.com>
1216
1217         * linear-scan.c: linear scan reg. allocation and data flow analysis
1218         use Paolo's great bitset implementation.
1219
1220         * jit.c (arch_allocate_var): add live range info
1221         (mono_cfg_add_successor): create list of successors for basic
1222         blocks.
1223
1224         * mono.c (main): new option --ls to enable linear scan
1225
1226         * exception.c (arch_handle_exception): print instruction pointer
1227         relative to method start address.
1228
1229         * jit.c (mono_print_ctree): print register number if locals are
1230         allocate in registers.
1231
1232         * emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
1233         (arch_emit_epilogue): take care when restoring save registers,
1234         because the stack pointer may has changed.
1235
1236         * x86.brg: s/VAROFFSET/VARINFO/
1237         modified to support global register allocation
1238
1239 Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
1240
1241         * jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.
1242
1243 2002-05-03  Sergey Chaban <serge@wildwestsoftware.com>
1244
1245         * x86.brg: more coni4 optimizations
1246         MUL: generate optimized code for some consts other
1247         than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
1248         DIV_UN: multiply with reciprocal instead of dividing;
1249
1250 2002-05-03  Dietmar Maurer  <dietmar@ximian.com>
1251
1252         * x86.brg: use VAROFFSET macro
1253
1254         * emit-x86.c (tree_emit): allocate space for spilled regs in
1255         activation frame instead of pushing them to the stack.
1256
1257         * x86.brg: replace BXX with CBRANCH/COMPARE
1258         replaced CXX CSET/COMPARE
1259
1260         * emit-x86.c (arch_allocate_regs): improved register allocation
1261
1262 2002-05-02  Dietmar Maurer  <dietmar@ximian.com>
1263
1264         * delegate.c (mono_delegate_cleanup): signal semaphore in order to
1265         exit threads.
1266
1267 2002-04-30  Dick Porter  <dick@ximian.com>
1268
1269         * mono.c (main): Tell glib to not abort when g_log() etc print
1270         recursively
1271
1272 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
1273
1274         * x86.brg: opt. LDELEMA impl.
1275         (MUL) use shift when possible.
1276         (DIV) use shift when possible.
1277         impl. various opt. with coni4
1278
1279         * exception.c (arch_handle_exception): use ctx->SC_EBP in
1280         end_of_stack check as suggested by Linus Upson <linus@linus.com>
1281
1282 2002-04-29  Dietmar Maurer  <dietmar@ximian.com>
1283
1284         * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.  
1285
1286         * exception.c: included the Freebsd patch from Sandro Tolaini
1287         <sandro@focuseek.com>
1288
1289 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
1290
1291         * mono.c, jit.c: use mono_runtime_run_main ().
1292
1293 2002-04-29  Dietmar Maurer  <dietmar@ximian.com>
1294
1295         * jit.c (mono_analyze_stack): dont call methods on Object with
1296         METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
1297
1298         * x86.brg: added more CONV_U rules
1299
1300         * jit.c (mono_analyze_stack): avoid recursive call of virtual
1301         methods: fixes Bug #23778 
1302         (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
1303
1304         * exception.c (arch_handle_exception): only g_assert(cleanup) if
1305         we really need it.
1306
1307 2002-04-27      Patrik Torstensson <patrik.torstensson@intel.com>
1308
1309         * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
1310
1311 2002-04-27  Martin Baulig  <martin@gnome.org>
1312
1313         * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
1314         there's already `epilog' so we don't need `epilogue_begin'.
1315
1316         * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
1317         size of the method's code.
1318
1319 2002-04-25  Martin Baulig  <martin@gnome.org>
1320
1321         * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
1322         changes.
1323
1324 2002-04-25  Dietmar Maurer  <dietmar@ximian.com>
1325
1326         * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
1327         added CONV_OVF_I4 (fix bug #23808)
1328
1329 2002-04-23  Dietmar Maurer  <dietmar@ximian.com>
1330
1331         * x86.brg: code cleanup - use x86_patch ()
1332
1333         * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
1334         (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
1335
1336         * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
1337         because it slows down performance.
1338
1339 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
1340
1341         * emit-x86.c: enter_method handles 8-byte aligned parameters.
1342
1343 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
1344
1345         * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
1346         non-shared code.
1347
1348 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
1349
1350         * jit.c (check_inlining): added statistics about inlineing
1351
1352         * mono.c (usage): new switch --noinline to disable inlining
1353
1354         * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
1355         inline methods (to keep semantics)
1356
1357         * x86.brg: added constant folding for inegers 
1358
1359         * emit-x86.c (tree_allocate_regs): handle the special case when
1360         chain rules need a register.
1361
1362 2002-04-19  Dietmar Maurer  <dietmar@ximian.com>
1363
1364         * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
1365
1366         * jit.c (check_inlining): better inlining support
1367
1368 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
1369         
1370         * x86.brg: LDLEN uses max_length instead of bounds[0]
1371         * jit.c: support for new szarray format
1372
1373 2002-04-18  Dietmar Maurer  <dietmar@ximian.com>
1374
1375         * jit.c (check_inlining): added inlining support
1376
1377 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
1378
1379         * x86.brg: optimized version of castclass and isinst
1380
1381 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
1382
1383         * emit-x86.c, invoke.c: track time spent compiling.
1384
1385 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
1386
1387         * emit-x86.c, invoke.c: call profile callbacks if needed.
1388         * jit.c, jit.h, mono.c: add --profile command line option.
1389
1390 2002-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1391
1392         * jit.h: included mono/io-layer/io-layer.h to avoid breaking
1393         compilation under windows when upgrading mingw and w32api to 
1394         version 1.3 (thanks Dick!).
1395
1396 2002-04-15  Patrik Torstensson <patrik.torstensson@labs2.com>
1397
1398         * jit.c: changed the array icalls to use full names
1399
1400 2002-04-15  Dietmar Maurer  <dietmar@ximian.com>
1401
1402         * x86.brg: check the this pointer before calling
1403         non-virtual functions
1404
1405         * emit-x86.c (arch_emit_prologue): initialize local vars.
1406
1407         * x86.brg: removed incredible clumsy code
1408
1409 2002-04-13  Martin Baulig  <martin@gnome.org>
1410
1411         * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
1412         the location of a variable.
1413         (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
1414         instead of a stack offset and use dwarf2_write_variable_location() to write
1415         the location.
1416
1417 2002-04-13  Martin Baulig  <martin@gnome.org>
1418
1419         * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
1420         API changes.
1421
1422 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1423
1424         * Makefile.am: use of the new '-s' option in monoburg.
1425
1426 2002-04-12  Martin Baulig  <martin@gnome.org>
1427
1428         * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
1429         lifetime.
1430
1431 2002-04-10  Sergey Chaban <serge@wildwestsoftware.com>
1432         * win32-exception: added Win32 SEH exception filter that translates
1433         CONTEXT to sigcontext;
1434
1435         * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
1436         in a platfrom-dependent way;
1437
1438         * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
1439         and avoid io-layer includes;
1440
1441         * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
1442         is defined;
1443
1444 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
1445
1446         * delegate.c (arch_end_invoke): restore output arguments
1447
1448 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
1449
1450         * jit.c: call mono_runtime_init ().
1451
1452 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
1453
1454         * jit.c (mono_jit_cleanup): added more statistics
1455
1456         * invoke.c (arch_create_native_wrapper): special case EndInvoke -
1457         we need to pass the MonoMethod pointer as first argument.
1458
1459         * delegate.c (mono_async_invoke): notify all listeners, not only a
1460         single one.
1461         (arch_end_invoke): we now pass a MonoMethod as first parameter and
1462         use arch_method_call_message_new() to access the stack.
1463         (arch_end_invoke): wait until we really finished processing
1464         (async_invoke_abort): notify all listeners, not only a
1465         single one.
1466
1467 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
1468
1469         * message.c (arch_return_value): impl.
1470         (arch_method_return_message_restore): consider delegate BeginInvoke
1471
1472         * jit.c: removed jit_exec_main()
1473
1474         * delegate.c (arch_begin_invoke): use the message builder to make
1475         it architecture independent - still needs more cleanup.
1476
1477 2002-04-05  Dietmar Maurer  <dietmar@ximian.com>
1478
1479         * delegate.c (mono_delegate_ctor): support for transparent proxy
1480
1481         * x86.brg (freg): bug fix in CONV_R* opcodes
1482
1483 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
1484
1485         * message.c: added documentation
1486
1487 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
1488
1489         * mono.c (main): use --trace instead of --trace-calls
1490
1491         * x86.brg: impl. REMOTE_STIND_XX
1492
1493         * message.c (mono_store_remote_field): impl.
1494
1495 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
1496
1497         * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
1498
1499         * message.c (mono_load_remote_field): impl.
1500
1501         * jit.c (mono_analyze_stack): only call marshalbyref methods
1502         through the vtable.
1503         (mono_analyze_stack): consider marshalbyref objects in LDFLD
1504
1505 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
1506
1507         * x86.brg: kill pointer arithmetric.
1508
1509 2002-03-28  Martin Baulig  <martin@gnome.org>
1510
1511         * jit.c (mono_debug_insert_breakpoint): New global variable.
1512         (mono_debug_last_breakpoint_address): New global variable.
1513
1514         * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
1515         non-zero, insert a breakpoint; if it's positive, decrement it when done.
1516         Set `mono_debug_last_breakpoint_address' to the address of the last inserted
1517         breakpoint.
1518
1519         * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
1520         `mono_debug_last_breakpoint_address', also documented them here.
1521
1522 2002-03-28  Martin Baulig  <martin@gnome.org>
1523
1524         * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
1525         (AssemblyDebugInfo): Added `format'.
1526
1527         * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
1528         this allows us choose the format on a per-assembly basis.
1529         (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
1530         to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
1531         exists.
1532         (debug_generate_method_lines): Generate correct IL offsets.
1533
1534 2002-03-28  Martin Baulig  <martin@gnome.org>
1535
1536         * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
1537
1538         * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
1539
1540         * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
1541         `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
1542
1543         * debug.c (debug_generate_method_lines): Don't return if we don't have line
1544         numbers, we still need to generate the IL offsets here. Emit line numbers
1545         for `prologue_end_offset' (the first line of actual code) and 
1546         `epilogue_begin_offset' (the line of the method's closing brace).
1547         Don't crash if cfg->bblocks [i].forest is NULL.
1548         (mono_debug_add_method): Don't crash if we don't have line numbers.
1549         Initialize the newly added fields.
1550
1551         * debug-stabs.c: Record first and last line, emit filename info at the
1552         beginning of the stab file, gdb ignores the types otherwise.
1553
1554         * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
1555         emit line number info for the first and last line.
1556
1557 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
1558
1559         * invoke.c (arch_create_delegate_trampoline): impl.
1560
1561 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
1562
1563         * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
1564         with the jit runtime to easy embedding. main() is moved to mono.c, now.
1565         * jit.c: use opcode names from libmetadata.
1566         * debug.h, debug.c: constify char* argument.
1567
1568 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
1569
1570         * jit.c: catching SIGSEGV again, added proxy support
1571
1572 2002-03-21  Dietmar Maurer  <dietmar@ximian.com>
1573
1574         * delegate.c (mono_delegate_init): remove unused worker threads
1575
1576 2002-03-27  Mike Kestner <mkestner@speakeasy.net>
1577
1578         * delegate.c (arch_get_delegate_invoke): malloc a bigger area
1579
1580 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
1581
1582         * jit.c: remove glib mem vtable code.
1583
1584 2002-03-26  Martin Baulig  <martin@gnome.org>
1585
1586         * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
1587         lines if we don't have line number information.
1588         (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
1589         of hardcoding 8.
1590
1591         * debug-stabs.c (write_method_stabs): Don't generate method lines if
1592         we don't have line number information. Use `minfo->method_info.this_offset'
1593         instead of hardcoding 8.
1594
1595         * debug.c (debug_generate_method_lines): Don't crash if we don't have
1596         line number information.
1597         (mono_debug_open_assembly): Don't generate line numbers for
1598         MONO_DEBUG_FORMAT_DWARF2_PLUS.
1599         (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
1600         but it in the new `this_offset' field.
1601         
1602 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
1603
1604         * debug.c (debug_generate_method_lines): Use correct addresses for
1605         record_il_offset().
1606
1607 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
1608
1609         * jit.c: do not set the glib mem vtable anymore.
1610         * Makefile.am: link to libmonoutils.
1611
1612 2002-03-25  Martin Baulig  <martin@gnome.org>
1613
1614         * debug.h (mono_debug_make_symbols): Documented this function.
1615
1616 2002-03-24  Martin Baulig  <martin@gnome.org>
1617
1618         * debug.c (mono_debug_add_method): Include the `this' offset in
1619         the `minfo->method_info.param_offsets' array.
1620
1621 2002-03-23  Martin Baulig  <martin@gnome.org>
1622
1623         * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
1624         to do it before the X86_CMP.
1625         (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
1626         (reg: CLT (lreg, lreg)): Likewise.
1627         (reg: CLT_UN (lreg, lreg)): Likewise.
1628         (reg: CLT_UN (lreg, lreg)): Likewise.
1629         (reg: CGT (lreg, lreg)): Likewise.
1630         (reg: CGT (lreg, lreg)): Likewise.
1631         (reg: CGT_UN (lreg, lreg)): Likewise.
1632         (reg: CGT_UN (lreg, lreg)): Likewise.
1633
1634 2002-03-23  Martin Baulig  <martin@gnome.org>
1635
1636         * debug-private.h (AssemblyDebugInfo): Added `_priv'.
1637
1638         * debug-dwarf2-plus.c
1639         (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
1640         (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
1641         (mono_debug_write_assembly_dwarf2_plus): Only call
1642         mono_debug_update_symbol_file() here.
1643
1644 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
1645
1646         * jit.c: inter strings before executing a method.
1647         Do not intern command line arguments anymore.
1648
1649 2002-03-21  Martin Baulig  <martin@gnome.org>
1650
1651         * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
1652
1653         * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
1654         been created by MCS and fills in all machine dependent stuff.
1655
1656         * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
1657         removed everything which is already in MonoDebugMethodInfo.
1658
1659         * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
1660         (mono_debug_make_symbols): Don't open the file or call as, this is done in the
1661         backend code.
1662
1663         * jit.c (main): Added "--dwarf-plus" command line option to use the new
1664         MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
1665
1666 2002-03-21  Dietmar Maurer  <dietmar@ximian.com>
1667
1668         * jit.c (usage): new option to specify maximum number of worker threads
1669         (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
1670
1671         * delegate.c (async_invoke_abort): added support for asynchronous exceptions
1672         (arch_get_async_invoke): notify listeners before we call the
1673         asynchronous callback
1674
1675 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
1676
1677         * delegate.c (async_invoke_thread): support for domains
1678         (async_invoke_thread): create workers only when needed
1679
1680 2002-03-19  Dietmar Maurer  <dietmar@ximian.com>
1681
1682         * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
1683
1684 2002-03-18  Dietmar Maurer  <dietmar@ximian.com>
1685
1686         * x86.brg: impl. lreg: XOR (lreg, lreg)
1687         impl. REM (freg, freg)
1688
1689 2002-03-17  Martin Baulig  <martin@gnome.org>
1690
1691         * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
1692         base types.
1693
1694         * debug-dwarf2.c: Added support for strings and arrays.
1695
1696 2002-03-17  Martin Baulig  <martin@gnome.org>
1697
1698         * debug.c (mono_debug_get_type): Recursively call this for all function members
1699         of a class type.
1700         (mono_debug_add_method): Don't mangle function names, this must be done by the
1701         debugger backend if the debugging format needs mangled names.
1702
1703         * debug-dwarf2.c: Improved support for classes, added member functions.
1704
1705 2002-03-16  Martin Baulig  <martin@gnome.org>
1706
1707         * debug.c (mono_debug_get_type): Recursively call this for all members and
1708         parent classes of a class type.
1709
1710         * debug-dwarf2.c: Added basic support for classes. Set source language to C++
1711         since GDB doesn't like Java very much.
1712
1713 2002-03-16  Martin Baulig  <martin@gnome.org>
1714
1715         * debug-dwarf2.c: Added support for enums.
1716
1717 2002-03-15  Martin Baulig  <martin@gnome.org>
1718
1719         * debug.c (mono_debug_get_type): Recursively call this for all members
1720         of a struct type.
1721
1722         * debug-dwarf2.c: Added support for structs.
1723
1724 2002-03-15  Dietmar Maurer  <dietmar@ximian.com>
1725
1726         * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
1727         to new MonoLMF layout
1728
1729 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
1730
1731         * emit-x86.c (arch_create_native_wrapper): new code to generate
1732         wrappers for calling native functions.
1733         (arch_create_native_wrapper): free allocated strings
1734         (arch_handle_exception): made mono_jit_info_table domain dependent
1735
1736 2002-03-14  Martin Baulig  <martin@gnome.org>
1737
1738         * debug.c (MonoDebugFormat): New public enums specifying which debugging
1739         format to use.
1740         (mono_debug_open_file): Added MonoDebugFormat argument.
1741         (mono_debug_make_symbols): Don't take an argument to make it easier to call
1742         this function from GDB. It's now safe to call this function multiple times;
1743         it'll always write a complete debugging file.
1744
1745         * debug.c: Splitted this file into a general part which remains in this file
1746         and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
1747         All public functions now call a corresponding format specific function.
1748
1749         * debug.c: The following changes are private to debug.c:
1750         (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
1751         (record_line_number, debug_generate_method_lines): New private functions.
1752         (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
1753         calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
1754         mono_debug_open_assembly_dwarf2).
1755         (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
1756         now safe to call this function multiple times.
1757         (mono_debug_get_type): New public function. This takes a `MonoClass *' and
1758         returns an unique index for this type. It's used to ensure that we only write
1759         each class once to the debugging file.
1760         (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
1761         data structure, but don't directly write to the debugging file. This is done
1762         later from mono_debug_write_assembly().
1763
1764         * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
1765         debugging output. Call mono_debug_close() on cleanup if necessary.
1766
1767 2002-03-14  Martin Baulig  <martin@gnome.org>
1768
1769         * debug-private.h: New private header file.
1770
1771         * debug-stabs.c: Added the stabs type generation stuff which was
1772         previously in debug.c.
1773
1774         * debug-dwarf.c: Started to implement type support. We're currently
1775         only writing this most basic types to the dwarf file, but this will
1776         change soon.
1777
1778 2002-03-13  Martin Baulig  <martin@gnome.org>
1779
1780         * debug-stabs.c, debug-dwarf2.c: New files containing my new
1781         debugging code. They're now in CVS, but not yet used anywhere.
1782
1783 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
1784
1785         * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
1786         macros, included new delegate code from Daniel Stodden. 
1787         
1788         
1789 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
1790
1791         * jit.c: verify that corlib and runtime are in sync.
1792
1793 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
1794
1795         * emit-x86.c, jit.c: use the debug-helpers facilities to
1796         describe and match a method when debugging.
1797
1798 2002-03-10  Martin Baulig  <martin@gnome.org>
1799
1800         * emit-x86.c (arch_compile_method): When emitting stabs debugging
1801         output, put a nop instruction at the start of all functions so that
1802         the adresses won't change when using --debug.
1803
1804         * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
1805         the bytecode area, stabs needs a line number in the .il file. Use the
1806         new info->moffsets to get the line number.
1807         (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
1808         `moffsets' is an array of `total_lines' fields (total number of lines
1809         in the .il file); for each line in the .il field, this array contains
1810         the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
1811         of a method and 0 otherwise.
1812         (debug_load_method_lines): Read the whole .il file and initialize the
1813         info->moffsets field.
1814
1815 2002-03-09  Martin Baulig  <martin@gnome.org>
1816
1817         * x86.brg (DIV_UN): Clear EDX before performing the division and remove
1818         the unnecessary CDQ instruction.
1819
1820 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
1821
1822         * jit.c (mono_analyze_stack): only load addresses of value types
1823         on the runtime stack.
1824
1825 2002-03-07  Duncan Mak  <duncan@ximian.com>
1826
1827         * Makefile.am: A small patch fixing errors in vpath-based builds
1828         (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
1829         committed for Daniel Stodden <stodden@in.tum.de>. 
1830
1831 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1832
1833         * jit.c: Boehm-GC enable.
1834
1835 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
1836
1837         * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
1838         realloc that code sometimes!
1839
1840         * emit-x86.c (mono_compute_branches): support several types of
1841         jump infos
1842
1843 2002-03-06  Dietmar Maurer  <dietmar@ximian.com>
1844
1845         * x86.brg: impl. MUL_OVF_UN (reg, reg)
1846
1847         * jit.c (mono_find_final_block): find correct finally handler.
1848
1849         * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
1850         caller saved registers.  
1851
1852 2002-03-05  Dietmar Maurer  <dietmar@ximian.com>
1853
1854         * x86.brg: use x86_widen_reg for CONV opcodes
1855
1856 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
1857
1858         * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
1859
1860         * emit-x86.c (arch_handle_exception): big fix - dont use
1861         uninitialized next_bp
1862         (arch_compile_method): make the jit thread save
1863         (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
1864         to avoid need of recursive mutexes
1865
1866         * x86.brg: use new mono_assert macros
1867
1868 2002-02-28  Dietmar Maurer  <dietmar@ximian.com>
1869
1870         * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
1871         calling into unmanaged code (arch_compile_method).
1872
1873         * x86.brg: impl. CONV_I4 (freg) with correct rounding
1874         (lreg): impl CALL_I8(INTF_ADDR)
1875         impl. CONV_R_UN (reg)
1876         bug fix im REM_UN
1877
1878 2002-02-27  Dietmar Maurer  <dietmar@ximian.com>
1879
1880         * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
1881
1882 2002-02-26  Dietmar Maurer  <dietmar@ximian.com>
1883
1884         * x86.brg: bug fix in CLT(lreg,lreg)
1885         (reg): bug fix in CONV_OVF_I4(lreg)
1886         (lreg): replaced x86_call_reg with x86_call_code
1887
1888         * emit-x86.c (mono_add_jump_info): impl.
1889         (mono_compute_branches): patch real jump address (instead of
1890         emitting code twice)
1891
1892 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1893
1894         * x86.brg: optimize cmp reg,0 -> test reg.
1895
1896 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1897
1898         * jit.h, jit.c, emit-x86.c: Added a few statistics counters
1899         and the --stats command line option to print them.
1900         Fixed memory leak in arch_compile_method () when a method's code is
1901         found in the cache. Fix magic trampoline to deal with static calls.
1902
1903 2002-02-21  Dietmar Maurer  <dietmar@ximian.com>
1904
1905         * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN 
1906
1907 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
1908
1909         * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
1910         (arch_create_jit_trampoline): cache trampoline code
1911
1912 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
1913
1914         * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
1915         specific code.
1916         (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
1917
1918         * x86.brg: do not encode exception objects into the instruction
1919         stream, because they are domain dependend. Use
1920         arch_get_throw_exception_by_name() instead;
1921
1922 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1923
1924         * jit.c: intern command line arguments.
1925
1926 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
1927
1928         * jit.c (mono_analyze_stack): use the magic trampoline for all
1929         calls (since we cant store the address of compiled code in
1930         method->addr).
1931         (mono_analyze_stack): imp. LDSTR for shared code
1932
1933         * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
1934         (arch_compile_method): add a cache for compiled methods to avoid
1935         recompilation. dont use method->addr to store domain dependent
1936         code address.
1937
1938 2002-02-15  Dietmar Maurer  <dietmar@ximian.com>
1939
1940         * x86.brg: impl. BLE,BGT for freg
1941
1942 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1943
1944         * emit-x86.c: handle unreachable code. Eliminate some unneeded
1945         malloc() calls.
1946         * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
1947         main(). Add --compile classname and --ncompile num command line
1948         options to do performance evaluation of the jitter (and help
1949         debugging).
1950
1951 2002-02-15  Dietmar Maurer  <dietmar@ximian.com>
1952
1953         * emit-x86.c (arch_compile_method): bug fix in static delegate
1954         Invoke code.
1955
1956 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
1957
1958         * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
1959
1960 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
1961
1962         * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
1963
1964 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
1965
1966         * jit.c (arch_allocate_var): Only assert that the alignment is
1967         at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
1968
1969 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1970
1971         * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
1972
1973 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1974
1975         * emit-x86.c: make x86_magic_trampoline() handle call instructions
1976         with an imm8 displacement. x86.brg not yet changed to take advantage
1977         of it.
1978
1979 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1980
1981         * jit.c: use opcode info from libmetadata to do flow analysis
1982         and simplify code.
1983
1984 2002-02-06  Dietmar Maurer  <dietmar@ximian.com>
1985
1986         * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking 
1987
1988 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
1989
1990         * x86.brg: use element_class for type check
1991
1992 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
1993
1994         * jit.c (main): impl. __array_Address icall
1995
1996         * mempool.c (mono_mempool_alloc): handle large block allocation
1997
1998 2002-02-01  Dietmar Maurer  <dietmar@ximian.com>
1999
2000         * x86.brg: impl. SHL/SHR/CLT for 64 bit values
2001
2002 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
2003
2004         * x86.brg: impl. CEQ(lreg,lreg)
2005
2006         * jit.c (mono_analyze_stack): impl. LDVIRTFTN
2007         (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
2008
2009         * x86.brg: removed some dead code.
2010
2011 2002-01-18  Dietmar Maurer  <dietmar@ximian.com>
2012
2013         * jit.c (arch_allocate_var): fixed alignment bugs
2014
2015 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
2016
2017         * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
2018
2019 2002-01-16  Dietmar Maurer  <dietmar@ximian.com>
2020
2021         * jit.c (main): install the trampoline before we start to create
2022         objects.
2023
2024         * x86.brg: impl. CLT_UN, CGT_UN
2025
2026         * emit-x86.c (leave_method): added check for null object
2027         (enter_method): consider byref arguments
2028
2029 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
2030
2031         * x86.brg: bug fix in CONV_OVF_I1_UN
2032         impl. ADD_OVF, MUL_OVF
2033         impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
2034         (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
2035         (EMIT_COND_EXCEPTION): added signed flag
2036
2037 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
2038
2039         * jit.c: implement stloc, ldloc, ldloca.
2040
2041 2002-01-11  Dietmar Maurer  <dietmar@ximian.com>
2042
2043         * jit.c (mono_analyze_stack): fixed calculation of last_instr
2044
2045         * x86.brg (LDLEN): emit null_reference exception
2046         (BLE_UN): bug fix. 
2047         (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
2048
2049 2002-01-04  Dietmar Maurer  <dietmar@ximian.com>
2050
2051         * x86.brg: bug fix in CASTCLASS
2052
2053 2001-12-21  Dietmar Maurer  <dietmar@ximian.com>
2054
2055         * jit.c (mono_analyze_stack): spill MUL to avoid problem with
2056         register allocation.
2057
2058         * emit-x86.c (arch_compile_method): fixed static delegate bug
2059
2060 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
2061
2062         * x86.brg, jit.c: Split up the nodes that we used to share on
2063         CONV_OVF.  They were sharing the nodes because they are the same
2064         on 32-bit machines, but on 64-bit machines you need different
2065         code for them.
2066
2067 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
2068
2069         * x86.brg: removed prerequisite that (tree->left->reg1 <
2070         tree->right->reg1) to make register allocation easier.
2071
2072 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
2073
2074         * emit-x86.c (arch_handle_exception): new code to handle
2075         exceptions inside unmanaged code.
2076
2077         * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
2078         address as first argument.
2079
2080 2001-12-15  Dietmar Maurer  <dietmar@ximian.com>
2081
2082         * x86.brg: pass exceptions on the stack
2083
2084         * jit.h (ISSTRUCT): new macro to check for real value types
2085         (return false for enum types). 
2086
2087 2001-12-11  Dietmar Maurer  <dietmar@ximian.com>
2088
2089         * x86.brg: use position indepentent code if possible. 
2090
2091         * x86.brg (EMIT_COND_EXCEPTION): new macro.
2092
2093         * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
2094
2095 2001-12-10  Dietmar Maurer  <dietmar@ximian.com>
2096
2097         * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
2098         blocks.
2099         (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
2100
2101         * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
2102
2103 2001-12-07  Dietmar Maurer  <dietmar@ximian.com>
2104
2105         * jit.c (mono_allocate_intvar): bug fix.
2106
2107         * emit-x86.c (get_unbox_trampoline): impl.
2108
2109         * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
2110
2111 2001-12-06  Dietmar Maurer  <dietmar@ximian.com>
2112
2113         * x86.brg: raise exceptions.
2114
2115 2001-12-05  Dietmar Maurer  <dietmar@ximian.com>
2116
2117         * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
2118         the stack. 
2119
2120 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
2121
2122         * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
2123         CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
2124         CONV.OVF.I2.UN, CONV.OVF.I8.UN
2125
2126 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
2127
2128         * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
2129         removed the locaddr nonterminal, reimplemented value types
2130         
2131         * jit.c: reimplemented value type support, better support for
2132         enumeration types. 
2133
2134 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
2135
2136         * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
2137         conv.ovf.u8 
2138
2139 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
2140
2141         * jit.c: call mono_init() after registering internal calls.
2142
2143 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
2144
2145         * emit-x86.c (tree_preallocate_regs): improved register allocation
2146
2147         * x86.brg: impl. ISINST, CASTCLASS
2148
2149 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
2150
2151         * x86.brg: rearrange fields to reduce struct size.
2152         * jit.c: use signature->param_count, not signature->params_size.
2153         * debug.c: off-by-one error fix.
2154
2155 2001-11-29  Radek Doulik  <rodo@ximian.com>
2156
2157         * Makefile.am: build mono only for X86 architecture, compilation
2158         fails for ppc now because of accessing registers in sigcontext
2159         structure
2160
2161 2001-11-29  Dietmar Maurer  <dietmar@ximian.com>
2162
2163         * jit.c (mono_analyze_stack): bug fix in DUP
2164
2165 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
2166
2167         * debug.c: fix type handling. Position function position at start of
2168         IL code. Output more fine-grained stepping information.
2169
2170 2001-11-28  Dietmar Maurer  <dietmar@ximian.com>
2171
2172         * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
2173
2174         * jit.c (mono_analyze_stack): record the cli_address for later use
2175         with gdb.
2176         (sigsegv_signal_handler): translate sigsegv into "Internal error"
2177         exception.
2178
2179 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
2180
2181         * debug.c, debug.h: added support for generating stabs.
2182         Stabs can be compiled with as and the resulting object file can be
2183         loaded in a gdb session with add-symbol-file object.o.
2184         * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
2185         where locals and arguments are stored in the stack. Add support for
2186         passing command line arguments to CLR programs.
2187         * emit-x86.c: insert a breakpoint at method invocation if needed.
2188
2189 2001-11-27  Dietmar Maurer  <dietmar@ximian.com>
2190
2191         * jit.c: exception support
2192
2193         * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
2194         the right order.
2195
2196 2001-11-26  Dick Porter  <dick@ximian.com>
2197
2198         * Makefile.am (mono_LDADD): Add io-layer library
2199
2200 2001-11-19  Dietmar Maurer  <dietmar@ximian.com>
2201
2202         * jit.c (mono_analyze_stack): impl. LDFTN
2203         (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
2204         make register allocation easier on x86
2205
2206         * emit-x86.c (enter_method): more debugging output for Strings
2207         (arch_compile_method): added delegate support
2208         (arch_compile_method): align EBP to 8 byte boundary
2209
2210 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
2211
2212         * jit.c: use mono_install_trampoline (), instead of exporting
2213         a function to a lower-level library.
2214
2215 2001-11-16  Dietmar Maurer  <dietmar@ximian.com>
2216
2217         * x86.brg (STRING_ARG): impl. a way to marshal strings. This
2218         will be extensible to handle all possible kinds of marshalling
2219         requirements. 
2220
2221         * jit.c (map_call_type): added MB_TERM_CALL_VOID
2222         (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
2223         instructions to handle this arguments more effectively.
2224
2225 2001-11-15  Dietmar Maurer  <dietmar@ximian.com>
2226
2227         * Makefile.am (mono_SOURCES): renamed testjit to mono
2228
2229         * x86.brg: added debugging support 
2230
2231         * testjit.c: added support for value types, CFG improvements
2232
2233         * emit-x86.c (enter_method): handle value types
2234         (tree_allocate_regs): impl. a better way to handle chain rules
2235
2236 2001-11-10  Dietmar Maurer  <dietmar@ximian.com>
2237
2238         * x86.brg (INITOBJ): bug fix: initialize data before use,
2239         simplified the code.
2240
2241 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
2242
2243         * testjit.c (mono_analyze_stack): Remove compiler warning by
2244         testing against NULL.
2245
2246 2001-11-09  Dick Porter  <dick@ximian.com>
2247
2248         * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
2249
2250 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
2251
2252         * testjit.c (mono_analyze_stack): new BOX impl.
2253
2254         * x86.brg: implemented INITOBJ
2255
2256         * testjit.c (mono_analyze_stack): finished array support
2257         (mono_analyze_stack): reimplemented DUP instruction
2258
2259 2001-11-08  Dietmar Maurer  <dietmar@ximian.com>
2260
2261         * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
2262         represents the address of the element. This way we can emit highly
2263         optimized x86 instructions to access elements (using base+index+offset
2264         adressing mode)
2265
2266 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
2267
2268         * mempool.c: Include string.h to kill warning.
2269
2270         * testjit.c: Add typecast to kill warning.
2271
2272         * x86.brg: Include string.h to eliminate warning.
2273
2274         * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
2275         kill warning.
2276
2277 2001-11-07  Dietmar Maurer  <dietmar@ximian.com>
2278
2279         * emit-x86.c (enter_method): print out all method arguments
2280         (x86_magic_trampoline): impl.
2281         (arch_create_simple_jit_trampoline): we use different trampolines
2282         for static methods (no need to write the address back into to
2283         vtable).
2284
2285 2001-11-06  Dietmar Maurer  <dietmar@ximian.com>
2286
2287         * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
2288         use less the 16 bytes.
2289
2290         * x86.brg: code cleanup
2291
2292 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
2293
2294         * testjit.c: bug fixes.
2295
2296         * emit-x86.c (leave_method): print result values
2297
2298 2001-11-03  Dietmar Maurer  <dietmar@ximian.com>
2299
2300         * emit-x86.c (enter_method): new debugging code
2301         (leave_method): new debbuging code, this functions are called
2302         when you use the new option --trace-calls
2303
2304 2001-11-02  Dietmar Maurer  <dietmar@ximian.com>
2305
2306         * testjit.c: impl. STELEM_XX, STELEM_XX
2307
2308         * x86.brg: impl. LDLEN, LDELEMA
2309         
2310
2311 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
2312
2313         * x86.brg: added some experimental code for CALL
2314         instructions - still not found the optimal way to do it.
2315
2316         * testjit.c (map_stind_type): add support for value types with
2317         a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
2318         CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
2319         (ctree_create_newobj): impl.
2320         
2321
2322         * emit-x86.c (tree_allocate_regs): removed allocation code for
2323         addr nonterminal.
2324         (get_address): use a simple, but bug free search instead of the
2325         buggy binary search.
2326
2327 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
2328
2329         * testjit.c: support virtual functions
2330
2331         * x86.brg: support different addressing modes for calls
2332
2333 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
2334
2335         * testjit.c: impl. STFLD
2336
2337 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
2338
2339         * x86.brg: impl. CEQ
2340
2341 2001-10-04  Dick Porter  <dick@ximian.com>
2342
2343         * testjit.c:
2344         * emit-x86.c: include mono-endian.h not endian.h
2345
2346 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
2347
2348         * testjit.c (ctree_create_dup): really duplicate the tree.
2349         attach the arguments to the CALL node. Added a new macro to
2350         make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
2351
2352 2001-10-01  Dietmar Maurer  <dietmar@ximian.com>
2353
2354         * interp.brg: the burm based interpreter: added the file as example.
2355
2356 2001-09-27  Dietmar Maurer  <dietmar@ximian.com>
2357
2358         * x86.brg: cleanup
2359
2360         * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
2361         data.
2362         (map_stind_type): support enum types
2363         (map_ldind_type): support enum types
2364
2365         * emit-x86.c (tree_allocate_regs): added code to support
2366         register allocation for addressing modes trees.
2367         (tree_emit): bug fix: we have to emit all mono_burg_functins. The
2368         previous impl. did not work for chain rules.
2369         (compute_branches): support for SWITCH statements
2370
2371         * x86.brg: added rules to model x86 addressing modes
2372
2373 2001-09-26  Dietmar Maurer  <dietmar@ximian.com>
2374
2375         * emit-x86.c (compute_branches): implemented SWITCH
2376
2377         * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
2378         (map_ldind_type): add enumeration types.
2379         (map_stind_type): add enumeration types.
2380
2381         * emit-x86.c (arch_compile_method): more documentation.
2382
2383         * testjit.c: moved the architecture specific things to emit-x86.c
2384         and x86.brg. Added more documentation. code cleanup.
2385
2386 2001-09-25  Dietmar Maurer  <dietmar@ximian.com>
2387
2388         * x86.brg: we now have different types of addresses: ADDR_L for local
2389         values, ADDR_A for arguments and ADDR_G for global addresses. We
2390         also use LDIND_XX token to load values from a specific address
2391         instead of LDLOC/STLOC. 
2392
2393         * testjit.c: use the new adressing scheme everywhere:
2394         LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)  
2395
2396 2001-09-24  Dietmar Maurer  <dietmar@ximian.com>
2397
2398         * testjit.c (main): fix bug in parameter parsing
2399
2400         * x86.brg: impl. more opcodes
2401
2402 2001-09-23  Dick Porter  <dick@ximian.com>
2403
2404         * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
2405
2406 2001-09-23  Dietmar Maurer  <dietmar@ximian.com>
2407
2408         * testjit.c: use the memory pool to avoid memory leaks
2409
2410 2001-09-22  Dietmar Maurer  <dietmar@ximian.com>
2411
2412         * x86.brg: increment the stack pointer after function calls
2413
2414 2001-09-21  Dick Porter  <dick@ximian.com>
2415
2416         * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
2417
2418 2001-09-21  Dietmar Maurer  <dietmar@ximian.com>
2419
2420         * x86.brg: implemented long MUL/DIV
2421         (MB_OPT_LEVEL): define optimisation level macro
2422
2423         * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
2424         for operations like idiv. it is also possible to assign specific registers.
2425
2426 2001-09-20  Dietmar Maurer  <dietmar@ximian.com>
2427
2428         * x86.brg: added basic support for long
2429
2430         * testjit.c (mono_compile_method): implemented POP
2431
2432 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
2433
2434         * testjit.c (usage): Added a couple of more usage options.
2435
2436 2001-09-19  Dietmar Maurer  <dietmar@ximian.com>
2437
2438         * x86.brg: added more floating point grammar 
2439
2440         * testjit.c (mono_compile_method): make local offsets negative
2441
2442         * x86.brg: added some floating point trees
2443
2444         * testjit.c (mono_compile_method): arguments on the runtime 
2445         stack are at least 4 bytes
2446
2447         * x86.brg: partly implemented 8,16 bit integers
2448
2449         * testjit.c (get_address): mark basic blocks
2450
2451 2001-09-18  Dietmar Maurer  <dietmar@ximian.com>
2452
2453         * x86.brg: added some rules to optimize code
2454
2455         * testjit.c (get_address): use a binary search to get the address
2456         (main): added an option to debug the jit (-d)
2457
2458 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
2459
2460         * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
2461
2462 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
2463
2464         * testjit.c (mono_compile_method): Provide better error reporting.
2465
2466 2001-09-17  Dietmar Maurer  <dietmar@ximian.com>
2467
2468         * testjit.c (tree_get_address): impl. to fix address bug
2469         (tree_get_address): make sure that we can only jump to the first
2470         instruction of a tree.
2471
2472         * x86.brg: emit real code for calls
2473
2474         * testjit.c (create_jit_trampoline): creates a function to trigger jit
2475         compilation.
2476         (mono_compile_method): reversed argument order
2477
2478 2001-09-15  Dietmar Maurer  <dietmar@ximian.com>
2479
2480         * x86.brg (stmt): don't emit unnecessary register moves
2481
2482         * testjit.c (tree_allocate_regs): free registers earlier
2483
2484 2001-09-14  Dietmar Maurer  <dietmar@ximian.com>
2485
2486         * x86.brg: branch addresses are now resolved
2487
2488         * testjit.c (compute_branches): compute address of branches
2489
2490         * x86.brg: emit real x86 instructions
2491
2492         * testjit.c: call objdump to disassemble the output
2493
2494 2001-09-13  Dietmar Maurer  <dietmar@ximian.com>
2495
2496         * x86.brg: use the right offsets to access local variables
2497         and arguments.
2498
2499         * emit-x86.c: only save/restore callee saved registers if they are
2500         really modified.
2501
2502         * testjit.c (tree_allocate_regs): use the new MonoRegSet to
2503         allocate registers.
2504         (mono_compile_method): changed the tree for mothod calls
2505
2506         * regset.h: impl.
2507         
2508         * regset.c: impl.
2509         
2510
2511 2001-09-10  Miguel de Icaza  <miguel@ximian.com>
2512
2513         * x86.brg: Use Unix assembly syntax.
2514
2515         * emit-x86.c: support code, should be moved
2516
2517         * testjit.c: Use GPtrArrays instead of GLists, as those are very
2518         inefficient at appends.
2519
2520         * Renamed `create_new_leave' to `create_new_leaf'
2521
2522         
2523