Commit Graph

493 Commits

Author SHA1 Message Date
Jonas Maebe
ddcab79323 * set correct localsymtable fixup already in handle_body_start instead
of in after_pass1, as it's necessary to get the correct offsets for
    the calleeside paralocs (and those are now setup in the generic
    handle_body_start)
2003-08-16 14:26:44 +00:00
peter
52c73e80d1 * start of sparc support for newra 2003-08-11 21:18:20 +00:00
daniel
42c320cb29 * cs_regalloc renamed to cs_regvars to avoid confusion with register
allocator
  * Some preventive changes to i386 spillinh code
2003-08-09 18:56:54 +00:00
Jonas Maebe
2a3c6e0de5 * fixed conversion from signed value to floats if the compiler is
compiled with a 1.0.x compiler
2003-08-09 15:28:29 +00:00
Jonas Maebe
b1a903fd4d * fixed bug in load_fpu_location found by Olle 2003-08-08 19:01:02 +00:00
olle
c2fe8dbd99 * merged macos entry/exit code generation into the general one. 2003-08-08 15:49:24 +00:00
Jonas Maebe
a3cb0d2002 * don't use rg.getregisterint() anymore in g_stackframe_entry_*, because
the register colouring has already occurred then, use a hard-coded
    register instead
2003-07-23 11:02:23 +00:00
Jonas Maebe
356ee447ba * "lastsaveintreg" is RS_R31 instead of RS_R27 with -dnewra, because
there are no scratch regs anymore
2003-07-23 11:00:09 +00:00
Jonas Maebe
5ab3ea0af5 - disabled some debugging code 2003-07-23 10:58:06 +00:00
Jonas Maebe
d73acd12f6 * fixed newra bug due to the fact that we sometimes need a temp reg
when loading/storing to memory (base+index+offset is not possible)
    and because a reference is often freed before it is last used, this
    temp register was soemtimes the same as one of the reference regs
2003-07-20 20:39:20 +00:00
Jonas Maebe
af61f830d0 * fixed bug in g_concatcopy with -dnewra 2003-07-20 16:15:58 +00:00
peter
1b633246b9 * sparc fixes 2003-07-08 21:23:24 +00:00
Jonas Maebe
d514f33ce4 * committed wrong file previously :( 2003-07-06 21:26:06 +00:00
Jonas Maebe
1846337739 * fixed ppc compiler 2003-07-06 20:25:03 +00:00
Jonas Maebe
117d6934a1 + first spill_registers implementation, most likely still very buggy 2003-07-06 15:29:06 +00:00
Jonas Maebe
2763f461ce * VOLATILE_REGISTERS was wrong (it was more or less the inverted set
of what it had to be :/ )
2003-07-06 15:28:24 +00:00
Jonas Maebe
cc6a8fbe91 * make sure all registers except r0 are handled by the register
allocator for -dnewra
2003-07-06 15:27:44 +00:00
Jonas Maebe
70a5d1e4c2 * create_paraloc_info() is now called separately for the caller and
callee info
  * fixed ppc cycle
2003-07-05 20:11:41 +00:00
peter
b7d99ec934 * paraloc splitted in callerparaloc,calleeparaloc
* sparc calling convention updates
2003-07-02 22:18:04 +00:00
olle
280c8655e5 * macos: fixes of loading-code 2003-06-18 10:12:36 +00:00
Jonas Maebe
9b645eef82 - removed allocparaloc/freeparaloc, generic ones are ok now 2003-06-17 17:27:08 +00:00
Jonas Maebe
404d344d92 * lots of newra fixes (need getfuncretparaloc implementation for i386)!
* renamed all_intregisters to volatile_intregisters and made it
    processor dependent
2003-06-17 16:34:44 +00:00
Jonas Maebe
642d0f923b * ppc compiles with -dnewra, haven't tried to compile anything with it
yet though
2003-06-14 22:32:43 +00:00
Jonas Maebe
d29c96896f * fixed newra cycle for x86
* added constants for indicating source and destination operands of the
    "move reg,reg" instruction to aasmcpu (and use those in rgobj)
2003-06-14 14:53:50 +00:00
peter
0dceec9a64 * current_procdef removed, use current_procinfo.procdef instead 2003-06-13 21:19:30 +00:00
Jonas Maebe
a5a186799a + added supreg_name function 2003-06-13 17:44:44 +00:00
Jonas Maebe
c0a35f3cab * fixed bugs in case the left node was a LOC_(C)REFERENCE 2003-06-13 17:03:38 +00:00
Jonas Maebe
7ca760912b * tcginnode.pass_2 doesn't call a helper anymore in any case
* fixed ungetregisterfpu compilation problems
2003-06-12 22:09:54 +00:00
Jonas Maebe
709e6da4fa - removed ALL_INTREGISTERS (only the one in rgobj is valid) 2003-06-12 19:11:34 +00:00
Jonas Maebe
55509b199b * (de)allocation of registers for parameters is now performed properly
(and checked on the ppc)
  - removed obsolete allocation of all parameter registers at the start
    of a procedure (and deallocation at the end)
2003-06-09 14:54:26 +00:00
Jonas Maebe
68b629fd16 * fixed small bug where a location was set to LOC_CREGISTER instead of
LOC_REGISTER
2003-06-08 18:20:02 +00:00
Jonas Maebe
d32d1a711e - removed duplicate identifier 2003-06-08 18:19:27 +00:00
Jonas Maebe
98c3c2489e * zero paraloc tregisters, so that the alignment bytes are 0 (otherwise
the crc of the ppu files can change between interface and
    implementation)
2003-06-08 10:52:01 +00:00
Jonas Maebe
edb2179730 + added freeintparaloc
* ppc get/freeintparaloc now check whether the parameter regs are
    properly allocated/deallocated (and get an extra list para)
  * ppc a_call_* now internalerrors if pi_do_call is not yet set
  * fixed lot of missing pi_do_call's
2003-06-07 18:57:04 +00:00
Jonas Maebe
eb066d3b32 * calculate localsize also in g_return_from_proc since it's now called
before g_stackframe_entry (still have to fix macos)
  * compilation fixes (cycle doesn't work yet though)
2003-06-04 11:58:58 +00:00
Jonas Maebe
6f3e16298a * function results can now also be regvars
- removed tprocinfo.return_offset, never use it again since it's invalid
    if the result is a regvar
2003-06-02 21:42:05 +00:00
peter
230a14ff68 * getregisterfpu size parameter added
* op_const_reg size parameter added
  * sparc updates
2003-06-01 21:38:06 +00:00
Jonas Maebe
abc1c5bf2f * fix for bug in fixref that Peter found during the Sparc conversion 2003-06-01 13:42:18 +00:00
peter
1e7ecac976 * FUNCTION_RESULT64_LOW/HIGH_REG added for int64 results 2003-05-31 15:05:28 +00:00
peter
414bd5fa22 * more sparc cleanup
* accumulator removed, splitted in function_return_reg (called) and
    function_result_reg (caller)
2003-05-30 23:57:08 +00:00
marco
1daf2ca476 * register skipping (aligning) for int64 parameters, sys V abi only. 2003-05-30 23:45:49 +00:00
marco
a73b98ea9f * getfuncretparaloc now uses r3 for highdword and r4 for lo. Doesn't work tho 2003-05-30 22:54:19 +00:00
marco
152b525419 * committed fix that swaps int64 parameters hi and lo. 2003-05-30 22:35:03 +00:00
Jonas Maebe
fefdcc6331 * fixed bug with intregvars
* locapara.loc can also be LOC_CFPUREGISTER -> also fixed
    rcgppc.a_param_ref, which previously got bogus size values
2003-05-30 18:52:10 +00:00
Jonas Maebe
d321606bc5 * changed scratchregs from r28-r30 to r29-r31
* made sure the regvar registers don't overlap with the scratchregs
    anymore
2003-05-30 18:49:59 +00:00
Jonas Maebe
413030a90d * fixed problem where sometimes no register was allocated for the result
of an addnode when using regvars
2003-05-30 18:49:14 +00:00
Jonas Maebe
c70f75f1b7 * compile with -dppc603 to not use unaligned float loads in move() and
g_concatcopy, because the 603 and 604 take an exception for those
    (and netbsd doesn't even handle those in the kernel). There are
    still some of those left that could cause problems though (e.g.
    in the set helpers)
2003-05-29 21:17:27 +00:00
Jonas Maebe
05a3d71c88 * also free temps in g_concatcopy if delsource is true 2003-05-29 10:06:09 +00:00
Jonas Maebe
ead9de924c * added missing initialization of rg.usedint{in,by}proc
* ppc now also saves/restores used fpu registers
  * ncgcal doesn't add used registers to usedby/inproc anymore, except for
    i386
2003-05-28 23:58:18 +00:00
florian
a8eb2ab740 * started to fix and clean up the sparc port 2003-05-28 23:18:31 +00:00
Jonas Maebe
1bb8852335 * fixed register numbering bug 2003-05-25 14:32:42 +00:00
Jonas Maebe
4ca3d9a2e9 * fixed shr of 64 bit values by non-immediate value 2003-05-24 19:15:29 +00:00
Jonas Maebe
517e16dae7 * fixed endian problem with tlocation.value/valueqword fields 2003-05-24 16:02:01 +00:00
Jonas Maebe
df5e0bbfc6 * fsqrt is an optional instruction in the ppc architecture and isn't
implemented by any current ppc afaik, so use the generic sqrt routine
    instead (adapted so it works with compilerproc)
2003-05-24 13:39:32 +00:00
Jonas Maebe
ee71991a7f * don't save callee-save registers in the caller as well (the ppc code
that we generate is slow enough as it is without resorting to doing
    double work :)
2003-05-24 13:38:04 +00:00
Jonas Maebe
54cacc63a5 * fixed integer typeconversion problems 2003-05-24 11:59:42 +00:00
Jonas Maebe
5cfedffb9e * added some missing paralocation size settings 2003-05-24 11:48:40 +00:00
Jonas Maebe
d321a5aa3d * fixed framepointer storage: it's now always stored at r1+12, which is
a place in the link area reserved for compiler use.
2003-05-24 11:47:27 +00:00
Jonas Maebe
74301b9544 * fixed support for nested procedures and more parameters than those
which fit in registers (untested/probably not working: calling a
    nested procedure from a deeper nested procedure)
2003-05-23 18:51:26 +00:00
peter
5f6de7eb1f * inherite from tcgprocinfo 2003-05-22 21:34:11 +00:00
florian
9de6468186 + basic darwin support added 2003-05-20 23:54:00 +00:00
florian
999b859bc8 * fixed calling sequence for subroutines using the aix abi 2003-05-19 12:15:28 +00:00
florian
b1b16c8f09 + added abi field to tsysteminfo 2003-05-18 15:15:59 +00:00
Jonas Maebe
624819ccb8 * fixed para/localst calculations (note to self: don't commit at
extremely late/early hours :)
2003-05-17 14:05:30 +00:00
Jonas Maebe
9055529171 * workaround for nested procedures until Peter fixes it properly :) 2003-05-16 23:15:51 +00:00
Jonas Maebe
d816c6a8c6 * powerpc nested procedure fixes, should work completely now if all
local variables of the parent procedure are declared before the
    nested procedures are declared
2003-05-16 20:00:39 +00:00
Jonas Maebe
66792ee44e * adapted for Peter's regvar fixes 2003-05-16 16:26:05 +00:00
florian
137395876d * fixed last commit, changing lastsaveintreg to r31 caused some strange problems 2003-05-15 22:14:42 +00:00
florian
5f6578729b * sysv entry code saves r13 now as well 2003-05-15 21:37:00 +00:00
florian
9c507c2da0 * fixed ppc compiler which was broken by Peter's changes 2003-05-15 19:39:09 +00:00
florian
d73c88ce9f * fixed parameter passing by value of large sets, strings and method pointers 2003-05-12 20:14:47 +00:00
Jonas Maebe
0a392ebf5e * fixed g_concatcopy 2003-05-12 18:43:50 +00:00
florian
65eba18e20 * fixed passing of small const arrays and const records, they are always passed by reference 2003-05-11 23:19:32 +00:00
Jonas Maebe
7d5a2715f6 * fixed bug with large offsets in entrycode 2003-05-11 20:59:23 +00:00
Jonas Maebe
7fc5c04a14 * fixed bug in second_int_to_bool I introduced previous time
(secondpass was being called twice!)
2003-05-11 20:42:08 +00:00
Jonas Maebe
f616bfd3e2 * fixed second_int_to_bool() (but still problem with typecasts used for
var parameters, not sure about solution)
2003-05-11 13:06:44 +00:00
Jonas Maebe
b993c4e2db * fixed shifts 2003-05-11 11:45:08 +00:00
Jonas Maebe
1ff5307e5d + op_reg_reg_reg_const_const (for rlwnm) 2003-05-11 11:08:25 +00:00
Jonas Maebe
2c81208d56 * fixed optimizations in a_op_const_reg_reg() 2003-05-11 11:07:33 +00:00
florian
77d8f335aa * vmtpointer_offset must be adjusted in after_pass1 as well 2003-05-10 23:57:23 +00:00
Jonas Maebe
f64d66fa48 * call inherited after_header as well 2003-05-09 19:00:30 +00:00
Jonas Maebe
5f71d48015 * yet another final fix for second_int_to_real() :) (tested this time) 2003-05-02 15:13:38 +00:00
Jonas Maebe
cfe94be378 * fixed overflow checking form of 64bit add instruction 2003-04-27 11:55:34 +00:00
peter
60978ba89c * aktprocdef renamed to current_procdef
* procinfo renamed to current_procinfo
  * procinfo will now be stored in current_module so it can be
    cleaned up properly
  * gen_main_procsym changed to create_main_proc and release_main_proc
    to also generate a tprocinfo structure
  * fixed unit implicit initfinal
2003-04-27 11:21:32 +00:00
Jonas Maebe
92ac35cc37 * fixed 64bit "const - reg/ref" bugs 2003-04-27 11:06:06 +00:00
florian
d4ca538a40 * fixed nested procedures to get them working as before 2003-04-27 10:41:47 +00:00
peter
a5e7f02527 * updated for removed lexlevel 2003-04-27 07:48:05 +00:00
Jonas Maebe
38d7ec6670 * fix to a_op64_const_reg_reg 2003-04-26 22:56:11 +00:00
florian
19946413fe * fixed setjmp record size 2003-04-26 20:15:22 +00:00
Jonas Maebe
31d94f4f4c * fixed g_flags2reg 2003-04-26 16:08:41 +00:00
florian
dda473894c * fixed cmp_reg_reg_reg, cmp operands were emitted in the wrong order 2003-04-26 15:25:29 +00:00
florian
15c0b633ab * fixed the powerpc to work with the new function result handling 2003-04-26 11:30:59 +00:00
florian
574d50e86b * fixed tfuncretsym stuff in powerpc specific part 2003-04-25 21:05:22 +00:00
florian
b9c76fcf5e * stack frame calculations are now completly done using the code generator
routines instead of generating directly assembler so also large stack frames
    are handle properly
2003-04-25 20:55:34 +00:00
florian
41da381f1a * fixed a lot of PowerPC related stuff 2003-04-24 22:29:57 +00:00
florian
cca5ca2ab9 * fixed not node 2003-04-24 12:57:32 +00:00
florian
90561d5e71 * symbols which are register identifiers aren't resolved anymore 2003-04-24 12:05:53 +00:00
florian
7ec9711f9a * fixed several issues with nested procedures 2003-04-24 11:24:00 +00:00
peter
c092e24817 * fixes to get rtl compiled 2003-04-23 22:18:01 +00:00
peter
72ad478f97 * fix compile for ppc,sparc,m68k 2003-04-23 21:10:54 +00:00
florian
0284016ee9 * fixed several issues with powerpc
+ applied a patch from Jonas for nested function calls (PowerPC only)
  * ...
2003-04-23 12:35:34 +00:00
florian
253df05727 + added first_ and last_imreg 2003-04-22 11:27:48 +00:00
daniel
25059e21b6 + Implemented the actual register allocator
+ Scratch registers unavailable when new register allocator used
  + maybe_save/maybe_restore unavailable when new register allocator used
2003-04-22 10:09:34 +00:00
Jonas Maebe
44f26523e6 * process para's from first to last instead of the other way round 2003-04-17 18:52:35 +00:00
Jonas Maebe
56132c1a9c * assembler procedures now again get a stackframe if they have local
variables. No space is reserved for a function result however.
    Also, the register parameters aren't automatically saved on the stack
    anymore in assembler procedures.
2003-04-16 09:26:55 +00:00
Jonas Maebe
fd1056c621 * fixed paralocation for integer var/out parameters 2003-04-16 07:55:07 +00:00
olle
1372a617cb + line numbers are now emitted in the assembler code
* bug in export and import directive fixed
  * made code more in sync with aggas.pas
2003-04-06 21:01:40 +00:00
Jonas Maebe
f51a189be0 * don't generate entry/exit code for assembler procedures 2003-04-06 16:39:11 +00:00
Jonas Maebe
ec71805aa8 * several ppc/generic result offset related fixes. The "normal" result
offset seems now to be calculated correctly and a lot of duplicate
    calculations have been removed. Nested functions accessing the parent's
    function result don't work at all though :(
2003-04-05 21:09:31 +00:00
peter
6a16389f67 * moved generic code from n386cal to ncgcal, i386 now also
uses the generic ncgcal
2003-04-04 15:38:56 +00:00
Jonas Maebe
e02ecef001 * fixed linux entry/exit code generation 2003-03-22 18:01:13 +00:00
Jonas Maebe
45b9d59df5 * fixes for new regallocator 2003-03-22 18:00:27 +00:00
Jonas Maebe
5893b9bb19 * fixed R_TOC bugs introduced by new register allocator conversion 2003-03-19 14:26:26 +00:00
olle
87fb801dcb * change in a_loadaddr_ref_reg 2003-03-13 22:57:45 +00:00
Jonas Maebe
24e2741659 * more powerpc and generic fixes related to the new register allocator 2003-03-12 22:43:38 +00:00
Jonas Maebe
d168ae15df * lots of new regallocator fixes, both in generic and ppc-specific code
(ppc compiler still can't compile the linux system unit though)
2003-03-11 21:46:24 +00:00
olle
a8b84c17e4 * changed ungetregister to ungetregisterint in tppcaddnode.clear_left_right 2003-03-10 18:11:41 +00:00
daniel
86bcea6ef5 * Code generator converted to new register notation
- Horribily outdated todo.txt removed
2003-02-19 22:00:14 +00:00
carl
59d3edeec7 * Several bugfixes for m68k target (register alloc., opcode emission)
+ VIS target
  + Generic add more complete (still not verified)
2003-02-02 19:25:54 +00:00
olle
6af7aba722 + added new register constants
+ implemented register convertion proc
2003-01-16 11:31:28 +00:00
olle
a02a1adee1 * changed global var access, TOC now contain pointers to globals
* fixed handling of function pointers
2003-01-13 17:17:50 +00:00
florian
2102ce7031 * fixed some PowerPC issues 2003-01-09 22:00:53 +00:00
florian
34a91d9171 * fixed broken PowerPC compiler 2003-01-09 20:41:10 +00:00
daniel
6e507ba483 * Added register conversion 2003-01-09 15:49:56 +00:00
olle
09f06d0cf3 * made powerpc compiler compile after Daniels Tregister modification 2003-01-09 11:22:14 +00:00
daniel
55a161bbbf * Tregister changed into a record 2003-01-08 18:43:56 +00:00
florian
938f46f246 * fixed some crashes and a rte 201 2002-12-15 19:22:01 +00:00
carl
3214bab118 * maxoperands -> max_operands (for portability in rautils.pas)
* fix some range-check errors with loadconst
  + add ncgadd unit to m68k
  * some bugfix of a_param_reg with LOC_CREFERENCE
2002-12-14 15:02:03 +00:00
florian
121ca40b39 * some variant <-> dyn. array stuff 2002-12-05 14:27:25 +00:00
olle
b924813d4a * changed proc ref from .xxx[PR] (refering to its section)
to .xxx (refering to its label) to allow for multiple ref to a proc.
2002-11-28 10:56:07 +00:00
olle
5e90be8184 * macos: changing code gen for references to globals 2002-11-28 10:55:16 +00:00
peter
f3fc72095f * splitted defbase in defutil,symutil,defcmp
* merged isconvertable and is_equal into compare_defs(_ext)
  * made operator search faster by walking the list only once
2002-11-25 17:43:16 +00:00
Jonas Maebe
85c3f6195a + some comments describing the fields of treference 2002-11-24 14:28:56 +00:00
peter
a496dbe1ff * pass proccalloption to ret_in_xxx and push_xxx functions 2002-11-18 17:31:54 +00:00
mazen
a835405a27 * fixed a compilation bug accmulator-->accumulator, in definition of return_result_reg 2002-11-17 18:26:15 +00:00
mazen
41153e2b1a + return_result_reg and function_result_reg are now used, in all plateforms, to pass functions result between called function and its caller. See the explanation of each one 2002-11-17 17:49:08 +00:00
carl
64655be168 * memory optimization (3-4%) : cleanup of tai fields,
cleanup of tdef and tsym fields.
  * make it work for m68k
2002-11-17 16:31:55 +00:00
Jonas Maebe
fb5b623e30 * fixed bctr(l) problems 2002-11-07 15:50:23 +00:00
olle
c5ac9e90af * globals are located in TOC and relative r2, instead of absolute
* symbols which only differs in case are treated as a single symbol
  + tai_const_symbol supported
  * only refs_full accepted
2002-11-04 18:24:53 +00:00
olle
9284b36d3b * macos: globals are located in TOC and relative r2, instead of absolute 2002-11-04 18:24:19 +00:00
olle
b71c1492a9 * macos entry/exit: only used registers are saved
- macos entry/exit: stackptr not saved in r31 anymore
  * macos entry/exit: misc fixes
2002-10-28 22:24:28 +00:00
olle
e2f2f22f91 * branch b does not jump to dotted symbol now 2002-10-23 15:31:01 +00:00
Jonas Maebe
f18626a534 * some range errors fixed 2002-10-21 18:08:05 +00:00
olle
650843907e * import directive changed 2002-10-19 23:52:40 +00:00
olle
4d3ed1a22c * macos stack frame size computing updated
+ macos epilogue: control register now restored
  * macos prologue and epilogue: fp reg now saved and restored
2002-10-19 23:51:48 +00:00
olle
7fde7960b5 * reorganized prologue and epilogue routines 2002-10-19 12:50:36 +00:00
Jonas Maebe
3be297f39c + added entry for pwchar_to_string conversion addition 2002-10-18 16:38:42 +00:00
florian
8ad5fe9533 * changes from Olle to get simple programs compiled and assembled 2002-10-10 19:39:37 +00:00
florian
d3bdd3550f * more mpw fixes 2002-10-07 21:19:53 +00:00
florian
14fe70d27d * fixed function exporting 2002-10-06 22:46:20 +00:00
florian
4cb3d9b498 * improve function imports 2002-10-02 22:14:15 +00:00
florian
fa4a4de18c * all A_BL instructions replaced by calls to a_call_name 2002-10-02 21:49:51 +00:00
Jonas Maebe
4510d75277 + set, variant support in getfuncretparaloc 2002-10-02 13:33:36 +00:00
Jonas Maebe
a738c4ddcf * changed a_call_* so that no superfluous code is generated anymore 2002-10-02 13:24:58 +00:00
olle
fa695eefea * made a_load_store more robust and to accept large offsets and cleaned up code 2002-10-01 05:24:28 +00:00
olle
2b122e04b2 * minor fix 2002-10-01 05:17:27 +00:00
Jonas Maebe
a9144c22c3 * is_nop() now identifies "mr rA,rA" instructions for removal 2002-09-30 23:16:49 +00:00
florian
71f7afa9a6 + getparaloc supports now sets and variants 2002-09-28 21:27:16 +00:00
florian
6b580dea5b + readed because previous version was broken 2002-09-27 21:09:49 +00:00
florian
f7b727850a no message 2002-09-27 20:51:37 +00:00
florian
3781508f8b * fixed last commit 2002-09-27 20:50:13 +00:00
florian
9c8c82432b * initial working implementation by Olle Raab 2002-09-27 20:47:14 +00:00
Jonas Maebe
456436c05c * fixed LOC_REFERENCE/LOC_CREFERENCE problems 2002-09-18 09:19:37 +00:00
Jonas Maebe
a15d8cfe39 * a_load_reg_reg() now has two size parameters: source and dest. This
allows some optimizations on architectures that don't encode the
    register size in the register name.
2002-09-17 18:54:01 +00:00
Jonas Maebe
2e41fdf381 - removed taicpu.destroy, its job is already handled by
taicpu_abstract.destroy() and this caused heap corruption
2002-09-17 18:26:02 +00:00
Jonas Maebe
17a0e516b5 * int64 paras are now handled correctly (until the registers are used up
anyway :)
  * the return location is now initialized correctly
  * fixed bug where ret_in_reg() was called for the procdefinition instead
    of for the result of the procedure
2002-09-10 21:28:05 +00:00
Jonas Maebe
02e9260997 + added some internal errors
* fixed bug in sysv exit code
2002-09-10 21:22:25 +00:00
Jonas Maebe
b72f53ab92 * fixed unary minus of 64bit values 2002-09-10 21:21:29 +00:00
florian
07eeafd07a * fixed offset calculation for symtables etc. 2002-09-10 20:30:42 +00:00
Jonas Maebe
775b065d70 * small optimization to case genlist() case statements 2002-09-09 13:57:45 +00:00
florian
36e41d49d3 - removed passes_parameters_in_reg 2002-09-09 09:11:37 +00:00
Jonas Maebe
38f088b5a7 * use genlinearcmplist() for unsigned 32bit case statements instead
of genlinearlist(), because the addic. instruction always sets the
    flags as if the arguments are signed 32bits (for smaller unsigned
    types, this doesn't matter since they fit in s32bit)
2002-09-08 20:14:33 +00:00
Jonas Maebe
32d4d8780f * fixed TOpCmp2AsmCond array (some unsigned equivalents were wrong) 2002-09-08 20:11:56 +00:00
Jonas Maebe
d20dd2b433 * more optimizations for 64bit compares 2002-09-08 14:14:49 +00:00
Jonas Maebe
07c1116a8c * several large offset-related fixes 2002-09-08 13:03:26 +00:00
Jonas Maebe
d1ac166584 * fixed optimized 64 compares 2002-09-07 22:15:48 +00:00
carl
752beef0dd * cardinal -> longword 2002-09-07 20:40:23 +00:00
florian
a7a354956d * first part of PowerPC fixes 2002-09-07 17:54:58 +00:00
peter
dcd9e0107c * old logs removed and tabs fixed 2002-09-07 15:25:00 +00:00
Jonas Maebe
426de6d36f * fixed bugs in 64bit operations (registers weren't always allocated for
the result)
  * optimized 'const64 - reg64/mem64'
  * optimized equaln/unequaln with 64bit values (change them to
    '(left.hi xor right.hi) or (left.lo xor right.lo)' so there are less
    branches and the result can be returned in the flags this way. Could
    be done for the i386 too probably.
2002-09-04 19:42:45 +00:00
Jonas Maebe
650eb87f8c + parse basic optimization parameters 2002-09-04 16:03:53 +00:00
daniel
fff92ef11e * Fixed PowerPC & M68000 compilation 2002-09-03 19:04:18 +00:00
daniel
b0364566d1 * Make Tprocdef.defs protected 2002-09-03 16:26:26 +00:00
Jonas Maebe
ce868dcdac + a_call_reg()
* small fix in a_call_ref()
2002-09-02 10:14:51 +00:00
Jonas Maebe
c7df12f6f0 * fixed range error 2002-09-02 06:09:02 +00:00
florian
6502638258 * several powerpc related stuff fixed 2002-09-01 21:04:47 +00:00
peter
7898dcf9ed + a_call_reg, a_call_loc added
* removed exprasmlist references
2002-09-01 12:09:27 +00:00
Jonas Maebe
431b9fac81 * fixed a_call_ref (it should load ctr, not lr) 2002-08-31 21:38:02 +00:00
florian
391ce796ef * fixed several problems caused by Jonas' commit :) 2002-08-31 21:30:45 +00:00
Jonas Maebe
f107ba3bbe + support top_none for branches 2002-08-31 19:27:48 +00:00
Jonas Maebe
7a8429a4fe * fixed 64bit comparisons 2002-08-31 19:26:20 +00:00
Jonas Maebe
76111bb9eb + implemented a_call_ref() 2002-08-31 19:25:50 +00:00
florian
5e60724d23 + HEAP* stuff must be generated for Linux/PPC as well
+ direct assembler reader searches now global and static symtables as well
2002-08-31 15:59:30 +00:00
florian
5380652cad * ppc compilation fixed 2002-08-31 12:43:31 +00:00
peter
4b81e16fe2 * tempgen cleanup
* tt_noreuse temp type added that will be used in genentrycode
2002-08-23 16:14:48 +00:00
florian
4549d72802 + target macos for ppc added
+ frame work for mpw assembler output
2002-08-20 21:40:44 +00:00
Jonas Maebe
d709f6720b * fixes 2002-08-19 17:35:42 +00:00
florian
0d1a344d7f + the ppc gas assembler writer adds now registers aliases
to the assembler file
2002-08-18 22:16:14 +00:00
florian
39f35373a8 + handling of local variables in direct reader implemented 2002-08-18 21:36:42 +00:00
peter
98dd65b0f3 * inlining is now also allowed in interface
* renamed write/load to ppuwrite/ppuload
  * tnode storing in ppu
  * nld,ncon,nbas are already updated for storing in ppu
2002-08-18 20:06:23 +00:00
florian
a375ad9565 * remaining assembler writer bugs fixed, the errors in the
system unit are inline assembler problems
2002-08-18 10:42:37 +00:00
florian
c853f24a86 * more ppc assembling fixes 2002-08-18 10:34:30 +00:00
florian
4144773f01 * result type handling in tcgcal.pass_2 overhauled
* better tnode.dowrite
  * some ppc stuff fixed
2002-08-17 22:09:43 +00:00
florian
b841ba8b16 * some assembler writer bugs fixed 2002-08-17 18:23:53 +00:00
florian
e313bab4ff * first part of procinfo rewrite 2002-08-17 09:23:33 +00:00
carl
745efb2c47 * issameref() to test if two references are the same (then emit no opcodes)
+ ret_in_reg to replace ret_in_acc
    (fix some register allocation bugs at the same time)
  + save_std_register now has an extra parameter which is the
    usedinproc registers
2002-08-16 14:24:57 +00:00
carl
588abc6631 * jmpbuf size allocation for exceptions is now cpu specific (as it should)
* more generic nodes for maths
  * several fixes for better m68k support
2002-08-15 15:15:55 +00:00
carl
c33d99adb7 - a_load_sym_ofs_reg removed
* loadvmt now calls loadaddr_ref_reg instead
2002-08-15 08:13:54 +00:00
carl
d175d7113f + added fixing because first_in_to_real is now completely generic 2002-08-14 19:30:42 +00:00
Jonas Maebe
3ab3c91e0a - remove valuelow/valuehigh fields from tlocation, because they depend
on the endianess of the host operating system -> difficult to get
    right. Use lo/hi(location.valueqword) instead (remember to use
    valueqword and not value!!)
2002-08-14 18:41:47 +00:00
florian
af4302bc67 * more fixes for ppc calling conventions 2002-08-13 21:40:55 +00:00
carl
9da171faf2 + stab register indexes for powerpc (moved from gdb to cpubase)
+ tprocessor enumeration moved to cpuinfo
  + linker in target_info is now a class
  * many many updates for m68k (will soon start to compile)
  - removed some ifdef or correct them for correct cpu
2002-08-12 15:08:39 +00:00
peter
425bb45ddc * renamed current_library to objectlibrary 2002-08-11 14:32:25 +00:00
peter
ac71268ce6 * saving of asmsymbols in ppu supported
* asmsymbollist global is removed and moved into a new class
    tasmlibrarydata that will hold the info of a .a file which
    corresponds with a single module. Added librarydata to tmodule
    to keep the library info stored for the module. In the future the
    objectfiles will also be stored to the tasmlibrarydata class
  * all getlabel/newasmsymbol and friends are moved to the new class
2002-08-11 13:24:10 +00:00
Jonas Maebe
387f05b00d * some overflow checking fixes 2002-08-11 11:40:16 +00:00
Jonas Maebe
9ba736bd04 + powerpc-specific genlinearlist 2002-08-11 11:39:12 +00:00
carl
1f1145d30e - no longer used files removed 2002-08-11 07:02:00 +00:00
florian
3ec544be88 * fixed powerpc compilation problems 2002-08-11 06:14:40 +00:00
Jonas Maebe
ee7d5f7b2a * various fixes and optimizations 2002-08-10 17:15:31 +00:00
Jonas Maebe
bedbc15e75 * endianess fix 2002-08-10 17:15:06 +00:00
Jonas Maebe
f1f27e99b4 + abs, sqr, sqrt implementations 2002-08-10 17:15:00 +00:00
carl
18b102ce95 + moved target_cpu_string to cpuinfo
* renamed asmmode enum.
  * assembler reader has now less ifdef's
  * move from nppcmem.pas -> ncgmem.pas vec. node.
2002-08-10 14:46:29 +00:00
florian
b136cecacd * first part of ppc calling conventions fix 2002-08-06 20:55:20 +00:00
Jonas Maebe
e7d92a1aa7 * fixed bug in g_flags2reg()
* and yet more constant operation fixes :)
2002-08-06 07:12:05 +00:00
Jonas Maebe
10c4e8eb15 * fixed compilation problems 2002-08-05 08:58:53 +00:00
Jonas Maebe
8ff3e3e1b3 * more misc. fixes, mostly constant-related 2002-08-04 12:57:55 +00:00
Jonas Maebe
54011b5bea * some misc constant fixes 2002-08-02 11:10:42 +00:00
florian
ed950491a8 * the code generator knows now if parameters are in registers 2002-07-30 20:50:43 +00:00
florian
e7a6cd18dd * more fixes for the ppc
+ wrappers for the tcnvnode.first_* stuff introduced
2002-07-29 21:23:42 +00:00
Jonas Maebe
07089fadb7 + nppcmem 2002-07-29 09:22:20 +00:00
Jonas Maebe
a1a3283c61 + tppcvecnode, almost straight copy of the i386 code, can most likely
be made generic if all treference type allow a base, index and offset
2002-07-29 09:21:30 +00:00
Jonas Maebe
04cb71275a + second_int_to_int implementation which is almost the same as the
generic implementation, but it avoids some unnecessary type conversions
2002-07-29 09:20:20 +00:00
florian
37351a4590 - removed debug code which was commited by accident 2002-07-28 21:38:30 +00:00
florian
463b355ba3 * more powerpc fixes
+ dummy tcgvecnode
2002-07-28 21:34:31 +00:00
florian
3fe0229843 + added direct assembler reader for PowerPC 2002-07-28 20:45:22 +00:00
Jonas Maebe
046ee7bf2b + 64 bit operations (badly tested), everything is implemented now!
* some small fixes
2002-07-28 16:02:49 +00:00
Jonas Maebe
e3cbc3cf22 + tcg64fppc.a_op64_const_reg_reg() and tcg64fppc.a_op64_reg_reg_reg()
* several fixes, most notably in a_load_reg_reg(): it didn't do any
    conversion from smaller to larger sizes or vice versa
  * some small optimizations
2002-07-28 16:01:59 +00:00
Jonas Maebe
ccf4a67d81 + second_addboolean(), second_addfloat() and second_addsmallset()
(64bit stuff is all that's left to do)
2002-07-27 20:00:59 +00:00
Jonas Maebe
b4cfa73079 * fixed a_loadaddr_ref_reg()
* fixed g_flags2reg()
  * optimized g_concatcopy()
2002-07-27 19:59:29 +00:00
Jonas Maebe
1b983ee56e * some typo corrections in the instruction tables
* renamed the m* registers to v*
2002-07-27 19:57:18 +00:00
Jonas Maebe
6b83738e7d + generic implementation of tcg.g_flags2ref()
* tcg.flags2xxx() now also needs a size parameter
2002-07-27 19:53:51 +00:00
florian
1b5435381b * several PowerPC related fixes to get forward with system unit compilation 2002-07-26 22:22:10 +00:00
florian
eb2ca8d10f * rewrote the system handling 2002-07-26 21:15:37 +00:00
Jonas Maebe
0d740d4de8 + intial implementation of add nodes, only integer/enumeration/pointer/...
handling is finished
2002-07-26 12:31:56 +00:00
Jonas Maebe
83ce7360ed * fixed typo in instruction table (_subco_ -> a_subco) 2002-07-26 12:30:51 +00:00
Jonas Maebe
e2c5923e97 * fixed range errors 2002-07-26 11:19:57 +00:00
Jonas Maebe
61a2a3ae37 * fixed bug in shl/shr code 2002-07-26 10:48:34 +00:00
carl
448d40de1a + FPURESULTREG -> FPU_RESULT_REG 2002-07-25 17:56:29 +00:00
florian
156fc666c8 * small typo fixed, compiles with 1.0.x again 2002-07-24 14:38:00 +00:00
Jonas Maebe
c1e9bd36a3 * make sure we use rlwi* when possible instead of andi. 2002-07-21 17:00:23 +00:00