2002-02-18 Dietmar Maurer * jit.c (mono_analyze_stack): use the magic trampoline for all calls (since we cant store the address of compiled code in method->addr). * emit-x86.c (x86_magic_trampoline): handle x86_call_code(). (arch_compile_method): add a cache for compiled methods to avoid recompilation. dont use method->addr to store domain dependent code address. 2002-02-15 Dietmar Maurer * x86.brg: impl. BLE,BGT for freg Sat Feb 16 16:27:42 CET 2002 Paolo Molaro * emit-x86.c: handle unreachable code. Eliminate some unneeded malloc() calls. * jit.c: handle unreachable code. Move setting of mono_end_of_stack to main(). Add --compile classname and --ncompile num command line options to do performance evaluation of the jitter (and help debugging). 2002-02-15 Dietmar Maurer * emit-x86.c (arch_compile_method): bug fix in static delegate Invoke code. 2002-02-14 Dietmar Maurer * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types. 2002-02-13 Dietmar Maurer * jit.c (mono_analyze_stack): impl. CEE_SIZEOF 2002-02-13 Miguel de Icaza * jit.c (arch_allocate_var): Only assert that the alignment is at least 32-bits aligned, not always 32-bits aligned (for I8 for example). Mon Feb 11 11:20:57 CET 2002 Paolo Molaro * x86.brg: fix invalid cast check in unbox. Pack MBTree structure. Sun Feb 10 12:54:05 CET 2002 Paolo Molaro * emit-x86.c: make x86_magic_trampoline() handle call instructions with an imm8 displacement. x86.brg not yet changed to take advantage of it. Sun Feb 10 11:47:30 CET 2002 Paolo Molaro * jit.c: use opcode info from libmetadata to do flow analysis and simplify code. 2002-02-06 Dietmar Maurer * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking 2002-02-05 Dietmar Maurer * x86.brg: use element_class for type check 2002-02-04 Dietmar Maurer * jit.c (main): impl. __array_Address icall * mempool.c (mono_mempool_alloc): handle large block allocation 2002-02-01 Dietmar Maurer * x86.brg: impl. SHL/SHR/CLT for 64 bit values 2002-01-31 Dietmar Maurer * x86.brg: impl. CEQ(lreg,lreg) * jit.c (mono_analyze_stack): impl. LDVIRTFTN (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD * x86.brg: removed some dead code. 2002-01-18 Dietmar Maurer * jit.c (arch_allocate_var): fixed alignment bugs 2002-01-17 Dietmar Maurer * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF 2002-01-16 Dietmar Maurer * jit.c (main): install the trampoline before we start to create objects. * x86.brg: impl. CLT_UN, CGT_UN * emit-x86.c (leave_method): added check for null object (enter_method): consider byref arguments 2002-01-14 Dietmar Maurer * x86.brg: bug fix in CONV_OVF_I1_UN impl. ADD_OVF, MUL_OVF impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN (SUB (lreg, lreg)): bug fix - use SBB instead of SUB (EMIT_COND_EXCEPTION): added signed flag Fri Jan 11 20:06:22 CET 2002 Paolo Molaro * jit.c: implement stloc, ldloc, ldloca. 2002-01-11 Dietmar Maurer * jit.c (mono_analyze_stack): fixed calculation of last_instr * x86.brg (LDLEN): emit null_reference exception (BLE_UN): bug fix. (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog 2002-01-04 Dietmar Maurer * x86.brg: bug fix in CASTCLASS 2001-12-21 Dietmar Maurer * jit.c (mono_analyze_stack): spill MUL to avoid problem with register allocation. * emit-x86.c (arch_compile_method): fixed static delegate bug 2001-12-16 Miguel de Icaza * x86.brg, jit.c: Split up the nodes that we used to share on CONV_OVF. They were sharing the nodes because they are the same on 32-bit machines, but on 64-bit machines you need different code for them. 2001-12-17 Dietmar Maurer * x86.brg: removed prerequisite that (tree->left->reg1 < tree->right->reg1) to make register allocation easier. 2001-12-16 Dietmar Maurer * emit-x86.c (arch_handle_exception): new code to handle exceptions inside unmanaged code. * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype address as first argument. 2001-12-15 Dietmar Maurer * x86.brg: pass exceptions on the stack * jit.h (ISSTRUCT): new macro to check for real value types (return false for enum types). 2001-12-11 Dietmar Maurer * x86.brg: use position indepentent code if possible. * x86.brg (EMIT_COND_EXCEPTION): new macro. * emit-x86.c (mono_emit_cfg): impl. variable code buffer size 2001-12-10 Dietmar Maurer * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo blocks. (mono_analyze_flow): use g_malloc0 o allocate large bblocks array. * x86.brg (stmt): added opt. for STIND_R4/STIND_R8 2001-12-07 Dietmar Maurer * jit.c (mono_allocate_intvar): bug fix. * emit-x86.c (get_unbox_trampoline): impl. * jit.c (mono_analyze_stack): impl STOBJ, LEAVE 2001-12-06 Dietmar Maurer * x86.brg: raise exceptions. 2001-12-05 Dietmar Maurer * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on the stack. 2001-12-06 Miguel de Icaza * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1, CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN, CONV.OVF.I2.UN, CONV.OVF.I8.UN 2001-12-04 Dietmar Maurer * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes, removed the locaddr nonterminal, reimplemented value types * jit.c: reimplemented value type support, better support for enumeration types. 2001-12-03 Miguel de Icaza * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2, conv.ovf.u8 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro * jit.c: call mono_init() after registering internal calls. 2001-11-30 Dietmar Maurer * emit-x86.c (tree_preallocate_regs): improved register allocation * x86.brg: impl. ISINST, CASTCLASS Fri Nov 30 12:02:24 CET 2001 Paolo Molaro * x86.brg: rearrange fields to reduce struct size. * jit.c: use signature->param_count, not signature->params_size. * debug.c: off-by-one error fix. 2001-11-29 Radek Doulik * Makefile.am: build mono only for X86 architecture, compilation fails for ppc now because of accessing registers in sigcontext structure 2001-11-29 Dietmar Maurer * jit.c (mono_analyze_stack): bug fix in DUP Thu Nov 29 12:32:01 CET 2001 Paolo Molaro * debug.c: fix type handling. Position function position at start of IL code. Output more fine-grained stepping information. 2001-11-28 Dietmar Maurer * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_ * jit.c (mono_analyze_stack): record the cli_address for later use with gdb. (sigsegv_signal_handler): translate sigsegv into "Internal error" exception. Tue Nov 27 16:32:41 CET 2001 Paolo Molaro * debug.c, debug.h: added support for generating stabs. Stabs can be compiled with as and the resulting object file can be loaded in a gdb session with add-symbol-file object.o. * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track where locals and arguments are stored in the stack. Add support for passing command line arguments to CLR programs. * emit-x86.c: insert a breakpoint at method invocation if needed. 2001-11-27 Dietmar Maurer * jit.c: exception support * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in the right order. 2001-11-26 Dick Porter * Makefile.am (mono_LDADD): Add io-layer library 2001-11-19 Dietmar Maurer * jit.c (mono_analyze_stack): impl. LDFTN (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to make register allocation easier on x86 * emit-x86.c (enter_method): more debugging output for Strings (arch_compile_method): added delegate support (arch_compile_method): align EBP to 8 byte boundary Mon Nov 19 11:36:22 CET 2001 Paolo Molaro * jit.c: use mono_install_trampoline (), instead of exporting a function to a lower-level library. 2001-11-16 Dietmar Maurer * x86.brg (STRING_ARG): impl. a way to marshal strings. This will be extensible to handle all possible kinds of marshalling requirements. * jit.c (map_call_type): added MB_TERM_CALL_VOID (mono_analyze_stack): impl. LDELEMA, reimplemented CALL instructions to handle this arguments more effectively. 2001-11-15 Dietmar Maurer * Makefile.am (mono_SOURCES): renamed testjit to mono * x86.brg: added debugging support * testjit.c: added support for value types, CFG improvements * emit-x86.c (enter_method): handle value types (tree_allocate_regs): impl. a better way to handle chain rules 2001-11-10 Dietmar Maurer * x86.brg (INITOBJ): bug fix: initialize data before use, simplified the code. 2001-11-09 Miguel de Icaza * testjit.c (mono_analyze_stack): Remove compiler warning by testing against NULL. 2001-11-09 Dick Porter * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more 2001-11-09 Dietmar Maurer * testjit.c (mono_analyze_stack): new BOX impl. * x86.brg: implemented INITOBJ * testjit.c (mono_analyze_stack): finished array support (mono_analyze_stack): reimplemented DUP instruction 2001-11-08 Dietmar Maurer * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which represents the address of the element. This way we can emit highly optimized x86 instructions to access elements (using base+index+offset adressing mode) 2001-11-07 Miguel de Icaza * mempool.c: Include string.h to kill warning. * testjit.c: Add typecast to kill warning. * x86.brg: Include string.h to eliminate warning. * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to kill warning. 2001-11-07 Dietmar Maurer * emit-x86.c (enter_method): print out all method arguments (x86_magic_trampoline): impl. (arch_create_simple_jit_trampoline): we use different trampolines for static methods (no need to write the address back into to vtable). 2001-11-06 Dietmar Maurer * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to use less the 16 bytes. * x86.brg: code cleanup 2001-11-05 Dietmar Maurer * testjit.c: bug fixes. * emit-x86.c (leave_method): print result values 2001-11-03 Dietmar Maurer * emit-x86.c (enter_method): new debugging code (leave_method): new debbuging code, this functions are called when you use the new option --trace-calls 2001-11-02 Dietmar Maurer * testjit.c: impl. STELEM_XX, STELEM_XX * x86.brg: impl. LDLEN, LDELEMA 2001-10-15 Dietmar Maurer * x86.brg: added some experimental code for CALL instructions - still not found the optimal way to do it. * testjit.c (map_stind_type): add support for value types with a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ, CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ (ctree_create_newobj): impl. * emit-x86.c (tree_allocate_regs): removed allocation code for addr nonterminal. (get_address): use a simple, but bug free search instead of the buggy binary search. 2001-10-12 Dietmar Maurer * testjit.c: support virtual functions * x86.brg: support different addressing modes for calls 2001-10-11 Dietmar Maurer * testjit.c: impl. STFLD 2001-10-10 Dietmar Maurer * x86.brg: impl. CEQ 2001-10-04 Dick Porter * testjit.c: * emit-x86.c: include mono-endian.h not endian.h 2001-10-02 Dietmar Maurer * testjit.c (ctree_create_dup): really duplicate the tree. attach the arguments to the CALL node. Added a new macro to make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT). 2001-10-01 Dietmar Maurer * interp.brg: the burm based interpreter: added the file as example. 2001-09-27 Dietmar Maurer * x86.brg: cleanup * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static data. (map_stind_type): support enum types (map_ldind_type): support enum types * emit-x86.c (tree_allocate_regs): added code to support register allocation for addressing modes trees. (tree_emit): bug fix: we have to emit all mono_burg_functins. The previous impl. did not work for chain rules. (compute_branches): support for SWITCH statements * x86.brg: added rules to model x86 addressing modes 2001-09-26 Dietmar Maurer * emit-x86.c (compute_branches): implemented SWITCH * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes (map_ldind_type): add enumeration types. (map_stind_type): add enumeration types. * emit-x86.c (arch_compile_method): more documentation. * testjit.c: moved the architecture specific things to emit-x86.c and x86.brg. Added more documentation. code cleanup. 2001-09-25 Dietmar Maurer * x86.brg: we now have different types of addresses: ADDR_L for local values, ADDR_A for arguments and ADDR_G for global addresses. We also use LDIND_XX token to load values from a specific address instead of LDLOC/STLOC. * testjit.c: use the new adressing scheme everywhere: LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree) 2001-09-24 Dietmar Maurer * testjit.c (main): fix bug in parameter parsing * x86.brg: impl. more opcodes 2001-09-23 Dick Porter * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS 2001-09-23 Dietmar Maurer * testjit.c: use the memory pool to avoid memory leaks 2001-09-22 Dietmar Maurer * x86.brg: increment the stack pointer after function calls 2001-09-21 Dick Porter * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line 2001-09-21 Dietmar Maurer * x86.brg: implemented long MUL/DIV (MB_OPT_LEVEL): define optimisation level macro * testjit.c (tree_allocate_regs): added a way to prevent EDX usage for operations like idiv. it is also possible to assign specific registers. 2001-09-20 Dietmar Maurer * x86.brg: added basic support for long * testjit.c (mono_compile_method): implemented POP 2001-09-19 Miguel de Icaza * testjit.c (usage): Added a couple of more usage options. 2001-09-19 Dietmar Maurer * x86.brg: added more floating point grammar * testjit.c (mono_compile_method): make local offsets negative * x86.brg: added some floating point trees * testjit.c (mono_compile_method): arguments on the runtime stack are at least 4 bytes * x86.brg: partly implemented 8,16 bit integers * testjit.c (get_address): mark basic blocks 2001-09-18 Dietmar Maurer * x86.brg: added some rules to optimize code * testjit.c (get_address): use a binary search to get the address (main): added an option to debug the jit (-d) Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro * testjit.c: better/faster align code. Handle ldloc.s and stloc.s. 2001-09-17 Miguel de Icaza * testjit.c (mono_compile_method): Provide better error reporting. 2001-09-17 Dietmar Maurer * testjit.c (tree_get_address): impl. to fix address bug (tree_get_address): make sure that we can only jump to the first instruction of a tree. * x86.brg: emit real code for calls * testjit.c (create_jit_trampoline): creates a function to trigger jit compilation. (mono_compile_method): reversed argument order 2001-09-15 Dietmar Maurer * x86.brg (stmt): don't emit unnecessary register moves * testjit.c (tree_allocate_regs): free registers earlier 2001-09-14 Dietmar Maurer * x86.brg: branch addresses are now resolved * testjit.c (compute_branches): compute address of branches * x86.brg: emit real x86 instructions * testjit.c: call objdump to disassemble the output 2001-09-13 Dietmar Maurer * x86.brg: use the right offsets to access local variables and arguments. * emit-x86.c: only save/restore callee saved registers if they are really modified. * testjit.c (tree_allocate_regs): use the new MonoRegSet to allocate registers. (mono_compile_method): changed the tree for mothod calls * regset.h: impl. * regset.c: impl. 2001-09-10 Miguel de Icaza * x86.brg: Use Unix assembly syntax. * emit-x86.c: support code, should be moved * testjit.c: Use GPtrArrays instead of GLists, as those are very inefficient at appends. * Renamed `create_new_leave' to `create_new_leaf'