Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / jit / ChangeLog
1
2 Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
3
4         * message.c, emit-x86.c: kill warnings.
5
6 2002-05-31  Dietmar Maurer  <dietmar@ximian.com>
7
8         * x86.brg: buf fix in REMOTE_STIND_OBJ
9         (mono_ldvirtftn): impl.
10         (mono_ldintftn): impl.
11         (mono_ldftn): impl.
12
13 Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14
15         * mono.c: added --config command line option.
16
17 Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18
19         * jit.c, jit.h: collect statistics about the number of basic blocks.
20
21 2002-05-31  Martin Baulig  <martin@gnome.org>
22
23         * debug.c (mono_debug_address_from_il_offset): New public function.
24         (mono_debug_add_method): Improved local variable info: correctly handle
25         variables in registers and their start/end scopes.
26
27 2002-05-30  Martin Baulig  <martin@gnome.org>
28
29         * debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
30         not "%p" which seems to be broken on Windows/mingw32.
31
32 2002-05-30  Dietmar Maurer  <dietmar@ximian.com>
33
34         * x86.brg (reg): bug fix in LOCALLOC
35
36         * mono.c (main): new switch --nointrinsic to disable memcpy opt.
37
38         * x86.brg: added block copy/init optimizations from 
39         Serge (serge@wildwestsoftware.com)
40  
41 Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
42
43         * invoke.cs: lookup P/Invoke method address only when needed.
44
45 2002-05-29  Dietmar Maurer  <dietmar@ximian.com>
46
47         * x86.brg: bug fix in REMOTE_STIND_OBJ
48
49         * invoke.c (arch_create_native_wrapper): handle pointers to value types
50
51         * helpers.h: use mono_ prefix for all functions
52
53         * jit.c (mono_analyze_stack): fixed SIZEOF
54
55         * x86.brg: impl. LOCALLOC, INITBLK
56
57 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
58
59         * x86.brg: impl. CKFINITE 
60
61         * jit.c (mono_analyze_stack): impl. CEE_CALLI
62
63         * x86.brg (JMP): impl. JMP opcode
64
65 2002-05-27  Dietmar Maurer  <dietmar@ximian.com>
66
67         * jit.c (mono_cfg_new): reserve additional space to store ESP when
68         calling finally handlers.
69
70         * exception.c (arch_get_call_finally): save ESP before calling
71         finally handler.
72
73         * helpers.c (map_arg_type): move some generic helper function into
74         this file.
75
76         * mono.c (usage): new option --breakonex 
77
78         * exception.c (arch_exc_is_caught): only return FALSE if really
79         unhandled.
80
81         * jit.c (mono_thread_abort): free jit_tls
82
83 2002-05-24  Dietmar Maurer  <dietmar@ximian.com>
84
85         * x86.brg (stmt): use memmove to cope with overlapping
86         blocks. This is not required by the specs, so we can remove it
87         later if it turns out to be too slow (and use memcpy).
88
89         * jit.c (mono_analyze_stack): moved const. folding from x86.brg
90
91         * x86.brg: CPBLK impl.
92
93         * emit-x86.c (tree_emit): modified to support 3 nonterminals per
94         rule (used for CPBLK).
95
96 Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
97
98         * mono.c: remove generated code from hash when benchmarking/testing
99         method compilation.
100         * invoke.cs: special case string ctors.
101
102 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
103
104         * *.c: code cleanups - tried to separate architecture dependent things. 
105
106 2002-05-23  Martin Baulig  <martin@gnome.org>
107
108         * debug.c (mono_debug_open): Don't call mono_debug_add_image().
109         (mono_debug_write_symbols): Only recreate the symbol file if
110         necessary.
111
112         * debug-private.h (MonoDebugHandle): Added `dirty' flag.
113
114         * mono.c (main): Call mono_debug_add_image() here.
115
116         * jit.c (mono_thread_abort): If we have debugging support, call
117         mono_debug_make_symbols() and G_BREAKPOINT().
118
119         * exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
120         an unhandled exception.
121
122 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
123
124         * delegate.c: move the thread pool to metadata/threadpool.c, code
125         cleanup.
126
127 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
128
129         * exception.c (arch_exc_is_catched): impl. MS like exception
130         handling (added a check for unhandled exceptions)
131
132 2002-05-22  Martin Baulig  <martin@gnome.org>
133
134         * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
135         the assembler if necessary, ie. the assembler file is newer than the
136         symbol file or the symbol file does not exist.
137
138         * debug.c: Added "update_on_exit" argument to recreate the symbol file
139         when the JIT exists.
140
141         * debug-dwarf2.c: Produce assembler code which is free of comments and
142         extra whitespaces so that it's suitable for `as -f'.
143
144 2002-05-22  Martin Baulig  <martin@gnome.org>
145
146         * debug-dwarf2.c (dwarf2_write_section_end): Removed.  This is not needed
147         and not supported by all assemblers.
148         (dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
149         GNU extension.
150
151         * mono.c (--debug): Small fix in the argument parsing.
152
153 2002-05-22  Martin Baulig  <martin@gnome.org>
154
155         * debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.
156
157         * mono.c: Applied patch from Miguel:
158         (--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
159         to dwarf-plus.
160
161 2002-05-21  Martin Baulig  <martin@gnome.org>
162
163         * debug.c (mono_debug_source_location_from_address): Added support for the
164         dwarf2-plus format.
165
166 2002-05-21  Martin Baulig  <martin@gnome.org>
167
168         * debug.c (mono_debug_source_location_from_address): New function.
169         (mono_debug_il_offset_from_address): New function.
170
171         * exception.c (arch_handle_exception): If we have debugging support, include
172         information about the source location and IL offset in the stack trace.
173
174 2002-05-21  Dietmar Maurer  <dietmar@ximian.com>
175
176         * jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
177         #25058)  
178
179         * x86.brg (stmt): removed unnecessary assertion
180
181         * jit.c (check_inlining):  we cant inline throw instructions
182         (because it breaks some basic block requirements)
183
184 2002-05-21  Martin Baulig  <martin@gnome.org>
185
186         * debug-private.h (MonoDebugFlags): New enum typedef.
187
188         * debug.c (mono_debug_open): Added a few useful arguments.  See the manpage
189         for details.
190
191 2002-05-21  Martin Baulig  <martin@gnome.org>
192
193         * debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
194         a `MonoAssembly *' argument instead of a `char *filename' one.  Also added
195         `const char **args' argument.
196
197         * mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
198         `int verbose' argument and made it public.
199         (mono_jit_compile_class): New public function,  moved the code to compile
200         all methods in a class here from main().
201         (--compile): The argument can now also be an image (in `@imagename' format).
202         Updated documentation for this command line argument.
203         (--precompile): New command line argument to precompile an image/class/method
204         before executing the main app.  This argument can be given multiple times.
205         (--break): Renamed the "--debug" command line argument to "--break".
206         (--debug): New command line argument to specify the debugging format.
207         (--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
208         (--debug-args): New command line argument.  This is a comma-separated list of
209         additional arguments for the symbol writer.
210         (usage): Beautified the help text a bit.
211
212         * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
213         public mono_jit_compile_image() function rather than duplication this
214         functionality here.
215
216 2002-05-21  Martin Baulig  <martin@gnome.org>
217
218         * debug-dwarf2-plus.c: This is now working again :-)
219
220         * debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
221         we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
222         one for the fallback MONO_DEBUG_FORMAT_DWARF2.
223
224 2002-05-21  Martin Baulig  <martin@gnome.org>
225
226         * jit.c (mono_debug_handle): Removed this global variable.
227
228         * debug.c (mono_debug_close): Removed.
229         (mono_debug_cleanup): New global function.
230         (mono_debug_add_image): New global function.
231         (mono_debug_handle_from_class): New global function.
232         (mono_debug_write_symbols): New global function.
233         (mono_debug_add_type): Removed `MonoDebugHandle *' argument.
234         (mono_debug_add_method): Likewise.
235
236 2002-05-21  Martin Baulig  <martin@gnome.org>
237
238         Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
239         file for all assemblies.  Currently, the JIT doesn't put all methods
240         from a single assembly into a continuous region of memory.  We were
241         previously creating valid DWARF 2 files for this, but unfortunately
242         GDB's symbol tables get messed up when it reads more than one such file.
243
244         * debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
245         `next_idx', `methods', `type_hash', `source_files' and `format'
246         into the MonoDebugHandle.
247
248         * debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
249         not on the AssemblyDebugInfo.
250         (mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().
251
252         * debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
253         mono_debug_write_dwarf2().
254         (mono_debug_open_assembly_dwarf2): Removed.
255         (mono_debug_close_assembly_dwarf2): Removed.
256
257         * debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
258         mono_debug_write_stabs().
259         (mono_debug_open_assembly_stabs): Removed.
260         (mono_debug_close_assembly_stabs).
261
262         * debug-dwarf2-plus.c: This is currently broken. :-(
263
264 2002-05-20  Martin Baulig  <martin@gnome.org>
265
266         * debug.h (mono_debug_format): New global variable.
267         (MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.
268
269         * debug-private.h (MonoDebugHandle): Added `objfiles' field which is
270         a whitespace separated list of symbol files.
271         (AssemblyDebugInfo): Added `objfile' filed which is the name of the
272         symbol file.
273
274         * mono.c (main): Pass the assembly file name to mono_debug_open_file().
275
276         * debug.c (mono_debug_make_symbols): Link all symbol files into a big
277         `<assemblyname>.o' symbol file.
278
279 2002-05-20  Martin Baulig  <martin@gnome.org>
280
281         * debug.c (debug_load_method_lines): Check whether the assembly file
282         is newer than the IL file and recreate the IL file if necessary.
283
284 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
285
286         * mono.c Updated copyright years. 
287
288 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
289
290         * mono.c (usage): Relayout command line options.
291
292 2002-05-17  Dietmar Maurer  <dietmar@ximian.com>
293
294         * x86.brg (reg): fixed array bound check
295
296         * emit-x86.c (enter_method): print method signature
297
298         * exception.c (arch_handle_exception): set trace info before we
299         call handlers.
300
301 2002-05-16  Dietmar Maurer  <dietmar@ximian.com>
302
303         * jit.c (mono_find_final_block): make it work with mcs
304
305         * x86.brg: buf fix. if exception variable is allocated to a register. 
306
307         * jit.c (mono_find_final_block): bug fix.
308
309 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
310
311         * delegate.c (arch_end_invoke): fix bug #24653, simplified the
312         code using new runtime_invoke feature.
313
314         * jit.c (mono_analyze_flow): try blocks are followed by handler
315         blocks, so we need to add all handler blocks as succesors.
316         (mono_thread_start_cb): set end_of_stack
317
318         * exception.c (arch_handle_exception): correctly save/restore caller
319         saved regs.
320
321         * emit-x86.c (arch_emit_prologue): correctly save/restore caller
322         saved regs.
323
324         * jit.c (mono_cfg_new): allocate space for caller saved registers.
325
326 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
327
328         * jit.c: only use one TLS slot to store jit data
329
330         * exception.c (arch_handle_exception): print function signature,
331         use thread relative end_of_stack
332
333 2002-05-13  Dietmar Maurer  <dietmar@ximian.com>
334
335         * jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
336         store them as 32 bit integers.
337         (mono_analyze_stack): we need to generate a temporary var for
338         SHL/SHR because the tree allocator can fail otherwise 
339
340         * exception.c (arch_handle_exception): EIP now points to the call
341         instruction, not to the instruction after the call. This fixes the
342         bug reported by Linus Upson (tests/exception8.cs)
343
344 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
345
346         * jit.c (mono_analyze_flow): always allocate the forest array
347         (mono_stack_duplicate_used_var): impl.
348         (mono_copy_used_var): impl.
349
350         * x86.brg: bug fix in SHR/SHL
351
352         * emit-x86.c (arch_emit_prologue): check if live_in_set != NULL
353
354 2002-05-11  Sergey Chaban <serge@wildwestsoftware.com>
355
356         * mono.c: new --fast-iconv command line option
357         to enable fast FP-to-integer conversion code.
358         * jit.c, jit.h: added global variable to store state
359         for the above option. This optimization is disabled
360         by default.
361         * x86.brg: added code to emit fast FP-to-integer
362         conversion sequences.
363
364 2002-05-10  Dan Lewis  <dihlewis@yahoo.co.uk>
365
366         * emit-x86.c: simple definite assignment analysis optimization for
367         uninitialized locals.
368
369 Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
370
371         * x86.brg, emit-x86.c: patch the branch targets with x86_patch().
372
373 2002-05-10  Dietmar Maurer  <dietmar@ximian.com>
374
375         * linear-scan.c (mono_update_gen_set): improvement/bug fix
376
377         * x86.brg: added additional rules to handle global allocated registers
378
379         * mono.c (usage): the option is called --nols, and it dissables
380         linear scan.
381
382         * x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8
383
384 2002-05-09  Dietmar Maurer  <dietmar@ximian.com>
385
386         * linear-scan.c: linear scan reg. allocation and data flow analysis
387         use Paolo's great bitset implementation.
388
389         * jit.c (arch_allocate_var): add live range info
390         (mono_cfg_add_successor): create list of successors for basic
391         blocks.
392
393         * mono.c (main): new option --ls to enable linear scan
394
395         * exception.c (arch_handle_exception): print instruction pointer
396         relative to method start address.
397
398         * jit.c (mono_print_ctree): print register number if locals are
399         allocate in registers.
400
401         * emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
402         (arch_emit_epilogue): take care when restoring save registers,
403         because the stack pointer may has changed.
404
405         * x86.brg: s/VAROFFSET/VARINFO/
406         modified to support global register allocation
407
408 Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
409
410         * jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.
411
412 2002-05-03  Sergey Chaban <serge@wildwestsoftware.com>
413
414         * x86.brg: more coni4 optimizations
415         MUL: generate optimized code for some consts other
416         than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
417         DIV_UN: multiply with reciprocal instead of dividing;
418
419 2002-05-03  Dietmar Maurer  <dietmar@ximian.com>
420
421         * x86.brg: use VAROFFSET macro
422
423         * emit-x86.c (tree_emit): allocate space for spilled regs in
424         activation frame instead of pushing them to the stack.
425
426         * x86.brg: replace BXX with CBRANCH/COMPARE
427         replaced CXX CSET/COMPARE
428
429         * emit-x86.c (arch_allocate_regs): improved register allocation
430
431 2002-05-02  Dietmar Maurer  <dietmar@ximian.com>
432
433         * delegate.c (mono_delegate_cleanup): signal semaphore in order to
434         exit threads.
435
436 2002-04-30  Dick Porter  <dick@ximian.com>
437
438         * mono.c (main): Tell glib to not abort when g_log() etc print
439         recursively
440
441 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
442
443         * x86.brg: opt. LDELEMA impl.
444         (MUL) use shift when possible.
445         (DIV) use shift when possible.
446         impl. various opt. with coni4
447
448         * exception.c (arch_handle_exception): use ctx->SC_EBP in
449         end_of_stack check as suggested by Linus Upson <linus@linus.com>
450
451 2002-04-29  Dietmar Maurer  <dietmar@ximian.com>
452
453         * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.  
454
455         * exception.c: included the Freebsd patch from Sandro Tolaini
456         <sandro@focuseek.com>
457
458 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
459
460         * mono.c, jit.c: use mono_runtime_run_main ().
461
462 2002-04-29  Dietmar Maurer  <dietmar@ximian.com>
463
464         * jit.c (mono_analyze_stack): dont call methods on Object with
465         METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
466
467         * x86.brg: added more CONV_U rules
468
469         * jit.c (mono_analyze_stack): avoid recursive call of virtual
470         methods: fixes Bug #23778 
471         (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
472
473         * exception.c (arch_handle_exception): only g_assert(cleanup) if
474         we really need it.
475
476 2002-04-27      Patrik Torstensson <patrik.torstensson@intel.com>
477
478         * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
479
480 2002-04-27  Martin Baulig  <martin@gnome.org>
481
482         * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
483         there's already `epilog' so we don't need `epilogue_begin'.
484
485         * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
486         size of the method's code.
487
488 2002-04-25  Martin Baulig  <martin@gnome.org>
489
490         * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
491         changes.
492
493 2002-04-25  Dietmar Maurer  <dietmar@ximian.com>
494
495         * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
496         added CONV_OVF_I4 (fix bug #23808)
497
498 2002-04-23  Dietmar Maurer  <dietmar@ximian.com>
499
500         * x86.brg: code cleanup - use x86_patch ()
501
502         * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
503         (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
504
505         * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
506         because it slows down performance.
507
508 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
509
510         * emit-x86.c: enter_method handles 8-byte aligned parameters.
511
512 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
513
514         * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
515         non-shared code.
516
517 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
518
519         * jit.c (check_inlining): added statistics about inlineing
520
521         * mono.c (usage): new switch --noinline to disable inlining
522
523         * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
524         inline methods (to keep semantics)
525
526         * x86.brg: added constant folding for inegers 
527
528         * emit-x86.c (tree_allocate_regs): handle the special case when
529         chain rules need a register.
530
531 2002-04-19  Dietmar Maurer  <dietmar@ximian.com>
532
533         * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
534
535         * jit.c (check_inlining): better inlining support
536
537 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
538         
539         * x86.brg: LDLEN uses max_length instead of bounds[0]
540         * jit.c: support for new szarray format
541
542 2002-04-18  Dietmar Maurer  <dietmar@ximian.com>
543
544         * jit.c (check_inlining): added inlining support
545
546 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
547
548         * x86.brg: optimized version of castclass and isinst
549
550 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
551
552         * emit-x86.c, invoke.c: track time spent compiling.
553
554 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
555
556         * emit-x86.c, invoke.c: call profile callbacks if needed.
557         * jit.c, jit.h, mono.c: add --profile command line option.
558
559 2002-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
560
561         * jit.h: included mono/io-layer/io-layer.h to avoid breaking
562         compilation under windows when upgrading mingw and w32api to 
563         version 1.3 (thanks Dick!).
564
565 2002-04-15  Patrik Torstensson <patrik.torstensson@labs2.com>
566
567         * jit.c: changed the array icalls to use full names
568
569 2002-04-15  Dietmar Maurer  <dietmar@ximian.com>
570
571         * x86.brg: check the this pointer before calling
572         non-virtual functions
573
574         * emit-x86.c (arch_emit_prologue): initialize local vars.
575
576         * x86.brg: removed incredible clumsy code
577
578 2002-04-13  Martin Baulig  <martin@gnome.org>
579
580         * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
581         the location of a variable.
582         (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
583         instead of a stack offset and use dwarf2_write_variable_location() to write
584         the location.
585
586 2002-04-13  Martin Baulig  <martin@gnome.org>
587
588         * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
589         API changes.
590
591 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
592
593         * Makefile.am: use of the new '-s' option in monoburg.
594
595 2002-04-12  Martin Baulig  <martin@gnome.org>
596
597         * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
598         lifetime.
599
600 2002-04-10  Sergey Chaban <serge@wildwestsoftware.com>
601         * win32-exception: added Win32 SEH exception filter that translates
602         CONTEXT to sigcontext;
603
604         * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
605         in a platfrom-dependent way;
606
607         * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
608         and avoid io-layer includes;
609
610         * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
611         is defined;
612
613 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
614
615         * delegate.c (arch_end_invoke): restore output arguments
616
617 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
618
619         * jit.c: call mono_runtime_init ().
620
621 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
622
623         * jit.c (mono_jit_cleanup): added more statistics
624
625         * invoke.c (arch_create_native_wrapper): special case EndInvoke -
626         we need to pass the MonoMethod pointer as first argument.
627
628         * delegate.c (mono_async_invoke): notify all listeners, not only a
629         single one.
630         (arch_end_invoke): we now pass a MonoMethod as first parameter and
631         use arch_method_call_message_new() to access the stack.
632         (arch_end_invoke): wait until we really finished processing
633         (async_invoke_abort): notify all listeners, not only a
634         single one.
635
636 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
637
638         * message.c (arch_return_value): impl.
639         (arch_method_return_message_restore): consider delegate BeginInvoke
640
641         * jit.c: removed jit_exec_main()
642
643         * delegate.c (arch_begin_invoke): use the message builder to make
644         it architecture independent - still needs more cleanup.
645
646 2002-04-05  Dietmar Maurer  <dietmar@ximian.com>
647
648         * delegate.c (mono_delegate_ctor): support for transparent proxy
649
650         * x86.brg (freg): bug fix in CONV_R* opcodes
651
652 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
653
654         * message.c: added documentation
655
656 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
657
658         * mono.c (main): use --trace instead of --trace-calls
659
660         * x86.brg: impl. REMOTE_STIND_XX
661
662         * message.c (mono_store_remote_field): impl.
663
664 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
665
666         * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
667
668         * message.c (mono_load_remote_field): impl.
669
670         * jit.c (mono_analyze_stack): only call marshalbyref methods
671         through the vtable.
672         (mono_analyze_stack): consider marshalbyref objects in LDFLD
673
674 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
675
676         * x86.brg: kill pointer arithmetric.
677
678 2002-03-28  Martin Baulig  <martin@gnome.org>
679
680         * jit.c (mono_debug_insert_breakpoint): New global variable.
681         (mono_debug_last_breakpoint_address): New global variable.
682
683         * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
684         non-zero, insert a breakpoint; if it's positive, decrement it when done.
685         Set `mono_debug_last_breakpoint_address' to the address of the last inserted
686         breakpoint.
687
688         * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
689         `mono_debug_last_breakpoint_address', also documented them here.
690
691 2002-03-28  Martin Baulig  <martin@gnome.org>
692
693         * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
694         (AssemblyDebugInfo): Added `format'.
695
696         * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
697         this allows us choose the format on a per-assembly basis.
698         (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
699         to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
700         exists.
701         (debug_generate_method_lines): Generate correct IL offsets.
702
703 2002-03-28  Martin Baulig  <martin@gnome.org>
704
705         * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
706
707         * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
708
709         * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
710         `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
711
712         * debug.c (debug_generate_method_lines): Don't return if we don't have line
713         numbers, we still need to generate the IL offsets here. Emit line numbers
714         for `prologue_end_offset' (the first line of actual code) and 
715         `epilogue_begin_offset' (the line of the method's closing brace).
716         Don't crash if cfg->bblocks [i].forest is NULL.
717         (mono_debug_add_method): Don't crash if we don't have line numbers.
718         Initialize the newly added fields.
719
720         * debug-stabs.c: Record first and last line, emit filename info at the
721         beginning of the stab file, gdb ignores the types otherwise.
722
723         * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
724         emit line number info for the first and last line.
725
726 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
727
728         * invoke.c (arch_create_delegate_trampoline): impl.
729
730 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
731
732         * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
733         with the jit runtime to easy embedding. main() is moved to mono.c, now.
734         * jit.c: use opcode names from libmetadata.
735         * debug.h, debug.c: constify char* argument.
736
737 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
738
739         * jit.c: catching SIGSEGV again, added proxy support
740
741 2002-03-21  Dietmar Maurer  <dietmar@ximian.com>
742
743         * delegate.c (mono_delegate_init): remove unused worker threads
744
745 2002-03-27  Mike Kestner <mkestner@speakeasy.net>
746
747         * delegate.c (arch_get_delegate_invoke): malloc a bigger area
748
749 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
750
751         * jit.c: remove glib mem vtable code.
752
753 2002-03-26  Martin Baulig  <martin@gnome.org>
754
755         * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
756         lines if we don't have line number information.
757         (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
758         of hardcoding 8.
759
760         * debug-stabs.c (write_method_stabs): Don't generate method lines if
761         we don't have line number information. Use `minfo->method_info.this_offset'
762         instead of hardcoding 8.
763
764         * debug.c (debug_generate_method_lines): Don't crash if we don't have
765         line number information.
766         (mono_debug_open_assembly): Don't generate line numbers for
767         MONO_DEBUG_FORMAT_DWARF2_PLUS.
768         (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
769         but it in the new `this_offset' field.
770         
771 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
772
773         * debug.c (debug_generate_method_lines): Use correct addresses for
774         record_il_offset().
775
776 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
777
778         * jit.c: do not set the glib mem vtable anymore.
779         * Makefile.am: link to libmonoutils.
780
781 2002-03-25  Martin Baulig  <martin@gnome.org>
782
783         * debug.h (mono_debug_make_symbols): Documented this function.
784
785 2002-03-24  Martin Baulig  <martin@gnome.org>
786
787         * debug.c (mono_debug_add_method): Include the `this' offset in
788         the `minfo->method_info.param_offsets' array.
789
790 2002-03-23  Martin Baulig  <martin@gnome.org>
791
792         * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
793         to do it before the X86_CMP.
794         (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
795         (reg: CLT (lreg, lreg)): Likewise.
796         (reg: CLT_UN (lreg, lreg)): Likewise.
797         (reg: CLT_UN (lreg, lreg)): Likewise.
798         (reg: CGT (lreg, lreg)): Likewise.
799         (reg: CGT (lreg, lreg)): Likewise.
800         (reg: CGT_UN (lreg, lreg)): Likewise.
801         (reg: CGT_UN (lreg, lreg)): Likewise.
802
803 2002-03-23  Martin Baulig  <martin@gnome.org>
804
805         * debug-private.h (AssemblyDebugInfo): Added `_priv'.
806
807         * debug-dwarf2-plus.c
808         (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
809         (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
810         (mono_debug_write_assembly_dwarf2_plus): Only call
811         mono_debug_update_symbol_file() here.
812
813 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
814
815         * jit.c: inter strings before executing a method.
816         Do not intern command line arguments anymore.
817
818 2002-03-21  Martin Baulig  <martin@gnome.org>
819
820         * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
821
822         * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
823         been created by MCS and fills in all machine dependent stuff.
824
825         * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
826         removed everything which is already in MonoDebugMethodInfo.
827
828         * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
829         (mono_debug_make_symbols): Don't open the file or call as, this is done in the
830         backend code.
831
832         * jit.c (main): Added "--dwarf-plus" command line option to use the new
833         MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
834
835 2002-03-21  Dietmar Maurer  <dietmar@ximian.com>
836
837         * jit.c (usage): new option to specify maximum number of worker threads
838         (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
839
840         * delegate.c (async_invoke_abort): added support for asynchronous exceptions
841         (arch_get_async_invoke): notify listeners before we call the
842         asynchronous callback
843
844 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
845
846         * delegate.c (async_invoke_thread): support for domains
847         (async_invoke_thread): create workers only when needed
848
849 2002-03-19  Dietmar Maurer  <dietmar@ximian.com>
850
851         * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
852
853 2002-03-18  Dietmar Maurer  <dietmar@ximian.com>
854
855         * x86.brg: impl. lreg: XOR (lreg, lreg)
856         impl. REM (freg, freg)
857
858 2002-03-17  Martin Baulig  <martin@gnome.org>
859
860         * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
861         base types.
862
863         * debug-dwarf2.c: Added support for strings and arrays.
864
865 2002-03-17  Martin Baulig  <martin@gnome.org>
866
867         * debug.c (mono_debug_get_type): Recursively call this for all function members
868         of a class type.
869         (mono_debug_add_method): Don't mangle function names, this must be done by the
870         debugger backend if the debugging format needs mangled names.
871
872         * debug-dwarf2.c: Improved support for classes, added member functions.
873
874 2002-03-16  Martin Baulig  <martin@gnome.org>
875
876         * debug.c (mono_debug_get_type): Recursively call this for all members and
877         parent classes of a class type.
878
879         * debug-dwarf2.c: Added basic support for classes. Set source language to C++
880         since GDB doesn't like Java very much.
881
882 2002-03-16  Martin Baulig  <martin@gnome.org>
883
884         * debug-dwarf2.c: Added support for enums.
885
886 2002-03-15  Martin Baulig  <martin@gnome.org>
887
888         * debug.c (mono_debug_get_type): Recursively call this for all members
889         of a struct type.
890
891         * debug-dwarf2.c: Added support for structs.
892
893 2002-03-15  Dietmar Maurer  <dietmar@ximian.com>
894
895         * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
896         to new MonoLMF layout
897
898 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
899
900         * emit-x86.c (arch_create_native_wrapper): new code to generate
901         wrappers for calling native functions.
902         (arch_create_native_wrapper): free allocated strings
903         (arch_handle_exception): made mono_jit_info_table domain dependent
904
905 2002-03-14  Martin Baulig  <martin@gnome.org>
906
907         * debug.c (MonoDebugFormat): New public enums specifying which debugging
908         format to use.
909         (mono_debug_open_file): Added MonoDebugFormat argument.
910         (mono_debug_make_symbols): Don't take an argument to make it easier to call
911         this function from GDB. It's now safe to call this function multiple times;
912         it'll always write a complete debugging file.
913
914         * debug.c: Splitted this file into a general part which remains in this file
915         and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
916         All public functions now call a corresponding format specific function.
917
918         * debug.c: The following changes are private to debug.c:
919         (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
920         (record_line_number, debug_generate_method_lines): New private functions.
921         (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
922         calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
923         mono_debug_open_assembly_dwarf2).
924         (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
925         now safe to call this function multiple times.
926         (mono_debug_get_type): New public function. This takes a `MonoClass *' and
927         returns an unique index for this type. It's used to ensure that we only write
928         each class once to the debugging file.
929         (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
930         data structure, but don't directly write to the debugging file. This is done
931         later from mono_debug_write_assembly().
932
933         * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
934         debugging output. Call mono_debug_close() on cleanup if necessary.
935
936 2002-03-14  Martin Baulig  <martin@gnome.org>
937
938         * debug-private.h: New private header file.
939
940         * debug-stabs.c: Added the stabs type generation stuff which was
941         previously in debug.c.
942
943         * debug-dwarf.c: Started to implement type support. We're currently
944         only writing this most basic types to the dwarf file, but this will
945         change soon.
946
947 2002-03-13  Martin Baulig  <martin@gnome.org>
948
949         * debug-stabs.c, debug-dwarf2.c: New files containing my new
950         debugging code. They're now in CVS, but not yet used anywhere.
951
952 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
953
954         * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
955         macros, included new delegate code from Daniel Stodden. 
956         
957         
958 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
959
960         * jit.c: verify that corlib and runtime are in sync.
961
962 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
963
964         * emit-x86.c, jit.c: use the debug-helpers facilities to
965         describe and match a method when debugging.
966
967 2002-03-10  Martin Baulig  <martin@gnome.org>
968
969         * emit-x86.c (arch_compile_method): When emitting stabs debugging
970         output, put a nop instruction at the start of all functions so that
971         the adresses won't change when using --debug.
972
973         * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
974         the bytecode area, stabs needs a line number in the .il file. Use the
975         new info->moffsets to get the line number.
976         (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
977         `moffsets' is an array of `total_lines' fields (total number of lines
978         in the .il file); for each line in the .il field, this array contains
979         the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
980         of a method and 0 otherwise.
981         (debug_load_method_lines): Read the whole .il file and initialize the
982         info->moffsets field.
983
984 2002-03-09  Martin Baulig  <martin@gnome.org>
985
986         * x86.brg (DIV_UN): Clear EDX before performing the division and remove
987         the unnecessary CDQ instruction.
988
989 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
990
991         * jit.c (mono_analyze_stack): only load addresses of value types
992         on the runtime stack.
993
994 2002-03-07  Duncan Mak  <duncan@ximian.com>
995
996         * Makefile.am: A small patch fixing errors in vpath-based builds
997         (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
998         committed for Daniel Stodden <stodden@in.tum.de>. 
999
1000 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1001
1002         * jit.c: Boehm-GC enable.
1003
1004 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
1005
1006         * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
1007         realloc that code sometimes!
1008
1009         * emit-x86.c (mono_compute_branches): support several types of
1010         jump infos
1011
1012 2002-03-06  Dietmar Maurer  <dietmar@ximian.com>
1013
1014         * x86.brg: impl. MUL_OVF_UN (reg, reg)
1015
1016         * jit.c (mono_find_final_block): find correct finally handler.
1017
1018         * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
1019         caller saved registers.  
1020
1021 2002-03-05  Dietmar Maurer  <dietmar@ximian.com>
1022
1023         * x86.brg: use x86_widen_reg for CONV opcodes
1024
1025 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
1026
1027         * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
1028
1029         * emit-x86.c (arch_handle_exception): big fix - dont use
1030         uninitialized next_bp
1031         (arch_compile_method): make the jit thread save
1032         (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
1033         to avoid need of recursive mutexes
1034
1035         * x86.brg: use new mono_assert macros
1036
1037 2002-02-28  Dietmar Maurer  <dietmar@ximian.com>
1038
1039         * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
1040         calling into unmanaged code (arch_compile_method).
1041
1042         * x86.brg: impl. CONV_I4 (freg) with correct rounding
1043         (lreg): impl CALL_I8(INTF_ADDR)
1044         impl. CONV_R_UN (reg)
1045         bug fix im REM_UN
1046
1047 2002-02-27  Dietmar Maurer  <dietmar@ximian.com>
1048
1049         * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
1050
1051 2002-02-26  Dietmar Maurer  <dietmar@ximian.com>
1052
1053         * x86.brg: bug fix in CLT(lreg,lreg)
1054         (reg): bug fix in CONV_OVF_I4(lreg)
1055         (lreg): replaced x86_call_reg with x86_call_code
1056
1057         * emit-x86.c (mono_add_jump_info): impl.
1058         (mono_compute_branches): patch real jump address (instead of
1059         emitting code twice)
1060
1061 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1062
1063         * x86.brg: optimize cmp reg,0 -> test reg.
1064
1065 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1066
1067         * jit.h, jit.c, emit-x86.c: Added a few statistics counters
1068         and the --stats command line option to print them.
1069         Fixed memory leak in arch_compile_method () when a method's code is
1070         found in the cache. Fix magic trampoline to deal with static calls.
1071
1072 2002-02-21  Dietmar Maurer  <dietmar@ximian.com>
1073
1074         * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN 
1075
1076 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
1077
1078         * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
1079         (arch_create_jit_trampoline): cache trampoline code
1080
1081 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
1082
1083         * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
1084         specific code.
1085         (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
1086
1087         * x86.brg: do not encode exception objects into the instruction
1088         stream, because they are domain dependend. Use
1089         arch_get_throw_exception_by_name() instead;
1090
1091 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1092
1093         * jit.c: intern command line arguments.
1094
1095 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
1096
1097         * jit.c (mono_analyze_stack): use the magic trampoline for all
1098         calls (since we cant store the address of compiled code in
1099         method->addr).
1100         (mono_analyze_stack): imp. LDSTR for shared code
1101
1102         * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
1103         (arch_compile_method): add a cache for compiled methods to avoid
1104         recompilation. dont use method->addr to store domain dependent
1105         code address.
1106
1107 2002-02-15  Dietmar Maurer  <dietmar@ximian.com>
1108
1109         * x86.brg: impl. BLE,BGT for freg
1110
1111 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1112
1113         * emit-x86.c: handle unreachable code. Eliminate some unneeded
1114         malloc() calls.
1115         * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
1116         main(). Add --compile classname and --ncompile num command line
1117         options to do performance evaluation of the jitter (and help
1118         debugging).
1119
1120 2002-02-15  Dietmar Maurer  <dietmar@ximian.com>
1121
1122         * emit-x86.c (arch_compile_method): bug fix in static delegate
1123         Invoke code.
1124
1125 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
1126
1127         * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
1128
1129 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
1130
1131         * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
1132
1133 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
1134
1135         * jit.c (arch_allocate_var): Only assert that the alignment is
1136         at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
1137
1138 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1139
1140         * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
1141
1142 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1143
1144         * emit-x86.c: make x86_magic_trampoline() handle call instructions
1145         with an imm8 displacement. x86.brg not yet changed to take advantage
1146         of it.
1147
1148 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1149
1150         * jit.c: use opcode info from libmetadata to do flow analysis
1151         and simplify code.
1152
1153 2002-02-06  Dietmar Maurer  <dietmar@ximian.com>
1154
1155         * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking 
1156
1157 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
1158
1159         * x86.brg: use element_class for type check
1160
1161 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
1162
1163         * jit.c (main): impl. __array_Address icall
1164
1165         * mempool.c (mono_mempool_alloc): handle large block allocation
1166
1167 2002-02-01  Dietmar Maurer  <dietmar@ximian.com>
1168
1169         * x86.brg: impl. SHL/SHR/CLT for 64 bit values
1170
1171 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
1172
1173         * x86.brg: impl. CEQ(lreg,lreg)
1174
1175         * jit.c (mono_analyze_stack): impl. LDVIRTFTN
1176         (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
1177
1178         * x86.brg: removed some dead code.
1179
1180 2002-01-18  Dietmar Maurer  <dietmar@ximian.com>
1181
1182         * jit.c (arch_allocate_var): fixed alignment bugs
1183
1184 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
1185
1186         * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
1187
1188 2002-01-16  Dietmar Maurer  <dietmar@ximian.com>
1189
1190         * jit.c (main): install the trampoline before we start to create
1191         objects.
1192
1193         * x86.brg: impl. CLT_UN, CGT_UN
1194
1195         * emit-x86.c (leave_method): added check for null object
1196         (enter_method): consider byref arguments
1197
1198 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
1199
1200         * x86.brg: bug fix in CONV_OVF_I1_UN
1201         impl. ADD_OVF, MUL_OVF
1202         impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
1203         (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
1204         (EMIT_COND_EXCEPTION): added signed flag
1205
1206 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
1207
1208         * jit.c: implement stloc, ldloc, ldloca.
1209
1210 2002-01-11  Dietmar Maurer  <dietmar@ximian.com>
1211
1212         * jit.c (mono_analyze_stack): fixed calculation of last_instr
1213
1214         * x86.brg (LDLEN): emit null_reference exception
1215         (BLE_UN): bug fix. 
1216         (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
1217
1218 2002-01-04  Dietmar Maurer  <dietmar@ximian.com>
1219
1220         * x86.brg: bug fix in CASTCLASS
1221
1222 2001-12-21  Dietmar Maurer  <dietmar@ximian.com>
1223
1224         * jit.c (mono_analyze_stack): spill MUL to avoid problem with
1225         register allocation.
1226
1227         * emit-x86.c (arch_compile_method): fixed static delegate bug
1228
1229 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
1230
1231         * x86.brg, jit.c: Split up the nodes that we used to share on
1232         CONV_OVF.  They were sharing the nodes because they are the same
1233         on 32-bit machines, but on 64-bit machines you need different
1234         code for them.
1235
1236 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
1237
1238         * x86.brg: removed prerequisite that (tree->left->reg1 <
1239         tree->right->reg1) to make register allocation easier.
1240
1241 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
1242
1243         * emit-x86.c (arch_handle_exception): new code to handle
1244         exceptions inside unmanaged code.
1245
1246         * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
1247         address as first argument.
1248
1249 2001-12-15  Dietmar Maurer  <dietmar@ximian.com>
1250
1251         * x86.brg: pass exceptions on the stack
1252
1253         * jit.h (ISSTRUCT): new macro to check for real value types
1254         (return false for enum types). 
1255
1256 2001-12-11  Dietmar Maurer  <dietmar@ximian.com>
1257
1258         * x86.brg: use position indepentent code if possible. 
1259
1260         * x86.brg (EMIT_COND_EXCEPTION): new macro.
1261
1262         * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
1263
1264 2001-12-10  Dietmar Maurer  <dietmar@ximian.com>
1265
1266         * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
1267         blocks.
1268         (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
1269
1270         * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
1271
1272 2001-12-07  Dietmar Maurer  <dietmar@ximian.com>
1273
1274         * jit.c (mono_allocate_intvar): bug fix.
1275
1276         * emit-x86.c (get_unbox_trampoline): impl.
1277
1278         * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
1279
1280 2001-12-06  Dietmar Maurer  <dietmar@ximian.com>
1281
1282         * x86.brg: raise exceptions.
1283
1284 2001-12-05  Dietmar Maurer  <dietmar@ximian.com>
1285
1286         * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
1287         the stack. 
1288
1289 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
1290
1291         * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
1292         CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
1293         CONV.OVF.I2.UN, CONV.OVF.I8.UN
1294
1295 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
1296
1297         * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
1298         removed the locaddr nonterminal, reimplemented value types
1299         
1300         * jit.c: reimplemented value type support, better support for
1301         enumeration types. 
1302
1303 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
1304
1305         * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
1306         conv.ovf.u8 
1307
1308 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
1309
1310         * jit.c: call mono_init() after registering internal calls.
1311
1312 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
1313
1314         * emit-x86.c (tree_preallocate_regs): improved register allocation
1315
1316         * x86.brg: impl. ISINST, CASTCLASS
1317
1318 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
1319
1320         * x86.brg: rearrange fields to reduce struct size.
1321         * jit.c: use signature->param_count, not signature->params_size.
1322         * debug.c: off-by-one error fix.
1323
1324 2001-11-29  Radek Doulik  <rodo@ximian.com>
1325
1326         * Makefile.am: build mono only for X86 architecture, compilation
1327         fails for ppc now because of accessing registers in sigcontext
1328         structure
1329
1330 2001-11-29  Dietmar Maurer  <dietmar@ximian.com>
1331
1332         * jit.c (mono_analyze_stack): bug fix in DUP
1333
1334 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
1335
1336         * debug.c: fix type handling. Position function position at start of
1337         IL code. Output more fine-grained stepping information.
1338
1339 2001-11-28  Dietmar Maurer  <dietmar@ximian.com>
1340
1341         * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
1342
1343         * jit.c (mono_analyze_stack): record the cli_address for later use
1344         with gdb.
1345         (sigsegv_signal_handler): translate sigsegv into "Internal error"
1346         exception.
1347
1348 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
1349
1350         * debug.c, debug.h: added support for generating stabs.
1351         Stabs can be compiled with as and the resulting object file can be
1352         loaded in a gdb session with add-symbol-file object.o.
1353         * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
1354         where locals and arguments are stored in the stack. Add support for
1355         passing command line arguments to CLR programs.
1356         * emit-x86.c: insert a breakpoint at method invocation if needed.
1357
1358 2001-11-27  Dietmar Maurer  <dietmar@ximian.com>
1359
1360         * jit.c: exception support
1361
1362         * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
1363         the right order.
1364
1365 2001-11-26  Dick Porter  <dick@ximian.com>
1366
1367         * Makefile.am (mono_LDADD): Add io-layer library
1368
1369 2001-11-19  Dietmar Maurer  <dietmar@ximian.com>
1370
1371         * jit.c (mono_analyze_stack): impl. LDFTN
1372         (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
1373         make register allocation easier on x86
1374
1375         * emit-x86.c (enter_method): more debugging output for Strings
1376         (arch_compile_method): added delegate support
1377         (arch_compile_method): align EBP to 8 byte boundary
1378
1379 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
1380
1381         * jit.c: use mono_install_trampoline (), instead of exporting
1382         a function to a lower-level library.
1383
1384 2001-11-16  Dietmar Maurer  <dietmar@ximian.com>
1385
1386         * x86.brg (STRING_ARG): impl. a way to marshal strings. This
1387         will be extensible to handle all possible kinds of marshalling
1388         requirements. 
1389
1390         * jit.c (map_call_type): added MB_TERM_CALL_VOID
1391         (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
1392         instructions to handle this arguments more effectively.
1393
1394 2001-11-15  Dietmar Maurer  <dietmar@ximian.com>
1395
1396         * Makefile.am (mono_SOURCES): renamed testjit to mono
1397
1398         * x86.brg: added debugging support 
1399
1400         * testjit.c: added support for value types, CFG improvements
1401
1402         * emit-x86.c (enter_method): handle value types
1403         (tree_allocate_regs): impl. a better way to handle chain rules
1404
1405 2001-11-10  Dietmar Maurer  <dietmar@ximian.com>
1406
1407         * x86.brg (INITOBJ): bug fix: initialize data before use,
1408         simplified the code.
1409
1410 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
1411
1412         * testjit.c (mono_analyze_stack): Remove compiler warning by
1413         testing against NULL.
1414
1415 2001-11-09  Dick Porter  <dick@ximian.com>
1416
1417         * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
1418
1419 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
1420
1421         * testjit.c (mono_analyze_stack): new BOX impl.
1422
1423         * x86.brg: implemented INITOBJ
1424
1425         * testjit.c (mono_analyze_stack): finished array support
1426         (mono_analyze_stack): reimplemented DUP instruction
1427
1428 2001-11-08  Dietmar Maurer  <dietmar@ximian.com>
1429
1430         * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
1431         represents the address of the element. This way we can emit highly
1432         optimized x86 instructions to access elements (using base+index+offset
1433         adressing mode)
1434
1435 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
1436
1437         * mempool.c: Include string.h to kill warning.
1438
1439         * testjit.c: Add typecast to kill warning.
1440
1441         * x86.brg: Include string.h to eliminate warning.
1442
1443         * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
1444         kill warning.
1445
1446 2001-11-07  Dietmar Maurer  <dietmar@ximian.com>
1447
1448         * emit-x86.c (enter_method): print out all method arguments
1449         (x86_magic_trampoline): impl.
1450         (arch_create_simple_jit_trampoline): we use different trampolines
1451         for static methods (no need to write the address back into to
1452         vtable).
1453
1454 2001-11-06  Dietmar Maurer  <dietmar@ximian.com>
1455
1456         * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
1457         use less the 16 bytes.
1458
1459         * x86.brg: code cleanup
1460
1461 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
1462
1463         * testjit.c: bug fixes.
1464
1465         * emit-x86.c (leave_method): print result values
1466
1467 2001-11-03  Dietmar Maurer  <dietmar@ximian.com>
1468
1469         * emit-x86.c (enter_method): new debugging code
1470         (leave_method): new debbuging code, this functions are called
1471         when you use the new option --trace-calls
1472
1473 2001-11-02  Dietmar Maurer  <dietmar@ximian.com>
1474
1475         * testjit.c: impl. STELEM_XX, STELEM_XX
1476
1477         * x86.brg: impl. LDLEN, LDELEMA
1478         
1479
1480 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
1481
1482         * x86.brg: added some experimental code for CALL
1483         instructions - still not found the optimal way to do it.
1484
1485         * testjit.c (map_stind_type): add support for value types with
1486         a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
1487         CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
1488         (ctree_create_newobj): impl.
1489         
1490
1491         * emit-x86.c (tree_allocate_regs): removed allocation code for
1492         addr nonterminal.
1493         (get_address): use a simple, but bug free search instead of the
1494         buggy binary search.
1495
1496 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
1497
1498         * testjit.c: support virtual functions
1499
1500         * x86.brg: support different addressing modes for calls
1501
1502 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
1503
1504         * testjit.c: impl. STFLD
1505
1506 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
1507
1508         * x86.brg: impl. CEQ
1509
1510 2001-10-04  Dick Porter  <dick@ximian.com>
1511
1512         * testjit.c:
1513         * emit-x86.c: include mono-endian.h not endian.h
1514
1515 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
1516
1517         * testjit.c (ctree_create_dup): really duplicate the tree.
1518         attach the arguments to the CALL node. Added a new macro to
1519         make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
1520
1521 2001-10-01  Dietmar Maurer  <dietmar@ximian.com>
1522
1523         * interp.brg: the burm based interpreter: added the file as example.
1524
1525 2001-09-27  Dietmar Maurer  <dietmar@ximian.com>
1526
1527         * x86.brg: cleanup
1528
1529         * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
1530         data.
1531         (map_stind_type): support enum types
1532         (map_ldind_type): support enum types
1533
1534         * emit-x86.c (tree_allocate_regs): added code to support
1535         register allocation for addressing modes trees.
1536         (tree_emit): bug fix: we have to emit all mono_burg_functins. The
1537         previous impl. did not work for chain rules.
1538         (compute_branches): support for SWITCH statements
1539
1540         * x86.brg: added rules to model x86 addressing modes
1541
1542 2001-09-26  Dietmar Maurer  <dietmar@ximian.com>
1543
1544         * emit-x86.c (compute_branches): implemented SWITCH
1545
1546         * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
1547         (map_ldind_type): add enumeration types.
1548         (map_stind_type): add enumeration types.
1549
1550         * emit-x86.c (arch_compile_method): more documentation.
1551
1552         * testjit.c: moved the architecture specific things to emit-x86.c
1553         and x86.brg. Added more documentation. code cleanup.
1554
1555 2001-09-25  Dietmar Maurer  <dietmar@ximian.com>
1556
1557         * x86.brg: we now have different types of addresses: ADDR_L for local
1558         values, ADDR_A for arguments and ADDR_G for global addresses. We
1559         also use LDIND_XX token to load values from a specific address
1560         instead of LDLOC/STLOC. 
1561
1562         * testjit.c: use the new adressing scheme everywhere:
1563         LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)  
1564
1565 2001-09-24  Dietmar Maurer  <dietmar@ximian.com>
1566
1567         * testjit.c (main): fix bug in parameter parsing
1568
1569         * x86.brg: impl. more opcodes
1570
1571 2001-09-23  Dick Porter  <dick@ximian.com>
1572
1573         * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
1574
1575 2001-09-23  Dietmar Maurer  <dietmar@ximian.com>
1576
1577         * testjit.c: use the memory pool to avoid memory leaks
1578
1579 2001-09-22  Dietmar Maurer  <dietmar@ximian.com>
1580
1581         * x86.brg: increment the stack pointer after function calls
1582
1583 2001-09-21  Dick Porter  <dick@ximian.com>
1584
1585         * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
1586
1587 2001-09-21  Dietmar Maurer  <dietmar@ximian.com>
1588
1589         * x86.brg: implemented long MUL/DIV
1590         (MB_OPT_LEVEL): define optimisation level macro
1591
1592         * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
1593         for operations like idiv. it is also possible to assign specific registers.
1594
1595 2001-09-20  Dietmar Maurer  <dietmar@ximian.com>
1596
1597         * x86.brg: added basic support for long
1598
1599         * testjit.c (mono_compile_method): implemented POP
1600
1601 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
1602
1603         * testjit.c (usage): Added a couple of more usage options.
1604
1605 2001-09-19  Dietmar Maurer  <dietmar@ximian.com>
1606
1607         * x86.brg: added more floating point grammar 
1608
1609         * testjit.c (mono_compile_method): make local offsets negative
1610
1611         * x86.brg: added some floating point trees
1612
1613         * testjit.c (mono_compile_method): arguments on the runtime 
1614         stack are at least 4 bytes
1615
1616         * x86.brg: partly implemented 8,16 bit integers
1617
1618         * testjit.c (get_address): mark basic blocks
1619
1620 2001-09-18  Dietmar Maurer  <dietmar@ximian.com>
1621
1622         * x86.brg: added some rules to optimize code
1623
1624         * testjit.c (get_address): use a binary search to get the address
1625         (main): added an option to debug the jit (-d)
1626
1627 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
1628
1629         * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
1630
1631 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
1632
1633         * testjit.c (mono_compile_method): Provide better error reporting.
1634
1635 2001-09-17  Dietmar Maurer  <dietmar@ximian.com>
1636
1637         * testjit.c (tree_get_address): impl. to fix address bug
1638         (tree_get_address): make sure that we can only jump to the first
1639         instruction of a tree.
1640
1641         * x86.brg: emit real code for calls
1642
1643         * testjit.c (create_jit_trampoline): creates a function to trigger jit
1644         compilation.
1645         (mono_compile_method): reversed argument order
1646
1647 2001-09-15  Dietmar Maurer  <dietmar@ximian.com>
1648
1649         * x86.brg (stmt): don't emit unnecessary register moves
1650
1651         * testjit.c (tree_allocate_regs): free registers earlier
1652
1653 2001-09-14  Dietmar Maurer  <dietmar@ximian.com>
1654
1655         * x86.brg: branch addresses are now resolved
1656
1657         * testjit.c (compute_branches): compute address of branches
1658
1659         * x86.brg: emit real x86 instructions
1660
1661         * testjit.c: call objdump to disassemble the output
1662
1663 2001-09-13  Dietmar Maurer  <dietmar@ximian.com>
1664
1665         * x86.brg: use the right offsets to access local variables
1666         and arguments.
1667
1668         * emit-x86.c: only save/restore callee saved registers if they are
1669         really modified.
1670
1671         * testjit.c (tree_allocate_regs): use the new MonoRegSet to
1672         allocate registers.
1673         (mono_compile_method): changed the tree for mothod calls
1674
1675         * regset.h: impl.
1676         
1677         * regset.c: impl.
1678         
1679
1680 2001-09-10  Miguel de Icaza  <miguel@ximian.com>
1681
1682         * x86.brg: Use Unix assembly syntax.
1683
1684         * emit-x86.c: support code, should be moved
1685
1686         * testjit.c: Use GPtrArrays instead of GLists, as those are very
1687         inefficient at appends.
1688
1689         * Renamed `create_new_leave' to `create_new_leaf'
1690
1691         
1692