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